summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/CODEOWNERS231
-rw-r--r--.github/workflows/linux_builds.yml16
-rw-r--r--.github/workflows/windows_builds.yml2
-rw-r--r--.gitignore6
-rw-r--r--.mailmap7
-rw-r--r--AUTHORS.md6
-rw-r--r--COPYRIGHT.txt5
-rw-r--r--DONORS.md128
-rw-r--r--SConstruct57
-rw-r--r--core/config/project_settings.cpp236
-rw-r--r--core/config/project_settings.h14
-rw-r--r--core/core_bind.cpp80
-rw-r--r--core/core_bind.h24
-rw-r--r--core/core_constants.cpp6
-rw-r--r--core/core_string_names.cpp3
-rw-r--r--core/core_string_names.h1
-rw-r--r--core/crypto/crypto.cpp2
-rw-r--r--core/crypto/crypto.h2
-rw-r--r--core/debugger/remote_debugger_peer.cpp12
-rw-r--r--core/debugger/remote_debugger_peer.h2
-rw-r--r--core/error/error_macros.h14
-rw-r--r--core/input/gamecontrollerdb.txt116
-rw-r--r--core/input/godotcontrollerdb.txt6
-rw-r--r--core/input/input.cpp61
-rw-r--r--core/input/input.h11
-rw-r--r--core/input/input_event.cpp67
-rw-r--r--core/input/input_event.h22
-rw-r--r--core/input/input_map.cpp548
-rw-r--r--core/input/input_map.h17
-rw-r--r--core/io/file_access_network.cpp11
-rw-r--r--core/io/file_access_network.h2
-rw-r--r--core/io/http_client.cpp6
-rw-r--r--core/io/image.cpp22
-rw-r--r--core/io/image.h2
-rw-r--r--core/io/image_loader.cpp2
-rw-r--r--core/io/image_loader.h2
-rw-r--r--core/io/ip.cpp48
-rw-r--r--core/io/logger.cpp4
-rw-r--r--core/io/resource.cpp132
-rw-r--r--core/io/resource.h7
-rw-r--r--core/io/resource_format_binary.cpp79
-rw-r--r--core/io/resource_format_binary.h4
-rw-r--r--core/io/resource_importer.cpp4
-rw-r--r--core/io/resource_importer.h2
-rw-r--r--core/io/resource_loader.cpp59
-rw-r--r--core/io/resource_loader.h16
-rw-r--r--core/io/translation_loader_po.cpp2
-rw-r--r--core/io/translation_loader_po.h2
-rw-r--r--core/math/aabb.h8
-rw-r--r--core/math/audio_frame.h3
-rw-r--r--core/math/camera_matrix.cpp4
-rw-r--r--core/math/color.cpp49
-rw-r--r--core/math/color.h25
-rw-r--r--core/math/geometry_3d.cpp15
-rw-r--r--core/math/geometry_3d.h33
-rw-r--r--core/math/math_funcs.h8
-rw-r--r--core/math/quat.cpp107
-rw-r--r--core/math/quat.h19
-rw-r--r--core/math/transform.h4
-rw-r--r--core/math/vector2.cpp12
-rw-r--r--core/math/vector2.h30
-rw-r--r--core/math/vector3.h8
-rw-r--r--core/object/class_db.cpp12
-rw-r--r--core/object/class_db.h3
-rw-r--r--core/object/object.cpp26
-rw-r--r--core/object/object.h24
-rw-r--r--core/object/reference.cpp4
-rw-r--r--core/object/script_language.cpp10
-rw-r--r--core/os/memory.cpp26
-rw-r--r--core/os/memory.h6
-rw-r--r--core/os/os.h5
-rw-r--r--core/os/rw_lock.h84
-rw-r--r--core/os/thread.cpp83
-rw-r--r--core/os/thread.h72
-rw-r--r--core/os/thread_dummy.h62
-rw-r--r--core/os/threaded_array_processor.h23
-rw-r--r--core/register_core_types.cpp1
-rw-r--r--core/string/translation.cpp12
-rw-r--r--core/string/ustring.cpp140
-rw-r--r--core/string/ustring.h13
-rw-r--r--core/templates/command_queue_mt.h5
-rw-r--r--core/templates/cowdata.h21
-rw-r--r--core/templates/rid_owner.cpp2
-rw-r--r--core/templates/rid_owner.h95
-rw-r--r--core/templates/safe_refcount.cpp161
-rw-r--r--core/templates/safe_refcount.h342
-rw-r--r--core/templates/thread_work_pool.cpp16
-rw-r--r--core/templates/thread_work_pool.h6
-rw-r--r--core/variant/array.cpp24
-rw-r--r--core/variant/array.h5
-rw-r--r--core/variant/variant.cpp2
-rw-r--r--core/variant/variant_call.cpp25
-rw-r--r--core/variant/variant_construct.cpp2
-rw-r--r--doc/classes/@GlobalScope.xml20
-rw-r--r--doc/classes/AnimatedSprite3D.xml5
-rw-r--r--doc/classes/Array.xml37
-rw-r--r--doc/classes/ArrayMesh.xml2
-rw-r--r--doc/classes/AudioEffectCapture.xml75
-rw-r--r--doc/classes/Button.xml32
-rw-r--r--doc/classes/CheckBox.xml14
-rw-r--r--doc/classes/CheckButton.xml14
-rw-r--r--doc/classes/CodeEdit.xml10
-rw-r--r--doc/classes/CodeHighlighter.xml40
-rw-r--r--doc/classes/CollisionPolygon3D.xml3
-rw-r--r--doc/classes/Color.xml22
-rw-r--r--doc/classes/ColorPickerButton.xml12
-rw-r--r--doc/classes/Control.xml17
-rw-r--r--doc/classes/DisplayServer.xml36
-rw-r--r--doc/classes/EditorImportPlugin.xml12
-rw-r--r--doc/classes/EditorSyntaxHighlighter.xml6
-rw-r--r--doc/classes/Environment.xml4
-rw-r--r--doc/classes/File.xml16
-rw-r--r--doc/classes/Font.xml4
-rw-r--r--doc/classes/FontData.xml34
-rw-r--r--doc/classes/GraphNode.xml7
-rw-r--r--doc/classes/HTTPClient.xml2
-rw-r--r--doc/classes/HTTPRequest.xml2
-rw-r--r--doc/classes/ItemList.xml8
-rw-r--r--doc/classes/Label.xml8
-rw-r--r--doc/classes/Light3D.xml2
-rw-r--r--doc/classes/LineEdit.xml14
-rw-r--r--doc/classes/LinkButton.xml10
-rw-r--r--doc/classes/Material.xml6
-rw-r--r--doc/classes/MenuButton.xml12
-rw-r--r--doc/classes/MultiplayerAPI.xml3
-rw-r--r--doc/classes/NetworkedMultiplayerPeer.xml3
-rw-r--r--doc/classes/Node.xml3
-rw-r--r--doc/classes/OS.xml19
-rw-r--r--doc/classes/Object.xml240
-rw-r--r--doc/classes/OptionButton.xml12
-rw-r--r--doc/classes/PackedScene.xml2
-rw-r--r--doc/classes/PopupMenu.xml18
-rw-r--r--doc/classes/ProgressBar.xml8
-rw-r--r--doc/classes/ProjectSettings.xml34
-rw-r--r--doc/classes/RenderingDevice.xml130
-rw-r--r--doc/classes/RenderingServer.xml2
-rw-r--r--doc/classes/Resource.xml2
-rw-r--r--doc/classes/RichTextLabel.xml31
-rw-r--r--doc/classes/SceneTree.xml1
-rw-r--r--doc/classes/ScriptEditor.xml6
-rw-r--r--doc/classes/ScriptEditorBase.xml11
-rw-r--r--doc/classes/Shape3D.xml3
-rw-r--r--doc/classes/String.xml113
-rw-r--r--doc/classes/SurfaceTool.xml4
-rw-r--r--doc/classes/SyntaxHighlighter.xml37
-rw-r--r--doc/classes/TabContainer.xml24
-rw-r--r--doc/classes/Tabs.xml26
-rw-r--r--doc/classes/TextEdit.xml15
-rw-r--r--doc/classes/TextServer.xml40
-rw-r--r--doc/classes/TileMap.xml3
-rw-r--r--doc/classes/TouchScreenButton.xml3
-rw-r--r--doc/classes/Tree.xml8
-rw-r--r--doc/classes/TreeItem.xml12
-rw-r--r--doc/classes/Vector3.xml13
-rw-r--r--doc/classes/VideoPlayer.xml1
-rw-r--r--doc/classes/Viewport.xml14
-rw-r--r--doc/classes/VisualShaderNodeClamp.xml32
-rw-r--r--doc/classes/VisualShaderNodeIntFunc.xml9
-rw-r--r--doc/classes/VisualShaderNodeMix.xml32
-rw-r--r--doc/classes/VisualShaderNodeSDFRaymarch.xml4
-rw-r--r--doc/classes/VisualShaderNodeScalarClamp.xml15
-rw-r--r--doc/classes/VisualShaderNodeScalarInterp.xml15
-rw-r--r--doc/classes/VisualShaderNodeScalarSmoothStep.xml16
-rw-r--r--doc/classes/VisualShaderNodeScalarSwitch.xml15
-rw-r--r--doc/classes/VisualShaderNodeSmoothStep.xml33
-rw-r--r--doc/classes/VisualShaderNodeStep.xml33
-rw-r--r--doc/classes/VisualShaderNodeSwitch.xml27
-rw-r--r--doc/classes/VisualShaderNodeVectorClamp.xml15
-rw-r--r--doc/classes/VisualShaderNodeVectorInterp.xml15
-rw-r--r--doc/classes/VisualShaderNodeVectorScalarMix.xml15
-rw-r--r--doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml16
-rw-r--r--doc/classes/VisualShaderNodeVectorScalarStep.xml16
-rw-r--r--doc/classes/VisualShaderNodeVectorSmoothStep.xml16
-rw-r--r--doc/classes/Window.xml9
-rwxr-xr-xdoc/tools/makerst.py15
-rw-r--r--drivers/alsa/SCsub3
-rw-r--r--drivers/alsa/asound-so_wrap.c11566
-rw-r--r--drivers/alsa/asound-so_wrap.h5148
-rw-r--r--drivers/alsa/audio_driver_alsa.cpp37
-rw-r--r--drivers/alsa/audio_driver_alsa.h4
-rw-r--r--drivers/alsamidi/midi_driver_alsamidi.cpp13
-rw-r--r--drivers/alsamidi/midi_driver_alsamidi.h4
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.cpp8
-rw-r--r--drivers/dummy/rasterizer_dummy.h450
-rw-r--r--drivers/dummy/texture_loader_dummy.cpp2
-rw-r--r--drivers/dummy/texture_loader_dummy.h2
-rw-r--r--drivers/pulseaudio/SCsub3
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.cpp24
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.h4
-rw-r--r--drivers/pulseaudio/pulse-so_wrap.c3232
-rw-r--r--drivers/pulseaudio/pulse-so_wrap.h1444
-rw-r--r--drivers/unix/dir_access_unix.cpp2
-rw-r--r--drivers/unix/os_unix.cpp12
-rw-r--r--drivers/unix/rw_lock_posix.cpp93
-rw-r--r--drivers/unix/rw_lock_posix.h62
-rw-r--r--drivers/unix/thread_posix.cpp96
-rw-r--r--drivers/unix/thread_posix.h38
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp757
-rw-r--r--drivers/vulkan/rendering_device_vulkan.h44
-rw-r--r--drivers/vulkan/vulkan_context.cpp132
-rw-r--r--drivers/vulkan/vulkan_context.h15
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp13
-rw-r--r--drivers/wasapi/audio_driver_wasapi.h2
-rw-r--r--drivers/windows/rw_lock_windows.cpp87
-rw-r--r--drivers/windows/rw_lock_windows.h63
-rw-r--r--drivers/windows/thread_windows.cpp88
-rw-r--r--drivers/windows/thread_windows.h67
-rw-r--r--drivers/xaudio2/audio_driver_xaudio2.cpp18
-rw-r--r--drivers/xaudio2/audio_driver_xaudio2.h2
-rw-r--r--editor/animation_track_editor.cpp9
-rw-r--r--editor/array_property_edit.cpp11
-rw-r--r--editor/array_property_edit.h1
-rw-r--r--editor/audio_stream_preview.cpp12
-rw-r--r--editor/audio_stream_preview.h14
-rw-r--r--editor/connections_dialog.cpp2
-rw-r--r--editor/debugger/editor_debugger_inspector.h2
-rw-r--r--editor/debugger/editor_debugger_tree.cpp15
-rw-r--r--editor/debugger/editor_debugger_tree.h1
-rw-r--r--editor/debugger/editor_network_profiler.cpp8
-rw-r--r--editor/dependency_editor.cpp8
-rw-r--r--editor/dictionary_property_edit.cpp11
-rw-r--r--editor/dictionary_property_edit.h1
-rw-r--r--editor/editor_audio_buses.cpp18
-rw-r--r--editor/editor_data.cpp38
-rw-r--r--editor/editor_data.h4
-rw-r--r--editor/editor_export.cpp20
-rw-r--r--editor/editor_feature_profile.cpp6
-rw-r--r--editor/editor_file_system.cpp45
-rw-r--r--editor/editor_file_system.h7
-rw-r--r--editor/editor_folding.cpp16
-rw-r--r--editor/editor_help.cpp8
-rw-r--r--editor/editor_inspector.cpp169
-rw-r--r--editor/editor_inspector.h16
-rw-r--r--editor/editor_node.cpp327
-rw-r--r--editor/editor_node.h22
-rw-r--r--editor/editor_plugin.cpp14
-rw-r--r--editor/editor_plugin.h4
-rw-r--r--editor/editor_plugin_settings.cpp66
-rw-r--r--editor/editor_plugin_settings.h2
-rw-r--r--editor/editor_properties.cpp75
-rw-r--r--editor/editor_properties.h3
-rw-r--r--editor/editor_resource_preview.cpp23
-rw-r--r--editor/editor_resource_preview.h7
-rw-r--r--editor/editor_sectioned_inspector.cpp12
-rw-r--r--editor/editor_sectioned_inspector.h3
-rw-r--r--editor/editor_settings.cpp195
-rw-r--r--editor/editor_settings.h7
-rw-r--r--editor/editor_sub_scene.cpp265
-rw-r--r--editor/editor_themes.cpp234
-rw-r--r--editor/fileserver/editor_file_server.cpp12
-rw-r--r--editor/fileserver/editor_file_server.h4
-rw-r--r--editor/filesystem_dock.cpp27
-rw-r--r--editor/find_in_files.cpp5
-rw-r--r--editor/icons/GPUParticlesAttractorBox.svg1
-rw-r--r--editor/icons/GPUParticlesAttractorSphere.svg1
-rw-r--r--editor/icons/GPUParticlesAttractorVectorField.svg1
-rw-r--r--editor/icons/GPUParticlesCollisionBox.svg1
-rw-r--r--editor/icons/GPUParticlesCollisionHeightField.svg1
-rw-r--r--editor/icons/GPUParticlesCollisionSDF.svg1
-rw-r--r--editor/icons/GPUParticlesCollisionSphere.svg1
-rw-r--r--editor/icons/Logo.svg2
-rw-r--r--editor/import/collada.cpp4
-rw-r--r--editor/import/resource_importer_layered_texture.cpp12
-rw-r--r--editor/import/resource_importer_scene.cpp18
-rw-r--r--editor/import/resource_importer_scene.h2
-rw-r--r--editor/import/resource_importer_texture.cpp16
-rw-r--r--editor/import/scene_importer_mesh.cpp104
-rw-r--r--editor/import/scene_importer_mesh.h5
-rw-r--r--editor/import_dock.cpp4
-rw-r--r--editor/localization_editor.cpp96
-rw-r--r--editor/node_3d_editor_gizmos.cpp42
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp5
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp5
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp27
-rw-r--r--editor/plugins/audio_stream_editor_plugin.cpp6
-rw-r--r--editor/plugins/audio_stream_editor_plugin.h3
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp18
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/editor_preview_plugins.cpp30
-rw-r--r--editor/plugins/editor_preview_plugins.h8
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp12
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp298
-rw-r--r--editor/plugins/node_3d_editor_plugin.h4
-rw-r--r--editor/plugins/packed_scene_translation_parser_plugin.cpp2
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_text_editor.cpp42
-rw-r--r--editor/plugins/shader_editor_plugin.cpp34
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp6
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp5
-rw-r--r--editor/plugins/text_editor.cpp30
-rw-r--r--editor/plugins/texture_3d_editor_plugin.cpp11
-rw-r--r--editor/plugins/texture_3d_editor_plugin.h4
-rw-r--r--editor/plugins/texture_editor_plugin.cpp8
-rw-r--r--editor/plugins/texture_editor_plugin.h2
-rw-r--r--editor/plugins/texture_layered_editor_plugin.cpp12
-rw-r--r--editor/plugins/texture_layered_editor_plugin.h3
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp60
-rw-r--r--editor/plugins/texture_region_editor_plugin.h4
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp21
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp374
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h1
-rw-r--r--editor/pot_generator.cpp6
-rw-r--r--editor/project_export.cpp6
-rw-r--r--editor/project_manager.cpp69
-rw-r--r--editor/project_manager.h2
-rw-r--r--editor/project_settings_editor.cpp37
-rw-r--r--editor/project_settings_editor.h3
-rw-r--r--editor/scene_tree_dock.cpp230
-rw-r--r--editor/scene_tree_dock.h17
-rw-r--r--editor/scene_tree_editor.cpp21
-rw-r--r--editor/scene_tree_editor.h4
-rw-r--r--editor/settings_config_dialog.cpp4
-rw-r--r--editor/shader_globals_editor.cpp2
-rw-r--r--editor/translations/af.po35
-rw-r--r--editor/translations/ar.po39
-rw-r--r--editor/translations/bg.po688
-rw-r--r--editor/translations/bn.po100
-rw-r--r--editor/translations/br.po34
-rw-r--r--editor/translations/ca.po39
-rw-r--r--editor/translations/cs.po56
-rw-r--r--editor/translations/da.po203
-rw-r--r--editor/translations/de.po117
-rw-r--r--editor/translations/editor.pot34
-rw-r--r--editor/translations/el.po52
-rw-r--r--editor/translations/eo.po34
-rw-r--r--editor/translations/es.po127
-rw-r--r--editor/translations/es_AR.po120
-rw-r--r--editor/translations/et.po103
-rw-r--r--editor/translations/eu.po37
-rw-r--r--editor/translations/fa.po36
-rw-r--r--editor/translations/fi.po116
-rw-r--r--editor/translations/fil.po34
-rw-r--r--editor/translations/fr.po108
-rw-r--r--editor/translations/ga.po34
-rw-r--r--editor/translations/gl.po12824
-rw-r--r--editor/translations/he.po40
-rw-r--r--editor/translations/hi.po37
-rw-r--r--editor/translations/hr.po34
-rw-r--r--editor/translations/hu.po51
-rw-r--r--editor/translations/id.po39
-rw-r--r--editor/translations/is.po34
-rw-r--r--editor/translations/it.po330
-rw-r--r--editor/translations/ja.po71
-rw-r--r--editor/translations/ka.po35
-rw-r--r--editor/translations/ko.po39
-rw-r--r--editor/translations/lt.po35
-rw-r--r--editor/translations/lv.po36
-rw-r--r--editor/translations/mi.po34
-rw-r--r--editor/translations/mk.po58
-rw-r--r--editor/translations/ml.po34
-rw-r--r--editor/translations/mr.po34
-rw-r--r--editor/translations/ms.po37
-rw-r--r--editor/translations/nb.po37
-rw-r--r--editor/translations/nl.po260
-rw-r--r--editor/translations/or.po34
-rw-r--r--editor/translations/pl.po128
-rw-r--r--editor/translations/pr.po34
-rw-r--r--editor/translations/pt.po289
-rw-r--r--editor/translations/pt_BR.po139
-rw-r--r--editor/translations/ro.po36
-rw-r--r--editor/translations/ru.po126
-rw-r--r--editor/translations/si.po53
-rw-r--r--editor/translations/sk.po37
-rw-r--r--editor/translations/sl.po44
-rw-r--r--editor/translations/sq.po36
-rw-r--r--editor/translations/sr_Cyrl.po39
-rw-r--r--editor/translations/sr_Latn.po34
-rw-r--r--editor/translations/sv.po36
-rw-r--r--editor/translations/ta.po34
-rw-r--r--editor/translations/te.po34
-rw-r--r--editor/translations/th.po49
-rw-r--r--editor/translations/tr.po129
-rw-r--r--editor/translations/tzm.po34
-rw-r--r--editor/translations/uk.po114
-rw-r--r--editor/translations/ur_PK.po34
-rw-r--r--editor/translations/vi.po38
-rw-r--r--editor/translations/zh_CN.po118
-rw-r--r--editor/translations/zh_HK.po35
-rw-r--r--editor/translations/zh_TW.po111
-rw-r--r--main/main.cpp357
-rw-r--r--main/performance.cpp2
-rw-r--r--methods.py84
-rw-r--r--misc/dist/html/editor.html25
-rw-r--r--misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj16
-rw-r--r--misc/dist/ios_xcode/libgodot.iphone.debug.fat.a0
-rw-r--r--misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/Info.plist40
-rw-r--r--misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/empty1
-rw-r--r--misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/empty1
-rw-r--r--misc/dist/ios_xcode/libgodot.iphone.release.fat.a0
-rw-r--r--misc/dist/ios_xcode/libgodot.iphone.release.xcframework/Info.plist40
-rw-r--r--misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/empty1
-rw-r--r--misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/empty1
-rw-r--r--misc/dist/project_icon.svg2
-rwxr-xr-xmisc/hooks/pre-commit-clang-format25
-rwxr-xr-xmisc/scripts/clang_format.sh2
-rwxr-xr-xmisc/scripts/file_format.sh11
-rw-r--r--modules/SCsub12
-rw-r--r--modules/arkit/SCsub15
-rw-r--r--modules/arkit/arkit.gdip18
-rw-r--r--modules/arkit/arkit_interface.h134
-rw-r--r--modules/arkit/arkit_interface.mm791
-rw-r--r--modules/arkit/arkit_module.cpp45
-rw-r--r--modules/arkit/arkit_module.h37
-rw-r--r--modules/arkit/arkit_session_delegate.mm56
-rw-r--r--modules/arkit/config.py6
-rw-r--r--modules/basis_universal/texture_basisu.cpp1
-rw-r--r--modules/basis_universal/texture_basisu.h2
-rw-r--r--modules/bmp/image_loader_bmp.h30
-rw-r--r--modules/bullet/area_bullet.h10
-rw-r--r--modules/bullet/btRayShape.cpp4
-rw-r--r--modules/bullet/btRayShape.h6
-rw-r--r--modules/bullet/bullet_physics_server.cpp40
-rw-r--r--modules/bullet/bullet_physics_server.h36
-rw-r--r--modules/bullet/collision_object_bullet.h2
-rw-r--r--modules/bullet/config.py3
-rw-r--r--modules/bullet/godot_motion_state.h2
-rw-r--r--modules/bullet/godot_ray_world_algorithm.h2
-rw-r--r--modules/bullet/godot_result_callbacks.h38
-rw-r--r--modules/bullet/rid_bullet.h2
-rw-r--r--modules/bullet/rigid_body_bullet.cpp14
-rw-r--r--modules/bullet/rigid_body_bullet.h32
-rw-r--r--modules/bullet/shape_bullet.cpp10
-rw-r--r--modules/bullet/shape_bullet.h10
-rw-r--r--modules/bullet/soft_body_bullet.cpp8
-rw-r--r--modules/bullet/soft_body_bullet.h8
-rw-r--r--modules/bullet/space_bullet.cpp24
-rw-r--r--modules/bullet/space_bullet.h16
-rw-r--r--modules/camera_iphone/SCsub15
-rw-r--r--modules/camera_iphone/camera.gdip18
-rw-r--r--modules/camera_iphone/camera_ios.h45
-rw-r--r--modules/camera_iphone/camera_ios.mm445
-rw-r--r--modules/camera_iphone/camera_module.cpp40
-rw-r--r--modules/camera_iphone/camera_module.h32
-rw-r--r--modules/camera_iphone/config.py6
-rw-r--r--modules/csg/csg.h32
-rw-r--r--modules/csg/csg_shape.cpp51
-rw-r--r--modules/csg/csg_shape.h28
-rw-r--r--modules/cvtt/image_compress_cvtt.cpp28
-rw-r--r--modules/dds/texture_loader_dds.cpp12
-rw-r--r--modules/dds/texture_loader_dds.h2
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp16
-rw-r--r--modules/enet/networked_multiplayer_enet.h38
-rw-r--r--modules/etc/texture_loader_pkm.cpp12
-rw-r--r--modules/etc/texture_loader_pkm.h2
-rw-r--r--modules/fbx/data/fbx_material.h5
-rw-r--r--modules/fbx/data/pivot_transform.cpp15
-rw-r--r--modules/gamecenter/SCsub15
-rw-r--r--modules/gamecenter/config.py6
-rw-r--r--modules/gamecenter/game_center.h71
-rw-r--r--modules/gamecenter/game_center.mm380
-rw-r--r--modules/gamecenter/game_center_delegate.h35
-rw-r--r--modules/gamecenter/game_center_delegate.mm45
-rw-r--r--modules/gamecenter/game_center_module.h32
-rw-r--r--modules/gamecenter/gamecenter.gdip17
-rw-r--r--modules/gdnative/android/android_gdn.cpp2
-rw-r--r--modules/gdnative/gdnative.cpp12
-rw-r--r--modules/gdnative/gdnative.h4
-rw-r--r--modules/gdnative/gdnative/aabb.cpp188
-rw-r--r--modules/gdnative/gdnative/array.cpp355
-rw-r--r--modules/gdnative/gdnative/basis.cpp257
-rw-r--r--modules/gdnative/gdnative/callable.cpp207
-rw-r--r--modules/gdnative/gdnative/color.cpp169
-rw-r--r--modules/gdnative/gdnative/dictionary.cpp142
-rw-r--r--modules/gdnative/gdnative/gdnative.cpp9
-rw-r--r--modules/gdnative/gdnative/node_path.cpp82
-rw-r--r--modules/gdnative/gdnative/packed_arrays.cpp1107
-rw-r--r--modules/gdnative/gdnative/plane.cpp132
-rw-r--r--modules/gdnative/gdnative/quat.cpp196
-rw-r--r--modules/gdnative/gdnative/rect2.cpp295
-rw-r--r--modules/gdnative/gdnative/rid.cpp38
-rw-r--r--modules/gdnative/gdnative/signal.cpp (renamed from core/os/thread_dummy.cpp)28
-rw-r--r--modules/gdnative/gdnative/string.cpp1241
-rw-r--r--modules/gdnative/gdnative/string_name.cpp45
-rw-r--r--modules/gdnative/gdnative/transform.cpp191
-rw-r--r--modules/gdnative/gdnative/transform2d.cpp172
-rw-r--r--modules/gdnative/gdnative/variant.cpp723
-rw-r--r--modules/gdnative/gdnative/vector2.cpp420
-rw-r--r--modules/gdnative/gdnative/vector3.cpp424
-rw-r--r--modules/gdnative/gdnative_api.json13319
-rw-r--r--modules/gdnative/gdnative_library_editor_plugin.cpp2
-rw-r--r--modules/gdnative/gdnative_library_editor_plugin.h6
-rw-r--r--modules/gdnative/include/gdnative/aabb.h69
-rw-r--r--modules/gdnative/include/gdnative/array.h97
-rw-r--r--modules/gdnative/include/gdnative/basis.h87
-rw-r--r--modules/gdnative/include/gdnative/callable.h70
-rw-r--r--modules/gdnative/include/gdnative/color.h68
-rw-r--r--modules/gdnative/include/gdnative/dictionary.h52
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h27
-rw-r--r--modules/gdnative/include/gdnative/math_defs.h (renamed from modules/gamecenter/game_center_module.cpp)44
-rw-r--r--modules/gdnative/include/gdnative/node_path.h33
-rw-r--r--modules/gdnative/include/gdnative/packed_arrays.h400
-rw-r--r--modules/gdnative/include/gdnative/plane.h50
-rw-r--r--modules/gdnative/include/gdnative/quat.h69
-rw-r--r--modules/gdnative/include/gdnative/rect2.h107
-rw-r--r--modules/gdnative/include/gdnative/rid.h19
-rw-r--r--modules/gdnative/include/gdnative/signal.h (renamed from modules/icloud/icloud_module.cpp)36
-rw-r--r--modules/gdnative/include/gdnative/string.h231
-rw-r--r--modules/gdnative/include/gdnative/string_name.h24
-rw-r--r--modules/gdnative/include/gdnative/transform.h60
-rw-r--r--modules/gdnative/include/gdnative/transform2d.h60
-rw-r--r--modules/gdnative/include/gdnative/variant.h230
-rw-r--r--modules/gdnative/include/gdnative/variant_struct.h (renamed from core/os/rw_lock.cpp)26
-rw-r--r--modules/gdnative/include/gdnative/vector2.h144
-rw-r--r--modules/gdnative/include/gdnative/vector3.h149
-rw-r--r--modules/gdnative/include/text/godot_text.h8
-rw-r--r--modules/gdnative/include/videodecoder/godot_videodecoder.h8
-rw-r--r--modules/gdnative/include/xr/godot_xr.h8
-rw-r--r--modules/gdnative/nativescript/api_generator.cpp452
-rw-r--r--modules/gdnative/nativescript/api_generator.h1
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp30
-rw-r--r--modules/gdnative/nativescript/nativescript.h37
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.h6
-rw-r--r--modules/gdnative/pluginscript/pluginscript_loader.cpp2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_loader.h2
-rw-r--r--modules/gdnative/tests/test_string.h1979
-rw-r--r--modules/gdnative/tests/test_variant.h205
-rw-r--r--modules/gdnative/text/text_server_gdnative.cpp24
-rw-r--r--modules/gdnative/text/text_server_gdnative.h6
-rw-r--r--modules/gdnative/videodecoder/video_stream_gdnative.cpp4
-rw-r--r--modules/gdnative/videodecoder/video_stream_gdnative.h4
-rw-r--r--modules/gdnative/xr/xr_interface_gdnative.cpp10
-rw-r--r--modules/gdnavigation/nav_utils.h14
-rw-r--r--modules/gdnavigation/rvo_agent.h2
-rw-r--r--modules/gdscript/editor/gdscript_highlighter.cpp14
-rw-r--r--modules/gdscript/editor/gdscript_translation_parser_plugin.cpp2
-rw-r--r--modules/gdscript/editor/gdscript_translation_parser_plugin.h4
-rw-r--r--modules/gdscript/gdscript.cpp15
-rw-r--r--modules/gdscript/gdscript.h18
-rw-r--r--modules/gdscript/gdscript_compiler.h4
-rw-r--r--modules/gdscript/gdscript_function.cpp7
-rw-r--r--modules/gdscript/gdscript_function.h16
-rw-r--r--modules/gdscript/gdscript_parser.h6
-rw-r--r--modules/gdscript/gdscript_tokenizer.h1
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.cpp2
-rw-r--r--modules/gdscript/language_server/gdscript_language_server.cpp15
-rw-r--r--modules/gdscript/language_server/gdscript_language_server.h10
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp2
-rw-r--r--modules/gdscript/language_server/lsp.hpp14
-rw-r--r--modules/gltf/gltf_camera.h4
-rw-r--r--modules/gltf/gltf_document.cpp56
-rw-r--r--modules/gltf/gltf_document.h5
-rw-r--r--modules/gltf/gltf_skin.cpp2
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml1
-rw-r--r--modules/gridmap/grid_map.cpp27
-rw-r--r--modules/gridmap/grid_map.h54
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp15
-rw-r--r--modules/gridmap/grid_map_editor_plugin.h34
-rw-r--r--modules/icloud/SCsub15
-rw-r--r--modules/icloud/config.py6
-rw-r--r--modules/icloud/icloud.gdip17
-rw-r--r--modules/icloud/icloud.h60
-rw-r--r--modules/icloud/icloud.mm345
-rw-r--r--modules/icloud/icloud_module.h32
-rw-r--r--modules/inappstore/SCsub15
-rw-r--r--modules/inappstore/config.py6
-rw-r--r--modules/inappstore/in_app_store.h77
-rw-r--r--modules/inappstore/in_app_store.mm411
-rw-r--r--modules/inappstore/in_app_store_module.cpp48
-rw-r--r--modules/inappstore/in_app_store_module.h32
-rw-r--r--modules/inappstore/inappstore.gdip17
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.cpp30
-rw-r--r--modules/lightmapper_rd/lightmapper_rd.h102
-rw-r--r--modules/lightmapper_rd/lm_common_inc.glsl4
-rw-r--r--modules/lightmapper_rd/lm_compute.glsl11
-rw-r--r--modules/lightmapper_rd/register_types.cpp22
-rw-r--r--modules/mbedtls/packet_peer_mbed_dtls.cpp1
-rw-r--r--modules/mbedtls/packet_peer_mbed_dtls.h2
-rw-r--r--modules/mbedtls/ssl_context_mbedtls.cpp2
-rw-r--r--modules/mbedtls/ssl_context_mbedtls.h4
-rw-r--r--modules/mbedtls/stream_peer_mbedtls.cpp1
-rw-r--r--modules/mbedtls/stream_peer_mbedtls.h2
-rw-r--r--modules/minimp3/audio_stream_mp3.cpp3
-rw-r--r--modules/minimp3/audio_stream_mp3.h6
-rw-r--r--modules/mobile_vr/mobile_vr_interface.cpp14
-rw-r--r--modules/mobile_vr/mobile_vr_interface.h26
-rw-r--r--modules/mono/csharp_script.cpp2
-rw-r--r--modules/mono/csharp_script.h2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs6
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs2
-rw-r--r--modules/mono/editor/bindings_generator.cpp26
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs101
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs114
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs21
-rw-r--r--modules/mono/mono_gd/gd_mono_log.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono_log.h4
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp15
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h2
-rw-r--r--modules/mono/mono_gd/support/android_support.cpp18
-rw-r--r--modules/opensimplex/noise_texture.cpp27
-rw-r--r--modules/opensimplex/noise_texture.h18
-rw-r--r--modules/opensimplex/open_simplex_noise.cpp12
-rw-r--r--modules/opensimplex/open_simplex_noise.h10
-rw-r--r--modules/pvr/texture_loader_pvr.cpp4
-rw-r--r--modules/pvr/texture_loader_pvr.h2
-rw-r--r--modules/regex/regex.cpp2
-rw-r--r--modules/regex/regex.h6
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp13
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.h24
-rw-r--r--modules/text_server_adv/bitmap_font_adv.cpp6
-rw-r--r--modules/text_server_adv/dynamic_font_adv.cpp8
-rw-r--r--modules/text_server_adv/dynamic_font_adv.h13
-rw-r--r--modules/text_server_adv/font_adv.h14
-rw-r--r--modules/text_server_adv/script_iterator.h6
-rw-r--r--modules/text_server_adv/text_server_adv.cpp53
-rw-r--r--modules/text_server_adv/text_server_adv.h6
-rw-r--r--modules/text_server_fb/bitmap_font_fb.cpp4
-rw-r--r--modules/text_server_fb/dynamic_font_fb.cpp9
-rw-r--r--modules/text_server_fb/dynamic_font_fb.h13
-rw-r--r--modules/text_server_fb/font_fb.h14
-rw-r--r--modules/text_server_fb/text_server_fb.cpp33
-rw-r--r--modules/text_server_fb/text_server_fb.h6
-rw-r--r--modules/tga/image_loader_tga.cpp25
-rw-r--r--modules/tga/image_loader_tga.h24
-rw-r--r--modules/theora/video_stream_theora.cpp28
-rw-r--r--modules/theora/video_stream_theora.h53
-rw-r--r--modules/upnp/upnp.cpp3
-rw-r--r--modules/upnp/upnp.h6
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml14
-rw-r--r--modules/visual_script/visual_script.cpp9
-rw-r--r--modules/visual_script/visual_script.h91
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp25
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.h1
-rw-r--r--modules/visual_script/visual_script_editor.cpp38
-rw-r--r--modules/visual_script/visual_script_expression.cpp21
-rw-r--r--modules/visual_script/visual_script_expression.h47
-rw-r--r--modules/visual_script/visual_script_flow_control.cpp12
-rw-r--r--modules/visual_script/visual_script_flow_control.h2
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp48
-rw-r--r--modules/visual_script/visual_script_nodes.cpp61
-rw-r--r--modules/visual_script/visual_script_nodes.h4
-rw-r--r--modules/visual_script/visual_script_yield_nodes.cpp10
-rw-r--r--modules/webm/video_stream_webm.cpp4
-rw-r--r--modules/webm/video_stream_webm.h2
-rw-r--r--modules/webrtc/webrtc_data_channel_js.cpp7
-rw-r--r--modules/webrtc/webrtc_data_channel_js.h8
-rw-r--r--modules/websocket/emws_client.cpp4
-rw-r--r--modules/websocket/emws_client.h8
-rw-r--r--modules/websocket/emws_peer.cpp2
-rw-r--r--modules/websocket/emws_peer.h6
-rw-r--r--modules/websocket/websocket_client.cpp1
-rw-r--r--modules/websocket/websocket_client.h2
-rw-r--r--modules/websocket/websocket_multiplayer_peer.cpp9
-rw-r--r--modules/websocket/websocket_multiplayer_peer.h16
-rw-r--r--modules/websocket/wsl_client.cpp5
-rw-r--r--modules/websocket/wsl_client.h14
-rw-r--r--modules/websocket/wsl_peer.cpp4
-rw-r--r--modules/websocket/wsl_peer.h38
-rw-r--r--modules/websocket/wsl_server.cpp13
-rw-r--r--modules/websocket/wsl_server.h22
-rw-r--r--modules/webxr/doc_classes/WebXRInterface.xml122
-rw-r--r--modules/webxr/godot_webxr.h1
-rw-r--r--modules/webxr/native/library_godot_webxr.js23
-rw-r--r--modules/webxr/webxr_interface_js.cpp31
-rw-r--r--modules/webxr/webxr_interface_js.h2
-rw-r--r--modules/xatlas_unwrap/register_types.cpp5
-rw-r--r--platform/android/api/jni_singleton.h2
-rw-r--r--platform/android/audio_driver_jandroid.cpp12
-rw-r--r--platform/android/detect.py58
-rw-r--r--platform/android/dir_access_jandroid.cpp14
-rw-r--r--platform/android/export/export.cpp154
-rw-r--r--platform/android/export/gradle_export_util.h13
-rw-r--r--platform/android/java/app/build.gradle2
-rw-r--r--platform/android/java/app/config.gradle5
-rw-r--r--platform/android/java/app/res/drawable/splash_drawable.xml2
-rw-r--r--platform/android/java/lib/build.gradle4
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java247
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java13
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java99
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java (renamed from modules/arkit/arkit_session_delegate.h)47
-rw-r--r--platform/android/java/nativeSrcsConfigs/build.gradle2
-rw-r--r--platform/android/java_class_wrapper.cpp6
-rw-r--r--platform/android/java_godot_io_wrapper.cpp34
-rw-r--r--platform/android/java_godot_lib_jni.cpp8
-rw-r--r--platform/android/java_godot_view_wrapper.cpp8
-rw-r--r--platform/android/java_godot_wrapper.cpp42
-rw-r--r--platform/android/net_socket_android.cpp6
-rw-r--r--platform/android/plugin/godot_plugin_jni.cpp10
-rw-r--r--platform/android/plugin/godot_plugin_jni.h10
-rw-r--r--platform/android/string_android.h4
-rw-r--r--platform/android/thread_jandroid.cpp115
-rw-r--r--platform/android/thread_jandroid.h42
-rw-r--r--platform/iphone/detect.py57
-rw-r--r--platform/iphone/display_layer.mm2
-rw-r--r--platform/iphone/export/export.cpp73
-rw-r--r--platform/iphone/godot_app_delegate.m32
-rw-r--r--platform/iphone/godot_view.h8
-rw-r--r--platform/iphone/godot_view.mm9
-rw-r--r--platform/iphone/os_iphone.mm4
-rw-r--r--platform/iphone/plugin/godot_plugin_config.h5
-rw-r--r--platform/iphone/view_controller.mm36
-rw-r--r--platform/javascript/SCsub11
-rw-r--r--platform/javascript/audio_driver_javascript.cpp10
-rw-r--r--platform/javascript/audio_driver_javascript.h2
-rw-r--r--platform/javascript/detect.py33
-rw-r--r--platform/javascript/display_server_javascript.cpp16
-rw-r--r--platform/javascript/display_server_javascript.h1
-rw-r--r--platform/javascript/emscripten_helpers.py9
-rw-r--r--platform/javascript/export/export.cpp10
-rw-r--r--platform/javascript/godot_js.h3
-rw-r--r--platform/javascript/http_client_javascript.cpp13
-rw-r--r--platform/javascript/http_request.h4
-rw-r--r--platform/javascript/javascript_main.cpp7
-rw-r--r--platform/javascript/js/dynlink.pre.js1
-rw-r--r--platform/javascript/js/engine/engine.js13
-rw-r--r--platform/javascript/js/libs/library_godot_display.js38
-rw-r--r--platform/javascript/js/libs/library_godot_http_request.js30
-rw-r--r--platform/javascript/js/libs/library_godot_os.js5
-rw-r--r--platform/javascript/os_javascript.cpp4
-rw-r--r--platform/javascript/os_javascript.h1
-rw-r--r--platform/linuxbsd/SCsub5
-rw-r--r--platform/linuxbsd/detect.py24
-rw-r--r--platform/linuxbsd/display_server_x11.cpp12
-rw-r--r--platform/linuxbsd/display_server_x11.h4
-rw-r--r--platform/linuxbsd/joypad_linux.cpp62
-rw-r--r--platform/linuxbsd/joypad_linux.h9
-rw-r--r--platform/linuxbsd/libudev-so_wrap.c829
-rw-r--r--platform/linuxbsd/libudev-so_wrap.h376
-rw-r--r--platform/linuxbsd/os_linuxbsd.cpp2
-rw-r--r--platform/osx/SCsub2
-rw-r--r--platform/osx/detect.py6
-rw-r--r--platform/osx/display_server_osx.h1
-rw-r--r--platform/osx/display_server_osx.mm11
-rw-r--r--platform/server/detect.py8
-rw-r--r--platform/uwp/os_uwp.cpp6
-rw-r--r--platform/uwp/thread_uwp.cpp61
-rw-r--r--platform/uwp/thread_uwp.h59
-rw-r--r--platform/windows/SCsub2
-rw-r--r--platform/windows/detect.py13
-rw-r--r--platform/windows/display_server_windows.cpp84
-rw-r--r--platform/windows/display_server_windows.h9
-rw-r--r--platform/windows/os_windows.cpp71
-rw-r--r--platform/windows/os_windows.h8
-rw-r--r--scene/2d/animated_sprite_2d.cpp23
-rw-r--r--scene/2d/animated_sprite_2d.h29
-rw-r--r--scene/2d/area_2d.cpp12
-rw-r--r--scene/2d/area_2d.h40
-rw-r--r--scene/2d/audio_stream_player_2d.cpp77
-rw-r--r--scene/2d/audio_stream_player_2d.h35
-rw-r--r--scene/2d/back_buffer_copy.cpp2
-rw-r--r--scene/2d/back_buffer_copy.h4
-rw-r--r--scene/2d/camera_2d.cpp24
-rw-r--r--scene/2d/camera_2d.h40
-rw-r--r--scene/2d/canvas_modulate.cpp1
-rw-r--r--scene/2d/canvas_modulate.h2
-rw-r--r--scene/2d/collision_object_2d.cpp4
-rw-r--r--scene/2d/collision_object_2d.h30
-rw-r--r--scene/2d/collision_polygon_2d.cpp13
-rw-r--r--scene/2d/collision_polygon_2d.h18
-rw-r--r--scene/2d/collision_shape_2d.cpp12
-rw-r--r--scene/2d/collision_shape_2d.h16
-rw-r--r--scene/2d/cpu_particles_2d.cpp73
-rw-r--r--scene/2d/cpu_particles_2d.h70
-rw-r--r--scene/2d/gpu_particles_2d.cpp3
-rw-r--r--scene/2d/joints_2d.cpp70
-rw-r--r--scene/2d/joints_2d.h30
-rw-r--r--scene/2d/light_2d.cpp17
-rw-r--r--scene/2d/light_2d.h32
-rw-r--r--scene/2d/light_occluder_2d.cpp3
-rw-r--r--scene/2d/light_occluder_2d.h6
-rw-r--r--scene/2d/line_2d.cpp9
-rw-r--r--scene/2d/line_2d.h18
-rw-r--r--scene/2d/line_builder.cpp16
-rw-r--r--scene/2d/line_builder.h26
-rw-r--r--scene/2d/mesh_instance_2d.cpp1
-rw-r--r--scene/2d/multimesh_instance_2d.cpp1
-rw-r--r--scene/2d/navigation_region_2d.cpp1
-rw-r--r--scene/2d/node_2d.cpp17
-rw-r--r--scene/2d/node_2d.h4
-rw-r--r--scene/2d/parallax_background.cpp4
-rw-r--r--scene/2d/parallax_background.h6
-rw-r--r--scene/2d/parallax_layer.cpp1
-rw-r--r--scene/2d/parallax_layer.h2
-rw-r--r--scene/2d/path_2d.cpp4
-rw-r--r--scene/2d/path_2d.h8
-rw-r--r--scene/2d/physics_body_2d.cpp50
-rw-r--r--scene/2d/physics_body_2d.h66
-rw-r--r--scene/2d/polygon_2d.cpp14
-rw-r--r--scene/2d/polygon_2d.h18
-rw-r--r--scene/2d/ray_cast_2d.cpp10
-rw-r--r--scene/2d/ray_cast_2d.h16
-rw-r--r--scene/2d/remote_transform_2d.cpp5
-rw-r--r--scene/2d/remote_transform_2d.h8
-rw-r--r--scene/2d/skeleton_2d.cpp9
-rw-r--r--scene/2d/skeleton_2d.h16
-rw-r--r--scene/2d/sprite_2d.cpp20
-rw-r--r--scene/2d/sprite_2d.h18
-rw-r--r--scene/2d/tile_map.cpp40
-rw-r--r--scene/2d/tile_map.h62
-rw-r--r--scene/2d/touch_screen_button.cpp5
-rw-r--r--scene/2d/touch_screen_button.h10
-rw-r--r--scene/2d/visibility_notifier_2d.cpp4
-rw-r--r--scene/2d/visibility_notifier_2d.h2
-rw-r--r--scene/2d/y_sort.cpp1
-rw-r--r--scene/2d/y_sort.h2
-rw-r--r--scene/3d/area_3d.cpp19
-rw-r--r--scene/3d/area_3d.h50
-rw-r--r--scene/3d/audio_stream_player_3d.cpp99
-rw-r--r--scene/3d/audio_stream_player_3d.h68
-rw-r--r--scene/3d/baked_lightmap.cpp15
-rw-r--r--scene/3d/baked_lightmap.h51
-rw-r--r--scene/3d/bone_attachment_3d.cpp1
-rw-r--r--scene/3d/bone_attachment_3d.h2
-rw-r--r--scene/3d/camera_3d.cpp26
-rw-r--r--scene/3d/camera_3d.h37
-rw-r--r--scene/3d/collision_object_3d.cpp5
-rw-r--r--scene/3d/collision_object_3d.h19
-rw-r--r--scene/3d/collision_polygon_3d.cpp25
-rw-r--r--scene/3d/collision_polygon_3d.h18
-rw-r--r--scene/3d/collision_shape_3d.cpp5
-rw-r--r--scene/3d/collision_shape_3d.h8
-rw-r--r--scene/3d/cpu_particles_3d.cpp91
-rw-r--r--scene/3d/cpu_particles_3d.h82
-rw-r--r--scene/3d/decal.cpp13
-rw-r--r--scene/3d/decal.h22
-rw-r--r--scene/3d/gi_probe.cpp24
-rw-r--r--scene/3d/gi_probe.h24
-rw-r--r--scene/3d/gpu_particles_3d.cpp5
-rw-r--r--scene/3d/gpu_particles_collision_3d.h16
-rw-r--r--scene/3d/immediate_geometry_3d.cpp12
-rw-r--r--scene/3d/immediate_geometry_3d.h2
-rw-r--r--scene/3d/light_3d.cpp13
-rw-r--r--scene/3d/light_3d.h16
-rw-r--r--scene/3d/listener_3d.cpp2
-rw-r--r--scene/3d/listener_3d.h4
-rw-r--r--scene/3d/mesh_instance_3d.cpp9
-rw-r--r--scene/3d/mesh_instance_3d.h10
-rw-r--r--scene/3d/navigation_3d.cpp2
-rw-r--r--scene/3d/navigation_3d.h2
-rw-r--r--scene/3d/navigation_region_3d.cpp17
-rw-r--r--scene/3d/navigation_region_3d.h5
-rw-r--r--scene/3d/node_3d.cpp16
-rw-r--r--scene/3d/node_3d.h4
-rw-r--r--scene/3d/path_3d.cpp2
-rw-r--r--scene/3d/path_3d.h8
-rw-r--r--scene/3d/physics_body_3d.cpp88
-rw-r--r--scene/3d/physics_body_3d.h138
-rw-r--r--scene/3d/physics_joint_3d.cpp185
-rw-r--r--scene/3d/physics_joint_3d.h110
-rw-r--r--scene/3d/ray_cast_3d.cpp9
-rw-r--r--scene/3d/ray_cast_3d.h18
-rw-r--r--scene/3d/reflection_probe.cpp20
-rw-r--r--scene/3d/reflection_probe.h28
-rw-r--r--scene/3d/remote_transform_3d.cpp5
-rw-r--r--scene/3d/remote_transform_3d.h8
-rw-r--r--scene/3d/skeleton_3d.cpp6
-rw-r--r--scene/3d/skeleton_3d.h39
-rw-r--r--scene/3d/skeleton_ik_3d.h8
-rw-r--r--scene/3d/soft_body_3d.cpp24
-rw-r--r--scene/3d/soft_body_3d.h22
-rw-r--r--scene/3d/spring_arm_3d.cpp12
-rw-r--r--scene/3d/spring_arm_3d.h16
-rw-r--r--scene/3d/sprite_3d.cpp36
-rw-r--r--scene/3d/sprite_3d.h40
-rw-r--r--scene/3d/vehicle_body_3d.cpp106
-rw-r--r--scene/3d/vehicle_body_3d.h134
-rw-r--r--scene/3d/velocity_tracker_3d.cpp2
-rw-r--r--scene/3d/velocity_tracker_3d.h6
-rw-r--r--scene/3d/visibility_notifier_3d.cpp13
-rw-r--r--scene/3d/visibility_notifier_3d.h6
-rw-r--r--scene/3d/visual_instance_3d.cpp16
-rw-r--r--scene/3d/visual_instance_3d.h20
-rw-r--r--scene/3d/voxelizer.cpp3
-rw-r--r--scene/3d/voxelizer.h48
-rw-r--r--scene/animation/animation_blend_space_1d.cpp8
-rw-r--r--scene/animation/animation_blend_space_1d.h14
-rw-r--r--scene/animation/animation_blend_space_2d.cpp16
-rw-r--r--scene/animation/animation_blend_space_2d.h26
-rw-r--r--scene/animation/animation_blend_tree.cpp46
-rw-r--r--scene/animation/animation_blend_tree.h67
-rw-r--r--scene/animation/animation_cache.cpp3
-rw-r--r--scene/animation/animation_cache.h26
-rw-r--r--scene/animation/animation_node_state_machine.cpp30
-rw-r--r--scene/animation/animation_node_state_machine.h34
-rw-r--r--scene/animation/animation_player.cpp37
-rw-r--r--scene/animation/animation_player.h67
-rw-r--r--scene/animation/animation_tree.cpp20
-rw-r--r--scene/animation/animation_tree.h84
-rw-r--r--scene/animation/root_motion_view.cpp4
-rw-r--r--scene/animation/root_motion_view.h12
-rw-r--r--scene/animation/tween.cpp10
-rw-r--r--scene/animation/tween.h40
-rw-r--r--scene/audio/audio_stream_player.cpp61
-rw-r--r--scene/audio/audio_stream_player.h25
-rw-r--r--scene/debugger/scene_debugger.h2
-rw-r--r--scene/gui/base_button.cpp13
-rw-r--r--scene/gui/base_button.h20
-rw-r--r--scene/gui/box_container.cpp11
-rw-r--r--scene/gui/box_container.h4
-rw-r--r--scene/gui/button.cpp55
-rw-r--r--scene/gui/button.h10
-rw-r--r--scene/gui/center_container.cpp4
-rw-r--r--scene/gui/center_container.h2
-rw-r--r--scene/gui/color_picker.cpp27
-rw-r--r--scene/gui/color_picker.h36
-rw-r--r--scene/gui/container.cpp1
-rw-r--r--scene/gui/container.h2
-rw-r--r--scene/gui/control.cpp33
-rw-r--r--scene/gui/control.h5
-rw-r--r--scene/gui/dialogs.cpp3
-rw-r--r--scene/gui/dialogs.h4
-rw-r--r--scene/gui/file_dialog.cpp26
-rw-r--r--scene/gui/file_dialog.h8
-rw-r--r--scene/gui/gradient_edit.cpp2
-rw-r--r--scene/gui/gradient_edit.h4
-rw-r--r--scene/gui/graph_edit.cpp54
-rw-r--r--scene/gui/graph_edit.h45
-rw-r--r--scene/gui/graph_node.cpp29
-rw-r--r--scene/gui/graph_node.h37
-rw-r--r--scene/gui/grid_container.cpp4
-rw-r--r--scene/gui/grid_container.h2
-rw-r--r--scene/gui/item_list.cpp41
-rw-r--r--scene/gui/item_list.h46
-rw-r--r--scene/gui/label.cpp42
-rw-r--r--scene/gui/label.h2
-rw-r--r--scene/gui/line_edit.cpp850
-rw-r--r--scene/gui/line_edit.h34
-rw-r--r--scene/gui/link_button.cpp19
-rw-r--r--scene/gui/link_button.h2
-rw-r--r--scene/gui/menu_button.cpp1
-rw-r--r--scene/gui/menu_button.h6
-rw-r--r--scene/gui/nine_patch_rect.cpp25
-rw-r--r--scene/gui/nine_patch_rect.h7
-rw-r--r--scene/gui/option_button.cpp7
-rw-r--r--scene/gui/option_button.h2
-rw-r--r--scene/gui/popup_menu.cpp107
-rw-r--r--scene/gui/popup_menu.h59
-rw-r--r--scene/gui/progress_bar.cpp9
-rw-r--r--scene/gui/progress_bar.h2
-rw-r--r--scene/gui/range.cpp17
-rw-r--r--scene/gui/range.h15
-rw-r--r--scene/gui/rich_text_label.cpp184
-rw-r--r--scene/gui/rich_text_label.h108
-rw-r--r--scene/gui/scroll_bar.cpp2
-rw-r--r--scene/gui/scroll_bar.h14
-rw-r--r--scene/gui/scroll_container.cpp12
-rw-r--r--scene/gui/scroll_container.h24
-rw-r--r--scene/gui/separator.h2
-rw-r--r--scene/gui/slider.cpp7
-rw-r--r--scene/gui/slider.h18
-rw-r--r--scene/gui/spin_box.cpp2
-rw-r--r--scene/gui/spin_box.h10
-rw-r--r--scene/gui/split_container.cpp9
-rw-r--r--scene/gui/split_container.h20
-rw-r--r--scene/gui/subviewport_container.cpp2
-rw-r--r--scene/gui/subviewport_container.h4
-rw-r--r--scene/gui/tab_container.cpp66
-rw-r--r--scene/gui/tab_container.h28
-rw-r--r--scene/gui/tabs.cpp88
-rw-r--r--scene/gui/tabs.h50
-rw-r--r--scene/gui/text_edit.cpp2390
-rw-r--r--scene/gui/text_edit.h280
-rw-r--r--scene/gui/texture_button.cpp17
-rw-r--r--scene/gui/texture_button.h10
-rw-r--r--scene/gui/texture_progress_bar.cpp18
-rw-r--r--scene/gui/texture_progress_bar.h14
-rw-r--r--scene/gui/texture_rect.cpp4
-rw-r--r--scene/gui/texture_rect.h8
-rw-r--r--scene/gui/tree.cpp107
-rw-r--r--scene/gui/tree.h198
-rw-r--r--scene/gui/video_player.cpp20
-rw-r--r--scene/gui/video_player.h27
-rw-r--r--scene/main/canvas_item.cpp10
-rw-r--r--scene/main/canvas_item.h2
-rw-r--r--scene/main/canvas_layer.cpp10
-rw-r--r--scene/main/canvas_layer.h18
-rw-r--r--scene/main/http_request.cpp60
-rw-r--r--scene/main/http_request.h39
-rw-r--r--scene/main/node.cpp116
-rw-r--r--scene/main/node.h7
-rw-r--r--scene/main/scene_tree.cpp62
-rw-r--r--scene/main/scene_tree.h7
-rw-r--r--scene/main/shader_globals_override.cpp4
-rw-r--r--scene/main/shader_globals_override.h2
-rw-r--r--scene/main/timer.cpp10
-rw-r--r--scene/main/timer.h14
-rw-r--r--scene/main/viewport.cpp618
-rw-r--r--scene/main/viewport.h141
-rw-r--r--scene/main/window.cpp9
-rw-r--r--scene/main/window.h6
-rw-r--r--scene/register_scene_types.cpp32
-rw-r--r--scene/resources/animation.cpp18
-rw-r--r--scene/resources/animation.h46
-rw-r--r--scene/resources/audio_stream_sample.cpp17
-rw-r--r--scene/resources/audio_stream_sample.h36
-rw-r--r--scene/resources/bit_map.cpp11
-rw-r--r--scene/resources/bit_map.h4
-rw-r--r--scene/resources/box_shape_3d.cpp1
-rw-r--r--scene/resources/camera_effects.cpp4
-rw-r--r--scene/resources/camera_effects.h8
-rw-r--r--scene/resources/capsule_shape_2d.cpp7
-rw-r--r--scene/resources/capsule_shape_2d.h4
-rw-r--r--scene/resources/capsule_shape_3d.cpp4
-rw-r--r--scene/resources/capsule_shape_3d.h4
-rw-r--r--scene/resources/circle_shape_2d.cpp4
-rw-r--r--scene/resources/circle_shape_2d.h2
-rw-r--r--scene/resources/concave_polygon_shape_2d.cpp2
-rw-r--r--scene/resources/concave_polygon_shape_3d.cpp2
-rw-r--r--scene/resources/convex_polygon_shape_2d.cpp2
-rw-r--r--scene/resources/convex_polygon_shape_3d.cpp2
-rw-r--r--scene/resources/curve.cpp16
-rw-r--r--scene/resources/curve.h48
-rw-r--r--scene/resources/cylinder_shape_3d.cpp4
-rw-r--r--scene/resources/cylinder_shape_3d.h4
-rw-r--r--scene/resources/default_theme/default_theme.cpp203
-rw-r--r--scene/resources/environment.cpp74
-rw-r--r--scene/resources/environment.h19
-rw-r--r--scene/resources/font.cpp65
-rw-r--r--scene/resources/font.h21
-rw-r--r--scene/resources/gradient.cpp1
-rw-r--r--scene/resources/gradient.h4
-rw-r--r--scene/resources/height_map_shape_3d.cpp9
-rw-r--r--scene/resources/height_map_shape_3d.h8
-rw-r--r--scene/resources/line_shape_2d.cpp2
-rw-r--r--scene/resources/line_shape_2d.h4
-rw-r--r--scene/resources/material.cpp57
-rw-r--r--scene/resources/material.h42
-rw-r--r--scene/resources/mesh.cpp36
-rw-r--r--scene/resources/mesh.h18
-rw-r--r--scene/resources/mesh_data_tool.h8
-rw-r--r--scene/resources/mesh_library.cpp25
-rw-r--r--scene/resources/mesh_library.h1
-rw-r--r--scene/resources/multimesh.cpp7
-rw-r--r--scene/resources/multimesh.h10
-rw-r--r--scene/resources/navigation_mesh.cpp35
-rw-r--r--scene/resources/navigation_mesh.h48
-rw-r--r--scene/resources/packed_scene.cpp5
-rw-r--r--scene/resources/packed_scene.h34
-rw-r--r--scene/resources/particles_material.cpp38
-rw-r--r--scene/resources/particles_material.h6
-rw-r--r--scene/resources/physics_material.h4
-rw-r--r--scene/resources/polygon_path_finder.h8
-rw-r--r--scene/resources/primitive_meshes.cpp92
-rw-r--r--scene/resources/primitive_meshes.h66
-rw-r--r--scene/resources/ray_shape_2d.cpp4
-rw-r--r--scene/resources/ray_shape_2d.h4
-rw-r--r--scene/resources/ray_shape_3d.cpp7
-rw-r--r--scene/resources/ray_shape_3d.h4
-rw-r--r--scene/resources/resource_format_text.cpp140
-rw-r--r--scene/resources/resource_format_text.h36
-rw-r--r--scene/resources/shader.cpp4
-rw-r--r--scene/resources/shader.h6
-rw-r--r--scene/resources/shape_2d.cpp1
-rw-r--r--scene/resources/shape_2d.h2
-rw-r--r--scene/resources/skin.cpp8
-rw-r--r--scene/resources/skin.h5
-rw-r--r--scene/resources/sky.cpp2
-rw-r--r--scene/resources/sky.h4
-rw-r--r--scene/resources/sky_material.cpp101
-rw-r--r--scene/resources/sphere_shape_3d.cpp1
-rw-r--r--scene/resources/style_box.cpp82
-rw-r--r--scene/resources/style_box.h44
-rw-r--r--scene/resources/surface_tool.cpp7
-rw-r--r--scene/resources/surface_tool.h14
-rw-r--r--scene/resources/syntax_highlighter.cpp17
-rw-r--r--scene/resources/syntax_highlighter.h2
-rw-r--r--scene/resources/text_line.cpp1
-rw-r--r--scene/resources/text_line.h2
-rw-r--r--scene/resources/text_paragraph.cpp2
-rw-r--r--scene/resources/text_paragraph.h2
-rw-r--r--scene/resources/texture.cpp95
-rw-r--r--scene/resources/texture.h84
-rw-r--r--scene/resources/theme.cpp35
-rw-r--r--scene/resources/theme.h2
-rw-r--r--scene/resources/tile_set.cpp17
-rw-r--r--scene/resources/tile_set.h2
-rw-r--r--scene/resources/visual_shader.cpp22
-rw-r--r--scene/resources/visual_shader.h37
-rw-r--r--scene/resources/visual_shader_nodes.cpp761
-rw-r--r--scene/resources/visual_shader_nodes.h212
-rw-r--r--scene/resources/world_2d.cpp14
-rw-r--r--scene/resources/world_margin_shape_3d.cpp1
-rw-r--r--servers/audio/audio_driver_dummy.cpp21
-rw-r--r--servers/audio/audio_driver_dummy.h2
-rw-r--r--servers/audio/audio_filter_sw.cpp6
-rw-r--r--servers/audio/audio_rb_resampler.cpp14
-rw-r--r--servers/audio/audio_rb_resampler.h57
-rw-r--r--servers/audio/audio_stream.cpp2
-rw-r--r--servers/audio/effects/audio_effect_capture.cpp140
-rw-r--r--servers/audio/effects/audio_effect_capture.h (renamed from editor/editor_sub_scene.h)69
-rw-r--r--servers/audio/effects/audio_effect_chorus.cpp4
-rw-r--r--servers/audio/effects/audio_effect_delay.cpp2
-rw-r--r--servers/audio/effects/audio_effect_distortion.cpp4
-rw-r--r--servers/audio/effects/audio_effect_phaser.cpp6
-rw-r--r--servers/audio/effects/audio_effect_record.cpp6
-rw-r--r--servers/audio/effects/audio_effect_record.h2
-rw-r--r--servers/audio/effects/audio_effect_spectrum_analyzer.cpp3
-rw-r--r--servers/audio/effects/eq.cpp4
-rw-r--r--servers/audio/effects/reverb.cpp4
-rw-r--r--servers/audio_server.cpp21
-rw-r--r--servers/audio_server.h2
-rw-r--r--servers/display_server.cpp5
-rw-r--r--servers/display_server.h7
-rw-r--r--servers/physics_2d/collision_object_2d_sw.h6
-rw-r--r--servers/physics_2d/joints_2d_sw.cpp8
-rw-r--r--servers/physics_2d/joints_2d_sw.h13
-rw-r--r--servers/physics_2d/physics_server_2d_sw.cpp87
-rw-r--r--servers/physics_2d/physics_server_2d_sw.h27
-rw-r--r--servers/physics_2d/physics_server_2d_wrap_mt.cpp36
-rw-r--r--servers/physics_2d/physics_server_2d_wrap_mt.h70
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp16
-rw-r--r--servers/physics_2d/space_2d_sw.cpp92
-rw-r--r--servers/physics_3d/body_3d_sw.h2
-rw-r--r--servers/physics_3d/collision_object_3d_sw.cpp10
-rw-r--r--servers/physics_3d/collision_solver_3d_sat.cpp699
-rw-r--r--servers/physics_3d/collision_solver_3d_sw.cpp39
-rw-r--r--servers/physics_3d/gjk_epa.cpp99
-rw-r--r--servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp6
-rw-r--r--servers/physics_3d/joints/cone_twist_joint_3d_sw.h2
-rw-r--r--servers/physics_3d/joints/generic_6dof_joint_3d_sw.h2
-rw-r--r--servers/physics_3d/joints/hinge_joint_3d_sw.h2
-rw-r--r--servers/physics_3d/joints/pin_joint_3d_sw.h2
-rw-r--r--servers/physics_3d/joints/slider_joint_3d_sw.h2
-rw-r--r--servers/physics_3d/joints_3d_sw.h11
-rw-r--r--servers/physics_3d/physics_server_3d_sw.cpp322
-rw-r--r--servers/physics_3d/physics_server_3d_sw.h85
-rw-r--r--servers/physics_3d/physics_server_3d_wrap_mt.cpp140
-rw-r--r--servers/physics_3d/physics_server_3d_wrap_mt.h422
-rw-r--r--servers/physics_3d/shape_3d_sw.cpp224
-rw-r--r--servers/physics_3d/shape_3d_sw.h56
-rw-r--r--servers/physics_3d/space_3d_sw.cpp115
-rw-r--r--servers/physics_server_2d.cpp27
-rw-r--r--servers/physics_server_2d.h65
-rw-r--r--servers/physics_server_3d.cpp80
-rw-r--r--servers/physics_server_3d.h132
-rw-r--r--servers/register_server_types.cpp26
-rw-r--r--servers/rendering/renderer_canvas_cull.cpp53
-rw-r--r--servers/rendering/renderer_canvas_cull.h34
-rw-r--r--servers/rendering/renderer_rd/cluster_builder_rd.cpp21
-rw-r--r--servers/rendering/renderer_rd/effects_rd.cpp255
-rw-r--r--servers/rendering/renderer_rd/effects_rd.h27
-rw-r--r--servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp20
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_forward.cpp810
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_forward.h285
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.cpp1565
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.h196
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.cpp309
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.h161
-rw-r--r--servers/rendering/renderer_rd/shader_compiler_rd.cpp68
-rw-r--r--servers/rendering/renderer_rd/shader_compiler_rd.h1
-rw-r--r--servers/rendering/renderer_rd/shader_rd.cpp19
-rw-r--r--servers/rendering/renderer_rd/shader_rd.h4
-rw-r--r--servers/rendering/renderer_rd/shaders/SCsub1
-rw-r--r--servers/rendering/renderer_rd/shaders/cube_to_dp.glsl45
-rw-r--r--servers/rendering/renderer_rd/shaders/gi.glsl145
-rw-r--r--servers/rendering/renderer_rd/shaders/giprobe.glsl14
-rw-r--r--servers/rendering/renderer_rd/shaders/giprobe_write.glsl14
-rw-r--r--servers/rendering/renderer_rd/shaders/resolve.glsl112
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward.glsl117
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_inc.glsl276
-rw-r--r--servers/rendering/renderer_rd/shaders/sdfgi_debug.glsl107
-rw-r--r--servers/rendering/renderer_rd/shaders/sdfgi_direct_light.glsl77
-rw-r--r--servers/rendering/renderer_rd/shaders/sdfgi_integrate.glsl80
-rw-r--r--servers/rendering/renderer_rd/shaders/shadow_reduce.glsl105
-rw-r--r--servers/rendering/renderer_rd/shaders/skeleton.glsl2
-rw-r--r--servers/rendering/renderer_rd/shaders/volumetric_fog.glsl96
-rw-r--r--servers/rendering/renderer_scene.h33
-rw-r--r--servers/rendering/renderer_scene_cull.cpp246
-rw-r--r--servers/rendering/renderer_scene_cull.h52
-rw-r--r--servers/rendering/renderer_scene_render.h54
-rw-r--r--servers/rendering/renderer_storage.h83
-rw-r--r--servers/rendering/renderer_viewport.cpp25
-rw-r--r--servers/rendering/renderer_viewport.h11
-rw-r--r--servers/rendering/rendering_device.cpp49
-rw-r--r--servers/rendering/rendering_device.h51
-rw-r--r--servers/rendering/rendering_server_default.cpp160
-rw-r--r--servers/rendering/rendering_server_default.h1217
-rw-r--r--servers/rendering/rendering_server_wrap_mt.cpp178
-rw-r--r--servers/rendering/rendering_server_wrap_mt.h802
-rw-r--r--servers/rendering/shader_language.cpp115
-rw-r--r--servers/rendering/shader_language.h23
-rw-r--r--servers/rendering_server.cpp267
-rw-r--r--servers/rendering_server.h41
-rw-r--r--servers/server_wrap_mt_common.h860
-rw-r--r--servers/text_server.cpp6
-rw-r--r--servers/text_server.h6
-rw-r--r--tests/data/images/icon.bmpbin0 -> 262282 bytes
-rw-r--r--tests/data/images/icon.jpgbin0 -> 14866 bytes
-rw-r--r--tests/data/images/icon.pngbin0 -> 29261 bytes
-rw-r--r--tests/data/images/icon.tgabin0 -> 262162 bytes
-rw-r--r--tests/data/images/icon.webpbin0 -> 4522 bytes
-rw-r--r--tests/test_class_db.h43
-rw-r--r--tests/test_command_queue.h16
-rw-r--r--tests/test_image.h259
-rw-r--r--tests/test_main.cpp2
-rw-r--r--tests/test_marshalls.h329
-rw-r--r--tests/test_object.h213
-rw-r--r--tests/test_physics_3d.cpp28
-rw-r--r--tests/test_render.cpp4
-rw-r--r--tests/test_string.h21
-rw-r--r--tests/test_variant.h594
1191 files changed, 69958 insertions, 42481 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 7ac70a4367..09ff2454ee 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -2,56 +2,181 @@
# Each line is a file pattern followed by one or more owners.
# Owners can be @users, @org/teams or emails
-/doc/ @godotengine/documentation
-doc_classes/* @godotengine/documentation
-
-# Rendering
-/drivers/gl_context/ @reduz
-/drivers/gles2/ @reduz
-/drivers/gles3/ @reduz
-
-# Audio
-/drivers/alsa/ @marcelofg55
-/drivers/alsamidi/ @marcelofg55
-/drivers/coreaudio/ @marcelofg55
-/drivers/coremidi/ @marcelofg55
-/drivers/pulseaudio/ @marcelofg55
-/drivers/wasapi/ @marcelofg55
-/drivers/winmidi/ @marcelofg55
-/drivers/xaudio2/ @marcelofg55
-
-/drivers/unix/ @hpvb
-/drivers/windows/ @hpvb
-
-/editor/icons/ @djrm
-
-/misc/ @akien-mga
-
-/modules/bullet/ @AndreaCatania
-/modules/csg/ @BastiaanOlij
-/modules/enet/ @godotengine/network
-/modules/gdnative/*arvr/ @BastiaanOlij
-/modules/gdnative/text/ @bruvzg
-/modules/gdscript/ @vnen
-/modules/mbedtls/ @godotengine/network
-/modules/mobile_vr/ @BastiaanOlij
-/modules/mono/ @neikeq
-/modules/mono/glue/GodotSharp @aaronfranke
-/modules/opensimplex/ @JFonS
-/modules/regex/ @LeeZH
-/modules/text_server_*/ @bruvzg
-/modules/upnp/ @godotengine/network
-/modules/websocket/ @godotengine/network
-
-/platform/javascript/ @eska014
-/platform/uwp/ @vnen
-
-/scene/resources/font.* @bruvzg
-/scene/resources/text_line.* @bruvzg
-/scene/resources/text_paragraph.* @bruvzg
-
-/servers/physics*/ @reduz @AndreaCatania
-/servers/text_server.* @bruvzg
-/servers/visual*/ @reduz
-
-/thirdparty/ @akien-mga
+# Buildsystem
+
+.* @godotengine/buildsystem
+.github/ @godotengine/buildsystem
+*.py @godotengine/buildsystem
+SConstruct @godotengine/buildsystem
+SCsub @godotengine/buildsystem
+
+# Core
+
+/core/ @godotengine/core
+/core/crypto/ @godotengine/network
+/core/debugger/ @godotengine/debugger
+/core/input/ @godotengine/input
+
+# Doc
+
+/doc/ @godotengine/documentation
+doc_classes/* @godotengine/documentation
+
+# Drivers
+
+## Audio
+/drivers/alsa/ @godotengine/audio
+/drivers/alsamidi/ @godotengine/audio
+/drivers/coreaudio/ @godotengine/audio
+/drivers/coremidi/ @godotengine/audio
+/drivers/pulseaudio/ @godotengine/audio
+/drivers/wasapi/ @godotengine/audio
+/drivers/winmidi/ @godotengine/audio
+/drivers/xaudio2/ @godotengine/audio
+
+## Rendering
+/drivers/dummy/ @godotengine/rendering
+/drivers/spirv-reflect/ @godotengine/rendering
+/drivers/vulkan/ @godotengine/rendering
+
+## OS
+/drivers/unix/ @godotengine/_platforms
+/drivers/windows/ @godotengine/windows
+
+## Misc
+/drivers/png/ @godotengine/import
+
+# Editor
+
+/editor/*debugger* @godotengine/debugger
+/editor/icons/ @godotengine/usability
+/editor/import/ @godotengine/import
+/editor/plugins/*2d_*.* @godotengine/2d-editor
+/editor/plugins/*3d_*.* @godotengine/3d-editor
+/editor/plugins/script_*.* @godotengine/script-editor
+/editor/plugins/*shader*.* @godotengine/shaders
+/editor/code_editor.* @godotengine/script-editor
+/editor/*dock*.* @godotengine/docks
+/editor/*shader*.* @godotengine/shaders
+
+# Main
+
+/main/ @godotengine/core
+
+# Misc
+
+/misc/ @godotengine/buildsystem
+
+# Modules
+
+## Audio (+ video)
+/modules/minimp3/ @godotengine/audio
+/modules/ogg/ @godotengine/audio
+/modules/opus/ @godotengine/audio
+/modules/stb_vorbis/ @godotengine/audio
+/modules/theora/ @godotengine/audio
+/modules/vorbis/ @godotengine/audio
+/modules/webm/ @godotengine/audio
+
+## Import
+/modules/basis_universal/ @godotengine/import
+/modules/bmp/ @godotengine/import
+/modules/cvtt/ @godotengine/import
+/modules/dds/ @godotengine/import
+/modules/etc/ @godotengine/import
+/modules/fbx/ @godotengine/import
+/modules/gltf/ @godotengine/import
+/modules/hdr/ @godotengine/import
+/modules/jpg/ @godotengine/import
+/modules/pvr/ @godotengine/import
+/modules/squish/ @godotengine/import
+/modules/svg/ @godotengine/import
+/modules/tga/ @godotengine/import
+/modules/tinyexr/ @godotengine/import
+/modules/webp/ @godotengine/import
+
+## Network
+/modules/enet/ @godotengine/network
+/modules/mbedtls/ @godotengine/network
+/modules/upnp/ @godotengine/network
+/modules/webrtc/ @godotengine/network
+/modules/websocket/ @godotengine/network
+
+## Rendering
+/modules/denoise/ @godotengine/rendering
+/modules/glslang/ @godotengine/rendering
+/modules/lightmapper_rd/ @godotengine/rendering
+/modules/meshoptimizer/ @godotengine/rendering
+/modules/vhacd/ @godotengine/rendering
+/modules/xatlas_unwrap/ @godotengine/rendering
+
+## Scripting
+/modules/gdnative/ @godotengine/gdnative
+/modules/gdscript/ @godotengine/gdscript
+/modules/jsonrpc/ @godotengine/gdscript
+/modules/mono/ @godotengine/mono
+/modules/visual_script/ @godotengine/visualscript
+
+## Text
+/modules/freetype/ @godotengine/buildsystem
+/modules/gdnative/text/ @godotengine/gui-nodes
+/modules/text_server_adv/ @godotengine/gui-nodes
+/modules/text_server_fb/ @godotengine/gui-nodes
+
+## XR
+/modules/camera/ @godotengine/xr
+/modules/gdnative/xr/ @godotengine/xr
+/modules/mobile_vr/ @godotengine/xr
+/modules/webxr/ @godotengine/xr
+
+## Misc
+/modules/bullet/ @godotengine/physics
+/modules/csg/ @godotengine/3d-nodes
+/modules/gdnavigation/ @godotengine/navigation
+/modules/gridmap/ @godotengine/3d-nodes
+/modules/opensimplex/ @godotengine/3d-nodes
+/modules/regex/ @godotengine/core
+
+# Platform
+
+/platform/android/ @godotengine/android
+/platform/iphone/ @godotengine/ios
+/platform/javascript/ @godotengine/html5
+/platform/linuxbsd/ @godotengine/linux-bsd
+/platform/osx/ @godotengine/macos
+/platform/uwp/ @godotengine/uwp
+/platform/windows/ @godotengine/windows
+
+# Scene
+
+/scene/2d/ @godotengine/2d-nodes
+/scene/3d/ @godotengine/3d-nodes
+/scene/animation/ @godotengine/animation
+/scene/audio/ @godotengine/audio
+/scene/debugger/ @godotengine/debugger
+/scene/gui/ @godotengine/gui-nodes
+/scene/main/ @godotengine/core
+/scene/resources/default_theme/ @godotengine/gui-nodes
+/scene/resources/font.* @godotengine/gui-nodes
+/scene/resources/text_line.* @godotengine/gui-nodes
+/scene/resources/text_paragraph.* @godotengine/gui-nodes
+/scene/resources/visual_shader*.* @godotengine/shaders
+
+# Servers
+
+/servers/audio* @godotengine/audio
+/servers/camera* @godotengine/xr
+/servers/display_server.* @godotengine/_platforms
+/servers/navigation_server*.* @godotengine/navigation
+/servers/physics* @godotengine/physics
+/servers/rendering* @godotengine/rendering
+/servers/text_server.* @godotengine/gui-nodes
+/servers/xr* @godotengine/xr
+
+# Tests
+
+/tests/ @godotengine/tests
+
+# Thirdparty
+
+/thirdparty/ @godotengine/buildsystem
diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml
index 89e8f4d146..f4c377b921 100644
--- a/.github/workflows/linux_builds.yml
+++ b/.github/workflows/linux_builds.yml
@@ -8,9 +8,9 @@ env:
SCONS_CACHE_LIMIT: 4096
jobs:
- linux-editor-mono:
+ linux-editor:
runs-on: "ubuntu-20.04"
- name: Editor w/ Mono (target=release_debug, tools=yes, tests=yes)
+ name: Editor (target=release_debug, tools=yes, tests=yes)
steps:
- uses: actions/checkout@v2
@@ -62,13 +62,13 @@ jobs:
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
- scons tools=yes tests=yes target=release_debug module_mono_enabled=yes mono_glue=no
+ scons tools=yes tests=yes target=release_debug
ls -l bin/
# Execute unit tests for the editor
- name: Unit Tests
run: |
- ./bin/godot.linuxbsd.opt.tools.64.mono --test
+ ./bin/godot.linuxbsd.opt.tools.64 --test
- uses: actions/upload-artifact@v2
with:
@@ -76,9 +76,9 @@ jobs:
path: bin/*
retention-days: 14
- linux-editor-sanitizers:
+ linux-editor-sanitizers-mono:
runs-on: "ubuntu-20.04"
- name: Editor with sanitizers (target=debug, tools=yes, tests=yes, use_asan=yes, use_ubsan=yes)
+ name: Editor w/ Mono and sanitizers (target=debug, tools=yes, tests=yes, use_asan=yes, use_ubsan=yes)
steps:
- uses: actions/checkout@v2
@@ -130,13 +130,13 @@ jobs:
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
- scons tools=yes tests=yes target=debug use_asan=yes use_ubsan=yes
+ scons tools=yes tests=yes target=debug module_mono_enabled=yes mono_glue=no use_asan=yes use_ubsan=yes
ls -l bin/
# Execute unit tests for the editor
- name: Unit Tests
run: |
- ./bin/godot.linuxbsd.tools.64s --test
+ ./bin/godot.linuxbsd.tools.64s.mono --test
linux-template-mono:
runs-on: "ubuntu-20.04"
diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml
index b9bf510c71..19ff555b56 100644
--- a/.github/workflows/windows_builds.yml
+++ b/.github/workflows/windows_builds.yml
@@ -24,7 +24,7 @@ jobs:
# Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
- name: Load .scons_cache directory
id: windows-editor-cache
- uses: RevoluPowered/cache@v2.1
+ uses: actions/cache@v2
with:
path: /.scons_cache/
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
diff --git a/.gitignore b/.gitignore
index f928c2e6ec..c1c2374bc3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -268,9 +268,12 @@ __pycache__/
# KDE
.directory
-#Kdevelop project files
+# Kdevelop project files
*.kdev4
+# Kate swap files
+*.kate-swp
+
# Xcode
xcuserdata/
*.xcscmblueprint
@@ -386,3 +389,4 @@ gcov.css
# https://clangd.llvm.org/ cache folder
.clangd/
+.cache/
diff --git a/.mailmap b/.mailmap
index 06fd11e521..72670d011f 100644
--- a/.mailmap
+++ b/.mailmap
@@ -6,6 +6,7 @@ Anish Bhobe <anishbhobe@hotmail.com>
Anutrix <numaanzaheerahmed@yahoo.com>
Aren Villanueva <arenvillanueva@yomogi-soft.com> <aren@displaysweet.com>
Ariel Manzur <ariel@godotengine.org>
+Ariel Manzur <ariel@godotengine.org> <puntob@gmail.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>
@@ -25,6 +26,7 @@ Daniel J. Ramirez <djrmuv@gmail.com>
Dominik 'dreamsComeTrue' Jasiński <dominikjasinski@o2.pl>
Emmanuel Barroga <emmanuelbarroga@gmail.com>
Eric M <itsjusteza@gmail.com>
+Eric Rybicki <info@ericrybicki.com> <stratos695@googlemail.com>
Erik Selecký <35656626+rxlecky@users.noreply.github.com>
Erik Selecký <35656626+rxlecky@users.noreply.github.com> <35656626+SeleckyErik@users.noreply.github.com>
Fabian <supagu@gmail.com>
@@ -84,6 +86,7 @@ Mateo Kuruk Miccino <mateomiccino@gmail.com>
Max Hilbrunner <m.hilbrunner@gmail.com>
Max Hilbrunner <m.hilbrunner@gmail.com> <mhilbrunner@users.noreply.github.com>
Michael Alexsander <michaelalexsander@protonmail.com>
+Nathan Franke <natfra@pm.me> <nathanwfranke@gmail.com>
Nathan Lovato <nathan@gdquest.com>
Nathan Warden <nathan@nathanwarden.com> <nathanwardenlee@icloud.com>
Nils ANDRÉ-CHANG <nils@nilsand.re>
@@ -97,7 +100,7 @@ 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>
Przemysław Gołąb (n-pigeon) <golab.przemyslaw@gmail.com>
-Rafał Mikrut <mikrutrafal54@gmail.com>
+Rafał Mikrut <mikrutrafal@protonmail.com> <mikrutrafal54@gmail.com>
Ralf Hölzemer <r.hoelzemer@posteo.de> <rollenrolm@posteo.de>
Ralf Hölzemer <r.hoelzemer@posteo.de> <rollenrolm@users.noreply.github.com>
Ramesh Ravone <ramesh.maran443@gmail.com>
@@ -116,11 +119,13 @@ 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>
+Tomasz Chabora <kobewi4e@gmail.com>
Twarit <wtwarit@gmail.com>
V.VamsiKrishna <vk@bsb.in> <vamsikrishna.v@gmail.com>
Wilhem Barbier <nounoursheureux@openmailbox.org> <wilhem.b@free.fr>
Wilhem Barbier <nounoursheureux@openmailbox.org> <schtroumps31@gmail.com>
Will Nations <willnationsdev@gmail.com>
yg2f <yoann@terminajones.com>
+Yuri Sizov <yuris@humnom.net> <pycbouh@users.noreply.github.com>
Zak Stam <zakscomputers@hotmail.com>
Zher Huei Lee <lee.zh.92@gmail.com>
diff --git a/AUTHORS.md b/AUTHORS.md
index 97c66a014c..2faaf2d2c0 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -57,7 +57,9 @@ name is available.
Daniel J. Ramirez (djrm)
Daniel Rakos (aqnuep)
dankan1890
+ Danil Alexeev (dalexeev)
David Sichma (DavidSichma)
+ David Snopek (dsnopek)
Dharkael (lupoDharkael)
Dmitry Koteroff (Krakean)
Dominik Jasiński (dreamsComeTrue)
@@ -99,6 +101,7 @@ name is available.
Jérôme Gully (Nutriz)
Jia Jun Chai (SkyLucilfer)
Joan Fons Sanchez (JFonS)
+ Johannes Witt (HaSa1002)
Johan Manuel (29jm)
Joshua Grams (JoshuaGrams)
Juan Linietsky (reduz)
@@ -111,6 +114,7 @@ name is available.
Leon Krause (leonkrause)
Liz Haas (27thLiz)
Lucien Menassol (Kanabenki)
+ Lyuma
m4nu3lf
Maganty Rushyendra (mrushyendra)
Marcel Admiraal (madmiraal)
@@ -135,6 +139,7 @@ name is available.
MichiRecRoom (LikeLakers2)
mrezai
muiroc
+ Nathan Franke (nathanfranke)
Nathan Lovato (NathanLovato)
Nathan Warden (NathanWarden)
Nils André-Chang (NilsIrl)
@@ -188,6 +193,7 @@ name is available.
Xavier Cho (mysticfall)
yg2f (SuperUserNameMan)
Yuri Roubinsky (Chaosus)
+ Yuri Sizov (pycbouh)
Zak Stam (zaksnet)
Zher Huei Lee (leezh)
ZuBsPaCe
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt
index b9b15abf5d..ff24d18e6f 100644
--- a/COPYRIGHT.txt
+++ b/COPYRIGHT.txt
@@ -72,6 +72,11 @@ Copyright: 2008-2016, The Android Open Source Project
2002, Google, Inc.
License: Apache-2.0
+Files: ./servers/physics_3d/collision_solver_3d_sat.cpp
+Comment: Open Dynamics Engine
+Copyright: 2001-2003, Russell L. Smith, Alen Ladavac, Nguyen Binh
+License: BSD-3-clause
+
Files: ./servers/physics_3d/gjk_epa.cpp
./servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp
./servers/physics_3d/joints/generic_6dof_joint_3d_sw.h
diff --git a/DONORS.md b/DONORS.md
index 58600f8f08..a852f08287 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -48,7 +48,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Digital Grows
Dov Zimring
Edward Flick
- Franz Silva
Gamechuck
GameDev.net
Hein-Pieter van Braam
@@ -81,6 +80,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Acheron
albinaask
+ Alvaro A Baena R
Asher Glick
Bernhard Werner
Carlo Cabanilla
@@ -89,6 +89,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Daniel James
David Gehrig
David Snopek
+ Don B
Ed Morley
Ellen Poe
Florian Neumann
@@ -103,7 +104,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Joan Fons
Johnny IV Young
Jon Woodward
- Kai Klyden
Karl Werf
Klavdij Voncina
Lex Steers
@@ -136,6 +136,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Tom Langwaldt
Tricky Fat Cat
tukon
+ Vitaliy Sapronenko
William Wold
xagonist
Xeno Coliseum
@@ -144,17 +145,24 @@ generous deed immortalized in the next stable release of Godot Engine.
Aaron Winter
Adam Nakonieczny
Adrian Adamiak
+ Aleksey Korotkevich
Alexander J Maynard
Alex de la Mare
+ Alexey Dyadchenko
Alex Khayrullin
alice gambrell
Andreas Funke
André Frélicot
+ Andrew Cunningham
+ Anm
+ Antanas Paskauskas
Antoni Batchelli
Arisaka Mayuki
+ Arthur S. Muszynski
Aubin Detrez
Barugon
Ben Botwin
+ Caleb Sizemore
Can Eris
Charlie Whitfield
Chase Taranto
@@ -166,16 +174,19 @@ generous deed immortalized in the next stable release of Godot Engine.
Conrad Curry
Craig Ostrin
Craig Smith
+ Cristopher
D
+ dan didenko
Darrian Little
+ Dennis Belfrage
Dev To be curious
Digital Denizen
+ Dimitri Nüscheler
Donn Eddy
Easypete
Edgar Sun
Eugenio Hugo Salgüero Jáñez
flesk
- Francisco Arámburo
F S
Gabrielius Vaiškūnas
Gary Hulst
@@ -189,11 +200,14 @@ generous deed immortalized in the next stable release of Godot Engine.
Horváth Péter
Hu Hund
Idilio Alfaro
+ Jake Burga
James Couzens
Jared
Jared White
+ Jesús Chicharro
Joel Fivat
Joel Höglund
+ Johnathan Kupferer
Jose Malheiro
Joseph Crane
Joshie Sparks
@@ -208,10 +222,12 @@ generous deed immortalized in the next stable release of Godot Engine.
Kelteseth
kickmaniac
kinfox
- kuku
+ Kos
Lachie
Lain Ballard
+ Laszlo Kiss
Leo Fidel R Liban
+ Liam Smyth
Luc-Frédéric Langis
luka duren
MadScientistCarl
@@ -220,17 +236,23 @@ generous deed immortalized in the next stable release of Godot Engine.
Marcus Richter
Marisa Clardy
Mark Barrett
+ Mark Diaz
Markus Fehr
Martin Eigel
Martin Kotz
Martin Soucek
Matt Eunson
Matt Greene
+ Matthias Toepp
+ medecau
Michael
Michael Dürwald
+ Michael Noll
+ Michael Policastro
MikadoSC
MuffinManKen
Nick Abousselam
+ Nick Barovic
Oliver Dick
Oscar Campos
Patrick Brock
@@ -245,32 +267,37 @@ generous deed immortalized in the next stable release of Godot Engine.
Raymond Harris
Raz A
Ricardo Alcantara
+ Robert Larnach
Robert Willes
Rob McInroy
Rocknight Studios
Rodrigo Favarete
Ronnie Ashlock
Ronny Mühle
- Ryan Wilson
+ Ryan Scott
+ Ryszard Sommefeldt
Samuel Judd
Scott Pilet
Sean Morgan
+ Sebastian Hutter
Sébastien
Serban Serafimescu
Sergey Minakov
Shishir Tandale
SKison
+ Song Junwoo
spilldata
Stephan Hennion
Steven Landow
Stoned Xander
- TheLevelOfDetail .
+ TheLevelOfDetail
Thomas Bjarnelöf
Thomas Kurz
Tim Howard
+ tinyBigGAMES LLC
Tobias Bocanegra
- Trent Fehl
Turntsnaco
+ tweaklab
Valryia
Vincent Cloutier
Vlad Ceru Opran
@@ -287,7 +314,6 @@ generous deed immortalized in the next stable release of Godot Engine.
## Silver donors
1D_Inc
- Aaron Passchier
Abraham Haskins
Adam
Adam Brunnmeier
@@ -305,24 +331,24 @@ generous deed immortalized in the next stable release of Godot Engine.
AJ Austinson
Aki Mimoto
Alan Beauchamp
+ Alberto Vilches
Albin Jonasson Svärdsby
Alder Stefano
AleMax
Alessandro Senese
Alexander Erlemann
+ Alexander Ryndin
+ Alexander Walter (SilvanuZ)
Alexandre Beaudoin
alex clavelle
- Ali Al-Khalifa
Allan Davis
Allen Schade
Ancient Phoenix
Anders Marstein Kruke
Andreas Krampitz
- André Simões
Andre Stackhouse
andrew james morris
Andrew Mansuetti
- Andrew Rosenwinkel
Andrew Thomas
Ano Nim
Anthony Avina
@@ -330,16 +356,14 @@ generous deed immortalized in the next stable release of Godot Engine.
AP Condomines
Arch Toasty
Arda Erol
+ Aria
Armin Preiml
Arseniy M
- Arthur S. Muszynski
Ashley Claymore
Astier Mickael
Aubrey Falconer
AzulCrescent
- B A
Balázs Batári
- Balázs Kondákor
Bartosz Bielecki
Bekhoucha Danyl
Benedikt
@@ -347,6 +371,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Bernd Jänichen
Bjarne Voigtländer
Black Block
+ blackjacksike
Blair Allen
Bobby CC Wong
Borkzilla
@@ -356,6 +381,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Brian Klein
Brodie Fairhall
Bronson Zgeb
+ Bùi Việt Thành
Burney Waring
Caleb Gartner
Cameron Meyer
@@ -364,7 +390,9 @@ generous deed immortalized in the next stable release of Godot Engine.
Carwyn Edwards
Cas Brugman
Cassidy James
+ Cédric Givord
Chad Steadman
+ Charles Alston
Chris Chapin
Chris Jagusch
Chris Langford
@@ -377,8 +405,9 @@ generous deed immortalized in the next stable release of Godot Engine.
Christoph Woinke
Chris Truebe
Clay Heaton
+ Cody Parker
Conall O
- Cyrelouyea
+ Craig Post
CzechBlueBear
Daniel Cheney
Daniel Johnson
@@ -398,10 +427,10 @@ generous deed immortalized in the next stable release of Godot Engine.
Dr.Raccoon
Duobix
Duodecimal
+ DurrDiss
Eduardo Teixeira
Edward Herbert
Edward Swartz
- Eelco F Hillenius
Egon Elbre
Elgenzay
Elias Nykrem
@@ -409,7 +438,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Eric Ellingson
Eric Williams
Erkki Seppälä
- ET Garcia
Evan Rose
Fain
Faisal Alkubaisi
@@ -423,6 +451,7 @@ generous deed immortalized in the next stable release of Godot Engine.
FuDiggity
Gadzhi Kharkharov
gamedev by Celio
+ Game Endeavor
Gary Thomas
George Marques
Gerard Ruiz Torruella
@@ -438,19 +467,16 @@ generous deed immortalized in the next stable release of Godot Engine.
Hal A
helija
Heribert Hirth
- Hoai Nam Tran
+ Hieu Thanh
Hunter Jones
- Hylpher
Ian Williams
Iiari
- iKlem
IndustrialRobot
+ Ivan Nikolaev
iveks
- Ivica Šimić
Jackson Harmer
Jacob
Jaguar
- Jaiden Gerig
Jaime Ruiz-Borau Vizárraga
Jake D
Jake Huxell
@@ -461,12 +487,13 @@ generous deed immortalized in the next stable release of Godot Engine.
Jamiee H
Jamie Massey
JARKKO PARVIAINEN
+ Jasiek Vetulani
Jason Uechi
Jean-Baptiste LEPESME
Jeff Hungerford
Jennifer Graves
Jesse Dubay
- Joe Alden
+ Jhon Adams
Joe Klemmer
John Gabriel
Jonas
@@ -483,42 +510,41 @@ generous deed immortalized in the next stable release of Godot Engine.
Jorge Javier Araya Navarro
Jose C. Rubio
Joseph Catrambone
- Josh Mitchell
Josh Taylor
- Joshua Southerland
+ Josue David
Juanfran
Jueast
Julian Murgia
June Little
- JungleRobba
+ Justin Hamilton
Justin Oaksford
Justin Spedding
KaDokta
Kalin
- Karel Němec
Kauzig
Keedong Park
Keinan Powers
Keith Bradner
Kenji Kawabata
+ Ken Minardo
Kenneth Lee
Kent Jofur
+ Ketafuki
Kevin McPhillips
Kiri Jolly
- Kiyohiro Kawamura (kyorohiro)
Kjetil Haugland
+ Konstantin Goncharov
+ Kridsada Thanabulpong
Kristian Nygaard Jensen
KsyTek Games
- Kuan Cheang
kycho
Kyle Jacobs
Kyle Szklenski
Kyuppin
Laurent CHEA
Laurent Tréguier
- Lee Meichin
+ Laxman Pradhan
LEMMiNO
- Lenny
Leonardo Dimano
Lin Chear
Linus Lind Lundgren
@@ -527,13 +553,13 @@ generous deed immortalized in the next stable release of Godot Engine.
Luis Gaemperle
Luis M
LunaticInAHat
- Lurkars
Major Haul
makoto asano
Malcolm
Marco Lardelli
Mark Jad
Mark Krenz
+ Mark Malone
Markus Martin
Markus Michael Egger
Martin FIbik
@@ -550,8 +576,10 @@ generous deed immortalized in the next stable release of Godot Engine.
Maxwell
Megasploot
Melissa Mears
+ Merlyn Morgan-Graham
mewin
Michael
+ Michael Bruce-Lockhart
Michael Haney
Michał Skwarek
Mikayla
@@ -566,27 +594,27 @@ generous deed immortalized in the next stable release of Godot Engine.
Nathaniel
Natrim
nee
+ neighty
Neil Blakey-Milner
Neil Wang
Nerdforge
Nerdyninja
Nicholas
- Nicholas Girga
Nick Allen
Nick Macholl
Niclas Eriksen
Nicolas Goll-Perrier
- Nicolás Montaña
+ Nicolas Rosset
Nicolas SAN AGUSTIN
Nima Farid
NZ
+ oceoh
OKV
Oleg Reva
Oleksandr Kryvonos
Olivier
Omar Delarosa
Oscar Domingo
- Oscar Norlander
Parinya Teerakasemsuk
patricio lara briones
Patrick Dully
@@ -595,24 +623,27 @@ generous deed immortalized in the next stable release of Godot Engine.
Paul Mason
Paweł Kowal
PaweÅ‚ Åyczkowski
- Pedro Assuncao
+ Peter Höglund
Petrus Prinsloo
Philip Cohoe
+ Phillip Zolla
Piotr Góral
+ Pipo
Point08
Preethi Vaidyanathan
- Price Comstock
pwab
+ pyacier
+ Rad Cat
Rafa Laguna
Raffaele Aramo
+ RAMupgrade
Remi Rampin
Rémi Verschelde
Reneator
- Richard Diss
+ Riccardo Marini
Richard Ivánek
Riley
Robert Farr (Larington)
- Robert Larnach
Rob Ruana
Roger Smith
Roland RzÄ…sa
@@ -623,19 +654,19 @@ generous deed immortalized in the next stable release of Godot Engine.
Ryan Groom
Sam Edson
Samuele Zolfanelli
- sayaks
+ scapegoat57
Scott D. Yelich
Scott Longley
- ScottMakesGames
+ Sean Lynch
Sebastian Michailidis
Sebastian Vetter
SeongWan Kim
Sergiy Onenko
- Shaher
Shane
Shane Sicienski
Shane Spoor
Siim Raidma
+ simdee
Simon Jonas Larsen
Simon Schoenenberger
Simon Wenner
@@ -644,20 +675,20 @@ generous deed immortalized in the next stable release of Godot Engine.
smo1704
soft circles
Squirrel
- Stefano Caronia
Steve Cloete
+ summerblind
Sung soo Choi
Svenne Krap
tadashi endo
tannhauser_gate
+ Tarch
Terry
Theodore Lindsey
- TheTrainDoctor
TheVoiceInMyHead
thomas
Thomas Bechtold
Thomas Detoy
- Thomas Kelly
+ Thomas Horwath
Tim Drumheller
Tim Erskine
Tim Gleason
@@ -671,7 +702,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Travis O'Brien
Trent Skinner
tril zerobyte
- Triptych
Triumph263 .
Troy Bonneau
Tryggve Sollid
@@ -684,8 +714,6 @@ generous deed immortalized in the next stable release of Godot Engine.
Victor
Vigilant Watch
Viktor Ismagilov
- Vitaliy Sapronenko
- Vitor Balbio
Vladimir Savin
Vladislav Smirnov
Výrus Hemomancer
@@ -693,17 +721,15 @@ generous deed immortalized in the next stable release of Godot Engine.
Wayne Haak
werner mendizabal
Wiley Thompson
- Will
William Edwards
William F Siqueira
William Hogben
Wyatt Goodin
+ Xaver Fischer
xenomat
Yegor Smirnov
- YiYin Gu
Zack Yang
Zak Stephens
- ΒΑΣΙΛΗΣ ΓΕΩΡΓΑΚΟΠΟΥΛΟΣ
蕭惟å…
éƒæ™¨ç…œ
diff --git a/SConstruct b/SConstruct
index 2281b8a77f..90cc99dd47 100644
--- a/SConstruct
+++ b/SConstruct
@@ -105,15 +105,14 @@ if profile:
opts = Variables(customs, ARGUMENTS)
# Target build options
-opts.Add("arch", "Platform-dependent architecture (arm/arm64/x86/x64/mips/...)", "")
-opts.Add(EnumVariable("bits", "Target platform bits", "default", ("default", "32", "64")))
opts.Add("p", "Platform (alias for 'platform')", "")
opts.Add("platform", "Target platform (%s)" % ("|".join(platform_list),), "")
+opts.Add(BoolVariable("tools", "Build the tools (a.k.a. the Godot editor)", True))
opts.Add(EnumVariable("target", "Compilation target", "debug", ("debug", "release_debug", "release")))
+opts.Add("arch", "Platform-dependent architecture (arm/arm64/x86/x64/mips/...)", "")
+opts.Add(EnumVariable("bits", "Target platform bits", "default", ("default", "32", "64")))
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("tests", "Build the unit tests", False))
+opts.Add(BoolVariable("production", "Set defaults to build Godot for use in production", False))
opts.Add(BoolVariable("use_lto", "Use link-time optimization", False))
# Components
@@ -121,13 +120,15 @@ opts.Add(BoolVariable("deprecated", "Enable deprecated features", True))
opts.Add(BoolVariable("minizip", "Enable ZIP archive support using minizip", True))
opts.Add(BoolVariable("xaudio2", "Enable the XAudio2 audio driver", False))
opts.Add("custom_modules", "A list of comma-separated directory paths containing custom modules to build.", "")
+opts.Add(BoolVariable("custom_modules_recursive", "Detect custom modules recursively for each specified path.", True))
# Advanced options
-opts.Add(BoolVariable("verbose", "Enable verbose output for the compilation", False))
+opts.Add(BoolVariable("dev", "If yes, alias for verbose=yes warnings=extra werror=yes", False))
opts.Add(BoolVariable("progress", "Show a progress indicator during compilation", True))
+opts.Add(BoolVariable("tests", "Build the unit tests", False))
+opts.Add(BoolVariable("verbose", "Enable verbose output for the compilation", False))
opts.Add(EnumVariable("warnings", "Level of compilation warnings", "all", ("extra", "all", "moderate", "no")))
opts.Add(BoolVariable("werror", "Treat compiler warnings as errors", False))
-opts.Add(BoolVariable("dev", "If yes, alias for verbose=yes warnings=extra werror=yes", False))
opts.Add("extra_suffix", "Custom extra suffix added to the base filename of all generated binary files", "")
opts.Add(BoolVariable("vsproj", "Generate a Visual Studio solution", False))
opts.Add(BoolVariable("disable_3d", "Disable 3D nodes for a smaller executable", False))
@@ -237,8 +238,14 @@ if env_base["custom_modules"]:
Exit(255)
for path in module_search_paths:
+ if path == "modules":
+ # Built-in modules don't have nested modules,
+ # so save the time it takes to parse directories.
+ modules = methods.detect_modules(path, recursive=False)
+ else: # External.
+ modules = methods.detect_modules(path, env_base["custom_modules_recursive"])
# Note: custom modules can override built-in ones.
- modules_detected.update(methods.detect_modules(path))
+ modules_detected.update(modules)
include_path = os.path.dirname(path)
if include_path:
env_base.Prepend(CPPPATH=[include_path])
@@ -308,7 +315,7 @@ if selected_platform in platform_list:
else:
env = env_base.Clone()
- # Compilation DB requires SCons 3.1.1+.
+ # Generating the compilation DB (`compile_commands.json`) requires SCons 4.0.0 or later.
from SCons import __version__ as scons_raw_version
scons_ver = env._get_major_minor_revision(scons_raw_version)
@@ -317,12 +324,34 @@ if selected_platform in platform_list:
env.Tool("compilation_db")
env.Alias("compiledb", env.CompilationDatabase())
+ # 'dev' and 'production' are aliases to set default options if they haven't been set
+ # manually by the user. We use `ARGUMENTS.get()` to check if they were manually set.
if env["dev"]:
- env["verbose"] = True
- env["warnings"] = "extra"
- env["werror"] = True
+ env["verbose"] = ARGUMENTS.get("verbose", True)
+ env["warnings"] = ARGUMENTS.get("warnings", "extra")
+ env["werror"] = ARGUMENTS.get("werror", True)
if env["tools"]:
- env["tests"] = True
+ env["tests"] = ARGUMENTS.get("tests", True)
+ if env["production"]:
+ env["use_static_cpp"] = ARGUMENTS.get("use_static_cpp", True)
+ env["use_lto"] = ARGUMENTS.get("use_lto", True)
+ env["debug_symbols"] = ARGUMENTS.get("debug_symbols", False)
+ if not env["tools"] and env["target"] == "debug":
+ print(
+ "WARNING: Requested `production` build with `tools=no target=debug`, "
+ "this will give you a full debug template (use `target=release_debug` "
+ "for an optimized template with debug features)."
+ )
+ if env.msvc:
+ print(
+ "WARNING: For `production` Windows builds, you should use MinGW with GCC "
+ "or Clang instead of Visual Studio, as they can better optimize the "
+ "GDScript VM in a very significant way. MSVC LTO also doesn't work "
+ "reliably for our use case."
+ "If you want to use MSVC nevertheless for production builds, set "
+ "`debug_symbols=no use_lto=no` instead of the `production=yes` option."
+ )
+ Exit(255)
env.extra_suffix = ""
@@ -588,7 +617,7 @@ if selected_platform in platform_list:
if env["minizip"]:
env.Append(CPPDEFINES=["MINIZIP_ENABLED"])
- editor_module_list = ["regex"]
+ editor_module_list = ["freetype", "regex"]
if env["tools"] and not env.module_check_dependencies("tools", editor_module_list):
print(
"Build option 'module_"
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index 70e8133eaa..c872ae2162 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -32,6 +32,7 @@
#include "core/core_bind.h"
#include "core/core_string_names.h"
+#include "core/input/input_map.h"
#include "core/io/file_access_network.h"
#include "core/io/file_access_pack.h"
#include "core/io/marshalls.h"
@@ -124,6 +125,11 @@ void ProjectSettings::set_restart_if_changed(const String &p_name, bool p_restar
props[p_name].restart_if_changed = p_restart;
}
+void ProjectSettings::set_as_basic(const String &p_name, bool p_basic) {
+ ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + ".");
+ props[p_name].basic = p_basic;
+}
+
void ProjectSettings::set_ignore_value_in_docs(const String &p_name, bool p_ignore) {
ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + ".");
#ifdef DEBUG_METHODS_ENABLED
@@ -269,6 +275,10 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const {
vc.flags = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE;
}
+ if (v->basic) {
+ vc.flags |= PROPERTY_USAGE_EDITOR_BASIC_SETTING;
+ }
+
if (v->restart_if_changed) {
vc.flags |= PROPERTY_USAGE_RESTART_IF_CHANGED;
}
@@ -278,7 +288,7 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const {
for (Set<_VCSort>::Element *E = vclist.front(); E; E = E->next()) {
String prop_info_name = E->get().name;
int dot = prop_info_name.find(".");
- if (dot != -1) {
+ if (dot != -1 && !custom_prop_info.has(prop_info_name)) {
prop_info_name = prop_info_name.substr(0, dot);
}
@@ -597,6 +607,7 @@ Error ProjectSettings::_load_settings_text(const String &p_path) {
// If we're loading a project.godot from source code, we can operate some
// ProjectSettings conversions if need be.
_convert_to_last_version(config_version);
+ last_save_time = FileAccess::get_modified_time(get_resource_path().plus_file("project.godot"));
return OK;
} else if (err != OK) {
ERR_PRINT("Error parsing " + p_path + " at line " + itos(lines) + ": " + error_text + " File might be corrupted.");
@@ -676,7 +687,11 @@ void ProjectSettings::clear(const String &p_name) {
}
Error ProjectSettings::save() {
- return save_custom(get_resource_path().plus_file("project.godot"));
+ Error error = save_custom(get_resource_path().plus_file("project.godot"));
+ if (error == OK) {
+ last_save_time = FileAccess::get_modified_time(get_resource_path().plus_file("project.godot"));
+ }
+ return error;
}
Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) {
@@ -903,7 +918,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust
}
}
-Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed, bool p_ignore_value_in_docs) {
+Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed, bool p_ignore_value_in_docs, bool p_basic) {
Variant ret;
if (!ProjectSettings::get_singleton()->has_setting(p_var)) {
ProjectSettings::get_singleton()->set(p_var, p_default);
@@ -912,6 +927,7 @@ Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restar
ProjectSettings::get_singleton()->set_initial_value(p_var, p_default);
ProjectSettings::get_singleton()->set_builtin_order(p_var);
+ ProjectSettings::get_singleton()->set_as_basic(p_var, p_basic);
ProjectSettings::get_singleton()->set_restart_if_changed(p_var, p_restart_if_changed);
ProjectSettings::get_singleton()->set_ignore_value_in_docs(p_var, p_ignore_value_in_docs);
return ret;
@@ -1042,29 +1058,47 @@ void ProjectSettings::_bind_methods() {
ClassDB::bind_method(D_METHOD("save_custom", "file"), &ProjectSettings::_save_custom_bnd);
}
+void ProjectSettings::_add_builtin_input_map() {
+ if (InputMap::get_singleton()) {
+ OrderedHashMap<String, List<Ref<InputEvent>>> builtins = InputMap::get_singleton()->get_builtins();
+
+ for (OrderedHashMap<String, List<Ref<InputEvent>>>::Element E = builtins.front(); E; E = E.next()) {
+ Array events;
+
+ // Convert list of input events into array
+ for (List<Ref<InputEvent>>::Element *I = E.get().front(); I; I = I->next()) {
+ events.push_back(I->get());
+ }
+
+ Dictionary action;
+ action["deadzone"] = Variant(0.5f);
+ action["events"] = events;
+
+ String action_name = "input/" + E.key();
+ GLOBAL_DEF(action_name, action);
+ input_presets.push_back(action_name);
+ }
+ }
+}
+
ProjectSettings::ProjectSettings() {
// Initialization of engine variables should be done in the setup() method,
// so that the values can be overridden from project.godot or project.binary.
singleton = this;
- Array events;
- Dictionary action;
- Ref<InputEventKey> key;
- Ref<InputEventJoypadButton> joyb;
-
- GLOBAL_DEF("application/config/name", "");
- GLOBAL_DEF("application/config/description", "");
+ GLOBAL_DEF_BASIC("application/config/name", "");
+ GLOBAL_DEF_BASIC("application/config/description", "");
custom_prop_info["application/config/description"] = PropertyInfo(Variant::STRING, "application/config/description", PROPERTY_HINT_MULTILINE_TEXT);
- GLOBAL_DEF("application/run/main_scene", "");
+ GLOBAL_DEF_BASIC("application/run/main_scene", "");
custom_prop_info["application/run/main_scene"] = PropertyInfo(Variant::STRING, "application/run/main_scene", PROPERTY_HINT_FILE, "*.tscn,*.scn,*.res");
GLOBAL_DEF("application/run/disable_stdout", false);
GLOBAL_DEF("application/run/disable_stderr", false);
GLOBAL_DEF("application/config/use_custom_user_dir", false);
GLOBAL_DEF("application/config/custom_user_dir_name", "");
GLOBAL_DEF("application/config/project_settings_override", "");
- GLOBAL_DEF("audio/default_bus_layout", "res://default_bus_layout.tres");
- custom_prop_info["audio/default_bus_layout"] = PropertyInfo(Variant::STRING, "audio/default_bus_layout", PROPERTY_HINT_FILE, "*.tres");
+ GLOBAL_DEF_BASIC("audio/buses/default_bus_layout", "res://default_bus_layout.tres");
+ custom_prop_info["audio/buses/default_bus_layout"] = PropertyInfo(Variant::STRING, "audio/buses/default_bus_layout", PROPERTY_HINT_FILE, "*.tres");
PackedStringArray extensions = PackedStringArray();
extensions.push_back("gd");
@@ -1073,174 +1107,18 @@ ProjectSettings::ProjectSettings() {
}
extensions.push_back("shader");
- GLOBAL_DEF("editor/search_in_file_extensions", extensions);
- custom_prop_info["editor/search_in_file_extensions"] = PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/search_in_file_extensions");
-
- GLOBAL_DEF("editor/script_templates_search_path", "res://script_templates");
- custom_prop_info["editor/script_templates_search_path"] = PropertyInfo(Variant::STRING, "editor/script_templates_search_path", PROPERTY_HINT_DIR);
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_ENTER);
- events.push_back(key);
- key.instance();
- key->set_keycode(KEY_KP_ENTER);
- events.push_back(key);
- key.instance();
- key->set_keycode(KEY_SPACE);
- events.push_back(key);
- joyb.instance();
- joyb->set_button_index(JOY_BUTTON_A);
- events.push_back(joyb);
- action["events"] = events;
- GLOBAL_DEF("input/ui_accept", action);
- input_presets.push_back("input/ui_accept");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_SPACE);
- events.push_back(key);
- joyb.instance();
- joyb->set_button_index(JOY_BUTTON_Y);
- events.push_back(joyb);
- action["events"] = events;
- GLOBAL_DEF("input/ui_select", action);
- input_presets.push_back("input/ui_select");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_ESCAPE);
- events.push_back(key);
- joyb.instance();
- joyb->set_button_index(JOY_BUTTON_B);
- events.push_back(joyb);
- action["events"] = events;
- GLOBAL_DEF("input/ui_cancel", action);
- input_presets.push_back("input/ui_cancel");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_TAB);
- events.push_back(key);
- action["events"] = events;
- GLOBAL_DEF("input/ui_focus_next", action);
- input_presets.push_back("input/ui_focus_next");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_TAB);
- key->set_shift(true);
- events.push_back(key);
- action["events"] = events;
- GLOBAL_DEF("input/ui_focus_prev", action);
- input_presets.push_back("input/ui_focus_prev");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_LEFT);
- events.push_back(key);
- joyb.instance();
- joyb->set_button_index(JOY_BUTTON_DPAD_LEFT);
- events.push_back(joyb);
- action["events"] = events;
- GLOBAL_DEF("input/ui_left", action);
- input_presets.push_back("input/ui_left");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_RIGHT);
- events.push_back(key);
- joyb.instance();
- joyb->set_button_index(JOY_BUTTON_DPAD_RIGHT);
- events.push_back(joyb);
- action["events"] = events;
- GLOBAL_DEF("input/ui_right", action);
- input_presets.push_back("input/ui_right");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_UP);
- events.push_back(key);
- joyb.instance();
- joyb->set_button_index(JOY_BUTTON_DPAD_UP);
- events.push_back(joyb);
- action["events"] = events;
- GLOBAL_DEF("input/ui_up", action);
- input_presets.push_back("input/ui_up");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_DOWN);
- events.push_back(key);
- joyb.instance();
- joyb->set_button_index(JOY_BUTTON_DPAD_DOWN);
- events.push_back(joyb);
- action["events"] = events;
- GLOBAL_DEF("input/ui_down", action);
- input_presets.push_back("input/ui_down");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_PAGEUP);
- events.push_back(key);
- action["events"] = events;
- GLOBAL_DEF("input/ui_page_up", action);
- input_presets.push_back("input/ui_page_up");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_PAGEDOWN);
- events.push_back(key);
- action["events"] = events;
- GLOBAL_DEF("input/ui_page_down", action);
- input_presets.push_back("input/ui_page_down");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_HOME);
- events.push_back(key);
- action["events"] = events;
- GLOBAL_DEF("input/ui_home", action);
- input_presets.push_back("input/ui_home");
-
- action = Dictionary();
- action["deadzone"] = Variant(0.5f);
- events = Array();
- key.instance();
- key->set_keycode(KEY_END);
- events.push_back(key);
- action["events"] = events;
- GLOBAL_DEF("input/ui_end", action);
- input_presets.push_back("input/ui_end");
+ GLOBAL_DEF("editor/script/search_in_file_extensions", extensions);
+ custom_prop_info["editor/script/search_in_file_extensions"] = PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/script/search_in_file_extensions");
+
+ GLOBAL_DEF("editor/script/templates_search_path", "res://script_templates");
+ custom_prop_info["editor/script/templates_search_path"] = PropertyInfo(Variant::STRING, "editor/script/templates_search_path", PROPERTY_HINT_DIR);
+
+ _add_builtin_input_map();
custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::STRING, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "landscape,portrait,reverse_landscape,reverse_portrait,sensor_landscape,sensor_portrait,sensor");
- custom_prop_info["rendering/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded");
- custom_prop_info["physics/2d/thread_model"] = PropertyInfo(Variant::INT, "physics/2d/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded");
- custom_prop_info["rendering/quality/intended_usage/framebuffer_allocation"] = PropertyInfo(Variant::INT, "rendering/quality/intended_usage/framebuffer_allocation", PROPERTY_HINT_ENUM, "2D,2D Without Sampling,3D,3D Without Effects");
+ custom_prop_info["rendering/driver/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/driver/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded");
+ GLOBAL_DEF("physics/2d/run_on_thread", false);
+ GLOBAL_DEF("physics/3d/run_on_thread", false);
GLOBAL_DEF("debug/settings/profiler/max_functions", 16384);
custom_prop_info["debug/settings/profiler/max_functions"] = PropertyInfo(Variant::INT, "debug/settings/profiler/max_functions", PROPERTY_HINT_RANGE, "128,65535,1");
diff --git a/core/config/project_settings.h b/core/config/project_settings.h
index 59c56c23c2..ed8fb19fa0 100644
--- a/core/config/project_settings.h
+++ b/core/config/project_settings.h
@@ -58,6 +58,7 @@ protected:
struct VariantContainer {
int order = 0;
bool persist = false;
+ bool basic = false;
Variant variant;
Variant initial;
bool hide_from_editor = false;
@@ -78,6 +79,8 @@ protected:
int last_order = NO_BUILTIN_ORDER_BASE;
int last_builtin_order = 0;
+ uint64_t last_save_time = 0;
+
Map<StringName, VariantContainer> props;
String resource_path;
Map<StringName, PropertyInfo> custom_prop_info;
@@ -113,6 +116,8 @@ protected:
Error _setup(const String &p_path, const String &p_main_pack, bool p_upwards = false);
+ void _add_builtin_input_map();
+
protected:
static void _bind_methods();
@@ -127,6 +132,7 @@ public:
String globalize_path(const String &p_path) const;
void set_initial_value(const String &p_name, const Variant &p_value);
+ void set_as_basic(const String &p_name, bool p_basic);
void set_restart_if_changed(const String &p_name, bool p_restart);
void set_ignore_value_in_docs(const String &p_name, bool p_ignore);
bool get_ignore_value_in_docs(const String &p_name) const;
@@ -150,6 +156,7 @@ public:
Error save();
void set_custom_property_info(const String &p_prop, const PropertyInfo &p_info);
const Map<StringName, PropertyInfo> &get_custom_property_info() const;
+ uint64_t get_last_saved_time() { return last_save_time; }
Vector<String> get_optimizer_presets() const;
@@ -172,11 +179,16 @@ public:
};
//not a macro any longer
-Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed = false, bool p_ignore_value_in_docs = false);
+Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed = false, bool p_ignore_value_in_docs = false, bool p_basic = false);
#define GLOBAL_DEF(m_var, m_value) _GLOBAL_DEF(m_var, m_value)
#define GLOBAL_DEF_RST(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true)
#define GLOBAL_DEF_NOVAL(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, true)
#define GLOBAL_DEF_RST_NOVAL(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, true)
#define GLOBAL_GET(m_var) ProjectSettings::get_singleton()->get(m_var)
+#define GLOBAL_DEF_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, false, true)
+#define GLOBAL_DEF_RST_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, false, true)
+#define GLOBAL_DEF_NOVAL_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, true, true)
+#define GLOBAL_DEF_RST_NOVAL_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, true, true)
+
#endif // PROJECT_SETTINGS_H
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index 000b628ba7..b446f4c827 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -86,9 +86,9 @@ RES _ResourceLoader::load_threaded_get(const String &p_path) {
return res;
}
-RES _ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p_no_cache) {
+RES _ResourceLoader::load(const String &p_path, const String &p_type_hint, CacheMode p_cache_mode) {
Error err = OK;
- RES ret = ResourceLoader::load(p_path, p_type_hint, p_no_cache, &err);
+ RES ret = ResourceLoader::load(p_path, p_type_hint, ResourceFormatLoader::CacheMode(p_cache_mode), &err);
ERR_FAIL_COND_V_MSG(err != OK, ret, "Error loading resource: '" + p_path + "'.");
return ret;
@@ -135,7 +135,7 @@ void _ResourceLoader::_bind_methods() {
ClassDB::bind_method(D_METHOD("load_threaded_get_status", "path", "progress"), &_ResourceLoader::load_threaded_get_status, DEFVAL(Array()));
ClassDB::bind_method(D_METHOD("load_threaded_get", "path"), &_ResourceLoader::load_threaded_get);
- ClassDB::bind_method(D_METHOD("load", "path", "type_hint", "no_cache"), &_ResourceLoader::load, DEFVAL(""), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("load", "path", "type_hint", "no_cache"), &_ResourceLoader::load, DEFVAL(""), DEFVAL(CACHE_MODE_REUSE));
ClassDB::bind_method(D_METHOD("get_recognized_extensions_for_type", "type"), &_ResourceLoader::get_recognized_extensions_for_type);
ClassDB::bind_method(D_METHOD("set_abort_on_missing_resources", "abort"), &_ResourceLoader::set_abort_on_missing_resources);
ClassDB::bind_method(D_METHOD("get_dependencies", "path"), &_ResourceLoader::get_dependencies);
@@ -146,6 +146,10 @@ void _ResourceLoader::_bind_methods() {
BIND_ENUM_CONSTANT(THREAD_LOAD_IN_PROGRESS);
BIND_ENUM_CONSTANT(THREAD_LOAD_FAILED);
BIND_ENUM_CONSTANT(THREAD_LOAD_LOADED);
+
+ BIND_ENUM_CONSTANT(CACHE_MODE_IGNORE);
+ BIND_ENUM_CONSTANT(CACHE_MODE_REUSE);
+ BIND_ENUM_CONSTANT(CACHE_MODE_REPLACE);
}
////// _ResourceSaver //////
@@ -298,6 +302,10 @@ Error _OS::set_thread_name(const String &p_name) {
return Thread::set_name(p_name);
}
+Thread::ID _OS::get_thread_caller_id() const {
+ return Thread::get_caller_id();
+};
+
bool _OS::has_feature(const String &p_feature) const {
return OS::get_singleton()->has_feature(p_feature);
}
@@ -673,22 +681,6 @@ String _OS::get_unique_id() const {
return OS::get_singleton()->get_unique_id();
}
-int _OS::get_tablet_driver_count() const {
- return OS::get_singleton()->get_tablet_driver_count();
-}
-
-String _OS::get_tablet_driver_name(int p_driver) const {
- return OS::get_singleton()->get_tablet_driver_name(p_driver);
-}
-
-String _OS::get_current_tablet_driver() const {
- return OS::get_singleton()->get_current_tablet_driver();
-}
-
-void _OS::set_current_tablet_driver(const String &p_driver) {
- OS::get_singleton()->set_current_tablet_driver(p_driver);
-}
-
_OS *_OS::singleton = nullptr;
void _OS::_bind_methods() {
@@ -764,6 +756,7 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_file_access_save_and_swap", "enabled"), &_OS::set_use_file_access_save_and_swap);
ClassDB::bind_method(D_METHOD("set_thread_name", "name"), &_OS::set_thread_name);
+ ClassDB::bind_method(D_METHOD("get_thread_caller_id"), &_OS::get_thread_caller_id);
ClassDB::bind_method(D_METHOD("has_feature", "tag_name"), &_OS::has_feature);
@@ -771,19 +764,12 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("request_permissions"), &_OS::request_permissions);
ClassDB::bind_method(D_METHOD("get_granted_permissions"), &_OS::get_granted_permissions);
- ClassDB::bind_method(D_METHOD("get_tablet_driver_count"), &_OS::get_tablet_driver_count);
- ClassDB::bind_method(D_METHOD("get_tablet_driver_name", "idx"), &_OS::get_tablet_driver_name);
- ClassDB::bind_method(D_METHOD("get_current_tablet_driver"), &_OS::get_current_tablet_driver);
- ClassDB::bind_method(D_METHOD("set_current_tablet_driver", "name"), &_OS::set_current_tablet_driver);
-
ADD_PROPERTY(PropertyInfo(Variant::INT, "exit_code"), "set_exit_code", "get_exit_code");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "low_processor_usage_mode"), "set_low_processor_usage_mode", "is_in_low_processor_usage_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "low_processor_usage_mode_sleep_usec"), "set_low_processor_usage_mode_sleep_usec", "get_low_processor_usage_mode_sleep_usec");
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "tablet_driver"), "set_current_tablet_driver", "get_current_tablet_driver");
// Those default values need to be specified for the docs generator,
// to avoid using values from the documentation writer's own OS instance.
- ADD_PROPERTY_DEFAULT("tablet_driver", "");
ADD_PROPERTY_DEFAULT("exit_code", 0);
ADD_PROPERTY_DEFAULT("low_processor_usage_mode", false);
ADD_PROPERTY_DEFAULT("low_processor_usage_mode_sleep_usec", 6900);
@@ -1245,6 +1231,11 @@ Error _File::open(const String &p_path, ModeFlags p_mode_flags) {
return err;
}
+void _File::flush() {
+ ERR_FAIL_COND_MSG(!f, "File must be opened before flushing.");
+ f->flush();
+}
+
void _File::close() {
if (f) {
memdelete(f);
@@ -1538,6 +1529,7 @@ void _File::_bind_methods() {
ClassDB::bind_method(D_METHOD("open_compressed", "path", "mode_flags", "compression_mode"), &_File::open_compressed, DEFVAL(0));
ClassDB::bind_method(D_METHOD("open", "path", "flags"), &_File::open);
+ ClassDB::bind_method(D_METHOD("flush"), &_File::flush);
ClassDB::bind_method(D_METHOD("close"), &_File::close);
ClassDB::bind_method(D_METHOD("get_path"), &_File::get_path);
ClassDB::bind_method(D_METHOD("get_path_absolute"), &_File::get_path_absolute);
@@ -1975,7 +1967,7 @@ void _Thread::_start_func(void *ud) {
}
Error _Thread::start(Object *p_instance, const StringName &p_method, const Variant &p_userdata, Priority p_priority) {
- ERR_FAIL_COND_V_MSG(active, ERR_ALREADY_IN_USE, "Thread already started.");
+ ERR_FAIL_COND_V_MSG(active.is_set(), ERR_ALREADY_IN_USE, "Thread already started.");
ERR_FAIL_COND_V(!p_instance, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(p_method == StringName(), ERR_INVALID_PARAMETER);
ERR_FAIL_INDEX_V(p_priority, PRIORITY_MAX, ERR_INVALID_PARAMETER);
@@ -1984,49 +1976,33 @@ Error _Thread::start(Object *p_instance, const StringName &p_method, const Varia
target_method = p_method;
target_instance = p_instance;
userdata = p_userdata;
- active = true;
+ active.set();
Ref<_Thread> *ud = memnew(Ref<_Thread>(this));
Thread::Settings s;
s.priority = (Thread::Priority)p_priority;
- thread = Thread::create(_start_func, ud, s);
- if (!thread) {
- active = false;
- target_method = StringName();
- target_instance = nullptr;
- userdata = Variant();
- return ERR_CANT_CREATE;
- }
+ thread.start(_start_func, ud, s);
return OK;
}
String _Thread::get_id() const {
- if (!thread) {
- return String();
- }
-
- return itos(thread->get_id());
+ return itos(thread.get_id());
}
bool _Thread::is_active() const {
- return active;
+ return active.is_set();
}
Variant _Thread::wait_to_finish() {
- ERR_FAIL_COND_V_MSG(!thread, Variant(), "Thread must exist to wait for its completion.");
- ERR_FAIL_COND_V_MSG(!active, Variant(), "Thread must be active to wait for its completion.");
- Thread::wait_to_finish(thread);
+ ERR_FAIL_COND_V_MSG(!active.is_set(), Variant(), "Thread must be active to wait for its completion.");
+ thread.wait_to_finish();
Variant r = ret;
- active = false;
+ active.clear();
target_method = StringName();
target_instance = nullptr;
userdata = Variant();
- if (thread) {
- memdelete(thread);
- }
- thread = nullptr;
return r;
}
@@ -2042,10 +2018,6 @@ void _Thread::_bind_methods() {
BIND_ENUM_CONSTANT(PRIORITY_HIGH);
}
-_Thread::~_Thread() {
- ERR_FAIL_COND_MSG(active, "Reference to a Thread object was lost while the thread is still running...");
-}
-
////// _ClassDB //////
PackedStringArray _ClassDB::get_class_list() const {
diff --git a/core/core_bind.h b/core/core_bind.h
index 665858cd26..435269dac5 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -40,6 +40,7 @@
#include "core/os/os.h"
#include "core/os/semaphore.h"
#include "core/os/thread.h"
+#include "core/templates/safe_refcount.h"
class _ResourceLoader : public Object {
GDCLASS(_ResourceLoader, Object);
@@ -56,13 +57,19 @@ public:
THREAD_LOAD_LOADED
};
+ enum CacheMode {
+ CACHE_MODE_IGNORE, //resource and subresources do not use path cache, no path is set into resource.
+ CACHE_MODE_REUSE, //resource and subresources use patch cache, reuse existing loaded resources instead of loading from disk when available
+ CACHE_MODE_REPLACE, //resource and and subresource use path cache, but replace existing loaded resources when available with information from disk
+ };
+
static _ResourceLoader *get_singleton() { return singleton; }
Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false);
ThreadLoadStatus load_threaded_get_status(const String &p_path, Array r_progress = Array());
RES load_threaded_get(const String &p_path);
- RES load(const String &p_path, const String &p_type_hint = "", bool p_no_cache = false);
+ RES load(const String &p_path, const String &p_type_hint = "", CacheMode p_cache_mode = CACHE_MODE_REUSE);
Vector<String> get_recognized_extensions_for_type(const String &p_type);
void set_abort_on_missing_resources(bool p_abort);
PackedStringArray get_dependencies(const String &p_path);
@@ -73,6 +80,7 @@ public:
};
VARIANT_ENUM_CAST(_ResourceLoader::ThreadLoadStatus);
+VARIANT_ENUM_CAST(_ResourceLoader::CacheMode);
class _ResourceSaver : public Object {
GDCLASS(_ResourceSaver, Object);
@@ -232,6 +240,7 @@ public:
String get_user_data_dir() const;
Error set_thread_name(const String &p_name);
+ Thread::ID get_thread_caller_id() const;
bool has_feature(const String &p_feature) const;
@@ -239,11 +248,6 @@ public:
bool request_permissions();
Vector<String> get_granted_permissions() const;
- int get_tablet_driver_count() const;
- String get_tablet_driver_name(int p_driver) const;
- String get_current_tablet_driver() const;
- void set_current_tablet_driver(const String &p_driver);
-
static _OS *get_singleton() { return singleton; }
_OS() { singleton = this; }
@@ -378,6 +382,7 @@ public:
Error open_compressed(const String &p_path, ModeFlags p_mode_flags, CompressionMode p_compress_mode = COMPRESSION_FASTLZ);
Error open(const String &p_path, ModeFlags p_mode_flags); // open a file.
+ void flush(); // Flush a file (write its buffer to disk).
void close(); // Close a file.
bool is_open() const; // True when file is open.
@@ -550,10 +555,10 @@ class _Thread : public Reference {
protected:
Variant ret;
Variant userdata;
- volatile bool active = false;
+ SafeFlag active;
Object *target_instance = nullptr;
StringName target_method;
- Thread *thread = nullptr;
+ Thread thread;
static void _bind_methods();
static void _start_func(void *ud);
@@ -569,9 +574,6 @@ public:
String get_id() const;
bool is_active() const;
Variant wait_to_finish();
-
- _Thread() {}
- ~_Thread();
};
VARIANT_ENUM_CAST(_Thread::Priority);
diff --git a/core/core_constants.cpp b/core/core_constants.cpp
index 3df121b9cb..ef5dbf17bb 100644
--- a/core/core_constants.cpp
+++ b/core/core_constants.cpp
@@ -426,6 +426,12 @@ void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_DPAD_DOWN);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_DPAD_LEFT);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_DPAD_RIGHT);
+ BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_MISC1);
+ BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_PADDLE1);
+ BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_PADDLE2);
+ BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_PADDLE3);
+ BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_PADDLE4);
+ BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_TOUCHPAD);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_SDL_MAX);
BIND_CORE_ENUM_CONSTANT(JOY_BUTTON_MAX);
diff --git a/core/core_string_names.cpp b/core/core_string_names.cpp
index 18ac2a2d43..ff8569e45d 100644
--- a/core/core_string_names.cpp
+++ b/core/core_string_names.cpp
@@ -76,5 +76,6 @@ CoreStringNames::CoreStringNames() :
bind(StaticCString::create("bind")),
unbind(StaticCString::create("unbind")),
emit(StaticCString::create("emit")),
- notification(StaticCString::create("notification")) {
+ notification(StaticCString::create("notification")),
+ property_list_changed(StaticCString::create("property_list_changed")) {
}
diff --git a/core/core_string_names.h b/core/core_string_names.h
index b4e386f3bc..abe751372e 100644
--- a/core/core_string_names.h
+++ b/core/core_string_names.h
@@ -96,6 +96,7 @@ public:
StringName unbind;
StringName emit;
StringName notification;
+ StringName property_list_changed;
};
#endif // CORE_STRING_NAMES_H
diff --git a/core/crypto/crypto.cpp b/core/crypto/crypto.cpp
index 99f4fb232d..f43f3e3290 100644
--- a/core/crypto/crypto.cpp
+++ b/core/crypto/crypto.cpp
@@ -141,7 +141,7 @@ void Crypto::_bind_methods() {
/// Resource loader/saver
-RES ResourceFormatLoaderCrypto::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderCrypto::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
String el = p_path.get_extension().to_lower();
if (el == "crt") {
X509Certificate *cert = X509Certificate::create();
diff --git a/core/crypto/crypto.h b/core/crypto/crypto.h
index 30d2129e3d..9438fcfea5 100644
--- a/core/crypto/crypto.h
+++ b/core/crypto/crypto.h
@@ -116,7 +116,7 @@ public:
class ResourceFormatLoaderCrypto : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/core/debugger/remote_debugger_peer.cpp b/core/debugger/remote_debugger_peer.cpp
index 2e388d5934..857e3af268 100644
--- a/core/debugger/remote_debugger_peer.cpp
+++ b/core/debugger/remote_debugger_peer.cpp
@@ -65,12 +65,8 @@ int RemoteDebuggerPeerTCP::get_max_message_size() const {
}
void RemoteDebuggerPeerTCP::close() {
- if (thread) {
- running = false;
- Thread::wait_to_finish(thread);
- memdelete(thread);
- thread = nullptr;
- }
+ running = false;
+ thread.wait_to_finish();
tcp_client->disconnect_from_host();
out_buf.resize(0);
in_buf.resize(0);
@@ -85,7 +81,7 @@ RemoteDebuggerPeerTCP::RemoteDebuggerPeerTCP(Ref<StreamPeerTCP> p_tcp) {
connected = true;
#ifndef NO_THREADS
running = true;
- thread = Thread::create(_thread_func, this);
+ thread.start(_thread_func, this);
#endif
} else {
tcp_client.instance();
@@ -188,7 +184,7 @@ Error RemoteDebuggerPeerTCP::connect_to_host(const String &p_host, uint16_t p_po
connected = true;
#ifndef NO_THREADS
running = true;
- thread = Thread::create(_thread_func, this);
+ thread.start(_thread_func, this);
#endif
return OK;
}
diff --git a/core/debugger/remote_debugger_peer.h b/core/debugger/remote_debugger_peer.h
index c759c65568..652e2d9d20 100644
--- a/core/debugger/remote_debugger_peer.h
+++ b/core/debugger/remote_debugger_peer.h
@@ -58,7 +58,7 @@ class RemoteDebuggerPeerTCP : public RemoteDebuggerPeer {
private:
Ref<StreamPeerTCP> tcp_client;
Mutex mutex;
- Thread *thread = nullptr;
+ Thread thread;
List<Array> in_queue;
List<Array> out_queue;
int out_left = 0;
diff --git a/core/error/error_macros.h b/core/error/error_macros.h
index 8eb6217ce8..f909a67d55 100644
--- a/core/error/error_macros.h
+++ b/core/error/error_macros.h
@@ -33,6 +33,8 @@
#include "core/typedefs.h"
+#include "core/templates/safe_refcount.h"
+
class String;
enum ErrorHandlerType {
@@ -577,10 +579,10 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li
*/
#define WARN_DEPRECATED \
if (true) { \
- static volatile bool warning_shown = false; \
- if (!warning_shown) { \
+ static SafeFlag warning_shown; \
+ if (!warning_shown.is_set()) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "This method has been deprecated and will be removed in the future.", ERR_HANDLER_WARNING); \
- warning_shown = true; \
+ warning_shown.set(); \
} \
} else \
((void)0)
@@ -590,10 +592,10 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li
*/
#define WARN_DEPRECATED_MSG(m_msg) \
if (true) { \
- static volatile bool warning_shown = false; \
- if (!warning_shown) { \
+ static SafeFlag warning_shown; \
+ if (!warning_shown.is_set()) { \
_err_print_error(FUNCTION_STR, __FILE__, __LINE__, "This method has been deprecated and will be removed in the future.", DEBUG_STR(m_msg), ERR_HANDLER_WARNING); \
- warning_shown = true; \
+ warning_shown.set(); \
} \
} else \
((void)0)
diff --git a/core/input/gamecontrollerdb.txt b/core/input/gamecontrollerdb.txt
index 180708cea6..668a531b1f 100644
--- a/core/input/gamecontrollerdb.txt
+++ b/core/input/gamecontrollerdb.txt
@@ -1,4 +1,4 @@
-# Game Controller DB for SDL in 2.0.10 format
+# Game Controller DB for SDL in 2.0.9 format
# Source: https://github.com/gabomdq/SDL_GameControllerDB
# Windows
@@ -35,7 +35,7 @@
03000000c82d00000161000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000260000000000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000261000000000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
-03000000c82d00000031000000000000,8BitDo Wireless Adapter,a:b1,b:b0,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:b4,y:b3,platform:Windows,
+03000000c82d00000031000000000000,8BitDo Wireless Adapter,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,
03000000c82d00001890000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00003032000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000a00500003232000000000000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows,
@@ -80,14 +80,15 @@
030000007d0400000840000000000000,Destroyer Tiltpad,+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b1,b:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,x:b0,y:b3,platform:Windows,
03000000791d00000103000000000000,Dual Box WII,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000bd12000002e0000000000000,Dual USB Vibration Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Windows,
+030000008f0e00000910000000000000,DualShock 2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Windows,
030000006f0e00003001000000000000,EA SPORTS 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,
03000000b80500000410000000000000,Elecom Gamepad,a:b2,b:b3,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:b1,platform:Windows,
03000000b80500000610000000000000,Elecom Gamepad,a:b2,b:b3,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:b1,platform:Windows,
03000000120c0000f61c000000000000,Elite,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,
030000008f0e00000f31000000000000,EXEQ,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:b3,y:b2,platform:Windows,
03000000341a00000108000000000000,EXEQ RF USB Gamepad 8206,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
-030000006f0e00008001000000000000,Faceoff Wired Pro Controller for Nintendo Switch,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b12,start:b9,leftstick:b10,rightstick:b11,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:b6,righttrigger:b7,platform:Windows,
-030000006f0e00008401000000000000,Faceoff Deluxe+ Audio Wired Controller for Nintendo Switch,platform:Windows,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b12,start:b9,leftstick:b10,rightstick:b11,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:b6,righttrigger:b7,
+030000006f0e00008401000000000000,Faceoff Deluxe+ Audio Wired Controller for Nintendo 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,
+030000006f0e00008001000000000000,Faceoff Wired Pro Controller for Nintendo 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,
03000000852100000201000000000000,FF-GP1,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,
030000000d0f00008500000000000000,Fighting Commander 2016 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:Windows,
030000000d0f00008400000000000000,Fighting Commander 5,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:Windows,
@@ -98,6 +99,7 @@
03000000790000002201000000000000,Game Controller for PC,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,
0300000066f700000100000000000000,Game VIB Joystick,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:Windows,
03000000260900002625000000000000,Gamecube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,lefttrigger:a4,leftx:a0,lefty:a1,righttrigger:a5,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Windows,
+03000000790000004618000000000000,GameCube Controller Adapter,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
030000008f0e00000d31000000000000,GAMEPAD 3 TURBO,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,
03000000280400000140000000000000,GamePad Pro USB,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
03000000ac0500003d03000000000000,GameSir,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,
@@ -119,6 +121,7 @@
030000007d0400000540000000000000,Gravis Eliminator GamePad Pro,a:b1,b:b2,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
03000000341a00000302000000000000,Hama Scorpad,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,
030000000d0f00004900000000000000,Hatsune Miku Sho 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,
+030000001008000001e1000000000000,Havit HV-G60,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b0,platform:Windows,
03000000d81400000862000000000000,HitBox Edition Cthulhu+,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b4,rightshoulder:b7,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows,
03000000632500002605000000000000,HJD-X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
030000000d0f00002d00000000000000,Hori Fighting Commander 3 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
@@ -164,7 +167,8 @@
030000006d04000016c2000000000000,Logitech Dual Action,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,
030000006d04000018c2000000000000,Logitech F510 Gamepad,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,
030000006d04000019c2000000000000,Logitech F710 Gamepad,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,
-030000006d0400001ac2000000000000,Logitech Precision Gamepad,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,leftshoulder:b4,rightshoulder:b5,dpup:-a1,dpdown:+a1,dpleft:-a0,dpright:+a0,lefttrigger:b6,righttrigger:b7,platform:Windows,
+030000006d0400001ac2000000000000,Logitech Precision Gamepad,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
+030000006d0400000ac2000000000000,Logitech WingMan RumblePad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,rightx:a3,righty:a4,x:b3,y:b4,platform:Windows,
03000000380700006652000000000000,Mad Catz C.T.R.L.R,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:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000380700005032000000000000,Mad Catz FightPad PRO (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:Windows,
03000000380700005082000000000000,Mad Catz FightPad PRO (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:Windows,
@@ -193,6 +197,8 @@
03000000380700006382000000000000,MLG GamePad 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,
03000000c62400002a89000000000000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,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,
03000000c62400002b89000000000000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
+03000000c62400001a89000000000000,MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
+03000000c62400001b89000000000000,MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
03000000efbe0000edfe000000000000,Monect Virtual Controller,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:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Windows,
03000000250900006688000000000000,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:Windows,
030000006b140000010c000000000000,NACON GC-400ES,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,
@@ -234,6 +240,7 @@
030000004c050000a00b000000000000,PS4 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,
030000004c050000c405000000000000,PS4 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,
030000004c050000cc09000000000000,PS4 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,
+030000004c050000e60c000000000000,PS5 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,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
03000000300f00000011000000000000,QanBa Arcade JoyStick 1008,a:b1,b:b2,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,start:b10,x:b0,y:b3,platform:Windows,
03000000300f00001611000000000000,QanBa Arcade JoyStick 4018,a:b1,b:b2,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b8,x:b0,y:b3,platform:Windows,
03000000222c00000020000000000000,QANBA DRONE ARCADE JOYSTICK,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,rightshoulder:b5,righttrigger:a4,start:b9,x:b0,y:b3,platform:Windows,
@@ -244,7 +251,6 @@
03000000321500000003000000000000,Razer Hydra,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000321500000204000000000000,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:Windows,
03000000321500000104000000000000,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:Windows,
-03000000321500000810000011010000,Razer Panthera Evo Arcade Stick for PS4,platform:Linux,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b13,start:b9,leftstick:b10,rightstick:b11,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,
03000000321500000507000000000000,Razer Raiju Mobile,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,
03000000321500000707000000000000,Razer Raiju Mobile,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,
03000000321500000011000000000000,Razer Raion Fightpad for 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:Windows,
@@ -259,6 +265,7 @@
030000000d0f00005b00000000000000,Real Arcade Pro.V4,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:Windows,
030000000d0f00005c00000000000000,Real Arcade Pro.V4,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,
03000000790000001100000000000000,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:Windows,
+03000000bd12000013d0000000000000,Retrolink USB SEGA Saturn Classic,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,lefttrigger:b6,rightshoulder:b2,righttrigger:b7,start:b8,x:b3,y:b4,platform:Windows,
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,
@@ -271,8 +278,8 @@
03000000a30600001af5000000000000,Saitek Cyborg,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:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000a306000023f6000000000000,Saitek Cyborg V.1 Game 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:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
03000000300f00001201000000000000,Saitek Dual Analog Pad,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,
-03000000a30600000701000000000000,Saitek P220,a:b2,b:b3,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b5,x:b0,y:b1,platform:Windows,
-03000000a30600000cff000000000000,Saitek P2500 Force Rumble Pad,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,x:b0,y:b1,platform:Windows,
+03000000a30600000701000000000000,Saitek P220,a:b2,b:b3,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,x:b0,y:b1,platform:Windows,
+03000000a30600000cff000000000000,Saitek P2500 Force Rumble Pad,a:b2,b:b3,back:b11,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:b10,x:b0,y:b1,platform:Windows,
03000000a30600000c04000000000000,Saitek P2900,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
03000000300f00001001000000000000,Saitek P480 Rumble Pad,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,
03000000a30600000b04000000000000,Saitek P990,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:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows,
@@ -283,6 +290,8 @@
03000000730700000401000000000000,Sanwa PlayOnline Mobile,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Windows,
0300000000050000289b000000000000,Saturn_Adapter_2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,
030000009b2800000500000000000000,Saturn_Adapter_2.0,a:b1,b:b2,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,
+03000000a30c00002500000000000000,Sega Genesis Mini 3B controller,a:b2,b:b1,start:b9,dpup:-a4,dpdown:+a4,dpleft:-a3,dpright:+a3,righttrigger:b5,platform:Windows,
+03000000a30c00002400000000000000,Sega Mega Drive Mini 6B controller,a:b2,b:b1,start:b9,dpup:-a4,dpdown:+a4,dpleft:-a3,dpright:+a3,rightshoulder:b4,righttrigger:b5,x:b3,y:b0,platform:Windows,
030000005e0400008e02000000007801,ShanWan PS3/PC Wired GamePad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000341a00000208000000000000,SL-6555-SBK,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:-a4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a3,righty:a2,start:b7,x:b2,y:b3,platform:Windows,
03000000341a00000908000000000000,SL-6566,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:Windows,
@@ -328,6 +337,8 @@
030000006f0e00000702000000000000,Victrix Pro Fight Stick for 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:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
0300000034120000adbe000000000000,vJoy Device,a:b0,b:b1,back:b15,dpdown:b6,dpleft:b7,dpright:b8,dpup:b5,guide:b16,leftshoulder:b9,leftstick:b13,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b14,righttrigger:b12,rightx:+a3,righty:+a4,start:b4,x:b2,y:b3,platform:Windows,
030000005e0400000a0b000000000000,Xbox Adaptive Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
+030000005e040000ff02000000007801,Xbox One Elite Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
+030000005e040000130b000000000000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
03000000341a00000608000000000000,Xeox,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,
03000000450c00002043000000000000,XEOX Gamepad SL-6556-BK,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:Windows,
03000000ac0500005b05000000000000,Xiaoji Gamesir-G3w,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,
@@ -338,7 +349,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000120c0000101e000000000000,ZEROPLUS P4 Wired Gamepad,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,
# Mac OS X
-030000008f0e00000300000009010000,2In1 USB Joystick,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftstick:b10,rightstick:b11,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:b6,righttrigger:b7,platform:Mac OS X,
+030000008f0e00000300000009010000,2In1 USB Joystick,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:Mac OS X,
03000000c82d00000090000001000000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00001038000000010000,8BitDo FC30 Pro,a:b1,b:b0,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:b4,y:b3,platform:Mac OS X,
03000000c82d00000650000001000000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Mac OS X,
@@ -355,12 +366,14 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000c82d00000161000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000260000001000000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000261000000010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
-03000000c82d00000031000001000000,8BitDo Wireless Adapter,a:b1,b:b0,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
+03000000c82d00000031000001000000,8BitDo Wireless Adapter,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:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c82d00001890000001000000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a31,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,back:b10,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:b9,x:b2,y:b3,platform:Mac OS X,
+03000000c62400001a89000000010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b14,leftshoulder:b6,leftstick:b15,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b16,righttrigger:a4,rightx:a2,righty:a3,start:b13,x:b3,y:b4,platform:Mac OS X,
+03000000c62400001b89000000010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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:Mac OS X,
03000000d62000002a79000000010000,BDA PS4 Fightpad,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,
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,
@@ -427,6 +440,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000004c050000c405000000000000,PS4 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:Mac OS X,
030000004c050000c405000000010000,PS4 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:Mac OS X,
030000004c050000cc09000000010000,PS4 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:Mac OS X,
+050000004c050000e60c000000010000,PS5 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,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
030000008916000000fd000000000000,Razer Onza TE,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,
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,
@@ -446,6 +460,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000b40400000a01000000000000,Sega Saturn USB Gamepad,a:b0,b:b1,back:b5,guide:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Mac OS X,
030000003512000021ab000000000000,SFC30 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,
0300000000f00000f100000000000000,SNES RetroPort,a:b2,b:b3,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,rightshoulder:b7,start:b6,x:b0,y:b1,platform:Mac OS X,
+030000004c050000e60c000000010000,Sony DualSense,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:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
030000004c050000cc09000000000000,Sony DualShock 4 V2,a:b1,b:b2,back:b13,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,
030000004c050000a00b000000000000,Sony DualShock 4 Wireless Adaptor,a:b1,b:b2,back:b13,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,
03000000d11800000094000000010000,Stadia 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:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X,
@@ -474,6 +489,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000005e040000d102000000000000,Xbox One Wired Controller,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,
030000005e040000dd02000000000000,Xbox One Wired Controller,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,
030000005e040000e302000000000000,Xbox One Wired Controller,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,
+030000005e040000130b000001050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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:Mac OS X,
+030000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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:Mac OS X,
030000005e040000e002000000000000,Xbox Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,
030000005e040000e002000003090000,Xbox Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,
030000005e040000ea02000000000000,Xbox Wireless Controller,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,
@@ -506,12 +523,13 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000c82d00001290000011010000,8BitDo SN30 Pro,a:b1,b:b0,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:b4,y:b3,platform:Linux,
05000000c82d00000161000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00006228000000010000,8BitDo SN30 Pro,a:b1,b:b0,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
-03000000c82d00000260000011010000,8BitDo SN30 Pro+,a:b1,b:b0,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
-05000000c82d00000261000000010000,8BitDo SN30 Pro+,a:b1,b:b0,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
+03000000c82d00000260000011010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
+05000000c82d00000261000000010000,8BitDo SN30 Pro+,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000202800000900000000010000,8BitDo SNES30 Gamepad,a:b1,b:b0,back:b10,dpdown:b122,dpleft:b119,dpright:b120,dpup:b117,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
-030000005e0400008e02000020010000,8BitDo Wireless Adapter,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,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,
-03000000c82d00000031000011010000,8BitDo Wireless Adapter,a:b1,b:b0,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
+030000005e0400008e02000020010000,8BitDo Wireless Adapter (XInput),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,
+03000000c82d00000031000011010000,8BitDo Wireless Adapter (DInput),a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
03000000c82d00001890000011010000,8BitDo Zero 2,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
+050000005e040000e002000030110000,8BitDo Zero 2 (XInput),a:b0,b:b1,back:b6,leftshoulder:b4,rightshoulder:b5,dpup:-a1,dpdown:+a1,dpleft:-a0,dpright:+a0,start:b7,x:b2,y:b3,platform:Linux,
05000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000a00500003232000001000000,8Bitdo Zero GamePad,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux,
05000000a00500003232000008010000,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:Linux,
@@ -521,11 +539,16 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000006f0e00003901000013020000,Afterglow Prismatic Wired Controller 048-007-NA,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,
030000007c1800000006000010010000,Alienware Dual Compatible Game Pad,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:a3,righty:a2,start:b9,x:b0,y:b3,platform:Linux,
-05000000491900000204000021000000,Amazon Fire Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
+05000000491900000204000021000000,Amazon Fire Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b17,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b12,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
+03000000790000003018000011010000,Arcade Fightstick F300,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,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,
+03000000c62400001b89000011010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
03000000d62000002a79000011010000,BDA PS4 Fightpad,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:Linux,
+03000000c21100000791000011010000,Be1 GC101 Controller 1.03 mode,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,
+03000000c31100000791000011010000,Be1 GC101 GAMEPAD 1.03 mode,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
+030000005e0400008e02000003030000,Be1 GC101 Xbox 360 Controller mode,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,
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,
03000000ffff0000ffff000000010000,Chinese-made Xbox Controller,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,
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,
@@ -567,6 +590,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000ad1b000001f5000033050000,Hori Pad EX Turbo 2,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,
030000000d0f00009200000011010000,Hori Pokken Tournament DX Pro Pad,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:Linux,
030000000d0f0000aa00000011010000,HORI Real Arcade Pro,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:Linux,
+030000000d0f0000d800000072056800,HORI Real Arcade Pro S,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
030000000d0f00001600000000010000,Hori Real Arcade Pro.EX-SE (Xbox 360),a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b2,y:b3,platform:Linux,
030000000d0f00006e00000011010000,HORIPAD 4 (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:Linux,
030000000d0f00006600000011010000,HORIPAD 4 (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:Linux,
@@ -592,6 +616,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000242f00002d00000011010000,JYS Wireless Adapter,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:Linux,
03000000242f00008a00000011010000,JYS Wireless Adapter,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Linux,
030000006f0e00000103000000020000,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,
+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:Linux,
030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,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:Linux,
030000006d04000016c2000010010000,Logitech Dual Action,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:Linux,
030000006d04000016c2000011010000,Logitech Dual Action,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:Linux,
@@ -600,10 +625,10 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),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,
030000006d04000019c2000011010000,Logitech F710 Gamepad (DInput),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:Linux,
030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),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,
-030000006d0400000ac2000010010000,Logitech Inc. WingMan RumblePad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b2,rightx:a3,righty:a4,x:b3,y:b4,platform:Linux,
-030000006d04000015c2000010010000,Logitech Logitech Extreme 3D,a:b0,b:b4,back:b6,guide:b8,leftshoulder:b9,leftstick:h0.8,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:h0.2,start:b7,x:b2,y:b5,platform:Linux,
+030000006d0400000ac2000010010000,Logitech Inc. WingMan RumblePad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,rightx:a3,righty:a4,x:b3,y:b4,platform:Linux,
030000006d04000018c2000010010000,Logitech RumblePad 2,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:Linux,
030000006d04000011c2000010010000,Logitech WingMan Cordless RumblePad,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b10,rightx:a3,righty:a4,start:b8,x:b3,y:b4,platform:Linux,
+050000004d4f435554452d3035305800,M54-PC,a:b0,b:b1,x:b3,y:b4,back:b10,start:b11,leftshoulder:b6,rightshoulder:b7,leftstick:b13,rightstick:b14,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,platform:Linux,
05000000380700006652000025010000,Mad Catz C.T.R.L.R ,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,
03000000380700005032000011010000,Mad Catz FightPad PRO (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:Linux,
03000000380700005082000011010000,Mad Catz FightPad PRO (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:Linux,
@@ -635,6 +660,8 @@ 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,
+030000005e040000000b000008040000,Microsoft Xbox One Elite 2 pad - Wired,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,
+030000005e040000ea02000008040000,Microsoft Xbox One S pad - Wired,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,
03000000c62400001a53000000010000,Mini PE,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,
03000000030000000300000002000000,Miroof,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux,
05000000d6200000e589000001000000,Moga 2 HID,a:b0,b:b1,back:b9,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,
@@ -642,12 +669,14 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
05000000d62000007162000001000000,Moga Pro 2 HID,a:b0,b:b1,back:b9,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,
03000000c62400002b89000011010000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
05000000c62400002a89000000010000,MOGA XP5-A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b22,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,
+05000000c62400001a89000000010000,MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
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,
030000006b140000010c000010010000,NACON GC-400ES,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: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,
-060000007e0500000820000000000000,Nintendo Combined Joy-Cons (joycond),a:b0,b:b1,back:b9,dpdown:b15,dpleft:b16,dpright:b17,dpup:b14,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,
+060000007e0500000820000000000000,Nintendo Combined Joy-Cons (joycond),a:b0,b:b1,back:b9,dpdown:b15,dpleft:b16,dpright:b17,dpup:b14,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,
030000007e0500003703000000016800,Nintendo GameCube Controller,a:b0,b:b2,dpdown:b6,dpleft:b4,dpright:b5,dpup:b7,lefttrigger:a4,leftx:a0,lefty:a1~,rightshoulder:b9,righttrigger:a5,rightx:a2,righty:a3~,start:b8,x:b1,y:b3,platform:Linux,
+03000000790000004618000010010000,Nintendo GameCube Controller Adapter,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a5~,righty:a2~,start:b9,x:b0,y:b3,platform:Linux,
050000007e0500000920000001000000,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:Linux,
050000007e0500000920000001800000,Nintendo Switch Pro Controller (joycond),a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,
030000007e0500000920000011810000,Nintendo Switch Pro Controller Wired (joycond),a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,
@@ -666,21 +695,23 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000830500005020000010010000,Padix Co. Ltd. Rockfire PSX/USB Bridge,a:b0,b:b1,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:b2,y:b3,platform:Linux,
03000000790000001c18000011010000,PC Game 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:a3,start:b9,x:b3,y:b0,platform:Linux,
03000000ff1100003133000010010000,PC Game 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:a3,start:b9,x:b3,y:b0,platform:Linux,
-030000006f0e0000b802000001010000,PDP AFTERGLOW Wired Xbox One Controller,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:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux,
+030000006f0e0000b802000001010000,PDP AFTERGLOW Wired Xbox One 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,
+030000006f0e0000b802000013020000,PDP AFTERGLOW Wired Xbox One 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,
030000006f0e00006401000001010000,PDP Battlefield 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,
-030000006f0e00008001000011010000,PDP CO. LTD. Faceoff Wired Pro Controller for Nintendo Switch,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b12,start:b9,leftstick:b10,rightstick:b11,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:b6,righttrigger:b7,platform:Linux,
+030000006f0e00008001000011010000,PDP CO. LTD. Faceoff Wired Pro Controller for Nintendo 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:Linux,
030000006f0e00003101000000010000,PDP EA Sports 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,
030000006f0e0000c802000012010000,PDP Kingdom Hearts 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,
030000006f0e00008701000011010000,PDP Rock Candy Wired Controller for Nintendo Switch,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,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,
030000006f0e00000901000011010000,PDP Versus Fighting Pad,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:Linux,
030000006f0e0000a802000023020000,PDP Wired Controller for Xbox One,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,
030000006f0e00008501000011010000,PDP Wired Fight Pad Pro for Nintendo Switch,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:Linux,
+05000000491900000204000000000000,PG-9118,x:b76,a:b73,b:b74,y:b77,back:b83,start:b84,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b79,lefttrigger:b81,rightshoulder:b80,righttrigger:b82,leftstick:b86,rightstick:b87,leftx:a0,lefty:a1,rightx:a2,righty:a3,platform:Linux,
0500000049190000030400001b010000,PG-9099,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:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
030000004c050000da0c000011010000,Playstation Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
03000000c62400000053000000010000,PowerA,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,
03000000c62400003a54000001010000,PowerA 1428124-01,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,
03000000d62000006dca000011010000,PowerA Pro Ex,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,
-03000000c62400001a58000001010000,PowerA Xbox One Cabled,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux,
+03000000c62400001a58000001010000,PowerA Xbox One Cabled,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,
030000006d040000d2ca000011010000,Precision Controller,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:Linux,
03000000ff1100004133000010010000,PS2 Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
03000000341a00003608000011010000,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:Linux,
@@ -709,6 +740,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
050000004c050000cc09000000010000,PS4 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:Linux,
050000004c050000cc09000000810000,PS4 Controller,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:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
050000004c050000cc09000001800000,PS4 Controller,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:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux,
+030000004c050000e60c000011010000,PS5 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,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
+050000004c050000e60c000000010000,PS5 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,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
03000000300f00001211000011010000,QanBa Arcade JoyStick,a:b2,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b9,x:b1,y:b3,platform:Linux,
030000009b2800003200000001010000,Raphnet Technologies GC/N64 to USB v3.4,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,
030000009b2800006000000001010000,Raphnet Technologies GC/N64 to USB v3.6,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,
@@ -717,6 +750,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000008916000000fd000024010000,Razer Onza Tournament Edition,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,
03000000321500000204000011010000,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:Linux,
03000000321500000104000011010000,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:Linux,
+03000000321500000810000011010000,Razer Panthera Evo Arcade Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,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:Linux,
03000000321500000010000011010000,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:Linux,
03000000321500000507000000010000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,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,
03000000321500000011000011010000,Razer Raion Fightpad for 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:Linux,
@@ -735,14 +769,15 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000006f0e00001e01000011010000,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:Linux,
030000006f0e00004601000001010000,Rock Candy Xbox One Controller,a:b0,b:b1,back:b6,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,
03000000a306000023f6000011010000,Saitek Cyborg V.1 Game 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:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
-03000000a30600000cff000010010000,Saitek P2500 Force Rumble Pad,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,x:b0,y:b1,platform:Linux,
+03000000a30600001005000000010000,Saitek P150,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b2,righttrigger:b5,x:b3,y:b4,platform:Linux,
+03000000a30600000701000000010000,Saitek P220,a:b2,b:b3,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,x:b0,y:b1,platform:Linux,
+03000000a30600000cff000010010000,Saitek P2500 Force Rumble Pad,a:b2,b:b3,back:b11,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:b10,x:b0,y:b1,platform:Linux,
03000000a30600000c04000011010000,Saitek P2900 Wireless Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b12,x:b0,y:b3,platform:Linux,
03000000300f00001201000010010000,Saitek P380,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:Linux,
03000000a30600000901000000010000,Saitek P880,a:b2,b:b3,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,x:b0,y:b1,platform:Linux,
03000000a30600000b04000000010000,Saitek P990 Dual Analog Pad,a:b1,b:b2,back:b9,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:b8,x:b0,y:b3,platform:Linux,
03000000a306000018f5000010010000,Saitek PLC Saitek P3200 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
03000000a306000020f6000011010000,Saitek PS2700 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:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
-03000000a30600001005000000010000,Saitek Saitek P150,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b2,righttrigger:b5,x:b3,y:b4,platform:Linux,
03000000d81d00000e00000010010000,Savior,a:b0,b:b1,back:b8,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,start:b9,x:b4,y:b5,platform:Linux,
03000000c01600008704000011010000,Serial/Keyboard/Mouse/Joystick,a:b12,b:b10,back:b4,dpdown:b2,dpleft:b3,dpright:b1,dpup:b0,leftshoulder:b9,leftstick:b14,lefttrigger:b6,leftx:a1,lefty:a0,rightshoulder:b8,rightstick:b15,righttrigger:b7,rightx:a2,righty:a3,start:b5,x:b13,y:b11,platform:Linux,
03000000f025000021c1000010010000,ShanWan Gioteck PS3 Wired 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:a3,start:b9,x:b3,y:b0,platform:Linux,
@@ -754,15 +789,15 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000005e0400008e02000073050000,Speedlink TORID Wireless Gamepad,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,
030000005e0400008e02000020200000,SpeedLink XEOX Pro Analog Gamepad pad,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,
03000000d11800000094000011010000,Stadia 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:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
-03000000de2800000112000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
-03000000de2800000211000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
-03000000de2800000211000011010000,Steam Controller,a:b2,b:b3,back:b10,dpdown:b18,dpleft:b19,dpright:b20,dpup:b17,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b5,platform:Linux,
+03000000de2800000112000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
+03000000de2800000211000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
+03000000de2800004211000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
03000000de2800004211000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
03000000de2800004211000011010000,Steam Controller,a:b2,b:b3,back:b10,dpdown:b18,dpleft:b19,dpright:b20,dpup:b17,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b5,platform:Linux,
03000000de280000fc11000001000000,Steam Controller,a:b0,b:b1,back:b6,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,
-05000000de2800000212000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
-05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
-05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
+05000000de2800000212000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
+05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
+05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux,
03000000de280000ff11000001000000,Steam Virtual Gamepad,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,
03000000381000003014000075010000,SteelSeries Stratus Duo,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,
03000000381000003114000075010000,SteelSeries Stratus Duo,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,
@@ -774,11 +809,13 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
0300000000f00000f100000000010000,Super RetroPort,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Linux,
03000000457500002211000010010000,SZMY-POWER CO. LTD. 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:Linux,
030000008f0e00000d31000010010000,SZMY-POWER CO. LTD. GAMEPAD 3 TURBO,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,
+030000008f0e00001431000010010000,SZMY-POWER CO. LTD. PS3 gamepad,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b12,start:b9,leftstick:b10,rightstick:b11,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:b6,righttrigger:b7,platform:Linux,
030000004f04000020b3000010010000,Thrustmaster 2 in 1 DT,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:Linux,
030000004f04000015b3000010010000,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:Linux,
030000004f04000023b3000000010000,Thrustmaster Dual Trigger 3-in-1,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:a5,start:b9,x:b0,y:b3,platform:Linux,
030000004f0400000ed0000011010000,ThrustMaster eSwap 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:Linux,
03000000b50700000399000000010000,Thrustmaster Firestorm Digital 2,a:b2,b:b4,back:b11,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b0,righttrigger:b9,start:b1,x:b3,y:b5,platform:Linux,
+030000004f04000003b3000010010000,Thrustmaster Firestorm Dual Analog 2,a:b0,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b9,rightx:a2,righty:a3,x:b1,y:b3,platform:Linux,
030000004f04000000b3000010010000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Linux,
030000004f04000026b3000002040000,Thrustmaster Gamepad GP XID,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,
03000000c6240000025b000002020000,Thrustmaster GPX Gamepad,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,
@@ -815,6 +852,10 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
050000005e040000e002000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
050000005e040000fd02000003090000,Xbox One Wireless Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,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,
030000005e040000ea02000001030000,Xbox One Wireless Controller (Model 1708),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,
+030000005e040000120b000001050000,Xbox Series 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,
+030000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
+050000005e040000130b000001050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
+050000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,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,
030000005e0400008e02000000010000,xbox360 Wireless EasySMX,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,
03000000450c00002043000010010000,XEOX Gamepad SL-6556-BK,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,
03000000ac0500005b05000010010000,Xiaoji Gamesir-G3w,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:Linux,
@@ -823,6 +864,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
xinput,XInput 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,
03000000120c0000100e000011010000,ZEROPLUS P4 Gamepad,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:Linux,
03000000120c0000101e000011010000,ZEROPLUS P4 Wired Gamepad,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:Linux,
+03000000c0160000dc27000001010000,OnyxSoft Dual JoyDivision,platform:Linux,a:b0,b:b1,x:b2,y:b3,start:b6,leftshoulder:b4,rightshoulder:b5,dpup:-a1,dpdown:+a1,dpleft:-a0,dpright:+a0,
# Android
05000000c82d000006500000ffff3f00,8BitDo M30 Gamepad,a:b1,b:b0,back:b4,guide:b17,leftshoulder:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a4,start:b6,x:b3,y:b2,platform:Android,
@@ -857,20 +899,27 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
050000004c05000068020000dfff3f00,PS3 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
030000004c050000cc09000000006800,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000004c050000c4050000fffe3f00,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android,
+050000004c050000c4050000ffff3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000004c050000cc090000fffe3f00,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android,
050000004c050000cc090000ffff3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
35643031303033326130316330353564,PS4 Controller,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android,
+050000004c050000e60c0000fffe3f00,PS5 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android,
62653861643333663663383332396665,Razer Kishi,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000003215000005070000ffff3f00,Razer Raiju Mobile,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000003215000007070000ffff3f00,Razer Raiju Mobile,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000003215000000090000bf7f3f00,Razer Serval,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android,
+32633532643734376632656664383733,Sony DualSense,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android,
+61303162353165316365336436343139,Sony DualSense,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android,
05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Android,
05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Android,
050000004f0400000ed00000fffe3f00,ThrustMaster eSwap PRO Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
5477696e20555342204a6f7973746963,Twin USB Joystick,a:b22,b:b21,back:b28,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,leftstick:b30,lefttrigger:b24,leftx:a0,lefty:a1,rightshoulder:b27,rightstick:b31,righttrigger:b25,rightx:a3,righty:a2,start:b29,x:b23,y:b20,platform:Android,
30306539356238653637313730656134,Wireless HORIPAD Switch Pro Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b19,y:b2,platform:Android,
+050000005e040000fd020000ff7f3f00,Xbox One S Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005e040000e00200000ffe3f00,Xbox One Wireless Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b17,y:b2,platform:Android,
050000005e040000fd020000ffff3f00,Xbox One Wireless Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
+050000005e040000130b0000ffff3f00,Xbox Series Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
+65633038363832353634653836396239,Xbox Series Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android,
050000005e04000091020000ff073f00,Xbox Wireless Controller,a:b0,b:b1,back:b4,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android,
34356136633366613530316338376136,Xbox Wireless Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,x:b17,y:b2,platform:Android,
050000001727000044310000ffff3f00,XiaoMi Game Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a6,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Android,
@@ -879,13 +928,20 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
05000000ac0500000100000000006d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,platform:iOS,
05000000ac050000010000004f066d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,platform:iOS,
05000000ac05000001000000cf076d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,platform:iOS,
+05000000ac05000001000000df076d01,*,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS,
+05000000ac05000001000000ff076d01,*,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS,
05000000ac0500000200000000006d02,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,rightshoulder:b5,x:b2,y:b3,platform:iOS,
05000000ac050000020000004f066d02,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,rightshoulder:b5,x:b2,y:b3,platform:iOS,
-050000004c050000cc090000df070000,DUALSHOCK 4 Wireless Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS,
4d466947616d65706164010000000000,MFi Extended Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:iOS,
4d466947616d65706164020000000000,MFi Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b6,x:b2,y:b3,platform:iOS,
+050000004c050000cc090000df070000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS,
+050000004c050000cc090000ff070000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS,
+050000004c050000cc090000ff876d01,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,,platform:iOS,
+050000004c050000cc090000ff870001,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,touchpad:b11,x:b2,y:b3,platform:iOS,
05000000ac0500000300000000006d03,Remote,a:b0,b:b2,leftx:a0,lefty:a1,platform:iOS,
05000000ac0500000300000043006d03,Remote,a:b0,b:b2,leftx:a0,lefty:a1,platform:iOS,
05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:iOS,
05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:iOS,
+050000005e040000050b0000ff070001,Xbox Elite Wireless Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS,
050000005e040000e0020000df070000,Xbox Wireless Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS,
+050000005e040000e0020000ff070000,Xbox Wireless Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS,
diff --git a/core/input/godotcontrollerdb.txt b/core/input/godotcontrollerdb.txt
index e8e250e3be..c43cd6c8ac 100644
--- a/core/input/godotcontrollerdb.txt
+++ b/core/input/godotcontrollerdb.txt
@@ -22,6 +22,12 @@ MacOSX045e028e,Xbox 360 Wired Controller,a:b11,b:b12,y:b14,x:b13,start:b4,back:b
MacOSX045e02d1,Xbox One Controller,a:b11,b:b12,y:b14,x:b13,start:b4,back:b5,leftstick:b6,rightstick:b7,leftshoulder:b8,rightshoulder:b9,dpup:b0,dpleft:b2,dpdown:b1,dpright:b3,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,platform:Javascript
MacOSX045e02ea,Xbox One S Controller,a:b11,b:b12,y:b14,x:b13,start:b4,back:b5,leftstick:b6,rightstick:b7,leftshoulder:b8,rightshoulder:b9,dpup:b0,dpleft:b2,dpdown:b1,dpright:b3,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,platform:Javascript
MacOSX045e0b12,Xbox Series X Controller,a:b11,b:b12,y:b14,x:b13,start:b4,back:b5,leftstick:b6,rightstick:b7,leftshoulder:b8,rightshoulder:b9,dpup:b0,dpleft:b2,dpdown:b1,dpright:b3,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,platform:Javascript
+Linux15320a14,Razer Wolverine Ultimate,a:b0,b:b1,y:b3,x:b2,start:b7,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:-a7,dpleft:-a6,dpdown:+a7,dpright:+a6,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Javascript
+Linux05832060,iBuffalo BSGP801,a:b1,b:b0,y:b2,x:b3,start:b7,back:b6,leftshoulder:b4,rightshoulder:b5,dpup:-a1,dpleft:-a0,dpdown:+a1,dpright:+a0,platform:Javascript
+MacOSX05832060,iBuffalo BSGP801,a:b1,b:b0,y:b2,x:b3,start:b7,back:b6,leftshoulder:b4,rightshoulder:b5,dpup:-a1,dpleft:-a0,dpdown:+a1,dpright:+a0,platform:Javascript
+Linux0e8f3013,HuiJia USB GamePad,a:b2,b:b1,y:b0,x:b3,start:b9,back:b8,leftshoulder:b6,rightshoulder:b7,dpup:-a1,dpleft:-a0,dpdown:+a1,dpright:+a0,platform:Javascript
+Windows0e8f3013,HuiJia USB GamePad,a:b2,b:b1,y:b0,x:b3,start:b9,back:b8,leftshoulder:b6,rightshoulder:b7,dpup:-a1,dpleft:-a0,dpdown:+a1,dpright:+a0,platform:Javascript
+MacOSX0e8f3013,HuiJia USB GamePad,a:b2,b:b1,y:b0,x:b3,start:b9,back:b8,leftshoulder:b6,rightshoulder:b7,dpup:-a4,dpleft:-a3,dpdown:+a4,dpright:+a3,platform:Javascript
# UWP
__UWP_GAMEPAD__,Xbox Controller,a:b2,b:b3,x:b4,y:b5,start:b0,back:b1,leftstick:b12,rightstick:b13,leftshoulder:b10,rightshoulder:b11,dpup:b6,dpdown:b7,dpleft:b8,dpright:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,platform:UWP,
diff --git a/core/input/input.cpp b/core/input/input.cpp
index 2e3f112ebc..90d96e3876 100644
--- a/core/input/input.cpp
+++ b/core/input/input.cpp
@@ -55,6 +55,12 @@ static const char *_joy_buttons[JOY_BUTTON_SDL_MAX] = {
"dpdown",
"dpleft",
"dpright",
+ "misc1",
+ "paddle1",
+ "paddle2",
+ "paddle3",
+ "paddle4",
+ "touchpad",
};
static const char *_joy_axes[JOY_AXIS_SDL_MAX] = {
@@ -91,11 +97,11 @@ void Input::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_key_pressed", "keycode"), &Input::is_key_pressed);
ClassDB::bind_method(D_METHOD("is_mouse_button_pressed", "button"), &Input::is_mouse_button_pressed);
ClassDB::bind_method(D_METHOD("is_joy_button_pressed", "device", "button"), &Input::is_joy_button_pressed);
- ClassDB::bind_method(D_METHOD("is_action_pressed", "action"), &Input::is_action_pressed);
- ClassDB::bind_method(D_METHOD("is_action_just_pressed", "action"), &Input::is_action_just_pressed);
- ClassDB::bind_method(D_METHOD("is_action_just_released", "action"), &Input::is_action_just_released);
- ClassDB::bind_method(D_METHOD("get_action_strength", "action"), &Input::get_action_strength);
- ClassDB::bind_method(D_METHOD("get_action_raw_strength", "action"), &Input::get_action_strength);
+ ClassDB::bind_method(D_METHOD("is_action_pressed", "action", "exact"), &Input::is_action_pressed, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("is_action_just_pressed", "action", "exact"), &Input::is_action_just_pressed, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("is_action_just_released", "action", "exact"), &Input::is_action_just_released, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("get_action_strength", "action", "exact"), &Input::get_action_strength, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("get_action_raw_strength", "action", "exact"), &Input::get_action_strength, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_axis", "negative_action", "positive_action"), &Input::get_axis);
ClassDB::bind_method(D_METHOD("get_vector", "negative_x", "positive_x", "negative_y", "positive_y", "deadzone"), &Input::get_vector, DEFVAL(-1.0f));
ClassDB::bind_method(D_METHOD("add_joy_mapping", "mapping", "update_existing"), &Input::add_joy_mapping, DEFVAL(false));
@@ -234,16 +240,20 @@ bool Input::is_joy_button_pressed(int p_device, int p_button) const {
return joy_buttons_pressed.has(_combine_device(p_button, p_device));
}
-bool Input::is_action_pressed(const StringName &p_action) const {
- return action_state.has(p_action) && action_state[p_action].pressed;
+bool Input::is_action_pressed(const StringName &p_action, bool p_exact) const {
+ return action_state.has(p_action) && action_state[p_action].pressed && (p_exact ? action_state[p_action].exact : true);
}
-bool Input::is_action_just_pressed(const StringName &p_action) const {
+bool Input::is_action_just_pressed(const StringName &p_action, bool p_exact) const {
const Map<StringName, Action>::Element *E = action_state.find(p_action);
if (!E) {
return false;
}
+ if (p_exact && E->get().exact == false) {
+ return false;
+ }
+
if (Engine::get_singleton()->is_in_physics_frame()) {
return E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames();
} else {
@@ -251,12 +261,16 @@ bool Input::is_action_just_pressed(const StringName &p_action) const {
}
}
-bool Input::is_action_just_released(const StringName &p_action) const {
+bool Input::is_action_just_released(const StringName &p_action, bool p_exact) const {
const Map<StringName, Action>::Element *E = action_state.find(p_action);
if (!E) {
return false;
}
+ if (p_exact && E->get().exact == false) {
+ return false;
+ }
+
if (Engine::get_singleton()->is_in_physics_frame()) {
return !E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames();
} else {
@@ -264,21 +278,29 @@ bool Input::is_action_just_released(const StringName &p_action) const {
}
}
-float Input::get_action_strength(const StringName &p_action) const {
+float Input::get_action_strength(const StringName &p_action, bool p_exact) const {
const Map<StringName, Action>::Element *E = action_state.find(p_action);
if (!E) {
return 0.0f;
}
+ if (p_exact && E->get().exact == false) {
+ return 0.0f;
+ }
+
return E->get().strength;
}
-float Input::get_action_raw_strength(const StringName &p_action) const {
+float Input::get_action_raw_strength(const StringName &p_action, bool p_exact) const {
const Map<StringName, Action>::Element *E = action_state.find(p_action);
if (!E) {
return 0.0f;
}
+ if (p_exact && E->get().exact == false) {
+ return 0.0f;
+ }
+
return E->get().raw_strength;
}
@@ -582,20 +604,21 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
}
}
- for (const Map<StringName, InputMap::Action>::Element *E = InputMap::get_singleton()->get_action_map().front(); E; E = E->next()) {
- if (InputMap::get_singleton()->event_is_action(p_event, E->key())) {
- // Save the action's state
- if (!p_event->is_echo() && is_action_pressed(E->key()) != p_event->is_action_pressed(E->key())) {
+ for (OrderedHashMap<StringName, InputMap::Action>::ConstElement E = InputMap::get_singleton()->get_action_map().front(); E; E = E.next()) {
+ if (InputMap::get_singleton()->event_is_action(p_event, E.key())) {
+ // If not echo and action pressed state has changed
+ if (!p_event->is_echo() && is_action_pressed(E.key(), false) != p_event->is_action_pressed(E.key())) {
Action action;
action.physics_frame = Engine::get_singleton()->get_physics_frames();
action.process_frame = Engine::get_singleton()->get_process_frames();
- action.pressed = p_event->is_action_pressed(E->key());
+ action.pressed = p_event->is_action_pressed(E.key());
action.strength = 0.0f;
action.raw_strength = 0.0f;
- action_state[E->key()] = action;
+ action.exact = InputMap::get_singleton()->event_is_action(p_event, E.key(), true);
+ action_state[E.key()] = action;
}
- action_state[E->key()].strength = p_event->get_action_strength(E->key());
- action_state[E->key()].raw_strength = p_event->get_action_raw_strength(E->key());
+ action_state[E.key()].strength = p_event->get_action_strength(E.key());
+ action_state[E.key()].raw_strength = p_event->get_action_raw_strength(E.key());
}
}
diff --git a/core/input/input.h b/core/input/input.h
index 445b7ff0cf..0e3af42381 100644
--- a/core/input/input.h
+++ b/core/input/input.h
@@ -116,6 +116,7 @@ private:
uint64_t physics_frame;
uint64_t process_frame;
bool pressed;
+ bool exact;
float strength;
float raw_strength;
};
@@ -261,11 +262,11 @@ public:
bool is_key_pressed(int p_keycode) const;
bool is_mouse_button_pressed(int p_button) const;
bool is_joy_button_pressed(int p_device, int p_button) const;
- bool is_action_pressed(const StringName &p_action) const;
- bool is_action_just_pressed(const StringName &p_action) const;
- bool is_action_just_released(const StringName &p_action) const;
- float get_action_strength(const StringName &p_action) const;
- float get_action_raw_strength(const StringName &p_action) const;
+ bool is_action_pressed(const StringName &p_action, bool p_exact = false) const;
+ bool is_action_just_pressed(const StringName &p_action, bool p_exact = false) const;
+ bool is_action_just_released(const StringName &p_action, bool p_exact = false) const;
+ float get_action_strength(const StringName &p_action, bool p_exact = false) const;
+ float get_action_raw_strength(const StringName &p_action, bool p_exact = false) const;
float get_axis(const StringName &p_negative_action, const StringName &p_positive_action) const;
Vector2 get_vector(const StringName &p_negative_x, const StringName &p_positive_x, const StringName &p_negative_y, const StringName &p_positive_y, float p_deadzone = -1.0f) const;
diff --git a/core/input/input_event.cpp b/core/input/input_event.cpp
index 2771a15b80..c6910d2b1f 100644
--- a/core/input/input_event.cpp
+++ b/core/input/input_event.cpp
@@ -44,31 +44,31 @@ int InputEvent::get_device() const {
return device;
}
-bool InputEvent::is_action(const StringName &p_action) const {
- return InputMap::get_singleton()->event_is_action(Ref<InputEvent>((InputEvent *)this), p_action);
+bool InputEvent::is_action(const StringName &p_action, bool p_exact_match) const {
+ return InputMap::get_singleton()->event_is_action(Ref<InputEvent>((InputEvent *)this), p_action, p_exact_match);
}
-bool InputEvent::is_action_pressed(const StringName &p_action, bool p_allow_echo) const {
+bool InputEvent::is_action_pressed(const StringName &p_action, bool p_allow_echo, bool p_exact_match) const {
bool pressed;
- bool valid = InputMap::get_singleton()->event_get_action_status(Ref<InputEvent>((InputEvent *)this), p_action, &pressed);
+ bool valid = InputMap::get_singleton()->event_get_action_status(Ref<InputEvent>((InputEvent *)this), p_action, p_exact_match, &pressed, nullptr, nullptr);
return valid && pressed && (p_allow_echo || !is_echo());
}
-bool InputEvent::is_action_released(const StringName &p_action) const {
+bool InputEvent::is_action_released(const StringName &p_action, bool p_exact_match) const {
bool pressed;
- bool valid = InputMap::get_singleton()->event_get_action_status(Ref<InputEvent>((InputEvent *)this), p_action, &pressed);
+ bool valid = InputMap::get_singleton()->event_get_action_status(Ref<InputEvent>((InputEvent *)this), p_action, p_exact_match, &pressed, nullptr, nullptr);
return valid && !pressed;
}
-float InputEvent::get_action_strength(const StringName &p_action) const {
+float InputEvent::get_action_strength(const StringName &p_action, bool p_exact_match) const {
float strength;
- bool valid = InputMap::get_singleton()->event_get_action_status(Ref<InputEvent>((InputEvent *)this), p_action, nullptr, &strength);
+ bool valid = InputMap::get_singleton()->event_get_action_status(Ref<InputEvent>((InputEvent *)this), p_action, p_exact_match, nullptr, &strength, nullptr);
return valid ? strength : 0.0f;
}
-float InputEvent::get_action_raw_strength(const StringName &p_action) const {
+float InputEvent::get_action_raw_strength(const StringName &p_action, bool p_exact_match) const {
float raw_strength;
- bool valid = InputMap::get_singleton()->event_get_action_status(Ref<InputEvent>((InputEvent *)this), p_action, nullptr, nullptr, &raw_strength);
+ bool valid = InputMap::get_singleton()->event_get_action_status(Ref<InputEvent>((InputEvent *)this), p_action, p_exact_match, nullptr, nullptr, &raw_strength);
return valid ? raw_strength : 0.0f;
}
@@ -100,10 +100,10 @@ void InputEvent::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_device", "device"), &InputEvent::set_device);
ClassDB::bind_method(D_METHOD("get_device"), &InputEvent::get_device);
- ClassDB::bind_method(D_METHOD("is_action", "action"), &InputEvent::is_action);
- ClassDB::bind_method(D_METHOD("is_action_pressed", "action", "allow_echo"), &InputEvent::is_action_pressed, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("is_action_released", "action"), &InputEvent::is_action_released);
- ClassDB::bind_method(D_METHOD("get_action_strength", "action"), &InputEvent::get_action_strength);
+ ClassDB::bind_method(D_METHOD("is_action", "action", "exact_match"), &InputEvent::is_action, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("is_action_pressed", "action", "allow_echo", "exact_match"), &InputEvent::is_action_pressed, DEFVAL(false), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("is_action_released", "action", "exact_match"), &InputEvent::is_action_released, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("get_action_strength", "action", "exact_match"), &InputEvent::get_action_strength, DEFVAL(false));
ClassDB::bind_method(D_METHOD("is_pressed"), &InputEvent::is_pressed);
ClassDB::bind_method(D_METHOD("is_echo"), &InputEvent::is_echo);
@@ -384,6 +384,31 @@ String InputEventKey::to_string() {
return vformat("InputEventKey: keycode=%s mods=%s physical=%s pressed=%s echo=%s", kc, mods, physical, p, e);
}
+Ref<InputEventKey> InputEventKey::create_reference(uint32_t p_keycode) {
+ Ref<InputEventKey> ie;
+ ie.instance();
+ ie->set_keycode(p_keycode & KEY_CODE_MASK);
+ ie->set_unicode(p_keycode & KEY_CODE_MASK);
+
+ if (p_keycode & KEY_MASK_SHIFT) {
+ ie->set_shift(true);
+ }
+ if (p_keycode & KEY_MASK_ALT) {
+ ie->set_alt(true);
+ }
+ if (p_keycode & KEY_MASK_CTRL) {
+ ie->set_control(true);
+ }
+ if (p_keycode & KEY_MASK_CMD) {
+ ie->set_command(true);
+ }
+ if (p_keycode & KEY_MASK_META) {
+ ie->set_metakey(true);
+ }
+
+ return ie;
+}
+
bool InputEventKey::action_match(const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength, float *p_raw_strength, float p_deadzone) const {
Ref<InputEventKey> key = p_event;
if (key.is_null()) {
@@ -985,6 +1010,12 @@ static const char *_joy_button_descriptions[JOY_BUTTON_SDL_MAX] = {
TTRC("D-pad Down"),
TTRC("D-pad Left"),
TTRC("D-pad Right"),
+ TTRC("Xbox Share, PS5 Microphone, Nintendo Capture"),
+ TTRC("Xbox Paddle 1"),
+ TTRC("Xbox Paddle 2"),
+ TTRC("Xbox Paddle 3"),
+ TTRC("Xbox Paddle 4"),
+ TTRC("PS4/5 Touchpad"),
};
String InputEventJoypadButton::as_text() const {
@@ -1005,6 +1036,14 @@ String InputEventJoypadButton::to_string() {
return "InputEventJoypadButton : button_index=" + itos(button_index) + ", pressed=" + (pressed ? "true" : "false") + ", pressure=" + String(Variant(pressure));
}
+Ref<InputEventJoypadButton> InputEventJoypadButton::create_reference(int p_btn_index) {
+ Ref<InputEventJoypadButton> ie;
+ ie.instance();
+ ie->set_button_index(p_btn_index);
+
+ return ie;
+}
+
void InputEventJoypadButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_button_index", "button_index"), &InputEventJoypadButton::set_button_index);
ClassDB::bind_method(D_METHOD("get_button_index"), &InputEventJoypadButton::get_button_index);
diff --git a/core/input/input_event.h b/core/input/input_event.h
index 1500faa24c..df81b9fc75 100644
--- a/core/input/input_event.h
+++ b/core/input/input_event.h
@@ -76,7 +76,13 @@ enum JoyButtonList {
JOY_BUTTON_DPAD_DOWN = 12,
JOY_BUTTON_DPAD_LEFT = 13,
JOY_BUTTON_DPAD_RIGHT = 14,
- JOY_BUTTON_SDL_MAX = 15,
+ JOY_BUTTON_MISC1 = 15,
+ JOY_BUTTON_PADDLE1 = 16,
+ JOY_BUTTON_PADDLE2 = 17,
+ JOY_BUTTON_PADDLE3 = 18,
+ JOY_BUTTON_PADDLE4 = 19,
+ JOY_BUTTON_TOUCHPAD = 20,
+ JOY_BUTTON_SDL_MAX = 21,
JOY_BUTTON_MAX = 36, // Android supports up to 36 buttons.
};
@@ -122,11 +128,11 @@ public:
void set_device(int p_device);
int get_device() const;
- bool is_action(const StringName &p_action) const;
- bool is_action_pressed(const StringName &p_action, bool p_allow_echo = false) const;
- bool is_action_released(const StringName &p_action) const;
- float get_action_strength(const StringName &p_action) const;
- float get_action_raw_strength(const StringName &p_action) const;
+ bool is_action(const StringName &p_action, bool p_exact_match = false) const;
+ bool is_action_pressed(const StringName &p_action, bool p_allow_echo = false, bool p_exact_match = false) const;
+ bool is_action_released(const StringName &p_action, bool p_exact_match = false) const;
+ float get_action_strength(const StringName &p_action, bool p_exact_match = false) const;
+ float get_action_raw_strength(const StringName &p_action, bool p_exact_match = false) const;
// To be removed someday, since they do not make sense for all events
virtual bool is_pressed() const;
@@ -254,6 +260,8 @@ public:
virtual String as_text() const override;
virtual String to_string() override;
+ static Ref<InputEventKey> create_reference(uint32_t p_keycode_with_modifier_masks);
+
InputEventKey() {}
};
@@ -400,6 +408,8 @@ public:
virtual String as_text() const override;
virtual String to_string() override;
+ static Ref<InputEventJoypadButton> create_reference(int p_btn_index);
+
InputEventJoypadButton() {}
};
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp
index 53ed925c1f..b31c431ead 100644
--- a/core/input/input_map.cpp
+++ b/core/input/input_map.cpp
@@ -50,7 +50,7 @@ void InputMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("action_erase_event", "action", "event"), &InputMap::action_erase_event);
ClassDB::bind_method(D_METHOD("action_erase_events", "action"), &InputMap::action_erase_events);
ClassDB::bind_method(D_METHOD("action_get_events", "action"), &InputMap::_action_get_events);
- ClassDB::bind_method(D_METHOD("event_is_action", "event", "action"), &InputMap::event_is_action);
+ ClassDB::bind_method(D_METHOD("event_is_action", "event", "action", "exact_match"), &InputMap::event_is_action, DEFVAL(false));
ClassDB::bind_method(D_METHOD("load_from_project_settings"), &InputMap::load_from_project_settings);
}
@@ -88,14 +88,14 @@ List<StringName> InputMap::get_actions() const {
return actions;
}
- for (Map<StringName, Action>::Element *E = input_map.front(); E; E = E->next()) {
- actions.push_back(E->key());
+ for (OrderedHashMap<StringName, Action>::Element E = input_map.front(); E; E = E.next()) {
+ actions.push_back(E.key());
}
return actions;
}
-List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength, float *p_raw_strength) const {
+List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool p_exact_match, bool *p_pressed, float *p_strength, float *p_raw_strength) const {
ERR_FAIL_COND_V(!p_event.is_valid(), nullptr);
for (List<Ref<InputEvent>>::Element *E = p_action.inputs.front(); E; E = E->next()) {
@@ -106,7 +106,9 @@ List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Re
int device = e->get_device();
if (device == ALL_DEVICES || device == p_event->get_device()) {
- if (e->action_match(p_event, p_pressed, p_strength, p_raw_strength, p_action.deadzone)) {
+ if (p_exact_match && e->shortcut_match(p_event)) {
+ return E;
+ } else if (!p_exact_match && e->action_match(p_event, p_pressed, p_strength, p_raw_strength, p_action.deadzone)) {
return E;
}
}
@@ -134,7 +136,7 @@ void InputMap::action_set_deadzone(const StringName &p_action, float p_deadzone)
void InputMap::action_add_event(const StringName &p_action, const Ref<InputEvent> &p_event) {
ERR_FAIL_COND_MSG(p_event.is_null(), "It's not a reference to a valid InputEvent object.");
ERR_FAIL_COND_MSG(!input_map.has(p_action), "Request for nonexistent InputMap action '" + String(p_action) + "'.");
- if (_find_event(input_map[p_action], p_event)) {
+ if (_find_event(input_map[p_action], p_event, true)) {
return; // Already addded.
}
@@ -143,13 +145,13 @@ void InputMap::action_add_event(const StringName &p_action, const Ref<InputEvent
bool InputMap::action_has_event(const StringName &p_action, const Ref<InputEvent> &p_event) {
ERR_FAIL_COND_V_MSG(!input_map.has(p_action), false, "Request for nonexistent InputMap action '" + String(p_action) + "'.");
- return (_find_event(input_map[p_action], p_event) != nullptr);
+ return (_find_event(input_map[p_action], p_event, true) != nullptr);
}
void InputMap::action_erase_event(const StringName &p_action, const Ref<InputEvent> &p_event) {
ERR_FAIL_COND_MSG(!input_map.has(p_action), "Request for nonexistent InputMap action '" + String(p_action) + "'.");
- List<Ref<InputEvent>>::Element *E = _find_event(input_map[p_action], p_event);
+ List<Ref<InputEvent>>::Element *E = _find_event(input_map[p_action], p_event, true);
if (E) {
input_map[p_action].inputs.erase(E);
if (Input::get_singleton()->is_action_pressed(p_action)) {
@@ -177,20 +179,20 @@ Array InputMap::_action_get_events(const StringName &p_action) {
}
const List<Ref<InputEvent>> *InputMap::action_get_events(const StringName &p_action) {
- const Map<StringName, Action>::Element *E = input_map.find(p_action);
+ const OrderedHashMap<StringName, Action>::Element E = input_map.find(p_action);
if (!E) {
return nullptr;
}
- return &E->get().inputs;
+ return &E.get().inputs;
}
-bool InputMap::event_is_action(const Ref<InputEvent> &p_event, const StringName &p_action) const {
- return event_get_action_status(p_event, p_action);
+bool InputMap::event_is_action(const Ref<InputEvent> &p_event, const StringName &p_action, bool p_exact_match) const {
+ return event_get_action_status(p_event, p_action, p_exact_match);
}
-bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const StringName &p_action, bool *p_pressed, float *p_strength, float *p_raw_strength) const {
- Map<StringName, Action>::Element *E = input_map.find(p_action);
+bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const StringName &p_action, bool p_exact_match, bool *p_pressed, float *p_strength, float *p_raw_strength) const {
+ OrderedHashMap<StringName, Action>::Element E = input_map.find(p_action);
ERR_FAIL_COND_V_MSG(!E, false, "Request for nonexistent InputMap action '" + String(p_action) + "'.");
Ref<InputEventAction> input_event_action = p_event;
@@ -207,7 +209,7 @@ bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const Str
bool pressed;
float strength;
float raw_strength;
- List<Ref<InputEvent>>::Element *event = _find_event(E->get(), p_event, &pressed, &strength, &raw_strength);
+ List<Ref<InputEvent>>::Element *event = _find_event(E.get(), p_event, p_exact_match, &pressed, &strength, &raw_strength);
if (event != nullptr) {
if (p_pressed != nullptr) {
*p_pressed = pressed;
@@ -224,7 +226,7 @@ bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const Str
}
}
-const Map<StringName, InputMap::Action> &InputMap::get_action_map() const {
+const OrderedHashMap<StringName, InputMap::Action> &InputMap::get_action_map() const {
return input_map;
}
@@ -258,84 +260,444 @@ void InputMap::load_from_project_settings() {
}
}
+struct _BuiltinActionDisplayName {
+ const char *name;
+ const char *display_name;
+};
+
+static const _BuiltinActionDisplayName _builtin_action_display_names[] = {
+ /* clang-format off */
+ { "ui_accept", TTRC("Accept") },
+ { "ui_select", TTRC("Select") },
+ { "ui_cancel", TTRC("Cancel") },
+ { "ui_focus_next", TTRC("Focus Next") },
+ { "ui_focus_prev", TTRC("Focus Prev") },
+ { "ui_left", TTRC("Left") },
+ { "ui_right", TTRC("Right") },
+ { "ui_up", TTRC("Up") },
+ { "ui_down", TTRC("Down") },
+ { "ui_page_up", TTRC("Page Up") },
+ { "ui_page_down", TTRC("Page Down") },
+ { "ui_home", TTRC("Home") },
+ { "ui_end", TTRC("End") },
+ { "ui_cut", TTRC("Cut") },
+ { "ui_copy", TTRC("Copy") },
+ { "ui_paste", TTRC("Paste") },
+ { "ui_undo", TTRC("Undo") },
+ { "ui_redo", TTRC("Redo") },
+ { "ui_text_completion_query", TTRC("Completion Query") },
+ { "ui_text_newline", TTRC("New Line") },
+ { "ui_text_newline_blank", TTRC("New Blank Line") },
+ { "ui_text_newline_above", TTRC("New Line Above") },
+ { "ui_text_indent", TTRC("Indent") },
+ { "ui_text_dedent", TTRC("Dedent") },
+ { "ui_text_backspace", TTRC("Backspace") },
+ { "ui_text_backspace_word", TTRC("Backspace Word") },
+ { "ui_text_backspace_word.OSX", TTRC("Backspace Word") },
+ { "ui_text_backspace_all_to_left", TTRC("Backspace all to Left") },
+ { "ui_text_backspace_all_to_left.OSX", TTRC("Backspace all to Left") },
+ { "ui_text_delete", TTRC("Delete") },
+ { "ui_text_delete_word", TTRC("Delete Word") },
+ { "ui_text_delete_word.OSX", TTRC("Delete Word") },
+ { "ui_text_delete_all_to_right", TTRC("Delete all to Right") },
+ { "ui_text_delete_all_to_right.OSX", TTRC("Delete all to Right") },
+ { "ui_text_caret_left", TTRC("Caret Left") },
+ { "ui_text_caret_word_left", TTRC("Caret Word Left") },
+ { "ui_text_caret_word_left.OSX", TTRC("Caret Word Left") },
+ { "ui_text_caret_right", TTRC("Caret Right") },
+ { "ui_text_caret_word_right", TTRC("Caret Word Right") },
+ { "ui_text_caret_word_right.OSX", TTRC("Caret Word Right") },
+ { "ui_text_caret_up", TTRC("Caret Up") },
+ { "ui_text_caret_down", TTRC("Caret Down") },
+ { "ui_text_caret_line_start", TTRC("Caret Line Start") },
+ { "ui_text_caret_line_start.OSX", TTRC("Caret Line Start") },
+ { "ui_text_caret_line_end", TTRC("Caret Line End") },
+ { "ui_text_caret_line_end.OSX", TTRC("Caret Line End") },
+ { "ui_text_caret_page_up", TTRC("Caret Page Up") },
+ { "ui_text_caret_page_down", TTRC("Caret Page Down") },
+ { "ui_text_caret_document_start", TTRC("Caret Document Start") },
+ { "ui_text_caret_document_start.OSX", TTRC("Caret Document Start") },
+ { "ui_text_caret_document_end", TTRC("Caret Document End") },
+ { "ui_text_caret_document_end.OSX", TTRC("Caret Document End") },
+ { "ui_text_scroll_up", TTRC("Scroll Up") },
+ { "ui_text_scroll_up.OSX", TTRC("Scroll Up") },
+ { "ui_text_scroll_down", TTRC("Scroll Down") },
+ { "ui_text_scroll_down.OSX", TTRC("Scroll Down") },
+ { "ui_text_select_all", TTRC("Select All") },
+ { "ui_text_toggle_insert_mode", TTRC("Toggle Insert Mode") },
+ { "ui_graph_duplicate", TTRC("Duplicate Nodes") },
+ { "ui_graph_delete", TTRC("Delete Nodes") },
+ { "ui_filedialog_up_one_level", TTRC("Go Up One Level") },
+ { "ui_filedialog_refresh", TTRC("Refresh") },
+ { "ui_filedialog_show_hidden", TTRC("Show Hidden") },
+ { "ui_swap_input_direction ", TTRC("Swap Input Direction") },
+ { "", TTRC("")}
+ /* clang-format on */
+};
+
+String InputMap::get_builtin_display_name(const String &p_name) const {
+ int len = sizeof(_builtin_action_display_names) / sizeof(_BuiltinActionDisplayName);
+
+ for (int i = 0; i < len; i++) {
+ if (_builtin_action_display_names[i].name == p_name) {
+ return RTR(_builtin_action_display_names[i].display_name);
+ }
+ }
+
+ return p_name;
+}
+
+const OrderedHashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
+ // Return cache if it has already been built.
+ if (default_builtin_cache.size()) {
+ return default_builtin_cache;
+ }
+
+ List<Ref<InputEvent>> inputs;
+ inputs.push_back(InputEventKey::create_reference(KEY_ENTER));
+ inputs.push_back(InputEventKey::create_reference(KEY_KP_ENTER));
+ inputs.push_back(InputEventKey::create_reference(KEY_SPACE));
+ default_builtin_cache.insert("ui_accept", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventJoypadButton::create_reference(JOY_BUTTON_Y));
+ inputs.push_back(InputEventKey::create_reference(KEY_SPACE));
+ default_builtin_cache.insert("ui_select", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_ESCAPE));
+ default_builtin_cache.insert("ui_cancel", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_TAB));
+ default_builtin_cache.insert("ui_focus_next", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_TAB | KEY_MASK_SHIFT));
+ default_builtin_cache.insert("ui_focus_prev", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_LEFT));
+ inputs.push_back(InputEventJoypadButton::create_reference(JOY_BUTTON_DPAD_LEFT));
+ default_builtin_cache.insert("ui_left", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_RIGHT));
+ inputs.push_back(InputEventJoypadButton::create_reference(JOY_BUTTON_DPAD_RIGHT));
+ default_builtin_cache.insert("ui_right", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_UP));
+ inputs.push_back(InputEventJoypadButton::create_reference(JOY_BUTTON_DPAD_UP));
+ default_builtin_cache.insert("ui_up", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_DOWN));
+ inputs.push_back(InputEventJoypadButton::create_reference(JOY_BUTTON_DPAD_DOWN));
+ default_builtin_cache.insert("ui_down", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_PAGEUP));
+ default_builtin_cache.insert("ui_page_up", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_PAGEDOWN));
+ default_builtin_cache.insert("ui_page_down", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_HOME));
+ default_builtin_cache.insert("ui_home", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_END));
+ default_builtin_cache.insert("ui_end", inputs);
+
+ // ///// UI basic Shortcuts /////
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_X | KEY_MASK_CMD));
+ inputs.push_back(InputEventKey::create_reference(KEY_DELETE | KEY_MASK_SHIFT));
+ default_builtin_cache.insert("ui_cut", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_C | KEY_MASK_CMD));
+ inputs.push_back(InputEventKey::create_reference(KEY_INSERT | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_copy", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_V | KEY_MASK_CMD));
+ inputs.push_back(InputEventKey::create_reference(KEY_INSERT | KEY_MASK_SHIFT));
+ default_builtin_cache.insert("ui_paste", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_Z | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_undo", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_Y | KEY_MASK_CMD));
+ inputs.push_back(InputEventKey::create_reference(KEY_Z | KEY_MASK_CMD | KEY_MASK_SHIFT));
+ default_builtin_cache.insert("ui_redo", inputs);
+
+ // ///// UI Text Input Shortcuts /////
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_SPACE | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_completion_query", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_TAB));
+ default_builtin_cache.insert("ui_text_completion_accept", inputs);
+
+ // Newlines
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_ENTER));
+ inputs.push_back(InputEventKey::create_reference(KEY_KP_ENTER));
+ default_builtin_cache.insert("ui_text_newline", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+
+ inputs.push_back(InputEventKey::create_reference(KEY_ENTER | KEY_MASK_CMD));
+ inputs.push_back(InputEventKey::create_reference(KEY_KP_ENTER | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_newline_blank", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_ENTER | KEY_MASK_SHIFT | KEY_MASK_CMD));
+ inputs.push_back(InputEventKey::create_reference(KEY_KP_ENTER | KEY_MASK_SHIFT | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_newline_above", inputs);
+
+ // Indentation
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_TAB));
+ default_builtin_cache.insert("ui_text_indent", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_TAB | KEY_MASK_SHIFT));
+ default_builtin_cache.insert("ui_text_dedent", inputs);
+
+ // Text Backspace and Delete
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_BACKSPACE));
+ default_builtin_cache.insert("ui_text_backspace", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_BACKSPACE | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_backspace_word", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_BACKSPACE | KEY_MASK_ALT));
+ default_builtin_cache.insert("ui_text_backspace_word.OSX", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ default_builtin_cache.insert("ui_text_backspace_all_to_left", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_BACKSPACE | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_backspace_all_to_left.OSX", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_DELETE));
+ default_builtin_cache.insert("ui_text_delete", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_DELETE | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_delete_word", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_DELETE | KEY_MASK_ALT));
+ default_builtin_cache.insert("ui_text_delete_word.OSX", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ default_builtin_cache.insert("ui_text_delete_all_to_right", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_DELETE | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_delete_all_to_right.OSX", inputs);
+
+ // Text Caret Movement Left/Right
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_LEFT));
+ default_builtin_cache.insert("ui_text_caret_left", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_LEFT | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_caret_word_left", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_LEFT | KEY_MASK_ALT));
+ default_builtin_cache.insert("ui_text_caret_word_left.OSX", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_RIGHT));
+ default_builtin_cache.insert("ui_text_caret_right", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_RIGHT | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_caret_word_right", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_RIGHT | KEY_MASK_ALT));
+ default_builtin_cache.insert("ui_text_caret_word_right.OSX", inputs);
+
+ // Text Caret Movement Up/Down
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_UP));
+ default_builtin_cache.insert("ui_text_caret_up", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_DOWN));
+ default_builtin_cache.insert("ui_text_caret_down", inputs);
+
+ // Text Caret Movement Line Start/End
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_HOME));
+ default_builtin_cache.insert("ui_text_caret_line_start", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_A | KEY_MASK_CTRL));
+ inputs.push_back(InputEventKey::create_reference(KEY_LEFT | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_caret_line_start.OSX", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_END));
+ default_builtin_cache.insert("ui_text_caret_line_end", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_E | KEY_MASK_CTRL));
+ inputs.push_back(InputEventKey::create_reference(KEY_RIGHT | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_caret_line_end.OSX", inputs);
+ // Text Caret Movement Page Up/Down
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_PAGEUP));
+ default_builtin_cache.insert("ui_text_caret_page_up", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_PAGEDOWN));
+ default_builtin_cache.insert("ui_text_caret_page_down", inputs);
+
+ // Text Caret Movement Document Start/End
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_HOME | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_caret_document_start", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_UP | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_caret_document_start.OSX", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_END | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_caret_document_end", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_DOWN | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_caret_document_end.OSX", inputs);
+
+ // Text Scrolling
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_UP | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_scroll_up", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_UP | KEY_MASK_CMD | KEY_MASK_ALT));
+ default_builtin_cache.insert("ui_text_scroll_up.OSX", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_DOWN | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_scroll_down", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_DOWN | KEY_MASK_CMD | KEY_MASK_ALT));
+ default_builtin_cache.insert("ui_text_scroll_down.OSX", inputs);
+
+ // Text Misc
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_A | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_text_select_all", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_INSERT));
+ default_builtin_cache.insert("ui_text_toggle_insert_mode", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_MENU));
+ default_builtin_cache.insert("ui_menu", inputs);
+
+ // ///// UI Graph Shortcuts /////
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_D | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_graph_duplicate", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_DELETE));
+ default_builtin_cache.insert("ui_graph_delete", inputs);
+
+ // ///// UI File Dialog Shortcuts /////
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_BACKSPACE));
+ default_builtin_cache.insert("ui_filedialog_up_one_level", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_F5));
+ default_builtin_cache.insert("ui_filedialog_refresh", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_H));
+ default_builtin_cache.insert("ui_filedialog_show_hidden", inputs);
+
+ inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(KEY_QUOTELEFT | KEY_MASK_CMD));
+ default_builtin_cache.insert("ui_swap_input_direction", inputs);
+
+ return default_builtin_cache;
+}
+
void InputMap::load_default() {
- Ref<InputEventKey> key;
-
- add_action("ui_accept");
- key.instance();
- key->set_keycode(KEY_ENTER);
- action_add_event("ui_accept", key);
-
- key.instance();
- key->set_keycode(KEY_KP_ENTER);
- action_add_event("ui_accept", key);
-
- key.instance();
- key->set_keycode(KEY_SPACE);
- action_add_event("ui_accept", key);
-
- add_action("ui_select");
- key.instance();
- key->set_keycode(KEY_SPACE);
- action_add_event("ui_select", key);
-
- add_action("ui_cancel");
- key.instance();
- key->set_keycode(KEY_ESCAPE);
- action_add_event("ui_cancel", key);
-
- add_action("ui_focus_next");
- key.instance();
- key->set_keycode(KEY_TAB);
- action_add_event("ui_focus_next", key);
-
- add_action("ui_focus_prev");
- key.instance();
- key->set_keycode(KEY_TAB);
- key->set_shift(true);
- action_add_event("ui_focus_prev", key);
-
- add_action("ui_left");
- key.instance();
- key->set_keycode(KEY_LEFT);
- action_add_event("ui_left", key);
-
- add_action("ui_right");
- key.instance();
- key->set_keycode(KEY_RIGHT);
- action_add_event("ui_right", key);
-
- add_action("ui_up");
- key.instance();
- key->set_keycode(KEY_UP);
- action_add_event("ui_up", key);
-
- add_action("ui_down");
- key.instance();
- key->set_keycode(KEY_DOWN);
- action_add_event("ui_down", key);
-
- add_action("ui_page_up");
- key.instance();
- key->set_keycode(KEY_PAGEUP);
- action_add_event("ui_page_up", key);
-
- add_action("ui_page_down");
- key.instance();
- key->set_keycode(KEY_PAGEDOWN);
- action_add_event("ui_page_down", key);
-
- add_action("ui_home");
- key.instance();
- key->set_keycode(KEY_HOME);
- action_add_event("ui_home", key);
-
- add_action("ui_end");
- key.instance();
- key->set_keycode(KEY_END);
- action_add_event("ui_end", key);
-
- //set("display/window/handheld/orientation", "landscape");
+ OrderedHashMap<String, List<Ref<InputEvent>>> builtins = get_builtins();
+
+ // List of Builtins which have an override for OSX.
+ Vector<String> osx_builtins;
+ for (OrderedHashMap<String, List<Ref<InputEvent>>>::Element E = builtins.front(); E; E = E.next()) {
+ if (String(E.key()).ends_with(".OSX")) {
+ // Strip .OSX from name: some_input_name.OSX -> some_input_name
+ osx_builtins.push_back(String(E.key()).split(".")[0]);
+ }
+ }
+
+ for (OrderedHashMap<String, List<Ref<InputEvent>>>::Element E = builtins.front(); E; E = E.next()) {
+ String fullname = E.key();
+ String name = fullname.split(".")[0];
+ String override_for = fullname.split(".").size() > 1 ? fullname.split(".")[1] : "";
+
+#ifdef APPLE_STYLE_KEYS
+ if (osx_builtins.has(name) && override_for != "OSX") {
+ // Name has osx builtin but this particular one is for non-osx systems - so skip.
+ continue;
+ }
+#else
+ if (override_for == "OSX") {
+ // Override for OSX - not needed on non-osx platforms.
+ continue;
+ }
+#endif
+
+ add_action(name);
+
+ List<Ref<InputEvent>> inputs = E.get();
+ for (List<Ref<InputEvent>>::Element *I = inputs.front(); I; I = I->next()) {
+ Ref<InputEventKey> iek = I->get();
+
+ // For the editor, only add keyboard actions.
+ if (iek.is_valid()) {
+ action_add_event(fullname, I->get());
+ }
+ }
+ }
}
InputMap::InputMap() {
diff --git a/core/input/input_map.h b/core/input/input_map.h
index 1646e7fadb..99c71e1e53 100644
--- a/core/input/input_map.h
+++ b/core/input/input_map.h
@@ -33,6 +33,8 @@
#include "core/input/input_event.h"
#include "core/object/class_db.h"
+#include "core/object/object.h"
+#include "core/templates/ordered_hash_map.h"
class InputMap : public Object {
GDCLASS(InputMap, Object);
@@ -52,9 +54,10 @@ public:
private:
static InputMap *singleton;
- mutable Map<StringName, Action> input_map;
+ mutable OrderedHashMap<StringName, Action> input_map;
+ OrderedHashMap<String, List<Ref<InputEvent>>> default_builtin_cache;
- List<Ref<InputEvent>>::Element *_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed = nullptr, float *p_strength = nullptr, float *p_raw_strength = nullptr) const;
+ List<Ref<InputEvent>>::Element *_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool p_exact_match = false, bool *p_pressed = nullptr, float *p_strength = nullptr, float *p_raw_strength = nullptr) const;
Array _action_get_events(const StringName &p_action);
Array _get_actions();
@@ -78,13 +81,17 @@ public:
void action_erase_events(const StringName &p_action);
const List<Ref<InputEvent>> *action_get_events(const StringName &p_action);
- bool event_is_action(const Ref<InputEvent> &p_event, const StringName &p_action) const;
- bool event_get_action_status(const Ref<InputEvent> &p_event, const StringName &p_action, bool *p_pressed = nullptr, float *p_strength = nullptr, float *p_raw_strength = nullptr) const;
+ bool event_is_action(const Ref<InputEvent> &p_event, const StringName &p_action, bool p_exact_match = false) const;
+ bool event_get_action_status(const Ref<InputEvent> &p_event, const StringName &p_action, bool p_exact_match = false, bool *p_pressed = nullptr, float *p_strength = nullptr, float *p_raw_strength = nullptr) const;
- const Map<StringName, Action> &get_action_map() const;
+ const OrderedHashMap<StringName, Action> &get_action_map() const;
void load_from_project_settings();
void load_default();
+ String get_builtin_display_name(const String &p_name) const;
+ // Use an Ordered Map so insertion order is preserved. We want the elements to be 'grouped' somewhat.
+ const OrderedHashMap<String, List<Ref<InputEvent>>> &get_builtins();
+
InputMap();
};
diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp
index 1d9aa846eb..97838fd14c 100644
--- a/core/io/file_access_network.cpp
+++ b/core/io/file_access_network.cpp
@@ -201,7 +201,7 @@ Error FileAccessNetworkClient::connect(const String &p_host, int p_port, const S
return ERR_INVALID_PARAMETER;
}
- thread = Thread::create(_thread_func, this);
+ thread.start(_thread_func, this);
return OK;
}
@@ -214,12 +214,9 @@ FileAccessNetworkClient::FileAccessNetworkClient() {
}
FileAccessNetworkClient::~FileAccessNetworkClient() {
- if (thread) {
- quit = true;
- sem.post();
- Thread::wait_to_finish(thread);
- memdelete(thread);
- }
+ quit = true;
+ sem.post();
+ thread.wait_to_finish();
}
void FileAccessNetwork::_set_block(int p_offset, const Vector<uint8_t> &p_block) {
diff --git a/core/io/file_access_network.h b/core/io/file_access_network.h
index 6aec2869fc..1f5de3e5dd 100644
--- a/core/io/file_access_network.h
+++ b/core/io/file_access_network.h
@@ -48,7 +48,7 @@ class FileAccessNetworkClient {
List<BlockRequest> block_requests;
Semaphore sem;
- Thread *thread = nullptr;
+ Thread thread;
bool quit = false;
Mutex mutex;
Mutex blockrequest_mutex;
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index a2fcf074ae..18afdc678e 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -736,14 +736,14 @@ String HTTPClient::query_string_from_dict(const Dictionary &p_dict) {
String query = "";
Array keys = p_dict.keys();
for (int i = 0; i < keys.size(); ++i) {
- String encoded_key = String(keys[i]).http_escape();
+ String encoded_key = String(keys[i]).uri_encode();
Variant value = p_dict[keys[i]];
switch (value.get_type()) {
case Variant::ARRAY: {
// Repeat the key with every values
Array values = value;
for (int j = 0; j < values.size(); ++j) {
- query += "&" + encoded_key + "=" + String(values[j]).http_escape();
+ query += "&" + encoded_key + "=" + String(values[j]).uri_encode();
}
break;
}
@@ -754,7 +754,7 @@ String HTTPClient::query_string_from_dict(const Dictionary &p_dict) {
}
default: {
// Add the key-value pair
- query += "&" + encoded_key + "=" + String(value).http_escape();
+ query += "&" + encoded_key + "=" + String(value).uri_encode();
}
}
}
diff --git a/core/io/image.cpp b/core/io/image.cpp
index 986c29b539..5d46d75efe 100644
--- a/core/io/image.cpp
+++ b/core/io/image.cpp
@@ -2985,6 +2985,26 @@ void Image::set_pixel(int p_x, int p_y, const Color &p_color) {
_set_color_at_ofs(data.ptrw(), ofs, p_color);
}
+void Image::adjust_bcs(float p_brightness, float p_contrast, float p_saturation) {
+ uint8_t *w = data.ptrw();
+ uint32_t pixel_size = get_format_pixel_size(format);
+ uint32_t pixel_count = data.size() / pixel_size;
+
+ for (uint32_t i = 0; i < pixel_count; i++) {
+ Color c = _get_color_at_ofs(w, i);
+ Vector3 rgb(c.r, c.g, c.b);
+
+ rgb *= p_brightness;
+ rgb = Vector3(0.5, 0.5, 0.5).lerp(rgb, p_contrast);
+ float center = (rgb.x + rgb.y + rgb.z) / 3.0;
+ rgb = Vector3(center, center, center).lerp(rgb, p_saturation);
+ c.r = rgb.x;
+ c.g = rgb.y;
+ c.b = rgb.z;
+ _set_color_at_ofs(w, i, c);
+ }
+}
+
Image::UsedChannels Image::detect_used_channels(CompressSource p_source) {
ERR_FAIL_COND_V(data.size() == 0, USED_CHANNELS_RGBA);
ERR_FAIL_COND_V(is_compressed(), USED_CHANNELS_RGBA);
@@ -3132,6 +3152,8 @@ void Image::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_pixelv", "point", "color"), &Image::set_pixelv);
ClassDB::bind_method(D_METHOD("set_pixel", "x", "y", "color"), &Image::set_pixel);
+ ClassDB::bind_method(D_METHOD("adjust_bcs", "brightness", "contrast", "saturation"), &Image::adjust_bcs);
+
ClassDB::bind_method(D_METHOD("load_png_from_buffer", "buffer"), &Image::load_png_from_buffer);
ClassDB::bind_method(D_METHOD("load_jpg_from_buffer", "buffer"), &Image::load_jpg_from_buffer);
ClassDB::bind_method(D_METHOD("load_webp_from_buffer", "buffer"), &Image::load_webp_from_buffer);
diff --git a/core/io/image.h b/core/io/image.h
index b894be7df4..df8f9b35a1 100644
--- a/core/io/image.h
+++ b/core/io/image.h
@@ -390,6 +390,8 @@ public:
void set_pixelv(const Point2i &p_point, const Color &p_color);
void set_pixel(int p_x, int p_y, const Color &p_color);
+ void adjust_bcs(float p_brightness, float p_contrast, float p_saturation);
+
void set_as_black();
void copy_internals_from(const Ref<Image> &p_image) {
diff --git a/core/io/image_loader.cpp b/core/io/image_loader.cpp
index 8ca1cb3beb..7de038e6fe 100644
--- a/core/io/image_loader.cpp
+++ b/core/io/image_loader.cpp
@@ -122,7 +122,7 @@ void ImageLoader::cleanup() {
/////////////////
-RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderImage::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
if (!f) {
if (r_error) {
diff --git a/core/io/image_loader.h b/core/io/image_loader.h
index bf67e1486f..a5d588e0b5 100644
--- a/core/io/image_loader.h
+++ b/core/io/image_loader.h
@@ -72,7 +72,7 @@ public:
class ResourceFormatLoaderImage : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/core/io/ip.cpp b/core/io/ip.cpp
index 6fb812e78d..e1d9c19f10 100644
--- a/core/io/ip.cpp
+++ b/core/io/ip.cpp
@@ -40,13 +40,13 @@ VARIANT_ENUM_CAST(IP::ResolverStatus);
struct _IP_ResolverPrivate {
struct QueueItem {
- volatile IP::ResolverStatus status;
+ SafeNumeric<IP::ResolverStatus> status;
IP_Address response;
String hostname;
IP::Type type;
void clear() {
- status = IP::RESOLVER_STATUS_NONE;
+ status.set(IP::RESOLVER_STATUS_NONE);
response = IP_Address();
type = IP::TYPE_NONE;
hostname = "";
@@ -61,7 +61,7 @@ struct _IP_ResolverPrivate {
IP::ResolverID find_empty_id() const {
for (int i = 0; i < IP::RESOLVER_MAX_QUERIES; i++) {
- if (queue[i].status == IP::RESOLVER_STATUS_NONE) {
+ if (queue[i].status.get() == IP::RESOLVER_STATUS_NONE) {
return i;
}
}
@@ -71,21 +71,21 @@ struct _IP_ResolverPrivate {
Mutex mutex;
Semaphore sem;
- Thread *thread;
+ Thread thread;
//Semaphore* semaphore;
bool thread_abort;
void resolve_queues() {
for (int i = 0; i < IP::RESOLVER_MAX_QUERIES; i++) {
- if (queue[i].status != IP::RESOLVER_STATUS_WAITING) {
+ if (queue[i].status.get() != IP::RESOLVER_STATUS_WAITING) {
continue;
}
queue[i].response = IP::get_singleton()->resolve_hostname(queue[i].hostname, queue[i].type);
if (!queue[i].response.is_valid()) {
- queue[i].status = IP::RESOLVER_STATUS_ERROR;
+ queue[i].status.set(IP::RESOLVER_STATUS_ERROR);
} else {
- queue[i].status = IP::RESOLVER_STATUS_DONE;
+ queue[i].status.set(IP::RESOLVER_STATUS_DONE);
}
}
}
@@ -137,11 +137,11 @@ IP::ResolverID IP::resolve_hostname_queue_item(const String &p_hostname, IP::Typ
resolver->queue[id].type = p_type;
if (resolver->cache.has(key) && resolver->cache[key].is_valid()) {
resolver->queue[id].response = resolver->cache[key];
- resolver->queue[id].status = IP::RESOLVER_STATUS_DONE;
+ resolver->queue[id].status.set(IP::RESOLVER_STATUS_DONE);
} else {
resolver->queue[id].response = IP_Address();
- resolver->queue[id].status = IP::RESOLVER_STATUS_WAITING;
- if (resolver->thread) {
+ resolver->queue[id].status.set(IP::RESOLVER_STATUS_WAITING);
+ if (resolver->thread.is_started()) {
resolver->sem.post();
} else {
resolver->resolve_queues();
@@ -156,12 +156,12 @@ IP::ResolverStatus IP::get_resolve_item_status(ResolverID p_id) const {
MutexLock lock(resolver->mutex);
- if (resolver->queue[p_id].status == IP::RESOLVER_STATUS_NONE) {
+ if (resolver->queue[p_id].status.get() == IP::RESOLVER_STATUS_NONE) {
ERR_PRINT("Condition status == IP::RESOLVER_STATUS_NONE");
resolver->mutex.unlock();
return IP::RESOLVER_STATUS_NONE;
}
- return resolver->queue[p_id].status;
+ return resolver->queue[p_id].status.get();
}
IP_Address IP::get_resolve_item_address(ResolverID p_id) const {
@@ -169,7 +169,7 @@ IP_Address IP::get_resolve_item_address(ResolverID p_id) const {
MutexLock lock(resolver->mutex);
- if (resolver->queue[p_id].status != IP::RESOLVER_STATUS_DONE) {
+ if (resolver->queue[p_id].status.get() != IP::RESOLVER_STATUS_DONE) {
ERR_PRINT("Resolve of '" + resolver->queue[p_id].hostname + "'' didn't complete yet.");
resolver->mutex.unlock();
return IP_Address();
@@ -183,7 +183,7 @@ void IP::erase_resolve_item(ResolverID p_id) {
MutexLock lock(resolver->mutex);
- resolver->queue[p_id].status = IP::RESOLVER_STATUS_NONE;
+ resolver->queue[p_id].status.set(IP::RESOLVER_STATUS_NONE);
}
void IP::clear_cache(const String &p_hostname) {
@@ -285,26 +285,14 @@ IP::IP() {
singleton = this;
resolver = memnew(_IP_ResolverPrivate);
-#ifndef NO_THREADS
-
resolver->thread_abort = false;
-
- resolver->thread = Thread::create(_IP_ResolverPrivate::_thread_function, resolver);
-#else
- resolver->thread = nullptr;
-#endif
+ resolver->thread.start(_IP_ResolverPrivate::_thread_function, resolver);
}
IP::~IP() {
-#ifndef NO_THREADS
- if (resolver->thread) {
- resolver->thread_abort = true;
- resolver->sem.post();
- Thread::wait_to_finish(resolver->thread);
- memdelete(resolver->thread);
- }
-
-#endif
+ resolver->thread_abort = true;
+ resolver->sem.post();
+ resolver->thread.wait_to_finish();
memdelete(resolver);
}
diff --git a/core/io/logger.cpp b/core/io/logger.cpp
index da200f5717..bd0285a7a9 100644
--- a/core/io/logger.cpp
+++ b/core/io/logger.cpp
@@ -207,7 +207,7 @@ void RotatedFileLogger::logv(const char *p_format, va_list p_list, bool p_err) {
Memory::free_static(buf);
}
- if (p_err || GLOBAL_GET("application/run/flush_stdout_on_print")) {
+ if (p_err || !ProjectSettings::get_singleton() || GLOBAL_GET("application/run/flush_stdout_on_print")) {
// Don't always flush when printing stdout to avoid performance
// issues when `print()` is spammed in release builds.
file->flush();
@@ -228,7 +228,7 @@ void StdLogger::logv(const char *p_format, va_list p_list, bool p_err) {
vfprintf(stderr, p_format, p_list);
} else {
vprintf(p_format, p_list);
- if (GLOBAL_GET("application/run/flush_stdout_on_print")) {
+ if (!ProjectSettings::get_singleton() || GLOBAL_GET("application/run/flush_stdout_on_print")) {
// Don't always flush when printing stdout to avoid performance
// issues when `print()` is spammed in release builds.
fflush(stdout);
diff --git a/core/io/resource.cpp b/core/io/resource.cpp
index 2c97e617f2..8560e2abc7 100644
--- a/core/io/resource.cpp
+++ b/core/io/resource.cpp
@@ -52,29 +52,29 @@ void Resource::set_path(const String &p_path, bool p_take_over) {
}
if (path_cache != "") {
- ResourceCache::lock->write_lock();
+ ResourceCache::lock.write_lock();
ResourceCache::resources.erase(path_cache);
- ResourceCache::lock->write_unlock();
+ ResourceCache::lock.write_unlock();
}
path_cache = "";
- ResourceCache::lock->read_lock();
+ ResourceCache::lock.read_lock();
bool has_path = ResourceCache::resources.has(p_path);
- ResourceCache::lock->read_unlock();
+ ResourceCache::lock.read_unlock();
if (has_path) {
if (p_take_over) {
- ResourceCache::lock->write_lock();
+ ResourceCache::lock.write_lock();
Resource **res = ResourceCache::resources.getptr(p_path);
if (res) {
(*res)->set_name("");
}
- ResourceCache::lock->write_unlock();
+ ResourceCache::lock.write_unlock();
} else {
- ResourceCache::lock->read_lock();
+ ResourceCache::lock.read_lock();
bool exists = ResourceCache::resources.has(p_path);
- ResourceCache::lock->read_unlock();
+ ResourceCache::lock.read_unlock();
ERR_FAIL_COND_MSG(exists, "Another resource is loaded from path '" + p_path + "' (possible cyclic resource inclusion).");
}
@@ -82,12 +82,11 @@ void Resource::set_path(const String &p_path, bool p_take_over) {
path_cache = p_path;
if (path_cache != "") {
- ResourceCache::lock->write_lock();
+ ResourceCache::lock.write_lock();
ResourceCache::resources[path_cache] = this;
- ResourceCache::lock->write_unlock();
+ ResourceCache::lock.write_unlock();
}
- _change_notify("resource_path");
_resource_path_changed();
}
@@ -105,7 +104,6 @@ int Resource::get_subindex() const {
void Resource::set_name(const String &p_name) {
name = p_name;
- _change_notify("resource_name");
}
String Resource::get_name() const {
@@ -116,20 +114,18 @@ bool Resource::editor_can_reload_from_file() {
return true; //by default yes
}
-void Resource::reload_from_file() {
- String path = get_path();
- if (!path.is_resource_file()) {
- return;
+void Resource::reset_state() {
+}
+Error Resource::copy_from(const Ref<Resource> &p_resource) {
+ ERR_FAIL_COND_V(p_resource.is_null(), ERR_INVALID_PARAMETER);
+ if (get_class() != p_resource->get_class()) {
+ return ERR_INVALID_PARAMETER;
}
- Ref<Resource> s = ResourceLoader::load(ResourceLoader::path_remap(path), get_class(), true);
-
- if (!s.is_valid()) {
- return;
- }
+ reset_state(); //may want to reset state
List<PropertyInfo> pi;
- s->get_property_list(&pi);
+ p_resource->get_property_list(&pi);
for (List<PropertyInfo>::Element *E = pi.front(); E; E = E->next()) {
if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) {
@@ -139,8 +135,23 @@ void Resource::reload_from_file() {
continue; //do not change path
}
- set(E->get().name, s->get(E->get().name));
+ set(E->get().name, p_resource->get(E->get().name));
+ }
+ return OK;
+}
+void Resource::reload_from_file() {
+ String path = get_path();
+ if (!path.is_resource_file()) {
+ return;
+ }
+
+ Ref<Resource> s = ResourceLoader::load(ResourceLoader::path_remap(path), get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
+
+ if (!s.is_valid()) {
+ return;
}
+
+ copy_from(s);
}
Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache) {
@@ -315,9 +326,7 @@ void Resource::set_as_translation_remapped(bool p_remapped) {
return;
}
- if (ResourceCache::lock) {
- ResourceCache::lock->write_lock();
- }
+ ResourceCache::lock.write_lock();
if (p_remapped) {
ResourceLoader::remapped_list.add(&remapped_list);
@@ -325,9 +334,7 @@ void Resource::set_as_translation_remapped(bool p_remapped) {
ResourceLoader::remapped_list.remove(&remapped_list);
}
- if (ResourceCache::lock) {
- ResourceCache::lock->write_unlock();
- }
+ ResourceCache::lock.write_unlock();
}
bool Resource::is_translation_remapped() const {
@@ -338,38 +345,24 @@ bool Resource::is_translation_remapped() const {
//helps keep IDs same number when loading/saving scenes. -1 clears ID and it Returns -1 when no id stored
void Resource::set_id_for_path(const String &p_path, int p_id) {
if (p_id == -1) {
- if (ResourceCache::path_cache_lock) {
- ResourceCache::path_cache_lock->write_lock();
- }
+ ResourceCache::path_cache_lock.write_lock();
ResourceCache::resource_path_cache[p_path].erase(get_path());
- if (ResourceCache::path_cache_lock) {
- ResourceCache::path_cache_lock->write_unlock();
- }
+ ResourceCache::path_cache_lock.write_unlock();
} else {
- if (ResourceCache::path_cache_lock) {
- ResourceCache::path_cache_lock->write_lock();
- }
+ ResourceCache::path_cache_lock.write_lock();
ResourceCache::resource_path_cache[p_path][get_path()] = p_id;
- if (ResourceCache::path_cache_lock) {
- ResourceCache::path_cache_lock->write_unlock();
- }
+ ResourceCache::path_cache_lock.write_unlock();
}
}
int Resource::get_id_for_path(const String &p_path) const {
- if (ResourceCache::path_cache_lock) {
- ResourceCache::path_cache_lock->read_lock();
- }
+ ResourceCache::path_cache_lock.read_lock();
if (ResourceCache::resource_path_cache[p_path].has(get_path())) {
int result = ResourceCache::resource_path_cache[p_path][get_path()];
- if (ResourceCache::path_cache_lock) {
- ResourceCache::path_cache_lock->read_unlock();
- }
+ ResourceCache::path_cache_lock.read_unlock();
return result;
} else {
- if (ResourceCache::path_cache_lock) {
- ResourceCache::path_cache_lock->read_unlock();
- }
+ ResourceCache::path_cache_lock.read_unlock();
return -1;
}
}
@@ -403,9 +396,9 @@ Resource::Resource() :
Resource::~Resource() {
if (path_cache != "") {
- ResourceCache::lock->write_lock();
+ ResourceCache::lock.write_lock();
ResourceCache::resources.erase(path_cache);
- ResourceCache::lock->write_unlock();
+ ResourceCache::lock.write_unlock();
}
if (owners.size()) {
WARN_PRINT("Resource is still owned.");
@@ -417,18 +410,11 @@ HashMap<String, Resource *> ResourceCache::resources;
HashMap<String, HashMap<String, int>> ResourceCache::resource_path_cache;
#endif
-RWLock *ResourceCache::lock = nullptr;
+RWLock ResourceCache::lock;
#ifdef TOOLS_ENABLED
-RWLock *ResourceCache::path_cache_lock = nullptr;
+RWLock ResourceCache::path_cache_lock;
#endif
-void ResourceCache::setup() {
- lock = RWLock::create();
-#ifdef TOOLS_ENABLED
- path_cache_lock = RWLock::create();
-#endif
-}
-
void ResourceCache::clear() {
if (resources.size()) {
ERR_PRINT("Resources still in use at exit (run with --verbose for details).");
@@ -442,29 +428,25 @@ void ResourceCache::clear() {
}
resources.clear();
- memdelete(lock);
-#ifdef TOOLS_ENABLED
- memdelete(path_cache_lock);
-#endif
}
void ResourceCache::reload_externals() {
}
bool ResourceCache::has(const String &p_path) {
- lock->read_lock();
+ lock.read_lock();
bool b = resources.has(p_path);
- lock->read_unlock();
+ lock.read_unlock();
return b;
}
Resource *ResourceCache::get(const String &p_path) {
- lock->read_lock();
+ lock.read_lock();
Resource **res = resources.getptr(p_path);
- lock->read_unlock();
+ lock.read_unlock();
if (!res) {
return nullptr;
@@ -474,26 +456,26 @@ Resource *ResourceCache::get(const String &p_path) {
}
void ResourceCache::get_cached_resources(List<Ref<Resource>> *p_resources) {
- lock->read_lock();
+ lock.read_lock();
const String *K = nullptr;
while ((K = resources.next(K))) {
Resource *r = resources[*K];
p_resources->push_back(Ref<Resource>(r));
}
- lock->read_unlock();
+ lock.read_unlock();
}
int ResourceCache::get_cached_resource_count() {
- lock->read_lock();
+ lock.read_lock();
int rc = resources.size();
- lock->read_unlock();
+ lock.read_unlock();
return rc;
}
void ResourceCache::dump(const char *p_file, bool p_short) {
#ifdef DEBUG_ENABLED
- lock->read_lock();
+ lock.read_lock();
Map<String, int> type_count;
@@ -530,6 +512,6 @@ void ResourceCache::dump(const char *p_file, bool p_short) {
memdelete(f);
}
- lock->read_unlock();
+ lock.read_unlock();
#endif
}
diff --git a/core/io/resource.h b/core/io/resource.h
index eda18a8538..ae18ac0c8a 100644
--- a/core/io/resource.h
+++ b/core/io/resource.h
@@ -90,6 +90,8 @@ public:
static Node *(*_get_local_scene_func)(); //used by editor
virtual bool editor_can_reload_from_file();
+ virtual void reset_state(); //for resources that use variable amount of properties, either via _validate_property or _get_property_list, this function needs to be implemented to correctly clear state
+ virtual Error copy_from(const Ref<Resource> &p_resource);
virtual void reload_from_file();
void register_owner(Object *p_owner);
@@ -149,16 +151,15 @@ typedef Ref<Resource> RES;
class ResourceCache {
friend class Resource;
friend class ResourceLoader; //need the lock
- static RWLock *lock;
+ static RWLock lock;
static HashMap<String, Resource *> resources;
#ifdef TOOLS_ENABLED
static HashMap<String, HashMap<String, int>> resource_path_cache; // each tscn has a set of resource paths and IDs
- static RWLock *path_cache_lock;
+ static RWLock path_cache_lock;
#endif // TOOLS_ENABLED
friend void unregister_core_types();
static void clear();
friend void register_core_types();
- static void setup();
public:
static void reload_externals();
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index ae4643a19f..fb6ad7d65e 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -261,11 +261,11 @@ Error ResourceLoaderBinary::parse_variant(Variant &r_v) {
r_v = v;
} break;
case VARIANT_COLOR: {
- Color v;
- v.r = f->get_real();
- v.g = f->get_real();
- v.b = f->get_real();
- v.a = f->get_real();
+ Color v; // Colors should always be in single-precision.
+ v.r = f->get_float();
+ v.g = f->get_float();
+ v.b = f->get_float();
+ v.a = f->get_float();
r_v = v;
} break;
@@ -313,17 +313,12 @@ Error ResourceLoaderBinary::parse_variant(Variant &r_v) {
uint32_t index = f->get_32();
String path = res_path + "::" + itos(index);
- if (use_nocache) {
- if (!internal_index_cache.has(path)) {
- WARN_PRINT(String("Couldn't load resource (no cache): " + path).utf8().get_data());
- }
- r_v = internal_index_cache[path];
+ //always use internal cache for loading internal resources
+ if (!internal_index_cache.has(path)) {
+ WARN_PRINT(String("Couldn't load resource (no cache): " + path).utf8().get_data());
+ r_v = Variant();
} else {
- RES res = ResourceLoader::load(path);
- if (res.is_null()) {
- WARN_PRINT(String("Couldn't load resource: " + path).utf8().get_data());
- }
- r_v = res;
+ r_v = internal_index_cache[path];
}
} break;
@@ -645,7 +640,7 @@ Error ResourceLoaderBinary::load() {
}
} else {
- Error err = ResourceLoader::load_threaded_request(path, external_resources[i].type, use_sub_threads, local_path);
+ Error err = ResourceLoader::load_threaded_request(path, external_resources[i].type, use_sub_threads, ResourceFormatLoader::CACHE_MODE_REUSE, local_path);
if (err != OK) {
if (!ResourceLoader::get_abort_on_missing_resources()) {
ResourceLoader::notify_dependency_error(local_path, path, external_resources[i].type);
@@ -675,7 +670,7 @@ Error ResourceLoaderBinary::load() {
path = res_path + "::" + path;
}
- if (!use_nocache) {
+ if (cache_mode == ResourceFormatLoader::CACHE_MODE_REUSE) {
if (ResourceCache::has(path)) {
//already loaded, don't do anything
stage++;
@@ -684,7 +679,7 @@ Error ResourceLoaderBinary::load() {
}
}
} else {
- if (!use_nocache && !ResourceCache::has(res_path)) {
+ if (cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE && !ResourceCache::has(res_path)) {
path = res_path;
}
}
@@ -695,26 +690,40 @@ Error ResourceLoaderBinary::load() {
String t = get_unicode_string();
- Object *obj = ClassDB::instance(t);
- if (!obj) {
- error = ERR_FILE_CORRUPT;
- ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource of unrecognized type in file: " + t + ".");
- }
+ RES res;
- Resource *r = Object::cast_to<Resource>(obj);
- if (!r) {
- String obj_class = obj->get_class();
- error = ERR_FILE_CORRUPT;
- memdelete(obj); //bye
- ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource type in resource field not a resource, type is: " + obj_class + ".");
+ if (cache_mode == ResourceFormatLoader::CACHE_MODE_REPLACE && ResourceCache::has(path)) {
+ //use the existing one
+ Resource *r = ResourceCache::get(path);
+ if (r->get_class() == t) {
+ r->reset_state();
+ res = Ref<Resource>(r);
+ }
}
- RES res = RES(r);
+ if (res.is_null()) {
+ //did not replace
- if (path != String()) {
- r->set_path(path);
+ Object *obj = ClassDB::instance(t);
+ if (!obj) {
+ error = ERR_FILE_CORRUPT;
+ ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource of unrecognized type in file: " + t + ".");
+ }
+
+ Resource *r = Object::cast_to<Resource>(obj);
+ if (!r) {
+ String obj_class = obj->get_class();
+ error = ERR_FILE_CORRUPT;
+ memdelete(obj); //bye
+ ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, local_path + ":Resource type in resource field not a resource, type is: " + obj_class + ".");
+ }
+
+ res = RES(r);
+ if (path != String() && cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE) {
+ r->set_path(path, cache_mode == ResourceFormatLoader::CACHE_MODE_REPLACE); //if got here because the resource with same path has different type, replace it
+ }
+ r->set_subindex(subindex);
}
- r->set_subindex(subindex);
if (!main) {
internal_index_cache[path] = res;
@@ -961,7 +970,7 @@ ResourceLoaderBinary::~ResourceLoaderBinary() {
}
}
-RES ResourceFormatLoaderBinary::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderBinary::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_FILE_CANT_OPEN;
}
@@ -972,7 +981,7 @@ RES ResourceFormatLoaderBinary::load(const String &p_path, const String &p_origi
ERR_FAIL_COND_V_MSG(err != OK, RES(), "Cannot open file '" + p_path + "'.");
ResourceLoaderBinary loader;
- loader.use_nocache = p_no_cache;
+ loader.cache_mode = p_cache_mode;
loader.use_sub_threads = p_use_sub_threads;
loader.progress = r_progress;
String path = p_original_path != "" ? p_original_path : p_path;
diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h
index 428725f1d2..3592bbdbc4 100644
--- a/core/io/resource_format_binary.h
+++ b/core/io/resource_format_binary.h
@@ -78,7 +78,7 @@ class ResourceLoaderBinary {
Map<String, String> remaps;
Error error = OK;
- bool use_nocache = false;
+ ResourceFormatLoader::CacheMode cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE;
friend class ResourceFormatLoaderBinary;
@@ -103,7 +103,7 @@ public:
class ResourceFormatLoaderBinary : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp
index d86877ee14..3e460726f6 100644
--- a/core/io/resource_importer.cpp
+++ b/core/io/resource_importer.cpp
@@ -116,7 +116,7 @@ Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndTy
return OK;
}
-RES ResourceFormatImporter::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatImporter::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
PathAndType pat;
Error err = _get_path_and_type(p_path, pat);
@@ -128,7 +128,7 @@ RES ResourceFormatImporter::load(const String &p_path, const String &p_original_
return RES();
}
- RES res = ResourceLoader::_load(pat.path, p_path, pat.type, p_no_cache, r_error, p_use_sub_threads, r_progress);
+ RES res = ResourceLoader::_load(pat.path, p_path, pat.type, p_cache_mode, r_error, p_use_sub_threads, r_progress);
#ifdef TOOLS_ENABLED
if (res.is_valid()) {
diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h
index d31273e3cb..bda8b74b73 100644
--- a/core/io/resource_importer.h
+++ b/core/io/resource_importer.h
@@ -57,7 +57,7 @@ class ResourceFormatImporter : public ResourceFormatLoader {
public:
static ResourceFormatImporter *get_singleton() { return singleton; }
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual bool recognize_path(const String &p_path, const String &p_for_type = String()) const;
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 821e468aee..b34a083f1e 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -113,9 +113,9 @@ void ResourceFormatLoader::get_recognized_extensions(List<String> *p_extensions)
}
}
-RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (get_script_instance() && get_script_instance()->has_method("load")) {
- Variant res = get_script_instance()->call("load", p_path, p_original_path, p_use_sub_threads);
+ Variant res = get_script_instance()->call("load", p_path, p_original_path, p_use_sub_threads, p_cache_mode);
if (res.get_type() == Variant::INT) {
if (r_error) {
@@ -164,7 +164,7 @@ Error ResourceFormatLoader::rename_dependencies(const String &p_path, const Map<
void ResourceFormatLoader::_bind_methods() {
{
- MethodInfo info = MethodInfo(Variant::NIL, "load", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "original_path"));
+ MethodInfo info = MethodInfo(Variant::NIL, "load", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "original_path"), PropertyInfo(Variant::BOOL, "use_sub_threads"), PropertyInfo(Variant::INT, "cache_mode"));
info.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
ClassDB::add_virtual_method(get_class_static(), info);
}
@@ -178,7 +178,7 @@ void ResourceFormatLoader::_bind_methods() {
///////////////////////////////////
-RES ResourceLoader::_load(const String &p_path, const String &p_original_path, const String &p_type_hint, bool p_no_cache, Error *r_error, bool p_use_sub_threads, float *r_progress) {
+RES ResourceLoader::_load(const String &p_path, const String &p_original_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error, bool p_use_sub_threads, float *r_progress) {
bool found = false;
// Try all loaders and pick the first match for the type hint
@@ -187,7 +187,7 @@ RES ResourceLoader::_load(const String &p_path, const String &p_original_path, c
continue;
}
found = true;
- RES res = loader[i]->load(p_path, p_original_path != String() ? p_original_path : p_path, r_error, p_use_sub_threads, r_progress, p_no_cache);
+ RES res = loader[i]->load(p_path, p_original_path != String() ? p_original_path : p_path, r_error, p_use_sub_threads, r_progress, p_cache_mode);
if (res.is_null()) {
continue;
}
@@ -214,7 +214,7 @@ void ResourceLoader::_thread_load_function(void *p_userdata) {
//this is an actual thread, so wait for Ok fom semaphore
thread_load_semaphore->wait(); //wait until its ok to start loading
}
- load_task.resource = _load(load_task.remapped_path, load_task.remapped_path != load_task.local_path ? load_task.local_path : String(), load_task.type_hint, false, &load_task.error, load_task.use_sub_threads, &load_task.progress);
+ load_task.resource = _load(load_task.remapped_path, load_task.remapped_path != load_task.local_path ? load_task.local_path : String(), load_task.type_hint, load_task.cache_mode, &load_task.error, load_task.use_sub_threads, &load_task.progress);
load_task.progress = 1.0; //it was fully loaded at this point, so force progress to 1.0
@@ -267,7 +267,7 @@ void ResourceLoader::_thread_load_function(void *p_userdata) {
thread_load_mutex->unlock();
}
-Error ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads, const String &p_source_resource) {
+Error ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads, ResourceFormatLoader::CacheMode p_cache_mode, const String &p_source_resource) {
String local_path;
if (p_path.is_rel_path()) {
local_path = "res://" + p_path;
@@ -314,6 +314,7 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String &
load_task.remapped_path = _path_remap(local_path, &load_task.xl_remapped);
load_task.local_path = local_path;
load_task.type_hint = p_type_hint;
+ load_task.cache_mode = p_cache_mode;
load_task.use_sub_threads = p_use_sub_threads;
{ //must check if resource is already loaded before attempting to load it in a thread
@@ -323,9 +324,7 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String &
ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Attempted to load a resource already being loaded from this thread, cyclic reference?");
}
//lock first if possible
- if (ResourceCache::lock) {
- ResourceCache::lock->read_lock();
- }
+ ResourceCache::lock.read_lock();
//get ptr
Resource **rptr = ResourceCache::resources.getptr(local_path);
@@ -340,9 +339,7 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String &
load_task.progress = 1.0;
}
}
- if (ResourceCache::lock) {
- ResourceCache::lock->read_unlock();
- }
+ ResourceCache::lock.read_unlock();
}
if (p_source_resource != String()) {
@@ -366,7 +363,8 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String &
print_lt("REQUEST: load count: " + itos(thread_loading_count) + " / wait count: " + itos(thread_waiting_count) + " / suspended count: " + itos(thread_suspended_count) + " / active: " + itos(thread_loading_count - thread_suspended_count));
- load_task.thread = Thread::create(_thread_load_function, &thread_load_tasks[local_path]);
+ load_task.thread = memnew(Thread);
+ load_task.thread->start(_thread_load_function, &thread_load_tasks[local_path]);
load_task.loader_id = load_task.thread->get_id();
}
@@ -493,7 +491,7 @@ RES ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) {
if (load_task.requests == 0) {
if (load_task.thread) { //thread may not have been used
- Thread::wait_to_finish(load_task.thread);
+ load_task.thread->wait_to_finish();
memdelete(load_task.thread);
}
thread_load_tasks.erase(local_path);
@@ -504,7 +502,7 @@ RES ResourceLoader::load_threaded_get(const String &p_path, Error *r_error) {
return resource;
}
-RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p_no_cache, Error *r_error) {
+RES ResourceLoader::load(const String &p_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error) {
if (r_error) {
*r_error = ERR_CANT_OPEN;
}
@@ -516,7 +514,7 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p
local_path = ProjectSettings::get_singleton()->localize_path(p_path);
}
- if (!p_no_cache) {
+ if (p_cache_mode == ResourceFormatLoader::CACHE_MODE_IGNORE) {
thread_load_mutex->lock();
//Is it already being loaded? poll until done
@@ -535,9 +533,7 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p
}
//Is it cached?
- if (ResourceCache::lock) {
- ResourceCache::lock->read_lock();
- }
+ ResourceCache::lock.read_lock();
Resource **rptr = ResourceCache::resources.getptr(local_path);
@@ -546,9 +542,7 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p
//it is possible this resource was just freed in a thread. If so, this referencing will not work and resource is considered not cached
if (res.is_valid()) {
- if (ResourceCache::lock) {
- ResourceCache::lock->read_unlock();
- }
+ ResourceCache::lock.read_unlock();
thread_load_mutex->unlock();
if (r_error) {
@@ -559,9 +553,7 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p
}
}
- if (ResourceCache::lock) {
- ResourceCache::lock->read_unlock();
- }
+ ResourceCache::lock.read_unlock();
//load using task (but this thread)
ThreadLoadTask load_task;
@@ -570,6 +562,7 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p
load_task.local_path = local_path;
load_task.remapped_path = _path_remap(local_path, &load_task.xl_remapped);
load_task.type_hint = p_type_hint;
+ load_task.cache_mode = p_cache_mode; //ignore
load_task.loader_id = Thread::get_caller_id();
thread_load_tasks[local_path] = load_task;
@@ -590,7 +583,7 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p
print_verbose("Loading resource: " + path);
float p;
- RES res = _load(path, local_path, p_type_hint, p_no_cache, r_error, false, &p);
+ RES res = _load(path, local_path, p_type_hint, p_cache_mode, r_error, false, &p);
if (res.is_null()) {
print_verbose("Failed loading resource: " + path);
@@ -955,9 +948,7 @@ String ResourceLoader::path_remap(const String &p_path) {
}
void ResourceLoader::reload_translation_remaps() {
- if (ResourceCache::lock) {
- ResourceCache::lock->read_lock();
- }
+ ResourceCache::lock.read_lock();
List<Resource *> to_reload;
SelfList<Resource> *E = remapped_list.first();
@@ -967,9 +958,7 @@ void ResourceLoader::reload_translation_remaps() {
E = E->next();
}
- if (ResourceCache::lock) {
- ResourceCache::lock->read_unlock();
- }
+ ResourceCache::lock.read_unlock();
//now just make sure to not delete any of these resources while changing locale..
while (to_reload.front()) {
@@ -979,11 +968,11 @@ void ResourceLoader::reload_translation_remaps() {
}
void ResourceLoader::load_translation_remaps() {
- if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
+ if (!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
return;
}
- Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
+ Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
List<Variant> keys;
remaps.get_key_list(&keys);
for (List<Variant>::Element *E = keys.front(); E; E = E->next()) {
diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h
index dbf6be46c5..38a756c52f 100644
--- a/core/io/resource_loader.h
+++ b/core/io/resource_loader.h
@@ -38,11 +38,18 @@
class ResourceFormatLoader : public Reference {
GDCLASS(ResourceFormatLoader, Reference);
+public:
+ enum CacheMode {
+ CACHE_MODE_IGNORE, //resource and subresources do not use path cache, no path is set into resource.
+ CACHE_MODE_REUSE, //resource and subresources use patch cache, reuse existing loaded resources instead of loading from disk when available
+ CACHE_MODE_REPLACE, //resource and and subresource use path cache, but replace existing loaded resources when available with information from disk
+ };
+
protected:
static void _bind_methods();
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
virtual bool exists(const String &p_path) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
@@ -99,7 +106,7 @@ private:
friend class ResourceFormatImporter;
friend class ResourceInteractiveLoader;
//internal load function
- static RES _load(const String &p_path, const String &p_original_path, const String &p_type_hint, bool p_no_cache, Error *r_error, bool p_use_sub_threads, float *r_progress);
+ static RES _load(const String &p_path, const String &p_original_path, const String &p_type_hint, ResourceFormatLoader::CacheMode p_cache_mode, Error *r_error, bool p_use_sub_threads, float *r_progress);
static ResourceLoadedCallback _loaded_callback;
@@ -114,6 +121,7 @@ private:
String type_hint;
float progress = 0.0;
ThreadLoadStatus status = THREAD_LOAD_IN_PROGRESS;
+ ResourceFormatLoader::CacheMode cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE;
Error error = OK;
RES resource;
bool xl_remapped = false;
@@ -136,11 +144,11 @@ private:
static float _dependency_get_progress(const String &p_path);
public:
- static Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false, const String &p_source_resource = String());
+ static Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false, ResourceFormatLoader::CacheMode p_cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE, const String &p_source_resource = String());
static ThreadLoadStatus load_threaded_get_status(const String &p_path, float *r_progress = nullptr);
static RES load_threaded_get(const String &p_path, Error *r_error = nullptr);
- static RES load(const String &p_path, const String &p_type_hint = "", bool p_no_cache = false, Error *r_error = nullptr);
+ static RES load(const String &p_path, const String &p_type_hint = "", ResourceFormatLoader::CacheMode p_cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE, Error *r_error = nullptr);
static bool exists(const String &p_path, const String &p_type_hint = "");
static void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions);
diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp
index ce2c3eb1cd..0e11ff514a 100644
--- a/core/io/translation_loader_po.cpp
+++ b/core/io/translation_loader_po.cpp
@@ -277,7 +277,7 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error) {
return translation;
}
-RES TranslationLoaderPO::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES TranslationLoaderPO::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_CANT_OPEN;
}
diff --git a/core/io/translation_loader_po.h b/core/io/translation_loader_po.h
index a524972588..36d33fcac3 100644
--- a/core/io/translation_loader_po.h
+++ b/core/io/translation_loader_po.h
@@ -38,7 +38,7 @@
class TranslationLoaderPO : public ResourceFormatLoader {
public:
static RES load_translation(FileAccess *f, Error *r_error = nullptr);
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/core/math/aabb.h b/core/math/aabb.h
index 2861358e32..e16246902a 100644
--- a/core/math/aabb.h
+++ b/core/math/aabb.h
@@ -107,8 +107,8 @@ public:
Variant intersects_segment_bind(const Vector3 &p_from, const Vector3 &p_to) const;
Variant intersects_ray_bind(const Vector3 &p_from, const Vector3 &p_dir) const;
- _FORCE_INLINE_ void quantize(float p_unit);
- _FORCE_INLINE_ AABB quantized(float p_unit) const;
+ _FORCE_INLINE_ void quantize(real_t p_unit);
+ _FORCE_INLINE_ AABB quantized(real_t p_unit) const;
_FORCE_INLINE_ void set_end(const Vector3 &p_end) {
size = p_end - position;
@@ -430,7 +430,7 @@ void AABB::grow_by(real_t p_amount) {
size.z += 2.0 * p_amount;
}
-void AABB::quantize(float p_unit) {
+void AABB::quantize(real_t p_unit) {
size += position;
position.x -= Math::fposmodp(position.x, p_unit);
@@ -448,7 +448,7 @@ void AABB::quantize(float p_unit) {
size -= position;
}
-AABB AABB::quantized(float p_unit) const {
+AABB AABB::quantized(real_t p_unit) const {
AABB ret = *this;
ret.quantize(p_unit);
return ret;
diff --git a/core/math/audio_frame.h b/core/math/audio_frame.h
index 5773da9211..a5616b8d79 100644
--- a/core/math/audio_frame.h
+++ b/core/math/audio_frame.h
@@ -47,6 +47,9 @@ static inline float undenormalise(volatile float f) {
return (v.i & 0x7f800000) < 0x08000000 ? 0.0f : f;
}
+static const float AUDIO_PEAK_OFFSET = 0.0000000001f;
+static const float AUDIO_MIN_PEAK_DB = -200.0f; // linear2db(AUDIO_PEAK_OFFSET)
+
struct AudioFrame {
//left and right samples
float l, r;
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp
index 7dbda1d149..1066cf5e30 100644
--- a/core/math/camera_matrix.cpp
+++ b/core/math/camera_matrix.cpp
@@ -89,7 +89,7 @@ void CameraMatrix::set_perspective(real_t p_fovy_degrees, real_t p_aspect, real_
}
real_t sine, cotangent, deltaZ;
- real_t radians = p_fovy_degrees / 2.0 * Math_PI / 180.0;
+ real_t radians = Math::deg2rad(p_fovy_degrees / 2.0);
deltaZ = p_z_far - p_z_near;
sine = Math::sin(radians);
@@ -116,7 +116,7 @@ void CameraMatrix::set_perspective(real_t p_fovy_degrees, real_t p_aspect, real_
real_t left, right, modeltranslation, ymax, xmax, frustumshift;
- ymax = p_z_near * tan(p_fovy_degrees * Math_PI / 360.0f);
+ ymax = p_z_near * tan(Math::deg2rad(p_fovy_degrees / 2.0));
xmax = ymax * p_aspect;
frustumshift = (p_intraocular_dist / 2.0) * p_z_near / p_convergence_dist;
diff --git a/core/math/color.cpp b/core/math/color.cpp
index 588aedf821..e1b45cac9c 100644
--- a/core/math/color.cpp
+++ b/core/math/color.cpp
@@ -408,6 +408,8 @@ Color Color::get_named_color(int p_idx) {
return named_colors[p_idx].color;
}
+// For a version that errors on invalid values instead of returning
+// a default color, use the Color(String) constructor instead.
Color Color::from_string(const String &p_string, const Color &p_default) {
if (html_is_valid(p_string)) {
return html(p_string);
@@ -544,12 +546,12 @@ Color Color::operator*(const Color &p_color) const {
a * p_color.a);
}
-Color Color::operator*(real_t p_rvalue) const {
+Color Color::operator*(float p_scalar) const {
return Color(
- r * p_rvalue,
- g * p_rvalue,
- b * p_rvalue,
- a * p_rvalue);
+ r * p_scalar,
+ g * p_scalar,
+ b * p_scalar,
+ a * p_scalar);
}
void Color::operator*=(const Color &p_color) {
@@ -559,11 +561,11 @@ void Color::operator*=(const Color &p_color) {
a = a * p_color.a;
}
-void Color::operator*=(real_t p_rvalue) {
- r = r * p_rvalue;
- g = g * p_rvalue;
- b = b * p_rvalue;
- a = a * p_rvalue;
+void Color::operator*=(float p_scalar) {
+ r = r * p_scalar;
+ g = g * p_scalar;
+ b = b * p_scalar;
+ a = a * p_scalar;
}
Color Color::operator/(const Color &p_color) const {
@@ -574,12 +576,12 @@ Color Color::operator/(const Color &p_color) const {
a / p_color.a);
}
-Color Color::operator/(real_t p_rvalue) const {
+Color Color::operator/(float p_scalar) const {
return Color(
- r / p_rvalue,
- g / p_rvalue,
- b / p_rvalue,
- a / p_rvalue);
+ r / p_scalar,
+ g / p_scalar,
+ b / p_scalar,
+ a / p_scalar);
}
void Color::operator/=(const Color &p_color) {
@@ -589,18 +591,11 @@ void Color::operator/=(const Color &p_color) {
a = a / p_color.a;
}
-void Color::operator/=(real_t p_rvalue) {
- if (p_rvalue == 0) {
- r = 1.0;
- g = 1.0;
- b = 1.0;
- a = 1.0;
- } else {
- r = r / p_rvalue;
- g = g / p_rvalue;
- b = b / p_rvalue;
- a = a / p_rvalue;
- }
+void Color::operator/=(float p_scalar) {
+ r = r / p_scalar;
+ g = g / p_scalar;
+ b = b / p_scalar;
+ a = a / p_scalar;
}
Color Color::operator-() const {
diff --git a/core/math/color.h b/core/math/color.h
index 779f770761..5eb8b1119a 100644
--- a/core/math/color.h
+++ b/core/math/color.h
@@ -78,14 +78,14 @@ struct Color {
void operator-=(const Color &p_color);
Color operator*(const Color &p_color) const;
- Color operator*(real_t p_rvalue) const;
+ Color operator*(float p_scalar) const;
void operator*=(const Color &p_color);
- void operator*=(real_t p_rvalue);
+ void operator*=(float p_scalar);
Color operator/(const Color &p_color) const;
- Color operator/(real_t p_rvalue) const;
+ Color operator/(float p_scalar) const;
void operator/=(const Color &p_color);
- void operator/=(real_t p_rvalue);
+ void operator/=(float p_scalar);
bool is_equal_approx(const Color &p_color) const;
@@ -241,6 +241,19 @@ struct Color {
b = p_c.b;
a = p_a;
}
+
+ Color(const String &p_code) {
+ if (html_is_valid(p_code)) {
+ *this = html(p_code);
+ } else {
+ *this = named(p_code);
+ }
+ }
+
+ Color(const String &p_code, float p_a) {
+ *this = Color(p_code);
+ a = p_a;
+ }
};
bool Color::operator<(const Color &p_color) const {
@@ -259,8 +272,8 @@ bool Color::operator<(const Color &p_color) const {
}
}
-_FORCE_INLINE_ Color operator*(real_t p_real, const Color &p_color) {
- return p_color * p_real;
+_FORCE_INLINE_ Color operator*(float p_scalar, const Color &p_color) {
+ return p_color * p_scalar;
}
#endif // COLOR_H
diff --git a/core/math/geometry_3d.cpp b/core/math/geometry_3d.cpp
index 553184303d..a4a7463bfd 100644
--- a/core/math/geometry_3d.cpp
+++ b/core/math/geometry_3d.cpp
@@ -777,10 +777,11 @@ Vector<Plane> Geometry3D::build_box_planes(const Vector3 &p_extents) {
Vector<Plane> Geometry3D::build_cylinder_planes(real_t p_radius, real_t p_height, int p_sides, Vector3::Axis p_axis) {
Vector<Plane> planes;
+ const double sides_step = Math_TAU / p_sides;
for (int i = 0; i < p_sides; i++) {
Vector3 normal;
- normal[(p_axis + 1) % 3] = Math::cos(i * (2.0 * Math_PI) / p_sides);
- normal[(p_axis + 2) % 3] = Math::sin(i * (2.0 * Math_PI) / p_sides);
+ normal[(p_axis + 1) % 3] = Math::cos(i * sides_step);
+ normal[(p_axis + 2) % 3] = Math::sin(i * sides_step);
planes.push_back(Plane(normal, p_radius));
}
@@ -805,10 +806,11 @@ Vector<Plane> Geometry3D::build_sphere_planes(real_t p_radius, int p_lats, int p
axis_neg[(p_axis + 2) % 3] = 1.0;
axis_neg[p_axis] = -1.0;
+ const double lon_step = Math_TAU / p_lons;
for (int i = 0; i < p_lons; i++) {
Vector3 normal;
- normal[(p_axis + 1) % 3] = Math::cos(i * (2.0 * Math_PI) / p_lons);
- normal[(p_axis + 2) % 3] = Math::sin(i * (2.0 * Math_PI) / p_lons);
+ normal[(p_axis + 1) % 3] = Math::cos(i * lon_step);
+ normal[(p_axis + 2) % 3] = Math::sin(i * lon_step);
planes.push_back(Plane(normal, p_radius));
@@ -835,10 +837,11 @@ Vector<Plane> Geometry3D::build_capsule_planes(real_t p_radius, real_t p_height,
axis_neg[(p_axis + 2) % 3] = 1.0;
axis_neg[p_axis] = -1.0;
+ const double sides_step = Math_TAU / p_sides;
for (int i = 0; i < p_sides; i++) {
Vector3 normal;
- normal[(p_axis + 1) % 3] = Math::cos(i * (2.0 * Math_PI) / p_sides);
- normal[(p_axis + 2) % 3] = Math::sin(i * (2.0 * Math_PI) / p_sides);
+ normal[(p_axis + 1) % 3] = Math::cos(i * sides_step);
+ normal[(p_axis + 2) % 3] = Math::sin(i * sides_step);
planes.push_back(Plane(normal, p_radius));
diff --git a/core/math/geometry_3d.h b/core/math/geometry_3d.h
index 825817af5e..4ef9b4dbe6 100644
--- a/core/math/geometry_3d.h
+++ b/core/math/geometry_3d.h
@@ -252,27 +252,34 @@ public:
return true;
}
- static inline bool segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, real_t p_height, real_t p_radius, Vector3 *r_res = nullptr, Vector3 *r_norm = nullptr) {
+ static inline bool segment_intersects_cylinder(const Vector3 &p_from, const Vector3 &p_to, real_t p_height, real_t p_radius, Vector3 *r_res = nullptr, Vector3 *r_norm = nullptr, int p_cylinder_axis = 2) {
Vector3 rel = (p_to - p_from);
real_t rel_l = rel.length();
if (rel_l < CMP_EPSILON) {
return false; // Both points are the same.
}
+ ERR_FAIL_COND_V(p_cylinder_axis < 0, false);
+ ERR_FAIL_COND_V(p_cylinder_axis > 2, false);
+ Vector3 cylinder_axis;
+ cylinder_axis[p_cylinder_axis] = 1.0;
+
// First check if they are parallel.
Vector3 normal = (rel / rel_l);
- Vector3 crs = normal.cross(Vector3(0, 0, 1));
+ Vector3 crs = normal.cross(cylinder_axis);
real_t crs_l = crs.length();
- Vector3 z_dir;
+ Vector3 axis_dir;
if (crs_l < CMP_EPSILON) {
- z_dir = Vector3(1, 0, 0); // Any x/y vector OK.
+ Vector3 side_axis;
+ side_axis[(p_cylinder_axis + 1) % 3] = 1.0; // Any side axis OK.
+ axis_dir = side_axis;
} else {
- z_dir = crs / crs_l;
+ axis_dir = crs / crs_l;
}
- real_t dist = z_dir.dot(p_from);
+ real_t dist = axis_dir.dot(p_from);
if (dist >= p_radius) {
return false; // Too far away.
@@ -285,10 +292,10 @@ public:
}
Size2 size(Math::sqrt(w2), p_height * 0.5);
- Vector3 x_dir = z_dir.cross(Vector3(0, 0, 1)).normalized();
+ Vector3 side_dir = axis_dir.cross(cylinder_axis).normalized();
- Vector2 from2D(x_dir.dot(p_from), p_from.z);
- Vector2 to2D(x_dir.dot(p_to), p_to.z);
+ Vector2 from2D(side_dir.dot(p_from), p_from[p_cylinder_axis]);
+ Vector2 to2D(side_dir.dot(p_to), p_to[p_cylinder_axis]);
real_t min = 0, max = 1;
@@ -335,10 +342,12 @@ public:
Vector3 res_normal = result;
if (axis == 0) {
- res_normal.z = 0;
+ res_normal[p_cylinder_axis] = 0;
} else {
- res_normal.x = 0;
- res_normal.y = 0;
+ int axis_side = (p_cylinder_axis + 1) % 3;
+ res_normal[axis_side] = 0;
+ axis_side = (axis_side + 1) % 3;
+ res_normal[axis_side] = 0;
}
res_normal.normalize();
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h
index c7d24e9c58..267f6a4fe2 100644
--- a/core/math/math_funcs.h
+++ b/core/math/math_funcs.h
@@ -223,11 +223,11 @@ public:
return value;
}
- static _ALWAYS_INLINE_ double deg2rad(double p_y) { return p_y * Math_PI / 180.0; }
- static _ALWAYS_INLINE_ float deg2rad(float p_y) { return p_y * Math_PI / 180.0; }
+ static _ALWAYS_INLINE_ double deg2rad(double p_y) { return p_y * (Math_PI / 180.0); }
+ static _ALWAYS_INLINE_ float deg2rad(float p_y) { return p_y * (Math_PI / 180.0); }
- static _ALWAYS_INLINE_ double rad2deg(double p_y) { return p_y * 180.0 / Math_PI; }
- static _ALWAYS_INLINE_ float rad2deg(float p_y) { return p_y * 180.0 / Math_PI; }
+ static _ALWAYS_INLINE_ double rad2deg(double p_y) { return p_y * (180.0 / Math_PI); }
+ static _ALWAYS_INLINE_ float rad2deg(float p_y) { return p_y * (180.0 / Math_PI); }
static _ALWAYS_INLINE_ double lerp(double p_from, double p_to, double p_weight) { return p_from + (p_to - p_from) * p_weight; }
static _ALWAYS_INLINE_ float lerp(float p_from, float p_to, float p_weight) { return p_from + (p_to - p_from) * p_weight; }
diff --git a/core/math/quat.cpp b/core/math/quat.cpp
index 4cecc20fef..a9a21a1ba3 100644
--- a/core/math/quat.cpp
+++ b/core/math/quat.cpp
@@ -33,32 +33,6 @@
#include "core/math/basis.h"
#include "core/string/print_string.h"
-// set_euler_xyz expects a vector containing the Euler angles in the format
-// (ax,ay,az), where ax is the angle of rotation around x axis,
-// and similar for other axes.
-// This implementation uses XYZ convention (Z is the first rotation).
-void Quat::set_euler_xyz(const Vector3 &p_euler) {
- real_t half_a1 = p_euler.x * 0.5;
- real_t half_a2 = p_euler.y * 0.5;
- real_t half_a3 = p_euler.z * 0.5;
-
- // R = X(a1).Y(a2).Z(a3) convention for Euler angles.
- // Conversion to quaternion as listed in https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770024290.pdf (page A-2)
- // a3 is the angle of the first rotation, following the notation in this reference.
-
- real_t cos_a1 = Math::cos(half_a1);
- real_t sin_a1 = Math::sin(half_a1);
- real_t cos_a2 = Math::cos(half_a2);
- real_t sin_a2 = Math::sin(half_a2);
- real_t cos_a3 = Math::cos(half_a3);
- real_t sin_a3 = Math::sin(half_a3);
-
- set(sin_a1 * cos_a2 * cos_a3 + sin_a2 * sin_a3 * cos_a1,
- -sin_a1 * sin_a3 * cos_a2 + sin_a2 * cos_a1 * cos_a3,
- sin_a1 * sin_a2 * cos_a3 + sin_a3 * cos_a1 * cos_a2,
- -sin_a1 * sin_a2 * sin_a3 + cos_a1 * cos_a2 * cos_a3);
-}
-
// get_euler_xyz returns a vector containing the Euler angles in the format
// (ax,ay,az), where ax is the angle of rotation around x axis,
// and similar for other axes.
@@ -68,32 +42,6 @@ Vector3 Quat::get_euler_xyz() const {
return m.get_euler_xyz();
}
-// set_euler_yxz expects a vector containing the Euler angles in the format
-// (ax,ay,az), where ax is the angle of rotation around x axis,
-// and similar for other axes.
-// This implementation uses YXZ convention (Z is the first rotation).
-void Quat::set_euler_yxz(const Vector3 &p_euler) {
- real_t half_a1 = p_euler.y * 0.5;
- real_t half_a2 = p_euler.x * 0.5;
- real_t half_a3 = p_euler.z * 0.5;
-
- // R = Y(a1).X(a2).Z(a3) convention for Euler angles.
- // Conversion to quaternion as listed in https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770024290.pdf (page A-6)
- // a3 is the angle of the first rotation, following the notation in this reference.
-
- real_t cos_a1 = Math::cos(half_a1);
- real_t sin_a1 = Math::sin(half_a1);
- real_t cos_a2 = Math::cos(half_a2);
- real_t sin_a2 = Math::sin(half_a2);
- real_t cos_a3 = Math::cos(half_a3);
- real_t sin_a3 = Math::sin(half_a3);
-
- set(sin_a1 * cos_a2 * sin_a3 + cos_a1 * sin_a2 * cos_a3,
- sin_a1 * cos_a2 * cos_a3 - cos_a1 * sin_a2 * sin_a3,
- -sin_a1 * sin_a2 * cos_a3 + cos_a1 * cos_a2 * sin_a3,
- sin_a1 * sin_a2 * sin_a3 + cos_a1 * cos_a2 * cos_a3);
-}
-
// get_euler_yxz returns a vector containing the Euler angles in the format
// (ax,ay,az), where ax is the angle of rotation around x axis,
// and similar for other axes.
@@ -107,10 +55,10 @@ Vector3 Quat::get_euler_yxz() const {
}
void Quat::operator*=(const Quat &p_q) {
- set(w * p_q.x + x * p_q.w + y * p_q.z - z * p_q.y,
- w * p_q.y + y * p_q.w + z * p_q.x - x * p_q.z,
- w * p_q.z + z * p_q.w + x * p_q.y - y * p_q.x,
- w * p_q.w - x * p_q.x - y * p_q.y - z * p_q.z);
+ x = w * p_q.x + x * p_q.w + y * p_q.z - z * p_q.y;
+ y = w * p_q.y + y * p_q.w + z * p_q.x - x * p_q.z;
+ z = w * p_q.z + z * p_q.w + x * p_q.y - y * p_q.x;
+ w = w * p_q.w - x * p_q.x - y * p_q.y - z * p_q.z;
}
Quat Quat::operator*(const Quat &p_q) const {
@@ -233,18 +181,49 @@ Quat::operator String() const {
return String::num(x) + ", " + String::num(y) + ", " + String::num(z) + ", " + String::num(w);
}
-void Quat::set_axis_angle(const Vector3 &axis, const real_t &angle) {
+Quat::Quat(const Vector3 &p_axis, real_t p_angle) {
#ifdef MATH_CHECKS
- ERR_FAIL_COND_MSG(!axis.is_normalized(), "The axis Vector3 must be normalized.");
+ ERR_FAIL_COND_MSG(!p_axis.is_normalized(), "The axis Vector3 must be normalized.");
#endif
- real_t d = axis.length();
+ real_t d = p_axis.length();
if (d == 0) {
- set(0, 0, 0, 0);
+ x = 0;
+ y = 0;
+ z = 0;
+ w = 0;
} else {
- real_t sin_angle = Math::sin(angle * 0.5);
- real_t cos_angle = Math::cos(angle * 0.5);
+ real_t sin_angle = Math::sin(p_angle * 0.5);
+ real_t cos_angle = Math::cos(p_angle * 0.5);
real_t s = sin_angle / d;
- set(axis.x * s, axis.y * s, axis.z * s,
- cos_angle);
+ x = p_axis.x * s;
+ y = p_axis.y * s;
+ z = p_axis.z * s;
+ w = cos_angle;
}
}
+
+// Euler constructor expects a vector containing the Euler angles in the format
+// (ax, ay, az), where ax is the angle of rotation around x axis,
+// and similar for other axes.
+// This implementation uses YXZ convention (Z is the first rotation).
+Quat::Quat(const Vector3 &p_euler) {
+ real_t half_a1 = p_euler.y * 0.5;
+ real_t half_a2 = p_euler.x * 0.5;
+ real_t half_a3 = p_euler.z * 0.5;
+
+ // R = Y(a1).X(a2).Z(a3) convention for Euler angles.
+ // Conversion to quaternion as listed in https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770024290.pdf (page A-6)
+ // a3 is the angle of the first rotation, following the notation in this reference.
+
+ real_t cos_a1 = Math::cos(half_a1);
+ real_t sin_a1 = Math::sin(half_a1);
+ real_t cos_a2 = Math::cos(half_a2);
+ real_t sin_a2 = Math::sin(half_a2);
+ real_t cos_a3 = Math::cos(half_a3);
+ real_t sin_a3 = Math::sin(half_a3);
+
+ x = sin_a1 * cos_a2 * sin_a3 + cos_a1 * sin_a2 * cos_a3;
+ y = sin_a1 * cos_a2 * cos_a3 - cos_a1 * sin_a2 * sin_a3;
+ z = -sin_a1 * sin_a2 * cos_a3 + cos_a1 * cos_a2 * sin_a3;
+ w = sin_a1 * sin_a2 * sin_a3 + cos_a1 * cos_a2 * cos_a3;
+}
diff --git a/core/math/quat.h b/core/math/quat.h
index 423a7f8dfe..9db914fe52 100644
--- a/core/math/quat.h
+++ b/core/math/quat.h
@@ -65,19 +65,14 @@ public:
Quat inverse() const;
_FORCE_INLINE_ real_t dot(const Quat &p_q) const;
- void set_euler_xyz(const Vector3 &p_euler);
Vector3 get_euler_xyz() const;
- void set_euler_yxz(const Vector3 &p_euler);
Vector3 get_euler_yxz() const;
-
- void set_euler(const Vector3 &p_euler) { set_euler_yxz(p_euler); };
Vector3 get_euler() const { return get_euler_yxz(); };
Quat slerp(const Quat &p_to, const real_t &p_weight) const;
Quat slerpni(const Quat &p_to, const real_t &p_weight) const;
Quat cubic_slerp(const Quat &p_b, const Quat &p_pre_a, const Quat &p_post_b, const real_t &p_weight) const;
- void set_axis_angle(const Vector3 &axis, const real_t &angle);
_FORCE_INLINE_ void get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
r_angle = 2 * Math::acos(w);
real_t r = ((real_t)1) / Math::sqrt(1 - w * w);
@@ -124,23 +119,19 @@ public:
operator String() const;
- inline void set(real_t p_x, real_t p_y, real_t p_z, real_t p_w) {
- x = p_x;
- y = p_y;
- z = p_z;
- w = p_w;
- }
-
_FORCE_INLINE_ Quat() {}
+
_FORCE_INLINE_ Quat(real_t p_x, real_t p_y, real_t p_z, real_t p_w) :
x(p_x),
y(p_y),
z(p_z),
w(p_w) {
}
- Quat(const Vector3 &axis, const real_t &angle) { set_axis_angle(axis, angle); }
- Quat(const Vector3 &euler) { set_euler(euler); }
+ Quat(const Vector3 &p_axis, real_t p_angle);
+
+ Quat(const Vector3 &p_euler);
+
Quat(const Quat &p_q) :
x(p_q.x),
y(p_q.y),
diff --git a/core/math/transform.h b/core/math/transform.h
index 60da6f5593..1c05dbe554 100644
--- a/core/math/transform.h
+++ b/core/math/transform.h
@@ -51,8 +51,8 @@ public:
void rotate(const Vector3 &p_axis, real_t p_phi);
void rotate_basis(const Vector3 &p_axis, real_t p_phi);
- void set_look_at(const Vector3 &p_eye, const Vector3 &p_target, const Vector3 &p_up);
- Transform looking_at(const Vector3 &p_target, const Vector3 &p_up) const;
+ void set_look_at(const Vector3 &p_eye, const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0));
+ Transform looking_at(const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0)) const;
void scale(const Vector3 &p_scale);
Transform scaled(const Vector3 &p_scale) const;
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp
index 496e29ebe4..5129ed336e 100644
--- a/core/math/vector2.cpp
+++ b/core/math/vector2.cpp
@@ -211,11 +211,11 @@ Vector2i Vector2i::operator*(const Vector2i &p_v1) const {
return Vector2i(x * p_v1.x, y * p_v1.y);
}
-Vector2i Vector2i::operator*(const int &rvalue) const {
+Vector2i Vector2i::operator*(const int32_t &rvalue) const {
return Vector2i(x * rvalue, y * rvalue);
}
-void Vector2i::operator*=(const int &rvalue) {
+void Vector2i::operator*=(const int32_t &rvalue) {
x *= rvalue;
y *= rvalue;
}
@@ -224,11 +224,11 @@ Vector2i Vector2i::operator/(const Vector2i &p_v1) const {
return Vector2i(x / p_v1.x, y / p_v1.y);
}
-Vector2i Vector2i::operator/(const int &rvalue) const {
+Vector2i Vector2i::operator/(const int32_t &rvalue) const {
return Vector2i(x / rvalue, y / rvalue);
}
-void Vector2i::operator/=(const int &rvalue) {
+void Vector2i::operator/=(const int32_t &rvalue) {
x /= rvalue;
y /= rvalue;
}
@@ -237,11 +237,11 @@ Vector2i Vector2i::operator%(const Vector2i &p_v1) const {
return Vector2i(x % p_v1.x, y % p_v1.y);
}
-Vector2i Vector2i::operator%(const int &rvalue) const {
+Vector2i Vector2i::operator%(const int32_t &rvalue) const {
return Vector2i(x % rvalue, y % rvalue);
}
-void Vector2i::operator%=(const int &rvalue) {
+void Vector2i::operator%=(const int32_t &rvalue) {
x %= rvalue;
y %= rvalue;
}
diff --git a/core/math/vector2.h b/core/math/vector2.h
index 24795857a3..81bc71d590 100644
--- a/core/math/vector2.h
+++ b/core/math/vector2.h
@@ -265,18 +265,18 @@ struct Vector2i {
};
union {
- int x = 0;
- int width;
+ int32_t x = 0;
+ int32_t width;
};
union {
- int y = 0;
- int height;
+ int32_t y = 0;
+ int32_t height;
};
- _FORCE_INLINE_ int &operator[](int p_idx) {
+ _FORCE_INLINE_ int32_t &operator[](int p_idx) {
return p_idx ? y : x;
}
- _FORCE_INLINE_ const int &operator[](int p_idx) const {
+ _FORCE_INLINE_ const int32_t &operator[](int p_idx) const {
return p_idx ? y : x;
}
@@ -286,16 +286,16 @@ struct Vector2i {
void operator-=(const Vector2i &p_v);
Vector2i operator*(const Vector2i &p_v1) const;
- Vector2i operator*(const int &rvalue) const;
- void operator*=(const int &rvalue);
+ Vector2i operator*(const int32_t &rvalue) const;
+ void operator*=(const int32_t &rvalue);
Vector2i operator/(const Vector2i &p_v1) const;
- Vector2i operator/(const int &rvalue) const;
- void operator/=(const int &rvalue);
+ Vector2i operator/(const int32_t &rvalue) const;
+ void operator/=(const int32_t &rvalue);
Vector2i operator%(const Vector2i &p_v1) const;
- Vector2i operator%(const int &rvalue) const;
- void operator%=(const int &rvalue);
+ Vector2i operator%(const int32_t &rvalue) const;
+ void operator%=(const int32_t &rvalue);
Vector2i operator-() const;
bool operator<(const Vector2i &p_vec2) const { return (x == p_vec2.x) ? (y < p_vec2.y) : (x < p_vec2.x); }
@@ -317,10 +317,10 @@ struct Vector2i {
inline Vector2i() {}
inline Vector2i(const Vector2 &p_vec2) {
- x = (int)p_vec2.x;
- y = (int)p_vec2.y;
+ x = (int32_t)p_vec2.x;
+ y = (int32_t)p_vec2.y;
}
- inline Vector2i(int p_x, int p_y) {
+ inline Vector2i(int32_t p_x, int32_t p_y) {
x = p_x;
y = p_y;
}
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 6b4ff3f9a8..377581bb45 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -110,6 +110,7 @@ struct Vector3 {
_FORCE_INLINE_ Vector3 project(const Vector3 &p_to) const;
_FORCE_INLINE_ real_t angle_to(const Vector3 &p_to) const;
+ _FORCE_INLINE_ real_t signed_angle_to(const Vector3 &p_to, const Vector3 &p_axis) const;
_FORCE_INLINE_ Vector3 direction_to(const Vector3 &p_to) const;
_FORCE_INLINE_ Vector3 slide(const Vector3 &p_normal) const;
@@ -230,6 +231,13 @@ real_t Vector3::angle_to(const Vector3 &p_to) const {
return Math::atan2(cross(p_to).length(), dot(p_to));
}
+real_t Vector3::signed_angle_to(const Vector3 &p_to, const Vector3 &p_axis) const {
+ Vector3 cross_to = cross(p_to);
+ real_t unsigned_angle = Math::atan2(cross_to.length(), dot(p_to));
+ real_t sign = cross_to.dot(p_axis);
+ return (sign < 0) ? -unsigned_angle : unsigned_angle;
+}
+
Vector3 Vector3::direction_to(const Vector3 &p_to) const {
Vector3 ret(p_to.x - x, p_to.y - y, p_to.z - z);
ret.normalize();
diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp
index 6bc6d653d1..375ad8fae1 100644
--- a/core/object/class_db.cpp
+++ b/core/object/class_db.cpp
@@ -983,9 +983,9 @@ void ClassDB::add_property_subgroup(StringName p_class, const String &p_name, co
// NOTE: For implementation simplicity reasons, this method doesn't allow setters to have optional arguments at the end.
void ClassDB::add_property(StringName p_class, const PropertyInfo &p_pinfo, const StringName &p_setter, const StringName &p_getter, int p_index) {
- lock->read_lock();
+ lock.read_lock();
ClassInfo *type = classes.getptr(p_class);
- lock->read_unlock();
+ lock.read_unlock();
ERR_FAIL_COND(!type);
@@ -1541,11 +1541,7 @@ Variant ClassDB::class_get_default_property_value(const StringName &p_class, con
return var;
}
-RWLock *ClassDB::lock = nullptr;
-
-void ClassDB::init() {
- lock = RWLock::create();
-}
+RWLock ClassDB::lock;
void ClassDB::cleanup_defaults() {
default_values.clear();
@@ -1568,8 +1564,6 @@ void ClassDB::cleanup() {
classes.clear();
resource_base_extensions.clear();
compat_classes.clear();
-
- memdelete(lock);
}
//
diff --git a/core/object/class_db.h b/core/object/class_db.h
index 0591676b92..6fd5748dbb 100644
--- a/core/object/class_db.h
+++ b/core/object/class_db.h
@@ -146,7 +146,7 @@ public:
return memnew(T);
}
- static RWLock *lock;
+ static RWLock lock;
static HashMap<StringName, ClassInfo> classes;
static HashMap<StringName, StringName> resource_base_extensions;
static HashMap<StringName, StringName> compat_classes;
@@ -387,7 +387,6 @@ public:
static void get_extensions_for_type(const StringName &p_class, List<String> *p_extensions);
static void add_compatibility_class(const StringName &p_class, const StringName &p_fallback);
- static void init();
static void set_current_api(APIType p_api);
static APIType get_current_api();
diff --git a/core/object/object.cpp b/core/object/object.cpp
index 171bc4dc2c..1a9cce49d8 100644
--- a/core/object/object.cpp
+++ b/core/object/object.cpp
@@ -808,21 +808,6 @@ String Object::to_string() {
return "[" + get_class() + ":" + itos(get_instance_id()) + "]";
}
-void Object::_changed_callback(Object *p_changed, const char *p_prop) {
-}
-
-void Object::add_change_receptor(Object *p_receptor) {
- change_receptors.insert(p_receptor);
-}
-
-void Object::remove_change_receptor(Object *p_receptor) {
- change_receptors.erase(p_receptor);
-}
-
-void Object::property_list_changed_notify() {
- _change_notify();
-}
-
void Object::set_script_and_instance(const Variant &p_script, ScriptInstance *p_instance) {
//this function is not meant to be used in any of these ways
ERR_FAIL_COND(p_script.is_null());
@@ -856,7 +841,7 @@ void Object::set_script(const Variant &p_script) {
}
}
- _change_notify(); //scripts may add variables, so refresh is desired
+ notify_property_list_changed(); //scripts may add variables, so refresh is desired
emit_signal(CoreStringNames::get_singleton()->script_changed);
}
@@ -1496,6 +1481,10 @@ void Object::clear_internal_resource_paths() {
}
}
+void Object::notify_property_list_changed() {
+ emit_signal(CoreStringNames::get_singleton()->property_list_changed);
+}
+
void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_class"), &Object::get_class);
ClassDB::bind_method(D_METHOD("is_class", "class"), &Object::is_class);
@@ -1562,7 +1551,7 @@ void Object::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_block_signals", "enable"), &Object::set_block_signals);
ClassDB::bind_method(D_METHOD("is_blocking_signals"), &Object::is_blocking_signals);
- ClassDB::bind_method(D_METHOD("property_list_changed_notify"), &Object::property_list_changed_notify);
+ ClassDB::bind_method(D_METHOD("notify_property_list_changed"), &Object::notify_property_list_changed);
ClassDB::bind_method(D_METHOD("set_message_translation", "enable"), &Object::set_message_translation);
ClassDB::bind_method(D_METHOD("can_translate_messages"), &Object::can_translate_messages);
@@ -1574,6 +1563,7 @@ void Object::_bind_methods() {
ClassDB::add_virtual_method("Object", MethodInfo("free"), false);
ADD_SIGNAL(MethodInfo("script_changed"));
+ ADD_SIGNAL(MethodInfo("property_list_changed"));
BIND_VMETHOD(MethodInfo("_notification", PropertyInfo(Variant::INT, "what")));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_set", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::NIL, "value")));
@@ -1737,7 +1727,7 @@ void *Object::get_script_instance_binding(int p_script_language_index) {
if (!_script_instance_bindings[p_script_language_index]) {
void *script_data = ScriptServer::get_language(p_script_language_index)->alloc_instance_binding_data(this);
if (script_data) {
- atomic_increment(&instance_binding_count);
+ instance_binding_count.increment();
_script_instance_bindings[p_script_language_index] = script_data;
}
}
diff --git a/core/object/object.h b/core/object/object.h
index 7e460462cf..029478873d 100644
--- a/core/object/object.h
+++ b/core/object/object.h
@@ -37,6 +37,7 @@
#include "core/templates/hash_map.h"
#include "core/templates/list.h"
#include "core/templates/map.h"
+#include "core/templates/safe_refcount.h"
#include "core/templates/set.h"
#include "core/templates/vmap.h"
#include "core/variant/callable_bind.h"
@@ -125,6 +126,7 @@ enum PropertyUsageFlags {
PROPERTY_USAGE_KEYING_INCREMENTS = 1 << 25, // Used in inspector to increment property when keyed in animation player
PROPERTY_USAGE_DEFERRED_SET_RESOURCE = 1 << 26, // when loading, the resource for this property can be set at the end of loading
PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT = 1 << 27, // For Object properties, instantiate them when creating in editor.
+ PROPERTY_USAGE_EDITOR_BASIC_SETTING = 1 << 28, //for project or editor settings, show when basic settings are selected
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,
@@ -454,7 +456,6 @@ private:
#endif
bool _block_signals = false;
int _predelete_ok = 0;
- Set<Object *> change_receptors;
ObjectID _instance_id;
bool _predelete();
void _postinitialize();
@@ -486,7 +487,7 @@ private:
friend class Reference;
bool type_is_reference = false;
- uint32_t instance_binding_count = 0;
+ SafeNumeric<uint32_t> instance_binding_count;
void *_script_instance_bindings[MAX_SCRIPT_INSTANCE_BINDINGS];
Object(bool p_reference);
@@ -523,9 +524,6 @@ protected:
static void get_valid_parents_static(List<String> *p_parents);
static void _get_valid_parents_static(List<String> *p_parents);
- void property_list_changed_notify();
- virtual void _changed_callback(Object *p_changed, const char *p_prop);
-
//Variant _call_bind(const StringName& p_name, const Variant& p_arg1 = Variant(), const Variant& p_arg2 = Variant(), const Variant& p_arg3 = Variant(), const Variant& p_arg4 = Variant());
//void _call_deferred_bind(const StringName& p_name, const Variant& p_arg1 = Variant(), const Variant& p_arg2 = Variant(), const Variant& p_arg3 = Variant(), const Variant& p_arg4 = Variant());
@@ -555,16 +553,8 @@ public: //should be protected, but bug in clang++
_FORCE_INLINE_ static void register_custom_data_to_otdb() {}
public:
-#ifdef TOOLS_ENABLED
- _FORCE_INLINE_ void _change_notify(const char *p_property = "") {
- _edited = true;
- for (Set<Object *>::Element *E = change_receptors.front(); E; E = E->next()) {
- ((Object *)(E->get()))->_changed_callback(this, p_property);
- }
- }
-#else
- _FORCE_INLINE_ void _change_notify(const char *p_what = "") {}
-#endif
+ void notify_property_list_changed();
+
static void *get_class_ptr_static() {
static int ptr;
return &ptr;
@@ -574,10 +564,6 @@ public:
_FORCE_INLINE_ ObjectID get_instance_id() const { return _instance_id; }
- // this is used for editors
- void add_change_receptor(Object *p_receptor);
- void remove_change_receptor(Object *p_receptor);
-
template <class T>
static T *cast_to(Object *p_object) {
#ifndef NO_SAFE_CAST
diff --git a/core/object/reference.cpp b/core/object/reference.cpp
index 71a52a9ba5..22e4e8a336 100644
--- a/core/object/reference.cpp
+++ b/core/object/reference.cpp
@@ -62,7 +62,7 @@ bool Reference::reference() {
if (get_script_instance()) {
get_script_instance()->refcount_incremented();
}
- if (instance_binding_count > 0 && !ScriptServer::are_languages_finished()) {
+ if (instance_binding_count.get() > 0 && !ScriptServer::are_languages_finished()) {
for (int i = 0; i < MAX_SCRIPT_INSTANCE_BINDINGS; i++) {
if (_script_instance_bindings[i]) {
ScriptServer::get_language(i)->refcount_incremented_instance_binding(this);
@@ -83,7 +83,7 @@ bool Reference::unreference() {
bool script_ret = get_script_instance()->refcount_decremented();
die = die && script_ret;
}
- if (instance_binding_count > 0 && !ScriptServer::are_languages_finished()) {
+ if (instance_binding_count.get() > 0 && !ScriptServer::are_languages_finished()) {
for (int i = 0; i < MAX_SCRIPT_INSTANCE_BINDINGS; i++) {
if (_script_instance_bindings[i]) {
bool script_ret = ScriptServer::get_language(i)->refcount_decremented_instance_binding(this);
diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp
index c3f109a147..42fb0a0caf 100644
--- a/core/object/script_language.cpp
+++ b/core/object/script_language.cpp
@@ -275,6 +275,14 @@ void ScriptServer::save_global_classes() {
gcarr.push_back(d);
}
+ Array old;
+ if (ProjectSettings::get_singleton()->has_setting("_global_script_classes")) {
+ old = ProjectSettings::get_singleton()->get("_global_script_classes");
+ }
+ if ((!old.is_empty() || gcarr.is_empty()) && gcarr.hash() == old.hash()) {
+ return;
+ }
+
if (gcarr.is_empty()) {
if (ProjectSettings::get_singleton()->has_setting("_global_script_classes")) {
ProjectSettings::get_singleton()->clear("_global_script_classes");
@@ -515,7 +523,7 @@ void PlaceHolderScriptInstance::update(const List<PropertyInfo> &p_properties, c
}
if (owner && owner->get_script_instance() == this) {
- owner->_change_notify();
+ owner->notify_property_list_changed();
}
//change notify
diff --git a/core/os/memory.cpp b/core/os/memory.cpp
index 14808c2ce6..5910cb0e7b 100644
--- a/core/os/memory.cpp
+++ b/core/os/memory.cpp
@@ -60,11 +60,11 @@ void operator delete(void *p_mem, void *p_pointer, size_t check, const char *p_d
#endif
#ifdef DEBUG_ENABLED
-uint64_t Memory::mem_usage = 0;
-uint64_t Memory::max_usage = 0;
+SafeNumeric<uint64_t> Memory::mem_usage;
+SafeNumeric<uint64_t> Memory::max_usage;
#endif
-uint64_t Memory::alloc_count = 0;
+SafeNumeric<uint64_t> Memory::alloc_count;
void *Memory::alloc_static(size_t p_bytes, bool p_pad_align) {
#ifdef DEBUG_ENABLED
@@ -77,7 +77,7 @@ void *Memory::alloc_static(size_t p_bytes, bool p_pad_align) {
ERR_FAIL_COND_V(!mem, nullptr);
- atomic_increment(&alloc_count);
+ alloc_count.increment();
if (prepad) {
uint64_t *s = (uint64_t *)mem;
@@ -86,8 +86,8 @@ void *Memory::alloc_static(size_t p_bytes, bool p_pad_align) {
uint8_t *s8 = (uint8_t *)mem;
#ifdef DEBUG_ENABLED
- atomic_add(&mem_usage, p_bytes);
- atomic_exchange_if_greater(&max_usage, mem_usage);
+ uint64_t new_mem_usage = mem_usage.add(p_bytes);
+ max_usage.exchange_if_greater(new_mem_usage);
#endif
return s8 + PAD_ALIGN;
} else {
@@ -114,10 +114,10 @@ void *Memory::realloc_static(void *p_memory, size_t p_bytes, bool p_pad_align) {
#ifdef DEBUG_ENABLED
if (p_bytes > *s) {
- atomic_add(&mem_usage, p_bytes - *s);
- atomic_exchange_if_greater(&max_usage, mem_usage);
+ uint64_t new_mem_usage = mem_usage.add(p_bytes - *s);
+ max_usage.exchange_if_greater(new_mem_usage);
} else {
- atomic_sub(&mem_usage, *s - p_bytes);
+ mem_usage.sub(*s - p_bytes);
}
#endif
@@ -156,14 +156,14 @@ void Memory::free_static(void *p_ptr, bool p_pad_align) {
bool prepad = p_pad_align;
#endif
- atomic_decrement(&alloc_count);
+ alloc_count.decrement();
if (prepad) {
mem -= PAD_ALIGN;
#ifdef DEBUG_ENABLED
uint64_t *s = (uint64_t *)mem;
- atomic_sub(&mem_usage, *s);
+ mem_usage.sub(*s);
#endif
free(mem);
@@ -178,7 +178,7 @@ uint64_t Memory::get_mem_available() {
uint64_t Memory::get_mem_usage() {
#ifdef DEBUG_ENABLED
- return mem_usage;
+ return mem_usage.get();
#else
return 0;
#endif
@@ -186,7 +186,7 @@ uint64_t Memory::get_mem_usage() {
uint64_t Memory::get_mem_max_usage() {
#ifdef DEBUG_ENABLED
- return max_usage;
+ return max_usage.get();
#else
return 0;
#endif
diff --git a/core/os/memory.h b/core/os/memory.h
index c2ae3f4ae7..10e678103d 100644
--- a/core/os/memory.h
+++ b/core/os/memory.h
@@ -43,11 +43,11 @@
class Memory {
Memory();
#ifdef DEBUG_ENABLED
- static uint64_t mem_usage;
- static uint64_t max_usage;
+ static SafeNumeric<uint64_t> mem_usage;
+ static SafeNumeric<uint64_t> max_usage;
#endif
- static uint64_t alloc_count;
+ static SafeNumeric<uint64_t> alloc_count;
public:
static void *alloc_static(size_t p_bytes, bool p_pad_align = false);
diff --git a/core/os/os.h b/core/os/os.h
index e02ce7d5ec..77a54ba68a 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -149,11 +149,6 @@ public:
bool is_layered_allowed() const { return _allow_layered; }
bool is_hidpi_allowed() const { return _allow_hidpi; }
- virtual int get_tablet_driver_count() const { return 0; };
- virtual String get_tablet_driver_name(int p_driver) const { return ""; };
- virtual String get_current_tablet_driver() const { return ""; };
- virtual void set_current_tablet_driver(const String &p_driver){};
-
void ensure_user_data_dir();
virtual MainLoop *get_main_loop() const = 0;
diff --git a/core/os/rw_lock.h b/core/os/rw_lock.h
index ff6ad3cc4a..560ec57a5f 100644
--- a/core/os/rw_lock.h
+++ b/core/os/rw_lock.h
@@ -33,55 +33,83 @@
#include "core/error/error_list.h"
+#if !defined(NO_THREADS)
+
+#include <shared_mutex>
+
class RWLock {
-protected:
- static RWLock *(*create_func)();
+ mutable std::shared_timed_mutex mutex;
public:
- virtual void read_lock() = 0; ///< Lock the rwlock, block if locked by someone else
- virtual void read_unlock() = 0; ///< Unlock the rwlock, let other threads continue
- virtual Error read_try_lock() = 0; ///< Attempt to lock the rwlock, OK on success, ERROR means it can't lock.
+ // Lock the rwlock, block if locked by someone else
+ void read_lock() const {
+ mutex.lock_shared();
+ }
- virtual void write_lock() = 0; ///< Lock the rwlock, block if locked by someone else
- virtual void write_unlock() = 0; ///< Unlock the rwlock, let other thwrites continue
- virtual Error write_try_lock() = 0; ///< Attempt to lock the rwlock, OK on success, ERROR means it can't lock.
+ // Unlock the rwlock, let other threads continue
+ void read_unlock() const {
+ mutex.unlock_shared();
+ }
- static RWLock *create(); ///< Create a rwlock
+ // Attempt to lock the rwlock, OK on success, ERR_BUSY means it can't lock.
+ Error read_try_lock() const {
+ return mutex.try_lock_shared() ? OK : ERR_BUSY;
+ }
+
+ // Lock the rwlock, block if locked by someone else
+ void write_lock() {
+ mutex.lock();
+ }
+
+ // Unlock the rwlock, let other thwrites continue
+ void write_unlock() {
+ mutex.unlock();
+ }
- virtual ~RWLock() {}
+ // Attempt to lock the rwlock, OK on success, ERR_BUSY means it can't lock.
+ Error write_try_lock() {
+ return mutex.try_lock() ? OK : ERR_BUSY;
+ }
+};
+
+#else
+
+class RWLock {
+public:
+ void read_lock() const {}
+ void read_unlock() const {}
+ Error read_try_lock() const { return OK; }
+
+ void write_lock() {}
+ void write_unlock() {}
+ Error write_try_lock() { return OK; }
};
+#endif
+
class RWLockRead {
- RWLock *lock;
+ const RWLock &lock;
public:
- RWLockRead(const RWLock *p_lock) {
- lock = const_cast<RWLock *>(p_lock);
- if (lock) {
- lock->read_lock();
- }
+ RWLockRead(const RWLock &p_lock) :
+ lock(p_lock) {
+ lock.read_lock();
}
~RWLockRead() {
- if (lock) {
- lock->read_unlock();
- }
+ lock.read_unlock();
}
};
class RWLockWrite {
- RWLock *lock;
+ RWLock &lock;
public:
- RWLockWrite(RWLock *p_lock) {
- lock = p_lock;
- if (lock) {
- lock->write_lock();
- }
+ RWLockWrite(RWLock &p_lock) :
+ lock(p_lock) {
+ lock.write_lock();
}
~RWLockWrite() {
- if (lock) {
- lock->write_unlock();
- }
+ lock.write_unlock();
}
};
diff --git a/core/os/thread.cpp b/core/os/thread.cpp
index 0ed8825452..88744eed63 100644
--- a/core/os/thread.cpp
+++ b/core/os/thread.cpp
@@ -30,30 +30,72 @@
#include "thread.h"
-Thread *(*Thread::create_func)(ThreadCreateCallback, void *, const Settings &) = nullptr;
-Thread::ID (*Thread::get_thread_id_func)() = nullptr;
-void (*Thread::wait_to_finish_func)(Thread *) = nullptr;
+#include "core/object/script_language.h"
+
+#if !defined(NO_THREADS)
+
+#include "core/templates/safe_refcount.h"
+
Error (*Thread::set_name_func)(const String &) = nullptr;
+void (*Thread::set_priority_func)(Thread::Priority) = nullptr;
+void (*Thread::init_func)() = nullptr;
+void (*Thread::term_func)() = nullptr;
-Thread::ID Thread::_main_thread_id = 0;
+Thread::ID Thread::main_thread_id = 1;
+SafeNumeric<Thread::ID> Thread::last_thread_id{ 1 };
+thread_local Thread::ID Thread::caller_id = 1;
-Thread::ID Thread::get_caller_id() {
- if (get_thread_id_func) {
- return get_thread_id_func();
+void Thread::_set_platform_funcs(
+ Error (*p_set_name_func)(const String &),
+ void (*p_set_priority_func)(Thread::Priority),
+ void (*p_init_func)(),
+ void (*p_term_func)()) {
+ Thread::set_name_func = p_set_name_func;
+ Thread::set_priority_func = p_set_priority_func;
+ Thread::init_func = p_init_func;
+ Thread::term_func = p_term_func;
+}
+
+void Thread::callback(Thread *p_self, const Settings &p_settings, Callback p_callback, void *p_userdata) {
+ Thread::caller_id = p_self->id;
+ if (set_priority_func) {
+ set_priority_func(p_settings.priority);
+ }
+ if (init_func) {
+ init_func();
+ }
+ ScriptServer::thread_enter(); //scripts may need to attach a stack
+ p_callback(p_userdata);
+ ScriptServer::thread_exit();
+ if (term_func) {
+ term_func();
}
- return 0;
}
-Thread *Thread::create(ThreadCreateCallback p_callback, void *p_user, const Settings &p_settings) {
- if (create_func) {
- return create_func(p_callback, p_user, p_settings);
+void Thread::start(Thread::Callback p_callback, void *p_user, const Settings &p_settings) {
+ if (id != 0) {
+#ifdef DEBUG_ENABLED
+ WARN_PRINT("A Thread object has been re-started without wait_to_finish() having been called on it. Please do so to ensure correct cleanup of the thread.");
+#endif
+ thread.detach();
+ std::thread empty_thread;
+ thread.swap(empty_thread);
}
- return nullptr;
+ id = last_thread_id.increment();
+ std::thread new_thread(&Thread::callback, this, p_settings, p_callback, p_user);
+ thread.swap(new_thread);
}
-void Thread::wait_to_finish(Thread *p_thread) {
- if (wait_to_finish_func) {
- wait_to_finish_func(p_thread);
+bool Thread::is_started() const {
+ return id != 0;
+}
+
+void Thread::wait_to_finish() {
+ if (id != 0) {
+ thread.join();
+ std::thread empty_thread;
+ thread.swap(empty_thread);
+ id = 0;
}
}
@@ -64,3 +106,14 @@ Error Thread::set_name(const String &p_name) {
return ERR_UNAVAILABLE;
}
+
+Thread::~Thread() {
+ if (id != 0) {
+#ifdef DEBUG_ENABLED
+ WARN_PRINT("A Thread object has been destroyed without wait_to_finish() having been called on it. Please do so to ensure correct cleanup of the thread.");
+#endif
+ thread.detach();
+ }
+}
+
+#endif
diff --git a/core/os/thread.h b/core/os/thread.h
index 993c7ad33d..76f5be182e 100644
--- a/core/os/thread.h
+++ b/core/os/thread.h
@@ -31,13 +31,21 @@
#ifndef THREAD_H
#define THREAD_H
-#include "core/string/ustring.h"
#include "core/typedefs.h"
-typedef void (*ThreadCreateCallback)(void *p_userdata);
+#if !defined(NO_THREADS)
+#include "core/templates/safe_refcount.h"
+#include <thread>
+#endif
+
+class String;
class Thread {
public:
+ typedef void (*Callback)(void *p_userdata);
+
+ typedef uint64_t ID;
+
enum Priority {
PRIORITY_LOW,
PRIORITY_NORMAL,
@@ -49,30 +57,60 @@ public:
Settings() { priority = PRIORITY_NORMAL; }
};
- typedef uint64_t ID;
+private:
+#if !defined(NO_THREADS)
+ friend class Main;
-protected:
- static Thread *(*create_func)(ThreadCreateCallback p_callback, void *, const Settings &);
- static ID (*get_thread_id_func)();
- static void (*wait_to_finish_func)(Thread *);
- static Error (*set_name_func)(const String &);
+ static ID main_thread_id;
+ static SafeNumeric<Thread::ID> last_thread_id;
- friend class Main;
+ ID id = 0;
+ static thread_local ID caller_id;
+ std::thread thread;
- static ID _main_thread_id;
+ static void callback(Thread *p_self, const Settings &p_settings, Thread::Callback p_callback, void *p_userdata);
- Thread() {}
+ static Error (*set_name_func)(const String &);
+ static void (*set_priority_func)(Thread::Priority);
+ static void (*init_func)();
+ static void (*term_func)();
+#endif
public:
- virtual ID get_id() const = 0;
+ static void _set_platform_funcs(
+ Error (*p_set_name_func)(const String &),
+ void (*p_set_priority_func)(Thread::Priority),
+ void (*p_init_func)() = nullptr,
+ void (*p_term_func)() = nullptr);
+
+#if !defined(NO_THREADS)
+ _FORCE_INLINE_ ID get_id() const { return id; }
+ // get the ID of the caller thread
+ _FORCE_INLINE_ static ID get_caller_id() { return caller_id; }
+ // get the ID of the main thread
+ _FORCE_INLINE_ static ID get_main_id() { return main_thread_id; }
static Error set_name(const String &p_name);
- _FORCE_INLINE_ static ID get_main_id() { return _main_thread_id; } ///< get the ID of the main thread
- static ID get_caller_id(); ///< get the ID of the caller function ID
- static void wait_to_finish(Thread *p_thread); ///< waits until thread is finished, and deallocates it.
- static Thread *create(ThreadCreateCallback p_callback, void *p_user, const Settings &p_settings = Settings()); ///< Static function to create a thread, will call p_callback
- virtual ~Thread() {}
+ void start(Thread::Callback p_callback, void *p_user, const Settings &p_settings = Settings());
+ bool is_started() const;
+ ///< waits until thread is finished, and deallocates it.
+ void wait_to_finish();
+
+ ~Thread();
+#else
+ _FORCE_INLINE_ ID get_id() const { return 0; }
+ // get the ID of the caller thread
+ _FORCE_INLINE_ static ID get_caller_id() { return 0; }
+ // get the ID of the main thread
+ _FORCE_INLINE_ static ID get_main_id() { return 0; }
+
+ static Error set_name(const String &p_name) { return ERR_UNAVAILABLE; }
+
+ void start(Thread::Callback p_callback, void *p_user, const Settings &p_settings = Settings()) {}
+ bool is_started() const { return false; }
+ void wait_to_finish() {}
+#endif
};
#endif // THREAD_H
diff --git a/core/os/thread_dummy.h b/core/os/thread_dummy.h
deleted file mode 100644
index 35e19732bf..0000000000
--- a/core/os/thread_dummy.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*************************************************************************/
-/* thread_dummy.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 THREAD_DUMMY_H
-#define THREAD_DUMMY_H
-
-#include "core/os/rw_lock.h"
-#include "core/os/semaphore.h"
-#include "core/os/thread.h"
-
-class ThreadDummy : public Thread {
- static Thread *create(ThreadCreateCallback p_callback, void *p_user, const Settings &p_settings = Settings());
-
-public:
- virtual ID get_id() const { return 0; };
-
- static void make_default();
-};
-
-class RWLockDummy : public RWLock {
- static RWLock *create();
-
-public:
- virtual void read_lock() {}
- virtual void read_unlock() {}
- virtual Error read_try_lock() { return OK; }
-
- virtual void write_lock() {}
- virtual void write_unlock() {}
- virtual Error write_try_lock() { return OK; }
-
- static void make_default();
-};
-
-#endif // THREAD_DUMMY_H
diff --git a/core/os/threaded_array_processor.h b/core/os/threaded_array_processor.h
index 57f3de20bf..4f270001d3 100644
--- a/core/os/threaded_array_processor.h
+++ b/core/os/threaded_array_processor.h
@@ -40,7 +40,7 @@
template <class C, class U>
struct ThreadArrayProcessData {
uint32_t elements;
- uint32_t index;
+ SafeNumeric<uint32_t> index;
C *instance;
U userdata;
void (C::*method)(uint32_t, U);
@@ -56,7 +56,7 @@ template <class T>
void process_array_thread(void *ud) {
T &data = *(T *)ud;
while (true) {
- uint32_t index = atomic_increment(&data.index);
+ uint32_t index = data.index.increment();
if (index >= data.elements) {
break;
}
@@ -70,22 +70,21 @@ void thread_process_array(uint32_t p_elements, C *p_instance, M p_method, U p_us
data.method = p_method;
data.instance = p_instance;
data.userdata = p_userdata;
- data.index = 0;
+ data.index.set(0);
data.elements = p_elements;
- data.process(data.index); //process first, let threads increment for next
-
- Vector<Thread *> threads;
+ data.process(0); //process first, let threads increment for next
- threads.resize(OS::get_singleton()->get_processor_count());
+ int thread_count = OS::get_singleton()->get_processor_count();
+ Thread *threads = memnew_arr(Thread, thread_count);
- for (int i = 0; i < threads.size(); i++) {
- threads.write[i] = Thread::create(process_array_thread<ThreadArrayProcessData<C, U>>, &data);
+ for (int i = 0; i < thread_count; i++) {
+ threads[i].start(process_array_thread<ThreadArrayProcessData<C, U>>, &data);
}
- for (int i = 0; i < threads.size(); i++) {
- Thread::wait_to_finish(threads[i]);
- memdelete(threads[i]);
+ for (int i = 0; i < thread_count; i++) {
+ threads[i].wait_to_finish();
}
+ memdelete_arr(threads);
}
#else
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index 9eef7700f9..b58abc81d1 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -103,7 +103,6 @@ void register_core_types() {
static_assert(sizeof(Callable) <= 16);
ObjectDB::setup();
- ResourceCache::setup();
StringName::setup();
ResourceLoader::initialize();
diff --git a/core/string/translation.cpp b/core/string/translation.cpp
index 5337d46aa3..0901944360 100644
--- a/core/string/translation.cpp
+++ b/core/string/translation.cpp
@@ -1191,14 +1191,14 @@ bool TranslationServer::_load_translations(const String &p_from) {
}
void TranslationServer::setup() {
- String test = GLOBAL_DEF("locale/test", "");
+ String test = GLOBAL_DEF("internationalization/locale/test", "");
test = test.strip_edges();
if (test != "") {
set_locale(test);
} else {
set_locale(OS::get_singleton()->get_locale());
}
- fallback = GLOBAL_DEF("locale/fallback", "en");
+ fallback = GLOBAL_DEF("internationalization/locale/fallback", "en");
#ifdef TOOLS_ENABLED
{
String options = "";
@@ -1210,7 +1210,7 @@ void TranslationServer::setup() {
options += locale_list[idx];
idx++;
}
- ProjectSettings::get_singleton()->set_custom_property_info("locale/fallback", PropertyInfo(Variant::STRING, "locale/fallback", PROPERTY_HINT_ENUM, options));
+ ProjectSettings::get_singleton()->set_custom_property_info("internationalization/locale/fallback", PropertyInfo(Variant::STRING, "internationalization/locale/fallback", PROPERTY_HINT_ENUM, options));
}
#endif
}
@@ -1307,11 +1307,11 @@ void TranslationServer::_bind_methods() {
void TranslationServer::load_translations() {
String locale = get_locale();
- _load_translations("locale/translations"); //all
- _load_translations("locale/translations_" + locale.substr(0, 2));
+ _load_translations("internationalization/locale/translations"); //all
+ _load_translations("internationalization/locale/translations_" + locale.substr(0, 2));
if (locale.substr(0, 2) != locale) {
- _load_translations("locale/translations_" + locale);
+ _load_translations("internationalization/locale/translations_" + locale);
}
}
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 21336a99ec..59fda65d43 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -1409,8 +1409,9 @@ String String::num(double p_num, int p_decimals) {
if (digit == MAX_DIGITS) //no point in going to infinite
break;
- if ((dec - (double)((int)dec)) < 1e-6)
+ if (dec - (double)((int)dec) < 1e-6) {
break;
+ }
}
if (digit == p_decimals)
@@ -2096,8 +2097,9 @@ String::String(const StrRange &p_range) {
copy_from(p_range.c_str, p_range.len);
}
-int64_t String::hex_to_int(bool p_with_prefix) const {
- if (p_with_prefix && length() < 3) {
+int64_t String::hex_to_int() const {
+ int len = length();
+ if (len == 0) {
return 0;
}
@@ -2109,10 +2111,7 @@ int64_t String::hex_to_int(bool p_with_prefix) const {
s++;
}
- if (p_with_prefix) {
- if (s[0] != '0' || s[1] != 'x') {
- return 0;
- }
+ if (len > 2 && s[0] == '0' && s[1] == 'x') {
s += 2;
}
@@ -2139,8 +2138,9 @@ int64_t String::hex_to_int(bool p_with_prefix) const {
return hex * sign;
}
-int64_t String::bin_to_int(bool p_with_prefix) const {
- if (p_with_prefix && length() < 3) {
+int64_t String::bin_to_int() const {
+ int len = length();
+ if (len == 0) {
return 0;
}
@@ -2152,10 +2152,7 @@ int64_t String::bin_to_int(bool p_with_prefix) const {
s++;
}
- if (p_with_prefix) {
- if (s[0] != '0' || s[1] != 'b') {
- return 0;
- }
+ if (len > 2 && s[0] == '0' && s[1] == 'b') {
s += 2;
}
@@ -3074,35 +3071,47 @@ int String::rfindn(const String &p_str, int p_from) const {
}
bool String::ends_with(const String &p_string) const {
- int pos = rfind(p_string);
- if (pos == -1) {
+ int l = p_string.length();
+ if (l > length()) {
return false;
}
- return pos + p_string.length() == length();
+
+ if (l == 0) {
+ return true;
+ }
+
+ const char32_t *p = &p_string[0];
+ const char32_t *s = &operator[](length() - l);
+
+ for (int i = 0; i < l; i++) {
+ if (p[i] != s[i]) {
+ return false;
+ }
+ }
+
+ return true;
}
bool String::begins_with(const String &p_string) const {
- if (p_string.length() > length()) {
+ int l = p_string.length();
+ if (l > length()) {
return false;
}
- int l = p_string.length();
if (l == 0) {
return true;
}
- const char32_t *src = &p_string[0];
- const char32_t *str = &operator[](0);
+ const char32_t *p = &p_string[0];
+ const char32_t *s = &operator[](0);
- int i = 0;
- for (; i < l; i++) {
- if (src[i] != str[i]) {
+ for (int i = 0; i < l; i++) {
+ if (p[i] != s[i]) {
return false;
}
}
- // only if i == l the p_string matches the beginning
- return i == l;
+ return true;
}
bool String::begins_with(const char *p_string) const {
@@ -3250,8 +3259,8 @@ float String::similarity(const String &p_string) const {
int src_size = src_bigrams.size();
int tgt_size = tgt_bigrams.size();
- double sum = src_size + tgt_size;
- double inter = 0;
+ int sum = src_size + tgt_size;
+ int inter = 0;
for (int i = 0; i < src_size; i++) {
for (int j = 0; j < tgt_size; j++) {
if (src_bigrams[i] == tgt_bigrams[j]) {
@@ -3478,7 +3487,7 @@ String String::right(int p_pos) const {
return substr(p_pos, (length() - p_pos));
}
-char32_t String::ord_at(int p_idx) const {
+char32_t String::unicode_at(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, length(), 0);
return operator[](p_idx);
}
@@ -3750,7 +3759,7 @@ bool String::is_valid_string() const {
return valid;
}
-String String::http_escape() const {
+String String::uri_encode() const {
const CharString temp = utf8();
String res;
for (int i = 0; i < temp.length(); ++i) {
@@ -3774,23 +3783,25 @@ String String::http_escape() const {
return res;
}
-String String::http_unescape() const {
+String String::uri_decode() const {
String res;
for (int i = 0; i < length(); ++i) {
- if (ord_at(i) == '%' && i + 2 < length()) {
- char32_t ord1 = ord_at(i + 1);
+ if (unicode_at(i) == '%' && i + 2 < length()) {
+ char32_t ord1 = unicode_at(i + 1);
if ((ord1 >= '0' && ord1 <= '9') || (ord1 >= 'A' && ord1 <= 'Z')) {
- char32_t ord2 = ord_at(i + 2);
+ char32_t ord2 = unicode_at(i + 2);
if ((ord2 >= '0' && ord2 <= '9') || (ord2 >= 'A' && ord2 <= 'Z')) {
char bytes[3] = { (char)ord1, (char)ord2, 0 };
res += (char)strtol(bytes, nullptr, 16);
i += 2;
}
} else {
- res += ord_at(i);
+ res += unicode_at(i);
}
+ } else if (unicode_at(i) == '+') {
+ res += ' ';
} else {
- res += ord_at(i);
+ res += unicode_at(i);
}
}
return String::utf8(res.ascii());
@@ -4245,7 +4256,7 @@ bool String::is_valid_ip_address() const {
continue;
}
if (n.is_valid_hex_number(false)) {
- int64_t nint = n.hex_to_int(false);
+ int64_t nint = n.hex_to_int();
if (nint < 0 || nint > 0xffff) {
return false;
}
@@ -4340,63 +4351,6 @@ String String::plus_file(const String &p_file) const {
return *this + "/" + p_file;
}
-String String::percent_encode() const {
- CharString cs = utf8();
- String encoded;
- for (int i = 0; i < cs.length(); i++) {
- uint8_t c = cs[i];
- if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-' || c == '_' || c == '~' || c == '.') {
- char p[2] = { (char)c, 0 };
- encoded += p;
- } else {
- char p[4] = { '%', 0, 0, 0 };
- static const char hex[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
-
- p[1] = hex[c >> 4];
- p[2] = hex[c & 0xF];
- encoded += p;
- }
- }
-
- return encoded;
-}
-
-String String::percent_decode() const {
- CharString pe;
-
- CharString cs = utf8();
- for (int i = 0; i < cs.length(); i++) {
- uint8_t c = cs[i];
- if (c == '%' && i < length() - 2) {
- uint8_t a = LOWERCASE(cs[i + 1]);
- uint8_t b = LOWERCASE(cs[i + 2]);
-
- if (a >= '0' && a <= '9') {
- c = (a - '0') << 4;
- } else if (a >= 'a' && a <= 'f') {
- c = (a - 'a' + 10) << 4;
- } else {
- continue;
- }
-
- uint8_t d = 0;
-
- if (b >= '0' && b <= '9') {
- d = (b - '0');
- } else if (b >= 'a' && b <= 'f') {
- d = (b - 'a' + 10);
- } else {
- continue;
- }
- c += d;
- i += 2;
- }
- pe += c;
- }
-
- return String::utf8(pe.ptr());
-}
-
String String::property_name_encode() const {
// Escape and quote strings with extended ASCII or further Unicode characters
// as well as '"', '=' or ' ' (32)
diff --git a/core/string/ustring.h b/core/string/ustring.h
index 654e327320..821941036f 100644
--- a/core/string/ustring.h
+++ b/core/string/ustring.h
@@ -318,8 +318,8 @@ public:
bool is_numeric() const;
double to_float() const;
- int64_t hex_to_int(bool p_with_prefix = true) const;
- int64_t bin_to_int(bool p_with_prefix = true) const;
+ int64_t hex_to_int() const;
+ int64_t bin_to_int() const;
int64_t to_int() const;
static int64_t to_int(const char *p_str, int p_len = -1);
@@ -366,7 +366,7 @@ public:
String get_extension() const;
String get_basename() const;
String plus_file(const String &p_file) const;
- char32_t ord_at(int p_idx) const;
+ char32_t unicode_at(int p_idx) const;
void erase(int p_pos, int p_chars);
@@ -409,17 +409,14 @@ public:
String xml_escape(bool p_escape_quotes = false) const;
String xml_unescape() const;
- String http_escape() const;
- String http_unescape() const;
+ String uri_encode() const;
+ String uri_decode() const;
String c_escape() const;
String c_escape_multiline() const;
String c_unescape() const;
String json_escape() const;
String word_wrap(int p_chars_per_line) const;
- String percent_encode() const;
- String percent_decode() const;
-
String property_name_encode() const;
bool is_valid_identifier() const;
diff --git a/core/templates/command_queue_mt.h b/core/templates/command_queue_mt.h
index 7861c76153..0012cea72d 100644
--- a/core/templates/command_queue_mt.h
+++ b/core/templates/command_queue_mt.h
@@ -498,6 +498,11 @@ public:
flush_one();
}
+ _FORCE_INLINE_ void flush_if_pending() {
+ if (unlikely(read_ptr_and_epoch != write_ptr_and_epoch)) {
+ flush_all();
+ }
+ }
void flush_all() {
//ERR_FAIL_COND(sync);
lock();
diff --git a/core/templates/cowdata.h b/core/templates/cowdata.h
index 4becb1be59..6077f5f107 100644
--- a/core/templates/cowdata.h
+++ b/core/templates/cowdata.h
@@ -45,6 +45,9 @@ class CharString;
template <class T, class V>
class VMap;
+// CowData is relying on this to be true
+static_assert(sizeof(SafeNumeric<uint32_t>) == sizeof(uint32_t));
+
template <class T>
class CowData {
template <class TV>
@@ -60,12 +63,12 @@ private:
// internal helpers
- _FORCE_INLINE_ uint32_t *_get_refcount() const {
+ _FORCE_INLINE_ SafeNumeric<uint32_t> *_get_refcount() const {
if (!_ptr) {
return nullptr;
}
- return reinterpret_cast<uint32_t *>(_ptr) - 2;
+ return reinterpret_cast<SafeNumeric<uint32_t> *>(_ptr) - 2;
}
_FORCE_INLINE_ uint32_t *_get_size() const {
@@ -192,9 +195,9 @@ void CowData<T>::_unref(void *p_data) {
return;
}
- uint32_t *refc = _get_refcount();
+ SafeNumeric<uint32_t> *refc = _get_refcount();
- if (atomic_decrement(refc) > 0) {
+ if (refc->decrement() > 0) {
return; // still in use
}
// clean up
@@ -219,15 +222,15 @@ void CowData<T>::_copy_on_write() {
return;
}
- uint32_t *refc = _get_refcount();
+ SafeNumeric<uint32_t> *refc = _get_refcount();
- if (unlikely(*refc > 1)) {
+ if (unlikely(refc->get() > 1)) {
/* in use by more than me */
uint32_t current_size = *_get_size();
uint32_t *mem_new = (uint32_t *)Memory::alloc_static(_get_alloc_size(current_size), true);
- *(mem_new - 2) = 1; //refcount
+ reinterpret_cast<SafeNumeric<uint32_t> *>(mem_new - 2)->set(1); //refcount
*(mem_new - 1) = current_size; //size
T *_data = (T *)(mem_new);
@@ -278,7 +281,7 @@ Error CowData<T>::resize(int p_size) {
uint32_t *ptr = (uint32_t *)Memory::alloc_static(alloc_size, true);
ERR_FAIL_COND_V(!ptr, ERR_OUT_OF_MEMORY);
*(ptr - 1) = 0; //size, currently none
- *(ptr - 2) = 1; //refcount
+ reinterpret_cast<SafeNumeric<uint32_t> *>(ptr - 2)->set(1); //refcount
_ptr = (T *)ptr;
@@ -359,7 +362,7 @@ void CowData<T>::_ref(const CowData &p_from) {
return; //nothing to do
}
- if (atomic_conditional_increment(p_from._get_refcount()) > 0) { // could reference
+ if (p_from._get_refcount()->increment() > 0) { // could reference
_ptr = p_from._ptr;
}
}
diff --git a/core/templates/rid_owner.cpp b/core/templates/rid_owner.cpp
index f75a2eb9df..56f39ab779 100644
--- a/core/templates/rid_owner.cpp
+++ b/core/templates/rid_owner.cpp
@@ -30,4 +30,4 @@
#include "rid_owner.h"
-volatile uint64_t RID_AllocBase::base_id = 1;
+SafeNumeric<uint64_t> RID_AllocBase::base_id{ 1 };
diff --git a/core/templates/rid_owner.h b/core/templates/rid_owner.h
index d26c445eb4..c4aa93c394 100644
--- a/core/templates/rid_owner.h
+++ b/core/templates/rid_owner.h
@@ -44,7 +44,7 @@
#include <typeinfo>
class RID_AllocBase {
- static volatile uint64_t base_id;
+ static SafeNumeric<uint64_t> base_id;
protected:
static RID _make_from_id(uint64_t p_id) {
@@ -54,7 +54,7 @@ protected:
}
static uint64_t _gen_id() {
- return atomic_increment(&base_id);
+ return base_id.increment();
}
static RID _gen_rid() {
@@ -79,8 +79,7 @@ class RID_Alloc : public RID_AllocBase {
SpinLock spin_lock;
-public:
- RID make_rid(const T &p_value) {
+ _FORCE_INLINE_ RID _allocate_rid(const T *p_initializer) {
if (THREAD_SAFE) {
spin_lock.lock();
}
@@ -115,15 +114,22 @@ public:
uint32_t free_chunk = free_index / elements_in_chunk;
uint32_t free_element = free_index % elements_in_chunk;
- T *ptr = &chunks[free_chunk][free_element];
- memnew_placement(ptr, T(p_value));
+ if (p_initializer) {
+ T *ptr = &chunks[free_chunk][free_element];
+ memnew_placement(ptr, T(*p_initializer));
+ }
- uint32_t validator = (uint32_t)(_gen_id() & 0xFFFFFFFF);
+ uint32_t validator = (uint32_t)(_gen_id() & 0x7FFFFFFF);
uint64_t id = validator;
id <<= 32;
id |= free_index;
validator_chunks[free_chunk][free_element] = validator;
+
+ if (!p_initializer) {
+ validator_chunks[free_chunk][free_element] |= 0x80000000; //mark uninitialized bit
+ }
+
alloc_count++;
if (THREAD_SAFE) {
@@ -133,7 +139,20 @@ public:
return _make_from_id(id);
}
- _FORCE_INLINE_ T *getornull(const RID &p_rid) {
+public:
+ RID make_rid(const T &p_value) {
+ return _allocate_rid(&p_value);
+ }
+
+ //allocate but don't initialize, use initialize_rid afterwards
+ RID allocate_rid() {
+ return _allocate_rid(nullptr);
+ }
+
+ _FORCE_INLINE_ T *getornull(const RID &p_rid, bool p_initialize = false) {
+ if (p_rid == RID()) {
+ return nullptr;
+ }
if (THREAD_SAFE) {
spin_lock.lock();
}
@@ -151,10 +170,32 @@ public:
uint32_t idx_element = idx % elements_in_chunk;
uint32_t validator = uint32_t(id >> 32);
- if (unlikely(validator_chunks[idx_chunk][idx_element] != validator)) {
+
+ if (unlikely(p_initialize)) {
+ if (unlikely(!(validator_chunks[idx_chunk][idx_element] & 0x80000000))) {
+ if (THREAD_SAFE) {
+ spin_lock.unlock();
+ }
+ ERR_FAIL_V_MSG(nullptr, "Initializing already initialized RID");
+ }
+
+ if (unlikely((validator_chunks[idx_chunk][idx_element] & 0x7FFFFFFF) != validator)) {
+ if (THREAD_SAFE) {
+ spin_lock.unlock();
+ }
+ ERR_FAIL_V_MSG(nullptr, "Attempting to initialize the wrong RID");
+ return nullptr;
+ }
+
+ validator_chunks[idx_chunk][idx_element] &= 0x7FFFFFFF; //initialized
+
+ } else if (unlikely(validator_chunks[idx_chunk][idx_element] != validator)) {
if (THREAD_SAFE) {
spin_lock.unlock();
}
+ if (validator_chunks[idx_chunk][idx_element] & 0x80000000) {
+ ERR_FAIL_V_MSG(nullptr, "Attempting to use an uninitialized RID");
+ }
return nullptr;
}
@@ -166,6 +207,11 @@ public:
return ptr;
}
+ void initialize_rid(RID p_rid, const T &p_value) {
+ T *mem = getornull(p_rid, true);
+ ERR_FAIL_COND(!mem);
+ memnew_placement(mem, T(p_value));
+ }
_FORCE_INLINE_ bool owns(const RID &p_rid) {
if (THREAD_SAFE) {
@@ -186,7 +232,7 @@ public:
uint32_t validator = uint32_t(id >> 32);
- bool owned = validator_chunks[idx_chunk][idx_element] == validator;
+ bool owned = (validator_chunks[idx_chunk][idx_element] & 0x7FFFFFFF) == validator;
if (THREAD_SAFE) {
spin_lock.unlock();
@@ -213,7 +259,12 @@ public:
uint32_t idx_element = idx % elements_in_chunk;
uint32_t validator = uint32_t(id >> 32);
- if (unlikely(validator_chunks[idx_chunk][idx_element] != validator)) {
+ if (unlikely(validator_chunks[idx_chunk][idx_element] & 0x80000000)) {
+ if (THREAD_SAFE) {
+ spin_lock.unlock();
+ }
+ ERR_FAIL_MSG("Attempted to free an uninitialized or invalid RID");
+ } else if (unlikely(validator_chunks[idx_chunk][idx_element] != validator)) {
if (THREAD_SAFE) {
spin_lock.unlock();
}
@@ -330,6 +381,14 @@ public:
return alloc.make_rid(p_ptr);
}
+ _FORCE_INLINE_ RID allocate_rid() {
+ return alloc.allocate_rid();
+ }
+
+ _FORCE_INLINE_ void initialize_rid(RID p_rid, T *p_ptr) {
+ alloc.initialize_rid(p_rid, p_ptr);
+ }
+
_FORCE_INLINE_ T *getornull(const RID &p_rid) {
T **ptr = alloc.getornull(p_rid);
if (unlikely(!ptr)) {
@@ -338,6 +397,12 @@ public:
return *ptr;
}
+ _FORCE_INLINE_ void replace(const RID &p_rid, T *p_new_ptr) {
+ T **ptr = alloc.getornull(p_rid);
+ ERR_FAIL_COND(!ptr);
+ *ptr = p_new_ptr;
+ }
+
_FORCE_INLINE_ bool owns(const RID &p_rid) {
return alloc.owns(p_rid);
}
@@ -379,6 +444,14 @@ public:
return alloc.make_rid(p_ptr);
}
+ _FORCE_INLINE_ RID allocate_rid() {
+ return alloc.allocate_rid();
+ }
+
+ _FORCE_INLINE_ void initialize_rid(RID p_rid, const T &p_ptr) {
+ alloc.initialize_rid(p_rid, p_ptr);
+ }
+
_FORCE_INLINE_ T *getornull(const RID &p_rid) {
return alloc.getornull(p_rid);
}
diff --git a/core/templates/safe_refcount.cpp b/core/templates/safe_refcount.cpp
deleted file mode 100644
index a915ee662f..0000000000
--- a/core/templates/safe_refcount.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-/*************************************************************************/
-/* safe_refcount.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "safe_refcount.h"
-
-#if defined(_MSC_VER)
-
-/* Implementation for MSVC-Windows */
-
-// don't pollute my namespace!
-#include <windows.h>
-
-#define ATOMIC_CONDITIONAL_INCREMENT_BODY(m_pw, m_win_type, m_win_cmpxchg, m_cpp_type) \
- /* try to increment until it actually works */ \
- /* taken from boost */ \
- while (true) { \
- m_cpp_type tmp = static_cast<m_cpp_type const volatile &>(*(m_pw)); \
- if (tmp == 0) { \
- return 0; /* if zero, can't add to it anymore */ \
- } \
- if (m_win_cmpxchg((m_win_type volatile *)(m_pw), tmp + 1, tmp) == tmp) { \
- return tmp + 1; \
- } \
- }
-
-#define ATOMIC_EXCHANGE_IF_GREATER_BODY(m_pw, m_val, m_win_type, m_win_cmpxchg, m_cpp_type) \
- while (true) { \
- m_cpp_type tmp = static_cast<m_cpp_type const volatile &>(*(m_pw)); \
- if (tmp >= m_val) { \
- return tmp; /* already greater, or equal */ \
- } \
- if (m_win_cmpxchg((m_win_type volatile *)(m_pw), m_val, tmp) == tmp) { \
- return m_val; \
- } \
- }
-
-_ALWAYS_INLINE_ uint32_t _atomic_conditional_increment_impl(volatile uint32_t *pw) {
- ATOMIC_CONDITIONAL_INCREMENT_BODY(pw, LONG, InterlockedCompareExchange, uint32_t);
-}
-
-_ALWAYS_INLINE_ uint32_t _atomic_decrement_impl(volatile uint32_t *pw) {
- return InterlockedDecrement((LONG volatile *)pw);
-}
-
-_ALWAYS_INLINE_ uint32_t _atomic_increment_impl(volatile uint32_t *pw) {
- return InterlockedIncrement((LONG volatile *)pw);
-}
-
-_ALWAYS_INLINE_ uint32_t _atomic_sub_impl(volatile uint32_t *pw, volatile uint32_t val) {
- return InterlockedExchangeAdd((LONG volatile *)pw, -(int32_t)val) - val;
-}
-
-_ALWAYS_INLINE_ uint32_t _atomic_add_impl(volatile uint32_t *pw, volatile uint32_t val) {
- return InterlockedAdd((LONG volatile *)pw, val);
-}
-
-_ALWAYS_INLINE_ uint32_t _atomic_exchange_if_greater_impl(volatile uint32_t *pw, volatile uint32_t val) {
- ATOMIC_EXCHANGE_IF_GREATER_BODY(pw, val, LONG, InterlockedCompareExchange, uint32_t);
-}
-
-_ALWAYS_INLINE_ uint64_t _atomic_conditional_increment_impl(volatile uint64_t *pw) {
- ATOMIC_CONDITIONAL_INCREMENT_BODY(pw, LONGLONG, InterlockedCompareExchange64, uint64_t);
-}
-
-_ALWAYS_INLINE_ uint64_t _atomic_decrement_impl(volatile uint64_t *pw) {
- return InterlockedDecrement64((LONGLONG volatile *)pw);
-}
-
-_ALWAYS_INLINE_ uint64_t _atomic_increment_impl(volatile uint64_t *pw) {
- return InterlockedIncrement64((LONGLONG volatile *)pw);
-}
-
-_ALWAYS_INLINE_ uint64_t _atomic_sub_impl(volatile uint64_t *pw, volatile uint64_t val) {
- return InterlockedExchangeAdd64((LONGLONG volatile *)pw, -(int64_t)val) - val;
-}
-
-_ALWAYS_INLINE_ uint64_t _atomic_add_impl(volatile uint64_t *pw, volatile uint64_t val) {
- return InterlockedAdd64((LONGLONG volatile *)pw, val);
-}
-
-_ALWAYS_INLINE_ uint64_t _atomic_exchange_if_greater_impl(volatile uint64_t *pw, volatile uint64_t val) {
- ATOMIC_EXCHANGE_IF_GREATER_BODY(pw, val, LONGLONG, InterlockedCompareExchange64, uint64_t);
-}
-
-// The actual advertised functions; they'll call the right implementation
-
-uint32_t atomic_conditional_increment(volatile uint32_t *pw) {
- return _atomic_conditional_increment_impl(pw);
-}
-
-uint32_t atomic_decrement(volatile uint32_t *pw) {
- return _atomic_decrement_impl(pw);
-}
-
-uint32_t atomic_increment(volatile uint32_t *pw) {
- return _atomic_increment_impl(pw);
-}
-
-uint32_t atomic_sub(volatile uint32_t *pw, volatile uint32_t val) {
- return _atomic_sub_impl(pw, val);
-}
-
-uint32_t atomic_add(volatile uint32_t *pw, volatile uint32_t val) {
- return _atomic_add_impl(pw, val);
-}
-
-uint32_t atomic_exchange_if_greater(volatile uint32_t *pw, volatile uint32_t val) {
- return _atomic_exchange_if_greater_impl(pw, val);
-}
-
-uint64_t atomic_conditional_increment(volatile uint64_t *pw) {
- return _atomic_conditional_increment_impl(pw);
-}
-
-uint64_t atomic_decrement(volatile uint64_t *pw) {
- return _atomic_decrement_impl(pw);
-}
-
-uint64_t atomic_increment(volatile uint64_t *pw) {
- return _atomic_increment_impl(pw);
-}
-
-uint64_t atomic_sub(volatile uint64_t *pw, volatile uint64_t val) {
- return _atomic_sub_impl(pw, val);
-}
-
-uint64_t atomic_add(volatile uint64_t *pw, volatile uint64_t val) {
- return _atomic_add_impl(pw, val);
-}
-
-uint64_t atomic_exchange_if_greater(volatile uint64_t *pw, volatile uint64_t val) {
- return _atomic_exchange_if_greater_impl(pw, val);
-}
-#endif
diff --git a/core/templates/safe_refcount.h b/core/templates/safe_refcount.h
index d94444fad6..6aebc24ec3 100644
--- a/core/templates/safe_refcount.h
+++ b/core/templates/safe_refcount.h
@@ -31,167 +31,281 @@
#ifndef SAFE_REFCOUNT_H
#define SAFE_REFCOUNT_H
-#include "core/os/mutex.h"
#include "core/typedefs.h"
-#include "platform_config.h"
-// Atomic functions, these are used for multithread safe reference counters!
+#if !defined(NO_THREADS)
-#ifdef NO_THREADS
+#include <atomic>
-/* Bogus implementation unaware of multiprocessing */
+// Design goals for these classes:
+// - No automatic conversions or arithmetic operators,
+// to keep explicit the use of atomics everywhere.
+// - Using acquire-release semantics, even to set the first value.
+// The first value may be set relaxedly in many cases, but adding the distinction
+// between relaxed and unrelaxed operation to the interface would make it needlessly
+// flexible. There's negligible waste in having release semantics for the initial
+// value and, as an important benefit, you can be sure the value is properly synchronized
+// even with threads that are already running.
template <class T>
-static _ALWAYS_INLINE_ T atomic_conditional_increment(volatile T *pw) {
- if (*pw == 0) {
- return 0;
+class SafeNumeric {
+ std::atomic<T> value;
+
+public:
+ _ALWAYS_INLINE_ void set(T p_value) {
+ value.store(p_value, std::memory_order_release);
}
- (*pw)++;
+ _ALWAYS_INLINE_ T get() const {
+ return value.load(std::memory_order_acquire);
+ }
- return *pw;
-}
+ _ALWAYS_INLINE_ T increment() {
+ return value.fetch_add(1, std::memory_order_acq_rel) + 1;
+ }
-template <class T>
-static _ALWAYS_INLINE_ T atomic_decrement(volatile T *pw) {
- (*pw)--;
+ // Returns the original value instead of the new one
+ _ALWAYS_INLINE_ T postincrement() {
+ return value.fetch_add(1, std::memory_order_acq_rel);
+ }
- return *pw;
-}
+ _ALWAYS_INLINE_ T decrement() {
+ return value.fetch_sub(1, std::memory_order_acq_rel) - 1;
+ }
-template <class T>
-static _ALWAYS_INLINE_ T atomic_increment(volatile T *pw) {
- (*pw)++;
+ // Returns the original value instead of the new one
+ _ALWAYS_INLINE_ T postdecrement() {
+ return value.fetch_sub(1, std::memory_order_acq_rel);
+ }
- return *pw;
-}
+ _ALWAYS_INLINE_ T add(T p_value) {
+ return value.fetch_add(p_value, std::memory_order_acq_rel) + p_value;
+ }
-template <class T, class V>
-static _ALWAYS_INLINE_ T atomic_sub(volatile T *pw, volatile V val) {
- (*pw) -= val;
+ // Returns the original value instead of the new one
+ _ALWAYS_INLINE_ T postadd(T p_value) {
+ return value.fetch_add(p_value, std::memory_order_acq_rel);
+ }
- return *pw;
-}
+ _ALWAYS_INLINE_ T sub(T p_value) {
+ return value.fetch_sub(p_value, std::memory_order_acq_rel) - p_value;
+ }
-template <class T, class V>
-static _ALWAYS_INLINE_ T atomic_add(volatile T *pw, volatile V val) {
- (*pw) += val;
+ // Returns the original value instead of the new one
+ _ALWAYS_INLINE_ T postsub(T p_value) {
+ return value.fetch_sub(p_value, std::memory_order_acq_rel);
+ }
- return *pw;
-}
+ _ALWAYS_INLINE_ T exchange_if_greater(T p_value) {
+ while (true) {
+ T tmp = value.load(std::memory_order_acquire);
+ if (tmp >= p_value) {
+ return tmp; // already greater, or equal
+ }
+ if (value.compare_exchange_weak(tmp, p_value, std::memory_order_release)) {
+ return p_value;
+ }
+ }
+ }
-template <class T, class V>
-static _ALWAYS_INLINE_ T atomic_exchange_if_greater(volatile T *pw, volatile V val) {
- if (val > *pw) {
- *pw = val;
+ _ALWAYS_INLINE_ T conditional_increment() {
+ while (true) {
+ T c = value.load(std::memory_order_acquire);
+ if (c == 0) {
+ return 0;
+ }
+ if (value.compare_exchange_weak(c, c + 1, std::memory_order_release)) {
+ return c + 1;
+ }
+ }
}
- return *pw;
-}
+ _ALWAYS_INLINE_ explicit SafeNumeric<T>(T p_value = static_cast<T>(0)) {
+ set(p_value);
+ }
+};
-#elif defined(__GNUC__)
+class SafeFlag {
+ std::atomic_bool flag;
-/* Implementation for GCC & Clang */
+public:
+ _ALWAYS_INLINE_ bool is_set() const {
+ return flag.load(std::memory_order_acquire);
+ }
-// GCC guarantees atomic intrinsics for sizes of 1, 2, 4 and 8 bytes.
-// Clang states it supports GCC atomic builtins.
+ _ALWAYS_INLINE_ void set() {
+ flag.store(true, std::memory_order_release);
+ }
-template <class T>
-static _ALWAYS_INLINE_ T atomic_conditional_increment(volatile T *pw) {
- while (true) {
- T tmp = static_cast<T const volatile &>(*pw);
- if (tmp == 0) {
- return 0; // if zero, can't add to it anymore
- }
- if (__sync_val_compare_and_swap(pw, tmp, tmp + 1) == tmp) {
- return tmp + 1;
- }
+ _ALWAYS_INLINE_ void clear() {
+ flag.store(false, std::memory_order_release);
}
-}
-template <class T>
-static _ALWAYS_INLINE_ T atomic_decrement(volatile T *pw) {
- return __sync_sub_and_fetch(pw, 1);
-}
+ _ALWAYS_INLINE_ void set_to(bool p_value) {
+ flag.store(p_value, std::memory_order_release);
+ }
+
+ _ALWAYS_INLINE_ explicit SafeFlag(bool p_value = false) {
+ set_to(p_value);
+ }
+};
+
+class SafeRefCount {
+ SafeNumeric<uint32_t> count;
+
+public:
+ _ALWAYS_INLINE_ bool ref() { // true on success
+ return count.conditional_increment() != 0;
+ }
+
+ _ALWAYS_INLINE_ uint32_t refval() { // none-zero on success
+ return count.conditional_increment();
+ }
+
+ _ALWAYS_INLINE_ bool unref() { // true if must be disposed of
+ return count.decrement() == 0;
+ }
+
+ _ALWAYS_INLINE_ uint32_t unrefval() { // 0 if must be disposed of
+ return count.decrement();
+ }
+
+ _ALWAYS_INLINE_ uint32_t get() const {
+ return count.get();
+ }
+
+ _ALWAYS_INLINE_ void init(uint32_t p_value = 1) {
+ count.set(p_value);
+ }
+};
+
+#else
template <class T>
-static _ALWAYS_INLINE_ T atomic_increment(volatile T *pw) {
- return __sync_add_and_fetch(pw, 1);
-}
-
-template <class T, class V>
-static _ALWAYS_INLINE_ T atomic_sub(volatile T *pw, volatile V val) {
- return __sync_sub_and_fetch(pw, val);
-}
-
-template <class T, class V>
-static _ALWAYS_INLINE_ T atomic_add(volatile T *pw, volatile V val) {
- return __sync_add_and_fetch(pw, val);
-}
-
-template <class T, class V>
-static _ALWAYS_INLINE_ T atomic_exchange_if_greater(volatile T *pw, volatile V val) {
- while (true) {
- T tmp = static_cast<T const volatile &>(*pw);
- if (tmp >= val) {
- return tmp; // already greater, or equal
+class SafeNumeric {
+protected:
+ T value;
+
+public:
+ _ALWAYS_INLINE_ void set(T p_value) {
+ value = p_value;
+ }
+
+ _ALWAYS_INLINE_ T get() const {
+ return value;
+ }
+
+ _ALWAYS_INLINE_ T increment() {
+ return ++value;
+ }
+
+ _ALWAYS_INLINE_ T postincrement() {
+ return value++;
+ }
+
+ _ALWAYS_INLINE_ T decrement() {
+ return --value;
+ }
+
+ _ALWAYS_INLINE_ T postdecrement() {
+ return value--;
+ }
+
+ _ALWAYS_INLINE_ T add(T p_value) {
+ return value += p_value;
+ }
+
+ _ALWAYS_INLINE_ T postadd(T p_value) {
+ T old = value;
+ value += p_value;
+ return old;
+ }
+
+ _ALWAYS_INLINE_ T sub(T p_value) {
+ return value -= p_value;
+ }
+
+ _ALWAYS_INLINE_ T postsub(T p_value) {
+ T old = value;
+ value -= p_value;
+ return old;
+ }
+
+ _ALWAYS_INLINE_ T exchange_if_greater(T p_value) {
+ if (value < p_value) {
+ value = p_value;
}
- if (__sync_val_compare_and_swap(pw, tmp, val) == tmp) {
- return val;
+ return value;
+ }
+
+ _ALWAYS_INLINE_ T conditional_increment() {
+ if (value != 0) {
+ return 0;
+ } else {
+ return ++value;
}
}
-}
-
-#elif defined(_MSC_VER)
-// For MSVC use a separate compilation unit to prevent windows.h from polluting
-// the global namespace.
-uint32_t atomic_conditional_increment(volatile uint32_t *pw);
-uint32_t atomic_decrement(volatile uint32_t *pw);
-uint32_t atomic_increment(volatile uint32_t *pw);
-uint32_t atomic_sub(volatile uint32_t *pw, volatile uint32_t val);
-uint32_t atomic_add(volatile uint32_t *pw, volatile uint32_t val);
-uint32_t atomic_exchange_if_greater(volatile uint32_t *pw, volatile uint32_t val);
-
-uint64_t atomic_conditional_increment(volatile uint64_t *pw);
-uint64_t atomic_decrement(volatile uint64_t *pw);
-uint64_t atomic_increment(volatile uint64_t *pw);
-uint64_t atomic_sub(volatile uint64_t *pw, volatile uint64_t val);
-uint64_t atomic_add(volatile uint64_t *pw, volatile uint64_t val);
-uint64_t atomic_exchange_if_greater(volatile uint64_t *pw, volatile uint64_t val);
-#else
-//no threads supported?
-#error Must provide atomic functions for this platform or compiler!
-#endif
+ _ALWAYS_INLINE_ explicit SafeNumeric<T>(T p_value = static_cast<T>(0)) :
+ value(p_value) {
+ }
+};
-struct SafeRefCount {
- uint32_t count = 0;
+class SafeFlag {
+protected:
+ bool flag;
public:
- // destroy() is called when weak_count_ drops to zero.
-
- _ALWAYS_INLINE_ bool ref() { // true on success
+ _ALWAYS_INLINE_ bool is_set() const {
+ return flag;
+ }
- return atomic_conditional_increment(&count) != 0;
+ _ALWAYS_INLINE_ void set() {
+ flag = true;
}
- _ALWAYS_INLINE_ uint32_t refval() { // none-zero on success
+ _ALWAYS_INLINE_ void clear() {
+ flag = false;
+ }
- return atomic_conditional_increment(&count);
+ _ALWAYS_INLINE_ void set_to(bool p_value) {
+ flag = p_value;
}
- _ALWAYS_INLINE_ bool unref() { // true if must be disposed of
+ _ALWAYS_INLINE_ explicit SafeFlag(bool p_value = false) :
+ flag(p_value) {}
+};
+
+class SafeRefCount {
+ uint32_t count = 0;
- return atomic_decrement(&count) == 0;
+public:
+ _ALWAYS_INLINE_ bool ref() { // true on success
+ if (count != 0) {
+ ++count;
+ return true;
+ } else {
+ return false;
+ }
}
- _ALWAYS_INLINE_ uint32_t unrefval() { // 0 if must be disposed of
+ _ALWAYS_INLINE_ uint32_t refval() { // none-zero on success
+ if (count != 0) {
+ return ++count;
+ } else {
+ return 0;
+ }
+ }
- return atomic_decrement(&count);
+ _ALWAYS_INLINE_ bool unref() { // true if must be disposed of
+ return --count == 0;
}
- _ALWAYS_INLINE_ uint32_t get() const { // nothrow
+ _ALWAYS_INLINE_ uint32_t unrefval() { // 0 if must be disposed of
+ return --count;
+ }
+ _ALWAYS_INLINE_ uint32_t get() const {
return count;
}
@@ -200,4 +314,6 @@ public:
}
};
+#endif
+
#endif // SAFE_REFCOUNT_H
diff --git a/core/templates/thread_work_pool.cpp b/core/templates/thread_work_pool.cpp
index ea784e510c..17969a2c90 100644
--- a/core/templates/thread_work_pool.cpp
+++ b/core/templates/thread_work_pool.cpp
@@ -32,14 +32,15 @@
#include "core/os/os.h"
-void ThreadWorkPool::_thread_function(ThreadData *p_thread) {
+void ThreadWorkPool::_thread_function(void *p_user) {
+ ThreadData *thread = static_cast<ThreadData *>(p_user);
while (true) {
- p_thread->start.wait();
- if (p_thread->exit.load()) {
+ thread->start.wait();
+ if (thread->exit.load()) {
break;
}
- p_thread->work->work();
- p_thread->completed.post();
+ thread->work->work();
+ thread->completed.post();
}
}
@@ -54,7 +55,7 @@ void ThreadWorkPool::init(int p_thread_count) {
for (uint32_t i = 0; i < thread_count; i++) {
threads[i].exit.store(false);
- threads[i].thread = memnew(std::thread(ThreadWorkPool::_thread_function, &threads[i]));
+ threads[i].thread.start(&ThreadWorkPool::_thread_function, &threads[i]);
}
}
@@ -68,8 +69,7 @@ void ThreadWorkPool::finish() {
threads[i].start.post();
}
for (uint32_t i = 0; i < thread_count; i++) {
- threads[i].thread->join();
- memdelete(threads[i].thread);
+ threads[i].thread.wait_to_finish();
}
memdelete_arr(threads);
diff --git a/core/templates/thread_work_pool.h b/core/templates/thread_work_pool.h
index 7c3508814f..19ab1dda3a 100644
--- a/core/templates/thread_work_pool.h
+++ b/core/templates/thread_work_pool.h
@@ -33,9 +33,9 @@
#include "core/os/memory.h"
#include "core/os/semaphore.h"
+#include "core/os/thread.h"
#include <atomic>
-#include <thread>
class ThreadWorkPool {
std::atomic<uint32_t> index;
@@ -64,7 +64,7 @@ class ThreadWorkPool {
};
struct ThreadData {
- std::thread *thread;
+ Thread thread;
Semaphore start;
Semaphore completed;
std::atomic<bool> exit;
@@ -75,7 +75,7 @@ class ThreadWorkPool {
uint32_t thread_count = 0;
BaseWork *current_work = nullptr;
- static void _thread_function(ThreadData *p_thread);
+ static void _thread_function(void *p_user);
public:
template <class C, class M, class U>
diff --git a/core/variant/array.cpp b/core/variant/array.cpp
index 48916f941e..9a2922a777 100644
--- a/core/variant/array.cpp
+++ b/core/variant/array.cpp
@@ -35,6 +35,7 @@
#include "core/object/script_language.h"
#include "core/templates/hashfuncs.h"
#include "core/templates/vector.h"
+#include "core/variant/callable.h"
#include "core/variant/variant.h"
class ArrayPrivate {
@@ -371,25 +372,22 @@ void Array::sort() {
}
struct _ArrayVariantSortCustom {
- Object *obj = nullptr;
- StringName func;
+ Callable func;
_FORCE_INLINE_ bool operator()(const Variant &p_l, const Variant &p_r) const {
const Variant *args[2] = { &p_l, &p_r };
Callable::CallError err;
- bool res = obj->call(func, args, 2, err);
- if (err.error != Callable::CallError::CALL_OK) {
- res = false;
- }
+ Variant res;
+ func.call(args, 2, res, err);
+ ERR_FAIL_COND_V_MSG(err.error != Callable::CallError::CALL_OK, false,
+ "Error calling sorting method: " + Variant::get_callable_error_text(func, args, 1, err));
return res;
}
};
-void Array::sort_custom(Object *p_obj, const StringName &p_function) {
- ERR_FAIL_NULL(p_obj);
+void Array::sort_custom(Callable p_callable) {
SortArray<Variant, _ArrayVariantSortCustom, true> avs;
- avs.compare.obj = p_obj;
- avs.compare.func = p_function;
+ avs.compare.func = p_callable;
avs.sort(_p->array.ptrw(), _p->array.size());
}
@@ -438,13 +436,11 @@ int Array::bsearch(const Variant &p_value, bool p_before) {
return bisect(_p->array, p_value, p_before, _ArrayVariantSort());
}
-int Array::bsearch_custom(const Variant &p_value, Object *p_obj, const StringName &p_function, bool p_before) {
+int Array::bsearch_custom(const Variant &p_value, Callable p_callable, bool p_before) {
ERR_FAIL_COND_V(!_p->typed.validate(p_value, "custom binary search"), -1);
- ERR_FAIL_NULL_V(p_obj, 0);
_ArrayVariantSortCustom less;
- less.obj = p_obj;
- less.func = p_function;
+ less.func = p_callable;
return bisect(_p->array, p_value, p_before, less);
}
diff --git a/core/variant/array.h b/core/variant/array.h
index 26de5477b4..d8f2402330 100644
--- a/core/variant/array.h
+++ b/core/variant/array.h
@@ -37,6 +37,7 @@ class Variant;
class ArrayPrivate;
class Object;
class StringName;
+class Callable;
class Array {
mutable ArrayPrivate *_p;
@@ -78,10 +79,10 @@ public:
Variant back() const;
void sort();
- void sort_custom(Object *p_obj, const StringName &p_function);
+ void sort_custom(Callable p_callable);
void shuffle();
int bsearch(const Variant &p_value, bool p_before = true);
- int bsearch_custom(const Variant &p_value, Object *p_obj, const StringName &p_function, bool p_before = true);
+ int bsearch_custom(const Variant &p_value, Callable p_callable, bool p_before = true);
void invert();
int find(const Variant &p_value, int p_from = 0) const;
diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp
index 7824776fdb..015cee09a7 100644
--- a/core/variant/variant.cpp
+++ b/core/variant/variant.cpp
@@ -2023,7 +2023,7 @@ Variant::operator Color() const {
if (type == COLOR) {
return *reinterpret_cast<const Color *>(_data._mem);
} else if (type == STRING) {
- return Color::html(operator String());
+ return Color(operator String());
} else if (type == INT) {
return Color::hex(operator int());
} else {
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 85e3b29279..54ca1a911d 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -929,7 +929,7 @@ static void _register_variant_builtin_methods() {
bind_method(String, get_extension, sarray(), varray());
bind_method(String, get_basename, sarray(), varray());
bind_method(String, plus_file, sarray("file"), varray());
- bind_method(String, ord_at, sarray("at"), varray());
+ bind_method(String, unicode_at, sarray("at"), varray());
bind_method(String, dedent, sarray(), varray());
// FIXME: String needs to be immutable when binding
//bind_method(String, erase, sarray("position", "chars"), varray());
@@ -950,13 +950,11 @@ static void _register_variant_builtin_methods() {
bind_method(String, get_file, sarray(), varray());
bind_method(String, xml_escape, sarray("escape_quotes"), varray(false));
bind_method(String, xml_unescape, sarray(), varray());
- bind_method(String, http_escape, sarray(), varray());
- bind_method(String, http_unescape, sarray(), varray());
+ bind_method(String, uri_encode, sarray(), varray());
+ bind_method(String, uri_decode, sarray(), varray());
bind_method(String, c_escape, sarray(), varray());
bind_method(String, c_unescape, sarray(), varray());
bind_method(String, json_escape, sarray(), varray());
- bind_method(String, percent_encode, sarray(), varray());
- bind_method(String, percent_decode, sarray(), varray());
bind_method(String, is_valid_identifier, sarray(), varray());
bind_method(String, is_valid_integer, sarray(), varray());
@@ -968,8 +966,8 @@ static void _register_variant_builtin_methods() {
bind_method(String, to_int, sarray(), varray());
bind_method(String, to_float, sarray(), varray());
- bind_method(String, hex_to_int, sarray("with_prefix"), varray(true));
- bind_method(String, bin_to_int, sarray("with_prefix"), varray(true));
+ bind_method(String, hex_to_int, sarray(), varray());
+ bind_method(String, bin_to_int, sarray(), varray());
bind_method(String, lpad, sarray("min_length", "character"), varray(" "));
bind_method(String, rpad, sarray("min_length", "character"), varray(" "));
@@ -1061,6 +1059,7 @@ static void _register_variant_builtin_methods() {
bind_method(Vector3, min_axis, sarray(), varray());
bind_method(Vector3, max_axis, sarray(), varray());
bind_method(Vector3, angle_to, sarray("to"), varray());
+ bind_method(Vector3, signed_angle_to, sarray("to", "axis"), varray());
bind_method(Vector3, direction_to, sarray("b"), varray());
bind_method(Vector3, distance_to, sarray("b"), varray());
bind_method(Vector3, distance_squared_to, sarray("b"), varray());
@@ -1126,10 +1125,6 @@ static void _register_variant_builtin_methods() {
bind_method(Quat, cubic_slerp, sarray("b", "pre_a", "post_b", "weight"), varray());
bind_method(Quat, get_euler, sarray(), varray());
- // FIXME: Quat is atomic, this should be done via construcror
- //ADDFUNC1(QUAT, NIL, Quat, set_euler, VECTOR3, "euler", varray());
- //ADDFUNC2(QUAT, NIL, Quat, set_axis_angle, VECTOR3, "axis", FLOAT, "angle", varray());
-
/* Color */
bind_method(Color, to_argb32, sarray(), varray());
@@ -1216,7 +1211,7 @@ static void _register_variant_builtin_methods() {
bind_method(Basis, transposed, sarray(), varray());
bind_method(Basis, orthonormalized, sarray(), varray());
bind_method(Basis, determinant, sarray(), varray());
- bind_methodv(Basis, rotated, static_cast<Basis (Basis::*)(const Vector3 &, float) const>(&Basis::rotated), sarray("axis", "phi"), varray());
+ bind_methodv(Basis, rotated, static_cast<Basis (Basis::*)(const Vector3 &, real_t) const>(&Basis::rotated), sarray("axis", "phi"), varray());
bind_method(Basis, scaled, sarray("scale"), varray());
bind_method(Basis, get_scale, sarray(), varray());
bind_method(Basis, get_euler, sarray(), varray());
@@ -1262,7 +1257,7 @@ static void _register_variant_builtin_methods() {
bind_method(Transform, rotated, sarray("axis", "phi"), varray());
bind_method(Transform, scaled, sarray("scale"), varray());
bind_method(Transform, translated, sarray("offset"), varray());
- bind_method(Transform, looking_at, sarray("target", "up"), varray());
+ bind_method(Transform, looking_at, sarray("target", "up"), varray(Vector3(0, 1, 0)));
bind_method(Transform, interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform, is_equal_approx, sarray("xform"), varray());
@@ -1304,10 +1299,10 @@ static void _register_variant_builtin_methods() {
bind_method(Array, pop_back, sarray(), varray());
bind_method(Array, pop_front, sarray(), varray());
bind_method(Array, sort, sarray(), varray());
- bind_method(Array, sort_custom, sarray("obj", "func"), varray());
+ bind_method(Array, sort_custom, sarray("func"), varray());
bind_method(Array, shuffle, sarray(), varray());
bind_method(Array, bsearch, sarray("value", "before"), varray(true));
- bind_method(Array, bsearch_custom, sarray("value", "obj", "func", "before"), varray(true));
+ bind_method(Array, bsearch_custom, sarray("value", "func", "before"), varray(true));
bind_method(Array, invert, sarray(), varray());
bind_method(Array, duplicate, sarray("deep"), varray(false));
bind_method(Array, slice, sarray("begin", "end", "step", "deep"), varray(1, false));
diff --git a/core/variant/variant_construct.cpp b/core/variant/variant_construct.cpp
index 9835734583..52f9f6060e 100644
--- a/core/variant/variant_construct.cpp
+++ b/core/variant/variant_construct.cpp
@@ -688,6 +688,8 @@ void Variant::_register_variant_constructors() {
add_constructor<VariantConstructor<Color, Color, double>>(sarray("from", "alpha"));
add_constructor<VariantConstructor<Color, double, double, double>>(sarray("r", "g", "b"));
add_constructor<VariantConstructor<Color, double, double, double, double>>(sarray("r", "g", "b", "a"));
+ add_constructor<VariantConstructor<Color, String>>(sarray("code"));
+ add_constructor<VariantConstructor<Color, String, double>>(sarray("code", "alpha"));
add_constructor<VariantConstructNoArgs<StringName>>(sarray());
add_constructor<VariantConstructor<StringName, StringName>>(sarray("from"));
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index bf81362e79..e5bcc773fe 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -2147,7 +2147,25 @@
<constant name="JOY_BUTTON_DPAD_RIGHT" value="14" enum="JoyButtonList">
Game controller D-pad right button.
</constant>
- <constant name="JOY_BUTTON_SDL_MAX" value="15" enum="JoyButtonList">
+ <constant name="JOY_BUTTON_MISC1" value="15" enum="JoyButtonList">
+ Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo capture button.
+ </constant>
+ <constant name="JOY_BUTTON_PADDLE1" value="16" enum="JoyButtonList">
+ Game controller SDL paddle 1 button.
+ </constant>
+ <constant name="JOY_BUTTON_PADDLE2" value="17" enum="JoyButtonList">
+ Game controller SDL paddle 2 button.
+ </constant>
+ <constant name="JOY_BUTTON_PADDLE3" value="18" enum="JoyButtonList">
+ Game controller SDL paddle 3 button.
+ </constant>
+ <constant name="JOY_BUTTON_PADDLE4" value="19" enum="JoyButtonList">
+ Game controller SDL paddle 4 button.
+ </constant>
+ <constant name="JOY_BUTTON_TOUCHPAD" value="20" enum="JoyButtonList">
+ Game controller SDL touchpad button.
+ </constant>
+ <constant name="JOY_BUTTON_SDL_MAX" value="21" enum="JoyButtonList">
The number of SDL game controller buttons.
</constant>
<constant name="JOY_BUTTON_MAX" value="36" enum="JoyButtonList">
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index e1fb78e5b5..02ccab4e05 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -49,6 +49,11 @@
</member>
</members>
<signals>
+ <signal name="animation_finished">
+ <description>
+ Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
+ </description>
+ </signal>
<signal name="frame_changed">
<description>
Emitted when [member frame] changed.
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index db5d377c62..cea5360234 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -191,11 +191,9 @@
</return>
<argument index="0" name="value" type="Variant">
</argument>
- <argument index="1" name="obj" type="Object">
+ <argument index="1" name="func" type="Callable">
</argument>
- <argument index="2" name="func" type="StringName">
- </argument>
- <argument index="3" name="before" type="bool" default="true">
+ <argument index="2" name="before" type="bool" default="true">
</argument>
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
@@ -234,7 +232,9 @@
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Removes the first occurrence of a value from the array.
+ Removes the first occurrence of a value from the array. To remove an element by index, use [method remove] instead.
+ [b]Note:[/b] This method acts in-place and doesn't return a value.
+ [b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
</description>
</method>
<method name="find">
@@ -311,7 +311,8 @@
<return type="int">
</return>
<description>
- Returns a hashed integer value representing the array contents.
+ Returns a hashed integer value representing the array and its contents.
+ [b]Note:[/b] Arrays with equal contents can still produce different hashes. Only the exact same arrays will produce the same hashed integer value.
</description>
</method>
<method name="insert">
@@ -323,6 +324,8 @@
</argument>
<description>
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]).
+ [b]Note:[/b] This method acts in-place and doesn't return a value.
+ [b]Note:[/b] On large arrays, this method will be slower if the inserted element is close to the beginning of the array (index 0). This is because all elements placed after the newly inserted element have to be reindexed.
</description>
</method>
<method name="invert">
@@ -421,14 +424,15 @@
<return type="Variant">
</return>
<description>
- Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message.
+ Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_front].
</description>
</method>
<method name="pop_front">
<return type="Variant">
</return>
<description>
- Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message.
+ Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_back].
+ [b]Note:[/b] On large arrays, this method is much slower than [method pop_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method pop_front] will be.
</description>
</method>
<method name="push_back">
@@ -437,7 +441,7 @@
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Appends an element at the end of the array.
+ Appends an element at the end of the array. See also [method push_front].
</description>
</method>
<method name="push_front">
@@ -446,7 +450,8 @@
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Adds an element at the beginning of the array.
+ Adds an element at the beginning of the array. See also [method push_back].
+ [b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be.
</description>
</method>
<method name="remove">
@@ -455,7 +460,9 @@
<argument index="0" name="position" type="int">
</argument>
<description>
- Removes an element from the array by index. If the index does not exist in the array, nothing happens.
+ Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use [method erase] instead.
+ [b]Note:[/b] This method acts in-place and doesn't return a value.
+ [b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
</description>
</method>
<method name="resize">
@@ -528,12 +535,10 @@
<method name="sort_custom">
<return type="void">
</return>
- <argument index="0" name="obj" type="Object">
- </argument>
- <argument index="1" name="func" type="StringName">
+ <argument index="0" name="func" type="Callable">
</argument>
<description>
- 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 either [code]true[/code] or [code]false[/code].
+ Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code].
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblocks]
[gdscript]
@@ -544,7 +549,7 @@
return false
var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]]
- my_items.sort_custom(MyCustomSorter, "sort_ascending")
+ my_items.sort_custom(MyCustomSorter.sort_ascending)
print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]].
[/gdscript]
[csharp]
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 1f532f4843..e2c4ed1430 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -215,6 +215,8 @@
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
</member>
+ <member name="shadow_mesh" type="ArrayMesh" setter="set_shadow_mesh" getter="get_shadow_mesh">
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml
new file mode 100644
index 0000000000..cf3d87c2e4
--- /dev/null
+++ b/doc/classes/AudioEffectCapture.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectCapture" inherits="AudioEffect" version="4.0">
+ <brief_description>
+ Captures audio from an audio bus in real-time.
+ </brief_description>
+ <description>
+ AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer.
+ Application code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from a microphone, implement application defined effects, or to transmit audio over the network.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="can_get_buffer" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="frames" type="int">
+ </argument>
+ <description>
+ Returns [code]true[/code] if at least [code]frames[/code] audio frames are available to read in the internal ring buffer.
+ </description>
+ </method>
+ <method name="clear_buffer">
+ <return type="void">
+ </return>
+ <description>
+ Clears the internal ring buffer.
+ </description>
+ </method>
+ <method name="get_buffer">
+ <return type="PackedVector2Array">
+ </return>
+ <argument index="0" name="frames" type="int">
+ </argument>
+ <description>
+ Gets the next [code]frames[/code] audio samples from the internal ring buffer.
+ Returns a [PackedVector2Array] containing exactly [code]frames[/code] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available.
+ </description>
+ </method>
+ <method name="get_buffer_length_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the total size of the internal ring buffer in frames.
+ </description>
+ </method>
+ <method name="get_discarded_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of audio frames discarded from the audio bus due to full buffer.
+ </description>
+ </method>
+ <method name="get_frames_available" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of frames available to read using [method get_buffer].
+ </description>
+ </method>
+ <method name="get_pushed_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of audio frames inserted from the audio bus.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.1">
+ Length of the internal ring buffer, in seconds.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index e47198a381..96ff5e0293 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -118,17 +118,20 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default text [Color] of the [Button].
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
Text [Color] used when the [Button] is disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Text [Color] used when the [Button] is being hovered.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
- Text [Color] used when the [Button] is being pressed.
+ <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [Button] is being hovered and pressed.
+ </theme_item>
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [Button].
</theme_item>
- <theme_item name="font_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- Text oubline [Color] of the [Button].
+ <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
Font size of the [Button]'s text.
@@ -139,11 +142,26 @@
<theme_item name="hseparation" type="int" default="2">
The horizontal space between [Button]'s icon and text.
</theme_item>
+ <theme_item name="icon_disabled_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Icon modulate [Color] used when the [Button] is disabled.
+ </theme_item>
+ <theme_item name="icon_hover_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Icon modulate [Color] used when the [Button] is being hovered.
+ </theme_item>
+ <theme_item name="icon_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Icon modulate [Color] used when the [Button] is being hovered and pressed.
+ </theme_item>
+ <theme_item name="icon_normal_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Default icon modulate [Color] of the [Button].
+ </theme_item>
+ <theme_item name="icon_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Icon modulate [Color] used when the [Button] is being pressed.
+ </theme_item>
<theme_item name="normal" type="StyleBox">
Default [StyleBox] for the [Button].
</theme_item>
<theme_item name="outline_size" type="int" default="0">
- Size of the [Button]'s text outline.
+ The size of the text outline.
</theme_item>
<theme_item name="pressed" type="StyleBox">
[StyleBox] used when the [Button] is being pressed.
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 89fb960e88..80febfbfe7 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -36,16 +36,19 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
The [CheckBox] text's font color.
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
The [CheckBox] text's font color when it's disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
The [CheckBox] text's font color when it's hovered.
</theme_item>
- <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
The [CheckBox] text's font color when it's hovered and pressed.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [CheckBox].
+ </theme_item>
+ <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
The [CheckBox] text's font color when it's pressed.
</theme_item>
<theme_item name="font_size" type="int">
@@ -63,6 +66,9 @@
<theme_item name="normal" type="StyleBox">
The [StyleBox] to display as a background.
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="pressed" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is pressed.
</theme_item>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index 882f1c69f3..46e590a115 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -33,16 +33,19 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
The [CheckButton] text's font color.
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
The [CheckButton] text's font color when it's disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
The [CheckButton] text's font color when it's hovered.
</theme_item>
- <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
The [CheckButton] text's font color when it's hovered and pressed.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [CheckButton].
+ </theme_item>
+ <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
The [CheckButton] text's font color when it's pressed.
</theme_item>
<theme_item name="font_size" type="int">
@@ -84,6 +87,9 @@
<theme_item name="on_mirrored" type="Texture2D">
The icon to display when the [CheckButton] is checked (for right-to-left layouts).
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="pressed" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is pressed.
</theme_item>
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index 8834ff82c6..d1483ac88e 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -179,9 +179,12 @@
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
</theme_item>
- <theme_item name="font_color_readonly" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [CodeEdit].
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ </theme_item>
+ <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )">
</theme_item>
<theme_item name="font_size" type="int">
Font size of the [CodeEdit]'s text.
@@ -194,6 +197,9 @@
</theme_item>
<theme_item name="normal" type="StyleBox">
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="read_only" type="StyleBox">
</theme_item>
<theme_item name="safe_line_number_color" type="Color" default="Color( 0.67, 0.78, 0.67, 0.6 )">
diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml
index 7a1dad547b..f078e4e5b0 100644
--- a/doc/classes/CodeHighlighter.xml
+++ b/doc/classes/CodeHighlighter.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CodeHighlighter" inherits="SyntaxHighlighter" version="4.0">
<brief_description>
+ A syntax highlighter for code.
</brief_description>
<description>
+ A syntax highlighter for code.
</description>
<tutorials>
</tutorials>
@@ -10,15 +12,18 @@
<method name="add_color_region">
<return type="void">
</return>
- <argument index="0" name="p_start_key" type="String">
+ <argument index="0" name="start_key" type="String">
</argument>
- <argument index="1" name="p_end_key" type="String">
+ <argument index="1" name="end_key" type="String">
</argument>
- <argument index="2" name="p_color" type="Color">
+ <argument index="2" name="color" type="Color">
</argument>
- <argument index="3" name="p_line_only" type="bool" default="false">
+ <argument index="3" name="line_only" type="bool" default="false">
</argument>
<description>
+ Adds a color region such as comments or strings.
+ Both the start and end keys must be symbols. Only the start key has to be unique.
+ Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code].
</description>
</method>
<method name="add_keyword_color">
@@ -29,6 +34,8 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
+ Sets the color for a keyword.
+ The keyword cannot contain any symbols except '_'.
</description>
</method>
<method name="add_member_keyword_color">
@@ -39,24 +46,30 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
+ Sets the color for a member keyword.
+ The member keyword cannot contain any symbols except '_'.
+ It will not be highlighted if preceded by a '.'.
</description>
</method>
<method name="clear_color_regions">
<return type="void">
</return>
<description>
+ Removes all color regions.
</description>
</method>
<method name="clear_keyword_colors">
<return type="void">
</return>
<description>
+ Removes all keywords.
</description>
</method>
<method name="clear_member_keyword_colors">
<return type="void">
</return>
<description>
+ Removes all member keywords.
</description>
</method>
<method name="get_keyword_color" qualifiers="const">
@@ -65,6 +78,7 @@
<argument index="0" name="keyword" type="String">
</argument>
<description>
+ Returns the color for a keyword.
</description>
</method>
<method name="get_member_keyword_color" qualifiers="const">
@@ -73,14 +87,16 @@
<argument index="0" name="member_keyword" type="String">
</argument>
<description>
+ Returns the color for a member keyword.
</description>
</method>
<method name="has_color_region" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="p_start_key" type="String">
+ <argument index="0" name="start_key" type="String">
</argument>
<description>
+ Return [code]true[/code] if the start key exists, else [code]false[/code].
</description>
</method>
<method name="has_keyword_color" qualifiers="const">
@@ -89,6 +105,7 @@
<argument index="0" name="keyword" type="String">
</argument>
<description>
+ Return [code]true[/code] if the keyword exists, else [code]false[/code].
</description>
</method>
<method name="has_member_keyword_color" qualifiers="const">
@@ -97,14 +114,16 @@
<argument index="0" name="member_keyword" type="String">
</argument>
<description>
+ Return [code]true[/code] if the member keyword exists, else [code]false[/code].
</description>
</method>
<method name="remove_color_region">
<return type="void">
</return>
- <argument index="0" name="p_start_key" type="String">
+ <argument index="0" name="start_key" type="String">
</argument>
<description>
+ Removes the color region that uses that start key.
</description>
</method>
<method name="remove_keyword_color">
@@ -113,6 +132,7 @@
<argument index="0" name="keyword" type="String">
</argument>
<description>
+ Removes the keyword.
</description>
</method>
<method name="remove_member_keyword_color">
@@ -121,23 +141,31 @@
<argument index="0" name="member_keyword" type="String">
</argument>
<description>
+ Removes the member keyword.
</description>
</method>
</methods>
<members>
<member name="color_regions" type="Dictionary" setter="set_color_regions" getter="get_color_regions" default="{}">
+ Sets the color regions. All existing regions will be removed. The [Dictionary] key is the region start and end key, separated by a space. The value is the region color.
</member>
<member name="function_color" type="Color" setter="set_function_color" getter="get_function_color" default="Color( 0, 0, 0, 1 )">
+ Sets color for functions. A function is a non-keyword string followed by a '('.
</member>
<member name="keyword_colors" type="Dictionary" setter="set_keyword_colors" getter="get_keyword_colors" default="{}">
+ Sets the keyword colors. All existing keywords will be removed. The [Dictionary] key is the keyword. The value is the keyword color.
</member>
<member name="member_keyword_colors" type="Dictionary" setter="set_member_keyword_colors" getter="get_member_keyword_colors" default="{}">
+ Sets the member keyword colors. All existing member keyword will be removed. The [Dictionary] key is the member keyword. The value is the member keyword color.
</member>
<member name="member_variable_color" type="Color" setter="set_member_variable_color" getter="get_member_variable_color" default="Color( 0, 0, 0, 1 )">
+ Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'.
</member>
<member name="number_color" type="Color" setter="set_number_color" getter="get_number_color" default="Color( 0, 0, 0, 1 )">
+ Sets the color for numbers.
</member>
<member name="symbol_color" type="Color" setter="set_symbol_color" getter="get_symbol_color" default="Color( 0, 0, 0, 1 )">
+ Sets the color for symbols.
</member>
</members>
<constants>
diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml
index dd3c57d1d0..38f4c5fe5c 100644
--- a/doc/classes/CollisionPolygon3D.xml
+++ b/doc/classes/CollisionPolygon3D.xml
@@ -17,6 +17,9 @@
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], no collision will be produced.
</member>
+ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
+ The collision margin for the generated [Shape3D]. See [member Shape3D.margin] for more details.
+ </member>
<member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
Array of vertices which define the polygon.
[b]Note:[/b] 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.
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 8af5f29b65..ce88e0ae88 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
- You can also create a color from standardized color names by using [code]ColorN[/code] ([b]FIXME:[/b] No longer true, a Color(String) constructor should be re-implemented for that) or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
+ You can also create a color from standardized color names by using the string constructor or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url]
@@ -54,6 +54,26 @@
<method name="Color" qualifiers="constructor">
<return type="Color">
</return>
+ <argument index="0" name="code" type="String">
+ </argument>
+ <argument index="1" name="alpha" type="float">
+ </argument>
+ <description>
+ Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants.
+ </description>
+ </method>
+ <method name="Color" qualifiers="constructor">
+ <return type="Color">
+ </return>
+ <argument index="0" name="code" type="String">
+ </argument>
+ <description>
+ Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants.
+ </description>
+ </method>
+ <method name="Color" qualifiers="constructor">
+ <return type="Color">
+ </return>
<argument index="0" name="r" type="float">
</argument>
<argument index="1" name="g" type="float">
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index c04e8b9ea0..e49027e61d 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -73,13 +73,16 @@
<theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
Default text [Color] of the [ColorPickerButton].
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )">
Text [Color] used when the [ColorPickerButton] is disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [ColorPickerButton] is being hovered.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [ColorPickerButton].
+ </theme_item>
+ <theme_item name="font_pressed_color" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )">
Text [Color] used when the [ColorPickerButton] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
@@ -94,6 +97,9 @@
<theme_item name="normal" type="StyleBox">
Default [StyleBox] for the [ColorPickerButton].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="pressed" type="StyleBox">
[StyleBox] used when the [ColorPickerButton] is being pressed.
</theme_item>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 533748aced..e5285587eb 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -16,8 +16,9 @@
[b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class.
</description>
<tutorials>
- <link title="GUI tutorial index">https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link>
+ <link title="GUI tutorial index">https://docs.godotengine.org/en/latest/tutorials/ui/index.html</link>
<link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="Control node gallery">https://docs.godotengine.org/en/latest/tutorials/ui/control_node_gallery.html</link>
<link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link>
</tutorials>
<methods>
@@ -306,6 +307,20 @@
[/codeblocks]
</description>
</method>
+ <method name="find_next_valid_focus" qualifiers="const">
+ <return type="Control">
+ </return>
+ <description>
+ Finds the next (below in the tree) [Control] that can receive the focus.
+ </description>
+ </method>
+ <method name="find_prev_valid_focus" qualifiers="const">
+ <return type="Control">
+ </return>
+ <description>
+ Finds the previous (above in the tree) [Control] that can receive the focus.
+ </description>
+ </method>
<method name="force_drag">
<return type="void">
</return>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index d91ea6528a..a4b5e28797 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -635,6 +635,42 @@
<description>
</description>
</method>
+ <method name="tablet_get_current_driver" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns current active tablet driver name.
+ [b]Note:[/b] This method is implemented on Windows.
+ </description>
+ </method>
+ <method name="tablet_get_driver_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the total number of available tablet drivers.
+ [b]Note:[/b] This method is implemented on Windows.
+ </description>
+ </method>
+ <method name="tablet_get_driver_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the tablet driver name for the given index.
+ [b]Note:[/b] This method is implemented on Windows.
+ </description>
+ </method>
+ <method name="tablet_set_current_driver">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Set active tablet driver name.
+ [b]Note:[/b] This method is implemented on Windows.
+ </description>
+ </method>
<method name="virtual_keyboard_get_height" qualifiers="const">
<return type="int">
</return>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index e5401134bf..aa64ab4043 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -16,7 +16,7 @@
return "my.special.plugin"
func get_visible_name():
- return "Special Mesh Importer"
+ return "Special Mesh"
func get_recognized_extensions():
return ["special", "spec"]
@@ -44,8 +44,7 @@
# Fill the Mesh with data read in "file", left as an exercise to the reader.
var filename = save_path + "." + get_save_extension()
- ResourceSaver.save(filename, mesh)
- return OK
+ return ResourceSaver.save(filename, mesh)
[/gdscript]
[csharp]
using Godot;
@@ -60,7 +59,7 @@
public override String GetVisibleName()
{
- return "Special Mesh Importer";
+ return "Special Mesh";
}
public override Godot.Collections.Array GetRecognizedExtensions()
@@ -104,8 +103,7 @@
var mesh = new ArrayMesh();
// Fill the Mesh with data read in "file", left as an exercise to the reader.
String filename = savePath + "." + GetSaveExtension();
- ResourceSaver.Save(filename, mesh);
- return (int)Error.Ok;
+ return (int)ResourceSaver.Save(filename, mesh);
}
}
[/csharp]
@@ -220,7 +218,7 @@
<return type="String">
</return>
<description>
- Gets the name to display in the import window.
+ Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh".
</description>
</method>
<method name="import" qualifiers="virtual">
diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml
index 103d95e1d6..b80e81928f 100644
--- a/doc/classes/EditorSyntaxHighlighter.xml
+++ b/doc/classes/EditorSyntaxHighlighter.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorSyntaxHighlighter" inherits="SyntaxHighlighter" version="4.0">
<brief_description>
+ Base Syntax highlighter resource for the [ScriptEditor].
</brief_description>
<description>
+ Base syntax highlighter resource all editor syntax highlighters extend from, it is used in the [ScriptEditor].
+ Add a syntax highlighter to an individual script by calling [method ScriptEditorBase.add_syntax_highlighter]. To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter]
</description>
<tutorials>
</tutorials>
@@ -11,18 +14,21 @@
<return type="String">
</return>
<description>
+ Virtual method which can be overridden to return the syntax highlighter name.
</description>
</method>
<method name="_get_supported_extentions" qualifiers="virtual">
<return type="Array">
</return>
<description>
+ Virtual method which can be overridden to return the supported file extensions.
</description>
</method>
<method name="_get_supported_languages" qualifiers="virtual">
<return type="Array">
</return>
<description>
+ Virtual method which can be overridden to return the supported language names.
</description>
</method>
</methods>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 9dd4ecc37b..a986ec35c6 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -265,7 +265,9 @@
</member>
<member name="volumetric_fog_light_energy" type="float" setter="set_volumetric_fog_light_energy" getter="get_volumetric_fog_light_energy" default="1.0">
</member>
- <member name="volumetric_fog_shadow_filter" type="int" setter="set_volumetric_fog_shadow_filter" getter="get_volumetric_fog_shadow_filter" enum="Environment.VolumetricFogShadowFilter" default="1">
+ <member name="volumetric_fog_temporal_reprojection_amount" type="float" setter="set_volumetric_fog_temporal_reprojection_amount" getter="get_volumetric_fog_temporal_reprojection_amount" default="0.9">
+ </member>
+ <member name="volumetric_fog_temporal_reprojection_enabled" type="bool" setter="set_volumetric_fog_temporal_reprojection_enabled" getter="is_volumetric_fog_temporal_reprojection_enabled" default="true">
</member>
</members>
<constants>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 2f7ac551cf..e0781e807f 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -42,6 +42,7 @@
[/codeblocks]
In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] documentation.
[b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [File] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package.
+ [b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [b]Alt + F4[/b]). If you stop the project execution by pressing [b]F8[/b] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals.
</description>
<tutorials>
<link title="File system">https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link>
@@ -52,7 +53,7 @@
<return type="void">
</return>
<description>
- Closes the currently opened file.
+ Closes the currently opened file and prevents subsequent read/write operations. Use [method flush] to persist the data to disk without closing the file.
</description>
</method>
<method name="eof_reached" qualifiers="const">
@@ -73,6 +74,14 @@
[b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account.
</description>
</method>
+ <method name="flush">
+ <return type="void">
+ </return>
+ <description>
+ Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [method flush] manually before closing a file using [method close]. Still, calling [method flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully.
+ [b]Note:[/b] Only call [method flush] when you actually need it. Otherwise, it will decrease performance due to constant disk writes.
+ </description>
+ </method>
<method name="get_16" qualifiers="const">
<return type="int">
</return>
@@ -481,8 +490,9 @@
</methods>
<members>
<member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap" default="false">
- If [code]true[/code], the file's endianness is swapped. Use this if you're dealing with files written on big-endian machines.
- [b]Note:[/b] This is about the file format, not CPU type. This is always reset to [code]false[/code] whenever you open the file.
+ If [code]true[/code], the file is read with big-endian [url=https://en.wikipedia.org/wiki/Endianness]endianness[/url]. If [code]false[/code], the file is read with little-endian endianness. If in doubt, leave this to [code]false[/code] as most files are written with little-endian endianness.
+ [b]Note:[/b] [member endian_swap] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written.
+ [b]Note:[/b] This is always reset to [code]false[/code] whenever you open the file. Therefore, you must set [member endian_swap] [i]after[/i] opening the file, not before.
</member>
</members>
<constants>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index edd2bd137f..409e405551 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -329,10 +329,10 @@
</methods>
<members>
<member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing at the bottom in pixels.
+ Extra spacing at the bottom of the line in pixels.
</member>
<member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra character spacing in pixels.
+ Extra spacing at the top of the line in pixels.
</member>
</members>
<constants>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
index e2c35f9ce7..7e99510124 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontData.xml
@@ -154,6 +154,15 @@
Returns list of script support overrides.
</description>
</method>
+ <method name="get_spacing" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="type" type="int">
+ </argument>
+ <description>
+ Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
+ </description>
+ </method>
<method name="get_supported_chars" qualifiers="const">
<return type="String">
</return>
@@ -296,6 +305,17 @@
Adds override for [method is_script_supported].
</description>
</method>
+ <method name="set_spacing">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
+ </description>
+ </method>
<method name="set_variation">
<return type="void">
</return>
@@ -318,6 +338,14 @@
<member name="distance_field_hint" type="bool" setter="set_distance_field_hint" getter="get_distance_field_hint" default="false">
If [code]true[/code], distance field hint is enabled.
</member>
+ <member name="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing for each glyphs in pixels.
+ This can be a negative number to make the distance between glyphs smaller.
+ </member>
+ <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing for the space character in pixels.
+ This can be a negative number to make the distance between words smaller.
+ </member>
<member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="get_force_autohinter" default="false">
If [code]true[/code], default autohinter is used for font hinting.
</member>
@@ -326,5 +354,11 @@
</member>
</members>
<constants>
+ <constant name="SPACING_GLYPH" value="0" enum="SpacingType">
+ Spacing for each glyph.
+ </constant>
+ <constant name="SPACING_SPACE" value="1" enum="SpacingType">
+ Spacing for the space character.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index 4b0ea4dcb1..3a126d89e9 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -260,6 +260,13 @@
Emitted when the GraphNode is moved.
</description>
</signal>
+ <signal name="slot_updated">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Emitted when any GraphNode's slot is updated.
+ </description>
+ </signal>
<signal name="raise_request">
<description>
Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index b6594aac39..9ff682f79d 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -175,7 +175,7 @@
var result = new HTTPClient().Request(HTTPClient.Method.Post, "index.php", headers, queryString);
[/csharp]
[/codeblocks]
- [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.http_escape] for an example.
+ [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example.
</description>
</method>
<method name="request_raw">
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index f2ab93033a..a65f66c72a 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -203,7 +203,7 @@
<description>
Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request].
Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host.
- [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.http_escape] for an example.
+ [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example.
</description>
</method>
<method name="request_raw">
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 2c322027e7..ffeb45907d 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -615,7 +615,10 @@
<theme_item name="font_color" type="Color" default="Color( 0.63, 0.63, 0.63, 1 )">
Default text [Color] of the item.
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the item.
+ </theme_item>
+ <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the item is selected.
</theme_item>
<theme_item name="font_size" type="int">
@@ -633,6 +636,9 @@
<theme_item name="line_separation" type="int" default="2">
The vertical spacing between each line of text.
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the item text outline.
+ </theme_item>
<theme_item name="selected" type="StyleBox">
[StyleBox] for the selected items, used when the [ItemList] is not being focused.
</theme_item>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 1edf31de4a..8574ff9836 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -150,12 +150,12 @@
<theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
Default text [Color] of the [Label].
</theme_item>
- <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )">
- [Color] of the text's shadow effect.
- </theme_item>
- <theme_item name="font_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
The tint of [Font]'s outline.
</theme_item>
+ <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 0 )">
+ [Color] of the text's shadow effect.
+ </theme_item>
<theme_item name="font_size" type="int">
Font size of the [Label]'s text.
</theme_item>
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index 6c008e4f7e..111473e098 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -78,7 +78,7 @@
<member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false">
If [code]true[/code], the light will cast shadows.
</member>
- <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="1.0">
+ <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="0.1">
</member>
<member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="2.0">
Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using [member shadow_bias]. In practice, this value should be tweaked along with [member shadow_bias] to reduce artifacts as much as possible.
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index f05121d48c..a6dcabb168 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -380,21 +380,27 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default font color.
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
- Font color for selected text (inside the selection rectangle).
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [LineEdit].
</theme_item>
- <theme_item name="font_color_uneditable" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
- Font color when editing is disabled.
+ <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )">
+ Font color for selected text (inside the selection rectangle).
</theme_item>
<theme_item name="font_size" type="int">
Font size of the [LineEdit]'s text.
</theme_item>
+ <theme_item name="font_uneditable_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ Font color when editing is disabled.
+ </theme_item>
<theme_item name="minimum_spaces" type="int" default="12">
Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of space characters (i.e. this amount of space characters can be displayed without scrolling).
</theme_item>
<theme_item name="normal" type="StyleBox">
Default background for the [LineEdit].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="read_only" type="StyleBox">
Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]).
</theme_item>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 93384843de..6e2f4399b3 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -81,15 +81,21 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default text [Color] of the [LinkButton].
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Text [Color] used when the [LinkButton] is being hovered.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [LinkButton].
+ </theme_item>
+ <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [LinkButton] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
Font size of the [LinkButton]'s text.
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="underline_spacing" type="int" default="2">
The vertical space between the baseline of text and the underline.
</theme_item>
diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml
index 10a7061bef..0d287a5d1d 100644
--- a/doc/classes/Material.xml
+++ b/doc/classes/Material.xml
@@ -11,6 +11,12 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
+ <method name="inspect_native_shader_code">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass">
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index a002ce636b..481b737eee 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -59,13 +59,16 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default text [Color] of the [MenuButton].
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 1, 1, 1, 0.3 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 1, 1, 1, 0.3 )">
Text [Color] used when the [MenuButton] is disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Text [Color] used when the [MenuButton] is being hovered.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [MenuButton].
+ </theme_item>
+ <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [MenuButton] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
@@ -80,6 +83,9 @@
<theme_item name="normal" type="StyleBox">
Default [StyleBox] for the [MenuButton].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="pressed" type="StyleBox">
[StyleBox] used when the [MenuButton] is being pressed.
</theme_item>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index fcc259fb44..c168695d61 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -4,9 +4,10 @@
High-level multiplayer API.
</brief_description>
<description>
- This class implements most of the logic behind the high-level multiplayer API.
+ This class implements most of the logic behind the high-level multiplayer API. See also [NetworkedMultiplayerPeer].
By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene.
It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the [member Node.custom_multiplayer] property, effectively allowing to run both client and server in the same scene.
+ [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml
index 954d31794a..06ea46f023 100644
--- a/doc/classes/NetworkedMultiplayerPeer.xml
+++ b/doc/classes/NetworkedMultiplayerPeer.xml
@@ -4,7 +4,8 @@
A high-level network interface to simplify multiplayer interactions.
</brief_description>
<description>
- Manages the connection to network peers. Assigns unique IDs to each client connected to the server.
+ Manages the connection to network peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI].
+ [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
</description>
<tutorials>
<link title="High-level multiplayer">https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index e8913f2623..5f0d6462e2 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -623,10 +623,11 @@
</return>
<argument index="0" name="node" type="Node">
</argument>
- <argument index="1" name="keep_data" type="bool" default="false">
+ <argument index="1" name="keep_groups" type="bool" default="false">
</argument>
<description>
Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
+ If [code]keep_groups[/code] is [code]true[/code], the [code]node[/code] is added to the same groups that the replaced node is in.
</description>
</method>
<method name="request_ready">
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index ed94f9d90f..ffcd0d4c98 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -304,22 +304,12 @@
[b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.
</description>
</method>
- <method name="get_tablet_driver_count" qualifiers="const">
+ <method name="get_thread_caller_id" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the total number of available tablet drivers.
- [b]Note:[/b] This method is implemented on Windows.
- </description>
- </method>
- <method name="get_tablet_driver_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the tablet driver name for the given index.
- [b]Note:[/b] This method is implemented on Windows.
+ Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications.
+ [b]Note:[/b] Thread IDs are not deterministic and may be reused across application restarts.
</description>
</method>
<method name="get_ticks_msec" qualifiers="const">
@@ -555,9 +545,6 @@
<member name="low_processor_usage_mode_sleep_usec" type="int" setter="set_low_processor_usage_mode_sleep_usec" getter="get_low_processor_usage_mode_sleep_usec" default="6900">
The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage.
</member>
- <member name="tablet_driver" type="String" setter="set_current_tablet_driver" getter="get_current_tablet_driver" default="&quot;&quot;">
- The current tablet driver in use.
- </member>
</members>
<constants>
<constant name="VIDEO_DRIVER_GLES2" value="0" enum="VideoDriver">
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 6ff7e34194..f55b8597dd 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -10,11 +10,20 @@
Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory.
Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
Property membership can be tested directly in GDScript using [code]in[/code]:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var n = Node2D.new()
print("position" in n) # Prints "True".
print("other_property" in n) # Prints "False".
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var node = new Node2D();
+ // C# has no direct equivalent to GDScript's `in` operator here, but we
+ // can achieve the same behavior by performing `Get` with a null check.
+ GD.Print(node.Get("position") != null); // Prints "True".
+ GD.Print(node.Get("other_property") != null); // Prints "False".
+ [/csharp]
+ [/codeblocks]
The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code].
Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification].
[b]Note:[/b] Unlike references to a [Reference], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [Reference] for data classes instead of [Object].
@@ -96,9 +105,16 @@
</argument>
<description>
Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
- [codeblock]
- call("set", "position", Vector2(42.0, 0.0))
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var node = Node2D.new()
+ node.call("set", "position", Vector2(42, 0))
+ [/gdscript]
+ [csharp]
+ var node = new Node2D();
+ node.Call("set", "position", new Vector2(42, 0));
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
@@ -109,9 +125,16 @@
</argument>
<description>
Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
- [codeblock]
- call_deferred("set", "position", Vector2(42.0, 0.0))
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var node = Node2D.new()
+ node.call_deferred("set", "position", Vector2(42, 0))
+ [/gdscript]
+ [csharp]
+ var node = new Node2D();
+ node.CallDeferred("set", "position", new Vector2(42, 0));
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
@@ -124,9 +147,16 @@
</argument>
<description>
Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array].
- [codeblock]
- callv("set", [ "position", Vector2(42.0, 0.0) ])
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var node = Node2D.new()
+ node.callv("set", ["position", Vector2(42, 0)])
+ [/gdscript]
+ [csharp]
+ var node = new Node2D();
+ node.Callv("set", new Godot.Collections.Array { "position", new Vector2(42, 0) });
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="can_translate_messages" qualifiers="const">
@@ -148,23 +178,140 @@
<argument index="3" name="flags" type="int" default="0">
</argument>
<description>
- [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
- Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
- A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
- If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost.
- Examples:
- [codeblock]
- connect("pressed", self, "_on_Button_pressed") # BaseButton signal
- connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal
- connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal
- [/codeblock]
- An example of the relationship between [code]binds[/code] passed to [method connect] and parameters used when calling [method emit_signal]:
- [codeblock]
- connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # weapon_type and damage are passed last
- emit_signal("hit", "Dark lord", 5) # "Dark lord" and 5 are passed first
- func _on_Player_hit(hit_by, level, weapon_type, damage):
- print("Hit by %s (lvl %d) with weapon %s for %d damage" % [hit_by, level, weapon_type, damage])
- [/codeblock]
+ Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
+ [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommend modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below.
+ A signal can only be connected once to a [Callable]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
+ If the callable's target is destroyed in the game's lifecycle, the connection will be lost.
+ [b]Examples with recommended syntax:[/b]
+ Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach for both GDScript and C#.
+ [codeblocks]
+ [gdscript]
+ func _ready():
+ var button = Button.new()
+ # `button_down` here is a Signal object, and we thus call the Signal.connect() method,
+ # not Object.connect(). See discussion below for a more in-depth overview of the API.
+ button.button_down.connect(_on_button_down)
+
+ # This assumes that a `Player` class exists which defines a `hit` signal.
+ var player = Player.new()
+ # We use Signal.connect() again, and we also use the Callable.bind() method which
+ # returns a new Callable with the parameter binds.
+ player.hit.connect(_on_player_hit.bind("sword", 100))
+
+ func _on_button_down():
+ print("Button down!")
+
+ func _on_player_hit(weapon_type, damage):
+ print("Hit with weapon %s for %d damage." % [weapon_type, damage])
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ var button = new Button();
+ // C# supports passing signals as events, so we can use this idiomatic construct:
+ button.ButtonDown += OnButtonDown;
+
+ // This assumes that a `Player` class exists which defines a `Hit` signal.
+ var player = new Player();
+ // Signals as events (`player.Hit += OnPlayerHit;`) do not support argument binding. You have to use:
+ player.Hit.Connect(OnPlayerHit, new Godot.Collections.Array {"sword", 100 });
+ }
+
+ private void OnButtonDown()
+ {
+ GD.Print("Button down!");
+ }
+
+ private void OnPlayerHit(string weaponType, int damage)
+ {
+ GD.Print(String.Format("Hit with weapon {0} for {1} damage.", weaponType, damage));
+ }
+ [/csharp]
+ [/codeblocks]
+ [b][code]Object.connect()[/code] or [code]Signal.connect()[/code]?[/b]
+ As seen above, the recommended method to connect signals is not [method Object.connect]. The code block below shows the four options for connecting signals, using either this legacy method or the recommended [method Signal.connect], and using either an implicit [Callable] or a manually defined one.
+ [codeblocks]
+ [gdscript]
+ func _ready():
+ var button = Button.new()
+ # Option 1: Object.connect() with an implicit Callable for the defined function.
+ button.connect("button_down", _on_button_down)
+ # Option 2: Object.connect() with a constructed Callable using a target object and method name.
+ button.connect("button_down", Callable(self, "_on_button_down"))
+ # Option 3: Signal.connect() with an implicit Callable for the defined function.
+ button.button_down.connect(_on_button_down)
+ # Option 4: Signal.connect() with a constructed Callable using a target object and method name.
+ button.button_down.connect(Callable(self, "_on_button_down"))
+
+ func _on_button_down():
+ print("Button down!")
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ var button = new Button();
+ // Option 1: Object.Connect() with an implicit Callable for the defined function.
+ button.Connect("button_down", OnButtonDown);
+ // Option 2: Object.connect() with a constructed Callable using a target object and method name.
+ button.Connect("button_down", new Callable(self, nameof(OnButtonDown)));
+ // Option 3: Signal.connect() with an implicit Callable for the defined function.
+ button.ButtonDown.Connect(OnButtonDown);
+ // Option 3b: In C#, we can use signals as events and connect with this more idiomatic syntax:
+ button.ButtonDown += OnButtonDown;
+ // Option 4: Signal.connect() with a constructed Callable using a target object and method name.
+ button.ButtonDown.Connect(new Callable(self, nameof(OnButtonDown)));
+ }
+
+ private void OnButtonDown()
+ {
+ GD.Print("Button down!");
+ }
+ [/csharp]
+ [/codeblocks]
+ While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), option 3 offers the best validation: it will throw a compile-time error if either the [code]button_down[/code] signal or the [code]_on_button_down[/code] callable are undefined. On the other hand, option 2 only relies on string names and will only be able to validate either names at runtime: it will throw a runtime error if [code]"button_down"[/code] doesn't correspond to a signal, or if [code]"_on_button_down"[/code] is not a registered method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method.
+ [b]Parameter bindings and passing:[/b]
+ For legacy or language-specific reasons, there are also several ways to bind parameters to signals. One can pass a [code]binds[/code] [Array] to [method Object.connect] or [method Signal.connect], or use the recommended [method Callable.bind] method to create a new callable from an existing one, with the given parameter binds.
+ One can also pass additional parameters when emitting the signal with [method emit_signal]. The examples below show the relationship between those two types of parameters.
+ [codeblocks]
+ [gdscript]
+ func _ready():
+ # This assumes that a `Player` class exists which defines a `hit` signal.
+ var player = Player.new()
+ # Option 1: Using Callable.bind().
+ player.hit.connect(_on_player_hit.bind("sword", 100))
+ # Option 2: Using a `binds` Array in Signal.connect() (same syntax for Object.connect()).
+ player.hit.connect(_on_player_hit, ["sword", 100])
+
+ # Parameters added when emitting the signal are passed first.
+ player.emit_signal("hit", "Dark lord", 5)
+
+ # Four arguments, since we pass two when emitting (hit_by, level)
+ # and two when connecting (weapon_type, damage).
+ func _on_player_hit(hit_by, level, weapon_type, damage):
+ print("Hit by %s (level %d) with weapon %s for %d damage." % [hit_by, level, weapon_type, damage])
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ // This assumes that a `Player` class exists which defines a `Hit` signal.
+ var player = new Player();
+ // Option 1: Using Callable.Bind(). This way we can still use signals as events.
+ player.Hit += OnPlayerHit.Bind("sword", 100);
+ // Option 2: Using a `binds` Array in Signal.Connect() (same syntax for Object.Connect()).
+ player.Hit.Connect(OnPlayerHit, new Godot.Collections.Array{ "sword", 100 });
+
+ // Parameters added when emitting the signal are passed first.
+ player.EmitSignal("hit", "Dark lord", 5);
+ }
+
+ // Four arguments, since we pass two when emitting (hitBy, level)
+ // and two when connecting (weaponType, damage).
+ private void OnPlayerHit(string hitBy, int level, string weaponType, int damage)
+ {
+ GD.Print(String.Format("Hit by {0} (level {1}) with weapon {2} for {3} damage.", hitBy, level, weaponType, damage));
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="disconnect">
@@ -175,8 +322,7 @@
<argument index="1" name="callable" type="Callable">
</argument>
<description>
- [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
- Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code].
+ Disconnects a [code]signal[/code] from a given [code]callable[/code].
If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists.
</description>
</method>
@@ -187,10 +333,16 @@
</argument>
<description>
Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
- [codeblock]
- emit_signal("hit", weapon_type, damage)
+ [codeblocks]
+ [gdscript]
+ emit_signal("hit", "sword", 100)
emit_signal("game_over")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ EmitSignal("hit", "sword", 100);
+ EmitSignal("game_over");
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="free">
@@ -359,8 +511,7 @@
<argument index="1" name="callable" type="Callable">
</argument>
<description>
- [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
- Returns [code]true[/code] if a connection exists for a given [code]signal[/code], [code]target[/code], and [code]method[/code].
+ Returns [code]true[/code] if a connection exists for a given [code]signal[/code] and [code]callable[/code].
</description>
</method>
<method name="is_queued_for_deletion" qualifiers="const">
@@ -440,11 +591,20 @@
</argument>
<description>
Assigns a new value to the property identified by the [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Example:
- [codeblock]
- set_indexed("position", Vector2(42, 0))
- set_indexed("position:y", -10)
- print(position) # (42, -10)
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var node = Node2D.new()
+ node.set_indexed("position", Vector2(42, 0))
+ node.set_indexed("position:y", -10)
+ print(node.position) # (42, -10)
+ [/gdscript]
+ [csharp]
+ var node = new Node2D();
+ node.SetIndexed("position", new Vector2(42, 0));
+ node.SetIndexed("position:y", -10);
+ GD.Print(node.Position); // (42, -10)
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="set_message_translation">
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 53309bae96..52da08c02f 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -253,13 +253,16 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default text [Color] of the [OptionButton].
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
Text [Color] used when the [OptionButton] is disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Text [Color] used when the [OptionButton] is being hovered.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [OptionButton].
+ </theme_item>
+ <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [OptionButton] is being pressed.
</theme_item>
<theme_item name="font_size" type="int">
@@ -280,6 +283,9 @@
<theme_item name="normal_mirrored" type="StyleBox">
Default [StyleBox] for the [OptionButton] (for right-to-left layouts).
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="pressed" type="StyleBox">
[StyleBox] used when the [OptionButton] is being pressed (for left-to-right layouts).
</theme_item>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index d15bcfd114..1d9be7f165 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself.
- Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]).
+ Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see [code]owner[/code] property on [Node]).
[b]Note:[/b] The node doesn't need to own itself.
[b]Example of loading a saved scene:[/b]
[codeblocks]
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 2532af9a0c..d810774b25 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -717,19 +717,22 @@
<theme_item name="font" type="Font">
[Font] used for the menu items.
</theme_item>
+ <theme_item name="font_accelerator_color" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )">
+ The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
+ </theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
The default text [Color] for menu items' names.
</theme_item>
- <theme_item name="font_color_accel" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )">
- The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
- </theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )">
[Color] used for disabled menu items' text.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
[Color] used for the hovered text.
</theme_item>
- <theme_item name="font_color_separator" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the menu item.
+ </theme_item>
+ <theme_item name="font_separator_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
[Color] used for labeled separators' text. See [method add_separator].
</theme_item>
<theme_item name="font_size" type="int">
@@ -747,6 +750,9 @@
<theme_item name="labeled_separator_right" type="StyleBox">
[StyleBox] for the right side of labeled separator. See [method add_separator].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the item text outline.
+ </theme_item>
<theme_item name="panel" type="StyleBox">
Default [StyleBox] of the [PopupMenu] items.
</theme_item>
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index c05cbf4413..160b61c720 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -32,11 +32,17 @@
<theme_item name="font_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
The color of the text.
</theme_item>
- <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [ProgressBar].
+ </theme_item>
+ <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 1 )">
The color of the text's shadow.
</theme_item>
<theme_item name="font_size" type="int">
Font size used to draw the fill percentage if [member percent_visible] is [code]true[/code].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index a82cf9a2a9..e075ca46cf 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -469,6 +469,12 @@
<member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="" default="Vector2( 10, 10 )">
Position offset for tooltips, relative to the mouse cursor's hotspot.
</member>
+ <member name="input_devices/pen_tablet/driver" type="String" setter="" getter="">
+ Specifies the tablet driver to use. If left empty, the default driver will be used.
+ </member>
+ <member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter="">
+ Override for [member input_devices/pen_tablet/driver] on Windows.
+ </member>
<member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="false">
If [code]true[/code], allows HiDPI display on Windows and macOS. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there.
</member>
@@ -513,9 +519,6 @@
<member name="display/window/size/width" type="int" setter="" getter="" default="1024">
Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled.
</member>
- <member name="display/window/tablet_driver" type="String" setter="" getter="">
- Specifies the tablet driver to use. If left empty, the default driver will be used.
- </member>
<member name="display/window/text_name" type="String" setter="" getter="" default="&quot;&quot;">
Specifies the [TextServer] to use. If left empty, the default will be used.
</member>
@@ -1052,6 +1055,8 @@
Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS.
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead.
</member>
+ <member name="rendering/cluster_builder/max_clustered_elements" type="float" setter="" getter="" default="512">
+ </member>
<member name="rendering/environment/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )">
Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color].
</member>
@@ -1086,9 +1091,6 @@
</member>
<member name="rendering/lightmapper/probe_capture_update_speed" type="float" setter="" getter="" default="15">
</member>
- <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="128000">
- Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves.
- </member>
<member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600">
</member>
<member name="rendering/quality/2d/snap_2d_transforms_to_pixel" type="bool" setter="" getter="" default="false">
@@ -1116,6 +1118,8 @@
<member name="rendering/quality/depth_prepass/enable" type="bool" setter="" getter="" default="true">
If [code]true[/code], performs a previous depth pass before rendering materials. This increases performance in scenes with high overdraw, when complex materials and lighting are used.
</member>
+ <member name="rendering/quality/directional_shadow/16_bits" type="bool" setter="" getter="" default="true">
+ </member>
<member name="rendering/quality/directional_shadow/size" type="int" setter="" getter="" default="4096">
The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2.
</member>
@@ -1134,6 +1138,8 @@
[b]FIXME:[/b] No longer valid after DisplayServer split:
In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time.
</member>
+ <member name="rendering/quality/gi/use_half_resolution" type="bool" setter="" getter="" default="false">
+ </member>
<member name="rendering/quality/gi_probes/anisotropic" type="bool" setter="" getter="" default="false">
If [code]true[/code], take additional samples when rendering objects affected by a [GIProbe] to reduce artifacts from only sampling in one direction.
</member>
@@ -1225,7 +1231,9 @@
<member name="rendering/quality/shading/force_vertex_shading.mobile" type="bool" setter="" getter="" default="true">
Lower-end override for [member rendering/quality/shading/force_vertex_shading] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="1">
+ <member name="rendering/quality/shadow_atlas/16_bits" type="bool" setter="" getter="" default="true">
+ </member>
+ <member name="rendering/quality/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="2">
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
</member>
<member name="rendering/quality/shadow_atlas/quadrant_1_subdiv" type="int" setter="" getter="" default="2">
@@ -1285,9 +1293,11 @@
<member name="rendering/quality/texture_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false">
If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
</member>
- <member name="rendering/sdfgi/frames_to_converge" type="int" setter="" getter="" default="1">
+ <member name="rendering/sdfgi/frames_to_converge" type="int" setter="" getter="" default="4">
</member>
- <member name="rendering/sdfgi/probe_ray_count" type="int" setter="" getter="" default="2">
+ <member name="rendering/sdfgi/frames_to_update_lights" type="int" setter="" getter="" default="2">
+ </member>
+ <member name="rendering/sdfgi/probe_ray_count" type="int" setter="" getter="" default="1">
</member>
<member name="rendering/spatial_indexer/threaded_cull_minimum_instances" type="int" setter="" getter="" default="1000">
</member>
@@ -1296,11 +1306,7 @@
<member name="rendering/threads/thread_model" type="int" setter="" getter="" default="1">
Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter.
</member>
- <member name="rendering/volumetric_fog/directional_shadow_shrink" type="int" setter="" getter="" default="512">
- </member>
- <member name="rendering/volumetric_fog/positional_shadow_shrink" type="int" setter="" getter="" default="512">
- </member>
- <member name="rendering/volumetric_fog/use_filter" type="int" setter="" getter="" default="0">
+ <member name="rendering/volumetric_fog/use_filter" type="int" setter="" getter="" default="1">
</member>
<member name="rendering/volumetric_fog/volume_depth" type="int" setter="" getter="" default="128">
</member>
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index 7cdc9ffaca..84e307b852 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -7,6 +7,30 @@
<tutorials>
</tutorials>
<methods>
+ <method name="barrier">
+ <return type="void">
+ </return>
+ <argument index="0" name="from" type="int" default="7">
+ </argument>
+ <argument index="1" name="to" type="int" default="7">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="buffer_clear">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="buffer" type="RID">
+ </argument>
+ <argument index="1" name="offset" type="int">
+ </argument>
+ <argument index="2" name="size_bytes" type="int">
+ </argument>
+ <argument index="3" name="post_barrier" type="int" default="7">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="buffer_get_data">
<return type="PackedByteArray">
</return>
@@ -26,7 +50,7 @@
</argument>
<argument index="3" name="data" type="PackedByteArray">
</argument>
- <argument index="4" name="sync_with_draw" type="bool" default="true">
+ <argument index="4" name="post_barrier" type="int" default="7">
</argument>
<description>
</description>
@@ -36,8 +60,6 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="sync_to_draw" type="bool">
- </argument>
<description>
</description>
</method>
@@ -52,6 +74,8 @@
<method name="compute_list_begin">
<return type="int">
</return>
+ <argument index="0" name="allow_draw_overlap" type="bool" default="false">
+ </argument>
<description>
</description>
</method>
@@ -94,6 +118,8 @@
<method name="compute_list_end">
<return type="void">
</return>
+ <argument index="0" name="post_barrier" type="int" default="7">
+ </argument>
<description>
</description>
</method>
@@ -131,6 +157,32 @@
<description>
</description>
</method>
+ <method name="draw_command_begin_label">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_command_end_label">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="draw_command_insert_label">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="draw_list_begin">
<return type="int">
</return>
@@ -272,6 +324,8 @@
<method name="draw_list_end">
<return type="void">
</return>
+ <argument index="0" name="post_barrier" type="int" default="7">
+ </argument>
<description>
</description>
</method>
@@ -302,7 +356,9 @@
</return>
<argument index="0" name="size" type="Vector2i">
</argument>
- <argument index="1" name="validate_with_format" type="int" default="-1">
+ <argument index="1" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0">
+ </argument>
+ <argument index="2" name="validate_with_format" type="int" default="-1">
</argument>
<description>
</description>
@@ -318,7 +374,7 @@
<method name="framebuffer_format_create_empty">
<return type="int">
</return>
- <argument index="0" name="size" type="Vector2i">
+ <argument index="0" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0">
</argument>
<description>
</description>
@@ -347,6 +403,12 @@
<description>
</description>
</method>
+ <method name="full_barrier">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_captured_timestamp_cpu_time" qualifiers="const">
<return type="int">
</return>
@@ -383,6 +445,24 @@
<description>
</description>
</method>
+ <method name="get_device_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_device_pipeline_cache_uuid" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_device_vendor_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_frame_delay" qualifiers="const">
<return type="int">
</return>
@@ -485,6 +565,16 @@
<description>
</description>
</method>
+ <method name="set_resource_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="RID">
+ </argument>
+ <argument index="1" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="shader_compile_from_source">
<return type="RDShaderBytecode">
</return>
@@ -562,7 +652,7 @@
</argument>
<argument index="5" name="layer_count" type="int">
</argument>
- <argument index="6" name="sync_with_draw" type="bool" default="false">
+ <argument index="6" name="post_barrier" type="int" default="7">
</argument>
<description>
</description>
@@ -588,7 +678,7 @@
</argument>
<argument index="8" name="dst_layer" type="int">
</argument>
- <argument index="9" name="sync_with_draw" type="bool" default="false">
+ <argument index="9" name="post_barrier" type="int" default="7">
</argument>
<description>
</description>
@@ -674,7 +764,7 @@
</argument>
<argument index="1" name="to_texture" type="RID">
</argument>
- <argument index="2" name="sync_with_draw" type="bool" default="false">
+ <argument index="2" name="post_barrier" type="int" default="7">
</argument>
<description>
</description>
@@ -688,7 +778,7 @@
</argument>
<argument index="2" name="data" type="PackedByteArray">
</argument>
- <argument index="3" name="sync_with_draw" type="bool" default="false">
+ <argument index="3" name="post_barrier" type="int" default="7">
</argument>
<description>
</description>
@@ -745,6 +835,16 @@
</method>
</methods>
<constants>
+ <constant name="BARRIER_MASK_RASTER" value="1">
+ </constant>
+ <constant name="BARRIER_MASK_COMPUTE" value="2">
+ </constant>
+ <constant name="BARRIER_MASK_TRANSFER" value="4">
+ </constant>
+ <constant name="BARRIER_MASK_ALL" value="7">
+ </constant>
+ <constant name="BARRIER_MASK_NO_BARRIER" value="8">
+ </constant>
<constant name="DATA_FORMAT_R4G4_UNORM_PACK8" value="0" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_R4G4B4A4_UNORM_PACK16" value="1" enum="DataFormat">
@@ -1507,13 +1607,17 @@
</constant>
<constant name="INITIAL_ACTION_CLEAR" value="0" enum="InitialAction">
</constant>
- <constant name="INITIAL_ACTION_KEEP" value="1" enum="InitialAction">
+ <constant name="INITIAL_ACTION_CLEAR_REGION" value="1" enum="InitialAction">
+ </constant>
+ <constant name="INITIAL_ACTION_CLEAR_REGION_CONTINUE" value="2" enum="InitialAction">
+ </constant>
+ <constant name="INITIAL_ACTION_KEEP" value="3" enum="InitialAction">
</constant>
- <constant name="INITIAL_ACTION_DROP" value="2" enum="InitialAction">
+ <constant name="INITIAL_ACTION_DROP" value="4" enum="InitialAction">
</constant>
- <constant name="INITIAL_ACTION_CONTINUE" value="3" enum="InitialAction">
+ <constant name="INITIAL_ACTION_CONTINUE" value="5" enum="InitialAction">
</constant>
- <constant name="INITIAL_ACTION_MAX" value="4" enum="InitialAction">
+ <constant name="INITIAL_ACTION_MAX" value="6" enum="InitialAction">
</constant>
<constant name="FINAL_ACTION_READ" value="0" enum="FinalAction">
</constant>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 4be97b7d3d..efc751bb94 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -2949,6 +2949,8 @@
</argument>
<argument index="1" name="size" type="int">
</argument>
+ <argument index="2" name="use_16_bits" type="bool" default="false">
+ </argument>
<description>
Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
</description>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index a9697c7fce..2548f8d911 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -79,7 +79,7 @@
If [code]true[/code], the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene.
</member>
<member name="resource_name" type="String" setter="set_name" getter="get_name" default="&quot;&quot;">
- The name of the resource. This is an optional identifier.
+ The name of the resource. This is an optional identifier. If [member resource_name] is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the [member resource_name] will be displayed as the tab name in the script editor.
</member>
<member name="resource_path" type="String" setter="set_path" getter="get_path" default="&quot;&quot;">
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.
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 16c90c67ad..7ca70f5a7a 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -80,6 +80,27 @@
Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph.
</description>
</method>
+ <method name="get_selected_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the current selection text. Does not include BBCodes.
+ </description>
+ </method>
+ <method name="get_selection_from" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the current selection first character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.
+ </description>
+ </method>
+ <method name="get_selection_to" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the current selection last character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.
+ </description>
+ </method>
<method name="get_total_character_count" qualifiers="const">
<return type="int">
</return>
@@ -597,10 +618,13 @@
<theme_item name="focus" type="StyleBox">
The background The background used when the [RichTextLabel] is focused.
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The default tint of text outline.
+ </theme_item>
+ <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )">
The color of selected text, used when [member selection_enabled] is [code]true[/code].
</theme_item>
- <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )">
+ <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 0 )">
The color of the font's shadow.
</theme_item>
<theme_item name="italics_font" type="Font">
@@ -627,6 +651,9 @@
<theme_item name="normal_font_size" type="int">
The default text font size.
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )">
The color of the selection box.
</theme_item>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 2c99815abf..cfe6e4f738 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -75,6 +75,7 @@
yield(get_tree().create_timer(1.0), "timeout")
print("end")
[/codeblock]
+ The timer will be automatically freed after its time elapses.
</description>
</method>
<method name="get_frame" qualifiers="const">
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index d5a32dd20c..28620bd29b 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -37,6 +37,7 @@
<return type="ScriptEditorBase">
</return>
<description>
+ Returns the [ScriptEditorBase] object that the user is currently editing.
</description>
</method>
<method name="get_current_script">
@@ -60,6 +61,7 @@
<return type="Array">
</return>
<description>
+ Returns an array with all [ScriptEditorBase] objects which are currently open in editor.
</description>
</method>
<method name="get_open_scripts" qualifiers="const">
@@ -95,6 +97,8 @@
<argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter">
</argument>
<description>
+ Registers the [EditorSyntaxHighlighter] to the editor, the [EditorSyntaxHighlighter] will be available on all open scripts.
+ [b]Note:[/b] Does not apply to scripts that are already opened.
</description>
</method>
<method name="unregister_syntax_highlighter">
@@ -103,6 +107,8 @@
<argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter">
</argument>
<description>
+ Unregisters the [EditorSyntaxHighlighter] from the editor.
+ [b]Note:[/b] The [EditorSyntaxHighlighter] will still be applied to scripts that are already opened.
</description>
</method>
</methods>
diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml
index 9968ae06c3..ee498de302 100644
--- a/doc/classes/ScriptEditorBase.xml
+++ b/doc/classes/ScriptEditorBase.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ScriptEditorBase" inherits="VBoxContainer" version="4.0">
<brief_description>
+ Base editor for editing scripts in the [ScriptEditor].
</brief_description>
<description>
+ Base editor for editing scripts in the [ScriptEditor], this does not include documentation items.
</description>
<tutorials>
</tutorials>
@@ -13,34 +15,40 @@
<argument index="0" name="highlighter" type="Object">
</argument>
<description>
+ Adds a [EditorSyntaxHighlighter] to the open script.
</description>
</method>
</methods>
<signals>
<signal name="edited_script_changed">
<description>
+ Emitted after script validation. For visual scripts on modification.
</description>
</signal>
<signal name="go_to_help">
<argument index="0" name="what" type="String">
</argument>
<description>
+ Emitted when the user requests a specific documentation page.
</description>
</signal>
<signal name="name_changed">
<description>
+ Emitted after script validation or when the edited resource has changed. Not used by visual scripts.
</description>
</signal>
<signal name="replace_in_files_requested">
<argument index="0" name="text" type="String">
</argument>
<description>
+ Emitted when the user request to find and replace text in the file system. Not used by visual scripts.
</description>
</signal>
<signal name="request_help">
<argument index="0" name="topic" type="String">
</argument>
<description>
+ Emitted when the user requests contextual help.
</description>
</signal>
<signal name="request_open_script_at_line">
@@ -49,16 +57,19 @@
<argument index="1" name="line" type="int">
</argument>
<description>
+ Emitted when the user requests a script.
</description>
</signal>
<signal name="request_save_history">
<description>
+ Emitted when the user contextual goto and the item is in the same script.
</description>
</signal>
<signal name="search_in_files_requested">
<argument index="0" name="text" type="String">
</argument>
<description>
+ Emitted when the user request to search text in the file system. Not used by visual scripts.
</description>
</signal>
</signals>
diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml
index 2d8bb5d051..f3e62175c6 100644
--- a/doc/classes/Shape3D.xml
+++ b/doc/classes/Shape3D.xml
@@ -13,7 +13,8 @@
</methods>
<members>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
- The collision margin for the shape.
+ The collision margin for the shape. Used in Bullet Physics only.
+ Collision margins allows collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp.
</member>
</members>
<constants>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index fcc70d166e..c03f6357ab 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -63,9 +63,18 @@
<method name="bin_to_int">
<return type="int">
</return>
- <argument index="0" name="with_prefix" type="bool" default="true">
- </argument>
<description>
+ Converts a string containing a binary number into an integer. Binary strings can either be prefixed with [code]0b[/code] or not, and they can also start with a [code]-[/code] before the optional prefix.
+ [codeblocks]
+ [gdscript]
+ print("0x101".bin_to_int()) # Prints "5".
+ print("101".bin_to_int()) # Prints "5".
+ [/gdscript]
+ [csharp]
+ GD.Print("0x101".BinToInt()); // Prints "5".
+ GD.Print("101".BinToInt()); // Prints "5".
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="c_escape">
@@ -221,34 +230,18 @@
<method name="hex_to_int">
<return type="int">
</return>
- <argument index="0" name="with_prefix" type="bool" default="true">
- </argument>
- <description>
- Converts a string containing a hexadecimal number into a decimal integer. If [code]with_prefix[/code] is [code]true[/code], the hexadecimal string should start with the [code]0x[/code] prefix, otherwise [code]0[/code] is returned.
- [codeblock]
- print("0xff".hex_to_int()) # Print "255"
- print("ab".hex_to_int(false)) # Print "171"
- [/codeblock]
- </description>
- </method>
- <method name="http_escape">
- <return type="String">
- </return>
<description>
- Escapes (encodes) a string to URL friendly format. Also referred to as 'URL encode'.
- [codeblock]
- print("https://example.org/?escaped=" + "Godot Engine:'docs'".http_escape())
- [/codeblock]
- </description>
- </method>
- <method name="http_unescape">
- <return type="String">
- </return>
- <description>
- Unescapes (decodes) a string in URL encoded format. Also referred to as 'URL decode'.
- [codeblock]
- print("https://example.org/?escaped=" + "Godot%20Engine%3A%27docs%27".http_unescape())
- [/codeblock]
+ Converts a string containing a hexadecimal number into an integer. Hexadecimal strings can either be prefixed with [code]0x[/code] or not, and they can also start with a [code]-[/code] before the optional prefix.
+ [codeblocks]
+ [gdscript]
+ print("0xff".hex_to_int()) # Prints "255".
+ print("ab".hex_to_int()) # Prints "171".
+ [/gdscript]
+ [csharp]
+ GD.Print("0xff".HexToInt()); // Prints "255".
+ GD.Print("ab".HexToInt()); // Prints "171".
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="insert">
@@ -547,15 +540,6 @@
<description>
</description>
</method>
- <method name="ord_at">
- <return type="int">
- </return>
- <argument index="0" name="at" type="int">
- </argument>
- <description>
- Returns the character code at position [code]at[/code].
- </description>
- </method>
<method name="pad_decimals">
<return type="String">
</return>
@@ -574,20 +558,6 @@
Formats a number to have an exact number of [code]digits[/code] before the decimal point.
</description>
</method>
- <method name="percent_decode">
- <return type="String">
- </return>
- <description>
- Decode a percent-encoded string. See [method percent_encode].
- </description>
- </method>
- <method name="percent_encode">
- <return type="String">
- </return>
- <description>
- Percent-encodes a string. Encodes parameters in a URL when sending a HTTP GET request (and bodies of form-urlencoded POST requests).
- </description>
- </method>
<method name="plus_file">
<return type="String">
</return>
@@ -878,6 +848,45 @@
Removes a given string from the end if it ends with it or leaves the string unchanged.
</description>
</method>
+ <method name="unicode_at">
+ <return type="int">
+ </return>
+ <argument index="0" name="at" type="int">
+ </argument>
+ <description>
+ Returns the character code at position [code]at[/code].
+ </description>
+ </method>
+ <method name="uri_decode">
+ <return type="String">
+ </return>
+ <description>
+ Decodes a string in URL encoded format. This is meant to decode parameters in a URL when receiving an HTTP request.
+ [codeblocks]
+ [gdscript]
+ print("https://example.org/?escaped=" + "Godot%20Engine%3A%27docs%27".uri_decode())
+ [/gdscript]
+ [csharp]
+ GD.Print("https://example.org/?escaped=" + "Godot%20Engine%3a%27Docs%27".URIDecode());
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="uri_encode">
+ <return type="String">
+ </return>
+ <description>
+ Encodes a string to URL friendly format. This is meant to encode parameters in a URL when sending an HTTP request.
+ [codeblocks]
+ [gdscript]
+ print("https://example.org/?escaped=" + "Godot Engine:'docs'".uri_encode())
+ [/gdscript]
+ [csharp]
+ GD.Print("https://example.org/?escaped=" + "Godot Engine:'docs'".URIEncode());
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="xml_escape">
<return type="String">
</return>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index e10b65e309..331de4284e 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -155,8 +155,8 @@
<argument index="0" name="flip" type="bool" default="false">
</argument>
<description>
- Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted.
- Requires the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].
+ Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays].
+ [b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].
</description>
</method>
<method name="generate_tangents">
diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml
index 2d6e3de02a..642d75fa9b 100644
--- a/doc/classes/SyntaxHighlighter.xml
+++ b/doc/classes/SyntaxHighlighter.xml
@@ -1,50 +1,83 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SyntaxHighlighter" inherits="Resource" version="4.0">
<brief_description>
+ Base Syntax highlighter resource for [TextEdit].
</brief_description>
<description>
+ Base syntax highlighter resource all syntax highlighters extend from, provides syntax highlighting data to [TextEdit].
+ The associated [TextEdit] node will call into the [SyntaxHighlighter] on a as needed basis.
+ [b]Note:[/b] Each Syntax highlighter instance should not be shared across multiple [TextEdit] nodes.
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="_clear_highlighting_cache" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Virtual method which can be overridden to clear any local caches.
+ </description>
+ </method>
<method name="_get_line_syntax_highlighting" qualifiers="virtual">
<return type="Dictionary">
</return>
- <argument index="0" name="p_line" type="int">
+ <argument index="0" name="line" type="int">
</argument>
<description>
+ Virtual method which can be overridden to return syntax highlighting data.
+ See [method get_line_syntax_highlighting] for more details.
</description>
</method>
<method name="_update_cache" qualifiers="virtual">
<return type="void">
</return>
<description>
+ Virtual method which can be overridden to update any local caches.
</description>
</method>
<method name="clear_highlighting_cache">
<return type="void">
</return>
<description>
+ Clears all cached syntax highlighting data.
+ Then calls overridable method [method _clear_highlighting_cache].
</description>
</method>
<method name="get_line_syntax_highlighting">
<return type="Dictionary">
</return>
- <argument index="0" name="p_line" type="int">
+ <argument index="0" name="line" type="int">
</argument>
<description>
+ Returns syntax highlighting data for a single line. If the line is not cached, calls [method _get_line_syntax_highlighting] to calculate the data.
+ The return [Dictionary] is column number to [Dictionary]. The column number notes the start of a region, the region will end if another region is found, or at the end of the line. The nested [Dictionary] contains the data for that region, currently only the key "color" is supported.
+ [b]Example return:[/b]
+ [codeblock]
+ var color_map = {
+ 0: {
+ "color": Color(1, 0, 0)
+ },
+ 5: {
+ "color": Color(0, 1, 0)
+ }
+ }
+ [/codeblock]
+ This will color columns 0-4 red, and columns 5-eol in green.
</description>
</method>
<method name="get_text_edit">
<return type="TextEdit">
</return>
<description>
+ Returns the associated [TextEdit] node.
</description>
</method>
<method name="update_cache">
<return type="void">
</return>
<description>
+ Clears then updates the [SyntaxHighlighter] caches. Override [method _update_cache] for a callback.
+ [b]Note:[/b] This is called automatically when the associated [TextEdit] node, updates its own cache.
</description>
</method>
</methods>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 10cdd0eade..ddf6b465a4 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -198,18 +198,21 @@
<theme_item name="font" type="Font">
The font used to draw tab names.
</theme_item>
- <theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
- Font color of inactive tabs.
- </theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
Font color of disabled tabs.
</theme_item>
- <theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the tab name.
+ </theme_item>
+ <theme_item name="font_selected_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Font color of the currently selected tab.
</theme_item>
<theme_item name="font_size" type="int">
Font size of the tab names.
</theme_item>
+ <theme_item name="font_unselected_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ Font color of the other, unselected tabs.
+ </theme_item>
<theme_item name="icon_separation" type="int" default="4">
Space between tab's name and its icon.
</theme_item>
@@ -225,20 +228,23 @@
<theme_item name="menu_highlight" type="Texture2D">
The icon for the menu button (see [method set_popup]) when it's being hovered with the cursor.
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the tab text outline.
+ </theme_item>
<theme_item name="panel" type="StyleBox">
The style for the background fill.
</theme_item>
<theme_item name="side_margin" type="int" default="8">
The space at the left and right edges of the tab bar.
</theme_item>
- <theme_item name="tab_bg" type="StyleBox">
- The style of inactive tabs.
- </theme_item>
<theme_item name="tab_disabled" type="StyleBox">
The style of disabled tabs.
</theme_item>
- <theme_item name="tab_fg" type="StyleBox">
+ <theme_item name="tab_selected" type="StyleBox">
The style of the currently selected tab.
</theme_item>
+ <theme_item name="tab_unselected" type="StyleBox">
+ The style of the other, unselected tabs.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index 47cf869fe9..df9680bf28 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -359,18 +359,21 @@
<theme_item name="font" type="Font">
The font used to draw tab names.
</theme_item>
- <theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
- Font color of inactive tabs.
- </theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
Font color of disabled tabs.
</theme_item>
- <theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the tab name.
+ </theme_item>
+ <theme_item name="font_selected_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Font color of the currently selected tab.
</theme_item>
<theme_item name="font_size" type="int">
Font size of the tab names.
</theme_item>
+ <theme_item name="font_unselected_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ Font color of the other, unselected tabs.
+ </theme_item>
<theme_item name="hseparation" type="int" default="4">
The horizontal separation between the tabs.
</theme_item>
@@ -380,16 +383,19 @@
<theme_item name="increment_highlight" type="Texture2D">
Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
</theme_item>
- <theme_item name="panel" type="StyleBox">
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the tab text outline.
</theme_item>
- <theme_item name="tab_bg" type="StyleBox">
- The style of an inactive tab.
+ <theme_item name="panel" type="StyleBox">
</theme_item>
<theme_item name="tab_disabled" type="StyleBox">
- The style of a disabled tab
+ The style of disabled tabs.
</theme_item>
- <theme_item name="tab_fg" type="StyleBox">
+ <theme_item name="tab_selected" type="StyleBox">
The style of the currently selected tab.
</theme_item>
+ <theme_item name="tab_unselected" type="StyleBox">
+ The style of the other, unselected tabs.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index e8a54c6c20..1d50cd60e5 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -697,7 +697,7 @@
</member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="1" />
<member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
- If [code]true[/code], custom [code]font_color_selected[/code] will be used for selected text.
+ If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text.
</member>
<member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false">
If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added.
@@ -725,6 +725,7 @@
Set additional options for BiDi override.
</member>
<member name="syntax_highlighter" type="SyntaxHighlighter" setter="set_syntax_highlighter" getter="get_syntax_highlighter">
+ Sets the [SyntaxHighlighter] to use.
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
String value of the [TextEdit].
@@ -914,7 +915,7 @@
</constants>
<theme_items>
<theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )">
- Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled.
+ Sets the background [Color] of this [TextEdit].
</theme_item>
<theme_item name="brace_mismatch_color" type="Color" default="Color( 1, 0.2, 0.2, 1 )">
</theme_item>
@@ -953,9 +954,12 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Sets the font [Color].
</theme_item>
- <theme_item name="font_color_readonly" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [TextEdit].
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ </theme_item>
+ <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )">
Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
</theme_item>
<theme_item name="font_size" type="int">
@@ -970,6 +974,9 @@
<theme_item name="normal" type="StyleBox">
Sets the [StyleBox] of this [TextEdit].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="read_only" type="StyleBox">
Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled.
</theme_item>
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 791646000b..413a77a0e9 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -295,6 +295,24 @@
Returns list of script support overrides.
</description>
</method>
+ <method name="font_get_spacing_glyph" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns extra spacing for each glyphs in pixels.
+ </description>
+ </method>
+ <method name="font_get_spacing_space" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Sets extra spacing for each glyphs in pixels.
+ </description>
+ </method>
<method name="font_get_supported_chars" qualifiers="const">
<return type="String">
</return>
@@ -490,6 +508,28 @@
Adds override for [method font_is_script_supported].
</description>
</method>
+ <method name="font_set_spacing_glyph">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Returns extra spacing for the space character in pixels.
+ </description>
+ </method>
+ <method name="font_set_spacing_space">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Sets extra spacing for the space character in pixels.
+ </description>
+ </method>
<method name="font_set_variation">
<return type="void">
</return>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index c500052592..a12ef614e3 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps.
+ When doing physics queries against the tilemap, the cell coordinates are encoded as [code]metadata[/code] for each detected collision shape returned by methods such as [method PhysicsDirectSpaceState2D.intersect_shape], [method PhysicsDirectBodyState2D.get_contact_collider_shape_metadata] etc.
</description>
<tutorials>
<link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link>
@@ -143,7 +144,7 @@
<argument index="1" name="ignore_half_ofs" type="bool" default="false">
</argument>
<description>
- Returns the global position corresponding to the given tilemap (grid-based) coordinates.
+ Returns the local position corresponding to the given tilemap (grid-based) coordinates.
Optionally, the tilemap's half offset can be ignored.
</description>
</method>
diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml
index 355804f2a3..9833f0dc23 100644
--- a/doc/classes/TouchScreenButton.xml
+++ b/doc/classes/TouchScreenButton.xml
@@ -30,7 +30,8 @@
The button's texture for the normal state.
</member>
<member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled" default="false">
- If [code]true[/code], pass-by presses are enabled.
+ If [code]true[/code], the [signal pressed] and [signal released] signals are emitted whenever a pressed finger goes in and out of the button, even if the pressure started outside the active area of the button.
+ [b]Note:[/b] this is a "pass-by" (not "bypass") press mode.
</member>
<member name="pressed" type="Texture2D" setter="set_texture_pressed" getter="get_texture_pressed">
The button's texture for the pressed state.
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 01818e2993..59b72b1ed6 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -524,7 +524,10 @@
<theme_item name="font_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
Default text [Color] of the item.
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the item.
+ </theme_item>
+ <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the item is selected.
</theme_item>
<theme_item name="font_size" type="int">
@@ -539,6 +542,9 @@
<theme_item name="item_margin" type="int" default="12">
The horizontal margin at the start of an item. This is used when folding is enabled for the item.
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )">
[Color] of the relationship lines.
</theme_item>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index e97c1e580c..fd157e5eb9 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -208,6 +208,7 @@
<argument index="0" name="column" type="int">
</argument>
<description>
+ Returns the metadata value that was set for the given column using [method set_metadata].
</description>
</method>
<method name="get_next">
@@ -268,6 +269,7 @@
<argument index="0" name="column" type="int">
</argument>
<description>
+ Returns the value of a [constant CELL_MODE_RANGE] column.
</description>
</method>
<method name="get_range_config">
@@ -276,6 +278,7 @@
<argument index="0" name="column" type="int">
</argument>
<description>
+ Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr".
</description>
</method>
<method name="get_structured_text_bidi_override" qualifiers="const">
@@ -300,6 +303,7 @@
<argument index="0" name="column" type="int">
</argument>
<description>
+ Gets the suffix string shown after the column value.
</description>
</method>
<method name="get_text" qualifiers="const">
@@ -606,6 +610,7 @@
<argument index="1" name="meta" type="Variant">
</argument>
<description>
+ Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data.
</description>
</method>
<method name="set_opentype_feature">
@@ -629,6 +634,7 @@
<argument index="1" name="value" type="float">
</argument>
<description>
+ Sets the value of a [constant CELL_MODE_RANGE] column.
</description>
</method>
<method name="set_range_config">
@@ -645,6 +651,8 @@
<argument index="4" name="expr" type="bool" default="false">
</argument>
<description>
+ Sets the range of accepted values for a column. The column must be in the [constant CELL_MODE_RANGE] mode.
+ If [code]expr[/code] is [code]true[/code], the edit mode slider will use an exponential scale as with [member Range.exp_edit].
</description>
</method>
<method name="set_selectable">
@@ -686,6 +694,7 @@
<argument index="1" name="text" type="String">
</argument>
<description>
+ Sets a string to be shown after a column's value (for example, a unit abbreviation).
</description>
</method>
<method name="set_text">
@@ -696,6 +705,7 @@
<argument index="1" name="text" type="String">
</argument>
<description>
+ Sets the given column's text value.
</description>
</method>
<method name="set_text_align">
@@ -748,7 +758,7 @@
Cell contains a string.
</constant>
<constant name="CELL_MODE_CHECK" value="1" enum="TreeCellMode">
- Cell can be checked.
+ Cell contains a checkbox.
</constant>
<constant name="CELL_MODE_RANGE" value="2" enum="TreeCellMode">
Cell contains a range.
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 2d129a2c86..ea80b7c248 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -68,7 +68,7 @@
<argument index="0" name="to" type="Vector3">
</argument>
<description>
- Returns the minimum angle to the given vector, in radians.
+ Returns the unsigned minimum angle to the given vector, in radians.
</description>
</method>
<method name="bounce">
@@ -465,6 +465,17 @@
Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
+ <method name="signed_angle_to">
+ <return type="float">
+ </return>
+ <argument index="0" name="to" type="Vector3">
+ </argument>
+ <argument index="1" name="axis" type="Vector3">
+ </argument>
+ <description>
+ Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the [code]axis[/code].
+ </description>
+ </method>
<method name="slerp">
<return type="Vector3">
</return>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index 80f97c3419..b2ab356b0d 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -7,6 +7,7 @@
Control node for playing video streams using [VideoStream] resources.
Supported video formats are [url=https://www.webmproject.org/]WebM[/url] ([code].webm[/code], [VideoStreamWebm]), [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]), and any format exposed via a GDNative plugin using [VideoStreamGDNative].
[b]Note:[/b] Due to a bug, VideoPlayer does not support localization remapping yet.
+ [b]Warning:[/b] On HTML5, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations, especially for VP8/VP9.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index e66b8353a8..8120ae539e 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -240,6 +240,8 @@
</member>
<member name="sdf_scale" type="int" setter="set_sdf_scale" getter="get_sdf_scale" enum="Viewport.SDFScale" default="1">
</member>
+ <member name="shadow_atlas_16_bits" type="bool" setter="set_shadow_atlas_16_bits" getter="get_shadow_atlas_16_bits" default="true">
+ </member>
<member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
The subdivision amount of the first quadrant on the shadow atlas.
</member>
@@ -252,9 +254,9 @@
<member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4">
The subdivision amount of the fourth quadrant on the shadow atlas.
</member>
- <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="0">
+ <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="2048">
The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
- [b]Note:[/b] If this is set to 0, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually.
+ [b]Note:[/b] If this is set to 0, shadows won't be visible.
</member>
<member name="snap_2d_transforms_to_pixel" type="bool" setter="set_snap_2d_transforms_to_pixel" getter="is_snap_2d_transforms_to_pixel_enabled" default="false">
</member>
@@ -409,6 +411,14 @@
</constant>
<constant name="DEBUG_DRAW_DISABLE_LOD" value="18" enum="DebugDraw">
</constant>
+ <constant name="DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="19" enum="DebugDraw">
+ </constant>
+ <constant name="DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="20" enum="DebugDraw">
+ </constant>
+ <constant name="DEBUG_DRAW_CLUSTER_DECALS" value="21" enum="DebugDraw">
+ </constant>
+ <constant name="DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="22" enum="DebugDraw">
+ </constant>
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter">
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
</constant>
diff --git a/doc/classes/VisualShaderNodeClamp.xml b/doc/classes/VisualShaderNodeClamp.xml
new file mode 100644
index 0000000000..504171bb13
--- /dev/null
+++ b/doc/classes/VisualShaderNodeClamp.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeClamp" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Clamps a value within the visual shader graph.
+ </brief_description>
+ <description>
+ Constrains a value to lie between [code]min[/code] and [code]max[/code] values.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeClamp.OpType" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_FLOAT" value="0" enum="OpType">
+ A floating-point scalar.
+ </constant>
+ <constant name="OP_TYPE_INT" value="1" enum="OpType">
+ An integer scalar.
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="2" enum="OpType">
+ A vector type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml
index 5c68c0ec71..a9f4144a01 100644
--- a/doc/classes/VisualShaderNodeIntFunc.xml
+++ b/doc/classes/VisualShaderNodeIntFunc.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="3">
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="2">
A function to be applied to the scalar. See [enum Function] for options.
</member>
</members>
@@ -19,13 +19,10 @@
<constant name="FUNC_ABS" value="0" enum="Function">
Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
</constant>
- <constant name="FUNC_CLAMP" value="1" enum="Function">
- Constrains a parameter between [code]min[/code] and [code]max[/code]. Translates to [code]clamp(x, min, max)[/code] in the Godot Shader Language.
- </constant>
- <constant name="FUNC_NEGATE" value="2" enum="Function">
+ <constant name="FUNC_NEGATE" value="1" enum="Function">
Negates the [code]x[/code] using [code]-(x)[/code].
</constant>
- <constant name="FUNC_SIGN" value="3" enum="Function">
+ <constant name="FUNC_SIGN" value="2" enum="Function">
Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeMix.xml b/doc/classes/VisualShaderNodeMix.xml
new file mode 100644
index 0000000000..c70ac7e599
--- /dev/null
+++ b/doc/classes/VisualShaderNodeMix.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeMix" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Linearly interpolates between two values within the visual shader graph.
+ </brief_description>
+ <description>
+ Translates to [code]mix(a, b, weight)[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeMix.OpType" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
+ A scalar type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
+ A vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType">
+ A vector type. [code]weight[/code] port is using a scalar type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeSDFRaymarch.xml b/doc/classes/VisualShaderNodeSDFRaymarch.xml
index d700761fdb..775f2814c2 100644
--- a/doc/classes/VisualShaderNodeSDFRaymarch.xml
+++ b/doc/classes/VisualShaderNodeSDFRaymarch.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeSDFRaymarch" inherits="VisualShaderNode" version="4.0">
<brief_description>
- SDF raymarching algorithm to be used within the visual shader graph.
+ SDF raymarching algorithm to be used within the visual shader graph.
</brief_description>
<description>
- Casts a ray against the screen SDF (signed-distance field) and returns the distance travelled.
+ Casts a ray against the screen SDF (signed-distance field) and returns the distance travelled.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeScalarClamp.xml b/doc/classes/VisualShaderNodeScalarClamp.xml
deleted file mode 100644
index 7432e8dfca..0000000000
--- a/doc/classes/VisualShaderNodeScalarClamp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarClamp" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Clamps a scalar value within the visual shader graph.
- </brief_description>
- <description>
- Constrains a value to lie between [code]min[/code] and [code]max[/code] values.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScalarInterp.xml b/doc/classes/VisualShaderNodeScalarInterp.xml
deleted file mode 100644
index 393ea70e1a..0000000000
--- a/doc/classes/VisualShaderNodeScalarInterp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarInterp" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Linearly interpolates between two scalars within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]mix(a, b, weight)[/code] in the shader language.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScalarSmoothStep.xml b/doc/classes/VisualShaderNodeScalarSmoothStep.xml
deleted file mode 100644
index e619cc8571..0000000000
--- a/doc/classes/VisualShaderNodeScalarSmoothStep.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarSmoothStep" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Calculates a scalar SmoothStep function within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language.
- Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScalarSwitch.xml b/doc/classes/VisualShaderNodeScalarSwitch.xml
deleted file mode 100644
index 2ad5202745..0000000000
--- a/doc/classes/VisualShaderNodeScalarSwitch.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarSwitch" inherits="VisualShaderNodeSwitch" version="4.0">
- <brief_description>
- A boolean/scalar function for use within the visual shader graph.
- </brief_description>
- <description>
- Returns an associated scalar if the provided boolean value is [code]true[/code] or [code]false[/code].
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeSmoothStep.xml b/doc/classes/VisualShaderNodeSmoothStep.xml
new file mode 100644
index 0000000000..fa22d16da8
--- /dev/null
+++ b/doc/classes/VisualShaderNodeSmoothStep.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeSmoothStep" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Calculates a SmoothStep function within the visual shader graph.
+ </brief_description>
+ <description>
+ Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language.
+ Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeSmoothStep.OpType" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
+ A scalar type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
+ A vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType">
+ A vector type. [code]edge0[/code] and [code]edge1[/code] are using a scalar type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeStep.xml b/doc/classes/VisualShaderNodeStep.xml
new file mode 100644
index 0000000000..694c144445
--- /dev/null
+++ b/doc/classes/VisualShaderNodeStep.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeStep" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Calculates a Step function within the visual shader graph.
+ </brief_description>
+ <description>
+ Translates to [code]step(edge, x)[/code] in the shader language.
+ Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge[/code] and [code]1.0[/code] otherwise.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeStep.OpType" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
+ A scalar type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
+ A vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType">
+ A vector type. [code]edge[/code] port is using a scalar type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml
index 9f8a12c0fd..3961070a74 100644
--- a/doc/classes/VisualShaderNodeSwitch.xml
+++ b/doc/classes/VisualShaderNodeSwitch.xml
@@ -1,15 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeSwitch" inherits="VisualShaderNode" version="4.0">
<brief_description>
- A boolean/vector function for use within the visual shader graph.
+ A selector function for use within the visual shader graph.
</brief_description>
<description>
- Returns an associated vector if the provided boolean value is [code]true[/code] or [code]false[/code].
+ Returns an associated value of the [code]op_type[/code] type if the provided boolean value is [code]true[/code] or [code]false[/code].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeSwitch.OpType" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
<constants>
+ <constant name="OP_TYPE_FLOAT" value="0" enum="OpType">
+ A floating-point scalar.
+ </constant>
+ <constant name="OP_TYPE_INT" value="1" enum="OpType">
+ An integer scalar.
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="2" enum="OpType">
+ A vector type.
+ </constant>
+ <constant name="OP_TYPE_BOOLEAN" value="3" enum="OpType">
+ A boolean type.
+ </constant>
+ <constant name="OP_TYPE_TRANSFORM" value="4" enum="OpType">
+ A transform type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="5" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeVectorClamp.xml b/doc/classes/VisualShaderNodeVectorClamp.xml
deleted file mode 100644
index 567fed8a41..0000000000
--- a/doc/classes/VisualShaderNodeVectorClamp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorClamp" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Clamps a vector value within the visual shader graph.
- </brief_description>
- <description>
- Constrains a value to lie between [code]min[/code] and [code]max[/code] values. The operation is performed on each component of the vector individually.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorInterp.xml b/doc/classes/VisualShaderNodeVectorInterp.xml
deleted file mode 100644
index b63d34b742..0000000000
--- a/doc/classes/VisualShaderNodeVectorInterp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorInterp" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Linearly interpolates between two vectors within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]mix(a, b, weight)[/code] in the shader language, where [code]weight[/code] is a [Vector3] with weights for each component.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorScalarMix.xml b/doc/classes/VisualShaderNodeVectorScalarMix.xml
deleted file mode 100644
index 791a9e6be1..0000000000
--- a/doc/classes/VisualShaderNodeVectorScalarMix.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorScalarMix" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Linearly interpolates between two vectors using a scalar. For use within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]mix(a, b, weight)[/code] in the shader language, where [code]a[/code] and [code]b[/code] are vectors and [code]weight[/code] is a scalar.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml b/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml
deleted file mode 100644
index 580abaf5fe..0000000000
--- a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorScalarSmoothStep" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Calculates a vector SmoothStep function using scalar within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language, where [code]x[/code] is a scalar.
- Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorScalarStep.xml b/doc/classes/VisualShaderNodeVectorScalarStep.xml
deleted file mode 100644
index d61414f3a8..0000000000
--- a/doc/classes/VisualShaderNodeVectorScalarStep.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorScalarStep" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Calculates a vector Step function within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]step(edge, x)[/code] in the shader language.
- Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge[/code] and [code]1.0[/code] otherwise.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorSmoothStep.xml b/doc/classes/VisualShaderNodeVectorSmoothStep.xml
deleted file mode 100644
index 1b77a3c535..0000000000
--- a/doc/classes/VisualShaderNodeVectorSmoothStep.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorSmoothStep" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Calculates a vector SmoothStep function within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language, where [code]x[/code] is a vector.
- Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 0f887c7705..fbe1e275a9 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -474,8 +474,17 @@
</theme_item>
<theme_item name="title_font" type="Font">
</theme_item>
+ <theme_item name="title_font_size" type="int">
+ The size of the title font.
+ </theme_item>
<theme_item name="title_height" type="int" default="20">
</theme_item>
+ <theme_item name="title_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ The color of the title outline.
+ </theme_item>
+ <theme_item name="title_outline_size" type="int" default="0">
+ The size of the title outline.
+ </theme_item>
<theme_item name="window_panel" type="StyleBox">
</theme_item>
</theme_items>
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index 5335116c8a..ae3cc73098 100755
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -110,6 +110,9 @@ class ClassDef:
self.theme_items = None # type: Optional[OrderedDict[str, List[ThemeItemDef]]]
self.tutorials = [] # type: List[str]
+ # Used to match the class with XML source for output filtering purposes.
+ self.filepath = "" # type: str
+
class State:
def __init__(self): # type: () -> None
@@ -118,11 +121,12 @@ class State:
self.classes = OrderedDict() # type: OrderedDict[str, ClassDef]
self.current_class = "" # type: str
- def parse_class(self, class_root): # type: (ET.Element) -> None
+ def parse_class(self, class_root, filepath): # type: (ET.Element, str) -> None
class_name = class_root.attrib["name"]
class_def = ClassDef(class_name)
self.classes[class_name] = class_def
+ class_def.filepath = filepath
inherits = class_root.get("inherits")
if inherits is not None:
@@ -278,6 +282,7 @@ def parse_arguments(root): # type: (ET.Element) -> List[ParameterDef]
def main(): # type: () -> None
parser = argparse.ArgumentParser()
parser.add_argument("path", nargs="+", help="A path to an XML file or a directory containing XML files to parse.")
+ parser.add_argument("--filter", default="", help="The filepath pattern for XML files to filter.")
group = parser.add_mutually_exclusive_group()
group.add_argument("--output", "-o", default=".", help="The directory to save output .rst files in.")
group.add_argument(
@@ -333,17 +338,21 @@ def main(): # type: () -> None
print_error("Duplicate class '{}'".format(name), state)
continue
- classes[name] = doc
+ classes[name] = (doc, cur_file)
for name, data in classes.items():
try:
- state.parse_class(data)
+ state.parse_class(data[0], data[1])
except Exception as e:
print_error("Exception while parsing class '{}': {}".format(name, e), state)
state.sort_classes()
+ pattern = re.compile(args.filter)
+
for class_name, class_def in state.classes.items():
+ if args.filter and not pattern.search(class_def.filepath):
+ continue
state.current_class = class_name
make_rst_class(class_def, state, args.dry_run, args.output)
diff --git a/drivers/alsa/SCsub b/drivers/alsa/SCsub
index 91e1140b75..1d76bb18c4 100644
--- a/drivers/alsa/SCsub
+++ b/drivers/alsa/SCsub
@@ -2,4 +2,7 @@
Import("env")
+if "alsa" in env and env["alsa"]:
+ env.add_source_files(env.drivers_sources, "asound-so_wrap.c")
+
env.add_source_files(env.drivers_sources, "*.cpp")
diff --git a/drivers/alsa/asound-so_wrap.c b/drivers/alsa/asound-so_wrap.c
new file mode 100644
index 0000000000..1821f683f6
--- /dev/null
+++ b/drivers/alsa/asound-so_wrap.c
@@ -0,0 +1,11566 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by /home/hp/Projects/godot/pulse/generate-wrapper.py 0.2 on 2021-02-18 00:19:14
+// flags: /home/hp/Projects/godot/pulse/generate-wrapper.py --include /usr/include/alsa/asoundlib.h --sys-include <alsa/asoundlib.h> --soname libasound.so.2 --init-name asound --output-header asound-so_wrap.h --output-implementation asound-so_wrap.c
+//
+#define snd_asoundlib_version snd_asoundlib_version_dylibloader_orig_asound
+#define snd_dlpath snd_dlpath_dylibloader_orig_asound
+#define snd_dlopen snd_dlopen_dylibloader_orig_asound
+#define snd_dlsym snd_dlsym_dylibloader_orig_asound
+#define snd_dlclose snd_dlclose_dylibloader_orig_asound
+#define snd_async_add_handler snd_async_add_handler_dylibloader_orig_asound
+#define snd_async_del_handler snd_async_del_handler_dylibloader_orig_asound
+#define snd_async_handler_get_fd snd_async_handler_get_fd_dylibloader_orig_asound
+#define snd_async_handler_get_signo snd_async_handler_get_signo_dylibloader_orig_asound
+#define snd_async_handler_get_callback_private snd_async_handler_get_callback_private_dylibloader_orig_asound
+#define snd_shm_area_create snd_shm_area_create_dylibloader_orig_asound
+#define snd_shm_area_share snd_shm_area_share_dylibloader_orig_asound
+#define snd_shm_area_destroy snd_shm_area_destroy_dylibloader_orig_asound
+#define snd_user_file snd_user_file_dylibloader_orig_asound
+#define snd_input_stdio_open snd_input_stdio_open_dylibloader_orig_asound
+#define snd_input_stdio_attach snd_input_stdio_attach_dylibloader_orig_asound
+#define snd_input_buffer_open snd_input_buffer_open_dylibloader_orig_asound
+#define snd_input_close snd_input_close_dylibloader_orig_asound
+#define snd_input_scanf snd_input_scanf_dylibloader_orig_asound
+#define snd_input_gets snd_input_gets_dylibloader_orig_asound
+#define snd_input_getc snd_input_getc_dylibloader_orig_asound
+#define snd_input_ungetc snd_input_ungetc_dylibloader_orig_asound
+#define snd_output_stdio_open snd_output_stdio_open_dylibloader_orig_asound
+#define snd_output_stdio_attach snd_output_stdio_attach_dylibloader_orig_asound
+#define snd_output_buffer_open snd_output_buffer_open_dylibloader_orig_asound
+#define snd_output_buffer_string snd_output_buffer_string_dylibloader_orig_asound
+#define snd_output_close snd_output_close_dylibloader_orig_asound
+#define snd_output_printf snd_output_printf_dylibloader_orig_asound
+#define snd_output_vprintf snd_output_vprintf_dylibloader_orig_asound
+#define snd_output_puts snd_output_puts_dylibloader_orig_asound
+#define snd_output_putc snd_output_putc_dylibloader_orig_asound
+#define snd_output_flush snd_output_flush_dylibloader_orig_asound
+#define snd_strerror snd_strerror_dylibloader_orig_asound
+#define snd_lib_error_set_handler snd_lib_error_set_handler_dylibloader_orig_asound
+#define snd_lib_error_set_local snd_lib_error_set_local_dylibloader_orig_asound
+#define snd_config_topdir snd_config_topdir_dylibloader_orig_asound
+#define snd_config_top snd_config_top_dylibloader_orig_asound
+#define snd_config_load snd_config_load_dylibloader_orig_asound
+#define snd_config_load_override snd_config_load_override_dylibloader_orig_asound
+#define snd_config_save snd_config_save_dylibloader_orig_asound
+#define snd_config_update snd_config_update_dylibloader_orig_asound
+#define snd_config_update_r snd_config_update_r_dylibloader_orig_asound
+#define snd_config_update_free snd_config_update_free_dylibloader_orig_asound
+#define snd_config_update_free_global snd_config_update_free_global_dylibloader_orig_asound
+#define snd_config_update_ref snd_config_update_ref_dylibloader_orig_asound
+#define snd_config_ref snd_config_ref_dylibloader_orig_asound
+#define snd_config_unref snd_config_unref_dylibloader_orig_asound
+#define snd_config_search snd_config_search_dylibloader_orig_asound
+#define snd_config_searchv snd_config_searchv_dylibloader_orig_asound
+#define snd_config_search_definition snd_config_search_definition_dylibloader_orig_asound
+#define snd_config_expand snd_config_expand_dylibloader_orig_asound
+#define snd_config_evaluate snd_config_evaluate_dylibloader_orig_asound
+#define snd_config_add snd_config_add_dylibloader_orig_asound
+#define snd_config_add_before snd_config_add_before_dylibloader_orig_asound
+#define snd_config_add_after snd_config_add_after_dylibloader_orig_asound
+#define snd_config_remove snd_config_remove_dylibloader_orig_asound
+#define snd_config_delete snd_config_delete_dylibloader_orig_asound
+#define snd_config_delete_compound_members snd_config_delete_compound_members_dylibloader_orig_asound
+#define snd_config_copy snd_config_copy_dylibloader_orig_asound
+#define snd_config_make snd_config_make_dylibloader_orig_asound
+#define snd_config_make_integer snd_config_make_integer_dylibloader_orig_asound
+#define snd_config_make_integer64 snd_config_make_integer64_dylibloader_orig_asound
+#define snd_config_make_real snd_config_make_real_dylibloader_orig_asound
+#define snd_config_make_string snd_config_make_string_dylibloader_orig_asound
+#define snd_config_make_pointer snd_config_make_pointer_dylibloader_orig_asound
+#define snd_config_make_compound snd_config_make_compound_dylibloader_orig_asound
+#define snd_config_imake_integer snd_config_imake_integer_dylibloader_orig_asound
+#define snd_config_imake_integer64 snd_config_imake_integer64_dylibloader_orig_asound
+#define snd_config_imake_real snd_config_imake_real_dylibloader_orig_asound
+#define snd_config_imake_string snd_config_imake_string_dylibloader_orig_asound
+#define snd_config_imake_safe_string snd_config_imake_safe_string_dylibloader_orig_asound
+#define snd_config_imake_pointer snd_config_imake_pointer_dylibloader_orig_asound
+#define snd_config_get_type snd_config_get_type_dylibloader_orig_asound
+#define snd_config_is_array snd_config_is_array_dylibloader_orig_asound
+#define snd_config_set_id snd_config_set_id_dylibloader_orig_asound
+#define snd_config_set_integer snd_config_set_integer_dylibloader_orig_asound
+#define snd_config_set_integer64 snd_config_set_integer64_dylibloader_orig_asound
+#define snd_config_set_real snd_config_set_real_dylibloader_orig_asound
+#define snd_config_set_string snd_config_set_string_dylibloader_orig_asound
+#define snd_config_set_ascii snd_config_set_ascii_dylibloader_orig_asound
+#define snd_config_set_pointer snd_config_set_pointer_dylibloader_orig_asound
+#define snd_config_get_id snd_config_get_id_dylibloader_orig_asound
+#define snd_config_get_integer snd_config_get_integer_dylibloader_orig_asound
+#define snd_config_get_integer64 snd_config_get_integer64_dylibloader_orig_asound
+#define snd_config_get_real snd_config_get_real_dylibloader_orig_asound
+#define snd_config_get_ireal snd_config_get_ireal_dylibloader_orig_asound
+#define snd_config_get_string snd_config_get_string_dylibloader_orig_asound
+#define snd_config_get_ascii snd_config_get_ascii_dylibloader_orig_asound
+#define snd_config_get_pointer snd_config_get_pointer_dylibloader_orig_asound
+#define snd_config_test_id snd_config_test_id_dylibloader_orig_asound
+#define snd_config_iterator_first snd_config_iterator_first_dylibloader_orig_asound
+#define snd_config_iterator_next snd_config_iterator_next_dylibloader_orig_asound
+#define snd_config_iterator_end snd_config_iterator_end_dylibloader_orig_asound
+#define snd_config_iterator_entry snd_config_iterator_entry_dylibloader_orig_asound
+#define snd_config_get_bool_ascii snd_config_get_bool_ascii_dylibloader_orig_asound
+#define snd_config_get_bool snd_config_get_bool_dylibloader_orig_asound
+#define snd_config_get_ctl_iface_ascii snd_config_get_ctl_iface_ascii_dylibloader_orig_asound
+#define snd_config_get_ctl_iface snd_config_get_ctl_iface_dylibloader_orig_asound
+#define snd_names_list snd_names_list_dylibloader_orig_asound
+#define snd_names_list_free snd_names_list_free_dylibloader_orig_asound
+#define snd_pcm_open snd_pcm_open_dylibloader_orig_asound
+#define snd_pcm_open_lconf snd_pcm_open_lconf_dylibloader_orig_asound
+#define snd_pcm_open_fallback snd_pcm_open_fallback_dylibloader_orig_asound
+#define snd_pcm_close snd_pcm_close_dylibloader_orig_asound
+#define snd_pcm_name snd_pcm_name_dylibloader_orig_asound
+#define snd_pcm_type snd_pcm_type_dylibloader_orig_asound
+#define snd_pcm_stream snd_pcm_stream_dylibloader_orig_asound
+#define snd_pcm_poll_descriptors_count snd_pcm_poll_descriptors_count_dylibloader_orig_asound
+#define snd_pcm_poll_descriptors snd_pcm_poll_descriptors_dylibloader_orig_asound
+#define snd_pcm_poll_descriptors_revents snd_pcm_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_pcm_nonblock snd_pcm_nonblock_dylibloader_orig_asound
+#define snd_async_add_pcm_handler snd_async_add_pcm_handler_dylibloader_orig_asound
+#define snd_async_handler_get_pcm snd_async_handler_get_pcm_dylibloader_orig_asound
+#define snd_pcm_info snd_pcm_info_dylibloader_orig_asound
+#define snd_pcm_hw_params_current snd_pcm_hw_params_current_dylibloader_orig_asound
+#define snd_pcm_hw_params snd_pcm_hw_params_dylibloader_orig_asound
+#define snd_pcm_hw_free snd_pcm_hw_free_dylibloader_orig_asound
+#define snd_pcm_sw_params_current snd_pcm_sw_params_current_dylibloader_orig_asound
+#define snd_pcm_sw_params snd_pcm_sw_params_dylibloader_orig_asound
+#define snd_pcm_prepare snd_pcm_prepare_dylibloader_orig_asound
+#define snd_pcm_reset snd_pcm_reset_dylibloader_orig_asound
+#define snd_pcm_status snd_pcm_status_dylibloader_orig_asound
+#define snd_pcm_start snd_pcm_start_dylibloader_orig_asound
+#define snd_pcm_drop snd_pcm_drop_dylibloader_orig_asound
+#define snd_pcm_drain snd_pcm_drain_dylibloader_orig_asound
+#define snd_pcm_pause snd_pcm_pause_dylibloader_orig_asound
+#define snd_pcm_state snd_pcm_state_dylibloader_orig_asound
+#define snd_pcm_hwsync snd_pcm_hwsync_dylibloader_orig_asound
+#define snd_pcm_delay snd_pcm_delay_dylibloader_orig_asound
+#define snd_pcm_resume snd_pcm_resume_dylibloader_orig_asound
+#define snd_pcm_htimestamp snd_pcm_htimestamp_dylibloader_orig_asound
+#define snd_pcm_avail snd_pcm_avail_dylibloader_orig_asound
+#define snd_pcm_avail_update snd_pcm_avail_update_dylibloader_orig_asound
+#define snd_pcm_avail_delay snd_pcm_avail_delay_dylibloader_orig_asound
+#define snd_pcm_rewindable snd_pcm_rewindable_dylibloader_orig_asound
+#define snd_pcm_rewind snd_pcm_rewind_dylibloader_orig_asound
+#define snd_pcm_forwardable snd_pcm_forwardable_dylibloader_orig_asound
+#define snd_pcm_forward snd_pcm_forward_dylibloader_orig_asound
+#define snd_pcm_writei snd_pcm_writei_dylibloader_orig_asound
+#define snd_pcm_readi snd_pcm_readi_dylibloader_orig_asound
+#define snd_pcm_writen snd_pcm_writen_dylibloader_orig_asound
+#define snd_pcm_readn snd_pcm_readn_dylibloader_orig_asound
+#define snd_pcm_wait snd_pcm_wait_dylibloader_orig_asound
+#define snd_pcm_link snd_pcm_link_dylibloader_orig_asound
+#define snd_pcm_unlink snd_pcm_unlink_dylibloader_orig_asound
+#define snd_pcm_query_chmaps snd_pcm_query_chmaps_dylibloader_orig_asound
+#define snd_pcm_query_chmaps_from_hw snd_pcm_query_chmaps_from_hw_dylibloader_orig_asound
+#define snd_pcm_free_chmaps snd_pcm_free_chmaps_dylibloader_orig_asound
+#define snd_pcm_get_chmap snd_pcm_get_chmap_dylibloader_orig_asound
+#define snd_pcm_set_chmap snd_pcm_set_chmap_dylibloader_orig_asound
+#define snd_pcm_chmap_type_name snd_pcm_chmap_type_name_dylibloader_orig_asound
+#define snd_pcm_chmap_name snd_pcm_chmap_name_dylibloader_orig_asound
+#define snd_pcm_chmap_long_name snd_pcm_chmap_long_name_dylibloader_orig_asound
+#define snd_pcm_chmap_print snd_pcm_chmap_print_dylibloader_orig_asound
+#define snd_pcm_chmap_from_string snd_pcm_chmap_from_string_dylibloader_orig_asound
+#define snd_pcm_chmap_parse_string snd_pcm_chmap_parse_string_dylibloader_orig_asound
+#define snd_pcm_recover snd_pcm_recover_dylibloader_orig_asound
+#define snd_pcm_set_params snd_pcm_set_params_dylibloader_orig_asound
+#define snd_pcm_get_params snd_pcm_get_params_dylibloader_orig_asound
+#define snd_pcm_info_sizeof snd_pcm_info_sizeof_dylibloader_orig_asound
+#define snd_pcm_info_malloc snd_pcm_info_malloc_dylibloader_orig_asound
+#define snd_pcm_info_free snd_pcm_info_free_dylibloader_orig_asound
+#define snd_pcm_info_copy snd_pcm_info_copy_dylibloader_orig_asound
+#define snd_pcm_info_get_device snd_pcm_info_get_device_dylibloader_orig_asound
+#define snd_pcm_info_get_subdevice snd_pcm_info_get_subdevice_dylibloader_orig_asound
+#define snd_pcm_info_get_stream snd_pcm_info_get_stream_dylibloader_orig_asound
+#define snd_pcm_info_get_card snd_pcm_info_get_card_dylibloader_orig_asound
+#define snd_pcm_info_get_id snd_pcm_info_get_id_dylibloader_orig_asound
+#define snd_pcm_info_get_name snd_pcm_info_get_name_dylibloader_orig_asound
+#define snd_pcm_info_get_subdevice_name snd_pcm_info_get_subdevice_name_dylibloader_orig_asound
+#define snd_pcm_info_get_class snd_pcm_info_get_class_dylibloader_orig_asound
+#define snd_pcm_info_get_subclass snd_pcm_info_get_subclass_dylibloader_orig_asound
+#define snd_pcm_info_get_subdevices_count snd_pcm_info_get_subdevices_count_dylibloader_orig_asound
+#define snd_pcm_info_get_subdevices_avail snd_pcm_info_get_subdevices_avail_dylibloader_orig_asound
+#define snd_pcm_info_get_sync snd_pcm_info_get_sync_dylibloader_orig_asound
+#define snd_pcm_info_set_device snd_pcm_info_set_device_dylibloader_orig_asound
+#define snd_pcm_info_set_subdevice snd_pcm_info_set_subdevice_dylibloader_orig_asound
+#define snd_pcm_info_set_stream snd_pcm_info_set_stream_dylibloader_orig_asound
+#define snd_pcm_hw_params_any snd_pcm_hw_params_any_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_mmap_sample_resolution snd_pcm_hw_params_can_mmap_sample_resolution_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_double snd_pcm_hw_params_is_double_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_batch snd_pcm_hw_params_is_batch_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_block_transfer snd_pcm_hw_params_is_block_transfer_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_monotonic snd_pcm_hw_params_is_monotonic_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_overrange snd_pcm_hw_params_can_overrange_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_pause snd_pcm_hw_params_can_pause_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_resume snd_pcm_hw_params_can_resume_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_half_duplex snd_pcm_hw_params_is_half_duplex_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_joint_duplex snd_pcm_hw_params_is_joint_duplex_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_sync_start snd_pcm_hw_params_can_sync_start_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_disable_period_wakeup snd_pcm_hw_params_can_disable_period_wakeup_dylibloader_orig_asound
+#define snd_pcm_hw_params_supports_audio_wallclock_ts snd_pcm_hw_params_supports_audio_wallclock_ts_dylibloader_orig_asound
+#define snd_pcm_hw_params_supports_audio_ts_type snd_pcm_hw_params_supports_audio_ts_type_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_rate_numden snd_pcm_hw_params_get_rate_numden_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_sbits snd_pcm_hw_params_get_sbits_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_fifo_size snd_pcm_hw_params_get_fifo_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_sizeof snd_pcm_hw_params_sizeof_dylibloader_orig_asound
+#define snd_pcm_hw_params_malloc snd_pcm_hw_params_malloc_dylibloader_orig_asound
+#define snd_pcm_hw_params_free snd_pcm_hw_params_free_dylibloader_orig_asound
+#define snd_pcm_hw_params_copy snd_pcm_hw_params_copy_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_access snd_pcm_hw_params_get_access_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_access snd_pcm_hw_params_test_access_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_access snd_pcm_hw_params_set_access_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_access_first snd_pcm_hw_params_set_access_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_access_last snd_pcm_hw_params_set_access_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_access_mask snd_pcm_hw_params_set_access_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_access_mask snd_pcm_hw_params_get_access_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_format snd_pcm_hw_params_get_format_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_format snd_pcm_hw_params_test_format_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_format snd_pcm_hw_params_set_format_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_format_first snd_pcm_hw_params_set_format_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_format_last snd_pcm_hw_params_set_format_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_format_mask snd_pcm_hw_params_set_format_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_format_mask snd_pcm_hw_params_get_format_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_subformat snd_pcm_hw_params_get_subformat_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_subformat snd_pcm_hw_params_test_subformat_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_subformat snd_pcm_hw_params_set_subformat_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_subformat_first snd_pcm_hw_params_set_subformat_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_subformat_last snd_pcm_hw_params_set_subformat_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_subformat_mask snd_pcm_hw_params_set_subformat_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_subformat_mask snd_pcm_hw_params_get_subformat_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_channels snd_pcm_hw_params_get_channels_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_channels_min snd_pcm_hw_params_get_channels_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_channels_max snd_pcm_hw_params_get_channels_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_channels snd_pcm_hw_params_test_channels_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels snd_pcm_hw_params_set_channels_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_min snd_pcm_hw_params_set_channels_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_max snd_pcm_hw_params_set_channels_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_minmax snd_pcm_hw_params_set_channels_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_near snd_pcm_hw_params_set_channels_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_first snd_pcm_hw_params_set_channels_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_last snd_pcm_hw_params_set_channels_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_rate snd_pcm_hw_params_get_rate_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_rate_min snd_pcm_hw_params_get_rate_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_rate_max snd_pcm_hw_params_get_rate_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_rate snd_pcm_hw_params_test_rate_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate snd_pcm_hw_params_set_rate_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_min snd_pcm_hw_params_set_rate_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_max snd_pcm_hw_params_set_rate_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_minmax snd_pcm_hw_params_set_rate_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_near snd_pcm_hw_params_set_rate_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_first snd_pcm_hw_params_set_rate_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_last snd_pcm_hw_params_set_rate_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_resample snd_pcm_hw_params_set_rate_resample_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_rate_resample snd_pcm_hw_params_get_rate_resample_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_export_buffer snd_pcm_hw_params_set_export_buffer_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_export_buffer snd_pcm_hw_params_get_export_buffer_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_wakeup snd_pcm_hw_params_set_period_wakeup_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_wakeup snd_pcm_hw_params_get_period_wakeup_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_time snd_pcm_hw_params_get_period_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_time_min snd_pcm_hw_params_get_period_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_time_max snd_pcm_hw_params_get_period_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_period_time snd_pcm_hw_params_test_period_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time snd_pcm_hw_params_set_period_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_min snd_pcm_hw_params_set_period_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_max snd_pcm_hw_params_set_period_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_minmax snd_pcm_hw_params_set_period_time_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_near snd_pcm_hw_params_set_period_time_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_first snd_pcm_hw_params_set_period_time_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_last snd_pcm_hw_params_set_period_time_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_size snd_pcm_hw_params_get_period_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_size_min snd_pcm_hw_params_get_period_size_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_size_max snd_pcm_hw_params_get_period_size_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_period_size snd_pcm_hw_params_test_period_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size snd_pcm_hw_params_set_period_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_min snd_pcm_hw_params_set_period_size_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_max snd_pcm_hw_params_set_period_size_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_minmax snd_pcm_hw_params_set_period_size_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_near snd_pcm_hw_params_set_period_size_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_first snd_pcm_hw_params_set_period_size_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_last snd_pcm_hw_params_set_period_size_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_integer snd_pcm_hw_params_set_period_size_integer_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_periods snd_pcm_hw_params_get_periods_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_periods_min snd_pcm_hw_params_get_periods_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_periods_max snd_pcm_hw_params_get_periods_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_periods snd_pcm_hw_params_test_periods_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods snd_pcm_hw_params_set_periods_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_min snd_pcm_hw_params_set_periods_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_max snd_pcm_hw_params_set_periods_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_minmax snd_pcm_hw_params_set_periods_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_near snd_pcm_hw_params_set_periods_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_first snd_pcm_hw_params_set_periods_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_last snd_pcm_hw_params_set_periods_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_integer snd_pcm_hw_params_set_periods_integer_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_time snd_pcm_hw_params_get_buffer_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_time_min snd_pcm_hw_params_get_buffer_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_time_max snd_pcm_hw_params_get_buffer_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_buffer_time snd_pcm_hw_params_test_buffer_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time snd_pcm_hw_params_set_buffer_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_min snd_pcm_hw_params_set_buffer_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_max snd_pcm_hw_params_set_buffer_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_minmax snd_pcm_hw_params_set_buffer_time_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_near snd_pcm_hw_params_set_buffer_time_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_first snd_pcm_hw_params_set_buffer_time_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_last snd_pcm_hw_params_set_buffer_time_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_size snd_pcm_hw_params_get_buffer_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_size_min snd_pcm_hw_params_get_buffer_size_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_size_max snd_pcm_hw_params_get_buffer_size_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_buffer_size snd_pcm_hw_params_test_buffer_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size snd_pcm_hw_params_set_buffer_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_min snd_pcm_hw_params_set_buffer_size_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_max snd_pcm_hw_params_set_buffer_size_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_minmax snd_pcm_hw_params_set_buffer_size_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_near snd_pcm_hw_params_set_buffer_size_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_first snd_pcm_hw_params_set_buffer_size_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_last snd_pcm_hw_params_set_buffer_size_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_min_align snd_pcm_hw_params_get_min_align_dylibloader_orig_asound
+#define snd_pcm_sw_params_sizeof snd_pcm_sw_params_sizeof_dylibloader_orig_asound
+#define snd_pcm_sw_params_malloc snd_pcm_sw_params_malloc_dylibloader_orig_asound
+#define snd_pcm_sw_params_free snd_pcm_sw_params_free_dylibloader_orig_asound
+#define snd_pcm_sw_params_copy snd_pcm_sw_params_copy_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_boundary snd_pcm_sw_params_get_boundary_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_tstamp_mode snd_pcm_sw_params_set_tstamp_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_tstamp_mode snd_pcm_sw_params_get_tstamp_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_tstamp_type snd_pcm_sw_params_set_tstamp_type_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_tstamp_type snd_pcm_sw_params_get_tstamp_type_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_avail_min snd_pcm_sw_params_set_avail_min_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_avail_min snd_pcm_sw_params_get_avail_min_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_period_event snd_pcm_sw_params_set_period_event_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_period_event snd_pcm_sw_params_get_period_event_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_start_threshold snd_pcm_sw_params_set_start_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_start_threshold snd_pcm_sw_params_get_start_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_stop_threshold snd_pcm_sw_params_set_stop_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_stop_threshold snd_pcm_sw_params_get_stop_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_silence_threshold snd_pcm_sw_params_set_silence_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_silence_threshold snd_pcm_sw_params_get_silence_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_silence_size snd_pcm_sw_params_set_silence_size_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_silence_size snd_pcm_sw_params_get_silence_size_dylibloader_orig_asound
+#define snd_pcm_access_mask_sizeof snd_pcm_access_mask_sizeof_dylibloader_orig_asound
+#define snd_pcm_access_mask_malloc snd_pcm_access_mask_malloc_dylibloader_orig_asound
+#define snd_pcm_access_mask_free snd_pcm_access_mask_free_dylibloader_orig_asound
+#define snd_pcm_access_mask_copy snd_pcm_access_mask_copy_dylibloader_orig_asound
+#define snd_pcm_access_mask_none snd_pcm_access_mask_none_dylibloader_orig_asound
+#define snd_pcm_access_mask_any snd_pcm_access_mask_any_dylibloader_orig_asound
+#define snd_pcm_access_mask_test snd_pcm_access_mask_test_dylibloader_orig_asound
+#define snd_pcm_access_mask_empty snd_pcm_access_mask_empty_dylibloader_orig_asound
+#define snd_pcm_access_mask_set snd_pcm_access_mask_set_dylibloader_orig_asound
+#define snd_pcm_access_mask_reset snd_pcm_access_mask_reset_dylibloader_orig_asound
+#define snd_pcm_format_mask_sizeof snd_pcm_format_mask_sizeof_dylibloader_orig_asound
+#define snd_pcm_format_mask_malloc snd_pcm_format_mask_malloc_dylibloader_orig_asound
+#define snd_pcm_format_mask_free snd_pcm_format_mask_free_dylibloader_orig_asound
+#define snd_pcm_format_mask_copy snd_pcm_format_mask_copy_dylibloader_orig_asound
+#define snd_pcm_format_mask_none snd_pcm_format_mask_none_dylibloader_orig_asound
+#define snd_pcm_format_mask_any snd_pcm_format_mask_any_dylibloader_orig_asound
+#define snd_pcm_format_mask_test snd_pcm_format_mask_test_dylibloader_orig_asound
+#define snd_pcm_format_mask_empty snd_pcm_format_mask_empty_dylibloader_orig_asound
+#define snd_pcm_format_mask_set snd_pcm_format_mask_set_dylibloader_orig_asound
+#define snd_pcm_format_mask_reset snd_pcm_format_mask_reset_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_sizeof snd_pcm_subformat_mask_sizeof_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_malloc snd_pcm_subformat_mask_malloc_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_free snd_pcm_subformat_mask_free_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_copy snd_pcm_subformat_mask_copy_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_none snd_pcm_subformat_mask_none_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_any snd_pcm_subformat_mask_any_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_test snd_pcm_subformat_mask_test_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_empty snd_pcm_subformat_mask_empty_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_set snd_pcm_subformat_mask_set_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_reset snd_pcm_subformat_mask_reset_dylibloader_orig_asound
+#define snd_pcm_status_sizeof snd_pcm_status_sizeof_dylibloader_orig_asound
+#define snd_pcm_status_malloc snd_pcm_status_malloc_dylibloader_orig_asound
+#define snd_pcm_status_free snd_pcm_status_free_dylibloader_orig_asound
+#define snd_pcm_status_copy snd_pcm_status_copy_dylibloader_orig_asound
+#define snd_pcm_status_get_state snd_pcm_status_get_state_dylibloader_orig_asound
+#define snd_pcm_status_get_trigger_tstamp snd_pcm_status_get_trigger_tstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_trigger_htstamp snd_pcm_status_get_trigger_htstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_tstamp snd_pcm_status_get_tstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_htstamp snd_pcm_status_get_htstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_audio_htstamp snd_pcm_status_get_audio_htstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_driver_htstamp snd_pcm_status_get_driver_htstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_audio_htstamp_report snd_pcm_status_get_audio_htstamp_report_dylibloader_orig_asound
+#define snd_pcm_status_set_audio_htstamp_config snd_pcm_status_set_audio_htstamp_config_dylibloader_orig_asound
+#define snd_pcm_status_get_delay snd_pcm_status_get_delay_dylibloader_orig_asound
+#define snd_pcm_status_get_avail snd_pcm_status_get_avail_dylibloader_orig_asound
+#define snd_pcm_status_get_avail_max snd_pcm_status_get_avail_max_dylibloader_orig_asound
+#define snd_pcm_status_get_overrange snd_pcm_status_get_overrange_dylibloader_orig_asound
+#define snd_pcm_type_name snd_pcm_type_name_dylibloader_orig_asound
+#define snd_pcm_stream_name snd_pcm_stream_name_dylibloader_orig_asound
+#define snd_pcm_access_name snd_pcm_access_name_dylibloader_orig_asound
+#define snd_pcm_format_name snd_pcm_format_name_dylibloader_orig_asound
+#define snd_pcm_format_description snd_pcm_format_description_dylibloader_orig_asound
+#define snd_pcm_subformat_name snd_pcm_subformat_name_dylibloader_orig_asound
+#define snd_pcm_subformat_description snd_pcm_subformat_description_dylibloader_orig_asound
+#define snd_pcm_format_value snd_pcm_format_value_dylibloader_orig_asound
+#define snd_pcm_tstamp_mode_name snd_pcm_tstamp_mode_name_dylibloader_orig_asound
+#define snd_pcm_state_name snd_pcm_state_name_dylibloader_orig_asound
+#define snd_pcm_dump snd_pcm_dump_dylibloader_orig_asound
+#define snd_pcm_dump_hw_setup snd_pcm_dump_hw_setup_dylibloader_orig_asound
+#define snd_pcm_dump_sw_setup snd_pcm_dump_sw_setup_dylibloader_orig_asound
+#define snd_pcm_dump_setup snd_pcm_dump_setup_dylibloader_orig_asound
+#define snd_pcm_hw_params_dump snd_pcm_hw_params_dump_dylibloader_orig_asound
+#define snd_pcm_sw_params_dump snd_pcm_sw_params_dump_dylibloader_orig_asound
+#define snd_pcm_status_dump snd_pcm_status_dump_dylibloader_orig_asound
+#define snd_pcm_mmap_begin snd_pcm_mmap_begin_dylibloader_orig_asound
+#define snd_pcm_mmap_commit snd_pcm_mmap_commit_dylibloader_orig_asound
+#define snd_pcm_mmap_writei snd_pcm_mmap_writei_dylibloader_orig_asound
+#define snd_pcm_mmap_readi snd_pcm_mmap_readi_dylibloader_orig_asound
+#define snd_pcm_mmap_writen snd_pcm_mmap_writen_dylibloader_orig_asound
+#define snd_pcm_mmap_readn snd_pcm_mmap_readn_dylibloader_orig_asound
+#define snd_pcm_format_signed snd_pcm_format_signed_dylibloader_orig_asound
+#define snd_pcm_format_unsigned snd_pcm_format_unsigned_dylibloader_orig_asound
+#define snd_pcm_format_linear snd_pcm_format_linear_dylibloader_orig_asound
+#define snd_pcm_format_float snd_pcm_format_float_dylibloader_orig_asound
+#define snd_pcm_format_little_endian snd_pcm_format_little_endian_dylibloader_orig_asound
+#define snd_pcm_format_big_endian snd_pcm_format_big_endian_dylibloader_orig_asound
+#define snd_pcm_format_cpu_endian snd_pcm_format_cpu_endian_dylibloader_orig_asound
+#define snd_pcm_format_width snd_pcm_format_width_dylibloader_orig_asound
+#define snd_pcm_format_physical_width snd_pcm_format_physical_width_dylibloader_orig_asound
+#define snd_pcm_build_linear_format snd_pcm_build_linear_format_dylibloader_orig_asound
+#define snd_pcm_format_size snd_pcm_format_size_dylibloader_orig_asound
+#define snd_pcm_format_silence snd_pcm_format_silence_dylibloader_orig_asound
+#define snd_pcm_format_silence_16 snd_pcm_format_silence_16_dylibloader_orig_asound
+#define snd_pcm_format_silence_32 snd_pcm_format_silence_32_dylibloader_orig_asound
+#define snd_pcm_format_silence_64 snd_pcm_format_silence_64_dylibloader_orig_asound
+#define snd_pcm_format_set_silence snd_pcm_format_set_silence_dylibloader_orig_asound
+#define snd_pcm_bytes_to_frames snd_pcm_bytes_to_frames_dylibloader_orig_asound
+#define snd_pcm_frames_to_bytes snd_pcm_frames_to_bytes_dylibloader_orig_asound
+#define snd_pcm_bytes_to_samples snd_pcm_bytes_to_samples_dylibloader_orig_asound
+#define snd_pcm_samples_to_bytes snd_pcm_samples_to_bytes_dylibloader_orig_asound
+#define snd_pcm_area_silence snd_pcm_area_silence_dylibloader_orig_asound
+#define snd_pcm_areas_silence snd_pcm_areas_silence_dylibloader_orig_asound
+#define snd_pcm_area_copy snd_pcm_area_copy_dylibloader_orig_asound
+#define snd_pcm_areas_copy snd_pcm_areas_copy_dylibloader_orig_asound
+#define snd_pcm_areas_copy_wrap snd_pcm_areas_copy_wrap_dylibloader_orig_asound
+#define snd_pcm_hook_get_pcm snd_pcm_hook_get_pcm_dylibloader_orig_asound
+#define snd_pcm_hook_get_private snd_pcm_hook_get_private_dylibloader_orig_asound
+#define snd_pcm_hook_set_private snd_pcm_hook_set_private_dylibloader_orig_asound
+#define snd_pcm_hook_add snd_pcm_hook_add_dylibloader_orig_asound
+#define snd_pcm_hook_remove snd_pcm_hook_remove_dylibloader_orig_asound
+#define snd_pcm_meter_get_bufsize snd_pcm_meter_get_bufsize_dylibloader_orig_asound
+#define snd_pcm_meter_get_channels snd_pcm_meter_get_channels_dylibloader_orig_asound
+#define snd_pcm_meter_get_rate snd_pcm_meter_get_rate_dylibloader_orig_asound
+#define snd_pcm_meter_get_now snd_pcm_meter_get_now_dylibloader_orig_asound
+#define snd_pcm_meter_get_boundary snd_pcm_meter_get_boundary_dylibloader_orig_asound
+#define snd_pcm_meter_add_scope snd_pcm_meter_add_scope_dylibloader_orig_asound
+#define snd_pcm_meter_search_scope snd_pcm_meter_search_scope_dylibloader_orig_asound
+#define snd_pcm_scope_malloc snd_pcm_scope_malloc_dylibloader_orig_asound
+#define snd_pcm_scope_set_ops snd_pcm_scope_set_ops_dylibloader_orig_asound
+#define snd_pcm_scope_set_name snd_pcm_scope_set_name_dylibloader_orig_asound
+#define snd_pcm_scope_get_name snd_pcm_scope_get_name_dylibloader_orig_asound
+#define snd_pcm_scope_get_callback_private snd_pcm_scope_get_callback_private_dylibloader_orig_asound
+#define snd_pcm_scope_set_callback_private snd_pcm_scope_set_callback_private_dylibloader_orig_asound
+#define snd_pcm_scope_s16_open snd_pcm_scope_s16_open_dylibloader_orig_asound
+#define snd_pcm_scope_s16_get_channel_buffer snd_pcm_scope_s16_get_channel_buffer_dylibloader_orig_asound
+#define snd_spcm_init snd_spcm_init_dylibloader_orig_asound
+#define snd_spcm_init_duplex snd_spcm_init_duplex_dylibloader_orig_asound
+#define snd_spcm_init_get_params snd_spcm_init_get_params_dylibloader_orig_asound
+#define snd_pcm_start_mode_name snd_pcm_start_mode_name_dylibloader_orig_asound
+#define snd_pcm_xrun_mode_name snd_pcm_xrun_mode_name_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_start_mode snd_pcm_sw_params_set_start_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_start_mode snd_pcm_sw_params_get_start_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_xrun_mode snd_pcm_sw_params_set_xrun_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_xrun_mode snd_pcm_sw_params_get_xrun_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_xfer_align snd_pcm_sw_params_set_xfer_align_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_xfer_align snd_pcm_sw_params_get_xfer_align_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_sleep_min snd_pcm_sw_params_set_sleep_min_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_sleep_min snd_pcm_sw_params_get_sleep_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_tick_time snd_pcm_hw_params_get_tick_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_tick_time_min snd_pcm_hw_params_get_tick_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_tick_time_max snd_pcm_hw_params_get_tick_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_tick_time snd_pcm_hw_params_test_tick_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time snd_pcm_hw_params_set_tick_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_min snd_pcm_hw_params_set_tick_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_max snd_pcm_hw_params_set_tick_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_minmax snd_pcm_hw_params_set_tick_time_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_near snd_pcm_hw_params_set_tick_time_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_first snd_pcm_hw_params_set_tick_time_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_last snd_pcm_hw_params_set_tick_time_last_dylibloader_orig_asound
+#define snd_rawmidi_open snd_rawmidi_open_dylibloader_orig_asound
+#define snd_rawmidi_open_lconf snd_rawmidi_open_lconf_dylibloader_orig_asound
+#define snd_rawmidi_close snd_rawmidi_close_dylibloader_orig_asound
+#define snd_rawmidi_poll_descriptors_count snd_rawmidi_poll_descriptors_count_dylibloader_orig_asound
+#define snd_rawmidi_poll_descriptors snd_rawmidi_poll_descriptors_dylibloader_orig_asound
+#define snd_rawmidi_poll_descriptors_revents snd_rawmidi_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_rawmidi_nonblock snd_rawmidi_nonblock_dylibloader_orig_asound
+#define snd_rawmidi_info_sizeof snd_rawmidi_info_sizeof_dylibloader_orig_asound
+#define snd_rawmidi_info_malloc snd_rawmidi_info_malloc_dylibloader_orig_asound
+#define snd_rawmidi_info_free snd_rawmidi_info_free_dylibloader_orig_asound
+#define snd_rawmidi_info_copy snd_rawmidi_info_copy_dylibloader_orig_asound
+#define snd_rawmidi_info_get_device snd_rawmidi_info_get_device_dylibloader_orig_asound
+#define snd_rawmidi_info_get_subdevice snd_rawmidi_info_get_subdevice_dylibloader_orig_asound
+#define snd_rawmidi_info_get_stream snd_rawmidi_info_get_stream_dylibloader_orig_asound
+#define snd_rawmidi_info_get_card snd_rawmidi_info_get_card_dylibloader_orig_asound
+#define snd_rawmidi_info_get_flags snd_rawmidi_info_get_flags_dylibloader_orig_asound
+#define snd_rawmidi_info_get_id snd_rawmidi_info_get_id_dylibloader_orig_asound
+#define snd_rawmidi_info_get_name snd_rawmidi_info_get_name_dylibloader_orig_asound
+#define snd_rawmidi_info_get_subdevice_name snd_rawmidi_info_get_subdevice_name_dylibloader_orig_asound
+#define snd_rawmidi_info_get_subdevices_count snd_rawmidi_info_get_subdevices_count_dylibloader_orig_asound
+#define snd_rawmidi_info_get_subdevices_avail snd_rawmidi_info_get_subdevices_avail_dylibloader_orig_asound
+#define snd_rawmidi_info_set_device snd_rawmidi_info_set_device_dylibloader_orig_asound
+#define snd_rawmidi_info_set_subdevice snd_rawmidi_info_set_subdevice_dylibloader_orig_asound
+#define snd_rawmidi_info_set_stream snd_rawmidi_info_set_stream_dylibloader_orig_asound
+#define snd_rawmidi_info snd_rawmidi_info_dylibloader_orig_asound
+#define snd_rawmidi_params_sizeof snd_rawmidi_params_sizeof_dylibloader_orig_asound
+#define snd_rawmidi_params_malloc snd_rawmidi_params_malloc_dylibloader_orig_asound
+#define snd_rawmidi_params_free snd_rawmidi_params_free_dylibloader_orig_asound
+#define snd_rawmidi_params_copy snd_rawmidi_params_copy_dylibloader_orig_asound
+#define snd_rawmidi_params_set_buffer_size snd_rawmidi_params_set_buffer_size_dylibloader_orig_asound
+#define snd_rawmidi_params_get_buffer_size snd_rawmidi_params_get_buffer_size_dylibloader_orig_asound
+#define snd_rawmidi_params_set_avail_min snd_rawmidi_params_set_avail_min_dylibloader_orig_asound
+#define snd_rawmidi_params_get_avail_min snd_rawmidi_params_get_avail_min_dylibloader_orig_asound
+#define snd_rawmidi_params_set_no_active_sensing snd_rawmidi_params_set_no_active_sensing_dylibloader_orig_asound
+#define snd_rawmidi_params_get_no_active_sensing snd_rawmidi_params_get_no_active_sensing_dylibloader_orig_asound
+#define snd_rawmidi_params snd_rawmidi_params_dylibloader_orig_asound
+#define snd_rawmidi_params_current snd_rawmidi_params_current_dylibloader_orig_asound
+#define snd_rawmidi_status_sizeof snd_rawmidi_status_sizeof_dylibloader_orig_asound
+#define snd_rawmidi_status_malloc snd_rawmidi_status_malloc_dylibloader_orig_asound
+#define snd_rawmidi_status_free snd_rawmidi_status_free_dylibloader_orig_asound
+#define snd_rawmidi_status_copy snd_rawmidi_status_copy_dylibloader_orig_asound
+#define snd_rawmidi_status_get_tstamp snd_rawmidi_status_get_tstamp_dylibloader_orig_asound
+#define snd_rawmidi_status_get_avail snd_rawmidi_status_get_avail_dylibloader_orig_asound
+#define snd_rawmidi_status_get_xruns snd_rawmidi_status_get_xruns_dylibloader_orig_asound
+#define snd_rawmidi_status snd_rawmidi_status_dylibloader_orig_asound
+#define snd_rawmidi_drain snd_rawmidi_drain_dylibloader_orig_asound
+#define snd_rawmidi_drop snd_rawmidi_drop_dylibloader_orig_asound
+#define snd_rawmidi_write snd_rawmidi_write_dylibloader_orig_asound
+#define snd_rawmidi_read snd_rawmidi_read_dylibloader_orig_asound
+#define snd_rawmidi_name snd_rawmidi_name_dylibloader_orig_asound
+#define snd_rawmidi_type snd_rawmidi_type_dylibloader_orig_asound
+#define snd_rawmidi_stream snd_rawmidi_stream_dylibloader_orig_asound
+#define snd_timer_query_open snd_timer_query_open_dylibloader_orig_asound
+#define snd_timer_query_open_lconf snd_timer_query_open_lconf_dylibloader_orig_asound
+#define snd_timer_query_close snd_timer_query_close_dylibloader_orig_asound
+#define snd_timer_query_next_device snd_timer_query_next_device_dylibloader_orig_asound
+#define snd_timer_query_info snd_timer_query_info_dylibloader_orig_asound
+#define snd_timer_query_params snd_timer_query_params_dylibloader_orig_asound
+#define snd_timer_query_status snd_timer_query_status_dylibloader_orig_asound
+#define snd_timer_open snd_timer_open_dylibloader_orig_asound
+#define snd_timer_open_lconf snd_timer_open_lconf_dylibloader_orig_asound
+#define snd_timer_close snd_timer_close_dylibloader_orig_asound
+#define snd_async_add_timer_handler snd_async_add_timer_handler_dylibloader_orig_asound
+#define snd_async_handler_get_timer snd_async_handler_get_timer_dylibloader_orig_asound
+#define snd_timer_poll_descriptors_count snd_timer_poll_descriptors_count_dylibloader_orig_asound
+#define snd_timer_poll_descriptors snd_timer_poll_descriptors_dylibloader_orig_asound
+#define snd_timer_poll_descriptors_revents snd_timer_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_timer_info snd_timer_info_dylibloader_orig_asound
+#define snd_timer_params snd_timer_params_dylibloader_orig_asound
+#define snd_timer_status snd_timer_status_dylibloader_orig_asound
+#define snd_timer_start snd_timer_start_dylibloader_orig_asound
+#define snd_timer_stop snd_timer_stop_dylibloader_orig_asound
+#define snd_timer_continue snd_timer_continue_dylibloader_orig_asound
+#define snd_timer_read snd_timer_read_dylibloader_orig_asound
+#define snd_timer_id_sizeof snd_timer_id_sizeof_dylibloader_orig_asound
+#define snd_timer_id_malloc snd_timer_id_malloc_dylibloader_orig_asound
+#define snd_timer_id_free snd_timer_id_free_dylibloader_orig_asound
+#define snd_timer_id_copy snd_timer_id_copy_dylibloader_orig_asound
+#define snd_timer_id_set_class snd_timer_id_set_class_dylibloader_orig_asound
+#define snd_timer_id_get_class snd_timer_id_get_class_dylibloader_orig_asound
+#define snd_timer_id_set_sclass snd_timer_id_set_sclass_dylibloader_orig_asound
+#define snd_timer_id_get_sclass snd_timer_id_get_sclass_dylibloader_orig_asound
+#define snd_timer_id_set_card snd_timer_id_set_card_dylibloader_orig_asound
+#define snd_timer_id_get_card snd_timer_id_get_card_dylibloader_orig_asound
+#define snd_timer_id_set_device snd_timer_id_set_device_dylibloader_orig_asound
+#define snd_timer_id_get_device snd_timer_id_get_device_dylibloader_orig_asound
+#define snd_timer_id_set_subdevice snd_timer_id_set_subdevice_dylibloader_orig_asound
+#define snd_timer_id_get_subdevice snd_timer_id_get_subdevice_dylibloader_orig_asound
+#define snd_timer_ginfo_sizeof snd_timer_ginfo_sizeof_dylibloader_orig_asound
+#define snd_timer_ginfo_malloc snd_timer_ginfo_malloc_dylibloader_orig_asound
+#define snd_timer_ginfo_free snd_timer_ginfo_free_dylibloader_orig_asound
+#define snd_timer_ginfo_copy snd_timer_ginfo_copy_dylibloader_orig_asound
+#define snd_timer_ginfo_set_tid snd_timer_ginfo_set_tid_dylibloader_orig_asound
+#define snd_timer_ginfo_get_tid snd_timer_ginfo_get_tid_dylibloader_orig_asound
+#define snd_timer_ginfo_get_flags snd_timer_ginfo_get_flags_dylibloader_orig_asound
+#define snd_timer_ginfo_get_card snd_timer_ginfo_get_card_dylibloader_orig_asound
+#define snd_timer_ginfo_get_id snd_timer_ginfo_get_id_dylibloader_orig_asound
+#define snd_timer_ginfo_get_name snd_timer_ginfo_get_name_dylibloader_orig_asound
+#define snd_timer_ginfo_get_resolution snd_timer_ginfo_get_resolution_dylibloader_orig_asound
+#define snd_timer_ginfo_get_resolution_min snd_timer_ginfo_get_resolution_min_dylibloader_orig_asound
+#define snd_timer_ginfo_get_resolution_max snd_timer_ginfo_get_resolution_max_dylibloader_orig_asound
+#define snd_timer_ginfo_get_clients snd_timer_ginfo_get_clients_dylibloader_orig_asound
+#define snd_timer_info_sizeof snd_timer_info_sizeof_dylibloader_orig_asound
+#define snd_timer_info_malloc snd_timer_info_malloc_dylibloader_orig_asound
+#define snd_timer_info_free snd_timer_info_free_dylibloader_orig_asound
+#define snd_timer_info_copy snd_timer_info_copy_dylibloader_orig_asound
+#define snd_timer_info_is_slave snd_timer_info_is_slave_dylibloader_orig_asound
+#define snd_timer_info_get_card snd_timer_info_get_card_dylibloader_orig_asound
+#define snd_timer_info_get_id snd_timer_info_get_id_dylibloader_orig_asound
+#define snd_timer_info_get_name snd_timer_info_get_name_dylibloader_orig_asound
+#define snd_timer_info_get_resolution snd_timer_info_get_resolution_dylibloader_orig_asound
+#define snd_timer_params_sizeof snd_timer_params_sizeof_dylibloader_orig_asound
+#define snd_timer_params_malloc snd_timer_params_malloc_dylibloader_orig_asound
+#define snd_timer_params_free snd_timer_params_free_dylibloader_orig_asound
+#define snd_timer_params_copy snd_timer_params_copy_dylibloader_orig_asound
+#define snd_timer_params_set_auto_start snd_timer_params_set_auto_start_dylibloader_orig_asound
+#define snd_timer_params_get_auto_start snd_timer_params_get_auto_start_dylibloader_orig_asound
+#define snd_timer_params_set_exclusive snd_timer_params_set_exclusive_dylibloader_orig_asound
+#define snd_timer_params_get_exclusive snd_timer_params_get_exclusive_dylibloader_orig_asound
+#define snd_timer_params_set_early_event snd_timer_params_set_early_event_dylibloader_orig_asound
+#define snd_timer_params_get_early_event snd_timer_params_get_early_event_dylibloader_orig_asound
+#define snd_timer_params_set_ticks snd_timer_params_set_ticks_dylibloader_orig_asound
+#define snd_timer_params_get_ticks snd_timer_params_get_ticks_dylibloader_orig_asound
+#define snd_timer_params_set_queue_size snd_timer_params_set_queue_size_dylibloader_orig_asound
+#define snd_timer_params_get_queue_size snd_timer_params_get_queue_size_dylibloader_orig_asound
+#define snd_timer_params_set_filter snd_timer_params_set_filter_dylibloader_orig_asound
+#define snd_timer_params_get_filter snd_timer_params_get_filter_dylibloader_orig_asound
+#define snd_timer_status_sizeof snd_timer_status_sizeof_dylibloader_orig_asound
+#define snd_timer_status_malloc snd_timer_status_malloc_dylibloader_orig_asound
+#define snd_timer_status_free snd_timer_status_free_dylibloader_orig_asound
+#define snd_timer_status_copy snd_timer_status_copy_dylibloader_orig_asound
+#define snd_timer_status_get_timestamp snd_timer_status_get_timestamp_dylibloader_orig_asound
+#define snd_timer_status_get_resolution snd_timer_status_get_resolution_dylibloader_orig_asound
+#define snd_timer_status_get_lost snd_timer_status_get_lost_dylibloader_orig_asound
+#define snd_timer_status_get_overrun snd_timer_status_get_overrun_dylibloader_orig_asound
+#define snd_timer_status_get_queue snd_timer_status_get_queue_dylibloader_orig_asound
+#define snd_timer_info_get_ticks snd_timer_info_get_ticks_dylibloader_orig_asound
+#define snd_hwdep_open snd_hwdep_open_dylibloader_orig_asound
+#define snd_hwdep_close snd_hwdep_close_dylibloader_orig_asound
+#define snd_hwdep_poll_descriptors snd_hwdep_poll_descriptors_dylibloader_orig_asound
+#define snd_hwdep_poll_descriptors_count snd_hwdep_poll_descriptors_count_dylibloader_orig_asound
+#define snd_hwdep_poll_descriptors_revents snd_hwdep_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_hwdep_nonblock snd_hwdep_nonblock_dylibloader_orig_asound
+#define snd_hwdep_info snd_hwdep_info_dylibloader_orig_asound
+#define snd_hwdep_dsp_status snd_hwdep_dsp_status_dylibloader_orig_asound
+#define snd_hwdep_dsp_load snd_hwdep_dsp_load_dylibloader_orig_asound
+#define snd_hwdep_ioctl snd_hwdep_ioctl_dylibloader_orig_asound
+#define snd_hwdep_write snd_hwdep_write_dylibloader_orig_asound
+#define snd_hwdep_read snd_hwdep_read_dylibloader_orig_asound
+#define snd_hwdep_info_sizeof snd_hwdep_info_sizeof_dylibloader_orig_asound
+#define snd_hwdep_info_malloc snd_hwdep_info_malloc_dylibloader_orig_asound
+#define snd_hwdep_info_free snd_hwdep_info_free_dylibloader_orig_asound
+#define snd_hwdep_info_copy snd_hwdep_info_copy_dylibloader_orig_asound
+#define snd_hwdep_info_get_device snd_hwdep_info_get_device_dylibloader_orig_asound
+#define snd_hwdep_info_get_card snd_hwdep_info_get_card_dylibloader_orig_asound
+#define snd_hwdep_info_get_id snd_hwdep_info_get_id_dylibloader_orig_asound
+#define snd_hwdep_info_get_name snd_hwdep_info_get_name_dylibloader_orig_asound
+#define snd_hwdep_info_get_iface snd_hwdep_info_get_iface_dylibloader_orig_asound
+#define snd_hwdep_info_set_device snd_hwdep_info_set_device_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_sizeof snd_hwdep_dsp_status_sizeof_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_malloc snd_hwdep_dsp_status_malloc_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_free snd_hwdep_dsp_status_free_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_copy snd_hwdep_dsp_status_copy_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_get_version snd_hwdep_dsp_status_get_version_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_get_id snd_hwdep_dsp_status_get_id_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_get_num_dsps snd_hwdep_dsp_status_get_num_dsps_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_get_dsp_loaded snd_hwdep_dsp_status_get_dsp_loaded_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_get_chip_ready snd_hwdep_dsp_status_get_chip_ready_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_sizeof snd_hwdep_dsp_image_sizeof_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_malloc snd_hwdep_dsp_image_malloc_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_free snd_hwdep_dsp_image_free_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_copy snd_hwdep_dsp_image_copy_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_get_index snd_hwdep_dsp_image_get_index_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_get_name snd_hwdep_dsp_image_get_name_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_get_image snd_hwdep_dsp_image_get_image_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_get_length snd_hwdep_dsp_image_get_length_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_set_index snd_hwdep_dsp_image_set_index_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_set_name snd_hwdep_dsp_image_set_name_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_set_image snd_hwdep_dsp_image_set_image_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_set_length snd_hwdep_dsp_image_set_length_dylibloader_orig_asound
+#define snd_card_load snd_card_load_dylibloader_orig_asound
+#define snd_card_next snd_card_next_dylibloader_orig_asound
+#define snd_card_get_index snd_card_get_index_dylibloader_orig_asound
+#define snd_card_get_name snd_card_get_name_dylibloader_orig_asound
+#define snd_card_get_longname snd_card_get_longname_dylibloader_orig_asound
+#define snd_device_name_hint snd_device_name_hint_dylibloader_orig_asound
+#define snd_device_name_free_hint snd_device_name_free_hint_dylibloader_orig_asound
+#define snd_device_name_get_hint snd_device_name_get_hint_dylibloader_orig_asound
+#define snd_ctl_open snd_ctl_open_dylibloader_orig_asound
+#define snd_ctl_open_lconf snd_ctl_open_lconf_dylibloader_orig_asound
+#define snd_ctl_open_fallback snd_ctl_open_fallback_dylibloader_orig_asound
+#define snd_ctl_close snd_ctl_close_dylibloader_orig_asound
+#define snd_ctl_nonblock snd_ctl_nonblock_dylibloader_orig_asound
+#define snd_async_add_ctl_handler snd_async_add_ctl_handler_dylibloader_orig_asound
+#define snd_async_handler_get_ctl snd_async_handler_get_ctl_dylibloader_orig_asound
+#define snd_ctl_poll_descriptors_count snd_ctl_poll_descriptors_count_dylibloader_orig_asound
+#define snd_ctl_poll_descriptors snd_ctl_poll_descriptors_dylibloader_orig_asound
+#define snd_ctl_poll_descriptors_revents snd_ctl_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_ctl_subscribe_events snd_ctl_subscribe_events_dylibloader_orig_asound
+#define snd_ctl_card_info snd_ctl_card_info_dylibloader_orig_asound
+#define snd_ctl_elem_list snd_ctl_elem_list_dylibloader_orig_asound
+#define snd_ctl_elem_info snd_ctl_elem_info_dylibloader_orig_asound
+#define snd_ctl_elem_read snd_ctl_elem_read_dylibloader_orig_asound
+#define snd_ctl_elem_write snd_ctl_elem_write_dylibloader_orig_asound
+#define snd_ctl_elem_lock snd_ctl_elem_lock_dylibloader_orig_asound
+#define snd_ctl_elem_unlock snd_ctl_elem_unlock_dylibloader_orig_asound
+#define snd_ctl_elem_tlv_read snd_ctl_elem_tlv_read_dylibloader_orig_asound
+#define snd_ctl_elem_tlv_write snd_ctl_elem_tlv_write_dylibloader_orig_asound
+#define snd_ctl_elem_tlv_command snd_ctl_elem_tlv_command_dylibloader_orig_asound
+#define snd_ctl_hwdep_next_device snd_ctl_hwdep_next_device_dylibloader_orig_asound
+#define snd_ctl_hwdep_info snd_ctl_hwdep_info_dylibloader_orig_asound
+#define snd_ctl_pcm_next_device snd_ctl_pcm_next_device_dylibloader_orig_asound
+#define snd_ctl_pcm_info snd_ctl_pcm_info_dylibloader_orig_asound
+#define snd_ctl_pcm_prefer_subdevice snd_ctl_pcm_prefer_subdevice_dylibloader_orig_asound
+#define snd_ctl_rawmidi_next_device snd_ctl_rawmidi_next_device_dylibloader_orig_asound
+#define snd_ctl_rawmidi_info snd_ctl_rawmidi_info_dylibloader_orig_asound
+#define snd_ctl_rawmidi_prefer_subdevice snd_ctl_rawmidi_prefer_subdevice_dylibloader_orig_asound
+#define snd_ctl_set_power_state snd_ctl_set_power_state_dylibloader_orig_asound
+#define snd_ctl_get_power_state snd_ctl_get_power_state_dylibloader_orig_asound
+#define snd_ctl_read snd_ctl_read_dylibloader_orig_asound
+#define snd_ctl_wait snd_ctl_wait_dylibloader_orig_asound
+#define snd_ctl_name snd_ctl_name_dylibloader_orig_asound
+#define snd_ctl_type snd_ctl_type_dylibloader_orig_asound
+#define snd_ctl_elem_type_name snd_ctl_elem_type_name_dylibloader_orig_asound
+#define snd_ctl_elem_iface_name snd_ctl_elem_iface_name_dylibloader_orig_asound
+#define snd_ctl_event_type_name snd_ctl_event_type_name_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_mask snd_ctl_event_elem_get_mask_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_numid snd_ctl_event_elem_get_numid_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_id snd_ctl_event_elem_get_id_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_interface snd_ctl_event_elem_get_interface_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_device snd_ctl_event_elem_get_device_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_subdevice snd_ctl_event_elem_get_subdevice_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_name snd_ctl_event_elem_get_name_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_index snd_ctl_event_elem_get_index_dylibloader_orig_asound
+#define snd_ctl_elem_list_alloc_space snd_ctl_elem_list_alloc_space_dylibloader_orig_asound
+#define snd_ctl_elem_list_free_space snd_ctl_elem_list_free_space_dylibloader_orig_asound
+#define snd_ctl_ascii_elem_id_get snd_ctl_ascii_elem_id_get_dylibloader_orig_asound
+#define snd_ctl_ascii_elem_id_parse snd_ctl_ascii_elem_id_parse_dylibloader_orig_asound
+#define snd_ctl_ascii_value_parse snd_ctl_ascii_value_parse_dylibloader_orig_asound
+#define snd_ctl_elem_id_sizeof snd_ctl_elem_id_sizeof_dylibloader_orig_asound
+#define snd_ctl_elem_id_malloc snd_ctl_elem_id_malloc_dylibloader_orig_asound
+#define snd_ctl_elem_id_free snd_ctl_elem_id_free_dylibloader_orig_asound
+#define snd_ctl_elem_id_clear snd_ctl_elem_id_clear_dylibloader_orig_asound
+#define snd_ctl_elem_id_copy snd_ctl_elem_id_copy_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_numid snd_ctl_elem_id_get_numid_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_interface snd_ctl_elem_id_get_interface_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_device snd_ctl_elem_id_get_device_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_subdevice snd_ctl_elem_id_get_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_name snd_ctl_elem_id_get_name_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_index snd_ctl_elem_id_get_index_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_numid snd_ctl_elem_id_set_numid_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_interface snd_ctl_elem_id_set_interface_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_device snd_ctl_elem_id_set_device_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_subdevice snd_ctl_elem_id_set_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_name snd_ctl_elem_id_set_name_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_index snd_ctl_elem_id_set_index_dylibloader_orig_asound
+#define snd_ctl_card_info_sizeof snd_ctl_card_info_sizeof_dylibloader_orig_asound
+#define snd_ctl_card_info_malloc snd_ctl_card_info_malloc_dylibloader_orig_asound
+#define snd_ctl_card_info_free snd_ctl_card_info_free_dylibloader_orig_asound
+#define snd_ctl_card_info_clear snd_ctl_card_info_clear_dylibloader_orig_asound
+#define snd_ctl_card_info_copy snd_ctl_card_info_copy_dylibloader_orig_asound
+#define snd_ctl_card_info_get_card snd_ctl_card_info_get_card_dylibloader_orig_asound
+#define snd_ctl_card_info_get_id snd_ctl_card_info_get_id_dylibloader_orig_asound
+#define snd_ctl_card_info_get_driver snd_ctl_card_info_get_driver_dylibloader_orig_asound
+#define snd_ctl_card_info_get_name snd_ctl_card_info_get_name_dylibloader_orig_asound
+#define snd_ctl_card_info_get_longname snd_ctl_card_info_get_longname_dylibloader_orig_asound
+#define snd_ctl_card_info_get_mixername snd_ctl_card_info_get_mixername_dylibloader_orig_asound
+#define snd_ctl_card_info_get_components snd_ctl_card_info_get_components_dylibloader_orig_asound
+#define snd_ctl_event_sizeof snd_ctl_event_sizeof_dylibloader_orig_asound
+#define snd_ctl_event_malloc snd_ctl_event_malloc_dylibloader_orig_asound
+#define snd_ctl_event_free snd_ctl_event_free_dylibloader_orig_asound
+#define snd_ctl_event_clear snd_ctl_event_clear_dylibloader_orig_asound
+#define snd_ctl_event_copy snd_ctl_event_copy_dylibloader_orig_asound
+#define snd_ctl_event_get_type snd_ctl_event_get_type_dylibloader_orig_asound
+#define snd_ctl_elem_list_sizeof snd_ctl_elem_list_sizeof_dylibloader_orig_asound
+#define snd_ctl_elem_list_malloc snd_ctl_elem_list_malloc_dylibloader_orig_asound
+#define snd_ctl_elem_list_free snd_ctl_elem_list_free_dylibloader_orig_asound
+#define snd_ctl_elem_list_clear snd_ctl_elem_list_clear_dylibloader_orig_asound
+#define snd_ctl_elem_list_copy snd_ctl_elem_list_copy_dylibloader_orig_asound
+#define snd_ctl_elem_list_set_offset snd_ctl_elem_list_set_offset_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_used snd_ctl_elem_list_get_used_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_count snd_ctl_elem_list_get_count_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_id snd_ctl_elem_list_get_id_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_numid snd_ctl_elem_list_get_numid_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_interface snd_ctl_elem_list_get_interface_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_device snd_ctl_elem_list_get_device_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_subdevice snd_ctl_elem_list_get_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_name snd_ctl_elem_list_get_name_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_index snd_ctl_elem_list_get_index_dylibloader_orig_asound
+#define snd_ctl_elem_info_sizeof snd_ctl_elem_info_sizeof_dylibloader_orig_asound
+#define snd_ctl_elem_info_malloc snd_ctl_elem_info_malloc_dylibloader_orig_asound
+#define snd_ctl_elem_info_free snd_ctl_elem_info_free_dylibloader_orig_asound
+#define snd_ctl_elem_info_clear snd_ctl_elem_info_clear_dylibloader_orig_asound
+#define snd_ctl_elem_info_copy snd_ctl_elem_info_copy_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_type snd_ctl_elem_info_get_type_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_readable snd_ctl_elem_info_is_readable_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_writable snd_ctl_elem_info_is_writable_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_volatile snd_ctl_elem_info_is_volatile_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_inactive snd_ctl_elem_info_is_inactive_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_locked snd_ctl_elem_info_is_locked_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_tlv_readable snd_ctl_elem_info_is_tlv_readable_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_tlv_writable snd_ctl_elem_info_is_tlv_writable_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_tlv_commandable snd_ctl_elem_info_is_tlv_commandable_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_owner snd_ctl_elem_info_is_owner_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_user snd_ctl_elem_info_is_user_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_owner snd_ctl_elem_info_get_owner_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_count snd_ctl_elem_info_get_count_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_min snd_ctl_elem_info_get_min_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_max snd_ctl_elem_info_get_max_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_step snd_ctl_elem_info_get_step_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_min64 snd_ctl_elem_info_get_min64_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_max64 snd_ctl_elem_info_get_max64_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_step64 snd_ctl_elem_info_get_step64_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_items snd_ctl_elem_info_get_items_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_item snd_ctl_elem_info_set_item_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_item_name snd_ctl_elem_info_get_item_name_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_dimensions snd_ctl_elem_info_get_dimensions_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_dimension snd_ctl_elem_info_get_dimension_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_dimension snd_ctl_elem_info_set_dimension_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_id snd_ctl_elem_info_get_id_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_numid snd_ctl_elem_info_get_numid_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_interface snd_ctl_elem_info_get_interface_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_device snd_ctl_elem_info_get_device_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_subdevice snd_ctl_elem_info_get_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_name snd_ctl_elem_info_get_name_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_index snd_ctl_elem_info_get_index_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_id snd_ctl_elem_info_set_id_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_numid snd_ctl_elem_info_set_numid_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_interface snd_ctl_elem_info_set_interface_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_device snd_ctl_elem_info_set_device_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_subdevice snd_ctl_elem_info_set_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_name snd_ctl_elem_info_set_name_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_index snd_ctl_elem_info_set_index_dylibloader_orig_asound
+#define snd_ctl_add_integer_elem_set snd_ctl_add_integer_elem_set_dylibloader_orig_asound
+#define snd_ctl_add_integer64_elem_set snd_ctl_add_integer64_elem_set_dylibloader_orig_asound
+#define snd_ctl_add_boolean_elem_set snd_ctl_add_boolean_elem_set_dylibloader_orig_asound
+#define snd_ctl_add_enumerated_elem_set snd_ctl_add_enumerated_elem_set_dylibloader_orig_asound
+#define snd_ctl_add_bytes_elem_set snd_ctl_add_bytes_elem_set_dylibloader_orig_asound
+#define snd_ctl_elem_add_integer snd_ctl_elem_add_integer_dylibloader_orig_asound
+#define snd_ctl_elem_add_integer64 snd_ctl_elem_add_integer64_dylibloader_orig_asound
+#define snd_ctl_elem_add_boolean snd_ctl_elem_add_boolean_dylibloader_orig_asound
+#define snd_ctl_elem_add_enumerated snd_ctl_elem_add_enumerated_dylibloader_orig_asound
+#define snd_ctl_elem_add_iec958 snd_ctl_elem_add_iec958_dylibloader_orig_asound
+#define snd_ctl_elem_remove snd_ctl_elem_remove_dylibloader_orig_asound
+#define snd_ctl_elem_value_sizeof snd_ctl_elem_value_sizeof_dylibloader_orig_asound
+#define snd_ctl_elem_value_malloc snd_ctl_elem_value_malloc_dylibloader_orig_asound
+#define snd_ctl_elem_value_free snd_ctl_elem_value_free_dylibloader_orig_asound
+#define snd_ctl_elem_value_clear snd_ctl_elem_value_clear_dylibloader_orig_asound
+#define snd_ctl_elem_value_copy snd_ctl_elem_value_copy_dylibloader_orig_asound
+#define snd_ctl_elem_value_compare snd_ctl_elem_value_compare_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_id snd_ctl_elem_value_get_id_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_numid snd_ctl_elem_value_get_numid_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_interface snd_ctl_elem_value_get_interface_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_device snd_ctl_elem_value_get_device_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_subdevice snd_ctl_elem_value_get_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_name snd_ctl_elem_value_get_name_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_index snd_ctl_elem_value_get_index_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_id snd_ctl_elem_value_set_id_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_numid snd_ctl_elem_value_set_numid_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_interface snd_ctl_elem_value_set_interface_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_device snd_ctl_elem_value_set_device_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_subdevice snd_ctl_elem_value_set_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_name snd_ctl_elem_value_set_name_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_index snd_ctl_elem_value_set_index_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_boolean snd_ctl_elem_value_get_boolean_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_integer snd_ctl_elem_value_get_integer_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_integer64 snd_ctl_elem_value_get_integer64_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_enumerated snd_ctl_elem_value_get_enumerated_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_byte snd_ctl_elem_value_get_byte_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_boolean snd_ctl_elem_value_set_boolean_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_integer snd_ctl_elem_value_set_integer_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_integer64 snd_ctl_elem_value_set_integer64_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_enumerated snd_ctl_elem_value_set_enumerated_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_byte snd_ctl_elem_value_set_byte_dylibloader_orig_asound
+#define snd_ctl_elem_set_bytes snd_ctl_elem_set_bytes_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_bytes snd_ctl_elem_value_get_bytes_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_iec958 snd_ctl_elem_value_get_iec958_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_iec958 snd_ctl_elem_value_set_iec958_dylibloader_orig_asound
+#define snd_tlv_parse_dB_info snd_tlv_parse_dB_info_dylibloader_orig_asound
+#define snd_tlv_get_dB_range snd_tlv_get_dB_range_dylibloader_orig_asound
+#define snd_tlv_convert_to_dB snd_tlv_convert_to_dB_dylibloader_orig_asound
+#define snd_tlv_convert_from_dB snd_tlv_convert_from_dB_dylibloader_orig_asound
+#define snd_ctl_get_dB_range snd_ctl_get_dB_range_dylibloader_orig_asound
+#define snd_ctl_convert_to_dB snd_ctl_convert_to_dB_dylibloader_orig_asound
+#define snd_ctl_convert_from_dB snd_ctl_convert_from_dB_dylibloader_orig_asound
+#define snd_hctl_compare_fast snd_hctl_compare_fast_dylibloader_orig_asound
+#define snd_hctl_open snd_hctl_open_dylibloader_orig_asound
+#define snd_hctl_open_ctl snd_hctl_open_ctl_dylibloader_orig_asound
+#define snd_hctl_close snd_hctl_close_dylibloader_orig_asound
+#define snd_hctl_nonblock snd_hctl_nonblock_dylibloader_orig_asound
+#define snd_hctl_poll_descriptors_count snd_hctl_poll_descriptors_count_dylibloader_orig_asound
+#define snd_hctl_poll_descriptors snd_hctl_poll_descriptors_dylibloader_orig_asound
+#define snd_hctl_poll_descriptors_revents snd_hctl_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_hctl_get_count snd_hctl_get_count_dylibloader_orig_asound
+#define snd_hctl_set_compare snd_hctl_set_compare_dylibloader_orig_asound
+#define snd_hctl_first_elem snd_hctl_first_elem_dylibloader_orig_asound
+#define snd_hctl_last_elem snd_hctl_last_elem_dylibloader_orig_asound
+#define snd_hctl_find_elem snd_hctl_find_elem_dylibloader_orig_asound
+#define snd_hctl_set_callback snd_hctl_set_callback_dylibloader_orig_asound
+#define snd_hctl_set_callback_private snd_hctl_set_callback_private_dylibloader_orig_asound
+#define snd_hctl_get_callback_private snd_hctl_get_callback_private_dylibloader_orig_asound
+#define snd_hctl_load snd_hctl_load_dylibloader_orig_asound
+#define snd_hctl_free snd_hctl_free_dylibloader_orig_asound
+#define snd_hctl_handle_events snd_hctl_handle_events_dylibloader_orig_asound
+#define snd_hctl_name snd_hctl_name_dylibloader_orig_asound
+#define snd_hctl_wait snd_hctl_wait_dylibloader_orig_asound
+#define snd_hctl_ctl snd_hctl_ctl_dylibloader_orig_asound
+#define snd_hctl_elem_next snd_hctl_elem_next_dylibloader_orig_asound
+#define snd_hctl_elem_prev snd_hctl_elem_prev_dylibloader_orig_asound
+#define snd_hctl_elem_info snd_hctl_elem_info_dylibloader_orig_asound
+#define snd_hctl_elem_read snd_hctl_elem_read_dylibloader_orig_asound
+#define snd_hctl_elem_write snd_hctl_elem_write_dylibloader_orig_asound
+#define snd_hctl_elem_tlv_read snd_hctl_elem_tlv_read_dylibloader_orig_asound
+#define snd_hctl_elem_tlv_write snd_hctl_elem_tlv_write_dylibloader_orig_asound
+#define snd_hctl_elem_tlv_command snd_hctl_elem_tlv_command_dylibloader_orig_asound
+#define snd_hctl_elem_get_hctl snd_hctl_elem_get_hctl_dylibloader_orig_asound
+#define snd_hctl_elem_get_id snd_hctl_elem_get_id_dylibloader_orig_asound
+#define snd_hctl_elem_get_numid snd_hctl_elem_get_numid_dylibloader_orig_asound
+#define snd_hctl_elem_get_interface snd_hctl_elem_get_interface_dylibloader_orig_asound
+#define snd_hctl_elem_get_device snd_hctl_elem_get_device_dylibloader_orig_asound
+#define snd_hctl_elem_get_subdevice snd_hctl_elem_get_subdevice_dylibloader_orig_asound
+#define snd_hctl_elem_get_name snd_hctl_elem_get_name_dylibloader_orig_asound
+#define snd_hctl_elem_get_index snd_hctl_elem_get_index_dylibloader_orig_asound
+#define snd_hctl_elem_set_callback snd_hctl_elem_set_callback_dylibloader_orig_asound
+#define snd_hctl_elem_get_callback_private snd_hctl_elem_get_callback_private_dylibloader_orig_asound
+#define snd_hctl_elem_set_callback_private snd_hctl_elem_set_callback_private_dylibloader_orig_asound
+#define snd_sctl_build snd_sctl_build_dylibloader_orig_asound
+#define snd_sctl_free snd_sctl_free_dylibloader_orig_asound
+#define snd_sctl_install snd_sctl_install_dylibloader_orig_asound
+#define snd_sctl_remove snd_sctl_remove_dylibloader_orig_asound
+#define snd_mixer_open snd_mixer_open_dylibloader_orig_asound
+#define snd_mixer_close snd_mixer_close_dylibloader_orig_asound
+#define snd_mixer_first_elem snd_mixer_first_elem_dylibloader_orig_asound
+#define snd_mixer_last_elem snd_mixer_last_elem_dylibloader_orig_asound
+#define snd_mixer_handle_events snd_mixer_handle_events_dylibloader_orig_asound
+#define snd_mixer_attach snd_mixer_attach_dylibloader_orig_asound
+#define snd_mixer_attach_hctl snd_mixer_attach_hctl_dylibloader_orig_asound
+#define snd_mixer_detach snd_mixer_detach_dylibloader_orig_asound
+#define snd_mixer_detach_hctl snd_mixer_detach_hctl_dylibloader_orig_asound
+#define snd_mixer_get_hctl snd_mixer_get_hctl_dylibloader_orig_asound
+#define snd_mixer_poll_descriptors_count snd_mixer_poll_descriptors_count_dylibloader_orig_asound
+#define snd_mixer_poll_descriptors snd_mixer_poll_descriptors_dylibloader_orig_asound
+#define snd_mixer_poll_descriptors_revents snd_mixer_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_mixer_load snd_mixer_load_dylibloader_orig_asound
+#define snd_mixer_free snd_mixer_free_dylibloader_orig_asound
+#define snd_mixer_wait snd_mixer_wait_dylibloader_orig_asound
+#define snd_mixer_set_compare snd_mixer_set_compare_dylibloader_orig_asound
+#define snd_mixer_set_callback snd_mixer_set_callback_dylibloader_orig_asound
+#define snd_mixer_get_callback_private snd_mixer_get_callback_private_dylibloader_orig_asound
+#define snd_mixer_set_callback_private snd_mixer_set_callback_private_dylibloader_orig_asound
+#define snd_mixer_get_count snd_mixer_get_count_dylibloader_orig_asound
+#define snd_mixer_class_unregister snd_mixer_class_unregister_dylibloader_orig_asound
+#define snd_mixer_elem_next snd_mixer_elem_next_dylibloader_orig_asound
+#define snd_mixer_elem_prev snd_mixer_elem_prev_dylibloader_orig_asound
+#define snd_mixer_elem_set_callback snd_mixer_elem_set_callback_dylibloader_orig_asound
+#define snd_mixer_elem_get_callback_private snd_mixer_elem_get_callback_private_dylibloader_orig_asound
+#define snd_mixer_elem_set_callback_private snd_mixer_elem_set_callback_private_dylibloader_orig_asound
+#define snd_mixer_elem_get_type snd_mixer_elem_get_type_dylibloader_orig_asound
+#define snd_mixer_class_register snd_mixer_class_register_dylibloader_orig_asound
+#define snd_mixer_elem_new snd_mixer_elem_new_dylibloader_orig_asound
+#define snd_mixer_elem_add snd_mixer_elem_add_dylibloader_orig_asound
+#define snd_mixer_elem_remove snd_mixer_elem_remove_dylibloader_orig_asound
+#define snd_mixer_elem_free snd_mixer_elem_free_dylibloader_orig_asound
+#define snd_mixer_elem_info snd_mixer_elem_info_dylibloader_orig_asound
+#define snd_mixer_elem_value snd_mixer_elem_value_dylibloader_orig_asound
+#define snd_mixer_elem_attach snd_mixer_elem_attach_dylibloader_orig_asound
+#define snd_mixer_elem_detach snd_mixer_elem_detach_dylibloader_orig_asound
+#define snd_mixer_elem_empty snd_mixer_elem_empty_dylibloader_orig_asound
+#define snd_mixer_elem_get_private snd_mixer_elem_get_private_dylibloader_orig_asound
+#define snd_mixer_class_sizeof snd_mixer_class_sizeof_dylibloader_orig_asound
+#define snd_mixer_class_malloc snd_mixer_class_malloc_dylibloader_orig_asound
+#define snd_mixer_class_free snd_mixer_class_free_dylibloader_orig_asound
+#define snd_mixer_class_copy snd_mixer_class_copy_dylibloader_orig_asound
+#define snd_mixer_class_get_mixer snd_mixer_class_get_mixer_dylibloader_orig_asound
+#define snd_mixer_class_get_event snd_mixer_class_get_event_dylibloader_orig_asound
+#define snd_mixer_class_get_private snd_mixer_class_get_private_dylibloader_orig_asound
+#define snd_mixer_class_get_compare snd_mixer_class_get_compare_dylibloader_orig_asound
+#define snd_mixer_class_set_event snd_mixer_class_set_event_dylibloader_orig_asound
+#define snd_mixer_class_set_private snd_mixer_class_set_private_dylibloader_orig_asound
+#define snd_mixer_class_set_private_free snd_mixer_class_set_private_free_dylibloader_orig_asound
+#define snd_mixer_class_set_compare snd_mixer_class_set_compare_dylibloader_orig_asound
+#define snd_mixer_selem_channel_name snd_mixer_selem_channel_name_dylibloader_orig_asound
+#define snd_mixer_selem_register snd_mixer_selem_register_dylibloader_orig_asound
+#define snd_mixer_selem_get_id snd_mixer_selem_get_id_dylibloader_orig_asound
+#define snd_mixer_selem_get_name snd_mixer_selem_get_name_dylibloader_orig_asound
+#define snd_mixer_selem_get_index snd_mixer_selem_get_index_dylibloader_orig_asound
+#define snd_mixer_find_selem snd_mixer_find_selem_dylibloader_orig_asound
+#define snd_mixer_selem_is_active snd_mixer_selem_is_active_dylibloader_orig_asound
+#define snd_mixer_selem_is_playback_mono snd_mixer_selem_is_playback_mono_dylibloader_orig_asound
+#define snd_mixer_selem_has_playback_channel snd_mixer_selem_has_playback_channel_dylibloader_orig_asound
+#define snd_mixer_selem_is_capture_mono snd_mixer_selem_is_capture_mono_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_channel snd_mixer_selem_has_capture_channel_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_group snd_mixer_selem_get_capture_group_dylibloader_orig_asound
+#define snd_mixer_selem_has_common_volume snd_mixer_selem_has_common_volume_dylibloader_orig_asound
+#define snd_mixer_selem_has_playback_volume snd_mixer_selem_has_playback_volume_dylibloader_orig_asound
+#define snd_mixer_selem_has_playback_volume_joined snd_mixer_selem_has_playback_volume_joined_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_volume snd_mixer_selem_has_capture_volume_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_volume_joined snd_mixer_selem_has_capture_volume_joined_dylibloader_orig_asound
+#define snd_mixer_selem_has_common_switch snd_mixer_selem_has_common_switch_dylibloader_orig_asound
+#define snd_mixer_selem_has_playback_switch snd_mixer_selem_has_playback_switch_dylibloader_orig_asound
+#define snd_mixer_selem_has_playback_switch_joined snd_mixer_selem_has_playback_switch_joined_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_switch snd_mixer_selem_has_capture_switch_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_switch_joined snd_mixer_selem_has_capture_switch_joined_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_switch_exclusive snd_mixer_selem_has_capture_switch_exclusive_dylibloader_orig_asound
+#define snd_mixer_selem_ask_playback_vol_dB snd_mixer_selem_ask_playback_vol_dB_dylibloader_orig_asound
+#define snd_mixer_selem_ask_capture_vol_dB snd_mixer_selem_ask_capture_vol_dB_dylibloader_orig_asound
+#define snd_mixer_selem_ask_playback_dB_vol snd_mixer_selem_ask_playback_dB_vol_dylibloader_orig_asound
+#define snd_mixer_selem_ask_capture_dB_vol snd_mixer_selem_ask_capture_dB_vol_dylibloader_orig_asound
+#define snd_mixer_selem_get_playback_volume snd_mixer_selem_get_playback_volume_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_volume snd_mixer_selem_get_capture_volume_dylibloader_orig_asound
+#define snd_mixer_selem_get_playback_dB snd_mixer_selem_get_playback_dB_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_dB snd_mixer_selem_get_capture_dB_dylibloader_orig_asound
+#define snd_mixer_selem_get_playback_switch snd_mixer_selem_get_playback_switch_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_switch snd_mixer_selem_get_capture_switch_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_volume snd_mixer_selem_set_playback_volume_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_volume snd_mixer_selem_set_capture_volume_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_dB snd_mixer_selem_set_playback_dB_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_dB snd_mixer_selem_set_capture_dB_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_volume_all snd_mixer_selem_set_playback_volume_all_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_volume_all snd_mixer_selem_set_capture_volume_all_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_dB_all snd_mixer_selem_set_playback_dB_all_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_dB_all snd_mixer_selem_set_capture_dB_all_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_switch snd_mixer_selem_set_playback_switch_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_switch snd_mixer_selem_set_capture_switch_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_switch_all snd_mixer_selem_set_playback_switch_all_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_switch_all snd_mixer_selem_set_capture_switch_all_dylibloader_orig_asound
+#define snd_mixer_selem_get_playback_volume_range snd_mixer_selem_get_playback_volume_range_dylibloader_orig_asound
+#define snd_mixer_selem_get_playback_dB_range snd_mixer_selem_get_playback_dB_range_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_volume_range snd_mixer_selem_set_playback_volume_range_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_volume_range snd_mixer_selem_get_capture_volume_range_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_dB_range snd_mixer_selem_get_capture_dB_range_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_volume_range snd_mixer_selem_set_capture_volume_range_dylibloader_orig_asound
+#define snd_mixer_selem_is_enumerated snd_mixer_selem_is_enumerated_dylibloader_orig_asound
+#define snd_mixer_selem_is_enum_playback snd_mixer_selem_is_enum_playback_dylibloader_orig_asound
+#define snd_mixer_selem_is_enum_capture snd_mixer_selem_is_enum_capture_dylibloader_orig_asound
+#define snd_mixer_selem_get_enum_items snd_mixer_selem_get_enum_items_dylibloader_orig_asound
+#define snd_mixer_selem_get_enum_item_name snd_mixer_selem_get_enum_item_name_dylibloader_orig_asound
+#define snd_mixer_selem_get_enum_item snd_mixer_selem_get_enum_item_dylibloader_orig_asound
+#define snd_mixer_selem_set_enum_item snd_mixer_selem_set_enum_item_dylibloader_orig_asound
+#define snd_mixer_selem_id_sizeof snd_mixer_selem_id_sizeof_dylibloader_orig_asound
+#define snd_mixer_selem_id_malloc snd_mixer_selem_id_malloc_dylibloader_orig_asound
+#define snd_mixer_selem_id_free snd_mixer_selem_id_free_dylibloader_orig_asound
+#define snd_mixer_selem_id_copy snd_mixer_selem_id_copy_dylibloader_orig_asound
+#define snd_mixer_selem_id_get_name snd_mixer_selem_id_get_name_dylibloader_orig_asound
+#define snd_mixer_selem_id_get_index snd_mixer_selem_id_get_index_dylibloader_orig_asound
+#define snd_mixer_selem_id_set_name snd_mixer_selem_id_set_name_dylibloader_orig_asound
+#define snd_mixer_selem_id_set_index snd_mixer_selem_id_set_index_dylibloader_orig_asound
+#define snd_mixer_selem_id_parse snd_mixer_selem_id_parse_dylibloader_orig_asound
+#define snd_seq_open snd_seq_open_dylibloader_orig_asound
+#define snd_seq_open_lconf snd_seq_open_lconf_dylibloader_orig_asound
+#define snd_seq_name snd_seq_name_dylibloader_orig_asound
+#define snd_seq_type snd_seq_type_dylibloader_orig_asound
+#define snd_seq_close snd_seq_close_dylibloader_orig_asound
+#define snd_seq_poll_descriptors_count snd_seq_poll_descriptors_count_dylibloader_orig_asound
+#define snd_seq_poll_descriptors snd_seq_poll_descriptors_dylibloader_orig_asound
+#define snd_seq_poll_descriptors_revents snd_seq_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_seq_nonblock snd_seq_nonblock_dylibloader_orig_asound
+#define snd_seq_client_id snd_seq_client_id_dylibloader_orig_asound
+#define snd_seq_get_output_buffer_size snd_seq_get_output_buffer_size_dylibloader_orig_asound
+#define snd_seq_get_input_buffer_size snd_seq_get_input_buffer_size_dylibloader_orig_asound
+#define snd_seq_set_output_buffer_size snd_seq_set_output_buffer_size_dylibloader_orig_asound
+#define snd_seq_set_input_buffer_size snd_seq_set_input_buffer_size_dylibloader_orig_asound
+#define snd_seq_system_info_sizeof snd_seq_system_info_sizeof_dylibloader_orig_asound
+#define snd_seq_system_info_malloc snd_seq_system_info_malloc_dylibloader_orig_asound
+#define snd_seq_system_info_free snd_seq_system_info_free_dylibloader_orig_asound
+#define snd_seq_system_info_copy snd_seq_system_info_copy_dylibloader_orig_asound
+#define snd_seq_system_info_get_queues snd_seq_system_info_get_queues_dylibloader_orig_asound
+#define snd_seq_system_info_get_clients snd_seq_system_info_get_clients_dylibloader_orig_asound
+#define snd_seq_system_info_get_ports snd_seq_system_info_get_ports_dylibloader_orig_asound
+#define snd_seq_system_info_get_channels snd_seq_system_info_get_channels_dylibloader_orig_asound
+#define snd_seq_system_info_get_cur_clients snd_seq_system_info_get_cur_clients_dylibloader_orig_asound
+#define snd_seq_system_info_get_cur_queues snd_seq_system_info_get_cur_queues_dylibloader_orig_asound
+#define snd_seq_system_info snd_seq_system_info_dylibloader_orig_asound
+#define snd_seq_client_info_sizeof snd_seq_client_info_sizeof_dylibloader_orig_asound
+#define snd_seq_client_info_malloc snd_seq_client_info_malloc_dylibloader_orig_asound
+#define snd_seq_client_info_free snd_seq_client_info_free_dylibloader_orig_asound
+#define snd_seq_client_info_copy snd_seq_client_info_copy_dylibloader_orig_asound
+#define snd_seq_client_info_get_client snd_seq_client_info_get_client_dylibloader_orig_asound
+#define snd_seq_client_info_get_type snd_seq_client_info_get_type_dylibloader_orig_asound
+#define snd_seq_client_info_get_name snd_seq_client_info_get_name_dylibloader_orig_asound
+#define snd_seq_client_info_get_broadcast_filter snd_seq_client_info_get_broadcast_filter_dylibloader_orig_asound
+#define snd_seq_client_info_get_error_bounce snd_seq_client_info_get_error_bounce_dylibloader_orig_asound
+#define snd_seq_client_info_get_card snd_seq_client_info_get_card_dylibloader_orig_asound
+#define snd_seq_client_info_get_pid snd_seq_client_info_get_pid_dylibloader_orig_asound
+#define snd_seq_client_info_get_event_filter snd_seq_client_info_get_event_filter_dylibloader_orig_asound
+#define snd_seq_client_info_get_num_ports snd_seq_client_info_get_num_ports_dylibloader_orig_asound
+#define snd_seq_client_info_get_event_lost snd_seq_client_info_get_event_lost_dylibloader_orig_asound
+#define snd_seq_client_info_set_client snd_seq_client_info_set_client_dylibloader_orig_asound
+#define snd_seq_client_info_set_name snd_seq_client_info_set_name_dylibloader_orig_asound
+#define snd_seq_client_info_set_broadcast_filter snd_seq_client_info_set_broadcast_filter_dylibloader_orig_asound
+#define snd_seq_client_info_set_error_bounce snd_seq_client_info_set_error_bounce_dylibloader_orig_asound
+#define snd_seq_client_info_set_event_filter snd_seq_client_info_set_event_filter_dylibloader_orig_asound
+#define snd_seq_client_info_event_filter_clear snd_seq_client_info_event_filter_clear_dylibloader_orig_asound
+#define snd_seq_client_info_event_filter_add snd_seq_client_info_event_filter_add_dylibloader_orig_asound
+#define snd_seq_client_info_event_filter_del snd_seq_client_info_event_filter_del_dylibloader_orig_asound
+#define snd_seq_client_info_event_filter_check snd_seq_client_info_event_filter_check_dylibloader_orig_asound
+#define snd_seq_get_client_info snd_seq_get_client_info_dylibloader_orig_asound
+#define snd_seq_get_any_client_info snd_seq_get_any_client_info_dylibloader_orig_asound
+#define snd_seq_set_client_info snd_seq_set_client_info_dylibloader_orig_asound
+#define snd_seq_query_next_client snd_seq_query_next_client_dylibloader_orig_asound
+#define snd_seq_client_pool_sizeof snd_seq_client_pool_sizeof_dylibloader_orig_asound
+#define snd_seq_client_pool_malloc snd_seq_client_pool_malloc_dylibloader_orig_asound
+#define snd_seq_client_pool_free snd_seq_client_pool_free_dylibloader_orig_asound
+#define snd_seq_client_pool_copy snd_seq_client_pool_copy_dylibloader_orig_asound
+#define snd_seq_client_pool_get_client snd_seq_client_pool_get_client_dylibloader_orig_asound
+#define snd_seq_client_pool_get_output_pool snd_seq_client_pool_get_output_pool_dylibloader_orig_asound
+#define snd_seq_client_pool_get_input_pool snd_seq_client_pool_get_input_pool_dylibloader_orig_asound
+#define snd_seq_client_pool_get_output_room snd_seq_client_pool_get_output_room_dylibloader_orig_asound
+#define snd_seq_client_pool_get_output_free snd_seq_client_pool_get_output_free_dylibloader_orig_asound
+#define snd_seq_client_pool_get_input_free snd_seq_client_pool_get_input_free_dylibloader_orig_asound
+#define snd_seq_client_pool_set_output_pool snd_seq_client_pool_set_output_pool_dylibloader_orig_asound
+#define snd_seq_client_pool_set_input_pool snd_seq_client_pool_set_input_pool_dylibloader_orig_asound
+#define snd_seq_client_pool_set_output_room snd_seq_client_pool_set_output_room_dylibloader_orig_asound
+#define snd_seq_get_client_pool snd_seq_get_client_pool_dylibloader_orig_asound
+#define snd_seq_set_client_pool snd_seq_set_client_pool_dylibloader_orig_asound
+#define snd_seq_port_info_sizeof snd_seq_port_info_sizeof_dylibloader_orig_asound
+#define snd_seq_port_info_malloc snd_seq_port_info_malloc_dylibloader_orig_asound
+#define snd_seq_port_info_free snd_seq_port_info_free_dylibloader_orig_asound
+#define snd_seq_port_info_copy snd_seq_port_info_copy_dylibloader_orig_asound
+#define snd_seq_port_info_get_client snd_seq_port_info_get_client_dylibloader_orig_asound
+#define snd_seq_port_info_get_port snd_seq_port_info_get_port_dylibloader_orig_asound
+#define snd_seq_port_info_get_addr snd_seq_port_info_get_addr_dylibloader_orig_asound
+#define snd_seq_port_info_get_name snd_seq_port_info_get_name_dylibloader_orig_asound
+#define snd_seq_port_info_get_capability snd_seq_port_info_get_capability_dylibloader_orig_asound
+#define snd_seq_port_info_get_type snd_seq_port_info_get_type_dylibloader_orig_asound
+#define snd_seq_port_info_get_midi_channels snd_seq_port_info_get_midi_channels_dylibloader_orig_asound
+#define snd_seq_port_info_get_midi_voices snd_seq_port_info_get_midi_voices_dylibloader_orig_asound
+#define snd_seq_port_info_get_synth_voices snd_seq_port_info_get_synth_voices_dylibloader_orig_asound
+#define snd_seq_port_info_get_read_use snd_seq_port_info_get_read_use_dylibloader_orig_asound
+#define snd_seq_port_info_get_write_use snd_seq_port_info_get_write_use_dylibloader_orig_asound
+#define snd_seq_port_info_get_port_specified snd_seq_port_info_get_port_specified_dylibloader_orig_asound
+#define snd_seq_port_info_get_timestamping snd_seq_port_info_get_timestamping_dylibloader_orig_asound
+#define snd_seq_port_info_get_timestamp_real snd_seq_port_info_get_timestamp_real_dylibloader_orig_asound
+#define snd_seq_port_info_get_timestamp_queue snd_seq_port_info_get_timestamp_queue_dylibloader_orig_asound
+#define snd_seq_port_info_set_client snd_seq_port_info_set_client_dylibloader_orig_asound
+#define snd_seq_port_info_set_port snd_seq_port_info_set_port_dylibloader_orig_asound
+#define snd_seq_port_info_set_addr snd_seq_port_info_set_addr_dylibloader_orig_asound
+#define snd_seq_port_info_set_name snd_seq_port_info_set_name_dylibloader_orig_asound
+#define snd_seq_port_info_set_capability snd_seq_port_info_set_capability_dylibloader_orig_asound
+#define snd_seq_port_info_set_type snd_seq_port_info_set_type_dylibloader_orig_asound
+#define snd_seq_port_info_set_midi_channels snd_seq_port_info_set_midi_channels_dylibloader_orig_asound
+#define snd_seq_port_info_set_midi_voices snd_seq_port_info_set_midi_voices_dylibloader_orig_asound
+#define snd_seq_port_info_set_synth_voices snd_seq_port_info_set_synth_voices_dylibloader_orig_asound
+#define snd_seq_port_info_set_port_specified snd_seq_port_info_set_port_specified_dylibloader_orig_asound
+#define snd_seq_port_info_set_timestamping snd_seq_port_info_set_timestamping_dylibloader_orig_asound
+#define snd_seq_port_info_set_timestamp_real snd_seq_port_info_set_timestamp_real_dylibloader_orig_asound
+#define snd_seq_port_info_set_timestamp_queue snd_seq_port_info_set_timestamp_queue_dylibloader_orig_asound
+#define snd_seq_create_port snd_seq_create_port_dylibloader_orig_asound
+#define snd_seq_delete_port snd_seq_delete_port_dylibloader_orig_asound
+#define snd_seq_get_port_info snd_seq_get_port_info_dylibloader_orig_asound
+#define snd_seq_get_any_port_info snd_seq_get_any_port_info_dylibloader_orig_asound
+#define snd_seq_set_port_info snd_seq_set_port_info_dylibloader_orig_asound
+#define snd_seq_query_next_port snd_seq_query_next_port_dylibloader_orig_asound
+#define snd_seq_port_subscribe_sizeof snd_seq_port_subscribe_sizeof_dylibloader_orig_asound
+#define snd_seq_port_subscribe_malloc snd_seq_port_subscribe_malloc_dylibloader_orig_asound
+#define snd_seq_port_subscribe_free snd_seq_port_subscribe_free_dylibloader_orig_asound
+#define snd_seq_port_subscribe_copy snd_seq_port_subscribe_copy_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_sender snd_seq_port_subscribe_get_sender_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_dest snd_seq_port_subscribe_get_dest_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_queue snd_seq_port_subscribe_get_queue_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_exclusive snd_seq_port_subscribe_get_exclusive_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_time_update snd_seq_port_subscribe_get_time_update_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_time_real snd_seq_port_subscribe_get_time_real_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_sender snd_seq_port_subscribe_set_sender_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_dest snd_seq_port_subscribe_set_dest_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_queue snd_seq_port_subscribe_set_queue_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_exclusive snd_seq_port_subscribe_set_exclusive_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_time_update snd_seq_port_subscribe_set_time_update_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_time_real snd_seq_port_subscribe_set_time_real_dylibloader_orig_asound
+#define snd_seq_get_port_subscription snd_seq_get_port_subscription_dylibloader_orig_asound
+#define snd_seq_subscribe_port snd_seq_subscribe_port_dylibloader_orig_asound
+#define snd_seq_unsubscribe_port snd_seq_unsubscribe_port_dylibloader_orig_asound
+#define snd_seq_query_subscribe_sizeof snd_seq_query_subscribe_sizeof_dylibloader_orig_asound
+#define snd_seq_query_subscribe_malloc snd_seq_query_subscribe_malloc_dylibloader_orig_asound
+#define snd_seq_query_subscribe_free snd_seq_query_subscribe_free_dylibloader_orig_asound
+#define snd_seq_query_subscribe_copy snd_seq_query_subscribe_copy_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_client snd_seq_query_subscribe_get_client_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_port snd_seq_query_subscribe_get_port_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_root snd_seq_query_subscribe_get_root_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_type snd_seq_query_subscribe_get_type_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_index snd_seq_query_subscribe_get_index_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_num_subs snd_seq_query_subscribe_get_num_subs_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_addr snd_seq_query_subscribe_get_addr_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_queue snd_seq_query_subscribe_get_queue_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_exclusive snd_seq_query_subscribe_get_exclusive_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_time_update snd_seq_query_subscribe_get_time_update_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_time_real snd_seq_query_subscribe_get_time_real_dylibloader_orig_asound
+#define snd_seq_query_subscribe_set_client snd_seq_query_subscribe_set_client_dylibloader_orig_asound
+#define snd_seq_query_subscribe_set_port snd_seq_query_subscribe_set_port_dylibloader_orig_asound
+#define snd_seq_query_subscribe_set_root snd_seq_query_subscribe_set_root_dylibloader_orig_asound
+#define snd_seq_query_subscribe_set_type snd_seq_query_subscribe_set_type_dylibloader_orig_asound
+#define snd_seq_query_subscribe_set_index snd_seq_query_subscribe_set_index_dylibloader_orig_asound
+#define snd_seq_query_port_subscribers snd_seq_query_port_subscribers_dylibloader_orig_asound
+#define snd_seq_queue_info_sizeof snd_seq_queue_info_sizeof_dylibloader_orig_asound
+#define snd_seq_queue_info_malloc snd_seq_queue_info_malloc_dylibloader_orig_asound
+#define snd_seq_queue_info_free snd_seq_queue_info_free_dylibloader_orig_asound
+#define snd_seq_queue_info_copy snd_seq_queue_info_copy_dylibloader_orig_asound
+#define snd_seq_queue_info_get_queue snd_seq_queue_info_get_queue_dylibloader_orig_asound
+#define snd_seq_queue_info_get_name snd_seq_queue_info_get_name_dylibloader_orig_asound
+#define snd_seq_queue_info_get_owner snd_seq_queue_info_get_owner_dylibloader_orig_asound
+#define snd_seq_queue_info_get_locked snd_seq_queue_info_get_locked_dylibloader_orig_asound
+#define snd_seq_queue_info_get_flags snd_seq_queue_info_get_flags_dylibloader_orig_asound
+#define snd_seq_queue_info_set_name snd_seq_queue_info_set_name_dylibloader_orig_asound
+#define snd_seq_queue_info_set_owner snd_seq_queue_info_set_owner_dylibloader_orig_asound
+#define snd_seq_queue_info_set_locked snd_seq_queue_info_set_locked_dylibloader_orig_asound
+#define snd_seq_queue_info_set_flags snd_seq_queue_info_set_flags_dylibloader_orig_asound
+#define snd_seq_create_queue snd_seq_create_queue_dylibloader_orig_asound
+#define snd_seq_alloc_named_queue snd_seq_alloc_named_queue_dylibloader_orig_asound
+#define snd_seq_alloc_queue snd_seq_alloc_queue_dylibloader_orig_asound
+#define snd_seq_free_queue snd_seq_free_queue_dylibloader_orig_asound
+#define snd_seq_get_queue_info snd_seq_get_queue_info_dylibloader_orig_asound
+#define snd_seq_set_queue_info snd_seq_set_queue_info_dylibloader_orig_asound
+#define snd_seq_query_named_queue snd_seq_query_named_queue_dylibloader_orig_asound
+#define snd_seq_get_queue_usage snd_seq_get_queue_usage_dylibloader_orig_asound
+#define snd_seq_set_queue_usage snd_seq_set_queue_usage_dylibloader_orig_asound
+#define snd_seq_queue_status_sizeof snd_seq_queue_status_sizeof_dylibloader_orig_asound
+#define snd_seq_queue_status_malloc snd_seq_queue_status_malloc_dylibloader_orig_asound
+#define snd_seq_queue_status_free snd_seq_queue_status_free_dylibloader_orig_asound
+#define snd_seq_queue_status_copy snd_seq_queue_status_copy_dylibloader_orig_asound
+#define snd_seq_queue_status_get_queue snd_seq_queue_status_get_queue_dylibloader_orig_asound
+#define snd_seq_queue_status_get_events snd_seq_queue_status_get_events_dylibloader_orig_asound
+#define snd_seq_queue_status_get_tick_time snd_seq_queue_status_get_tick_time_dylibloader_orig_asound
+#define snd_seq_queue_status_get_real_time snd_seq_queue_status_get_real_time_dylibloader_orig_asound
+#define snd_seq_queue_status_get_status snd_seq_queue_status_get_status_dylibloader_orig_asound
+#define snd_seq_get_queue_status snd_seq_get_queue_status_dylibloader_orig_asound
+#define snd_seq_queue_tempo_sizeof snd_seq_queue_tempo_sizeof_dylibloader_orig_asound
+#define snd_seq_queue_tempo_malloc snd_seq_queue_tempo_malloc_dylibloader_orig_asound
+#define snd_seq_queue_tempo_free snd_seq_queue_tempo_free_dylibloader_orig_asound
+#define snd_seq_queue_tempo_copy snd_seq_queue_tempo_copy_dylibloader_orig_asound
+#define snd_seq_queue_tempo_get_queue snd_seq_queue_tempo_get_queue_dylibloader_orig_asound
+#define snd_seq_queue_tempo_get_tempo snd_seq_queue_tempo_get_tempo_dylibloader_orig_asound
+#define snd_seq_queue_tempo_get_ppq snd_seq_queue_tempo_get_ppq_dylibloader_orig_asound
+#define snd_seq_queue_tempo_get_skew snd_seq_queue_tempo_get_skew_dylibloader_orig_asound
+#define snd_seq_queue_tempo_get_skew_base snd_seq_queue_tempo_get_skew_base_dylibloader_orig_asound
+#define snd_seq_queue_tempo_set_tempo snd_seq_queue_tempo_set_tempo_dylibloader_orig_asound
+#define snd_seq_queue_tempo_set_ppq snd_seq_queue_tempo_set_ppq_dylibloader_orig_asound
+#define snd_seq_queue_tempo_set_skew snd_seq_queue_tempo_set_skew_dylibloader_orig_asound
+#define snd_seq_queue_tempo_set_skew_base snd_seq_queue_tempo_set_skew_base_dylibloader_orig_asound
+#define snd_seq_get_queue_tempo snd_seq_get_queue_tempo_dylibloader_orig_asound
+#define snd_seq_set_queue_tempo snd_seq_set_queue_tempo_dylibloader_orig_asound
+#define snd_seq_queue_timer_sizeof snd_seq_queue_timer_sizeof_dylibloader_orig_asound
+#define snd_seq_queue_timer_malloc snd_seq_queue_timer_malloc_dylibloader_orig_asound
+#define snd_seq_queue_timer_free snd_seq_queue_timer_free_dylibloader_orig_asound
+#define snd_seq_queue_timer_copy snd_seq_queue_timer_copy_dylibloader_orig_asound
+#define snd_seq_queue_timer_get_queue snd_seq_queue_timer_get_queue_dylibloader_orig_asound
+#define snd_seq_queue_timer_get_type snd_seq_queue_timer_get_type_dylibloader_orig_asound
+#define snd_seq_queue_timer_get_id snd_seq_queue_timer_get_id_dylibloader_orig_asound
+#define snd_seq_queue_timer_get_resolution snd_seq_queue_timer_get_resolution_dylibloader_orig_asound
+#define snd_seq_queue_timer_set_type snd_seq_queue_timer_set_type_dylibloader_orig_asound
+#define snd_seq_queue_timer_set_id snd_seq_queue_timer_set_id_dylibloader_orig_asound
+#define snd_seq_queue_timer_set_resolution snd_seq_queue_timer_set_resolution_dylibloader_orig_asound
+#define snd_seq_get_queue_timer snd_seq_get_queue_timer_dylibloader_orig_asound
+#define snd_seq_set_queue_timer snd_seq_set_queue_timer_dylibloader_orig_asound
+#define snd_seq_free_event snd_seq_free_event_dylibloader_orig_asound
+#define snd_seq_event_length snd_seq_event_length_dylibloader_orig_asound
+#define snd_seq_event_output snd_seq_event_output_dylibloader_orig_asound
+#define snd_seq_event_output_buffer snd_seq_event_output_buffer_dylibloader_orig_asound
+#define snd_seq_event_output_direct snd_seq_event_output_direct_dylibloader_orig_asound
+#define snd_seq_event_input snd_seq_event_input_dylibloader_orig_asound
+#define snd_seq_event_input_pending snd_seq_event_input_pending_dylibloader_orig_asound
+#define snd_seq_drain_output snd_seq_drain_output_dylibloader_orig_asound
+#define snd_seq_event_output_pending snd_seq_event_output_pending_dylibloader_orig_asound
+#define snd_seq_extract_output snd_seq_extract_output_dylibloader_orig_asound
+#define snd_seq_drop_output snd_seq_drop_output_dylibloader_orig_asound
+#define snd_seq_drop_output_buffer snd_seq_drop_output_buffer_dylibloader_orig_asound
+#define snd_seq_drop_input snd_seq_drop_input_dylibloader_orig_asound
+#define snd_seq_drop_input_buffer snd_seq_drop_input_buffer_dylibloader_orig_asound
+#define snd_seq_remove_events_sizeof snd_seq_remove_events_sizeof_dylibloader_orig_asound
+#define snd_seq_remove_events_malloc snd_seq_remove_events_malloc_dylibloader_orig_asound
+#define snd_seq_remove_events_free snd_seq_remove_events_free_dylibloader_orig_asound
+#define snd_seq_remove_events_copy snd_seq_remove_events_copy_dylibloader_orig_asound
+#define snd_seq_remove_events_get_condition snd_seq_remove_events_get_condition_dylibloader_orig_asound
+#define snd_seq_remove_events_get_queue snd_seq_remove_events_get_queue_dylibloader_orig_asound
+#define snd_seq_remove_events_get_time snd_seq_remove_events_get_time_dylibloader_orig_asound
+#define snd_seq_remove_events_get_dest snd_seq_remove_events_get_dest_dylibloader_orig_asound
+#define snd_seq_remove_events_get_channel snd_seq_remove_events_get_channel_dylibloader_orig_asound
+#define snd_seq_remove_events_get_event_type snd_seq_remove_events_get_event_type_dylibloader_orig_asound
+#define snd_seq_remove_events_get_tag snd_seq_remove_events_get_tag_dylibloader_orig_asound
+#define snd_seq_remove_events_set_condition snd_seq_remove_events_set_condition_dylibloader_orig_asound
+#define snd_seq_remove_events_set_queue snd_seq_remove_events_set_queue_dylibloader_orig_asound
+#define snd_seq_remove_events_set_time snd_seq_remove_events_set_time_dylibloader_orig_asound
+#define snd_seq_remove_events_set_dest snd_seq_remove_events_set_dest_dylibloader_orig_asound
+#define snd_seq_remove_events_set_channel snd_seq_remove_events_set_channel_dylibloader_orig_asound
+#define snd_seq_remove_events_set_event_type snd_seq_remove_events_set_event_type_dylibloader_orig_asound
+#define snd_seq_remove_events_set_tag snd_seq_remove_events_set_tag_dylibloader_orig_asound
+#define snd_seq_remove_events snd_seq_remove_events_dylibloader_orig_asound
+#define snd_seq_set_bit snd_seq_set_bit_dylibloader_orig_asound
+#define snd_seq_unset_bit snd_seq_unset_bit_dylibloader_orig_asound
+#define snd_seq_change_bit snd_seq_change_bit_dylibloader_orig_asound
+#define snd_seq_get_bit snd_seq_get_bit_dylibloader_orig_asound
+#define snd_seq_control_queue snd_seq_control_queue_dylibloader_orig_asound
+#define snd_seq_create_simple_port snd_seq_create_simple_port_dylibloader_orig_asound
+#define snd_seq_delete_simple_port snd_seq_delete_simple_port_dylibloader_orig_asound
+#define snd_seq_connect_from snd_seq_connect_from_dylibloader_orig_asound
+#define snd_seq_connect_to snd_seq_connect_to_dylibloader_orig_asound
+#define snd_seq_disconnect_from snd_seq_disconnect_from_dylibloader_orig_asound
+#define snd_seq_disconnect_to snd_seq_disconnect_to_dylibloader_orig_asound
+#define snd_seq_set_client_name snd_seq_set_client_name_dylibloader_orig_asound
+#define snd_seq_set_client_event_filter snd_seq_set_client_event_filter_dylibloader_orig_asound
+#define snd_seq_set_client_pool_output snd_seq_set_client_pool_output_dylibloader_orig_asound
+#define snd_seq_set_client_pool_output_room snd_seq_set_client_pool_output_room_dylibloader_orig_asound
+#define snd_seq_set_client_pool_input snd_seq_set_client_pool_input_dylibloader_orig_asound
+#define snd_seq_sync_output_queue snd_seq_sync_output_queue_dylibloader_orig_asound
+#define snd_seq_parse_address snd_seq_parse_address_dylibloader_orig_asound
+#define snd_seq_reset_pool_output snd_seq_reset_pool_output_dylibloader_orig_asound
+#define snd_seq_reset_pool_input snd_seq_reset_pool_input_dylibloader_orig_asound
+#define snd_midi_event_new snd_midi_event_new_dylibloader_orig_asound
+#define snd_midi_event_resize_buffer snd_midi_event_resize_buffer_dylibloader_orig_asound
+#define snd_midi_event_free snd_midi_event_free_dylibloader_orig_asound
+#define snd_midi_event_init snd_midi_event_init_dylibloader_orig_asound
+#define snd_midi_event_reset_encode snd_midi_event_reset_encode_dylibloader_orig_asound
+#define snd_midi_event_reset_decode snd_midi_event_reset_decode_dylibloader_orig_asound
+#define snd_midi_event_no_status snd_midi_event_no_status_dylibloader_orig_asound
+#define snd_midi_event_encode snd_midi_event_encode_dylibloader_orig_asound
+#define snd_midi_event_encode_byte snd_midi_event_encode_byte_dylibloader_orig_asound
+#define snd_midi_event_decode snd_midi_event_decode_dylibloader_orig_asound
+#include <alsa/asoundlib.h>
+#undef snd_asoundlib_version
+#undef snd_dlpath
+#undef snd_dlopen
+#undef snd_dlsym
+#undef snd_dlclose
+#undef snd_async_add_handler
+#undef snd_async_del_handler
+#undef snd_async_handler_get_fd
+#undef snd_async_handler_get_signo
+#undef snd_async_handler_get_callback_private
+#undef snd_shm_area_create
+#undef snd_shm_area_share
+#undef snd_shm_area_destroy
+#undef snd_user_file
+#undef snd_input_stdio_open
+#undef snd_input_stdio_attach
+#undef snd_input_buffer_open
+#undef snd_input_close
+#undef snd_input_scanf
+#undef snd_input_gets
+#undef snd_input_getc
+#undef snd_input_ungetc
+#undef snd_output_stdio_open
+#undef snd_output_stdio_attach
+#undef snd_output_buffer_open
+#undef snd_output_buffer_string
+#undef snd_output_close
+#undef snd_output_printf
+#undef snd_output_vprintf
+#undef snd_output_puts
+#undef snd_output_putc
+#undef snd_output_flush
+#undef snd_strerror
+#undef snd_lib_error_set_handler
+#undef snd_lib_error_set_local
+#undef snd_config_topdir
+#undef snd_config_top
+#undef snd_config_load
+#undef snd_config_load_override
+#undef snd_config_save
+#undef snd_config_update
+#undef snd_config_update_r
+#undef snd_config_update_free
+#undef snd_config_update_free_global
+#undef snd_config_update_ref
+#undef snd_config_ref
+#undef snd_config_unref
+#undef snd_config_search
+#undef snd_config_searchv
+#undef snd_config_search_definition
+#undef snd_config_expand
+#undef snd_config_evaluate
+#undef snd_config_add
+#undef snd_config_add_before
+#undef snd_config_add_after
+#undef snd_config_remove
+#undef snd_config_delete
+#undef snd_config_delete_compound_members
+#undef snd_config_copy
+#undef snd_config_make
+#undef snd_config_make_integer
+#undef snd_config_make_integer64
+#undef snd_config_make_real
+#undef snd_config_make_string
+#undef snd_config_make_pointer
+#undef snd_config_make_compound
+#undef snd_config_imake_integer
+#undef snd_config_imake_integer64
+#undef snd_config_imake_real
+#undef snd_config_imake_string
+#undef snd_config_imake_safe_string
+#undef snd_config_imake_pointer
+#undef snd_config_get_type
+#undef snd_config_is_array
+#undef snd_config_set_id
+#undef snd_config_set_integer
+#undef snd_config_set_integer64
+#undef snd_config_set_real
+#undef snd_config_set_string
+#undef snd_config_set_ascii
+#undef snd_config_set_pointer
+#undef snd_config_get_id
+#undef snd_config_get_integer
+#undef snd_config_get_integer64
+#undef snd_config_get_real
+#undef snd_config_get_ireal
+#undef snd_config_get_string
+#undef snd_config_get_ascii
+#undef snd_config_get_pointer
+#undef snd_config_test_id
+#undef snd_config_iterator_first
+#undef snd_config_iterator_next
+#undef snd_config_iterator_end
+#undef snd_config_iterator_entry
+#undef snd_config_get_bool_ascii
+#undef snd_config_get_bool
+#undef snd_config_get_ctl_iface_ascii
+#undef snd_config_get_ctl_iface
+#undef snd_names_list
+#undef snd_names_list_free
+#undef snd_pcm_open
+#undef snd_pcm_open_lconf
+#undef snd_pcm_open_fallback
+#undef snd_pcm_close
+#undef snd_pcm_name
+#undef snd_pcm_type
+#undef snd_pcm_stream
+#undef snd_pcm_poll_descriptors_count
+#undef snd_pcm_poll_descriptors
+#undef snd_pcm_poll_descriptors_revents
+#undef snd_pcm_nonblock
+#undef snd_async_add_pcm_handler
+#undef snd_async_handler_get_pcm
+#undef snd_pcm_info
+#undef snd_pcm_hw_params_current
+#undef snd_pcm_hw_params
+#undef snd_pcm_hw_free
+#undef snd_pcm_sw_params_current
+#undef snd_pcm_sw_params
+#undef snd_pcm_prepare
+#undef snd_pcm_reset
+#undef snd_pcm_status
+#undef snd_pcm_start
+#undef snd_pcm_drop
+#undef snd_pcm_drain
+#undef snd_pcm_pause
+#undef snd_pcm_state
+#undef snd_pcm_hwsync
+#undef snd_pcm_delay
+#undef snd_pcm_resume
+#undef snd_pcm_htimestamp
+#undef snd_pcm_avail
+#undef snd_pcm_avail_update
+#undef snd_pcm_avail_delay
+#undef snd_pcm_rewindable
+#undef snd_pcm_rewind
+#undef snd_pcm_forwardable
+#undef snd_pcm_forward
+#undef snd_pcm_writei
+#undef snd_pcm_readi
+#undef snd_pcm_writen
+#undef snd_pcm_readn
+#undef snd_pcm_wait
+#undef snd_pcm_link
+#undef snd_pcm_unlink
+#undef snd_pcm_query_chmaps
+#undef snd_pcm_query_chmaps_from_hw
+#undef snd_pcm_free_chmaps
+#undef snd_pcm_get_chmap
+#undef snd_pcm_set_chmap
+#undef snd_pcm_chmap_type_name
+#undef snd_pcm_chmap_name
+#undef snd_pcm_chmap_long_name
+#undef snd_pcm_chmap_print
+#undef snd_pcm_chmap_from_string
+#undef snd_pcm_chmap_parse_string
+#undef snd_pcm_recover
+#undef snd_pcm_set_params
+#undef snd_pcm_get_params
+#undef snd_pcm_info_sizeof
+#undef snd_pcm_info_malloc
+#undef snd_pcm_info_free
+#undef snd_pcm_info_copy
+#undef snd_pcm_info_get_device
+#undef snd_pcm_info_get_subdevice
+#undef snd_pcm_info_get_stream
+#undef snd_pcm_info_get_card
+#undef snd_pcm_info_get_id
+#undef snd_pcm_info_get_name
+#undef snd_pcm_info_get_subdevice_name
+#undef snd_pcm_info_get_class
+#undef snd_pcm_info_get_subclass
+#undef snd_pcm_info_get_subdevices_count
+#undef snd_pcm_info_get_subdevices_avail
+#undef snd_pcm_info_get_sync
+#undef snd_pcm_info_set_device
+#undef snd_pcm_info_set_subdevice
+#undef snd_pcm_info_set_stream
+#undef snd_pcm_hw_params_any
+#undef snd_pcm_hw_params_can_mmap_sample_resolution
+#undef snd_pcm_hw_params_is_double
+#undef snd_pcm_hw_params_is_batch
+#undef snd_pcm_hw_params_is_block_transfer
+#undef snd_pcm_hw_params_is_monotonic
+#undef snd_pcm_hw_params_can_overrange
+#undef snd_pcm_hw_params_can_pause
+#undef snd_pcm_hw_params_can_resume
+#undef snd_pcm_hw_params_is_half_duplex
+#undef snd_pcm_hw_params_is_joint_duplex
+#undef snd_pcm_hw_params_can_sync_start
+#undef snd_pcm_hw_params_can_disable_period_wakeup
+#undef snd_pcm_hw_params_supports_audio_wallclock_ts
+#undef snd_pcm_hw_params_supports_audio_ts_type
+#undef snd_pcm_hw_params_get_rate_numden
+#undef snd_pcm_hw_params_get_sbits
+#undef snd_pcm_hw_params_get_fifo_size
+#undef snd_pcm_hw_params_sizeof
+#undef snd_pcm_hw_params_malloc
+#undef snd_pcm_hw_params_free
+#undef snd_pcm_hw_params_copy
+#undef snd_pcm_hw_params_get_access
+#undef snd_pcm_hw_params_test_access
+#undef snd_pcm_hw_params_set_access
+#undef snd_pcm_hw_params_set_access_first
+#undef snd_pcm_hw_params_set_access_last
+#undef snd_pcm_hw_params_set_access_mask
+#undef snd_pcm_hw_params_get_access_mask
+#undef snd_pcm_hw_params_get_format
+#undef snd_pcm_hw_params_test_format
+#undef snd_pcm_hw_params_set_format
+#undef snd_pcm_hw_params_set_format_first
+#undef snd_pcm_hw_params_set_format_last
+#undef snd_pcm_hw_params_set_format_mask
+#undef snd_pcm_hw_params_get_format_mask
+#undef snd_pcm_hw_params_get_subformat
+#undef snd_pcm_hw_params_test_subformat
+#undef snd_pcm_hw_params_set_subformat
+#undef snd_pcm_hw_params_set_subformat_first
+#undef snd_pcm_hw_params_set_subformat_last
+#undef snd_pcm_hw_params_set_subformat_mask
+#undef snd_pcm_hw_params_get_subformat_mask
+#undef snd_pcm_hw_params_get_channels
+#undef snd_pcm_hw_params_get_channels_min
+#undef snd_pcm_hw_params_get_channels_max
+#undef snd_pcm_hw_params_test_channels
+#undef snd_pcm_hw_params_set_channels
+#undef snd_pcm_hw_params_set_channels_min
+#undef snd_pcm_hw_params_set_channels_max
+#undef snd_pcm_hw_params_set_channels_minmax
+#undef snd_pcm_hw_params_set_channels_near
+#undef snd_pcm_hw_params_set_channels_first
+#undef snd_pcm_hw_params_set_channels_last
+#undef snd_pcm_hw_params_get_rate
+#undef snd_pcm_hw_params_get_rate_min
+#undef snd_pcm_hw_params_get_rate_max
+#undef snd_pcm_hw_params_test_rate
+#undef snd_pcm_hw_params_set_rate
+#undef snd_pcm_hw_params_set_rate_min
+#undef snd_pcm_hw_params_set_rate_max
+#undef snd_pcm_hw_params_set_rate_minmax
+#undef snd_pcm_hw_params_set_rate_near
+#undef snd_pcm_hw_params_set_rate_first
+#undef snd_pcm_hw_params_set_rate_last
+#undef snd_pcm_hw_params_set_rate_resample
+#undef snd_pcm_hw_params_get_rate_resample
+#undef snd_pcm_hw_params_set_export_buffer
+#undef snd_pcm_hw_params_get_export_buffer
+#undef snd_pcm_hw_params_set_period_wakeup
+#undef snd_pcm_hw_params_get_period_wakeup
+#undef snd_pcm_hw_params_get_period_time
+#undef snd_pcm_hw_params_get_period_time_min
+#undef snd_pcm_hw_params_get_period_time_max
+#undef snd_pcm_hw_params_test_period_time
+#undef snd_pcm_hw_params_set_period_time
+#undef snd_pcm_hw_params_set_period_time_min
+#undef snd_pcm_hw_params_set_period_time_max
+#undef snd_pcm_hw_params_set_period_time_minmax
+#undef snd_pcm_hw_params_set_period_time_near
+#undef snd_pcm_hw_params_set_period_time_first
+#undef snd_pcm_hw_params_set_period_time_last
+#undef snd_pcm_hw_params_get_period_size
+#undef snd_pcm_hw_params_get_period_size_min
+#undef snd_pcm_hw_params_get_period_size_max
+#undef snd_pcm_hw_params_test_period_size
+#undef snd_pcm_hw_params_set_period_size
+#undef snd_pcm_hw_params_set_period_size_min
+#undef snd_pcm_hw_params_set_period_size_max
+#undef snd_pcm_hw_params_set_period_size_minmax
+#undef snd_pcm_hw_params_set_period_size_near
+#undef snd_pcm_hw_params_set_period_size_first
+#undef snd_pcm_hw_params_set_period_size_last
+#undef snd_pcm_hw_params_set_period_size_integer
+#undef snd_pcm_hw_params_get_periods
+#undef snd_pcm_hw_params_get_periods_min
+#undef snd_pcm_hw_params_get_periods_max
+#undef snd_pcm_hw_params_test_periods
+#undef snd_pcm_hw_params_set_periods
+#undef snd_pcm_hw_params_set_periods_min
+#undef snd_pcm_hw_params_set_periods_max
+#undef snd_pcm_hw_params_set_periods_minmax
+#undef snd_pcm_hw_params_set_periods_near
+#undef snd_pcm_hw_params_set_periods_first
+#undef snd_pcm_hw_params_set_periods_last
+#undef snd_pcm_hw_params_set_periods_integer
+#undef snd_pcm_hw_params_get_buffer_time
+#undef snd_pcm_hw_params_get_buffer_time_min
+#undef snd_pcm_hw_params_get_buffer_time_max
+#undef snd_pcm_hw_params_test_buffer_time
+#undef snd_pcm_hw_params_set_buffer_time
+#undef snd_pcm_hw_params_set_buffer_time_min
+#undef snd_pcm_hw_params_set_buffer_time_max
+#undef snd_pcm_hw_params_set_buffer_time_minmax
+#undef snd_pcm_hw_params_set_buffer_time_near
+#undef snd_pcm_hw_params_set_buffer_time_first
+#undef snd_pcm_hw_params_set_buffer_time_last
+#undef snd_pcm_hw_params_get_buffer_size
+#undef snd_pcm_hw_params_get_buffer_size_min
+#undef snd_pcm_hw_params_get_buffer_size_max
+#undef snd_pcm_hw_params_test_buffer_size
+#undef snd_pcm_hw_params_set_buffer_size
+#undef snd_pcm_hw_params_set_buffer_size_min
+#undef snd_pcm_hw_params_set_buffer_size_max
+#undef snd_pcm_hw_params_set_buffer_size_minmax
+#undef snd_pcm_hw_params_set_buffer_size_near
+#undef snd_pcm_hw_params_set_buffer_size_first
+#undef snd_pcm_hw_params_set_buffer_size_last
+#undef snd_pcm_hw_params_get_min_align
+#undef snd_pcm_sw_params_sizeof
+#undef snd_pcm_sw_params_malloc
+#undef snd_pcm_sw_params_free
+#undef snd_pcm_sw_params_copy
+#undef snd_pcm_sw_params_get_boundary
+#undef snd_pcm_sw_params_set_tstamp_mode
+#undef snd_pcm_sw_params_get_tstamp_mode
+#undef snd_pcm_sw_params_set_tstamp_type
+#undef snd_pcm_sw_params_get_tstamp_type
+#undef snd_pcm_sw_params_set_avail_min
+#undef snd_pcm_sw_params_get_avail_min
+#undef snd_pcm_sw_params_set_period_event
+#undef snd_pcm_sw_params_get_period_event
+#undef snd_pcm_sw_params_set_start_threshold
+#undef snd_pcm_sw_params_get_start_threshold
+#undef snd_pcm_sw_params_set_stop_threshold
+#undef snd_pcm_sw_params_get_stop_threshold
+#undef snd_pcm_sw_params_set_silence_threshold
+#undef snd_pcm_sw_params_get_silence_threshold
+#undef snd_pcm_sw_params_set_silence_size
+#undef snd_pcm_sw_params_get_silence_size
+#undef snd_pcm_access_mask_sizeof
+#undef snd_pcm_access_mask_malloc
+#undef snd_pcm_access_mask_free
+#undef snd_pcm_access_mask_copy
+#undef snd_pcm_access_mask_none
+#undef snd_pcm_access_mask_any
+#undef snd_pcm_access_mask_test
+#undef snd_pcm_access_mask_empty
+#undef snd_pcm_access_mask_set
+#undef snd_pcm_access_mask_reset
+#undef snd_pcm_format_mask_sizeof
+#undef snd_pcm_format_mask_malloc
+#undef snd_pcm_format_mask_free
+#undef snd_pcm_format_mask_copy
+#undef snd_pcm_format_mask_none
+#undef snd_pcm_format_mask_any
+#undef snd_pcm_format_mask_test
+#undef snd_pcm_format_mask_empty
+#undef snd_pcm_format_mask_set
+#undef snd_pcm_format_mask_reset
+#undef snd_pcm_subformat_mask_sizeof
+#undef snd_pcm_subformat_mask_malloc
+#undef snd_pcm_subformat_mask_free
+#undef snd_pcm_subformat_mask_copy
+#undef snd_pcm_subformat_mask_none
+#undef snd_pcm_subformat_mask_any
+#undef snd_pcm_subformat_mask_test
+#undef snd_pcm_subformat_mask_empty
+#undef snd_pcm_subformat_mask_set
+#undef snd_pcm_subformat_mask_reset
+#undef snd_pcm_status_sizeof
+#undef snd_pcm_status_malloc
+#undef snd_pcm_status_free
+#undef snd_pcm_status_copy
+#undef snd_pcm_status_get_state
+#undef snd_pcm_status_get_trigger_tstamp
+#undef snd_pcm_status_get_trigger_htstamp
+#undef snd_pcm_status_get_tstamp
+#undef snd_pcm_status_get_htstamp
+#undef snd_pcm_status_get_audio_htstamp
+#undef snd_pcm_status_get_driver_htstamp
+#undef snd_pcm_status_get_audio_htstamp_report
+#undef snd_pcm_status_set_audio_htstamp_config
+#undef snd_pcm_status_get_delay
+#undef snd_pcm_status_get_avail
+#undef snd_pcm_status_get_avail_max
+#undef snd_pcm_status_get_overrange
+#undef snd_pcm_type_name
+#undef snd_pcm_stream_name
+#undef snd_pcm_access_name
+#undef snd_pcm_format_name
+#undef snd_pcm_format_description
+#undef snd_pcm_subformat_name
+#undef snd_pcm_subformat_description
+#undef snd_pcm_format_value
+#undef snd_pcm_tstamp_mode_name
+#undef snd_pcm_state_name
+#undef snd_pcm_dump
+#undef snd_pcm_dump_hw_setup
+#undef snd_pcm_dump_sw_setup
+#undef snd_pcm_dump_setup
+#undef snd_pcm_hw_params_dump
+#undef snd_pcm_sw_params_dump
+#undef snd_pcm_status_dump
+#undef snd_pcm_mmap_begin
+#undef snd_pcm_mmap_commit
+#undef snd_pcm_mmap_writei
+#undef snd_pcm_mmap_readi
+#undef snd_pcm_mmap_writen
+#undef snd_pcm_mmap_readn
+#undef snd_pcm_format_signed
+#undef snd_pcm_format_unsigned
+#undef snd_pcm_format_linear
+#undef snd_pcm_format_float
+#undef snd_pcm_format_little_endian
+#undef snd_pcm_format_big_endian
+#undef snd_pcm_format_cpu_endian
+#undef snd_pcm_format_width
+#undef snd_pcm_format_physical_width
+#undef snd_pcm_build_linear_format
+#undef snd_pcm_format_size
+#undef snd_pcm_format_silence
+#undef snd_pcm_format_silence_16
+#undef snd_pcm_format_silence_32
+#undef snd_pcm_format_silence_64
+#undef snd_pcm_format_set_silence
+#undef snd_pcm_bytes_to_frames
+#undef snd_pcm_frames_to_bytes
+#undef snd_pcm_bytes_to_samples
+#undef snd_pcm_samples_to_bytes
+#undef snd_pcm_area_silence
+#undef snd_pcm_areas_silence
+#undef snd_pcm_area_copy
+#undef snd_pcm_areas_copy
+#undef snd_pcm_areas_copy_wrap
+#undef snd_pcm_hook_get_pcm
+#undef snd_pcm_hook_get_private
+#undef snd_pcm_hook_set_private
+#undef snd_pcm_hook_add
+#undef snd_pcm_hook_remove
+#undef snd_pcm_meter_get_bufsize
+#undef snd_pcm_meter_get_channels
+#undef snd_pcm_meter_get_rate
+#undef snd_pcm_meter_get_now
+#undef snd_pcm_meter_get_boundary
+#undef snd_pcm_meter_add_scope
+#undef snd_pcm_meter_search_scope
+#undef snd_pcm_scope_malloc
+#undef snd_pcm_scope_set_ops
+#undef snd_pcm_scope_set_name
+#undef snd_pcm_scope_get_name
+#undef snd_pcm_scope_get_callback_private
+#undef snd_pcm_scope_set_callback_private
+#undef snd_pcm_scope_s16_open
+#undef snd_pcm_scope_s16_get_channel_buffer
+#undef snd_spcm_init
+#undef snd_spcm_init_duplex
+#undef snd_spcm_init_get_params
+#undef snd_pcm_start_mode_name
+#undef snd_pcm_xrun_mode_name
+#undef snd_pcm_sw_params_set_start_mode
+#undef snd_pcm_sw_params_get_start_mode
+#undef snd_pcm_sw_params_set_xrun_mode
+#undef snd_pcm_sw_params_get_xrun_mode
+#undef snd_pcm_sw_params_set_xfer_align
+#undef snd_pcm_sw_params_get_xfer_align
+#undef snd_pcm_sw_params_set_sleep_min
+#undef snd_pcm_sw_params_get_sleep_min
+#undef snd_pcm_hw_params_get_tick_time
+#undef snd_pcm_hw_params_get_tick_time_min
+#undef snd_pcm_hw_params_get_tick_time_max
+#undef snd_pcm_hw_params_test_tick_time
+#undef snd_pcm_hw_params_set_tick_time
+#undef snd_pcm_hw_params_set_tick_time_min
+#undef snd_pcm_hw_params_set_tick_time_max
+#undef snd_pcm_hw_params_set_tick_time_minmax
+#undef snd_pcm_hw_params_set_tick_time_near
+#undef snd_pcm_hw_params_set_tick_time_first
+#undef snd_pcm_hw_params_set_tick_time_last
+#undef snd_rawmidi_open
+#undef snd_rawmidi_open_lconf
+#undef snd_rawmidi_close
+#undef snd_rawmidi_poll_descriptors_count
+#undef snd_rawmidi_poll_descriptors
+#undef snd_rawmidi_poll_descriptors_revents
+#undef snd_rawmidi_nonblock
+#undef snd_rawmidi_info_sizeof
+#undef snd_rawmidi_info_malloc
+#undef snd_rawmidi_info_free
+#undef snd_rawmidi_info_copy
+#undef snd_rawmidi_info_get_device
+#undef snd_rawmidi_info_get_subdevice
+#undef snd_rawmidi_info_get_stream
+#undef snd_rawmidi_info_get_card
+#undef snd_rawmidi_info_get_flags
+#undef snd_rawmidi_info_get_id
+#undef snd_rawmidi_info_get_name
+#undef snd_rawmidi_info_get_subdevice_name
+#undef snd_rawmidi_info_get_subdevices_count
+#undef snd_rawmidi_info_get_subdevices_avail
+#undef snd_rawmidi_info_set_device
+#undef snd_rawmidi_info_set_subdevice
+#undef snd_rawmidi_info_set_stream
+#undef snd_rawmidi_info
+#undef snd_rawmidi_params_sizeof
+#undef snd_rawmidi_params_malloc
+#undef snd_rawmidi_params_free
+#undef snd_rawmidi_params_copy
+#undef snd_rawmidi_params_set_buffer_size
+#undef snd_rawmidi_params_get_buffer_size
+#undef snd_rawmidi_params_set_avail_min
+#undef snd_rawmidi_params_get_avail_min
+#undef snd_rawmidi_params_set_no_active_sensing
+#undef snd_rawmidi_params_get_no_active_sensing
+#undef snd_rawmidi_params
+#undef snd_rawmidi_params_current
+#undef snd_rawmidi_status_sizeof
+#undef snd_rawmidi_status_malloc
+#undef snd_rawmidi_status_free
+#undef snd_rawmidi_status_copy
+#undef snd_rawmidi_status_get_tstamp
+#undef snd_rawmidi_status_get_avail
+#undef snd_rawmidi_status_get_xruns
+#undef snd_rawmidi_status
+#undef snd_rawmidi_drain
+#undef snd_rawmidi_drop
+#undef snd_rawmidi_write
+#undef snd_rawmidi_read
+#undef snd_rawmidi_name
+#undef snd_rawmidi_type
+#undef snd_rawmidi_stream
+#undef snd_timer_query_open
+#undef snd_timer_query_open_lconf
+#undef snd_timer_query_close
+#undef snd_timer_query_next_device
+#undef snd_timer_query_info
+#undef snd_timer_query_params
+#undef snd_timer_query_status
+#undef snd_timer_open
+#undef snd_timer_open_lconf
+#undef snd_timer_close
+#undef snd_async_add_timer_handler
+#undef snd_async_handler_get_timer
+#undef snd_timer_poll_descriptors_count
+#undef snd_timer_poll_descriptors
+#undef snd_timer_poll_descriptors_revents
+#undef snd_timer_info
+#undef snd_timer_params
+#undef snd_timer_status
+#undef snd_timer_start
+#undef snd_timer_stop
+#undef snd_timer_continue
+#undef snd_timer_read
+#undef snd_timer_id_sizeof
+#undef snd_timer_id_malloc
+#undef snd_timer_id_free
+#undef snd_timer_id_copy
+#undef snd_timer_id_set_class
+#undef snd_timer_id_get_class
+#undef snd_timer_id_set_sclass
+#undef snd_timer_id_get_sclass
+#undef snd_timer_id_set_card
+#undef snd_timer_id_get_card
+#undef snd_timer_id_set_device
+#undef snd_timer_id_get_device
+#undef snd_timer_id_set_subdevice
+#undef snd_timer_id_get_subdevice
+#undef snd_timer_ginfo_sizeof
+#undef snd_timer_ginfo_malloc
+#undef snd_timer_ginfo_free
+#undef snd_timer_ginfo_copy
+#undef snd_timer_ginfo_set_tid
+#undef snd_timer_ginfo_get_tid
+#undef snd_timer_ginfo_get_flags
+#undef snd_timer_ginfo_get_card
+#undef snd_timer_ginfo_get_id
+#undef snd_timer_ginfo_get_name
+#undef snd_timer_ginfo_get_resolution
+#undef snd_timer_ginfo_get_resolution_min
+#undef snd_timer_ginfo_get_resolution_max
+#undef snd_timer_ginfo_get_clients
+#undef snd_timer_info_sizeof
+#undef snd_timer_info_malloc
+#undef snd_timer_info_free
+#undef snd_timer_info_copy
+#undef snd_timer_info_is_slave
+#undef snd_timer_info_get_card
+#undef snd_timer_info_get_id
+#undef snd_timer_info_get_name
+#undef snd_timer_info_get_resolution
+#undef snd_timer_params_sizeof
+#undef snd_timer_params_malloc
+#undef snd_timer_params_free
+#undef snd_timer_params_copy
+#undef snd_timer_params_set_auto_start
+#undef snd_timer_params_get_auto_start
+#undef snd_timer_params_set_exclusive
+#undef snd_timer_params_get_exclusive
+#undef snd_timer_params_set_early_event
+#undef snd_timer_params_get_early_event
+#undef snd_timer_params_set_ticks
+#undef snd_timer_params_get_ticks
+#undef snd_timer_params_set_queue_size
+#undef snd_timer_params_get_queue_size
+#undef snd_timer_params_set_filter
+#undef snd_timer_params_get_filter
+#undef snd_timer_status_sizeof
+#undef snd_timer_status_malloc
+#undef snd_timer_status_free
+#undef snd_timer_status_copy
+#undef snd_timer_status_get_timestamp
+#undef snd_timer_status_get_resolution
+#undef snd_timer_status_get_lost
+#undef snd_timer_status_get_overrun
+#undef snd_timer_status_get_queue
+#undef snd_timer_info_get_ticks
+#undef snd_hwdep_open
+#undef snd_hwdep_close
+#undef snd_hwdep_poll_descriptors
+#undef snd_hwdep_poll_descriptors_count
+#undef snd_hwdep_poll_descriptors_revents
+#undef snd_hwdep_nonblock
+#undef snd_hwdep_info
+#undef snd_hwdep_dsp_status
+#undef snd_hwdep_dsp_load
+#undef snd_hwdep_ioctl
+#undef snd_hwdep_write
+#undef snd_hwdep_read
+#undef snd_hwdep_info_sizeof
+#undef snd_hwdep_info_malloc
+#undef snd_hwdep_info_free
+#undef snd_hwdep_info_copy
+#undef snd_hwdep_info_get_device
+#undef snd_hwdep_info_get_card
+#undef snd_hwdep_info_get_id
+#undef snd_hwdep_info_get_name
+#undef snd_hwdep_info_get_iface
+#undef snd_hwdep_info_set_device
+#undef snd_hwdep_dsp_status_sizeof
+#undef snd_hwdep_dsp_status_malloc
+#undef snd_hwdep_dsp_status_free
+#undef snd_hwdep_dsp_status_copy
+#undef snd_hwdep_dsp_status_get_version
+#undef snd_hwdep_dsp_status_get_id
+#undef snd_hwdep_dsp_status_get_num_dsps
+#undef snd_hwdep_dsp_status_get_dsp_loaded
+#undef snd_hwdep_dsp_status_get_chip_ready
+#undef snd_hwdep_dsp_image_sizeof
+#undef snd_hwdep_dsp_image_malloc
+#undef snd_hwdep_dsp_image_free
+#undef snd_hwdep_dsp_image_copy
+#undef snd_hwdep_dsp_image_get_index
+#undef snd_hwdep_dsp_image_get_name
+#undef snd_hwdep_dsp_image_get_image
+#undef snd_hwdep_dsp_image_get_length
+#undef snd_hwdep_dsp_image_set_index
+#undef snd_hwdep_dsp_image_set_name
+#undef snd_hwdep_dsp_image_set_image
+#undef snd_hwdep_dsp_image_set_length
+#undef snd_card_load
+#undef snd_card_next
+#undef snd_card_get_index
+#undef snd_card_get_name
+#undef snd_card_get_longname
+#undef snd_device_name_hint
+#undef snd_device_name_free_hint
+#undef snd_device_name_get_hint
+#undef snd_ctl_open
+#undef snd_ctl_open_lconf
+#undef snd_ctl_open_fallback
+#undef snd_ctl_close
+#undef snd_ctl_nonblock
+#undef snd_async_add_ctl_handler
+#undef snd_async_handler_get_ctl
+#undef snd_ctl_poll_descriptors_count
+#undef snd_ctl_poll_descriptors
+#undef snd_ctl_poll_descriptors_revents
+#undef snd_ctl_subscribe_events
+#undef snd_ctl_card_info
+#undef snd_ctl_elem_list
+#undef snd_ctl_elem_info
+#undef snd_ctl_elem_read
+#undef snd_ctl_elem_write
+#undef snd_ctl_elem_lock
+#undef snd_ctl_elem_unlock
+#undef snd_ctl_elem_tlv_read
+#undef snd_ctl_elem_tlv_write
+#undef snd_ctl_elem_tlv_command
+#undef snd_ctl_hwdep_next_device
+#undef snd_ctl_hwdep_info
+#undef snd_ctl_pcm_next_device
+#undef snd_ctl_pcm_info
+#undef snd_ctl_pcm_prefer_subdevice
+#undef snd_ctl_rawmidi_next_device
+#undef snd_ctl_rawmidi_info
+#undef snd_ctl_rawmidi_prefer_subdevice
+#undef snd_ctl_set_power_state
+#undef snd_ctl_get_power_state
+#undef snd_ctl_read
+#undef snd_ctl_wait
+#undef snd_ctl_name
+#undef snd_ctl_type
+#undef snd_ctl_elem_type_name
+#undef snd_ctl_elem_iface_name
+#undef snd_ctl_event_type_name
+#undef snd_ctl_event_elem_get_mask
+#undef snd_ctl_event_elem_get_numid
+#undef snd_ctl_event_elem_get_id
+#undef snd_ctl_event_elem_get_interface
+#undef snd_ctl_event_elem_get_device
+#undef snd_ctl_event_elem_get_subdevice
+#undef snd_ctl_event_elem_get_name
+#undef snd_ctl_event_elem_get_index
+#undef snd_ctl_elem_list_alloc_space
+#undef snd_ctl_elem_list_free_space
+#undef snd_ctl_ascii_elem_id_get
+#undef snd_ctl_ascii_elem_id_parse
+#undef snd_ctl_ascii_value_parse
+#undef snd_ctl_elem_id_sizeof
+#undef snd_ctl_elem_id_malloc
+#undef snd_ctl_elem_id_free
+#undef snd_ctl_elem_id_clear
+#undef snd_ctl_elem_id_copy
+#undef snd_ctl_elem_id_get_numid
+#undef snd_ctl_elem_id_get_interface
+#undef snd_ctl_elem_id_get_device
+#undef snd_ctl_elem_id_get_subdevice
+#undef snd_ctl_elem_id_get_name
+#undef snd_ctl_elem_id_get_index
+#undef snd_ctl_elem_id_set_numid
+#undef snd_ctl_elem_id_set_interface
+#undef snd_ctl_elem_id_set_device
+#undef snd_ctl_elem_id_set_subdevice
+#undef snd_ctl_elem_id_set_name
+#undef snd_ctl_elem_id_set_index
+#undef snd_ctl_card_info_sizeof
+#undef snd_ctl_card_info_malloc
+#undef snd_ctl_card_info_free
+#undef snd_ctl_card_info_clear
+#undef snd_ctl_card_info_copy
+#undef snd_ctl_card_info_get_card
+#undef snd_ctl_card_info_get_id
+#undef snd_ctl_card_info_get_driver
+#undef snd_ctl_card_info_get_name
+#undef snd_ctl_card_info_get_longname
+#undef snd_ctl_card_info_get_mixername
+#undef snd_ctl_card_info_get_components
+#undef snd_ctl_event_sizeof
+#undef snd_ctl_event_malloc
+#undef snd_ctl_event_free
+#undef snd_ctl_event_clear
+#undef snd_ctl_event_copy
+#undef snd_ctl_event_get_type
+#undef snd_ctl_elem_list_sizeof
+#undef snd_ctl_elem_list_malloc
+#undef snd_ctl_elem_list_free
+#undef snd_ctl_elem_list_clear
+#undef snd_ctl_elem_list_copy
+#undef snd_ctl_elem_list_set_offset
+#undef snd_ctl_elem_list_get_used
+#undef snd_ctl_elem_list_get_count
+#undef snd_ctl_elem_list_get_id
+#undef snd_ctl_elem_list_get_numid
+#undef snd_ctl_elem_list_get_interface
+#undef snd_ctl_elem_list_get_device
+#undef snd_ctl_elem_list_get_subdevice
+#undef snd_ctl_elem_list_get_name
+#undef snd_ctl_elem_list_get_index
+#undef snd_ctl_elem_info_sizeof
+#undef snd_ctl_elem_info_malloc
+#undef snd_ctl_elem_info_free
+#undef snd_ctl_elem_info_clear
+#undef snd_ctl_elem_info_copy
+#undef snd_ctl_elem_info_get_type
+#undef snd_ctl_elem_info_is_readable
+#undef snd_ctl_elem_info_is_writable
+#undef snd_ctl_elem_info_is_volatile
+#undef snd_ctl_elem_info_is_inactive
+#undef snd_ctl_elem_info_is_locked
+#undef snd_ctl_elem_info_is_tlv_readable
+#undef snd_ctl_elem_info_is_tlv_writable
+#undef snd_ctl_elem_info_is_tlv_commandable
+#undef snd_ctl_elem_info_is_owner
+#undef snd_ctl_elem_info_is_user
+#undef snd_ctl_elem_info_get_owner
+#undef snd_ctl_elem_info_get_count
+#undef snd_ctl_elem_info_get_min
+#undef snd_ctl_elem_info_get_max
+#undef snd_ctl_elem_info_get_step
+#undef snd_ctl_elem_info_get_min64
+#undef snd_ctl_elem_info_get_max64
+#undef snd_ctl_elem_info_get_step64
+#undef snd_ctl_elem_info_get_items
+#undef snd_ctl_elem_info_set_item
+#undef snd_ctl_elem_info_get_item_name
+#undef snd_ctl_elem_info_get_dimensions
+#undef snd_ctl_elem_info_get_dimension
+#undef snd_ctl_elem_info_set_dimension
+#undef snd_ctl_elem_info_get_id
+#undef snd_ctl_elem_info_get_numid
+#undef snd_ctl_elem_info_get_interface
+#undef snd_ctl_elem_info_get_device
+#undef snd_ctl_elem_info_get_subdevice
+#undef snd_ctl_elem_info_get_name
+#undef snd_ctl_elem_info_get_index
+#undef snd_ctl_elem_info_set_id
+#undef snd_ctl_elem_info_set_numid
+#undef snd_ctl_elem_info_set_interface
+#undef snd_ctl_elem_info_set_device
+#undef snd_ctl_elem_info_set_subdevice
+#undef snd_ctl_elem_info_set_name
+#undef snd_ctl_elem_info_set_index
+#undef snd_ctl_add_integer_elem_set
+#undef snd_ctl_add_integer64_elem_set
+#undef snd_ctl_add_boolean_elem_set
+#undef snd_ctl_add_enumerated_elem_set
+#undef snd_ctl_add_bytes_elem_set
+#undef snd_ctl_elem_add_integer
+#undef snd_ctl_elem_add_integer64
+#undef snd_ctl_elem_add_boolean
+#undef snd_ctl_elem_add_enumerated
+#undef snd_ctl_elem_add_iec958
+#undef snd_ctl_elem_remove
+#undef snd_ctl_elem_value_sizeof
+#undef snd_ctl_elem_value_malloc
+#undef snd_ctl_elem_value_free
+#undef snd_ctl_elem_value_clear
+#undef snd_ctl_elem_value_copy
+#undef snd_ctl_elem_value_compare
+#undef snd_ctl_elem_value_get_id
+#undef snd_ctl_elem_value_get_numid
+#undef snd_ctl_elem_value_get_interface
+#undef snd_ctl_elem_value_get_device
+#undef snd_ctl_elem_value_get_subdevice
+#undef snd_ctl_elem_value_get_name
+#undef snd_ctl_elem_value_get_index
+#undef snd_ctl_elem_value_set_id
+#undef snd_ctl_elem_value_set_numid
+#undef snd_ctl_elem_value_set_interface
+#undef snd_ctl_elem_value_set_device
+#undef snd_ctl_elem_value_set_subdevice
+#undef snd_ctl_elem_value_set_name
+#undef snd_ctl_elem_value_set_index
+#undef snd_ctl_elem_value_get_boolean
+#undef snd_ctl_elem_value_get_integer
+#undef snd_ctl_elem_value_get_integer64
+#undef snd_ctl_elem_value_get_enumerated
+#undef snd_ctl_elem_value_get_byte
+#undef snd_ctl_elem_value_set_boolean
+#undef snd_ctl_elem_value_set_integer
+#undef snd_ctl_elem_value_set_integer64
+#undef snd_ctl_elem_value_set_enumerated
+#undef snd_ctl_elem_value_set_byte
+#undef snd_ctl_elem_set_bytes
+#undef snd_ctl_elem_value_get_bytes
+#undef snd_ctl_elem_value_get_iec958
+#undef snd_ctl_elem_value_set_iec958
+#undef snd_tlv_parse_dB_info
+#undef snd_tlv_get_dB_range
+#undef snd_tlv_convert_to_dB
+#undef snd_tlv_convert_from_dB
+#undef snd_ctl_get_dB_range
+#undef snd_ctl_convert_to_dB
+#undef snd_ctl_convert_from_dB
+#undef snd_hctl_compare_fast
+#undef snd_hctl_open
+#undef snd_hctl_open_ctl
+#undef snd_hctl_close
+#undef snd_hctl_nonblock
+#undef snd_hctl_poll_descriptors_count
+#undef snd_hctl_poll_descriptors
+#undef snd_hctl_poll_descriptors_revents
+#undef snd_hctl_get_count
+#undef snd_hctl_set_compare
+#undef snd_hctl_first_elem
+#undef snd_hctl_last_elem
+#undef snd_hctl_find_elem
+#undef snd_hctl_set_callback
+#undef snd_hctl_set_callback_private
+#undef snd_hctl_get_callback_private
+#undef snd_hctl_load
+#undef snd_hctl_free
+#undef snd_hctl_handle_events
+#undef snd_hctl_name
+#undef snd_hctl_wait
+#undef snd_hctl_ctl
+#undef snd_hctl_elem_next
+#undef snd_hctl_elem_prev
+#undef snd_hctl_elem_info
+#undef snd_hctl_elem_read
+#undef snd_hctl_elem_write
+#undef snd_hctl_elem_tlv_read
+#undef snd_hctl_elem_tlv_write
+#undef snd_hctl_elem_tlv_command
+#undef snd_hctl_elem_get_hctl
+#undef snd_hctl_elem_get_id
+#undef snd_hctl_elem_get_numid
+#undef snd_hctl_elem_get_interface
+#undef snd_hctl_elem_get_device
+#undef snd_hctl_elem_get_subdevice
+#undef snd_hctl_elem_get_name
+#undef snd_hctl_elem_get_index
+#undef snd_hctl_elem_set_callback
+#undef snd_hctl_elem_get_callback_private
+#undef snd_hctl_elem_set_callback_private
+#undef snd_sctl_build
+#undef snd_sctl_free
+#undef snd_sctl_install
+#undef snd_sctl_remove
+#undef snd_mixer_open
+#undef snd_mixer_close
+#undef snd_mixer_first_elem
+#undef snd_mixer_last_elem
+#undef snd_mixer_handle_events
+#undef snd_mixer_attach
+#undef snd_mixer_attach_hctl
+#undef snd_mixer_detach
+#undef snd_mixer_detach_hctl
+#undef snd_mixer_get_hctl
+#undef snd_mixer_poll_descriptors_count
+#undef snd_mixer_poll_descriptors
+#undef snd_mixer_poll_descriptors_revents
+#undef snd_mixer_load
+#undef snd_mixer_free
+#undef snd_mixer_wait
+#undef snd_mixer_set_compare
+#undef snd_mixer_set_callback
+#undef snd_mixer_get_callback_private
+#undef snd_mixer_set_callback_private
+#undef snd_mixer_get_count
+#undef snd_mixer_class_unregister
+#undef snd_mixer_elem_next
+#undef snd_mixer_elem_prev
+#undef snd_mixer_elem_set_callback
+#undef snd_mixer_elem_get_callback_private
+#undef snd_mixer_elem_set_callback_private
+#undef snd_mixer_elem_get_type
+#undef snd_mixer_class_register
+#undef snd_mixer_elem_new
+#undef snd_mixer_elem_add
+#undef snd_mixer_elem_remove
+#undef snd_mixer_elem_free
+#undef snd_mixer_elem_info
+#undef snd_mixer_elem_value
+#undef snd_mixer_elem_attach
+#undef snd_mixer_elem_detach
+#undef snd_mixer_elem_empty
+#undef snd_mixer_elem_get_private
+#undef snd_mixer_class_sizeof
+#undef snd_mixer_class_malloc
+#undef snd_mixer_class_free
+#undef snd_mixer_class_copy
+#undef snd_mixer_class_get_mixer
+#undef snd_mixer_class_get_event
+#undef snd_mixer_class_get_private
+#undef snd_mixer_class_get_compare
+#undef snd_mixer_class_set_event
+#undef snd_mixer_class_set_private
+#undef snd_mixer_class_set_private_free
+#undef snd_mixer_class_set_compare
+#undef snd_mixer_selem_channel_name
+#undef snd_mixer_selem_register
+#undef snd_mixer_selem_get_id
+#undef snd_mixer_selem_get_name
+#undef snd_mixer_selem_get_index
+#undef snd_mixer_find_selem
+#undef snd_mixer_selem_is_active
+#undef snd_mixer_selem_is_playback_mono
+#undef snd_mixer_selem_has_playback_channel
+#undef snd_mixer_selem_is_capture_mono
+#undef snd_mixer_selem_has_capture_channel
+#undef snd_mixer_selem_get_capture_group
+#undef snd_mixer_selem_has_common_volume
+#undef snd_mixer_selem_has_playback_volume
+#undef snd_mixer_selem_has_playback_volume_joined
+#undef snd_mixer_selem_has_capture_volume
+#undef snd_mixer_selem_has_capture_volume_joined
+#undef snd_mixer_selem_has_common_switch
+#undef snd_mixer_selem_has_playback_switch
+#undef snd_mixer_selem_has_playback_switch_joined
+#undef snd_mixer_selem_has_capture_switch
+#undef snd_mixer_selem_has_capture_switch_joined
+#undef snd_mixer_selem_has_capture_switch_exclusive
+#undef snd_mixer_selem_ask_playback_vol_dB
+#undef snd_mixer_selem_ask_capture_vol_dB
+#undef snd_mixer_selem_ask_playback_dB_vol
+#undef snd_mixer_selem_ask_capture_dB_vol
+#undef snd_mixer_selem_get_playback_volume
+#undef snd_mixer_selem_get_capture_volume
+#undef snd_mixer_selem_get_playback_dB
+#undef snd_mixer_selem_get_capture_dB
+#undef snd_mixer_selem_get_playback_switch
+#undef snd_mixer_selem_get_capture_switch
+#undef snd_mixer_selem_set_playback_volume
+#undef snd_mixer_selem_set_capture_volume
+#undef snd_mixer_selem_set_playback_dB
+#undef snd_mixer_selem_set_capture_dB
+#undef snd_mixer_selem_set_playback_volume_all
+#undef snd_mixer_selem_set_capture_volume_all
+#undef snd_mixer_selem_set_playback_dB_all
+#undef snd_mixer_selem_set_capture_dB_all
+#undef snd_mixer_selem_set_playback_switch
+#undef snd_mixer_selem_set_capture_switch
+#undef snd_mixer_selem_set_playback_switch_all
+#undef snd_mixer_selem_set_capture_switch_all
+#undef snd_mixer_selem_get_playback_volume_range
+#undef snd_mixer_selem_get_playback_dB_range
+#undef snd_mixer_selem_set_playback_volume_range
+#undef snd_mixer_selem_get_capture_volume_range
+#undef snd_mixer_selem_get_capture_dB_range
+#undef snd_mixer_selem_set_capture_volume_range
+#undef snd_mixer_selem_is_enumerated
+#undef snd_mixer_selem_is_enum_playback
+#undef snd_mixer_selem_is_enum_capture
+#undef snd_mixer_selem_get_enum_items
+#undef snd_mixer_selem_get_enum_item_name
+#undef snd_mixer_selem_get_enum_item
+#undef snd_mixer_selem_set_enum_item
+#undef snd_mixer_selem_id_sizeof
+#undef snd_mixer_selem_id_malloc
+#undef snd_mixer_selem_id_free
+#undef snd_mixer_selem_id_copy
+#undef snd_mixer_selem_id_get_name
+#undef snd_mixer_selem_id_get_index
+#undef snd_mixer_selem_id_set_name
+#undef snd_mixer_selem_id_set_index
+#undef snd_mixer_selem_id_parse
+#undef snd_seq_open
+#undef snd_seq_open_lconf
+#undef snd_seq_name
+#undef snd_seq_type
+#undef snd_seq_close
+#undef snd_seq_poll_descriptors_count
+#undef snd_seq_poll_descriptors
+#undef snd_seq_poll_descriptors_revents
+#undef snd_seq_nonblock
+#undef snd_seq_client_id
+#undef snd_seq_get_output_buffer_size
+#undef snd_seq_get_input_buffer_size
+#undef snd_seq_set_output_buffer_size
+#undef snd_seq_set_input_buffer_size
+#undef snd_seq_system_info_sizeof
+#undef snd_seq_system_info_malloc
+#undef snd_seq_system_info_free
+#undef snd_seq_system_info_copy
+#undef snd_seq_system_info_get_queues
+#undef snd_seq_system_info_get_clients
+#undef snd_seq_system_info_get_ports
+#undef snd_seq_system_info_get_channels
+#undef snd_seq_system_info_get_cur_clients
+#undef snd_seq_system_info_get_cur_queues
+#undef snd_seq_system_info
+#undef snd_seq_client_info_sizeof
+#undef snd_seq_client_info_malloc
+#undef snd_seq_client_info_free
+#undef snd_seq_client_info_copy
+#undef snd_seq_client_info_get_client
+#undef snd_seq_client_info_get_type
+#undef snd_seq_client_info_get_name
+#undef snd_seq_client_info_get_broadcast_filter
+#undef snd_seq_client_info_get_error_bounce
+#undef snd_seq_client_info_get_card
+#undef snd_seq_client_info_get_pid
+#undef snd_seq_client_info_get_event_filter
+#undef snd_seq_client_info_get_num_ports
+#undef snd_seq_client_info_get_event_lost
+#undef snd_seq_client_info_set_client
+#undef snd_seq_client_info_set_name
+#undef snd_seq_client_info_set_broadcast_filter
+#undef snd_seq_client_info_set_error_bounce
+#undef snd_seq_client_info_set_event_filter
+#undef snd_seq_client_info_event_filter_clear
+#undef snd_seq_client_info_event_filter_add
+#undef snd_seq_client_info_event_filter_del
+#undef snd_seq_client_info_event_filter_check
+#undef snd_seq_get_client_info
+#undef snd_seq_get_any_client_info
+#undef snd_seq_set_client_info
+#undef snd_seq_query_next_client
+#undef snd_seq_client_pool_sizeof
+#undef snd_seq_client_pool_malloc
+#undef snd_seq_client_pool_free
+#undef snd_seq_client_pool_copy
+#undef snd_seq_client_pool_get_client
+#undef snd_seq_client_pool_get_output_pool
+#undef snd_seq_client_pool_get_input_pool
+#undef snd_seq_client_pool_get_output_room
+#undef snd_seq_client_pool_get_output_free
+#undef snd_seq_client_pool_get_input_free
+#undef snd_seq_client_pool_set_output_pool
+#undef snd_seq_client_pool_set_input_pool
+#undef snd_seq_client_pool_set_output_room
+#undef snd_seq_get_client_pool
+#undef snd_seq_set_client_pool
+#undef snd_seq_port_info_sizeof
+#undef snd_seq_port_info_malloc
+#undef snd_seq_port_info_free
+#undef snd_seq_port_info_copy
+#undef snd_seq_port_info_get_client
+#undef snd_seq_port_info_get_port
+#undef snd_seq_port_info_get_addr
+#undef snd_seq_port_info_get_name
+#undef snd_seq_port_info_get_capability
+#undef snd_seq_port_info_get_type
+#undef snd_seq_port_info_get_midi_channels
+#undef snd_seq_port_info_get_midi_voices
+#undef snd_seq_port_info_get_synth_voices
+#undef snd_seq_port_info_get_read_use
+#undef snd_seq_port_info_get_write_use
+#undef snd_seq_port_info_get_port_specified
+#undef snd_seq_port_info_get_timestamping
+#undef snd_seq_port_info_get_timestamp_real
+#undef snd_seq_port_info_get_timestamp_queue
+#undef snd_seq_port_info_set_client
+#undef snd_seq_port_info_set_port
+#undef snd_seq_port_info_set_addr
+#undef snd_seq_port_info_set_name
+#undef snd_seq_port_info_set_capability
+#undef snd_seq_port_info_set_type
+#undef snd_seq_port_info_set_midi_channels
+#undef snd_seq_port_info_set_midi_voices
+#undef snd_seq_port_info_set_synth_voices
+#undef snd_seq_port_info_set_port_specified
+#undef snd_seq_port_info_set_timestamping
+#undef snd_seq_port_info_set_timestamp_real
+#undef snd_seq_port_info_set_timestamp_queue
+#undef snd_seq_create_port
+#undef snd_seq_delete_port
+#undef snd_seq_get_port_info
+#undef snd_seq_get_any_port_info
+#undef snd_seq_set_port_info
+#undef snd_seq_query_next_port
+#undef snd_seq_port_subscribe_sizeof
+#undef snd_seq_port_subscribe_malloc
+#undef snd_seq_port_subscribe_free
+#undef snd_seq_port_subscribe_copy
+#undef snd_seq_port_subscribe_get_sender
+#undef snd_seq_port_subscribe_get_dest
+#undef snd_seq_port_subscribe_get_queue
+#undef snd_seq_port_subscribe_get_exclusive
+#undef snd_seq_port_subscribe_get_time_update
+#undef snd_seq_port_subscribe_get_time_real
+#undef snd_seq_port_subscribe_set_sender
+#undef snd_seq_port_subscribe_set_dest
+#undef snd_seq_port_subscribe_set_queue
+#undef snd_seq_port_subscribe_set_exclusive
+#undef snd_seq_port_subscribe_set_time_update
+#undef snd_seq_port_subscribe_set_time_real
+#undef snd_seq_get_port_subscription
+#undef snd_seq_subscribe_port
+#undef snd_seq_unsubscribe_port
+#undef snd_seq_query_subscribe_sizeof
+#undef snd_seq_query_subscribe_malloc
+#undef snd_seq_query_subscribe_free
+#undef snd_seq_query_subscribe_copy
+#undef snd_seq_query_subscribe_get_client
+#undef snd_seq_query_subscribe_get_port
+#undef snd_seq_query_subscribe_get_root
+#undef snd_seq_query_subscribe_get_type
+#undef snd_seq_query_subscribe_get_index
+#undef snd_seq_query_subscribe_get_num_subs
+#undef snd_seq_query_subscribe_get_addr
+#undef snd_seq_query_subscribe_get_queue
+#undef snd_seq_query_subscribe_get_exclusive
+#undef snd_seq_query_subscribe_get_time_update
+#undef snd_seq_query_subscribe_get_time_real
+#undef snd_seq_query_subscribe_set_client
+#undef snd_seq_query_subscribe_set_port
+#undef snd_seq_query_subscribe_set_root
+#undef snd_seq_query_subscribe_set_type
+#undef snd_seq_query_subscribe_set_index
+#undef snd_seq_query_port_subscribers
+#undef snd_seq_queue_info_sizeof
+#undef snd_seq_queue_info_malloc
+#undef snd_seq_queue_info_free
+#undef snd_seq_queue_info_copy
+#undef snd_seq_queue_info_get_queue
+#undef snd_seq_queue_info_get_name
+#undef snd_seq_queue_info_get_owner
+#undef snd_seq_queue_info_get_locked
+#undef snd_seq_queue_info_get_flags
+#undef snd_seq_queue_info_set_name
+#undef snd_seq_queue_info_set_owner
+#undef snd_seq_queue_info_set_locked
+#undef snd_seq_queue_info_set_flags
+#undef snd_seq_create_queue
+#undef snd_seq_alloc_named_queue
+#undef snd_seq_alloc_queue
+#undef snd_seq_free_queue
+#undef snd_seq_get_queue_info
+#undef snd_seq_set_queue_info
+#undef snd_seq_query_named_queue
+#undef snd_seq_get_queue_usage
+#undef snd_seq_set_queue_usage
+#undef snd_seq_queue_status_sizeof
+#undef snd_seq_queue_status_malloc
+#undef snd_seq_queue_status_free
+#undef snd_seq_queue_status_copy
+#undef snd_seq_queue_status_get_queue
+#undef snd_seq_queue_status_get_events
+#undef snd_seq_queue_status_get_tick_time
+#undef snd_seq_queue_status_get_real_time
+#undef snd_seq_queue_status_get_status
+#undef snd_seq_get_queue_status
+#undef snd_seq_queue_tempo_sizeof
+#undef snd_seq_queue_tempo_malloc
+#undef snd_seq_queue_tempo_free
+#undef snd_seq_queue_tempo_copy
+#undef snd_seq_queue_tempo_get_queue
+#undef snd_seq_queue_tempo_get_tempo
+#undef snd_seq_queue_tempo_get_ppq
+#undef snd_seq_queue_tempo_get_skew
+#undef snd_seq_queue_tempo_get_skew_base
+#undef snd_seq_queue_tempo_set_tempo
+#undef snd_seq_queue_tempo_set_ppq
+#undef snd_seq_queue_tempo_set_skew
+#undef snd_seq_queue_tempo_set_skew_base
+#undef snd_seq_get_queue_tempo
+#undef snd_seq_set_queue_tempo
+#undef snd_seq_queue_timer_sizeof
+#undef snd_seq_queue_timer_malloc
+#undef snd_seq_queue_timer_free
+#undef snd_seq_queue_timer_copy
+#undef snd_seq_queue_timer_get_queue
+#undef snd_seq_queue_timer_get_type
+#undef snd_seq_queue_timer_get_id
+#undef snd_seq_queue_timer_get_resolution
+#undef snd_seq_queue_timer_set_type
+#undef snd_seq_queue_timer_set_id
+#undef snd_seq_queue_timer_set_resolution
+#undef snd_seq_get_queue_timer
+#undef snd_seq_set_queue_timer
+#undef snd_seq_free_event
+#undef snd_seq_event_length
+#undef snd_seq_event_output
+#undef snd_seq_event_output_buffer
+#undef snd_seq_event_output_direct
+#undef snd_seq_event_input
+#undef snd_seq_event_input_pending
+#undef snd_seq_drain_output
+#undef snd_seq_event_output_pending
+#undef snd_seq_extract_output
+#undef snd_seq_drop_output
+#undef snd_seq_drop_output_buffer
+#undef snd_seq_drop_input
+#undef snd_seq_drop_input_buffer
+#undef snd_seq_remove_events_sizeof
+#undef snd_seq_remove_events_malloc
+#undef snd_seq_remove_events_free
+#undef snd_seq_remove_events_copy
+#undef snd_seq_remove_events_get_condition
+#undef snd_seq_remove_events_get_queue
+#undef snd_seq_remove_events_get_time
+#undef snd_seq_remove_events_get_dest
+#undef snd_seq_remove_events_get_channel
+#undef snd_seq_remove_events_get_event_type
+#undef snd_seq_remove_events_get_tag
+#undef snd_seq_remove_events_set_condition
+#undef snd_seq_remove_events_set_queue
+#undef snd_seq_remove_events_set_time
+#undef snd_seq_remove_events_set_dest
+#undef snd_seq_remove_events_set_channel
+#undef snd_seq_remove_events_set_event_type
+#undef snd_seq_remove_events_set_tag
+#undef snd_seq_remove_events
+#undef snd_seq_set_bit
+#undef snd_seq_unset_bit
+#undef snd_seq_change_bit
+#undef snd_seq_get_bit
+#undef snd_seq_control_queue
+#undef snd_seq_create_simple_port
+#undef snd_seq_delete_simple_port
+#undef snd_seq_connect_from
+#undef snd_seq_connect_to
+#undef snd_seq_disconnect_from
+#undef snd_seq_disconnect_to
+#undef snd_seq_set_client_name
+#undef snd_seq_set_client_event_filter
+#undef snd_seq_set_client_pool_output
+#undef snd_seq_set_client_pool_output_room
+#undef snd_seq_set_client_pool_input
+#undef snd_seq_sync_output_queue
+#undef snd_seq_parse_address
+#undef snd_seq_reset_pool_output
+#undef snd_seq_reset_pool_input
+#undef snd_midi_event_new
+#undef snd_midi_event_resize_buffer
+#undef snd_midi_event_free
+#undef snd_midi_event_init
+#undef snd_midi_event_reset_encode
+#undef snd_midi_event_reset_decode
+#undef snd_midi_event_no_status
+#undef snd_midi_event_encode
+#undef snd_midi_event_encode_byte
+#undef snd_midi_event_decode
+#include <dlfcn.h>
+#include <stdio.h>
+const char* (*snd_asoundlib_version_dylibloader_wrapper_asound)( void);
+int (*snd_dlpath_dylibloader_wrapper_asound)( char*, size_t,const char*);
+void* (*snd_dlopen_dylibloader_wrapper_asound)(const char*, int, char*, size_t);
+void* (*snd_dlsym_dylibloader_wrapper_asound)( void*,const char*,const char*);
+int (*snd_dlclose_dylibloader_wrapper_asound)( void*);
+int (*snd_async_add_handler_dylibloader_wrapper_asound)( snd_async_handler_t**, int, snd_async_callback_t, void*);
+int (*snd_async_del_handler_dylibloader_wrapper_asound)( snd_async_handler_t*);
+int (*snd_async_handler_get_fd_dylibloader_wrapper_asound)( snd_async_handler_t*);
+int (*snd_async_handler_get_signo_dylibloader_wrapper_asound)( snd_async_handler_t*);
+void* (*snd_async_handler_get_callback_private_dylibloader_wrapper_asound)( snd_async_handler_t*);
+struct snd_shm_area* (*snd_shm_area_create_dylibloader_wrapper_asound)( int, void*);
+struct snd_shm_area* (*snd_shm_area_share_dylibloader_wrapper_asound)(struct snd_shm_area*);
+int (*snd_shm_area_destroy_dylibloader_wrapper_asound)(struct snd_shm_area*);
+int (*snd_user_file_dylibloader_wrapper_asound)(const char*, char**);
+int (*snd_input_stdio_open_dylibloader_wrapper_asound)( snd_input_t**,const char*,const char*);
+int (*snd_input_stdio_attach_dylibloader_wrapper_asound)( snd_input_t**, FILE*, int);
+int (*snd_input_buffer_open_dylibloader_wrapper_asound)( snd_input_t**,const char*, ssize_t);
+int (*snd_input_close_dylibloader_wrapper_asound)( snd_input_t*);
+int (*snd_input_scanf_dylibloader_wrapper_asound)( snd_input_t*,const char*,...);
+char* (*snd_input_gets_dylibloader_wrapper_asound)( snd_input_t*, char*, size_t);
+int (*snd_input_getc_dylibloader_wrapper_asound)( snd_input_t*);
+int (*snd_input_ungetc_dylibloader_wrapper_asound)( snd_input_t*, int);
+int (*snd_output_stdio_open_dylibloader_wrapper_asound)( snd_output_t**,const char*,const char*);
+int (*snd_output_stdio_attach_dylibloader_wrapper_asound)( snd_output_t**, FILE*, int);
+int (*snd_output_buffer_open_dylibloader_wrapper_asound)( snd_output_t**);
+size_t (*snd_output_buffer_string_dylibloader_wrapper_asound)( snd_output_t*, char**);
+int (*snd_output_close_dylibloader_wrapper_asound)( snd_output_t*);
+int (*snd_output_printf_dylibloader_wrapper_asound)( snd_output_t*,const char*,...);
+int (*snd_output_vprintf_dylibloader_wrapper_asound)( snd_output_t*,const char*, va_list);
+int (*snd_output_puts_dylibloader_wrapper_asound)( snd_output_t*,const char*);
+int (*snd_output_putc_dylibloader_wrapper_asound)( snd_output_t*, int);
+int (*snd_output_flush_dylibloader_wrapper_asound)( snd_output_t*);
+const char* (*snd_strerror_dylibloader_wrapper_asound)( int);
+int (*snd_lib_error_set_handler_dylibloader_wrapper_asound)( snd_lib_error_handler_t);
+snd_local_error_handler_t (*snd_lib_error_set_local_dylibloader_wrapper_asound)( snd_local_error_handler_t);
+const char* (*snd_config_topdir_dylibloader_wrapper_asound)( void);
+int (*snd_config_top_dylibloader_wrapper_asound)( snd_config_t**);
+int (*snd_config_load_dylibloader_wrapper_asound)( snd_config_t*, snd_input_t*);
+int (*snd_config_load_override_dylibloader_wrapper_asound)( snd_config_t*, snd_input_t*);
+int (*snd_config_save_dylibloader_wrapper_asound)( snd_config_t*, snd_output_t*);
+int (*snd_config_update_dylibloader_wrapper_asound)( void);
+int (*snd_config_update_r_dylibloader_wrapper_asound)( snd_config_t**, snd_config_update_t**,const char*);
+int (*snd_config_update_free_dylibloader_wrapper_asound)( snd_config_update_t*);
+int (*snd_config_update_free_global_dylibloader_wrapper_asound)( void);
+int (*snd_config_update_ref_dylibloader_wrapper_asound)( snd_config_t**);
+void (*snd_config_ref_dylibloader_wrapper_asound)( snd_config_t*);
+void (*snd_config_unref_dylibloader_wrapper_asound)( snd_config_t*);
+int (*snd_config_search_dylibloader_wrapper_asound)( snd_config_t*,const char*, snd_config_t**);
+int (*snd_config_searchv_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t**,...);
+int (*snd_config_search_definition_dylibloader_wrapper_asound)( snd_config_t*,const char*,const char*, snd_config_t**);
+int (*snd_config_expand_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t*,const char*, snd_config_t*, snd_config_t**);
+int (*snd_config_evaluate_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t*, snd_config_t*, snd_config_t**);
+int (*snd_config_add_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t*);
+int (*snd_config_add_before_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t*);
+int (*snd_config_add_after_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t*);
+int (*snd_config_remove_dylibloader_wrapper_asound)( snd_config_t*);
+int (*snd_config_delete_dylibloader_wrapper_asound)( snd_config_t*);
+int (*snd_config_delete_compound_members_dylibloader_wrapper_asound)(const snd_config_t*);
+int (*snd_config_copy_dylibloader_wrapper_asound)( snd_config_t**, snd_config_t*);
+int (*snd_config_make_dylibloader_wrapper_asound)( snd_config_t**,const char*, snd_config_type_t);
+int (*snd_config_make_integer_dylibloader_wrapper_asound)( snd_config_t**,const char*);
+int (*snd_config_make_integer64_dylibloader_wrapper_asound)( snd_config_t**,const char*);
+int (*snd_config_make_real_dylibloader_wrapper_asound)( snd_config_t**,const char*);
+int (*snd_config_make_string_dylibloader_wrapper_asound)( snd_config_t**,const char*);
+int (*snd_config_make_pointer_dylibloader_wrapper_asound)( snd_config_t**,const char*);
+int (*snd_config_make_compound_dylibloader_wrapper_asound)( snd_config_t**,const char*, int);
+int (*snd_config_imake_integer_dylibloader_wrapper_asound)( snd_config_t**,const char*,const long);
+int (*snd_config_imake_integer64_dylibloader_wrapper_asound)( snd_config_t**,const char*,const long long);
+int (*snd_config_imake_real_dylibloader_wrapper_asound)( snd_config_t**,const char*,const double);
+int (*snd_config_imake_string_dylibloader_wrapper_asound)( snd_config_t**,const char*,const char*);
+int (*snd_config_imake_safe_string_dylibloader_wrapper_asound)( snd_config_t**,const char*,const char*);
+int (*snd_config_imake_pointer_dylibloader_wrapper_asound)( snd_config_t**,const char*,const void*);
+snd_config_type_t (*snd_config_get_type_dylibloader_wrapper_asound)(const snd_config_t*);
+int (*snd_config_is_array_dylibloader_wrapper_asound)(const snd_config_t*);
+int (*snd_config_set_id_dylibloader_wrapper_asound)( snd_config_t*,const char*);
+int (*snd_config_set_integer_dylibloader_wrapper_asound)( snd_config_t*, long);
+int (*snd_config_set_integer64_dylibloader_wrapper_asound)( snd_config_t*, long long);
+int (*snd_config_set_real_dylibloader_wrapper_asound)( snd_config_t*, double);
+int (*snd_config_set_string_dylibloader_wrapper_asound)( snd_config_t*,const char*);
+int (*snd_config_set_ascii_dylibloader_wrapper_asound)( snd_config_t*,const char*);
+int (*snd_config_set_pointer_dylibloader_wrapper_asound)( snd_config_t*,const void*);
+int (*snd_config_get_id_dylibloader_wrapper_asound)(const snd_config_t*,const char**);
+int (*snd_config_get_integer_dylibloader_wrapper_asound)(const snd_config_t*, long*);
+int (*snd_config_get_integer64_dylibloader_wrapper_asound)(const snd_config_t*, long long*);
+int (*snd_config_get_real_dylibloader_wrapper_asound)(const snd_config_t*, double*);
+int (*snd_config_get_ireal_dylibloader_wrapper_asound)(const snd_config_t*, double*);
+int (*snd_config_get_string_dylibloader_wrapper_asound)(const snd_config_t*,const char**);
+int (*snd_config_get_ascii_dylibloader_wrapper_asound)(const snd_config_t*, char**);
+int (*snd_config_get_pointer_dylibloader_wrapper_asound)(const snd_config_t*,const void**);
+int (*snd_config_test_id_dylibloader_wrapper_asound)(const snd_config_t*,const char*);
+snd_config_iterator_t (*snd_config_iterator_first_dylibloader_wrapper_asound)(const snd_config_t*);
+snd_config_iterator_t (*snd_config_iterator_next_dylibloader_wrapper_asound)(const snd_config_iterator_t);
+snd_config_iterator_t (*snd_config_iterator_end_dylibloader_wrapper_asound)(const snd_config_t*);
+snd_config_t* (*snd_config_iterator_entry_dylibloader_wrapper_asound)(const snd_config_iterator_t);
+int (*snd_config_get_bool_ascii_dylibloader_wrapper_asound)(const char*);
+int (*snd_config_get_bool_dylibloader_wrapper_asound)(const snd_config_t*);
+int (*snd_config_get_ctl_iface_ascii_dylibloader_wrapper_asound)(const char*);
+int (*snd_config_get_ctl_iface_dylibloader_wrapper_asound)(const snd_config_t*);
+int (*snd_names_list_dylibloader_wrapper_asound)(const char*, snd_devname_t**);
+void (*snd_names_list_free_dylibloader_wrapper_asound)( snd_devname_t*);
+int (*snd_pcm_open_dylibloader_wrapper_asound)( snd_pcm_t**,const char*, snd_pcm_stream_t, int);
+int (*snd_pcm_open_lconf_dylibloader_wrapper_asound)( snd_pcm_t**,const char*, snd_pcm_stream_t, int, snd_config_t*);
+int (*snd_pcm_open_fallback_dylibloader_wrapper_asound)( snd_pcm_t**, snd_config_t*,const char*,const char*, snd_pcm_stream_t, int);
+int (*snd_pcm_close_dylibloader_wrapper_asound)( snd_pcm_t*);
+const char* (*snd_pcm_name_dylibloader_wrapper_asound)( snd_pcm_t*);
+snd_pcm_type_t (*snd_pcm_type_dylibloader_wrapper_asound)( snd_pcm_t*);
+snd_pcm_stream_t (*snd_pcm_stream_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_poll_descriptors_count_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_poll_descriptors_dylibloader_wrapper_asound)( snd_pcm_t*,struct pollfd*, unsigned int);
+int (*snd_pcm_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_pcm_t*,struct pollfd*, unsigned int, unsigned short*);
+int (*snd_pcm_nonblock_dylibloader_wrapper_asound)( snd_pcm_t*, int);
+int (*snd_async_add_pcm_handler_dylibloader_wrapper_asound)( snd_async_handler_t**, snd_pcm_t*, snd_async_callback_t, void*);
+snd_pcm_t* (*snd_async_handler_get_pcm_dylibloader_wrapper_asound)( snd_async_handler_t*);
+int (*snd_pcm_info_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_info_t*);
+int (*snd_pcm_hw_params_current_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_free_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_sw_params_current_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*);
+int (*snd_pcm_sw_params_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*);
+int (*snd_pcm_prepare_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_reset_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_status_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_status_t*);
+int (*snd_pcm_start_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_drop_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_drain_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_pause_dylibloader_wrapper_asound)( snd_pcm_t*, int);
+snd_pcm_state_t (*snd_pcm_state_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_hwsync_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_delay_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sframes_t*);
+int (*snd_pcm_resume_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_htimestamp_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_uframes_t*, snd_htimestamp_t*);
+snd_pcm_sframes_t (*snd_pcm_avail_dylibloader_wrapper_asound)( snd_pcm_t*);
+snd_pcm_sframes_t (*snd_pcm_avail_update_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_avail_delay_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sframes_t*, snd_pcm_sframes_t*);
+snd_pcm_sframes_t (*snd_pcm_rewindable_dylibloader_wrapper_asound)( snd_pcm_t*);
+snd_pcm_sframes_t (*snd_pcm_rewind_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_uframes_t);
+snd_pcm_sframes_t (*snd_pcm_forwardable_dylibloader_wrapper_asound)( snd_pcm_t*);
+snd_pcm_sframes_t (*snd_pcm_forward_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_uframes_t);
+snd_pcm_sframes_t (*snd_pcm_writei_dylibloader_wrapper_asound)( snd_pcm_t*,const void*, snd_pcm_uframes_t);
+snd_pcm_sframes_t (*snd_pcm_readi_dylibloader_wrapper_asound)( snd_pcm_t*, void*, snd_pcm_uframes_t);
+snd_pcm_sframes_t (*snd_pcm_writen_dylibloader_wrapper_asound)( snd_pcm_t*, void**, snd_pcm_uframes_t);
+snd_pcm_sframes_t (*snd_pcm_readn_dylibloader_wrapper_asound)( snd_pcm_t*, void**, snd_pcm_uframes_t);
+int (*snd_pcm_wait_dylibloader_wrapper_asound)( snd_pcm_t*, int);
+int (*snd_pcm_link_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_t*);
+int (*snd_pcm_unlink_dylibloader_wrapper_asound)( snd_pcm_t*);
+snd_pcm_chmap_query_t** (*snd_pcm_query_chmaps_dylibloader_wrapper_asound)( snd_pcm_t*);
+snd_pcm_chmap_query_t** (*snd_pcm_query_chmaps_from_hw_dylibloader_wrapper_asound)( int, int, int, snd_pcm_stream_t);
+void (*snd_pcm_free_chmaps_dylibloader_wrapper_asound)( snd_pcm_chmap_query_t**);
+snd_pcm_chmap_t* (*snd_pcm_get_chmap_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_set_chmap_dylibloader_wrapper_asound)( snd_pcm_t*,const snd_pcm_chmap_t*);
+const char* (*snd_pcm_chmap_type_name_dylibloader_wrapper_asound)(enum snd_pcm_chmap_type);
+const char* (*snd_pcm_chmap_name_dylibloader_wrapper_asound)(enum snd_pcm_chmap_position);
+const char* (*snd_pcm_chmap_long_name_dylibloader_wrapper_asound)(enum snd_pcm_chmap_position);
+int (*snd_pcm_chmap_print_dylibloader_wrapper_asound)(const snd_pcm_chmap_t*, size_t, char*);
+unsigned int (*snd_pcm_chmap_from_string_dylibloader_wrapper_asound)(const char*);
+snd_pcm_chmap_t* (*snd_pcm_chmap_parse_string_dylibloader_wrapper_asound)(const char*);
+int (*snd_pcm_recover_dylibloader_wrapper_asound)( snd_pcm_t*, int, int);
+int (*snd_pcm_set_params_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_format_t, snd_pcm_access_t, unsigned int, unsigned int, int, unsigned int);
+int (*snd_pcm_get_params_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_uframes_t*, snd_pcm_uframes_t*);
+size_t (*snd_pcm_info_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_pcm_info_malloc_dylibloader_wrapper_asound)( snd_pcm_info_t**);
+void (*snd_pcm_info_free_dylibloader_wrapper_asound)( snd_pcm_info_t*);
+void (*snd_pcm_info_copy_dylibloader_wrapper_asound)( snd_pcm_info_t*,const snd_pcm_info_t*);
+unsigned int (*snd_pcm_info_get_device_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+unsigned int (*snd_pcm_info_get_subdevice_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+snd_pcm_stream_t (*snd_pcm_info_get_stream_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+int (*snd_pcm_info_get_card_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+const char* (*snd_pcm_info_get_id_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+const char* (*snd_pcm_info_get_name_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+const char* (*snd_pcm_info_get_subdevice_name_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+snd_pcm_class_t (*snd_pcm_info_get_class_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+snd_pcm_subclass_t (*snd_pcm_info_get_subclass_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+unsigned int (*snd_pcm_info_get_subdevices_count_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+unsigned int (*snd_pcm_info_get_subdevices_avail_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+snd_pcm_sync_id_t (*snd_pcm_info_get_sync_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+void (*snd_pcm_info_set_device_dylibloader_wrapper_asound)( snd_pcm_info_t*, unsigned int);
+void (*snd_pcm_info_set_subdevice_dylibloader_wrapper_asound)( snd_pcm_info_t*, unsigned int);
+void (*snd_pcm_info_set_stream_dylibloader_wrapper_asound)( snd_pcm_info_t*, snd_pcm_stream_t);
+int (*snd_pcm_hw_params_any_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_can_mmap_sample_resolution_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_is_double_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_is_batch_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_is_block_transfer_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_is_monotonic_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_can_overrange_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_can_pause_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_can_resume_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_is_half_duplex_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_is_joint_duplex_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_can_sync_start_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_can_disable_period_wakeup_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_supports_audio_wallclock_ts_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_supports_audio_ts_type_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, int);
+int (*snd_pcm_hw_params_get_rate_numden_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, unsigned int*);
+int (*snd_pcm_hw_params_get_sbits_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_get_fifo_size_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+size_t (*snd_pcm_hw_params_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_pcm_hw_params_malloc_dylibloader_wrapper_asound)( snd_pcm_hw_params_t**);
+void (*snd_pcm_hw_params_free_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*);
+void (*snd_pcm_hw_params_copy_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*,const snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_get_access_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_access_t*);
+int (*snd_pcm_hw_params_test_access_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_access_t);
+int (*snd_pcm_hw_params_set_access_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_access_t);
+int (*snd_pcm_hw_params_set_access_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_access_t*);
+int (*snd_pcm_hw_params_set_access_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_access_t*);
+int (*snd_pcm_hw_params_set_access_mask_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_access_mask_t*);
+int (*snd_pcm_hw_params_get_access_mask_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*, snd_pcm_access_mask_t*);
+int (*snd_pcm_hw_params_get_format_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_format_t*);
+int (*snd_pcm_hw_params_test_format_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_format_t);
+int (*snd_pcm_hw_params_set_format_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_format_t);
+int (*snd_pcm_hw_params_set_format_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_format_t*);
+int (*snd_pcm_hw_params_set_format_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_format_t*);
+int (*snd_pcm_hw_params_set_format_mask_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_format_mask_t*);
+void (*snd_pcm_hw_params_get_format_mask_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*, snd_pcm_format_mask_t*);
+int (*snd_pcm_hw_params_get_subformat_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_subformat_t*);
+int (*snd_pcm_hw_params_test_subformat_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_subformat_t);
+int (*snd_pcm_hw_params_set_subformat_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_subformat_t);
+int (*snd_pcm_hw_params_set_subformat_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_subformat_t*);
+int (*snd_pcm_hw_params_set_subformat_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_subformat_t*);
+int (*snd_pcm_hw_params_set_subformat_mask_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_subformat_mask_t*);
+void (*snd_pcm_hw_params_get_subformat_mask_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*, snd_pcm_subformat_mask_t*);
+int (*snd_pcm_hw_params_get_channels_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_get_channels_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_get_channels_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_test_channels_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int);
+int (*snd_pcm_hw_params_set_channels_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int);
+int (*snd_pcm_hw_params_set_channels_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_set_channels_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_set_channels_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, unsigned int*);
+int (*snd_pcm_hw_params_set_channels_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_set_channels_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_set_channels_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_get_rate_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_rate_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_rate_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_test_rate_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+int (*snd_pcm_hw_params_set_rate_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+int (*snd_pcm_hw_params_set_rate_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_rate_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_rate_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_rate_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_rate_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_rate_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_rate_resample_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int);
+int (*snd_pcm_hw_params_get_rate_resample_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_set_export_buffer_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int);
+int (*snd_pcm_hw_params_get_export_buffer_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_set_period_wakeup_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int);
+int (*snd_pcm_hw_params_get_period_wakeup_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_get_period_time_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_period_time_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_period_time_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_test_period_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+int (*snd_pcm_hw_params_set_period_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+int (*snd_pcm_hw_params_set_period_time_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_period_time_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_period_time_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_period_time_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_period_time_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_period_time_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_period_size_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+int (*snd_pcm_hw_params_get_period_size_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+int (*snd_pcm_hw_params_get_period_size_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+int (*snd_pcm_hw_params_test_period_size_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t, int);
+int (*snd_pcm_hw_params_set_period_size_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t, int);
+int (*snd_pcm_hw_params_set_period_size_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+int (*snd_pcm_hw_params_set_period_size_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+int (*snd_pcm_hw_params_set_period_size_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*, snd_pcm_uframes_t*, int*);
+int (*snd_pcm_hw_params_set_period_size_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+int (*snd_pcm_hw_params_set_period_size_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+int (*snd_pcm_hw_params_set_period_size_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+int (*snd_pcm_hw_params_set_period_size_integer_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_get_periods_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_periods_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_periods_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_test_periods_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+int (*snd_pcm_hw_params_set_periods_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+int (*snd_pcm_hw_params_set_periods_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_periods_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_periods_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_periods_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_periods_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_periods_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_periods_integer_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*);
+int (*snd_pcm_hw_params_get_buffer_time_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_buffer_time_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_buffer_time_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_test_buffer_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+int (*snd_pcm_hw_params_set_buffer_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+int (*snd_pcm_hw_params_set_buffer_time_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_buffer_time_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_buffer_time_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_buffer_time_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_buffer_time_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_buffer_time_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_buffer_size_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_hw_params_get_buffer_size_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_hw_params_get_buffer_size_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_hw_params_test_buffer_size_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t);
+int (*snd_pcm_hw_params_set_buffer_size_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t);
+int (*snd_pcm_hw_params_set_buffer_size_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_hw_params_set_buffer_size_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_hw_params_set_buffer_size_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_hw_params_set_buffer_size_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_hw_params_set_buffer_size_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_hw_params_set_buffer_size_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_hw_params_get_min_align_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+size_t (*snd_pcm_sw_params_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_pcm_sw_params_malloc_dylibloader_wrapper_asound)( snd_pcm_sw_params_t**);
+void (*snd_pcm_sw_params_free_dylibloader_wrapper_asound)( snd_pcm_sw_params_t*);
+void (*snd_pcm_sw_params_copy_dylibloader_wrapper_asound)( snd_pcm_sw_params_t*,const snd_pcm_sw_params_t*);
+int (*snd_pcm_sw_params_get_boundary_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_sw_params_set_tstamp_mode_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_tstamp_t);
+int (*snd_pcm_sw_params_get_tstamp_mode_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_tstamp_t*);
+int (*snd_pcm_sw_params_set_tstamp_type_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_tstamp_type_t);
+int (*snd_pcm_sw_params_get_tstamp_type_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_tstamp_type_t*);
+int (*snd_pcm_sw_params_set_avail_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+int (*snd_pcm_sw_params_get_avail_min_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_sw_params_set_period_event_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, int);
+int (*snd_pcm_sw_params_get_period_event_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, int*);
+int (*snd_pcm_sw_params_set_start_threshold_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+int (*snd_pcm_sw_params_get_start_threshold_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_sw_params_set_stop_threshold_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+int (*snd_pcm_sw_params_get_stop_threshold_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_sw_params_set_silence_threshold_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+int (*snd_pcm_sw_params_get_silence_threshold_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_sw_params_set_silence_size_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+int (*snd_pcm_sw_params_get_silence_size_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+size_t (*snd_pcm_access_mask_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_pcm_access_mask_malloc_dylibloader_wrapper_asound)( snd_pcm_access_mask_t**);
+void (*snd_pcm_access_mask_free_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*);
+void (*snd_pcm_access_mask_copy_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*,const snd_pcm_access_mask_t*);
+void (*snd_pcm_access_mask_none_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*);
+void (*snd_pcm_access_mask_any_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*);
+int (*snd_pcm_access_mask_test_dylibloader_wrapper_asound)(const snd_pcm_access_mask_t*, snd_pcm_access_t);
+int (*snd_pcm_access_mask_empty_dylibloader_wrapper_asound)(const snd_pcm_access_mask_t*);
+void (*snd_pcm_access_mask_set_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*, snd_pcm_access_t);
+void (*snd_pcm_access_mask_reset_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*, snd_pcm_access_t);
+size_t (*snd_pcm_format_mask_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_pcm_format_mask_malloc_dylibloader_wrapper_asound)( snd_pcm_format_mask_t**);
+void (*snd_pcm_format_mask_free_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*);
+void (*snd_pcm_format_mask_copy_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*,const snd_pcm_format_mask_t*);
+void (*snd_pcm_format_mask_none_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*);
+void (*snd_pcm_format_mask_any_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*);
+int (*snd_pcm_format_mask_test_dylibloader_wrapper_asound)(const snd_pcm_format_mask_t*, snd_pcm_format_t);
+int (*snd_pcm_format_mask_empty_dylibloader_wrapper_asound)(const snd_pcm_format_mask_t*);
+void (*snd_pcm_format_mask_set_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*, snd_pcm_format_t);
+void (*snd_pcm_format_mask_reset_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*, snd_pcm_format_t);
+size_t (*snd_pcm_subformat_mask_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_pcm_subformat_mask_malloc_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t**);
+void (*snd_pcm_subformat_mask_free_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*);
+void (*snd_pcm_subformat_mask_copy_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*,const snd_pcm_subformat_mask_t*);
+void (*snd_pcm_subformat_mask_none_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*);
+void (*snd_pcm_subformat_mask_any_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*);
+int (*snd_pcm_subformat_mask_test_dylibloader_wrapper_asound)(const snd_pcm_subformat_mask_t*, snd_pcm_subformat_t);
+int (*snd_pcm_subformat_mask_empty_dylibloader_wrapper_asound)(const snd_pcm_subformat_mask_t*);
+void (*snd_pcm_subformat_mask_set_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*, snd_pcm_subformat_t);
+void (*snd_pcm_subformat_mask_reset_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*, snd_pcm_subformat_t);
+size_t (*snd_pcm_status_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_pcm_status_malloc_dylibloader_wrapper_asound)( snd_pcm_status_t**);
+void (*snd_pcm_status_free_dylibloader_wrapper_asound)( snd_pcm_status_t*);
+void (*snd_pcm_status_copy_dylibloader_wrapper_asound)( snd_pcm_status_t*,const snd_pcm_status_t*);
+snd_pcm_state_t (*snd_pcm_status_get_state_dylibloader_wrapper_asound)(const snd_pcm_status_t*);
+void (*snd_pcm_status_get_trigger_tstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_timestamp_t*);
+void (*snd_pcm_status_get_trigger_htstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_htimestamp_t*);
+void (*snd_pcm_status_get_tstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_timestamp_t*);
+void (*snd_pcm_status_get_htstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_htimestamp_t*);
+void (*snd_pcm_status_get_audio_htstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_htimestamp_t*);
+void (*snd_pcm_status_get_driver_htstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_htimestamp_t*);
+void (*snd_pcm_status_get_audio_htstamp_report_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_pcm_audio_tstamp_report_t*);
+void (*snd_pcm_status_set_audio_htstamp_config_dylibloader_wrapper_asound)( snd_pcm_status_t*, snd_pcm_audio_tstamp_config_t*);
+snd_pcm_sframes_t (*snd_pcm_status_get_delay_dylibloader_wrapper_asound)(const snd_pcm_status_t*);
+snd_pcm_uframes_t (*snd_pcm_status_get_avail_dylibloader_wrapper_asound)(const snd_pcm_status_t*);
+snd_pcm_uframes_t (*snd_pcm_status_get_avail_max_dylibloader_wrapper_asound)(const snd_pcm_status_t*);
+snd_pcm_uframes_t (*snd_pcm_status_get_overrange_dylibloader_wrapper_asound)(const snd_pcm_status_t*);
+const char* (*snd_pcm_type_name_dylibloader_wrapper_asound)( snd_pcm_type_t);
+const char* (*snd_pcm_stream_name_dylibloader_wrapper_asound)(const snd_pcm_stream_t);
+const char* (*snd_pcm_access_name_dylibloader_wrapper_asound)(const snd_pcm_access_t);
+const char* (*snd_pcm_format_name_dylibloader_wrapper_asound)(const snd_pcm_format_t);
+const char* (*snd_pcm_format_description_dylibloader_wrapper_asound)(const snd_pcm_format_t);
+const char* (*snd_pcm_subformat_name_dylibloader_wrapper_asound)(const snd_pcm_subformat_t);
+const char* (*snd_pcm_subformat_description_dylibloader_wrapper_asound)(const snd_pcm_subformat_t);
+snd_pcm_format_t (*snd_pcm_format_value_dylibloader_wrapper_asound)(const char*);
+const char* (*snd_pcm_tstamp_mode_name_dylibloader_wrapper_asound)(const snd_pcm_tstamp_t);
+const char* (*snd_pcm_state_name_dylibloader_wrapper_asound)(const snd_pcm_state_t);
+int (*snd_pcm_dump_dylibloader_wrapper_asound)( snd_pcm_t*, snd_output_t*);
+int (*snd_pcm_dump_hw_setup_dylibloader_wrapper_asound)( snd_pcm_t*, snd_output_t*);
+int (*snd_pcm_dump_sw_setup_dylibloader_wrapper_asound)( snd_pcm_t*, snd_output_t*);
+int (*snd_pcm_dump_setup_dylibloader_wrapper_asound)( snd_pcm_t*, snd_output_t*);
+int (*snd_pcm_hw_params_dump_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*, snd_output_t*);
+int (*snd_pcm_sw_params_dump_dylibloader_wrapper_asound)( snd_pcm_sw_params_t*, snd_output_t*);
+int (*snd_pcm_status_dump_dylibloader_wrapper_asound)( snd_pcm_status_t*, snd_output_t*);
+int (*snd_pcm_mmap_begin_dylibloader_wrapper_asound)( snd_pcm_t*,const snd_pcm_channel_area_t**, snd_pcm_uframes_t*, snd_pcm_uframes_t*);
+snd_pcm_sframes_t (*snd_pcm_mmap_commit_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_uframes_t, snd_pcm_uframes_t);
+snd_pcm_sframes_t (*snd_pcm_mmap_writei_dylibloader_wrapper_asound)( snd_pcm_t*,const void*, snd_pcm_uframes_t);
+snd_pcm_sframes_t (*snd_pcm_mmap_readi_dylibloader_wrapper_asound)( snd_pcm_t*, void*, snd_pcm_uframes_t);
+snd_pcm_sframes_t (*snd_pcm_mmap_writen_dylibloader_wrapper_asound)( snd_pcm_t*, void**, snd_pcm_uframes_t);
+snd_pcm_sframes_t (*snd_pcm_mmap_readn_dylibloader_wrapper_asound)( snd_pcm_t*, void**, snd_pcm_uframes_t);
+int (*snd_pcm_format_signed_dylibloader_wrapper_asound)( snd_pcm_format_t);
+int (*snd_pcm_format_unsigned_dylibloader_wrapper_asound)( snd_pcm_format_t);
+int (*snd_pcm_format_linear_dylibloader_wrapper_asound)( snd_pcm_format_t);
+int (*snd_pcm_format_float_dylibloader_wrapper_asound)( snd_pcm_format_t);
+int (*snd_pcm_format_little_endian_dylibloader_wrapper_asound)( snd_pcm_format_t);
+int (*snd_pcm_format_big_endian_dylibloader_wrapper_asound)( snd_pcm_format_t);
+int (*snd_pcm_format_cpu_endian_dylibloader_wrapper_asound)( snd_pcm_format_t);
+int (*snd_pcm_format_width_dylibloader_wrapper_asound)( snd_pcm_format_t);
+int (*snd_pcm_format_physical_width_dylibloader_wrapper_asound)( snd_pcm_format_t);
+snd_pcm_format_t (*snd_pcm_build_linear_format_dylibloader_wrapper_asound)( int, int, int, int);
+ssize_t (*snd_pcm_format_size_dylibloader_wrapper_asound)( snd_pcm_format_t, size_t);
+uint8_t (*snd_pcm_format_silence_dylibloader_wrapper_asound)( snd_pcm_format_t);
+uint16_t (*snd_pcm_format_silence_16_dylibloader_wrapper_asound)( snd_pcm_format_t);
+uint32_t (*snd_pcm_format_silence_32_dylibloader_wrapper_asound)( snd_pcm_format_t);
+uint64_t (*snd_pcm_format_silence_64_dylibloader_wrapper_asound)( snd_pcm_format_t);
+int (*snd_pcm_format_set_silence_dylibloader_wrapper_asound)( snd_pcm_format_t, void*, unsigned int);
+snd_pcm_sframes_t (*snd_pcm_bytes_to_frames_dylibloader_wrapper_asound)( snd_pcm_t*, ssize_t);
+ssize_t (*snd_pcm_frames_to_bytes_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sframes_t);
+long (*snd_pcm_bytes_to_samples_dylibloader_wrapper_asound)( snd_pcm_t*, ssize_t);
+ssize_t (*snd_pcm_samples_to_bytes_dylibloader_wrapper_asound)( snd_pcm_t*, long);
+int (*snd_pcm_area_silence_dylibloader_wrapper_asound)(const snd_pcm_channel_area_t*, snd_pcm_uframes_t, unsigned int, snd_pcm_format_t);
+int (*snd_pcm_areas_silence_dylibloader_wrapper_asound)(const snd_pcm_channel_area_t*, snd_pcm_uframes_t, unsigned int, snd_pcm_uframes_t, snd_pcm_format_t);
+int (*snd_pcm_area_copy_dylibloader_wrapper_asound)(const snd_pcm_channel_area_t*, snd_pcm_uframes_t,const snd_pcm_channel_area_t*, snd_pcm_uframes_t, unsigned int, snd_pcm_format_t);
+int (*snd_pcm_areas_copy_dylibloader_wrapper_asound)(const snd_pcm_channel_area_t*, snd_pcm_uframes_t,const snd_pcm_channel_area_t*, snd_pcm_uframes_t, unsigned int, snd_pcm_uframes_t, snd_pcm_format_t);
+int (*snd_pcm_areas_copy_wrap_dylibloader_wrapper_asound)(const snd_pcm_channel_area_t*, snd_pcm_uframes_t,const snd_pcm_uframes_t,const snd_pcm_channel_area_t*, snd_pcm_uframes_t,const snd_pcm_uframes_t,const unsigned int, snd_pcm_uframes_t,const snd_pcm_format_t);
+snd_pcm_t* (*snd_pcm_hook_get_pcm_dylibloader_wrapper_asound)( snd_pcm_hook_t*);
+void* (*snd_pcm_hook_get_private_dylibloader_wrapper_asound)( snd_pcm_hook_t*);
+void (*snd_pcm_hook_set_private_dylibloader_wrapper_asound)( snd_pcm_hook_t*, void*);
+int (*snd_pcm_hook_add_dylibloader_wrapper_asound)( snd_pcm_hook_t**, snd_pcm_t*, snd_pcm_hook_type_t, snd_pcm_hook_func_t, void*);
+int (*snd_pcm_hook_remove_dylibloader_wrapper_asound)( snd_pcm_hook_t*);
+snd_pcm_uframes_t (*snd_pcm_meter_get_bufsize_dylibloader_wrapper_asound)( snd_pcm_t*);
+unsigned int (*snd_pcm_meter_get_channels_dylibloader_wrapper_asound)( snd_pcm_t*);
+unsigned int (*snd_pcm_meter_get_rate_dylibloader_wrapper_asound)( snd_pcm_t*);
+snd_pcm_uframes_t (*snd_pcm_meter_get_now_dylibloader_wrapper_asound)( snd_pcm_t*);
+snd_pcm_uframes_t (*snd_pcm_meter_get_boundary_dylibloader_wrapper_asound)( snd_pcm_t*);
+int (*snd_pcm_meter_add_scope_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_scope_t*);
+snd_pcm_scope_t* (*snd_pcm_meter_search_scope_dylibloader_wrapper_asound)( snd_pcm_t*,const char*);
+int (*snd_pcm_scope_malloc_dylibloader_wrapper_asound)( snd_pcm_scope_t**);
+void (*snd_pcm_scope_set_ops_dylibloader_wrapper_asound)( snd_pcm_scope_t*,const snd_pcm_scope_ops_t*);
+void (*snd_pcm_scope_set_name_dylibloader_wrapper_asound)( snd_pcm_scope_t*,const char*);
+const char* (*snd_pcm_scope_get_name_dylibloader_wrapper_asound)( snd_pcm_scope_t*);
+void* (*snd_pcm_scope_get_callback_private_dylibloader_wrapper_asound)( snd_pcm_scope_t*);
+void (*snd_pcm_scope_set_callback_private_dylibloader_wrapper_asound)( snd_pcm_scope_t*, void*);
+int (*snd_pcm_scope_s16_open_dylibloader_wrapper_asound)( snd_pcm_t*,const char*, snd_pcm_scope_t**);
+int16_t* (*snd_pcm_scope_s16_get_channel_buffer_dylibloader_wrapper_asound)( snd_pcm_scope_t*, unsigned int);
+int (*snd_spcm_init_dylibloader_wrapper_asound)( snd_pcm_t*, unsigned int, unsigned int, snd_pcm_format_t, snd_pcm_subformat_t, snd_spcm_latency_t, snd_pcm_access_t, snd_spcm_xrun_type_t);
+int (*snd_spcm_init_duplex_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_t*, unsigned int, unsigned int, snd_pcm_format_t, snd_pcm_subformat_t, snd_spcm_latency_t, snd_pcm_access_t, snd_spcm_xrun_type_t, snd_spcm_duplex_type_t);
+int (*snd_spcm_init_get_params_dylibloader_wrapper_asound)( snd_pcm_t*, unsigned int*, snd_pcm_uframes_t*, snd_pcm_uframes_t*);
+const char* (*snd_pcm_start_mode_name_dylibloader_wrapper_asound)( snd_pcm_start_t);
+const char* (*snd_pcm_xrun_mode_name_dylibloader_wrapper_asound)( snd_pcm_xrun_t);
+int (*snd_pcm_sw_params_set_start_mode_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_start_t);
+snd_pcm_start_t (*snd_pcm_sw_params_get_start_mode_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*);
+int (*snd_pcm_sw_params_set_xrun_mode_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_xrun_t);
+snd_pcm_xrun_t (*snd_pcm_sw_params_get_xrun_mode_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*);
+int (*snd_pcm_sw_params_set_xfer_align_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+int (*snd_pcm_sw_params_get_xfer_align_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+int (*snd_pcm_sw_params_set_sleep_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, unsigned int);
+int (*snd_pcm_sw_params_get_sleep_min_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, unsigned int*);
+int (*snd_pcm_hw_params_get_tick_time_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_tick_time_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_get_tick_time_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_test_tick_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+int (*snd_pcm_hw_params_set_tick_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+int (*snd_pcm_hw_params_set_tick_time_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_tick_time_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_tick_time_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_tick_time_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_tick_time_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_pcm_hw_params_set_tick_time_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+int (*snd_rawmidi_open_dylibloader_wrapper_asound)( snd_rawmidi_t**, snd_rawmidi_t**,const char*, int);
+int (*snd_rawmidi_open_lconf_dylibloader_wrapper_asound)( snd_rawmidi_t**, snd_rawmidi_t**,const char*, int, snd_config_t*);
+int (*snd_rawmidi_close_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+int (*snd_rawmidi_poll_descriptors_count_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+int (*snd_rawmidi_poll_descriptors_dylibloader_wrapper_asound)( snd_rawmidi_t*,struct pollfd*, unsigned int);
+int (*snd_rawmidi_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_rawmidi_t*,struct pollfd*, unsigned int, unsigned short*);
+int (*snd_rawmidi_nonblock_dylibloader_wrapper_asound)( snd_rawmidi_t*, int);
+size_t (*snd_rawmidi_info_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_rawmidi_info_malloc_dylibloader_wrapper_asound)( snd_rawmidi_info_t**);
+void (*snd_rawmidi_info_free_dylibloader_wrapper_asound)( snd_rawmidi_info_t*);
+void (*snd_rawmidi_info_copy_dylibloader_wrapper_asound)( snd_rawmidi_info_t*,const snd_rawmidi_info_t*);
+unsigned int (*snd_rawmidi_info_get_device_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+unsigned int (*snd_rawmidi_info_get_subdevice_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+snd_rawmidi_stream_t (*snd_rawmidi_info_get_stream_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+int (*snd_rawmidi_info_get_card_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+unsigned int (*snd_rawmidi_info_get_flags_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+const char* (*snd_rawmidi_info_get_id_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+const char* (*snd_rawmidi_info_get_name_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+const char* (*snd_rawmidi_info_get_subdevice_name_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+unsigned int (*snd_rawmidi_info_get_subdevices_count_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+unsigned int (*snd_rawmidi_info_get_subdevices_avail_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+void (*snd_rawmidi_info_set_device_dylibloader_wrapper_asound)( snd_rawmidi_info_t*, unsigned int);
+void (*snd_rawmidi_info_set_subdevice_dylibloader_wrapper_asound)( snd_rawmidi_info_t*, unsigned int);
+void (*snd_rawmidi_info_set_stream_dylibloader_wrapper_asound)( snd_rawmidi_info_t*, snd_rawmidi_stream_t);
+int (*snd_rawmidi_info_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_info_t*);
+size_t (*snd_rawmidi_params_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_rawmidi_params_malloc_dylibloader_wrapper_asound)( snd_rawmidi_params_t**);
+void (*snd_rawmidi_params_free_dylibloader_wrapper_asound)( snd_rawmidi_params_t*);
+void (*snd_rawmidi_params_copy_dylibloader_wrapper_asound)( snd_rawmidi_params_t*,const snd_rawmidi_params_t*);
+int (*snd_rawmidi_params_set_buffer_size_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_params_t*, size_t);
+size_t (*snd_rawmidi_params_get_buffer_size_dylibloader_wrapper_asound)(const snd_rawmidi_params_t*);
+int (*snd_rawmidi_params_set_avail_min_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_params_t*, size_t);
+size_t (*snd_rawmidi_params_get_avail_min_dylibloader_wrapper_asound)(const snd_rawmidi_params_t*);
+int (*snd_rawmidi_params_set_no_active_sensing_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_params_t*, int);
+int (*snd_rawmidi_params_get_no_active_sensing_dylibloader_wrapper_asound)(const snd_rawmidi_params_t*);
+int (*snd_rawmidi_params_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_params_t*);
+int (*snd_rawmidi_params_current_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_params_t*);
+size_t (*snd_rawmidi_status_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_rawmidi_status_malloc_dylibloader_wrapper_asound)( snd_rawmidi_status_t**);
+void (*snd_rawmidi_status_free_dylibloader_wrapper_asound)( snd_rawmidi_status_t*);
+void (*snd_rawmidi_status_copy_dylibloader_wrapper_asound)( snd_rawmidi_status_t*,const snd_rawmidi_status_t*);
+void (*snd_rawmidi_status_get_tstamp_dylibloader_wrapper_asound)(const snd_rawmidi_status_t*, snd_htimestamp_t*);
+size_t (*snd_rawmidi_status_get_avail_dylibloader_wrapper_asound)(const snd_rawmidi_status_t*);
+size_t (*snd_rawmidi_status_get_xruns_dylibloader_wrapper_asound)(const snd_rawmidi_status_t*);
+int (*snd_rawmidi_status_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_status_t*);
+int (*snd_rawmidi_drain_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+int (*snd_rawmidi_drop_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+ssize_t (*snd_rawmidi_write_dylibloader_wrapper_asound)( snd_rawmidi_t*,const void*, size_t);
+ssize_t (*snd_rawmidi_read_dylibloader_wrapper_asound)( snd_rawmidi_t*, void*, size_t);
+const char* (*snd_rawmidi_name_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+snd_rawmidi_type_t (*snd_rawmidi_type_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+snd_rawmidi_stream_t (*snd_rawmidi_stream_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+int (*snd_timer_query_open_dylibloader_wrapper_asound)( snd_timer_query_t**,const char*, int);
+int (*snd_timer_query_open_lconf_dylibloader_wrapper_asound)( snd_timer_query_t**,const char*, int, snd_config_t*);
+int (*snd_timer_query_close_dylibloader_wrapper_asound)( snd_timer_query_t*);
+int (*snd_timer_query_next_device_dylibloader_wrapper_asound)( snd_timer_query_t*, snd_timer_id_t*);
+int (*snd_timer_query_info_dylibloader_wrapper_asound)( snd_timer_query_t*, snd_timer_ginfo_t*);
+int (*snd_timer_query_params_dylibloader_wrapper_asound)( snd_timer_query_t*, snd_timer_gparams_t*);
+int (*snd_timer_query_status_dylibloader_wrapper_asound)( snd_timer_query_t*, snd_timer_gstatus_t*);
+int (*snd_timer_open_dylibloader_wrapper_asound)( snd_timer_t**,const char*, int);
+int (*snd_timer_open_lconf_dylibloader_wrapper_asound)( snd_timer_t**,const char*, int, snd_config_t*);
+int (*snd_timer_close_dylibloader_wrapper_asound)( snd_timer_t*);
+int (*snd_async_add_timer_handler_dylibloader_wrapper_asound)( snd_async_handler_t**, snd_timer_t*, snd_async_callback_t, void*);
+snd_timer_t* (*snd_async_handler_get_timer_dylibloader_wrapper_asound)( snd_async_handler_t*);
+int (*snd_timer_poll_descriptors_count_dylibloader_wrapper_asound)( snd_timer_t*);
+int (*snd_timer_poll_descriptors_dylibloader_wrapper_asound)( snd_timer_t*,struct pollfd*, unsigned int);
+int (*snd_timer_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_timer_t*,struct pollfd*, unsigned int, unsigned short*);
+int (*snd_timer_info_dylibloader_wrapper_asound)( snd_timer_t*, snd_timer_info_t*);
+int (*snd_timer_params_dylibloader_wrapper_asound)( snd_timer_t*, snd_timer_params_t*);
+int (*snd_timer_status_dylibloader_wrapper_asound)( snd_timer_t*, snd_timer_status_t*);
+int (*snd_timer_start_dylibloader_wrapper_asound)( snd_timer_t*);
+int (*snd_timer_stop_dylibloader_wrapper_asound)( snd_timer_t*);
+int (*snd_timer_continue_dylibloader_wrapper_asound)( snd_timer_t*);
+ssize_t (*snd_timer_read_dylibloader_wrapper_asound)( snd_timer_t*, void*, size_t);
+size_t (*snd_timer_id_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_timer_id_malloc_dylibloader_wrapper_asound)( snd_timer_id_t**);
+void (*snd_timer_id_free_dylibloader_wrapper_asound)( snd_timer_id_t*);
+void (*snd_timer_id_copy_dylibloader_wrapper_asound)( snd_timer_id_t*,const snd_timer_id_t*);
+void (*snd_timer_id_set_class_dylibloader_wrapper_asound)( snd_timer_id_t*, int);
+int (*snd_timer_id_get_class_dylibloader_wrapper_asound)( snd_timer_id_t*);
+void (*snd_timer_id_set_sclass_dylibloader_wrapper_asound)( snd_timer_id_t*, int);
+int (*snd_timer_id_get_sclass_dylibloader_wrapper_asound)( snd_timer_id_t*);
+void (*snd_timer_id_set_card_dylibloader_wrapper_asound)( snd_timer_id_t*, int);
+int (*snd_timer_id_get_card_dylibloader_wrapper_asound)( snd_timer_id_t*);
+void (*snd_timer_id_set_device_dylibloader_wrapper_asound)( snd_timer_id_t*, int);
+int (*snd_timer_id_get_device_dylibloader_wrapper_asound)( snd_timer_id_t*);
+void (*snd_timer_id_set_subdevice_dylibloader_wrapper_asound)( snd_timer_id_t*, int);
+int (*snd_timer_id_get_subdevice_dylibloader_wrapper_asound)( snd_timer_id_t*);
+size_t (*snd_timer_ginfo_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_timer_ginfo_malloc_dylibloader_wrapper_asound)( snd_timer_ginfo_t**);
+void (*snd_timer_ginfo_free_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+void (*snd_timer_ginfo_copy_dylibloader_wrapper_asound)( snd_timer_ginfo_t*,const snd_timer_ginfo_t*);
+int (*snd_timer_ginfo_set_tid_dylibloader_wrapper_asound)( snd_timer_ginfo_t*, snd_timer_id_t*);
+snd_timer_id_t* (*snd_timer_ginfo_get_tid_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+unsigned int (*snd_timer_ginfo_get_flags_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+int (*snd_timer_ginfo_get_card_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+char* (*snd_timer_ginfo_get_id_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+char* (*snd_timer_ginfo_get_name_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+unsigned long (*snd_timer_ginfo_get_resolution_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+unsigned long (*snd_timer_ginfo_get_resolution_min_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+unsigned long (*snd_timer_ginfo_get_resolution_max_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+unsigned int (*snd_timer_ginfo_get_clients_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+size_t (*snd_timer_info_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_timer_info_malloc_dylibloader_wrapper_asound)( snd_timer_info_t**);
+void (*snd_timer_info_free_dylibloader_wrapper_asound)( snd_timer_info_t*);
+void (*snd_timer_info_copy_dylibloader_wrapper_asound)( snd_timer_info_t*,const snd_timer_info_t*);
+int (*snd_timer_info_is_slave_dylibloader_wrapper_asound)( snd_timer_info_t*);
+int (*snd_timer_info_get_card_dylibloader_wrapper_asound)( snd_timer_info_t*);
+const char* (*snd_timer_info_get_id_dylibloader_wrapper_asound)( snd_timer_info_t*);
+const char* (*snd_timer_info_get_name_dylibloader_wrapper_asound)( snd_timer_info_t*);
+long (*snd_timer_info_get_resolution_dylibloader_wrapper_asound)( snd_timer_info_t*);
+size_t (*snd_timer_params_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_timer_params_malloc_dylibloader_wrapper_asound)( snd_timer_params_t**);
+void (*snd_timer_params_free_dylibloader_wrapper_asound)( snd_timer_params_t*);
+void (*snd_timer_params_copy_dylibloader_wrapper_asound)( snd_timer_params_t*,const snd_timer_params_t*);
+int (*snd_timer_params_set_auto_start_dylibloader_wrapper_asound)( snd_timer_params_t*, int);
+int (*snd_timer_params_get_auto_start_dylibloader_wrapper_asound)( snd_timer_params_t*);
+int (*snd_timer_params_set_exclusive_dylibloader_wrapper_asound)( snd_timer_params_t*, int);
+int (*snd_timer_params_get_exclusive_dylibloader_wrapper_asound)( snd_timer_params_t*);
+int (*snd_timer_params_set_early_event_dylibloader_wrapper_asound)( snd_timer_params_t*, int);
+int (*snd_timer_params_get_early_event_dylibloader_wrapper_asound)( snd_timer_params_t*);
+void (*snd_timer_params_set_ticks_dylibloader_wrapper_asound)( snd_timer_params_t*, long);
+long (*snd_timer_params_get_ticks_dylibloader_wrapper_asound)( snd_timer_params_t*);
+void (*snd_timer_params_set_queue_size_dylibloader_wrapper_asound)( snd_timer_params_t*, long);
+long (*snd_timer_params_get_queue_size_dylibloader_wrapper_asound)( snd_timer_params_t*);
+void (*snd_timer_params_set_filter_dylibloader_wrapper_asound)( snd_timer_params_t*, unsigned int);
+unsigned int (*snd_timer_params_get_filter_dylibloader_wrapper_asound)( snd_timer_params_t*);
+size_t (*snd_timer_status_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_timer_status_malloc_dylibloader_wrapper_asound)( snd_timer_status_t**);
+void (*snd_timer_status_free_dylibloader_wrapper_asound)( snd_timer_status_t*);
+void (*snd_timer_status_copy_dylibloader_wrapper_asound)( snd_timer_status_t*,const snd_timer_status_t*);
+snd_htimestamp_t (*snd_timer_status_get_timestamp_dylibloader_wrapper_asound)( snd_timer_status_t*);
+long (*snd_timer_status_get_resolution_dylibloader_wrapper_asound)( snd_timer_status_t*);
+long (*snd_timer_status_get_lost_dylibloader_wrapper_asound)( snd_timer_status_t*);
+long (*snd_timer_status_get_overrun_dylibloader_wrapper_asound)( snd_timer_status_t*);
+long (*snd_timer_status_get_queue_dylibloader_wrapper_asound)( snd_timer_status_t*);
+long (*snd_timer_info_get_ticks_dylibloader_wrapper_asound)( snd_timer_info_t*);
+int (*snd_hwdep_open_dylibloader_wrapper_asound)( snd_hwdep_t**,const char*, int);
+int (*snd_hwdep_close_dylibloader_wrapper_asound)( snd_hwdep_t*);
+int (*snd_hwdep_poll_descriptors_dylibloader_wrapper_asound)( snd_hwdep_t*,struct pollfd*, unsigned int);
+int (*snd_hwdep_poll_descriptors_count_dylibloader_wrapper_asound)( snd_hwdep_t*);
+int (*snd_hwdep_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_hwdep_t*,struct pollfd*, unsigned int, unsigned short*);
+int (*snd_hwdep_nonblock_dylibloader_wrapper_asound)( snd_hwdep_t*, int);
+int (*snd_hwdep_info_dylibloader_wrapper_asound)( snd_hwdep_t*, snd_hwdep_info_t*);
+int (*snd_hwdep_dsp_status_dylibloader_wrapper_asound)( snd_hwdep_t*, snd_hwdep_dsp_status_t*);
+int (*snd_hwdep_dsp_load_dylibloader_wrapper_asound)( snd_hwdep_t*, snd_hwdep_dsp_image_t*);
+int (*snd_hwdep_ioctl_dylibloader_wrapper_asound)( snd_hwdep_t*, unsigned int, void*);
+ssize_t (*snd_hwdep_write_dylibloader_wrapper_asound)( snd_hwdep_t*,const void*, size_t);
+ssize_t (*snd_hwdep_read_dylibloader_wrapper_asound)( snd_hwdep_t*, void*, size_t);
+size_t (*snd_hwdep_info_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_hwdep_info_malloc_dylibloader_wrapper_asound)( snd_hwdep_info_t**);
+void (*snd_hwdep_info_free_dylibloader_wrapper_asound)( snd_hwdep_info_t*);
+void (*snd_hwdep_info_copy_dylibloader_wrapper_asound)( snd_hwdep_info_t*,const snd_hwdep_info_t*);
+unsigned int (*snd_hwdep_info_get_device_dylibloader_wrapper_asound)(const snd_hwdep_info_t*);
+int (*snd_hwdep_info_get_card_dylibloader_wrapper_asound)(const snd_hwdep_info_t*);
+const char* (*snd_hwdep_info_get_id_dylibloader_wrapper_asound)(const snd_hwdep_info_t*);
+const char* (*snd_hwdep_info_get_name_dylibloader_wrapper_asound)(const snd_hwdep_info_t*);
+snd_hwdep_iface_t (*snd_hwdep_info_get_iface_dylibloader_wrapper_asound)(const snd_hwdep_info_t*);
+void (*snd_hwdep_info_set_device_dylibloader_wrapper_asound)( snd_hwdep_info_t*, unsigned int);
+size_t (*snd_hwdep_dsp_status_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_hwdep_dsp_status_malloc_dylibloader_wrapper_asound)( snd_hwdep_dsp_status_t**);
+void (*snd_hwdep_dsp_status_free_dylibloader_wrapper_asound)( snd_hwdep_dsp_status_t*);
+void (*snd_hwdep_dsp_status_copy_dylibloader_wrapper_asound)( snd_hwdep_dsp_status_t*,const snd_hwdep_dsp_status_t*);
+unsigned int (*snd_hwdep_dsp_status_get_version_dylibloader_wrapper_asound)(const snd_hwdep_dsp_status_t*);
+const char* (*snd_hwdep_dsp_status_get_id_dylibloader_wrapper_asound)(const snd_hwdep_dsp_status_t*);
+unsigned int (*snd_hwdep_dsp_status_get_num_dsps_dylibloader_wrapper_asound)(const snd_hwdep_dsp_status_t*);
+unsigned int (*snd_hwdep_dsp_status_get_dsp_loaded_dylibloader_wrapper_asound)(const snd_hwdep_dsp_status_t*);
+unsigned int (*snd_hwdep_dsp_status_get_chip_ready_dylibloader_wrapper_asound)(const snd_hwdep_dsp_status_t*);
+size_t (*snd_hwdep_dsp_image_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_hwdep_dsp_image_malloc_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t**);
+void (*snd_hwdep_dsp_image_free_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*);
+void (*snd_hwdep_dsp_image_copy_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*,const snd_hwdep_dsp_image_t*);
+unsigned int (*snd_hwdep_dsp_image_get_index_dylibloader_wrapper_asound)(const snd_hwdep_dsp_image_t*);
+const char* (*snd_hwdep_dsp_image_get_name_dylibloader_wrapper_asound)(const snd_hwdep_dsp_image_t*);
+const void* (*snd_hwdep_dsp_image_get_image_dylibloader_wrapper_asound)(const snd_hwdep_dsp_image_t*);
+size_t (*snd_hwdep_dsp_image_get_length_dylibloader_wrapper_asound)(const snd_hwdep_dsp_image_t*);
+void (*snd_hwdep_dsp_image_set_index_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*, unsigned int);
+void (*snd_hwdep_dsp_image_set_name_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*,const char*);
+void (*snd_hwdep_dsp_image_set_image_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*, void*);
+void (*snd_hwdep_dsp_image_set_length_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*, size_t);
+int (*snd_card_load_dylibloader_wrapper_asound)( int);
+int (*snd_card_next_dylibloader_wrapper_asound)( int*);
+int (*snd_card_get_index_dylibloader_wrapper_asound)(const char*);
+int (*snd_card_get_name_dylibloader_wrapper_asound)( int, char**);
+int (*snd_card_get_longname_dylibloader_wrapper_asound)( int, char**);
+int (*snd_device_name_hint_dylibloader_wrapper_asound)( int,const char*, void***);
+int (*snd_device_name_free_hint_dylibloader_wrapper_asound)( void**);
+char* (*snd_device_name_get_hint_dylibloader_wrapper_asound)(const void*,const char*);
+int (*snd_ctl_open_dylibloader_wrapper_asound)( snd_ctl_t**,const char*, int);
+int (*snd_ctl_open_lconf_dylibloader_wrapper_asound)( snd_ctl_t**,const char*, int, snd_config_t*);
+int (*snd_ctl_open_fallback_dylibloader_wrapper_asound)( snd_ctl_t**, snd_config_t*,const char*,const char*, int);
+int (*snd_ctl_close_dylibloader_wrapper_asound)( snd_ctl_t*);
+int (*snd_ctl_nonblock_dylibloader_wrapper_asound)( snd_ctl_t*, int);
+int (*snd_async_add_ctl_handler_dylibloader_wrapper_asound)( snd_async_handler_t**, snd_ctl_t*, snd_async_callback_t, void*);
+snd_ctl_t* (*snd_async_handler_get_ctl_dylibloader_wrapper_asound)( snd_async_handler_t*);
+int (*snd_ctl_poll_descriptors_count_dylibloader_wrapper_asound)( snd_ctl_t*);
+int (*snd_ctl_poll_descriptors_dylibloader_wrapper_asound)( snd_ctl_t*,struct pollfd*, unsigned int);
+int (*snd_ctl_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_ctl_t*,struct pollfd*, unsigned int, unsigned short*);
+int (*snd_ctl_subscribe_events_dylibloader_wrapper_asound)( snd_ctl_t*, int);
+int (*snd_ctl_card_info_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_card_info_t*);
+int (*snd_ctl_elem_list_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_list_t*);
+int (*snd_ctl_elem_info_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_read_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_value_t*);
+int (*snd_ctl_elem_write_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_value_t*);
+int (*snd_ctl_elem_lock_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_id_t*);
+int (*snd_ctl_elem_unlock_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_id_t*);
+int (*snd_ctl_elem_tlv_read_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, unsigned int*, unsigned int);
+int (*snd_ctl_elem_tlv_write_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*,const unsigned int*);
+int (*snd_ctl_elem_tlv_command_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*,const unsigned int*);
+int (*snd_ctl_hwdep_next_device_dylibloader_wrapper_asound)( snd_ctl_t*, int*);
+int (*snd_ctl_hwdep_info_dylibloader_wrapper_asound)( snd_ctl_t*, snd_hwdep_info_t*);
+int (*snd_ctl_pcm_next_device_dylibloader_wrapper_asound)( snd_ctl_t*, int*);
+int (*snd_ctl_pcm_info_dylibloader_wrapper_asound)( snd_ctl_t*, snd_pcm_info_t*);
+int (*snd_ctl_pcm_prefer_subdevice_dylibloader_wrapper_asound)( snd_ctl_t*, int);
+int (*snd_ctl_rawmidi_next_device_dylibloader_wrapper_asound)( snd_ctl_t*, int*);
+int (*snd_ctl_rawmidi_info_dylibloader_wrapper_asound)( snd_ctl_t*, snd_rawmidi_info_t*);
+int (*snd_ctl_rawmidi_prefer_subdevice_dylibloader_wrapper_asound)( snd_ctl_t*, int);
+int (*snd_ctl_set_power_state_dylibloader_wrapper_asound)( snd_ctl_t*, unsigned int);
+int (*snd_ctl_get_power_state_dylibloader_wrapper_asound)( snd_ctl_t*, unsigned int*);
+int (*snd_ctl_read_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_event_t*);
+int (*snd_ctl_wait_dylibloader_wrapper_asound)( snd_ctl_t*, int);
+const char* (*snd_ctl_name_dylibloader_wrapper_asound)( snd_ctl_t*);
+snd_ctl_type_t (*snd_ctl_type_dylibloader_wrapper_asound)( snd_ctl_t*);
+const char* (*snd_ctl_elem_type_name_dylibloader_wrapper_asound)( snd_ctl_elem_type_t);
+const char* (*snd_ctl_elem_iface_name_dylibloader_wrapper_asound)( snd_ctl_elem_iface_t);
+const char* (*snd_ctl_event_type_name_dylibloader_wrapper_asound)( snd_ctl_event_type_t);
+unsigned int (*snd_ctl_event_elem_get_mask_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+unsigned int (*snd_ctl_event_elem_get_numid_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+void (*snd_ctl_event_elem_get_id_dylibloader_wrapper_asound)(const snd_ctl_event_t*, snd_ctl_elem_id_t*);
+snd_ctl_elem_iface_t (*snd_ctl_event_elem_get_interface_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+unsigned int (*snd_ctl_event_elem_get_device_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+unsigned int (*snd_ctl_event_elem_get_subdevice_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+const char* (*snd_ctl_event_elem_get_name_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+unsigned int (*snd_ctl_event_elem_get_index_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+int (*snd_ctl_elem_list_alloc_space_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*, unsigned int);
+void (*snd_ctl_elem_list_free_space_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*);
+char* (*snd_ctl_ascii_elem_id_get_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*);
+int (*snd_ctl_ascii_elem_id_parse_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*,const char*);
+int (*snd_ctl_ascii_value_parse_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_value_t*, snd_ctl_elem_info_t*,const char*);
+size_t (*snd_ctl_elem_id_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_ctl_elem_id_malloc_dylibloader_wrapper_asound)( snd_ctl_elem_id_t**);
+void (*snd_ctl_elem_id_free_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*);
+void (*snd_ctl_elem_id_clear_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*);
+void (*snd_ctl_elem_id_copy_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*,const snd_ctl_elem_id_t*);
+unsigned int (*snd_ctl_elem_id_get_numid_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+snd_ctl_elem_iface_t (*snd_ctl_elem_id_get_interface_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+unsigned int (*snd_ctl_elem_id_get_device_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+unsigned int (*snd_ctl_elem_id_get_subdevice_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+const char* (*snd_ctl_elem_id_get_name_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+unsigned int (*snd_ctl_elem_id_get_index_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+void (*snd_ctl_elem_id_set_numid_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*, unsigned int);
+void (*snd_ctl_elem_id_set_interface_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*, snd_ctl_elem_iface_t);
+void (*snd_ctl_elem_id_set_device_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*, unsigned int);
+void (*snd_ctl_elem_id_set_subdevice_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*, unsigned int);
+void (*snd_ctl_elem_id_set_name_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*,const char*);
+void (*snd_ctl_elem_id_set_index_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*, unsigned int);
+size_t (*snd_ctl_card_info_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_ctl_card_info_malloc_dylibloader_wrapper_asound)( snd_ctl_card_info_t**);
+void (*snd_ctl_card_info_free_dylibloader_wrapper_asound)( snd_ctl_card_info_t*);
+void (*snd_ctl_card_info_clear_dylibloader_wrapper_asound)( snd_ctl_card_info_t*);
+void (*snd_ctl_card_info_copy_dylibloader_wrapper_asound)( snd_ctl_card_info_t*,const snd_ctl_card_info_t*);
+int (*snd_ctl_card_info_get_card_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+const char* (*snd_ctl_card_info_get_id_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+const char* (*snd_ctl_card_info_get_driver_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+const char* (*snd_ctl_card_info_get_name_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+const char* (*snd_ctl_card_info_get_longname_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+const char* (*snd_ctl_card_info_get_mixername_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+const char* (*snd_ctl_card_info_get_components_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+size_t (*snd_ctl_event_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_ctl_event_malloc_dylibloader_wrapper_asound)( snd_ctl_event_t**);
+void (*snd_ctl_event_free_dylibloader_wrapper_asound)( snd_ctl_event_t*);
+void (*snd_ctl_event_clear_dylibloader_wrapper_asound)( snd_ctl_event_t*);
+void (*snd_ctl_event_copy_dylibloader_wrapper_asound)( snd_ctl_event_t*,const snd_ctl_event_t*);
+snd_ctl_event_type_t (*snd_ctl_event_get_type_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+size_t (*snd_ctl_elem_list_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_ctl_elem_list_malloc_dylibloader_wrapper_asound)( snd_ctl_elem_list_t**);
+void (*snd_ctl_elem_list_free_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*);
+void (*snd_ctl_elem_list_clear_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*);
+void (*snd_ctl_elem_list_copy_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*,const snd_ctl_elem_list_t*);
+void (*snd_ctl_elem_list_set_offset_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*, unsigned int);
+unsigned int (*snd_ctl_elem_list_get_used_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*);
+unsigned int (*snd_ctl_elem_list_get_count_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*);
+void (*snd_ctl_elem_list_get_id_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int, snd_ctl_elem_id_t*);
+unsigned int (*snd_ctl_elem_list_get_numid_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+snd_ctl_elem_iface_t (*snd_ctl_elem_list_get_interface_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+unsigned int (*snd_ctl_elem_list_get_device_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+unsigned int (*snd_ctl_elem_list_get_subdevice_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+const char* (*snd_ctl_elem_list_get_name_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+unsigned int (*snd_ctl_elem_list_get_index_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+size_t (*snd_ctl_elem_info_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_ctl_elem_info_malloc_dylibloader_wrapper_asound)( snd_ctl_elem_info_t**);
+void (*snd_ctl_elem_info_free_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*);
+void (*snd_ctl_elem_info_clear_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*);
+void (*snd_ctl_elem_info_copy_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*,const snd_ctl_elem_info_t*);
+snd_ctl_elem_type_t (*snd_ctl_elem_info_get_type_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_is_readable_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_is_writable_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_is_volatile_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_is_inactive_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_is_locked_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_is_tlv_readable_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_is_tlv_writable_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_is_tlv_commandable_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_is_owner_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_is_user_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+pid_t (*snd_ctl_elem_info_get_owner_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+unsigned int (*snd_ctl_elem_info_get_count_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+long (*snd_ctl_elem_info_get_min_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+long (*snd_ctl_elem_info_get_max_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+long (*snd_ctl_elem_info_get_step_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+long long (*snd_ctl_elem_info_get_min64_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+long long (*snd_ctl_elem_info_get_max64_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+long long (*snd_ctl_elem_info_get_step64_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+unsigned int (*snd_ctl_elem_info_get_items_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+void (*snd_ctl_elem_info_set_item_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, unsigned int);
+const char* (*snd_ctl_elem_info_get_item_name_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_get_dimensions_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+int (*snd_ctl_elem_info_get_dimension_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*, unsigned int);
+int (*snd_ctl_elem_info_set_dimension_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*,const int [4]);
+void (*snd_ctl_elem_info_get_id_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*, snd_ctl_elem_id_t*);
+unsigned int (*snd_ctl_elem_info_get_numid_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+snd_ctl_elem_iface_t (*snd_ctl_elem_info_get_interface_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+unsigned int (*snd_ctl_elem_info_get_device_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+unsigned int (*snd_ctl_elem_info_get_subdevice_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+const char* (*snd_ctl_elem_info_get_name_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+unsigned int (*snd_ctl_elem_info_get_index_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+void (*snd_ctl_elem_info_set_id_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*,const snd_ctl_elem_id_t*);
+void (*snd_ctl_elem_info_set_numid_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, unsigned int);
+void (*snd_ctl_elem_info_set_interface_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, snd_ctl_elem_iface_t);
+void (*snd_ctl_elem_info_set_device_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, unsigned int);
+void (*snd_ctl_elem_info_set_subdevice_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, unsigned int);
+void (*snd_ctl_elem_info_set_name_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*,const char*);
+void (*snd_ctl_elem_info_set_index_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, unsigned int);
+int (*snd_ctl_add_integer_elem_set_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*, unsigned int, unsigned int, long, long, long);
+int (*snd_ctl_add_integer64_elem_set_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*, unsigned int, unsigned int, long long, long long, long long);
+int (*snd_ctl_add_boolean_elem_set_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*, unsigned int, unsigned int);
+int (*snd_ctl_add_enumerated_elem_set_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*, unsigned int, unsigned int, unsigned int,const char* []);
+int (*snd_ctl_add_bytes_elem_set_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*, unsigned int, unsigned int);
+int (*snd_ctl_elem_add_integer_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, unsigned int, long, long, long);
+int (*snd_ctl_elem_add_integer64_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, unsigned int, long long, long long, long long);
+int (*snd_ctl_elem_add_boolean_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, unsigned int);
+int (*snd_ctl_elem_add_enumerated_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, unsigned int, unsigned int,const char* []);
+int (*snd_ctl_elem_add_iec958_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*);
+int (*snd_ctl_elem_remove_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_id_t*);
+size_t (*snd_ctl_elem_value_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_ctl_elem_value_malloc_dylibloader_wrapper_asound)( snd_ctl_elem_value_t**);
+void (*snd_ctl_elem_value_free_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*);
+void (*snd_ctl_elem_value_clear_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*);
+void (*snd_ctl_elem_value_copy_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*,const snd_ctl_elem_value_t*);
+int (*snd_ctl_elem_value_compare_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*,const snd_ctl_elem_value_t*);
+void (*snd_ctl_elem_value_get_id_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, snd_ctl_elem_id_t*);
+unsigned int (*snd_ctl_elem_value_get_numid_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+snd_ctl_elem_iface_t (*snd_ctl_elem_value_get_interface_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+unsigned int (*snd_ctl_elem_value_get_device_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+unsigned int (*snd_ctl_elem_value_get_subdevice_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+const char* (*snd_ctl_elem_value_get_name_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+unsigned int (*snd_ctl_elem_value_get_index_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+void (*snd_ctl_elem_value_set_id_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*,const snd_ctl_elem_id_t*);
+void (*snd_ctl_elem_value_set_numid_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int);
+void (*snd_ctl_elem_value_set_interface_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, snd_ctl_elem_iface_t);
+void (*snd_ctl_elem_value_set_device_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int);
+void (*snd_ctl_elem_value_set_subdevice_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int);
+void (*snd_ctl_elem_value_set_name_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*,const char*);
+void (*snd_ctl_elem_value_set_index_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int);
+int (*snd_ctl_elem_value_get_boolean_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, unsigned int);
+long (*snd_ctl_elem_value_get_integer_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, unsigned int);
+long long (*snd_ctl_elem_value_get_integer64_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, unsigned int);
+unsigned int (*snd_ctl_elem_value_get_enumerated_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, unsigned int);
+unsigned char (*snd_ctl_elem_value_get_byte_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, unsigned int);
+void (*snd_ctl_elem_value_set_boolean_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int, long);
+void (*snd_ctl_elem_value_set_integer_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int, long);
+void (*snd_ctl_elem_value_set_integer64_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int, long long);
+void (*snd_ctl_elem_value_set_enumerated_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int, unsigned int);
+void (*snd_ctl_elem_value_set_byte_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int, unsigned char);
+void (*snd_ctl_elem_set_bytes_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, void*, size_t);
+const void* (*snd_ctl_elem_value_get_bytes_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+void (*snd_ctl_elem_value_get_iec958_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, snd_aes_iec958_t*);
+void (*snd_ctl_elem_value_set_iec958_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*,const snd_aes_iec958_t*);
+int (*snd_tlv_parse_dB_info_dylibloader_wrapper_asound)( unsigned int*, unsigned int, unsigned int**);
+int (*snd_tlv_get_dB_range_dylibloader_wrapper_asound)( unsigned int*, long, long, long*, long*);
+int (*snd_tlv_convert_to_dB_dylibloader_wrapper_asound)( unsigned int*, long, long, long, long*);
+int (*snd_tlv_convert_from_dB_dylibloader_wrapper_asound)( unsigned int*, long, long, long, long*, int);
+int (*snd_ctl_get_dB_range_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, long*, long*);
+int (*snd_ctl_convert_to_dB_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, long, long*);
+int (*snd_ctl_convert_from_dB_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, long, long*, int);
+int (*snd_hctl_compare_fast_dylibloader_wrapper_asound)(const snd_hctl_elem_t*,const snd_hctl_elem_t*);
+int (*snd_hctl_open_dylibloader_wrapper_asound)( snd_hctl_t**,const char*, int);
+int (*snd_hctl_open_ctl_dylibloader_wrapper_asound)( snd_hctl_t**, snd_ctl_t*);
+int (*snd_hctl_close_dylibloader_wrapper_asound)( snd_hctl_t*);
+int (*snd_hctl_nonblock_dylibloader_wrapper_asound)( snd_hctl_t*, int);
+int (*snd_hctl_poll_descriptors_count_dylibloader_wrapper_asound)( snd_hctl_t*);
+int (*snd_hctl_poll_descriptors_dylibloader_wrapper_asound)( snd_hctl_t*,struct pollfd*, unsigned int);
+int (*snd_hctl_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_hctl_t*,struct pollfd*, unsigned int, unsigned short*);
+unsigned int (*snd_hctl_get_count_dylibloader_wrapper_asound)( snd_hctl_t*);
+int (*snd_hctl_set_compare_dylibloader_wrapper_asound)( snd_hctl_t*, snd_hctl_compare_t);
+snd_hctl_elem_t* (*snd_hctl_first_elem_dylibloader_wrapper_asound)( snd_hctl_t*);
+snd_hctl_elem_t* (*snd_hctl_last_elem_dylibloader_wrapper_asound)( snd_hctl_t*);
+snd_hctl_elem_t* (*snd_hctl_find_elem_dylibloader_wrapper_asound)( snd_hctl_t*,const snd_ctl_elem_id_t*);
+void (*snd_hctl_set_callback_dylibloader_wrapper_asound)( snd_hctl_t*, snd_hctl_callback_t);
+void (*snd_hctl_set_callback_private_dylibloader_wrapper_asound)( snd_hctl_t*, void*);
+void* (*snd_hctl_get_callback_private_dylibloader_wrapper_asound)( snd_hctl_t*);
+int (*snd_hctl_load_dylibloader_wrapper_asound)( snd_hctl_t*);
+int (*snd_hctl_free_dylibloader_wrapper_asound)( snd_hctl_t*);
+int (*snd_hctl_handle_events_dylibloader_wrapper_asound)( snd_hctl_t*);
+const char* (*snd_hctl_name_dylibloader_wrapper_asound)( snd_hctl_t*);
+int (*snd_hctl_wait_dylibloader_wrapper_asound)( snd_hctl_t*, int);
+snd_ctl_t* (*snd_hctl_ctl_dylibloader_wrapper_asound)( snd_hctl_t*);
+snd_hctl_elem_t* (*snd_hctl_elem_next_dylibloader_wrapper_asound)( snd_hctl_elem_t*);
+snd_hctl_elem_t* (*snd_hctl_elem_prev_dylibloader_wrapper_asound)( snd_hctl_elem_t*);
+int (*snd_hctl_elem_info_dylibloader_wrapper_asound)( snd_hctl_elem_t*, snd_ctl_elem_info_t*);
+int (*snd_hctl_elem_read_dylibloader_wrapper_asound)( snd_hctl_elem_t*, snd_ctl_elem_value_t*);
+int (*snd_hctl_elem_write_dylibloader_wrapper_asound)( snd_hctl_elem_t*, snd_ctl_elem_value_t*);
+int (*snd_hctl_elem_tlv_read_dylibloader_wrapper_asound)( snd_hctl_elem_t*, unsigned int*, unsigned int);
+int (*snd_hctl_elem_tlv_write_dylibloader_wrapper_asound)( snd_hctl_elem_t*,const unsigned int*);
+int (*snd_hctl_elem_tlv_command_dylibloader_wrapper_asound)( snd_hctl_elem_t*,const unsigned int*);
+snd_hctl_t* (*snd_hctl_elem_get_hctl_dylibloader_wrapper_asound)( snd_hctl_elem_t*);
+void (*snd_hctl_elem_get_id_dylibloader_wrapper_asound)(const snd_hctl_elem_t*, snd_ctl_elem_id_t*);
+unsigned int (*snd_hctl_elem_get_numid_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+snd_ctl_elem_iface_t (*snd_hctl_elem_get_interface_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+unsigned int (*snd_hctl_elem_get_device_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+unsigned int (*snd_hctl_elem_get_subdevice_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+const char* (*snd_hctl_elem_get_name_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+unsigned int (*snd_hctl_elem_get_index_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+void (*snd_hctl_elem_set_callback_dylibloader_wrapper_asound)( snd_hctl_elem_t*, snd_hctl_elem_callback_t);
+void* (*snd_hctl_elem_get_callback_private_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+void (*snd_hctl_elem_set_callback_private_dylibloader_wrapper_asound)( snd_hctl_elem_t*, void*);
+int (*snd_sctl_build_dylibloader_wrapper_asound)( snd_sctl_t**, snd_ctl_t*, snd_config_t*, snd_config_t*, int);
+int (*snd_sctl_free_dylibloader_wrapper_asound)( snd_sctl_t*);
+int (*snd_sctl_install_dylibloader_wrapper_asound)( snd_sctl_t*);
+int (*snd_sctl_remove_dylibloader_wrapper_asound)( snd_sctl_t*);
+int (*snd_mixer_open_dylibloader_wrapper_asound)( snd_mixer_t**, int);
+int (*snd_mixer_close_dylibloader_wrapper_asound)( snd_mixer_t*);
+snd_mixer_elem_t* (*snd_mixer_first_elem_dylibloader_wrapper_asound)( snd_mixer_t*);
+snd_mixer_elem_t* (*snd_mixer_last_elem_dylibloader_wrapper_asound)( snd_mixer_t*);
+int (*snd_mixer_handle_events_dylibloader_wrapper_asound)( snd_mixer_t*);
+int (*snd_mixer_attach_dylibloader_wrapper_asound)( snd_mixer_t*,const char*);
+int (*snd_mixer_attach_hctl_dylibloader_wrapper_asound)( snd_mixer_t*, snd_hctl_t*);
+int (*snd_mixer_detach_dylibloader_wrapper_asound)( snd_mixer_t*,const char*);
+int (*snd_mixer_detach_hctl_dylibloader_wrapper_asound)( snd_mixer_t*, snd_hctl_t*);
+int (*snd_mixer_get_hctl_dylibloader_wrapper_asound)( snd_mixer_t*,const char*, snd_hctl_t**);
+int (*snd_mixer_poll_descriptors_count_dylibloader_wrapper_asound)( snd_mixer_t*);
+int (*snd_mixer_poll_descriptors_dylibloader_wrapper_asound)( snd_mixer_t*,struct pollfd*, unsigned int);
+int (*snd_mixer_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_mixer_t*,struct pollfd*, unsigned int, unsigned short*);
+int (*snd_mixer_load_dylibloader_wrapper_asound)( snd_mixer_t*);
+void (*snd_mixer_free_dylibloader_wrapper_asound)( snd_mixer_t*);
+int (*snd_mixer_wait_dylibloader_wrapper_asound)( snd_mixer_t*, int);
+int (*snd_mixer_set_compare_dylibloader_wrapper_asound)( snd_mixer_t*, snd_mixer_compare_t);
+void (*snd_mixer_set_callback_dylibloader_wrapper_asound)( snd_mixer_t*, snd_mixer_callback_t);
+void* (*snd_mixer_get_callback_private_dylibloader_wrapper_asound)(const snd_mixer_t*);
+void (*snd_mixer_set_callback_private_dylibloader_wrapper_asound)( snd_mixer_t*, void*);
+unsigned int (*snd_mixer_get_count_dylibloader_wrapper_asound)(const snd_mixer_t*);
+int (*snd_mixer_class_unregister_dylibloader_wrapper_asound)( snd_mixer_class_t*);
+snd_mixer_elem_t* (*snd_mixer_elem_next_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+snd_mixer_elem_t* (*snd_mixer_elem_prev_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+void (*snd_mixer_elem_set_callback_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_elem_callback_t);
+void* (*snd_mixer_elem_get_callback_private_dylibloader_wrapper_asound)(const snd_mixer_elem_t*);
+void (*snd_mixer_elem_set_callback_private_dylibloader_wrapper_asound)( snd_mixer_elem_t*, void*);
+snd_mixer_elem_type_t (*snd_mixer_elem_get_type_dylibloader_wrapper_asound)(const snd_mixer_elem_t*);
+int (*snd_mixer_class_register_dylibloader_wrapper_asound)( snd_mixer_class_t*, snd_mixer_t*);
+int (*snd_mixer_elem_new_dylibloader_wrapper_asound)( snd_mixer_elem_t**, snd_mixer_elem_type_t, int, void*, void*);
+int (*snd_mixer_elem_add_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_class_t*);
+int (*snd_mixer_elem_remove_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+void (*snd_mixer_elem_free_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_elem_info_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_elem_value_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_elem_attach_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_hctl_elem_t*);
+int (*snd_mixer_elem_detach_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_hctl_elem_t*);
+int (*snd_mixer_elem_empty_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+void* (*snd_mixer_elem_get_private_dylibloader_wrapper_asound)(const snd_mixer_elem_t*);
+size_t (*snd_mixer_class_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_mixer_class_malloc_dylibloader_wrapper_asound)( snd_mixer_class_t**);
+void (*snd_mixer_class_free_dylibloader_wrapper_asound)( snd_mixer_class_t*);
+void (*snd_mixer_class_copy_dylibloader_wrapper_asound)( snd_mixer_class_t*,const snd_mixer_class_t*);
+snd_mixer_t* (*snd_mixer_class_get_mixer_dylibloader_wrapper_asound)(const snd_mixer_class_t*);
+snd_mixer_event_t (*snd_mixer_class_get_event_dylibloader_wrapper_asound)(const snd_mixer_class_t*);
+void* (*snd_mixer_class_get_private_dylibloader_wrapper_asound)(const snd_mixer_class_t*);
+snd_mixer_compare_t (*snd_mixer_class_get_compare_dylibloader_wrapper_asound)(const snd_mixer_class_t*);
+int (*snd_mixer_class_set_event_dylibloader_wrapper_asound)( snd_mixer_class_t*, snd_mixer_event_t);
+int (*snd_mixer_class_set_private_dylibloader_wrapper_asound)( snd_mixer_class_t*, void*);
+int (*snd_mixer_class_set_private_free_dylibloader_wrapper_asound)( snd_mixer_class_t*, void*);
+int (*snd_mixer_class_set_compare_dylibloader_wrapper_asound)( snd_mixer_class_t*, snd_mixer_compare_t);
+const char* (*snd_mixer_selem_channel_name_dylibloader_wrapper_asound)( snd_mixer_selem_channel_id_t);
+int (*snd_mixer_selem_register_dylibloader_wrapper_asound)( snd_mixer_t*,struct snd_mixer_selem_regopt*, snd_mixer_class_t**);
+void (*snd_mixer_selem_get_id_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_id_t*);
+const char* (*snd_mixer_selem_get_name_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+unsigned int (*snd_mixer_selem_get_index_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+snd_mixer_elem_t* (*snd_mixer_find_selem_dylibloader_wrapper_asound)( snd_mixer_t*,const snd_mixer_selem_id_t*);
+int (*snd_mixer_selem_is_active_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_is_playback_mono_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_playback_channel_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t);
+int (*snd_mixer_selem_is_capture_mono_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_capture_channel_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t);
+int (*snd_mixer_selem_get_capture_group_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_common_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_playback_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_playback_volume_joined_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_capture_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_capture_volume_joined_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_common_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_playback_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_playback_switch_joined_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_capture_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_capture_switch_joined_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_has_capture_switch_exclusive_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_ask_playback_vol_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, long*);
+int (*snd_mixer_selem_ask_capture_vol_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, long*);
+int (*snd_mixer_selem_ask_playback_dB_vol_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, int, long*);
+int (*snd_mixer_selem_ask_capture_dB_vol_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, int, long*);
+int (*snd_mixer_selem_get_playback_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long*);
+int (*snd_mixer_selem_get_capture_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long*);
+int (*snd_mixer_selem_get_playback_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long*);
+int (*snd_mixer_selem_get_capture_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long*);
+int (*snd_mixer_selem_get_playback_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, int*);
+int (*snd_mixer_selem_get_capture_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, int*);
+int (*snd_mixer_selem_set_playback_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long);
+int (*snd_mixer_selem_set_capture_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long);
+int (*snd_mixer_selem_set_playback_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long, int);
+int (*snd_mixer_selem_set_capture_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long, int);
+int (*snd_mixer_selem_set_playback_volume_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long);
+int (*snd_mixer_selem_set_capture_volume_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long);
+int (*snd_mixer_selem_set_playback_dB_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, int);
+int (*snd_mixer_selem_set_capture_dB_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, int);
+int (*snd_mixer_selem_set_playback_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, int);
+int (*snd_mixer_selem_set_capture_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, int);
+int (*snd_mixer_selem_set_playback_switch_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, int);
+int (*snd_mixer_selem_set_capture_switch_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, int);
+int (*snd_mixer_selem_get_playback_volume_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long*, long*);
+int (*snd_mixer_selem_get_playback_dB_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long*, long*);
+int (*snd_mixer_selem_set_playback_volume_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, long);
+int (*snd_mixer_selem_get_capture_volume_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long*, long*);
+int (*snd_mixer_selem_get_capture_dB_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long*, long*);
+int (*snd_mixer_selem_set_capture_volume_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, long);
+int (*snd_mixer_selem_is_enumerated_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_is_enum_playback_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_is_enum_capture_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_get_enum_items_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+int (*snd_mixer_selem_get_enum_item_name_dylibloader_wrapper_asound)( snd_mixer_elem_t*, unsigned int, size_t, char*);
+int (*snd_mixer_selem_get_enum_item_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, unsigned int*);
+int (*snd_mixer_selem_set_enum_item_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, unsigned int);
+size_t (*snd_mixer_selem_id_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_mixer_selem_id_malloc_dylibloader_wrapper_asound)( snd_mixer_selem_id_t**);
+void (*snd_mixer_selem_id_free_dylibloader_wrapper_asound)( snd_mixer_selem_id_t*);
+void (*snd_mixer_selem_id_copy_dylibloader_wrapper_asound)( snd_mixer_selem_id_t*,const snd_mixer_selem_id_t*);
+const char* (*snd_mixer_selem_id_get_name_dylibloader_wrapper_asound)(const snd_mixer_selem_id_t*);
+unsigned int (*snd_mixer_selem_id_get_index_dylibloader_wrapper_asound)(const snd_mixer_selem_id_t*);
+void (*snd_mixer_selem_id_set_name_dylibloader_wrapper_asound)( snd_mixer_selem_id_t*,const char*);
+void (*snd_mixer_selem_id_set_index_dylibloader_wrapper_asound)( snd_mixer_selem_id_t*, unsigned int);
+int (*snd_mixer_selem_id_parse_dylibloader_wrapper_asound)( snd_mixer_selem_id_t*,const char*);
+int (*snd_seq_open_dylibloader_wrapper_asound)( snd_seq_t**,const char*, int, int);
+int (*snd_seq_open_lconf_dylibloader_wrapper_asound)( snd_seq_t**,const char*, int, int, snd_config_t*);
+const char* (*snd_seq_name_dylibloader_wrapper_asound)( snd_seq_t*);
+snd_seq_type_t (*snd_seq_type_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_close_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_poll_descriptors_count_dylibloader_wrapper_asound)( snd_seq_t*, short);
+int (*snd_seq_poll_descriptors_dylibloader_wrapper_asound)( snd_seq_t*,struct pollfd*, unsigned int, short);
+int (*snd_seq_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_seq_t*,struct pollfd*, unsigned int, unsigned short*);
+int (*snd_seq_nonblock_dylibloader_wrapper_asound)( snd_seq_t*, int);
+int (*snd_seq_client_id_dylibloader_wrapper_asound)( snd_seq_t*);
+size_t (*snd_seq_get_output_buffer_size_dylibloader_wrapper_asound)( snd_seq_t*);
+size_t (*snd_seq_get_input_buffer_size_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_set_output_buffer_size_dylibloader_wrapper_asound)( snd_seq_t*, size_t);
+int (*snd_seq_set_input_buffer_size_dylibloader_wrapper_asound)( snd_seq_t*, size_t);
+size_t (*snd_seq_system_info_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_system_info_malloc_dylibloader_wrapper_asound)( snd_seq_system_info_t**);
+void (*snd_seq_system_info_free_dylibloader_wrapper_asound)( snd_seq_system_info_t*);
+void (*snd_seq_system_info_copy_dylibloader_wrapper_asound)( snd_seq_system_info_t*,const snd_seq_system_info_t*);
+int (*snd_seq_system_info_get_queues_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+int (*snd_seq_system_info_get_clients_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+int (*snd_seq_system_info_get_ports_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+int (*snd_seq_system_info_get_channels_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+int (*snd_seq_system_info_get_cur_clients_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+int (*snd_seq_system_info_get_cur_queues_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+int (*snd_seq_system_info_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_system_info_t*);
+size_t (*snd_seq_client_info_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_client_info_malloc_dylibloader_wrapper_asound)( snd_seq_client_info_t**);
+void (*snd_seq_client_info_free_dylibloader_wrapper_asound)( snd_seq_client_info_t*);
+void (*snd_seq_client_info_copy_dylibloader_wrapper_asound)( snd_seq_client_info_t*,const snd_seq_client_info_t*);
+int (*snd_seq_client_info_get_client_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+snd_seq_client_type_t (*snd_seq_client_info_get_type_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+const char* (*snd_seq_client_info_get_name_dylibloader_wrapper_asound)( snd_seq_client_info_t*);
+int (*snd_seq_client_info_get_broadcast_filter_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+int (*snd_seq_client_info_get_error_bounce_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+int (*snd_seq_client_info_get_card_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+int (*snd_seq_client_info_get_pid_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+const unsigned char* (*snd_seq_client_info_get_event_filter_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+int (*snd_seq_client_info_get_num_ports_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+int (*snd_seq_client_info_get_event_lost_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+void (*snd_seq_client_info_set_client_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+void (*snd_seq_client_info_set_name_dylibloader_wrapper_asound)( snd_seq_client_info_t*,const char*);
+void (*snd_seq_client_info_set_broadcast_filter_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+void (*snd_seq_client_info_set_error_bounce_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+void (*snd_seq_client_info_set_event_filter_dylibloader_wrapper_asound)( snd_seq_client_info_t*, unsigned char*);
+void (*snd_seq_client_info_event_filter_clear_dylibloader_wrapper_asound)( snd_seq_client_info_t*);
+void (*snd_seq_client_info_event_filter_add_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+void (*snd_seq_client_info_event_filter_del_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+int (*snd_seq_client_info_event_filter_check_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+int (*snd_seq_get_client_info_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_client_info_t*);
+int (*snd_seq_get_any_client_info_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_client_info_t*);
+int (*snd_seq_set_client_info_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_client_info_t*);
+int (*snd_seq_query_next_client_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_client_info_t*);
+size_t (*snd_seq_client_pool_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_client_pool_malloc_dylibloader_wrapper_asound)( snd_seq_client_pool_t**);
+void (*snd_seq_client_pool_free_dylibloader_wrapper_asound)( snd_seq_client_pool_t*);
+void (*snd_seq_client_pool_copy_dylibloader_wrapper_asound)( snd_seq_client_pool_t*,const snd_seq_client_pool_t*);
+int (*snd_seq_client_pool_get_client_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+size_t (*snd_seq_client_pool_get_output_pool_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+size_t (*snd_seq_client_pool_get_input_pool_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+size_t (*snd_seq_client_pool_get_output_room_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+size_t (*snd_seq_client_pool_get_output_free_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+size_t (*snd_seq_client_pool_get_input_free_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+void (*snd_seq_client_pool_set_output_pool_dylibloader_wrapper_asound)( snd_seq_client_pool_t*, size_t);
+void (*snd_seq_client_pool_set_input_pool_dylibloader_wrapper_asound)( snd_seq_client_pool_t*, size_t);
+void (*snd_seq_client_pool_set_output_room_dylibloader_wrapper_asound)( snd_seq_client_pool_t*, size_t);
+int (*snd_seq_get_client_pool_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_client_pool_t*);
+int (*snd_seq_set_client_pool_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_client_pool_t*);
+size_t (*snd_seq_port_info_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_port_info_malloc_dylibloader_wrapper_asound)( snd_seq_port_info_t**);
+void (*snd_seq_port_info_free_dylibloader_wrapper_asound)( snd_seq_port_info_t*);
+void (*snd_seq_port_info_copy_dylibloader_wrapper_asound)( snd_seq_port_info_t*,const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_client_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_port_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+const snd_seq_addr_t* (*snd_seq_port_info_get_addr_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+const char* (*snd_seq_port_info_get_name_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+unsigned int (*snd_seq_port_info_get_capability_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+unsigned int (*snd_seq_port_info_get_type_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_midi_channels_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_midi_voices_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_synth_voices_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_read_use_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_write_use_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_port_specified_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_timestamping_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_timestamp_real_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+int (*snd_seq_port_info_get_timestamp_queue_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+void (*snd_seq_port_info_set_client_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+void (*snd_seq_port_info_set_port_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+void (*snd_seq_port_info_set_addr_dylibloader_wrapper_asound)( snd_seq_port_info_t*,const snd_seq_addr_t*);
+void (*snd_seq_port_info_set_name_dylibloader_wrapper_asound)( snd_seq_port_info_t*,const char*);
+void (*snd_seq_port_info_set_capability_dylibloader_wrapper_asound)( snd_seq_port_info_t*, unsigned int);
+void (*snd_seq_port_info_set_type_dylibloader_wrapper_asound)( snd_seq_port_info_t*, unsigned int);
+void (*snd_seq_port_info_set_midi_channels_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+void (*snd_seq_port_info_set_midi_voices_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+void (*snd_seq_port_info_set_synth_voices_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+void (*snd_seq_port_info_set_port_specified_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+void (*snd_seq_port_info_set_timestamping_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+void (*snd_seq_port_info_set_timestamp_real_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+void (*snd_seq_port_info_set_timestamp_queue_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+int (*snd_seq_create_port_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_port_info_t*);
+int (*snd_seq_delete_port_dylibloader_wrapper_asound)( snd_seq_t*, int);
+int (*snd_seq_get_port_info_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_port_info_t*);
+int (*snd_seq_get_any_port_info_dylibloader_wrapper_asound)( snd_seq_t*, int, int, snd_seq_port_info_t*);
+int (*snd_seq_set_port_info_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_port_info_t*);
+int (*snd_seq_query_next_port_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_port_info_t*);
+size_t (*snd_seq_port_subscribe_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_port_subscribe_malloc_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t**);
+void (*snd_seq_port_subscribe_free_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*);
+void (*snd_seq_port_subscribe_copy_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*,const snd_seq_port_subscribe_t*);
+const snd_seq_addr_t* (*snd_seq_port_subscribe_get_sender_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+const snd_seq_addr_t* (*snd_seq_port_subscribe_get_dest_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+int (*snd_seq_port_subscribe_get_queue_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+int (*snd_seq_port_subscribe_get_exclusive_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+int (*snd_seq_port_subscribe_get_time_update_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+int (*snd_seq_port_subscribe_get_time_real_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+void (*snd_seq_port_subscribe_set_sender_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*,const snd_seq_addr_t*);
+void (*snd_seq_port_subscribe_set_dest_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*,const snd_seq_addr_t*);
+void (*snd_seq_port_subscribe_set_queue_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*, int);
+void (*snd_seq_port_subscribe_set_exclusive_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*, int);
+void (*snd_seq_port_subscribe_set_time_update_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*, int);
+void (*snd_seq_port_subscribe_set_time_real_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*, int);
+int (*snd_seq_get_port_subscription_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_port_subscribe_t*);
+int (*snd_seq_subscribe_port_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_port_subscribe_t*);
+int (*snd_seq_unsubscribe_port_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_port_subscribe_t*);
+size_t (*snd_seq_query_subscribe_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_query_subscribe_malloc_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t**);
+void (*snd_seq_query_subscribe_free_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*);
+void (*snd_seq_query_subscribe_copy_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*,const snd_seq_query_subscribe_t*);
+int (*snd_seq_query_subscribe_get_client_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+int (*snd_seq_query_subscribe_get_port_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+const snd_seq_addr_t* (*snd_seq_query_subscribe_get_root_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+snd_seq_query_subs_type_t (*snd_seq_query_subscribe_get_type_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+int (*snd_seq_query_subscribe_get_index_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+int (*snd_seq_query_subscribe_get_num_subs_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+const snd_seq_addr_t* (*snd_seq_query_subscribe_get_addr_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+int (*snd_seq_query_subscribe_get_queue_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+int (*snd_seq_query_subscribe_get_exclusive_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+int (*snd_seq_query_subscribe_get_time_update_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+int (*snd_seq_query_subscribe_get_time_real_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+void (*snd_seq_query_subscribe_set_client_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*, int);
+void (*snd_seq_query_subscribe_set_port_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*, int);
+void (*snd_seq_query_subscribe_set_root_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*,const snd_seq_addr_t*);
+void (*snd_seq_query_subscribe_set_type_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*, snd_seq_query_subs_type_t);
+void (*snd_seq_query_subscribe_set_index_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*, int);
+int (*snd_seq_query_port_subscribers_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_query_subscribe_t*);
+size_t (*snd_seq_queue_info_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_queue_info_malloc_dylibloader_wrapper_asound)( snd_seq_queue_info_t**);
+void (*snd_seq_queue_info_free_dylibloader_wrapper_asound)( snd_seq_queue_info_t*);
+void (*snd_seq_queue_info_copy_dylibloader_wrapper_asound)( snd_seq_queue_info_t*,const snd_seq_queue_info_t*);
+int (*snd_seq_queue_info_get_queue_dylibloader_wrapper_asound)(const snd_seq_queue_info_t*);
+const char* (*snd_seq_queue_info_get_name_dylibloader_wrapper_asound)(const snd_seq_queue_info_t*);
+int (*snd_seq_queue_info_get_owner_dylibloader_wrapper_asound)(const snd_seq_queue_info_t*);
+int (*snd_seq_queue_info_get_locked_dylibloader_wrapper_asound)(const snd_seq_queue_info_t*);
+unsigned int (*snd_seq_queue_info_get_flags_dylibloader_wrapper_asound)(const snd_seq_queue_info_t*);
+void (*snd_seq_queue_info_set_name_dylibloader_wrapper_asound)( snd_seq_queue_info_t*,const char*);
+void (*snd_seq_queue_info_set_owner_dylibloader_wrapper_asound)( snd_seq_queue_info_t*, int);
+void (*snd_seq_queue_info_set_locked_dylibloader_wrapper_asound)( snd_seq_queue_info_t*, int);
+void (*snd_seq_queue_info_set_flags_dylibloader_wrapper_asound)( snd_seq_queue_info_t*, unsigned int);
+int (*snd_seq_create_queue_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_queue_info_t*);
+int (*snd_seq_alloc_named_queue_dylibloader_wrapper_asound)( snd_seq_t*,const char*);
+int (*snd_seq_alloc_queue_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_free_queue_dylibloader_wrapper_asound)( snd_seq_t*, int);
+int (*snd_seq_get_queue_info_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_info_t*);
+int (*snd_seq_set_queue_info_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_info_t*);
+int (*snd_seq_query_named_queue_dylibloader_wrapper_asound)( snd_seq_t*,const char*);
+int (*snd_seq_get_queue_usage_dylibloader_wrapper_asound)( snd_seq_t*, int);
+int (*snd_seq_set_queue_usage_dylibloader_wrapper_asound)( snd_seq_t*, int, int);
+size_t (*snd_seq_queue_status_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_queue_status_malloc_dylibloader_wrapper_asound)( snd_seq_queue_status_t**);
+void (*snd_seq_queue_status_free_dylibloader_wrapper_asound)( snd_seq_queue_status_t*);
+void (*snd_seq_queue_status_copy_dylibloader_wrapper_asound)( snd_seq_queue_status_t*,const snd_seq_queue_status_t*);
+int (*snd_seq_queue_status_get_queue_dylibloader_wrapper_asound)(const snd_seq_queue_status_t*);
+int (*snd_seq_queue_status_get_events_dylibloader_wrapper_asound)(const snd_seq_queue_status_t*);
+snd_seq_tick_time_t (*snd_seq_queue_status_get_tick_time_dylibloader_wrapper_asound)(const snd_seq_queue_status_t*);
+const snd_seq_real_time_t* (*snd_seq_queue_status_get_real_time_dylibloader_wrapper_asound)(const snd_seq_queue_status_t*);
+unsigned int (*snd_seq_queue_status_get_status_dylibloader_wrapper_asound)(const snd_seq_queue_status_t*);
+int (*snd_seq_get_queue_status_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_status_t*);
+size_t (*snd_seq_queue_tempo_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_queue_tempo_malloc_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t**);
+void (*snd_seq_queue_tempo_free_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*);
+void (*snd_seq_queue_tempo_copy_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*,const snd_seq_queue_tempo_t*);
+int (*snd_seq_queue_tempo_get_queue_dylibloader_wrapper_asound)(const snd_seq_queue_tempo_t*);
+unsigned int (*snd_seq_queue_tempo_get_tempo_dylibloader_wrapper_asound)(const snd_seq_queue_tempo_t*);
+int (*snd_seq_queue_tempo_get_ppq_dylibloader_wrapper_asound)(const snd_seq_queue_tempo_t*);
+unsigned int (*snd_seq_queue_tempo_get_skew_dylibloader_wrapper_asound)(const snd_seq_queue_tempo_t*);
+unsigned int (*snd_seq_queue_tempo_get_skew_base_dylibloader_wrapper_asound)(const snd_seq_queue_tempo_t*);
+void (*snd_seq_queue_tempo_set_tempo_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*, unsigned int);
+void (*snd_seq_queue_tempo_set_ppq_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*, int);
+void (*snd_seq_queue_tempo_set_skew_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*, unsigned int);
+void (*snd_seq_queue_tempo_set_skew_base_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*, unsigned int);
+int (*snd_seq_get_queue_tempo_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_tempo_t*);
+int (*snd_seq_set_queue_tempo_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_tempo_t*);
+size_t (*snd_seq_queue_timer_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_queue_timer_malloc_dylibloader_wrapper_asound)( snd_seq_queue_timer_t**);
+void (*snd_seq_queue_timer_free_dylibloader_wrapper_asound)( snd_seq_queue_timer_t*);
+void (*snd_seq_queue_timer_copy_dylibloader_wrapper_asound)( snd_seq_queue_timer_t*,const snd_seq_queue_timer_t*);
+int (*snd_seq_queue_timer_get_queue_dylibloader_wrapper_asound)(const snd_seq_queue_timer_t*);
+snd_seq_queue_timer_type_t (*snd_seq_queue_timer_get_type_dylibloader_wrapper_asound)(const snd_seq_queue_timer_t*);
+const snd_timer_id_t* (*snd_seq_queue_timer_get_id_dylibloader_wrapper_asound)(const snd_seq_queue_timer_t*);
+unsigned int (*snd_seq_queue_timer_get_resolution_dylibloader_wrapper_asound)(const snd_seq_queue_timer_t*);
+void (*snd_seq_queue_timer_set_type_dylibloader_wrapper_asound)( snd_seq_queue_timer_t*, snd_seq_queue_timer_type_t);
+void (*snd_seq_queue_timer_set_id_dylibloader_wrapper_asound)( snd_seq_queue_timer_t*,const snd_timer_id_t*);
+void (*snd_seq_queue_timer_set_resolution_dylibloader_wrapper_asound)( snd_seq_queue_timer_t*, unsigned int);
+int (*snd_seq_get_queue_timer_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_timer_t*);
+int (*snd_seq_set_queue_timer_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_timer_t*);
+int (*snd_seq_free_event_dylibloader_wrapper_asound)( snd_seq_event_t*);
+ssize_t (*snd_seq_event_length_dylibloader_wrapper_asound)( snd_seq_event_t*);
+int (*snd_seq_event_output_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_event_t*);
+int (*snd_seq_event_output_buffer_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_event_t*);
+int (*snd_seq_event_output_direct_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_event_t*);
+int (*snd_seq_event_input_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_event_t**);
+int (*snd_seq_event_input_pending_dylibloader_wrapper_asound)( snd_seq_t*, int);
+int (*snd_seq_drain_output_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_event_output_pending_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_extract_output_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_event_t**);
+int (*snd_seq_drop_output_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_drop_output_buffer_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_drop_input_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_drop_input_buffer_dylibloader_wrapper_asound)( snd_seq_t*);
+size_t (*snd_seq_remove_events_sizeof_dylibloader_wrapper_asound)( void);
+int (*snd_seq_remove_events_malloc_dylibloader_wrapper_asound)( snd_seq_remove_events_t**);
+void (*snd_seq_remove_events_free_dylibloader_wrapper_asound)( snd_seq_remove_events_t*);
+void (*snd_seq_remove_events_copy_dylibloader_wrapper_asound)( snd_seq_remove_events_t*,const snd_seq_remove_events_t*);
+unsigned int (*snd_seq_remove_events_get_condition_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+int (*snd_seq_remove_events_get_queue_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+const snd_seq_timestamp_t* (*snd_seq_remove_events_get_time_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+const snd_seq_addr_t* (*snd_seq_remove_events_get_dest_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+int (*snd_seq_remove_events_get_channel_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+int (*snd_seq_remove_events_get_event_type_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+int (*snd_seq_remove_events_get_tag_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+void (*snd_seq_remove_events_set_condition_dylibloader_wrapper_asound)( snd_seq_remove_events_t*, unsigned int);
+void (*snd_seq_remove_events_set_queue_dylibloader_wrapper_asound)( snd_seq_remove_events_t*, int);
+void (*snd_seq_remove_events_set_time_dylibloader_wrapper_asound)( snd_seq_remove_events_t*,const snd_seq_timestamp_t*);
+void (*snd_seq_remove_events_set_dest_dylibloader_wrapper_asound)( snd_seq_remove_events_t*,const snd_seq_addr_t*);
+void (*snd_seq_remove_events_set_channel_dylibloader_wrapper_asound)( snd_seq_remove_events_t*, int);
+void (*snd_seq_remove_events_set_event_type_dylibloader_wrapper_asound)( snd_seq_remove_events_t*, int);
+void (*snd_seq_remove_events_set_tag_dylibloader_wrapper_asound)( snd_seq_remove_events_t*, int);
+int (*snd_seq_remove_events_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_remove_events_t*);
+void (*snd_seq_set_bit_dylibloader_wrapper_asound)( int, void*);
+void (*snd_seq_unset_bit_dylibloader_wrapper_asound)( int, void*);
+int (*snd_seq_change_bit_dylibloader_wrapper_asound)( int, void*);
+int (*snd_seq_get_bit_dylibloader_wrapper_asound)( int, void*);
+int (*snd_seq_control_queue_dylibloader_wrapper_asound)( snd_seq_t*, int, int, int, snd_seq_event_t*);
+int (*snd_seq_create_simple_port_dylibloader_wrapper_asound)( snd_seq_t*,const char*, unsigned int, unsigned int);
+int (*snd_seq_delete_simple_port_dylibloader_wrapper_asound)( snd_seq_t*, int);
+int (*snd_seq_connect_from_dylibloader_wrapper_asound)( snd_seq_t*, int, int, int);
+int (*snd_seq_connect_to_dylibloader_wrapper_asound)( snd_seq_t*, int, int, int);
+int (*snd_seq_disconnect_from_dylibloader_wrapper_asound)( snd_seq_t*, int, int, int);
+int (*snd_seq_disconnect_to_dylibloader_wrapper_asound)( snd_seq_t*, int, int, int);
+int (*snd_seq_set_client_name_dylibloader_wrapper_asound)( snd_seq_t*,const char*);
+int (*snd_seq_set_client_event_filter_dylibloader_wrapper_asound)( snd_seq_t*, int);
+int (*snd_seq_set_client_pool_output_dylibloader_wrapper_asound)( snd_seq_t*, size_t);
+int (*snd_seq_set_client_pool_output_room_dylibloader_wrapper_asound)( snd_seq_t*, size_t);
+int (*snd_seq_set_client_pool_input_dylibloader_wrapper_asound)( snd_seq_t*, size_t);
+int (*snd_seq_sync_output_queue_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_parse_address_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_addr_t*,const char*);
+int (*snd_seq_reset_pool_output_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_seq_reset_pool_input_dylibloader_wrapper_asound)( snd_seq_t*);
+int (*snd_midi_event_new_dylibloader_wrapper_asound)( size_t, snd_midi_event_t**);
+int (*snd_midi_event_resize_buffer_dylibloader_wrapper_asound)( snd_midi_event_t*, size_t);
+void (*snd_midi_event_free_dylibloader_wrapper_asound)( snd_midi_event_t*);
+void (*snd_midi_event_init_dylibloader_wrapper_asound)( snd_midi_event_t*);
+void (*snd_midi_event_reset_encode_dylibloader_wrapper_asound)( snd_midi_event_t*);
+void (*snd_midi_event_reset_decode_dylibloader_wrapper_asound)( snd_midi_event_t*);
+void (*snd_midi_event_no_status_dylibloader_wrapper_asound)( snd_midi_event_t*, int);
+long (*snd_midi_event_encode_dylibloader_wrapper_asound)( snd_midi_event_t*,const unsigned char*, long, snd_seq_event_t*);
+int (*snd_midi_event_encode_byte_dylibloader_wrapper_asound)( snd_midi_event_t*, int, snd_seq_event_t*);
+long (*snd_midi_event_decode_dylibloader_wrapper_asound)( snd_midi_event_t*, unsigned char*, long,const snd_seq_event_t*);
+int initialize_asound() {
+ void *handle;
+ char *error;
+ handle = dlopen("libasound.so.2", RTLD_LAZY);
+ if (!handle) {
+ fprintf(stderr, "%s\n", dlerror());
+ return(1);
+ }
+ dlerror();
+// snd_asoundlib_version
+ *(void **) (&snd_asoundlib_version_dylibloader_wrapper_asound) = dlsym(handle, "snd_asoundlib_version");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_dlpath
+ *(void **) (&snd_dlpath_dylibloader_wrapper_asound) = dlsym(handle, "snd_dlpath");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_dlopen
+ *(void **) (&snd_dlopen_dylibloader_wrapper_asound) = dlsym(handle, "snd_dlopen");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_dlsym
+ *(void **) (&snd_dlsym_dylibloader_wrapper_asound) = dlsym(handle, "snd_dlsym");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_dlclose
+ *(void **) (&snd_dlclose_dylibloader_wrapper_asound) = dlsym(handle, "snd_dlclose");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_add_handler
+ *(void **) (&snd_async_add_handler_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_add_handler");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_del_handler
+ *(void **) (&snd_async_del_handler_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_del_handler");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_handler_get_fd
+ *(void **) (&snd_async_handler_get_fd_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_handler_get_fd");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_handler_get_signo
+ *(void **) (&snd_async_handler_get_signo_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_handler_get_signo");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_handler_get_callback_private
+ *(void **) (&snd_async_handler_get_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_handler_get_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_shm_area_create
+ *(void **) (&snd_shm_area_create_dylibloader_wrapper_asound) = dlsym(handle, "snd_shm_area_create");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_shm_area_share
+ *(void **) (&snd_shm_area_share_dylibloader_wrapper_asound) = dlsym(handle, "snd_shm_area_share");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_shm_area_destroy
+ *(void **) (&snd_shm_area_destroy_dylibloader_wrapper_asound) = dlsym(handle, "snd_shm_area_destroy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_user_file
+ *(void **) (&snd_user_file_dylibloader_wrapper_asound) = dlsym(handle, "snd_user_file");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_input_stdio_open
+ *(void **) (&snd_input_stdio_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_input_stdio_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_input_stdio_attach
+ *(void **) (&snd_input_stdio_attach_dylibloader_wrapper_asound) = dlsym(handle, "snd_input_stdio_attach");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_input_buffer_open
+ *(void **) (&snd_input_buffer_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_input_buffer_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_input_close
+ *(void **) (&snd_input_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_input_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_input_scanf
+ *(void **) (&snd_input_scanf_dylibloader_wrapper_asound) = dlsym(handle, "snd_input_scanf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_input_gets
+ *(void **) (&snd_input_gets_dylibloader_wrapper_asound) = dlsym(handle, "snd_input_gets");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_input_getc
+ *(void **) (&snd_input_getc_dylibloader_wrapper_asound) = dlsym(handle, "snd_input_getc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_input_ungetc
+ *(void **) (&snd_input_ungetc_dylibloader_wrapper_asound) = dlsym(handle, "snd_input_ungetc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_output_stdio_open
+ *(void **) (&snd_output_stdio_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_output_stdio_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_output_stdio_attach
+ *(void **) (&snd_output_stdio_attach_dylibloader_wrapper_asound) = dlsym(handle, "snd_output_stdio_attach");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_output_buffer_open
+ *(void **) (&snd_output_buffer_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_output_buffer_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_output_buffer_string
+ *(void **) (&snd_output_buffer_string_dylibloader_wrapper_asound) = dlsym(handle, "snd_output_buffer_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_output_close
+ *(void **) (&snd_output_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_output_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_output_printf
+ *(void **) (&snd_output_printf_dylibloader_wrapper_asound) = dlsym(handle, "snd_output_printf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_output_vprintf
+ *(void **) (&snd_output_vprintf_dylibloader_wrapper_asound) = dlsym(handle, "snd_output_vprintf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_output_puts
+ *(void **) (&snd_output_puts_dylibloader_wrapper_asound) = dlsym(handle, "snd_output_puts");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_output_putc
+ *(void **) (&snd_output_putc_dylibloader_wrapper_asound) = dlsym(handle, "snd_output_putc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_output_flush
+ *(void **) (&snd_output_flush_dylibloader_wrapper_asound) = dlsym(handle, "snd_output_flush");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_strerror
+ *(void **) (&snd_strerror_dylibloader_wrapper_asound) = dlsym(handle, "snd_strerror");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_lib_error_set_handler
+ *(void **) (&snd_lib_error_set_handler_dylibloader_wrapper_asound) = dlsym(handle, "snd_lib_error_set_handler");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_lib_error_set_local
+ *(void **) (&snd_lib_error_set_local_dylibloader_wrapper_asound) = dlsym(handle, "snd_lib_error_set_local");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_topdir
+ *(void **) (&snd_config_topdir_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_topdir");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_top
+ *(void **) (&snd_config_top_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_top");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_load
+ *(void **) (&snd_config_load_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_load");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_load_override
+ *(void **) (&snd_config_load_override_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_load_override");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_save
+ *(void **) (&snd_config_save_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_save");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_update
+ *(void **) (&snd_config_update_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_update");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_update_r
+ *(void **) (&snd_config_update_r_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_update_r");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_update_free
+ *(void **) (&snd_config_update_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_update_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_update_free_global
+ *(void **) (&snd_config_update_free_global_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_update_free_global");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_update_ref
+ *(void **) (&snd_config_update_ref_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_update_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_ref
+ *(void **) (&snd_config_ref_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_unref
+ *(void **) (&snd_config_unref_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_unref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_search
+ *(void **) (&snd_config_search_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_search");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_searchv
+ *(void **) (&snd_config_searchv_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_searchv");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_search_definition
+ *(void **) (&snd_config_search_definition_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_search_definition");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_expand
+ *(void **) (&snd_config_expand_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_expand");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_evaluate
+ *(void **) (&snd_config_evaluate_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_evaluate");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_add
+ *(void **) (&snd_config_add_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_add");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_add_before
+ *(void **) (&snd_config_add_before_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_add_before");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_add_after
+ *(void **) (&snd_config_add_after_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_add_after");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_remove
+ *(void **) (&snd_config_remove_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_remove");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_delete
+ *(void **) (&snd_config_delete_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_delete");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_delete_compound_members
+ *(void **) (&snd_config_delete_compound_members_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_delete_compound_members");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_copy
+ *(void **) (&snd_config_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_make
+ *(void **) (&snd_config_make_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_make");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_make_integer
+ *(void **) (&snd_config_make_integer_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_make_integer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_make_integer64
+ *(void **) (&snd_config_make_integer64_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_make_integer64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_make_real
+ *(void **) (&snd_config_make_real_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_make_real");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_make_string
+ *(void **) (&snd_config_make_string_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_make_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_make_pointer
+ *(void **) (&snd_config_make_pointer_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_make_pointer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_make_compound
+ *(void **) (&snd_config_make_compound_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_make_compound");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_imake_integer
+ *(void **) (&snd_config_imake_integer_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_imake_integer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_imake_integer64
+ *(void **) (&snd_config_imake_integer64_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_imake_integer64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_imake_real
+ *(void **) (&snd_config_imake_real_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_imake_real");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_imake_string
+ *(void **) (&snd_config_imake_string_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_imake_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_imake_safe_string
+ *(void **) (&snd_config_imake_safe_string_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_imake_safe_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_imake_pointer
+ *(void **) (&snd_config_imake_pointer_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_imake_pointer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_type
+ *(void **) (&snd_config_get_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_is_array
+ *(void **) (&snd_config_is_array_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_is_array");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_set_id
+ *(void **) (&snd_config_set_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_set_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_set_integer
+ *(void **) (&snd_config_set_integer_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_set_integer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_set_integer64
+ *(void **) (&snd_config_set_integer64_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_set_integer64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_set_real
+ *(void **) (&snd_config_set_real_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_set_real");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_set_string
+ *(void **) (&snd_config_set_string_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_set_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_set_ascii
+ *(void **) (&snd_config_set_ascii_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_set_ascii");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_set_pointer
+ *(void **) (&snd_config_set_pointer_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_set_pointer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_id
+ *(void **) (&snd_config_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_integer
+ *(void **) (&snd_config_get_integer_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_integer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_integer64
+ *(void **) (&snd_config_get_integer64_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_integer64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_real
+ *(void **) (&snd_config_get_real_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_real");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_ireal
+ *(void **) (&snd_config_get_ireal_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_ireal");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_string
+ *(void **) (&snd_config_get_string_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_ascii
+ *(void **) (&snd_config_get_ascii_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_ascii");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_pointer
+ *(void **) (&snd_config_get_pointer_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_pointer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_test_id
+ *(void **) (&snd_config_test_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_test_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_iterator_first
+ *(void **) (&snd_config_iterator_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_iterator_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_iterator_next
+ *(void **) (&snd_config_iterator_next_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_iterator_next");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_iterator_end
+ *(void **) (&snd_config_iterator_end_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_iterator_end");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_iterator_entry
+ *(void **) (&snd_config_iterator_entry_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_iterator_entry");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_bool_ascii
+ *(void **) (&snd_config_get_bool_ascii_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_bool_ascii");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_bool
+ *(void **) (&snd_config_get_bool_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_bool");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_ctl_iface_ascii
+ *(void **) (&snd_config_get_ctl_iface_ascii_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_ctl_iface_ascii");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_config_get_ctl_iface
+ *(void **) (&snd_config_get_ctl_iface_dylibloader_wrapper_asound) = dlsym(handle, "snd_config_get_ctl_iface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_names_list
+ *(void **) (&snd_names_list_dylibloader_wrapper_asound) = dlsym(handle, "snd_names_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_names_list_free
+ *(void **) (&snd_names_list_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_names_list_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_open
+ *(void **) (&snd_pcm_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_open_lconf
+ *(void **) (&snd_pcm_open_lconf_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_open_lconf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_open_fallback
+ *(void **) (&snd_pcm_open_fallback_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_open_fallback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_close
+ *(void **) (&snd_pcm_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_name
+ *(void **) (&snd_pcm_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_type
+ *(void **) (&snd_pcm_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_stream
+ *(void **) (&snd_pcm_stream_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_stream");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_poll_descriptors_count
+ *(void **) (&snd_pcm_poll_descriptors_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_poll_descriptors_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_poll_descriptors
+ *(void **) (&snd_pcm_poll_descriptors_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_poll_descriptors");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_poll_descriptors_revents
+ *(void **) (&snd_pcm_poll_descriptors_revents_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_poll_descriptors_revents");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_nonblock
+ *(void **) (&snd_pcm_nonblock_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_nonblock");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_add_pcm_handler
+ *(void **) (&snd_async_add_pcm_handler_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_add_pcm_handler");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_handler_get_pcm
+ *(void **) (&snd_async_handler_get_pcm_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_handler_get_pcm");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info
+ *(void **) (&snd_pcm_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_current
+ *(void **) (&snd_pcm_hw_params_current_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_current");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params
+ *(void **) (&snd_pcm_hw_params_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_free
+ *(void **) (&snd_pcm_hw_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_current
+ *(void **) (&snd_pcm_sw_params_current_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_current");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params
+ *(void **) (&snd_pcm_sw_params_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_prepare
+ *(void **) (&snd_pcm_prepare_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_prepare");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_reset
+ *(void **) (&snd_pcm_reset_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_reset");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status
+ *(void **) (&snd_pcm_status_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_start
+ *(void **) (&snd_pcm_start_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_start");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_drop
+ *(void **) (&snd_pcm_drop_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_drop");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_drain
+ *(void **) (&snd_pcm_drain_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_drain");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_pause
+ *(void **) (&snd_pcm_pause_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_pause");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_state
+ *(void **) (&snd_pcm_state_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_state");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hwsync
+ *(void **) (&snd_pcm_hwsync_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hwsync");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_delay
+ *(void **) (&snd_pcm_delay_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_delay");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_resume
+ *(void **) (&snd_pcm_resume_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_resume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_htimestamp
+ *(void **) (&snd_pcm_htimestamp_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_htimestamp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_avail
+ *(void **) (&snd_pcm_avail_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_avail");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_avail_update
+ *(void **) (&snd_pcm_avail_update_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_avail_update");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_avail_delay
+ *(void **) (&snd_pcm_avail_delay_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_avail_delay");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_rewindable
+ *(void **) (&snd_pcm_rewindable_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_rewindable");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_rewind
+ *(void **) (&snd_pcm_rewind_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_rewind");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_forwardable
+ *(void **) (&snd_pcm_forwardable_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_forwardable");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_forward
+ *(void **) (&snd_pcm_forward_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_forward");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_writei
+ *(void **) (&snd_pcm_writei_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_writei");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_readi
+ *(void **) (&snd_pcm_readi_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_readi");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_writen
+ *(void **) (&snd_pcm_writen_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_writen");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_readn
+ *(void **) (&snd_pcm_readn_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_readn");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_wait
+ *(void **) (&snd_pcm_wait_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_wait");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_link
+ *(void **) (&snd_pcm_link_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_link");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_unlink
+ *(void **) (&snd_pcm_unlink_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_unlink");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_query_chmaps
+ *(void **) (&snd_pcm_query_chmaps_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_query_chmaps");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_query_chmaps_from_hw
+ *(void **) (&snd_pcm_query_chmaps_from_hw_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_query_chmaps_from_hw");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_free_chmaps
+ *(void **) (&snd_pcm_free_chmaps_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_free_chmaps");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_get_chmap
+ *(void **) (&snd_pcm_get_chmap_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_get_chmap");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_set_chmap
+ *(void **) (&snd_pcm_set_chmap_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_set_chmap");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_chmap_type_name
+ *(void **) (&snd_pcm_chmap_type_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_chmap_type_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_chmap_name
+ *(void **) (&snd_pcm_chmap_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_chmap_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_chmap_long_name
+ *(void **) (&snd_pcm_chmap_long_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_chmap_long_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_chmap_print
+ *(void **) (&snd_pcm_chmap_print_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_chmap_print");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_chmap_from_string
+ *(void **) (&snd_pcm_chmap_from_string_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_chmap_from_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_chmap_parse_string
+ *(void **) (&snd_pcm_chmap_parse_string_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_chmap_parse_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_recover
+ *(void **) (&snd_pcm_recover_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_recover");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_set_params
+ *(void **) (&snd_pcm_set_params_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_set_params");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_get_params
+ *(void **) (&snd_pcm_get_params_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_get_params");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_sizeof
+ *(void **) (&snd_pcm_info_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_malloc
+ *(void **) (&snd_pcm_info_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_free
+ *(void **) (&snd_pcm_info_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_copy
+ *(void **) (&snd_pcm_info_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_device
+ *(void **) (&snd_pcm_info_get_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_subdevice
+ *(void **) (&snd_pcm_info_get_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_stream
+ *(void **) (&snd_pcm_info_get_stream_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_stream");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_card
+ *(void **) (&snd_pcm_info_get_card_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_card");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_id
+ *(void **) (&snd_pcm_info_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_name
+ *(void **) (&snd_pcm_info_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_subdevice_name
+ *(void **) (&snd_pcm_info_get_subdevice_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_subdevice_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_class
+ *(void **) (&snd_pcm_info_get_class_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_class");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_subclass
+ *(void **) (&snd_pcm_info_get_subclass_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_subclass");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_subdevices_count
+ *(void **) (&snd_pcm_info_get_subdevices_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_subdevices_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_subdevices_avail
+ *(void **) (&snd_pcm_info_get_subdevices_avail_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_subdevices_avail");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_get_sync
+ *(void **) (&snd_pcm_info_get_sync_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_get_sync");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_set_device
+ *(void **) (&snd_pcm_info_set_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_set_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_set_subdevice
+ *(void **) (&snd_pcm_info_set_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_set_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_info_set_stream
+ *(void **) (&snd_pcm_info_set_stream_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_info_set_stream");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_any
+ *(void **) (&snd_pcm_hw_params_any_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_any");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_can_mmap_sample_resolution
+ *(void **) (&snd_pcm_hw_params_can_mmap_sample_resolution_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_can_mmap_sample_resolution");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_is_double
+ *(void **) (&snd_pcm_hw_params_is_double_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_is_double");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_is_batch
+ *(void **) (&snd_pcm_hw_params_is_batch_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_is_batch");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_is_block_transfer
+ *(void **) (&snd_pcm_hw_params_is_block_transfer_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_is_block_transfer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_is_monotonic
+ *(void **) (&snd_pcm_hw_params_is_monotonic_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_is_monotonic");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_can_overrange
+ *(void **) (&snd_pcm_hw_params_can_overrange_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_can_overrange");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_can_pause
+ *(void **) (&snd_pcm_hw_params_can_pause_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_can_pause");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_can_resume
+ *(void **) (&snd_pcm_hw_params_can_resume_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_can_resume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_is_half_duplex
+ *(void **) (&snd_pcm_hw_params_is_half_duplex_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_is_half_duplex");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_is_joint_duplex
+ *(void **) (&snd_pcm_hw_params_is_joint_duplex_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_is_joint_duplex");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_can_sync_start
+ *(void **) (&snd_pcm_hw_params_can_sync_start_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_can_sync_start");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_can_disable_period_wakeup
+ *(void **) (&snd_pcm_hw_params_can_disable_period_wakeup_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_can_disable_period_wakeup");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_supports_audio_wallclock_ts
+ *(void **) (&snd_pcm_hw_params_supports_audio_wallclock_ts_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_supports_audio_wallclock_ts");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_supports_audio_ts_type
+ *(void **) (&snd_pcm_hw_params_supports_audio_ts_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_supports_audio_ts_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_rate_numden
+ *(void **) (&snd_pcm_hw_params_get_rate_numden_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_rate_numden");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_sbits
+ *(void **) (&snd_pcm_hw_params_get_sbits_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_sbits");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_fifo_size
+ *(void **) (&snd_pcm_hw_params_get_fifo_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_fifo_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_sizeof
+ *(void **) (&snd_pcm_hw_params_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_malloc
+ *(void **) (&snd_pcm_hw_params_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_free
+ *(void **) (&snd_pcm_hw_params_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_copy
+ *(void **) (&snd_pcm_hw_params_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_access
+ *(void **) (&snd_pcm_hw_params_get_access_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_access");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_access
+ *(void **) (&snd_pcm_hw_params_test_access_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_access");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_access
+ *(void **) (&snd_pcm_hw_params_set_access_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_access");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_access_first
+ *(void **) (&snd_pcm_hw_params_set_access_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_access_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_access_last
+ *(void **) (&snd_pcm_hw_params_set_access_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_access_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_access_mask
+ *(void **) (&snd_pcm_hw_params_set_access_mask_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_access_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_access_mask
+ *(void **) (&snd_pcm_hw_params_get_access_mask_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_access_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_format
+ *(void **) (&snd_pcm_hw_params_get_format_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_format");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_format
+ *(void **) (&snd_pcm_hw_params_test_format_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_format");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_format
+ *(void **) (&snd_pcm_hw_params_set_format_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_format");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_format_first
+ *(void **) (&snd_pcm_hw_params_set_format_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_format_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_format_last
+ *(void **) (&snd_pcm_hw_params_set_format_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_format_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_format_mask
+ *(void **) (&snd_pcm_hw_params_set_format_mask_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_format_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_format_mask
+ *(void **) (&snd_pcm_hw_params_get_format_mask_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_format_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_subformat
+ *(void **) (&snd_pcm_hw_params_get_subformat_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_subformat");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_subformat
+ *(void **) (&snd_pcm_hw_params_test_subformat_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_subformat");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_subformat
+ *(void **) (&snd_pcm_hw_params_set_subformat_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_subformat");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_subformat_first
+ *(void **) (&snd_pcm_hw_params_set_subformat_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_subformat_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_subformat_last
+ *(void **) (&snd_pcm_hw_params_set_subformat_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_subformat_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_subformat_mask
+ *(void **) (&snd_pcm_hw_params_set_subformat_mask_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_subformat_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_subformat_mask
+ *(void **) (&snd_pcm_hw_params_get_subformat_mask_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_subformat_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_channels
+ *(void **) (&snd_pcm_hw_params_get_channels_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_channels");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_channels_min
+ *(void **) (&snd_pcm_hw_params_get_channels_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_channels_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_channels_max
+ *(void **) (&snd_pcm_hw_params_get_channels_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_channels_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_channels
+ *(void **) (&snd_pcm_hw_params_test_channels_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_channels");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_channels
+ *(void **) (&snd_pcm_hw_params_set_channels_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_channels");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_channels_min
+ *(void **) (&snd_pcm_hw_params_set_channels_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_channels_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_channels_max
+ *(void **) (&snd_pcm_hw_params_set_channels_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_channels_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_channels_minmax
+ *(void **) (&snd_pcm_hw_params_set_channels_minmax_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_channels_minmax");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_channels_near
+ *(void **) (&snd_pcm_hw_params_set_channels_near_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_channels_near");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_channels_first
+ *(void **) (&snd_pcm_hw_params_set_channels_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_channels_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_channels_last
+ *(void **) (&snd_pcm_hw_params_set_channels_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_channels_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_rate
+ *(void **) (&snd_pcm_hw_params_get_rate_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_rate");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_rate_min
+ *(void **) (&snd_pcm_hw_params_get_rate_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_rate_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_rate_max
+ *(void **) (&snd_pcm_hw_params_get_rate_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_rate_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_rate
+ *(void **) (&snd_pcm_hw_params_test_rate_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_rate");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_rate
+ *(void **) (&snd_pcm_hw_params_set_rate_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_rate");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_rate_min
+ *(void **) (&snd_pcm_hw_params_set_rate_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_rate_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_rate_max
+ *(void **) (&snd_pcm_hw_params_set_rate_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_rate_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_rate_minmax
+ *(void **) (&snd_pcm_hw_params_set_rate_minmax_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_rate_minmax");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_rate_near
+ *(void **) (&snd_pcm_hw_params_set_rate_near_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_rate_near");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_rate_first
+ *(void **) (&snd_pcm_hw_params_set_rate_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_rate_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_rate_last
+ *(void **) (&snd_pcm_hw_params_set_rate_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_rate_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_rate_resample
+ *(void **) (&snd_pcm_hw_params_set_rate_resample_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_rate_resample");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_rate_resample
+ *(void **) (&snd_pcm_hw_params_get_rate_resample_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_rate_resample");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_export_buffer
+ *(void **) (&snd_pcm_hw_params_set_export_buffer_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_export_buffer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_export_buffer
+ *(void **) (&snd_pcm_hw_params_get_export_buffer_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_export_buffer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_wakeup
+ *(void **) (&snd_pcm_hw_params_set_period_wakeup_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_wakeup");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_period_wakeup
+ *(void **) (&snd_pcm_hw_params_get_period_wakeup_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_period_wakeup");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_period_time
+ *(void **) (&snd_pcm_hw_params_get_period_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_period_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_period_time_min
+ *(void **) (&snd_pcm_hw_params_get_period_time_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_period_time_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_period_time_max
+ *(void **) (&snd_pcm_hw_params_get_period_time_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_period_time_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_period_time
+ *(void **) (&snd_pcm_hw_params_test_period_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_period_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_time
+ *(void **) (&snd_pcm_hw_params_set_period_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_time_min
+ *(void **) (&snd_pcm_hw_params_set_period_time_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_time_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_time_max
+ *(void **) (&snd_pcm_hw_params_set_period_time_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_time_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_time_minmax
+ *(void **) (&snd_pcm_hw_params_set_period_time_minmax_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_time_minmax");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_time_near
+ *(void **) (&snd_pcm_hw_params_set_period_time_near_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_time_near");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_time_first
+ *(void **) (&snd_pcm_hw_params_set_period_time_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_time_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_time_last
+ *(void **) (&snd_pcm_hw_params_set_period_time_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_time_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_period_size
+ *(void **) (&snd_pcm_hw_params_get_period_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_period_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_period_size_min
+ *(void **) (&snd_pcm_hw_params_get_period_size_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_period_size_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_period_size_max
+ *(void **) (&snd_pcm_hw_params_get_period_size_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_period_size_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_period_size
+ *(void **) (&snd_pcm_hw_params_test_period_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_period_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_size
+ *(void **) (&snd_pcm_hw_params_set_period_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_size_min
+ *(void **) (&snd_pcm_hw_params_set_period_size_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_size_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_size_max
+ *(void **) (&snd_pcm_hw_params_set_period_size_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_size_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_size_minmax
+ *(void **) (&snd_pcm_hw_params_set_period_size_minmax_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_size_minmax");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_size_near
+ *(void **) (&snd_pcm_hw_params_set_period_size_near_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_size_near");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_size_first
+ *(void **) (&snd_pcm_hw_params_set_period_size_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_size_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_size_last
+ *(void **) (&snd_pcm_hw_params_set_period_size_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_size_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_period_size_integer
+ *(void **) (&snd_pcm_hw_params_set_period_size_integer_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_period_size_integer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_periods
+ *(void **) (&snd_pcm_hw_params_get_periods_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_periods");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_periods_min
+ *(void **) (&snd_pcm_hw_params_get_periods_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_periods_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_periods_max
+ *(void **) (&snd_pcm_hw_params_get_periods_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_periods_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_periods
+ *(void **) (&snd_pcm_hw_params_test_periods_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_periods");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_periods
+ *(void **) (&snd_pcm_hw_params_set_periods_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_periods");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_periods_min
+ *(void **) (&snd_pcm_hw_params_set_periods_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_periods_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_periods_max
+ *(void **) (&snd_pcm_hw_params_set_periods_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_periods_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_periods_minmax
+ *(void **) (&snd_pcm_hw_params_set_periods_minmax_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_periods_minmax");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_periods_near
+ *(void **) (&snd_pcm_hw_params_set_periods_near_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_periods_near");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_periods_first
+ *(void **) (&snd_pcm_hw_params_set_periods_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_periods_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_periods_last
+ *(void **) (&snd_pcm_hw_params_set_periods_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_periods_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_periods_integer
+ *(void **) (&snd_pcm_hw_params_set_periods_integer_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_periods_integer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_buffer_time
+ *(void **) (&snd_pcm_hw_params_get_buffer_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_buffer_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_buffer_time_min
+ *(void **) (&snd_pcm_hw_params_get_buffer_time_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_buffer_time_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_buffer_time_max
+ *(void **) (&snd_pcm_hw_params_get_buffer_time_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_buffer_time_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_buffer_time
+ *(void **) (&snd_pcm_hw_params_test_buffer_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_buffer_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_time
+ *(void **) (&snd_pcm_hw_params_set_buffer_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_time_min
+ *(void **) (&snd_pcm_hw_params_set_buffer_time_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_time_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_time_max
+ *(void **) (&snd_pcm_hw_params_set_buffer_time_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_time_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_time_minmax
+ *(void **) (&snd_pcm_hw_params_set_buffer_time_minmax_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_time_minmax");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_time_near
+ *(void **) (&snd_pcm_hw_params_set_buffer_time_near_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_time_near");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_time_first
+ *(void **) (&snd_pcm_hw_params_set_buffer_time_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_time_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_time_last
+ *(void **) (&snd_pcm_hw_params_set_buffer_time_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_time_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_buffer_size
+ *(void **) (&snd_pcm_hw_params_get_buffer_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_buffer_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_buffer_size_min
+ *(void **) (&snd_pcm_hw_params_get_buffer_size_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_buffer_size_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_buffer_size_max
+ *(void **) (&snd_pcm_hw_params_get_buffer_size_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_buffer_size_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_buffer_size
+ *(void **) (&snd_pcm_hw_params_test_buffer_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_buffer_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_size
+ *(void **) (&snd_pcm_hw_params_set_buffer_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_size_min
+ *(void **) (&snd_pcm_hw_params_set_buffer_size_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_size_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_size_max
+ *(void **) (&snd_pcm_hw_params_set_buffer_size_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_size_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_size_minmax
+ *(void **) (&snd_pcm_hw_params_set_buffer_size_minmax_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_size_minmax");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_size_near
+ *(void **) (&snd_pcm_hw_params_set_buffer_size_near_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_size_near");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_size_first
+ *(void **) (&snd_pcm_hw_params_set_buffer_size_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_size_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_buffer_size_last
+ *(void **) (&snd_pcm_hw_params_set_buffer_size_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_buffer_size_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_min_align
+ *(void **) (&snd_pcm_hw_params_get_min_align_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_min_align");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_sizeof
+ *(void **) (&snd_pcm_sw_params_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_malloc
+ *(void **) (&snd_pcm_sw_params_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_free
+ *(void **) (&snd_pcm_sw_params_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_copy
+ *(void **) (&snd_pcm_sw_params_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_boundary
+ *(void **) (&snd_pcm_sw_params_get_boundary_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_boundary");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_tstamp_mode
+ *(void **) (&snd_pcm_sw_params_set_tstamp_mode_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_tstamp_mode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_tstamp_mode
+ *(void **) (&snd_pcm_sw_params_get_tstamp_mode_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_tstamp_mode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_tstamp_type
+ *(void **) (&snd_pcm_sw_params_set_tstamp_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_tstamp_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_tstamp_type
+ *(void **) (&snd_pcm_sw_params_get_tstamp_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_tstamp_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_avail_min
+ *(void **) (&snd_pcm_sw_params_set_avail_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_avail_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_avail_min
+ *(void **) (&snd_pcm_sw_params_get_avail_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_avail_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_period_event
+ *(void **) (&snd_pcm_sw_params_set_period_event_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_period_event");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_period_event
+ *(void **) (&snd_pcm_sw_params_get_period_event_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_period_event");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_start_threshold
+ *(void **) (&snd_pcm_sw_params_set_start_threshold_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_start_threshold");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_start_threshold
+ *(void **) (&snd_pcm_sw_params_get_start_threshold_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_start_threshold");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_stop_threshold
+ *(void **) (&snd_pcm_sw_params_set_stop_threshold_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_stop_threshold");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_stop_threshold
+ *(void **) (&snd_pcm_sw_params_get_stop_threshold_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_stop_threshold");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_silence_threshold
+ *(void **) (&snd_pcm_sw_params_set_silence_threshold_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_silence_threshold");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_silence_threshold
+ *(void **) (&snd_pcm_sw_params_get_silence_threshold_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_silence_threshold");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_silence_size
+ *(void **) (&snd_pcm_sw_params_set_silence_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_silence_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_silence_size
+ *(void **) (&snd_pcm_sw_params_get_silence_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_silence_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_mask_sizeof
+ *(void **) (&snd_pcm_access_mask_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_mask_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_mask_malloc
+ *(void **) (&snd_pcm_access_mask_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_mask_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_mask_free
+ *(void **) (&snd_pcm_access_mask_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_mask_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_mask_copy
+ *(void **) (&snd_pcm_access_mask_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_mask_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_mask_none
+ *(void **) (&snd_pcm_access_mask_none_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_mask_none");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_mask_any
+ *(void **) (&snd_pcm_access_mask_any_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_mask_any");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_mask_test
+ *(void **) (&snd_pcm_access_mask_test_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_mask_test");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_mask_empty
+ *(void **) (&snd_pcm_access_mask_empty_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_mask_empty");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_mask_set
+ *(void **) (&snd_pcm_access_mask_set_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_mask_set");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_mask_reset
+ *(void **) (&snd_pcm_access_mask_reset_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_mask_reset");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_mask_sizeof
+ *(void **) (&snd_pcm_format_mask_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_mask_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_mask_malloc
+ *(void **) (&snd_pcm_format_mask_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_mask_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_mask_free
+ *(void **) (&snd_pcm_format_mask_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_mask_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_mask_copy
+ *(void **) (&snd_pcm_format_mask_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_mask_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_mask_none
+ *(void **) (&snd_pcm_format_mask_none_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_mask_none");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_mask_any
+ *(void **) (&snd_pcm_format_mask_any_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_mask_any");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_mask_test
+ *(void **) (&snd_pcm_format_mask_test_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_mask_test");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_mask_empty
+ *(void **) (&snd_pcm_format_mask_empty_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_mask_empty");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_mask_set
+ *(void **) (&snd_pcm_format_mask_set_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_mask_set");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_mask_reset
+ *(void **) (&snd_pcm_format_mask_reset_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_mask_reset");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_mask_sizeof
+ *(void **) (&snd_pcm_subformat_mask_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_mask_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_mask_malloc
+ *(void **) (&snd_pcm_subformat_mask_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_mask_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_mask_free
+ *(void **) (&snd_pcm_subformat_mask_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_mask_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_mask_copy
+ *(void **) (&snd_pcm_subformat_mask_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_mask_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_mask_none
+ *(void **) (&snd_pcm_subformat_mask_none_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_mask_none");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_mask_any
+ *(void **) (&snd_pcm_subformat_mask_any_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_mask_any");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_mask_test
+ *(void **) (&snd_pcm_subformat_mask_test_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_mask_test");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_mask_empty
+ *(void **) (&snd_pcm_subformat_mask_empty_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_mask_empty");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_mask_set
+ *(void **) (&snd_pcm_subformat_mask_set_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_mask_set");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_mask_reset
+ *(void **) (&snd_pcm_subformat_mask_reset_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_mask_reset");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_sizeof
+ *(void **) (&snd_pcm_status_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_malloc
+ *(void **) (&snd_pcm_status_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_free
+ *(void **) (&snd_pcm_status_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_copy
+ *(void **) (&snd_pcm_status_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_state
+ *(void **) (&snd_pcm_status_get_state_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_state");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_trigger_tstamp
+ *(void **) (&snd_pcm_status_get_trigger_tstamp_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_trigger_tstamp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_trigger_htstamp
+ *(void **) (&snd_pcm_status_get_trigger_htstamp_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_trigger_htstamp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_tstamp
+ *(void **) (&snd_pcm_status_get_tstamp_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_tstamp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_htstamp
+ *(void **) (&snd_pcm_status_get_htstamp_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_htstamp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_audio_htstamp
+ *(void **) (&snd_pcm_status_get_audio_htstamp_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_audio_htstamp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_driver_htstamp
+ *(void **) (&snd_pcm_status_get_driver_htstamp_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_driver_htstamp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_audio_htstamp_report
+ *(void **) (&snd_pcm_status_get_audio_htstamp_report_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_audio_htstamp_report");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_set_audio_htstamp_config
+ *(void **) (&snd_pcm_status_set_audio_htstamp_config_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_set_audio_htstamp_config");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_delay
+ *(void **) (&snd_pcm_status_get_delay_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_delay");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_avail
+ *(void **) (&snd_pcm_status_get_avail_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_avail");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_avail_max
+ *(void **) (&snd_pcm_status_get_avail_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_avail_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_get_overrange
+ *(void **) (&snd_pcm_status_get_overrange_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_get_overrange");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_type_name
+ *(void **) (&snd_pcm_type_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_type_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_stream_name
+ *(void **) (&snd_pcm_stream_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_stream_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_access_name
+ *(void **) (&snd_pcm_access_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_access_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_name
+ *(void **) (&snd_pcm_format_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_description
+ *(void **) (&snd_pcm_format_description_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_description");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_name
+ *(void **) (&snd_pcm_subformat_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_subformat_description
+ *(void **) (&snd_pcm_subformat_description_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_subformat_description");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_value
+ *(void **) (&snd_pcm_format_value_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_value");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_tstamp_mode_name
+ *(void **) (&snd_pcm_tstamp_mode_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_tstamp_mode_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_state_name
+ *(void **) (&snd_pcm_state_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_state_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_dump
+ *(void **) (&snd_pcm_dump_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_dump");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_dump_hw_setup
+ *(void **) (&snd_pcm_dump_hw_setup_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_dump_hw_setup");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_dump_sw_setup
+ *(void **) (&snd_pcm_dump_sw_setup_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_dump_sw_setup");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_dump_setup
+ *(void **) (&snd_pcm_dump_setup_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_dump_setup");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_dump
+ *(void **) (&snd_pcm_hw_params_dump_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_dump");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_dump
+ *(void **) (&snd_pcm_sw_params_dump_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_dump");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_status_dump
+ *(void **) (&snd_pcm_status_dump_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_status_dump");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_mmap_begin
+ *(void **) (&snd_pcm_mmap_begin_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_mmap_begin");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_mmap_commit
+ *(void **) (&snd_pcm_mmap_commit_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_mmap_commit");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_mmap_writei
+ *(void **) (&snd_pcm_mmap_writei_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_mmap_writei");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_mmap_readi
+ *(void **) (&snd_pcm_mmap_readi_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_mmap_readi");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_mmap_writen
+ *(void **) (&snd_pcm_mmap_writen_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_mmap_writen");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_mmap_readn
+ *(void **) (&snd_pcm_mmap_readn_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_mmap_readn");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_signed
+ *(void **) (&snd_pcm_format_signed_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_signed");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_unsigned
+ *(void **) (&snd_pcm_format_unsigned_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_unsigned");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_linear
+ *(void **) (&snd_pcm_format_linear_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_linear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_float
+ *(void **) (&snd_pcm_format_float_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_float");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_little_endian
+ *(void **) (&snd_pcm_format_little_endian_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_little_endian");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_big_endian
+ *(void **) (&snd_pcm_format_big_endian_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_big_endian");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_cpu_endian
+ *(void **) (&snd_pcm_format_cpu_endian_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_cpu_endian");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_width
+ *(void **) (&snd_pcm_format_width_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_width");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_physical_width
+ *(void **) (&snd_pcm_format_physical_width_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_physical_width");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_build_linear_format
+ *(void **) (&snd_pcm_build_linear_format_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_build_linear_format");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_size
+ *(void **) (&snd_pcm_format_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_silence
+ *(void **) (&snd_pcm_format_silence_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_silence");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_silence_16
+ *(void **) (&snd_pcm_format_silence_16_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_silence_16");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_silence_32
+ *(void **) (&snd_pcm_format_silence_32_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_silence_32");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_silence_64
+ *(void **) (&snd_pcm_format_silence_64_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_silence_64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_format_set_silence
+ *(void **) (&snd_pcm_format_set_silence_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_format_set_silence");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_bytes_to_frames
+ *(void **) (&snd_pcm_bytes_to_frames_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_bytes_to_frames");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_frames_to_bytes
+ *(void **) (&snd_pcm_frames_to_bytes_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_frames_to_bytes");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_bytes_to_samples
+ *(void **) (&snd_pcm_bytes_to_samples_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_bytes_to_samples");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_samples_to_bytes
+ *(void **) (&snd_pcm_samples_to_bytes_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_samples_to_bytes");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_area_silence
+ *(void **) (&snd_pcm_area_silence_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_area_silence");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_areas_silence
+ *(void **) (&snd_pcm_areas_silence_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_areas_silence");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_area_copy
+ *(void **) (&snd_pcm_area_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_area_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_areas_copy
+ *(void **) (&snd_pcm_areas_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_areas_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_areas_copy_wrap
+ *(void **) (&snd_pcm_areas_copy_wrap_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_areas_copy_wrap");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hook_get_pcm
+ *(void **) (&snd_pcm_hook_get_pcm_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hook_get_pcm");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hook_get_private
+ *(void **) (&snd_pcm_hook_get_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hook_get_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hook_set_private
+ *(void **) (&snd_pcm_hook_set_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hook_set_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hook_add
+ *(void **) (&snd_pcm_hook_add_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hook_add");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hook_remove
+ *(void **) (&snd_pcm_hook_remove_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hook_remove");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_meter_get_bufsize
+ *(void **) (&snd_pcm_meter_get_bufsize_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_meter_get_bufsize");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_meter_get_channels
+ *(void **) (&snd_pcm_meter_get_channels_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_meter_get_channels");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_meter_get_rate
+ *(void **) (&snd_pcm_meter_get_rate_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_meter_get_rate");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_meter_get_now
+ *(void **) (&snd_pcm_meter_get_now_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_meter_get_now");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_meter_get_boundary
+ *(void **) (&snd_pcm_meter_get_boundary_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_meter_get_boundary");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_meter_add_scope
+ *(void **) (&snd_pcm_meter_add_scope_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_meter_add_scope");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_meter_search_scope
+ *(void **) (&snd_pcm_meter_search_scope_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_meter_search_scope");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_scope_malloc
+ *(void **) (&snd_pcm_scope_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_scope_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_scope_set_ops
+ *(void **) (&snd_pcm_scope_set_ops_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_scope_set_ops");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_scope_set_name
+ *(void **) (&snd_pcm_scope_set_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_scope_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_scope_get_name
+ *(void **) (&snd_pcm_scope_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_scope_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_scope_get_callback_private
+ *(void **) (&snd_pcm_scope_get_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_scope_get_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_scope_set_callback_private
+ *(void **) (&snd_pcm_scope_set_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_scope_set_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_scope_s16_open
+ *(void **) (&snd_pcm_scope_s16_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_scope_s16_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_scope_s16_get_channel_buffer
+ *(void **) (&snd_pcm_scope_s16_get_channel_buffer_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_scope_s16_get_channel_buffer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_spcm_init
+ *(void **) (&snd_spcm_init_dylibloader_wrapper_asound) = dlsym(handle, "snd_spcm_init");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_spcm_init_duplex
+ *(void **) (&snd_spcm_init_duplex_dylibloader_wrapper_asound) = dlsym(handle, "snd_spcm_init_duplex");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_spcm_init_get_params
+ *(void **) (&snd_spcm_init_get_params_dylibloader_wrapper_asound) = dlsym(handle, "snd_spcm_init_get_params");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_start_mode_name
+ *(void **) (&snd_pcm_start_mode_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_start_mode_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_xrun_mode_name
+ *(void **) (&snd_pcm_xrun_mode_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_xrun_mode_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_start_mode
+ *(void **) (&snd_pcm_sw_params_set_start_mode_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_start_mode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_start_mode
+ *(void **) (&snd_pcm_sw_params_get_start_mode_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_start_mode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_xrun_mode
+ *(void **) (&snd_pcm_sw_params_set_xrun_mode_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_xrun_mode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_xrun_mode
+ *(void **) (&snd_pcm_sw_params_get_xrun_mode_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_xrun_mode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_xfer_align
+ *(void **) (&snd_pcm_sw_params_set_xfer_align_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_xfer_align");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_xfer_align
+ *(void **) (&snd_pcm_sw_params_get_xfer_align_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_xfer_align");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_set_sleep_min
+ *(void **) (&snd_pcm_sw_params_set_sleep_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_set_sleep_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_sw_params_get_sleep_min
+ *(void **) (&snd_pcm_sw_params_get_sleep_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_sw_params_get_sleep_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_tick_time
+ *(void **) (&snd_pcm_hw_params_get_tick_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_tick_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_tick_time_min
+ *(void **) (&snd_pcm_hw_params_get_tick_time_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_tick_time_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_get_tick_time_max
+ *(void **) (&snd_pcm_hw_params_get_tick_time_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_get_tick_time_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_test_tick_time
+ *(void **) (&snd_pcm_hw_params_test_tick_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_test_tick_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_tick_time
+ *(void **) (&snd_pcm_hw_params_set_tick_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_tick_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_tick_time_min
+ *(void **) (&snd_pcm_hw_params_set_tick_time_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_tick_time_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_tick_time_max
+ *(void **) (&snd_pcm_hw_params_set_tick_time_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_tick_time_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_tick_time_minmax
+ *(void **) (&snd_pcm_hw_params_set_tick_time_minmax_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_tick_time_minmax");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_tick_time_near
+ *(void **) (&snd_pcm_hw_params_set_tick_time_near_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_tick_time_near");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_tick_time_first
+ *(void **) (&snd_pcm_hw_params_set_tick_time_first_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_tick_time_first");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_pcm_hw_params_set_tick_time_last
+ *(void **) (&snd_pcm_hw_params_set_tick_time_last_dylibloader_wrapper_asound) = dlsym(handle, "snd_pcm_hw_params_set_tick_time_last");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_open
+ *(void **) (&snd_rawmidi_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_open_lconf
+ *(void **) (&snd_rawmidi_open_lconf_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_open_lconf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_close
+ *(void **) (&snd_rawmidi_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_poll_descriptors_count
+ *(void **) (&snd_rawmidi_poll_descriptors_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_poll_descriptors_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_poll_descriptors
+ *(void **) (&snd_rawmidi_poll_descriptors_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_poll_descriptors");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_poll_descriptors_revents
+ *(void **) (&snd_rawmidi_poll_descriptors_revents_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_poll_descriptors_revents");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_nonblock
+ *(void **) (&snd_rawmidi_nonblock_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_nonblock");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_sizeof
+ *(void **) (&snd_rawmidi_info_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_malloc
+ *(void **) (&snd_rawmidi_info_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_free
+ *(void **) (&snd_rawmidi_info_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_copy
+ *(void **) (&snd_rawmidi_info_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_get_device
+ *(void **) (&snd_rawmidi_info_get_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_get_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_get_subdevice
+ *(void **) (&snd_rawmidi_info_get_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_get_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_get_stream
+ *(void **) (&snd_rawmidi_info_get_stream_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_get_stream");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_get_card
+ *(void **) (&snd_rawmidi_info_get_card_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_get_card");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_get_flags
+ *(void **) (&snd_rawmidi_info_get_flags_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_get_flags");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_get_id
+ *(void **) (&snd_rawmidi_info_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_get_name
+ *(void **) (&snd_rawmidi_info_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_get_subdevice_name
+ *(void **) (&snd_rawmidi_info_get_subdevice_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_get_subdevice_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_get_subdevices_count
+ *(void **) (&snd_rawmidi_info_get_subdevices_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_get_subdevices_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_get_subdevices_avail
+ *(void **) (&snd_rawmidi_info_get_subdevices_avail_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_get_subdevices_avail");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_set_device
+ *(void **) (&snd_rawmidi_info_set_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_set_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_set_subdevice
+ *(void **) (&snd_rawmidi_info_set_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_set_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info_set_stream
+ *(void **) (&snd_rawmidi_info_set_stream_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info_set_stream");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_info
+ *(void **) (&snd_rawmidi_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_sizeof
+ *(void **) (&snd_rawmidi_params_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_malloc
+ *(void **) (&snd_rawmidi_params_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_free
+ *(void **) (&snd_rawmidi_params_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_copy
+ *(void **) (&snd_rawmidi_params_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_set_buffer_size
+ *(void **) (&snd_rawmidi_params_set_buffer_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_set_buffer_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_get_buffer_size
+ *(void **) (&snd_rawmidi_params_get_buffer_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_get_buffer_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_set_avail_min
+ *(void **) (&snd_rawmidi_params_set_avail_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_set_avail_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_get_avail_min
+ *(void **) (&snd_rawmidi_params_get_avail_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_get_avail_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_set_no_active_sensing
+ *(void **) (&snd_rawmidi_params_set_no_active_sensing_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_set_no_active_sensing");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_get_no_active_sensing
+ *(void **) (&snd_rawmidi_params_get_no_active_sensing_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_get_no_active_sensing");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params
+ *(void **) (&snd_rawmidi_params_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_params_current
+ *(void **) (&snd_rawmidi_params_current_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_params_current");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_status_sizeof
+ *(void **) (&snd_rawmidi_status_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_status_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_status_malloc
+ *(void **) (&snd_rawmidi_status_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_status_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_status_free
+ *(void **) (&snd_rawmidi_status_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_status_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_status_copy
+ *(void **) (&snd_rawmidi_status_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_status_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_status_get_tstamp
+ *(void **) (&snd_rawmidi_status_get_tstamp_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_status_get_tstamp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_status_get_avail
+ *(void **) (&snd_rawmidi_status_get_avail_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_status_get_avail");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_status_get_xruns
+ *(void **) (&snd_rawmidi_status_get_xruns_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_status_get_xruns");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_status
+ *(void **) (&snd_rawmidi_status_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_status");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_drain
+ *(void **) (&snd_rawmidi_drain_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_drain");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_drop
+ *(void **) (&snd_rawmidi_drop_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_drop");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_write
+ *(void **) (&snd_rawmidi_write_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_write");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_read
+ *(void **) (&snd_rawmidi_read_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_read");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_name
+ *(void **) (&snd_rawmidi_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_type
+ *(void **) (&snd_rawmidi_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_rawmidi_stream
+ *(void **) (&snd_rawmidi_stream_dylibloader_wrapper_asound) = dlsym(handle, "snd_rawmidi_stream");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_query_open
+ *(void **) (&snd_timer_query_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_query_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_query_open_lconf
+ *(void **) (&snd_timer_query_open_lconf_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_query_open_lconf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_query_close
+ *(void **) (&snd_timer_query_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_query_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_query_next_device
+ *(void **) (&snd_timer_query_next_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_query_next_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_query_info
+ *(void **) (&snd_timer_query_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_query_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_query_params
+ *(void **) (&snd_timer_query_params_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_query_params");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_query_status
+ *(void **) (&snd_timer_query_status_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_query_status");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_open
+ *(void **) (&snd_timer_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_open_lconf
+ *(void **) (&snd_timer_open_lconf_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_open_lconf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_close
+ *(void **) (&snd_timer_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_add_timer_handler
+ *(void **) (&snd_async_add_timer_handler_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_add_timer_handler");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_handler_get_timer
+ *(void **) (&snd_async_handler_get_timer_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_handler_get_timer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_poll_descriptors_count
+ *(void **) (&snd_timer_poll_descriptors_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_poll_descriptors_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_poll_descriptors
+ *(void **) (&snd_timer_poll_descriptors_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_poll_descriptors");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_poll_descriptors_revents
+ *(void **) (&snd_timer_poll_descriptors_revents_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_poll_descriptors_revents");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info
+ *(void **) (&snd_timer_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params
+ *(void **) (&snd_timer_params_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_status
+ *(void **) (&snd_timer_status_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_status");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_start
+ *(void **) (&snd_timer_start_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_start");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_stop
+ *(void **) (&snd_timer_stop_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_stop");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_continue
+ *(void **) (&snd_timer_continue_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_continue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_read
+ *(void **) (&snd_timer_read_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_read");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_sizeof
+ *(void **) (&snd_timer_id_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_malloc
+ *(void **) (&snd_timer_id_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_free
+ *(void **) (&snd_timer_id_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_copy
+ *(void **) (&snd_timer_id_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_set_class
+ *(void **) (&snd_timer_id_set_class_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_set_class");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_get_class
+ *(void **) (&snd_timer_id_get_class_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_get_class");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_set_sclass
+ *(void **) (&snd_timer_id_set_sclass_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_set_sclass");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_get_sclass
+ *(void **) (&snd_timer_id_get_sclass_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_get_sclass");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_set_card
+ *(void **) (&snd_timer_id_set_card_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_set_card");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_get_card
+ *(void **) (&snd_timer_id_get_card_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_get_card");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_set_device
+ *(void **) (&snd_timer_id_set_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_set_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_get_device
+ *(void **) (&snd_timer_id_get_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_get_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_set_subdevice
+ *(void **) (&snd_timer_id_set_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_set_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_id_get_subdevice
+ *(void **) (&snd_timer_id_get_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_id_get_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_sizeof
+ *(void **) (&snd_timer_ginfo_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_malloc
+ *(void **) (&snd_timer_ginfo_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_free
+ *(void **) (&snd_timer_ginfo_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_copy
+ *(void **) (&snd_timer_ginfo_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_set_tid
+ *(void **) (&snd_timer_ginfo_set_tid_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_set_tid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_get_tid
+ *(void **) (&snd_timer_ginfo_get_tid_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_get_tid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_get_flags
+ *(void **) (&snd_timer_ginfo_get_flags_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_get_flags");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_get_card
+ *(void **) (&snd_timer_ginfo_get_card_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_get_card");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_get_id
+ *(void **) (&snd_timer_ginfo_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_get_name
+ *(void **) (&snd_timer_ginfo_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_get_resolution
+ *(void **) (&snd_timer_ginfo_get_resolution_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_get_resolution");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_get_resolution_min
+ *(void **) (&snd_timer_ginfo_get_resolution_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_get_resolution_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_get_resolution_max
+ *(void **) (&snd_timer_ginfo_get_resolution_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_get_resolution_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_ginfo_get_clients
+ *(void **) (&snd_timer_ginfo_get_clients_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_ginfo_get_clients");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info_sizeof
+ *(void **) (&snd_timer_info_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info_malloc
+ *(void **) (&snd_timer_info_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info_free
+ *(void **) (&snd_timer_info_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info_copy
+ *(void **) (&snd_timer_info_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info_is_slave
+ *(void **) (&snd_timer_info_is_slave_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info_is_slave");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info_get_card
+ *(void **) (&snd_timer_info_get_card_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info_get_card");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info_get_id
+ *(void **) (&snd_timer_info_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info_get_name
+ *(void **) (&snd_timer_info_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info_get_resolution
+ *(void **) (&snd_timer_info_get_resolution_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info_get_resolution");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_sizeof
+ *(void **) (&snd_timer_params_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_malloc
+ *(void **) (&snd_timer_params_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_free
+ *(void **) (&snd_timer_params_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_copy
+ *(void **) (&snd_timer_params_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_set_auto_start
+ *(void **) (&snd_timer_params_set_auto_start_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_set_auto_start");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_get_auto_start
+ *(void **) (&snd_timer_params_get_auto_start_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_get_auto_start");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_set_exclusive
+ *(void **) (&snd_timer_params_set_exclusive_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_set_exclusive");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_get_exclusive
+ *(void **) (&snd_timer_params_get_exclusive_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_get_exclusive");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_set_early_event
+ *(void **) (&snd_timer_params_set_early_event_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_set_early_event");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_get_early_event
+ *(void **) (&snd_timer_params_get_early_event_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_get_early_event");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_set_ticks
+ *(void **) (&snd_timer_params_set_ticks_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_set_ticks");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_get_ticks
+ *(void **) (&snd_timer_params_get_ticks_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_get_ticks");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_set_queue_size
+ *(void **) (&snd_timer_params_set_queue_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_set_queue_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_get_queue_size
+ *(void **) (&snd_timer_params_get_queue_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_get_queue_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_set_filter
+ *(void **) (&snd_timer_params_set_filter_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_set_filter");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_params_get_filter
+ *(void **) (&snd_timer_params_get_filter_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_params_get_filter");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_status_sizeof
+ *(void **) (&snd_timer_status_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_status_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_status_malloc
+ *(void **) (&snd_timer_status_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_status_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_status_free
+ *(void **) (&snd_timer_status_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_status_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_status_copy
+ *(void **) (&snd_timer_status_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_status_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_status_get_timestamp
+ *(void **) (&snd_timer_status_get_timestamp_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_status_get_timestamp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_status_get_resolution
+ *(void **) (&snd_timer_status_get_resolution_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_status_get_resolution");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_status_get_lost
+ *(void **) (&snd_timer_status_get_lost_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_status_get_lost");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_status_get_overrun
+ *(void **) (&snd_timer_status_get_overrun_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_status_get_overrun");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_status_get_queue
+ *(void **) (&snd_timer_status_get_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_status_get_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_timer_info_get_ticks
+ *(void **) (&snd_timer_info_get_ticks_dylibloader_wrapper_asound) = dlsym(handle, "snd_timer_info_get_ticks");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_open
+ *(void **) (&snd_hwdep_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_close
+ *(void **) (&snd_hwdep_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_poll_descriptors
+ *(void **) (&snd_hwdep_poll_descriptors_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_poll_descriptors");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_poll_descriptors_count
+ *(void **) (&snd_hwdep_poll_descriptors_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_poll_descriptors_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_poll_descriptors_revents
+ *(void **) (&snd_hwdep_poll_descriptors_revents_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_poll_descriptors_revents");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_nonblock
+ *(void **) (&snd_hwdep_nonblock_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_nonblock");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info
+ *(void **) (&snd_hwdep_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_status
+ *(void **) (&snd_hwdep_dsp_status_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_status");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_load
+ *(void **) (&snd_hwdep_dsp_load_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_load");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_ioctl
+ *(void **) (&snd_hwdep_ioctl_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_ioctl");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_write
+ *(void **) (&snd_hwdep_write_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_write");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_read
+ *(void **) (&snd_hwdep_read_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_read");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info_sizeof
+ *(void **) (&snd_hwdep_info_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info_malloc
+ *(void **) (&snd_hwdep_info_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info_free
+ *(void **) (&snd_hwdep_info_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info_copy
+ *(void **) (&snd_hwdep_info_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info_get_device
+ *(void **) (&snd_hwdep_info_get_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info_get_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info_get_card
+ *(void **) (&snd_hwdep_info_get_card_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info_get_card");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info_get_id
+ *(void **) (&snd_hwdep_info_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info_get_name
+ *(void **) (&snd_hwdep_info_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info_get_iface
+ *(void **) (&snd_hwdep_info_get_iface_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info_get_iface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_info_set_device
+ *(void **) (&snd_hwdep_info_set_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_info_set_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_status_sizeof
+ *(void **) (&snd_hwdep_dsp_status_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_status_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_status_malloc
+ *(void **) (&snd_hwdep_dsp_status_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_status_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_status_free
+ *(void **) (&snd_hwdep_dsp_status_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_status_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_status_copy
+ *(void **) (&snd_hwdep_dsp_status_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_status_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_status_get_version
+ *(void **) (&snd_hwdep_dsp_status_get_version_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_status_get_version");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_status_get_id
+ *(void **) (&snd_hwdep_dsp_status_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_status_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_status_get_num_dsps
+ *(void **) (&snd_hwdep_dsp_status_get_num_dsps_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_status_get_num_dsps");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_status_get_dsp_loaded
+ *(void **) (&snd_hwdep_dsp_status_get_dsp_loaded_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_status_get_dsp_loaded");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_status_get_chip_ready
+ *(void **) (&snd_hwdep_dsp_status_get_chip_ready_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_status_get_chip_ready");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_sizeof
+ *(void **) (&snd_hwdep_dsp_image_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_malloc
+ *(void **) (&snd_hwdep_dsp_image_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_free
+ *(void **) (&snd_hwdep_dsp_image_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_copy
+ *(void **) (&snd_hwdep_dsp_image_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_get_index
+ *(void **) (&snd_hwdep_dsp_image_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_get_name
+ *(void **) (&snd_hwdep_dsp_image_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_get_image
+ *(void **) (&snd_hwdep_dsp_image_get_image_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_get_image");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_get_length
+ *(void **) (&snd_hwdep_dsp_image_get_length_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_get_length");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_set_index
+ *(void **) (&snd_hwdep_dsp_image_set_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_set_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_set_name
+ *(void **) (&snd_hwdep_dsp_image_set_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_set_image
+ *(void **) (&snd_hwdep_dsp_image_set_image_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_set_image");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hwdep_dsp_image_set_length
+ *(void **) (&snd_hwdep_dsp_image_set_length_dylibloader_wrapper_asound) = dlsym(handle, "snd_hwdep_dsp_image_set_length");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_card_load
+ *(void **) (&snd_card_load_dylibloader_wrapper_asound) = dlsym(handle, "snd_card_load");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_card_next
+ *(void **) (&snd_card_next_dylibloader_wrapper_asound) = dlsym(handle, "snd_card_next");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_card_get_index
+ *(void **) (&snd_card_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_card_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_card_get_name
+ *(void **) (&snd_card_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_card_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_card_get_longname
+ *(void **) (&snd_card_get_longname_dylibloader_wrapper_asound) = dlsym(handle, "snd_card_get_longname");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_device_name_hint
+ *(void **) (&snd_device_name_hint_dylibloader_wrapper_asound) = dlsym(handle, "snd_device_name_hint");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_device_name_free_hint
+ *(void **) (&snd_device_name_free_hint_dylibloader_wrapper_asound) = dlsym(handle, "snd_device_name_free_hint");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_device_name_get_hint
+ *(void **) (&snd_device_name_get_hint_dylibloader_wrapper_asound) = dlsym(handle, "snd_device_name_get_hint");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_open
+ *(void **) (&snd_ctl_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_open_lconf
+ *(void **) (&snd_ctl_open_lconf_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_open_lconf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_open_fallback
+ *(void **) (&snd_ctl_open_fallback_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_open_fallback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_close
+ *(void **) (&snd_ctl_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_nonblock
+ *(void **) (&snd_ctl_nonblock_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_nonblock");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_add_ctl_handler
+ *(void **) (&snd_async_add_ctl_handler_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_add_ctl_handler");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_async_handler_get_ctl
+ *(void **) (&snd_async_handler_get_ctl_dylibloader_wrapper_asound) = dlsym(handle, "snd_async_handler_get_ctl");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_poll_descriptors_count
+ *(void **) (&snd_ctl_poll_descriptors_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_poll_descriptors_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_poll_descriptors
+ *(void **) (&snd_ctl_poll_descriptors_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_poll_descriptors");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_poll_descriptors_revents
+ *(void **) (&snd_ctl_poll_descriptors_revents_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_poll_descriptors_revents");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_subscribe_events
+ *(void **) (&snd_ctl_subscribe_events_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_subscribe_events");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info
+ *(void **) (&snd_ctl_card_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list
+ *(void **) (&snd_ctl_elem_list_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info
+ *(void **) (&snd_ctl_elem_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_read
+ *(void **) (&snd_ctl_elem_read_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_read");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_write
+ *(void **) (&snd_ctl_elem_write_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_write");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_lock
+ *(void **) (&snd_ctl_elem_lock_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_lock");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_unlock
+ *(void **) (&snd_ctl_elem_unlock_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_unlock");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_tlv_read
+ *(void **) (&snd_ctl_elem_tlv_read_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_tlv_read");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_tlv_write
+ *(void **) (&snd_ctl_elem_tlv_write_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_tlv_write");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_tlv_command
+ *(void **) (&snd_ctl_elem_tlv_command_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_tlv_command");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_hwdep_next_device
+ *(void **) (&snd_ctl_hwdep_next_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_hwdep_next_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_hwdep_info
+ *(void **) (&snd_ctl_hwdep_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_hwdep_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_pcm_next_device
+ *(void **) (&snd_ctl_pcm_next_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_pcm_next_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_pcm_info
+ *(void **) (&snd_ctl_pcm_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_pcm_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_pcm_prefer_subdevice
+ *(void **) (&snd_ctl_pcm_prefer_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_pcm_prefer_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_rawmidi_next_device
+ *(void **) (&snd_ctl_rawmidi_next_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_rawmidi_next_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_rawmidi_info
+ *(void **) (&snd_ctl_rawmidi_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_rawmidi_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_rawmidi_prefer_subdevice
+ *(void **) (&snd_ctl_rawmidi_prefer_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_rawmidi_prefer_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_set_power_state
+ *(void **) (&snd_ctl_set_power_state_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_set_power_state");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_get_power_state
+ *(void **) (&snd_ctl_get_power_state_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_get_power_state");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_read
+ *(void **) (&snd_ctl_read_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_read");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_wait
+ *(void **) (&snd_ctl_wait_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_wait");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_name
+ *(void **) (&snd_ctl_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_type
+ *(void **) (&snd_ctl_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_type_name
+ *(void **) (&snd_ctl_elem_type_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_type_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_iface_name
+ *(void **) (&snd_ctl_elem_iface_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_iface_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_type_name
+ *(void **) (&snd_ctl_event_type_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_type_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_elem_get_mask
+ *(void **) (&snd_ctl_event_elem_get_mask_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_elem_get_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_elem_get_numid
+ *(void **) (&snd_ctl_event_elem_get_numid_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_elem_get_numid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_elem_get_id
+ *(void **) (&snd_ctl_event_elem_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_elem_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_elem_get_interface
+ *(void **) (&snd_ctl_event_elem_get_interface_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_elem_get_interface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_elem_get_device
+ *(void **) (&snd_ctl_event_elem_get_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_elem_get_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_elem_get_subdevice
+ *(void **) (&snd_ctl_event_elem_get_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_elem_get_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_elem_get_name
+ *(void **) (&snd_ctl_event_elem_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_elem_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_elem_get_index
+ *(void **) (&snd_ctl_event_elem_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_elem_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_alloc_space
+ *(void **) (&snd_ctl_elem_list_alloc_space_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_alloc_space");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_free_space
+ *(void **) (&snd_ctl_elem_list_free_space_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_free_space");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_ascii_elem_id_get
+ *(void **) (&snd_ctl_ascii_elem_id_get_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_ascii_elem_id_get");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_ascii_elem_id_parse
+ *(void **) (&snd_ctl_ascii_elem_id_parse_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_ascii_elem_id_parse");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_ascii_value_parse
+ *(void **) (&snd_ctl_ascii_value_parse_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_ascii_value_parse");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_sizeof
+ *(void **) (&snd_ctl_elem_id_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_malloc
+ *(void **) (&snd_ctl_elem_id_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_free
+ *(void **) (&snd_ctl_elem_id_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_clear
+ *(void **) (&snd_ctl_elem_id_clear_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_clear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_copy
+ *(void **) (&snd_ctl_elem_id_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_get_numid
+ *(void **) (&snd_ctl_elem_id_get_numid_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_get_numid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_get_interface
+ *(void **) (&snd_ctl_elem_id_get_interface_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_get_interface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_get_device
+ *(void **) (&snd_ctl_elem_id_get_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_get_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_get_subdevice
+ *(void **) (&snd_ctl_elem_id_get_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_get_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_get_name
+ *(void **) (&snd_ctl_elem_id_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_get_index
+ *(void **) (&snd_ctl_elem_id_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_set_numid
+ *(void **) (&snd_ctl_elem_id_set_numid_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_set_numid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_set_interface
+ *(void **) (&snd_ctl_elem_id_set_interface_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_set_interface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_set_device
+ *(void **) (&snd_ctl_elem_id_set_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_set_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_set_subdevice
+ *(void **) (&snd_ctl_elem_id_set_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_set_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_set_name
+ *(void **) (&snd_ctl_elem_id_set_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_id_set_index
+ *(void **) (&snd_ctl_elem_id_set_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_id_set_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_sizeof
+ *(void **) (&snd_ctl_card_info_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_malloc
+ *(void **) (&snd_ctl_card_info_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_free
+ *(void **) (&snd_ctl_card_info_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_clear
+ *(void **) (&snd_ctl_card_info_clear_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_clear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_copy
+ *(void **) (&snd_ctl_card_info_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_get_card
+ *(void **) (&snd_ctl_card_info_get_card_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_get_card");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_get_id
+ *(void **) (&snd_ctl_card_info_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_get_driver
+ *(void **) (&snd_ctl_card_info_get_driver_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_get_driver");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_get_name
+ *(void **) (&snd_ctl_card_info_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_get_longname
+ *(void **) (&snd_ctl_card_info_get_longname_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_get_longname");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_get_mixername
+ *(void **) (&snd_ctl_card_info_get_mixername_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_get_mixername");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_card_info_get_components
+ *(void **) (&snd_ctl_card_info_get_components_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_card_info_get_components");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_sizeof
+ *(void **) (&snd_ctl_event_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_malloc
+ *(void **) (&snd_ctl_event_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_free
+ *(void **) (&snd_ctl_event_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_clear
+ *(void **) (&snd_ctl_event_clear_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_clear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_copy
+ *(void **) (&snd_ctl_event_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_event_get_type
+ *(void **) (&snd_ctl_event_get_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_event_get_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_sizeof
+ *(void **) (&snd_ctl_elem_list_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_malloc
+ *(void **) (&snd_ctl_elem_list_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_free
+ *(void **) (&snd_ctl_elem_list_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_clear
+ *(void **) (&snd_ctl_elem_list_clear_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_clear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_copy
+ *(void **) (&snd_ctl_elem_list_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_set_offset
+ *(void **) (&snd_ctl_elem_list_set_offset_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_set_offset");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_get_used
+ *(void **) (&snd_ctl_elem_list_get_used_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_get_used");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_get_count
+ *(void **) (&snd_ctl_elem_list_get_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_get_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_get_id
+ *(void **) (&snd_ctl_elem_list_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_get_numid
+ *(void **) (&snd_ctl_elem_list_get_numid_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_get_numid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_get_interface
+ *(void **) (&snd_ctl_elem_list_get_interface_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_get_interface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_get_device
+ *(void **) (&snd_ctl_elem_list_get_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_get_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_get_subdevice
+ *(void **) (&snd_ctl_elem_list_get_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_get_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_get_name
+ *(void **) (&snd_ctl_elem_list_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_list_get_index
+ *(void **) (&snd_ctl_elem_list_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_list_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_sizeof
+ *(void **) (&snd_ctl_elem_info_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_malloc
+ *(void **) (&snd_ctl_elem_info_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_free
+ *(void **) (&snd_ctl_elem_info_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_clear
+ *(void **) (&snd_ctl_elem_info_clear_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_clear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_copy
+ *(void **) (&snd_ctl_elem_info_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_type
+ *(void **) (&snd_ctl_elem_info_get_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_is_readable
+ *(void **) (&snd_ctl_elem_info_is_readable_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_is_readable");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_is_writable
+ *(void **) (&snd_ctl_elem_info_is_writable_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_is_writable");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_is_volatile
+ *(void **) (&snd_ctl_elem_info_is_volatile_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_is_volatile");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_is_inactive
+ *(void **) (&snd_ctl_elem_info_is_inactive_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_is_inactive");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_is_locked
+ *(void **) (&snd_ctl_elem_info_is_locked_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_is_locked");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_is_tlv_readable
+ *(void **) (&snd_ctl_elem_info_is_tlv_readable_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_is_tlv_readable");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_is_tlv_writable
+ *(void **) (&snd_ctl_elem_info_is_tlv_writable_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_is_tlv_writable");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_is_tlv_commandable
+ *(void **) (&snd_ctl_elem_info_is_tlv_commandable_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_is_tlv_commandable");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_is_owner
+ *(void **) (&snd_ctl_elem_info_is_owner_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_is_owner");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_is_user
+ *(void **) (&snd_ctl_elem_info_is_user_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_is_user");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_owner
+ *(void **) (&snd_ctl_elem_info_get_owner_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_owner");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_count
+ *(void **) (&snd_ctl_elem_info_get_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_min
+ *(void **) (&snd_ctl_elem_info_get_min_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_max
+ *(void **) (&snd_ctl_elem_info_get_max_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_step
+ *(void **) (&snd_ctl_elem_info_get_step_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_step");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_min64
+ *(void **) (&snd_ctl_elem_info_get_min64_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_min64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_max64
+ *(void **) (&snd_ctl_elem_info_get_max64_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_max64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_step64
+ *(void **) (&snd_ctl_elem_info_get_step64_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_step64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_items
+ *(void **) (&snd_ctl_elem_info_get_items_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_items");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_set_item
+ *(void **) (&snd_ctl_elem_info_set_item_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_set_item");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_item_name
+ *(void **) (&snd_ctl_elem_info_get_item_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_item_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_dimensions
+ *(void **) (&snd_ctl_elem_info_get_dimensions_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_dimensions");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_dimension
+ *(void **) (&snd_ctl_elem_info_get_dimension_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_dimension");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_set_dimension
+ *(void **) (&snd_ctl_elem_info_set_dimension_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_set_dimension");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_id
+ *(void **) (&snd_ctl_elem_info_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_numid
+ *(void **) (&snd_ctl_elem_info_get_numid_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_numid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_interface
+ *(void **) (&snd_ctl_elem_info_get_interface_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_interface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_device
+ *(void **) (&snd_ctl_elem_info_get_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_subdevice
+ *(void **) (&snd_ctl_elem_info_get_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_name
+ *(void **) (&snd_ctl_elem_info_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_get_index
+ *(void **) (&snd_ctl_elem_info_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_set_id
+ *(void **) (&snd_ctl_elem_info_set_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_set_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_set_numid
+ *(void **) (&snd_ctl_elem_info_set_numid_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_set_numid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_set_interface
+ *(void **) (&snd_ctl_elem_info_set_interface_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_set_interface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_set_device
+ *(void **) (&snd_ctl_elem_info_set_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_set_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_set_subdevice
+ *(void **) (&snd_ctl_elem_info_set_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_set_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_set_name
+ *(void **) (&snd_ctl_elem_info_set_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_info_set_index
+ *(void **) (&snd_ctl_elem_info_set_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_info_set_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_add_integer_elem_set
+ *(void **) (&snd_ctl_add_integer_elem_set_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_add_integer_elem_set");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_add_integer64_elem_set
+ *(void **) (&snd_ctl_add_integer64_elem_set_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_add_integer64_elem_set");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_add_boolean_elem_set
+ *(void **) (&snd_ctl_add_boolean_elem_set_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_add_boolean_elem_set");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_add_enumerated_elem_set
+ *(void **) (&snd_ctl_add_enumerated_elem_set_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_add_enumerated_elem_set");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_add_bytes_elem_set
+ *(void **) (&snd_ctl_add_bytes_elem_set_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_add_bytes_elem_set");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_add_integer
+ *(void **) (&snd_ctl_elem_add_integer_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_add_integer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_add_integer64
+ *(void **) (&snd_ctl_elem_add_integer64_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_add_integer64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_add_boolean
+ *(void **) (&snd_ctl_elem_add_boolean_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_add_boolean");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_add_enumerated
+ *(void **) (&snd_ctl_elem_add_enumerated_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_add_enumerated");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_add_iec958
+ *(void **) (&snd_ctl_elem_add_iec958_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_add_iec958");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_remove
+ *(void **) (&snd_ctl_elem_remove_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_remove");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_sizeof
+ *(void **) (&snd_ctl_elem_value_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_malloc
+ *(void **) (&snd_ctl_elem_value_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_free
+ *(void **) (&snd_ctl_elem_value_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_clear
+ *(void **) (&snd_ctl_elem_value_clear_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_clear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_copy
+ *(void **) (&snd_ctl_elem_value_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_compare
+ *(void **) (&snd_ctl_elem_value_compare_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_compare");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_id
+ *(void **) (&snd_ctl_elem_value_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_numid
+ *(void **) (&snd_ctl_elem_value_get_numid_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_numid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_interface
+ *(void **) (&snd_ctl_elem_value_get_interface_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_interface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_device
+ *(void **) (&snd_ctl_elem_value_get_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_subdevice
+ *(void **) (&snd_ctl_elem_value_get_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_name
+ *(void **) (&snd_ctl_elem_value_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_index
+ *(void **) (&snd_ctl_elem_value_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_id
+ *(void **) (&snd_ctl_elem_value_set_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_numid
+ *(void **) (&snd_ctl_elem_value_set_numid_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_numid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_interface
+ *(void **) (&snd_ctl_elem_value_set_interface_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_interface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_device
+ *(void **) (&snd_ctl_elem_value_set_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_subdevice
+ *(void **) (&snd_ctl_elem_value_set_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_name
+ *(void **) (&snd_ctl_elem_value_set_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_index
+ *(void **) (&snd_ctl_elem_value_set_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_boolean
+ *(void **) (&snd_ctl_elem_value_get_boolean_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_boolean");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_integer
+ *(void **) (&snd_ctl_elem_value_get_integer_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_integer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_integer64
+ *(void **) (&snd_ctl_elem_value_get_integer64_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_integer64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_enumerated
+ *(void **) (&snd_ctl_elem_value_get_enumerated_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_enumerated");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_byte
+ *(void **) (&snd_ctl_elem_value_get_byte_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_byte");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_boolean
+ *(void **) (&snd_ctl_elem_value_set_boolean_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_boolean");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_integer
+ *(void **) (&snd_ctl_elem_value_set_integer_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_integer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_integer64
+ *(void **) (&snd_ctl_elem_value_set_integer64_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_integer64");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_enumerated
+ *(void **) (&snd_ctl_elem_value_set_enumerated_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_enumerated");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_byte
+ *(void **) (&snd_ctl_elem_value_set_byte_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_byte");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_set_bytes
+ *(void **) (&snd_ctl_elem_set_bytes_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_set_bytes");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_bytes
+ *(void **) (&snd_ctl_elem_value_get_bytes_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_bytes");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_get_iec958
+ *(void **) (&snd_ctl_elem_value_get_iec958_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_get_iec958");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_elem_value_set_iec958
+ *(void **) (&snd_ctl_elem_value_set_iec958_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_elem_value_set_iec958");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_tlv_parse_dB_info
+ *(void **) (&snd_tlv_parse_dB_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_tlv_parse_dB_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_tlv_get_dB_range
+ *(void **) (&snd_tlv_get_dB_range_dylibloader_wrapper_asound) = dlsym(handle, "snd_tlv_get_dB_range");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_tlv_convert_to_dB
+ *(void **) (&snd_tlv_convert_to_dB_dylibloader_wrapper_asound) = dlsym(handle, "snd_tlv_convert_to_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_tlv_convert_from_dB
+ *(void **) (&snd_tlv_convert_from_dB_dylibloader_wrapper_asound) = dlsym(handle, "snd_tlv_convert_from_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_get_dB_range
+ *(void **) (&snd_ctl_get_dB_range_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_get_dB_range");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_convert_to_dB
+ *(void **) (&snd_ctl_convert_to_dB_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_convert_to_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_ctl_convert_from_dB
+ *(void **) (&snd_ctl_convert_from_dB_dylibloader_wrapper_asound) = dlsym(handle, "snd_ctl_convert_from_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_compare_fast
+ *(void **) (&snd_hctl_compare_fast_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_compare_fast");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_open
+ *(void **) (&snd_hctl_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_open_ctl
+ *(void **) (&snd_hctl_open_ctl_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_open_ctl");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_close
+ *(void **) (&snd_hctl_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_nonblock
+ *(void **) (&snd_hctl_nonblock_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_nonblock");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_poll_descriptors_count
+ *(void **) (&snd_hctl_poll_descriptors_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_poll_descriptors_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_poll_descriptors
+ *(void **) (&snd_hctl_poll_descriptors_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_poll_descriptors");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_poll_descriptors_revents
+ *(void **) (&snd_hctl_poll_descriptors_revents_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_poll_descriptors_revents");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_get_count
+ *(void **) (&snd_hctl_get_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_get_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_set_compare
+ *(void **) (&snd_hctl_set_compare_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_set_compare");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_first_elem
+ *(void **) (&snd_hctl_first_elem_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_first_elem");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_last_elem
+ *(void **) (&snd_hctl_last_elem_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_last_elem");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_find_elem
+ *(void **) (&snd_hctl_find_elem_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_find_elem");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_set_callback
+ *(void **) (&snd_hctl_set_callback_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_set_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_set_callback_private
+ *(void **) (&snd_hctl_set_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_set_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_get_callback_private
+ *(void **) (&snd_hctl_get_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_get_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_load
+ *(void **) (&snd_hctl_load_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_load");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_free
+ *(void **) (&snd_hctl_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_handle_events
+ *(void **) (&snd_hctl_handle_events_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_handle_events");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_name
+ *(void **) (&snd_hctl_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_wait
+ *(void **) (&snd_hctl_wait_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_wait");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_ctl
+ *(void **) (&snd_hctl_ctl_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_ctl");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_next
+ *(void **) (&snd_hctl_elem_next_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_next");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_prev
+ *(void **) (&snd_hctl_elem_prev_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_prev");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_info
+ *(void **) (&snd_hctl_elem_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_read
+ *(void **) (&snd_hctl_elem_read_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_read");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_write
+ *(void **) (&snd_hctl_elem_write_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_write");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_tlv_read
+ *(void **) (&snd_hctl_elem_tlv_read_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_tlv_read");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_tlv_write
+ *(void **) (&snd_hctl_elem_tlv_write_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_tlv_write");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_tlv_command
+ *(void **) (&snd_hctl_elem_tlv_command_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_tlv_command");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_get_hctl
+ *(void **) (&snd_hctl_elem_get_hctl_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_get_hctl");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_get_id
+ *(void **) (&snd_hctl_elem_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_get_numid
+ *(void **) (&snd_hctl_elem_get_numid_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_get_numid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_get_interface
+ *(void **) (&snd_hctl_elem_get_interface_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_get_interface");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_get_device
+ *(void **) (&snd_hctl_elem_get_device_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_get_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_get_subdevice
+ *(void **) (&snd_hctl_elem_get_subdevice_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_get_subdevice");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_get_name
+ *(void **) (&snd_hctl_elem_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_get_index
+ *(void **) (&snd_hctl_elem_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_set_callback
+ *(void **) (&snd_hctl_elem_set_callback_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_set_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_get_callback_private
+ *(void **) (&snd_hctl_elem_get_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_get_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_hctl_elem_set_callback_private
+ *(void **) (&snd_hctl_elem_set_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_hctl_elem_set_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_sctl_build
+ *(void **) (&snd_sctl_build_dylibloader_wrapper_asound) = dlsym(handle, "snd_sctl_build");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_sctl_free
+ *(void **) (&snd_sctl_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_sctl_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_sctl_install
+ *(void **) (&snd_sctl_install_dylibloader_wrapper_asound) = dlsym(handle, "snd_sctl_install");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_sctl_remove
+ *(void **) (&snd_sctl_remove_dylibloader_wrapper_asound) = dlsym(handle, "snd_sctl_remove");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_open
+ *(void **) (&snd_mixer_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_close
+ *(void **) (&snd_mixer_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_first_elem
+ *(void **) (&snd_mixer_first_elem_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_first_elem");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_last_elem
+ *(void **) (&snd_mixer_last_elem_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_last_elem");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_handle_events
+ *(void **) (&snd_mixer_handle_events_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_handle_events");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_attach
+ *(void **) (&snd_mixer_attach_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_attach");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_attach_hctl
+ *(void **) (&snd_mixer_attach_hctl_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_attach_hctl");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_detach
+ *(void **) (&snd_mixer_detach_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_detach");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_detach_hctl
+ *(void **) (&snd_mixer_detach_hctl_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_detach_hctl");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_get_hctl
+ *(void **) (&snd_mixer_get_hctl_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_get_hctl");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_poll_descriptors_count
+ *(void **) (&snd_mixer_poll_descriptors_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_poll_descriptors_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_poll_descriptors
+ *(void **) (&snd_mixer_poll_descriptors_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_poll_descriptors");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_poll_descriptors_revents
+ *(void **) (&snd_mixer_poll_descriptors_revents_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_poll_descriptors_revents");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_load
+ *(void **) (&snd_mixer_load_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_load");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_free
+ *(void **) (&snd_mixer_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_wait
+ *(void **) (&snd_mixer_wait_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_wait");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_set_compare
+ *(void **) (&snd_mixer_set_compare_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_set_compare");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_set_callback
+ *(void **) (&snd_mixer_set_callback_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_set_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_get_callback_private
+ *(void **) (&snd_mixer_get_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_get_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_set_callback_private
+ *(void **) (&snd_mixer_set_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_set_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_get_count
+ *(void **) (&snd_mixer_get_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_get_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_unregister
+ *(void **) (&snd_mixer_class_unregister_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_unregister");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_next
+ *(void **) (&snd_mixer_elem_next_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_next");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_prev
+ *(void **) (&snd_mixer_elem_prev_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_prev");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_set_callback
+ *(void **) (&snd_mixer_elem_set_callback_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_set_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_get_callback_private
+ *(void **) (&snd_mixer_elem_get_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_get_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_set_callback_private
+ *(void **) (&snd_mixer_elem_set_callback_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_set_callback_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_get_type
+ *(void **) (&snd_mixer_elem_get_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_get_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_register
+ *(void **) (&snd_mixer_class_register_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_register");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_new
+ *(void **) (&snd_mixer_elem_new_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_add
+ *(void **) (&snd_mixer_elem_add_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_add");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_remove
+ *(void **) (&snd_mixer_elem_remove_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_remove");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_free
+ *(void **) (&snd_mixer_elem_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_info
+ *(void **) (&snd_mixer_elem_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_value
+ *(void **) (&snd_mixer_elem_value_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_value");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_attach
+ *(void **) (&snd_mixer_elem_attach_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_attach");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_detach
+ *(void **) (&snd_mixer_elem_detach_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_detach");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_empty
+ *(void **) (&snd_mixer_elem_empty_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_empty");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_elem_get_private
+ *(void **) (&snd_mixer_elem_get_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_elem_get_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_sizeof
+ *(void **) (&snd_mixer_class_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_malloc
+ *(void **) (&snd_mixer_class_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_free
+ *(void **) (&snd_mixer_class_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_copy
+ *(void **) (&snd_mixer_class_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_get_mixer
+ *(void **) (&snd_mixer_class_get_mixer_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_get_mixer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_get_event
+ *(void **) (&snd_mixer_class_get_event_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_get_event");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_get_private
+ *(void **) (&snd_mixer_class_get_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_get_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_get_compare
+ *(void **) (&snd_mixer_class_get_compare_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_get_compare");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_set_event
+ *(void **) (&snd_mixer_class_set_event_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_set_event");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_set_private
+ *(void **) (&snd_mixer_class_set_private_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_set_private");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_set_private_free
+ *(void **) (&snd_mixer_class_set_private_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_set_private_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_class_set_compare
+ *(void **) (&snd_mixer_class_set_compare_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_class_set_compare");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_channel_name
+ *(void **) (&snd_mixer_selem_channel_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_channel_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_register
+ *(void **) (&snd_mixer_selem_register_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_register");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_id
+ *(void **) (&snd_mixer_selem_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_name
+ *(void **) (&snd_mixer_selem_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_index
+ *(void **) (&snd_mixer_selem_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_find_selem
+ *(void **) (&snd_mixer_find_selem_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_find_selem");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_is_active
+ *(void **) (&snd_mixer_selem_is_active_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_is_active");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_is_playback_mono
+ *(void **) (&snd_mixer_selem_is_playback_mono_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_is_playback_mono");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_playback_channel
+ *(void **) (&snd_mixer_selem_has_playback_channel_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_playback_channel");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_is_capture_mono
+ *(void **) (&snd_mixer_selem_is_capture_mono_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_is_capture_mono");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_capture_channel
+ *(void **) (&snd_mixer_selem_has_capture_channel_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_capture_channel");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_capture_group
+ *(void **) (&snd_mixer_selem_get_capture_group_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_capture_group");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_common_volume
+ *(void **) (&snd_mixer_selem_has_common_volume_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_common_volume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_playback_volume
+ *(void **) (&snd_mixer_selem_has_playback_volume_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_playback_volume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_playback_volume_joined
+ *(void **) (&snd_mixer_selem_has_playback_volume_joined_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_playback_volume_joined");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_capture_volume
+ *(void **) (&snd_mixer_selem_has_capture_volume_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_capture_volume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_capture_volume_joined
+ *(void **) (&snd_mixer_selem_has_capture_volume_joined_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_capture_volume_joined");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_common_switch
+ *(void **) (&snd_mixer_selem_has_common_switch_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_common_switch");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_playback_switch
+ *(void **) (&snd_mixer_selem_has_playback_switch_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_playback_switch");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_playback_switch_joined
+ *(void **) (&snd_mixer_selem_has_playback_switch_joined_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_playback_switch_joined");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_capture_switch
+ *(void **) (&snd_mixer_selem_has_capture_switch_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_capture_switch");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_capture_switch_joined
+ *(void **) (&snd_mixer_selem_has_capture_switch_joined_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_capture_switch_joined");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_has_capture_switch_exclusive
+ *(void **) (&snd_mixer_selem_has_capture_switch_exclusive_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_has_capture_switch_exclusive");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_ask_playback_vol_dB
+ *(void **) (&snd_mixer_selem_ask_playback_vol_dB_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_ask_playback_vol_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_ask_capture_vol_dB
+ *(void **) (&snd_mixer_selem_ask_capture_vol_dB_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_ask_capture_vol_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_ask_playback_dB_vol
+ *(void **) (&snd_mixer_selem_ask_playback_dB_vol_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_ask_playback_dB_vol");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_ask_capture_dB_vol
+ *(void **) (&snd_mixer_selem_ask_capture_dB_vol_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_ask_capture_dB_vol");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_playback_volume
+ *(void **) (&snd_mixer_selem_get_playback_volume_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_playback_volume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_capture_volume
+ *(void **) (&snd_mixer_selem_get_capture_volume_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_capture_volume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_playback_dB
+ *(void **) (&snd_mixer_selem_get_playback_dB_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_playback_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_capture_dB
+ *(void **) (&snd_mixer_selem_get_capture_dB_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_capture_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_playback_switch
+ *(void **) (&snd_mixer_selem_get_playback_switch_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_playback_switch");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_capture_switch
+ *(void **) (&snd_mixer_selem_get_capture_switch_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_capture_switch");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_playback_volume
+ *(void **) (&snd_mixer_selem_set_playback_volume_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_playback_volume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_capture_volume
+ *(void **) (&snd_mixer_selem_set_capture_volume_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_capture_volume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_playback_dB
+ *(void **) (&snd_mixer_selem_set_playback_dB_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_playback_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_capture_dB
+ *(void **) (&snd_mixer_selem_set_capture_dB_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_capture_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_playback_volume_all
+ *(void **) (&snd_mixer_selem_set_playback_volume_all_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_playback_volume_all");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_capture_volume_all
+ *(void **) (&snd_mixer_selem_set_capture_volume_all_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_capture_volume_all");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_playback_dB_all
+ *(void **) (&snd_mixer_selem_set_playback_dB_all_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_playback_dB_all");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_capture_dB_all
+ *(void **) (&snd_mixer_selem_set_capture_dB_all_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_capture_dB_all");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_playback_switch
+ *(void **) (&snd_mixer_selem_set_playback_switch_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_playback_switch");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_capture_switch
+ *(void **) (&snd_mixer_selem_set_capture_switch_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_capture_switch");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_playback_switch_all
+ *(void **) (&snd_mixer_selem_set_playback_switch_all_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_playback_switch_all");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_capture_switch_all
+ *(void **) (&snd_mixer_selem_set_capture_switch_all_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_capture_switch_all");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_playback_volume_range
+ *(void **) (&snd_mixer_selem_get_playback_volume_range_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_playback_volume_range");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_playback_dB_range
+ *(void **) (&snd_mixer_selem_get_playback_dB_range_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_playback_dB_range");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_playback_volume_range
+ *(void **) (&snd_mixer_selem_set_playback_volume_range_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_playback_volume_range");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_capture_volume_range
+ *(void **) (&snd_mixer_selem_get_capture_volume_range_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_capture_volume_range");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_capture_dB_range
+ *(void **) (&snd_mixer_selem_get_capture_dB_range_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_capture_dB_range");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_capture_volume_range
+ *(void **) (&snd_mixer_selem_set_capture_volume_range_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_capture_volume_range");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_is_enumerated
+ *(void **) (&snd_mixer_selem_is_enumerated_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_is_enumerated");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_is_enum_playback
+ *(void **) (&snd_mixer_selem_is_enum_playback_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_is_enum_playback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_is_enum_capture
+ *(void **) (&snd_mixer_selem_is_enum_capture_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_is_enum_capture");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_enum_items
+ *(void **) (&snd_mixer_selem_get_enum_items_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_enum_items");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_enum_item_name
+ *(void **) (&snd_mixer_selem_get_enum_item_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_enum_item_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_get_enum_item
+ *(void **) (&snd_mixer_selem_get_enum_item_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_get_enum_item");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_set_enum_item
+ *(void **) (&snd_mixer_selem_set_enum_item_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_set_enum_item");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_id_sizeof
+ *(void **) (&snd_mixer_selem_id_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_id_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_id_malloc
+ *(void **) (&snd_mixer_selem_id_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_id_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_id_free
+ *(void **) (&snd_mixer_selem_id_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_id_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_id_copy
+ *(void **) (&snd_mixer_selem_id_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_id_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_id_get_name
+ *(void **) (&snd_mixer_selem_id_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_id_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_id_get_index
+ *(void **) (&snd_mixer_selem_id_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_id_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_id_set_name
+ *(void **) (&snd_mixer_selem_id_set_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_id_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_id_set_index
+ *(void **) (&snd_mixer_selem_id_set_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_id_set_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_mixer_selem_id_parse
+ *(void **) (&snd_mixer_selem_id_parse_dylibloader_wrapper_asound) = dlsym(handle, "snd_mixer_selem_id_parse");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_open
+ *(void **) (&snd_seq_open_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_open");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_open_lconf
+ *(void **) (&snd_seq_open_lconf_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_open_lconf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_name
+ *(void **) (&snd_seq_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_type
+ *(void **) (&snd_seq_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_close
+ *(void **) (&snd_seq_close_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_close");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_poll_descriptors_count
+ *(void **) (&snd_seq_poll_descriptors_count_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_poll_descriptors_count");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_poll_descriptors
+ *(void **) (&snd_seq_poll_descriptors_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_poll_descriptors");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_poll_descriptors_revents
+ *(void **) (&snd_seq_poll_descriptors_revents_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_poll_descriptors_revents");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_nonblock
+ *(void **) (&snd_seq_nonblock_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_nonblock");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_id
+ *(void **) (&snd_seq_client_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_output_buffer_size
+ *(void **) (&snd_seq_get_output_buffer_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_output_buffer_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_input_buffer_size
+ *(void **) (&snd_seq_get_input_buffer_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_input_buffer_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_output_buffer_size
+ *(void **) (&snd_seq_set_output_buffer_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_output_buffer_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_input_buffer_size
+ *(void **) (&snd_seq_set_input_buffer_size_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_input_buffer_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info_sizeof
+ *(void **) (&snd_seq_system_info_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info_malloc
+ *(void **) (&snd_seq_system_info_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info_free
+ *(void **) (&snd_seq_system_info_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info_copy
+ *(void **) (&snd_seq_system_info_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info_get_queues
+ *(void **) (&snd_seq_system_info_get_queues_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info_get_queues");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info_get_clients
+ *(void **) (&snd_seq_system_info_get_clients_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info_get_clients");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info_get_ports
+ *(void **) (&snd_seq_system_info_get_ports_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info_get_ports");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info_get_channels
+ *(void **) (&snd_seq_system_info_get_channels_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info_get_channels");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info_get_cur_clients
+ *(void **) (&snd_seq_system_info_get_cur_clients_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info_get_cur_clients");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info_get_cur_queues
+ *(void **) (&snd_seq_system_info_get_cur_queues_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info_get_cur_queues");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_system_info
+ *(void **) (&snd_seq_system_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_system_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_sizeof
+ *(void **) (&snd_seq_client_info_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_malloc
+ *(void **) (&snd_seq_client_info_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_free
+ *(void **) (&snd_seq_client_info_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_copy
+ *(void **) (&snd_seq_client_info_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_get_client
+ *(void **) (&snd_seq_client_info_get_client_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_get_client");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_get_type
+ *(void **) (&snd_seq_client_info_get_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_get_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_get_name
+ *(void **) (&snd_seq_client_info_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_get_broadcast_filter
+ *(void **) (&snd_seq_client_info_get_broadcast_filter_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_get_broadcast_filter");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_get_error_bounce
+ *(void **) (&snd_seq_client_info_get_error_bounce_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_get_error_bounce");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_get_card
+ *(void **) (&snd_seq_client_info_get_card_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_get_card");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_get_pid
+ *(void **) (&snd_seq_client_info_get_pid_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_get_pid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_get_event_filter
+ *(void **) (&snd_seq_client_info_get_event_filter_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_get_event_filter");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_get_num_ports
+ *(void **) (&snd_seq_client_info_get_num_ports_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_get_num_ports");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_get_event_lost
+ *(void **) (&snd_seq_client_info_get_event_lost_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_get_event_lost");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_set_client
+ *(void **) (&snd_seq_client_info_set_client_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_set_client");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_set_name
+ *(void **) (&snd_seq_client_info_set_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_set_broadcast_filter
+ *(void **) (&snd_seq_client_info_set_broadcast_filter_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_set_broadcast_filter");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_set_error_bounce
+ *(void **) (&snd_seq_client_info_set_error_bounce_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_set_error_bounce");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_set_event_filter
+ *(void **) (&snd_seq_client_info_set_event_filter_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_set_event_filter");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_event_filter_clear
+ *(void **) (&snd_seq_client_info_event_filter_clear_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_event_filter_clear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_event_filter_add
+ *(void **) (&snd_seq_client_info_event_filter_add_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_event_filter_add");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_event_filter_del
+ *(void **) (&snd_seq_client_info_event_filter_del_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_event_filter_del");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_info_event_filter_check
+ *(void **) (&snd_seq_client_info_event_filter_check_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_info_event_filter_check");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_client_info
+ *(void **) (&snd_seq_get_client_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_client_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_any_client_info
+ *(void **) (&snd_seq_get_any_client_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_any_client_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_client_info
+ *(void **) (&snd_seq_set_client_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_client_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_next_client
+ *(void **) (&snd_seq_query_next_client_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_next_client");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_sizeof
+ *(void **) (&snd_seq_client_pool_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_malloc
+ *(void **) (&snd_seq_client_pool_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_free
+ *(void **) (&snd_seq_client_pool_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_copy
+ *(void **) (&snd_seq_client_pool_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_get_client
+ *(void **) (&snd_seq_client_pool_get_client_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_get_client");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_get_output_pool
+ *(void **) (&snd_seq_client_pool_get_output_pool_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_get_output_pool");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_get_input_pool
+ *(void **) (&snd_seq_client_pool_get_input_pool_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_get_input_pool");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_get_output_room
+ *(void **) (&snd_seq_client_pool_get_output_room_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_get_output_room");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_get_output_free
+ *(void **) (&snd_seq_client_pool_get_output_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_get_output_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_get_input_free
+ *(void **) (&snd_seq_client_pool_get_input_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_get_input_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_set_output_pool
+ *(void **) (&snd_seq_client_pool_set_output_pool_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_set_output_pool");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_set_input_pool
+ *(void **) (&snd_seq_client_pool_set_input_pool_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_set_input_pool");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_client_pool_set_output_room
+ *(void **) (&snd_seq_client_pool_set_output_room_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_client_pool_set_output_room");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_client_pool
+ *(void **) (&snd_seq_get_client_pool_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_client_pool");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_client_pool
+ *(void **) (&snd_seq_set_client_pool_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_client_pool");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_sizeof
+ *(void **) (&snd_seq_port_info_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_malloc
+ *(void **) (&snd_seq_port_info_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_free
+ *(void **) (&snd_seq_port_info_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_copy
+ *(void **) (&snd_seq_port_info_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_client
+ *(void **) (&snd_seq_port_info_get_client_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_client");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_port
+ *(void **) (&snd_seq_port_info_get_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_addr
+ *(void **) (&snd_seq_port_info_get_addr_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_addr");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_name
+ *(void **) (&snd_seq_port_info_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_capability
+ *(void **) (&snd_seq_port_info_get_capability_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_capability");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_type
+ *(void **) (&snd_seq_port_info_get_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_midi_channels
+ *(void **) (&snd_seq_port_info_get_midi_channels_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_midi_channels");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_midi_voices
+ *(void **) (&snd_seq_port_info_get_midi_voices_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_midi_voices");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_synth_voices
+ *(void **) (&snd_seq_port_info_get_synth_voices_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_synth_voices");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_read_use
+ *(void **) (&snd_seq_port_info_get_read_use_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_read_use");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_write_use
+ *(void **) (&snd_seq_port_info_get_write_use_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_write_use");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_port_specified
+ *(void **) (&snd_seq_port_info_get_port_specified_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_port_specified");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_timestamping
+ *(void **) (&snd_seq_port_info_get_timestamping_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_timestamping");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_timestamp_real
+ *(void **) (&snd_seq_port_info_get_timestamp_real_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_timestamp_real");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_get_timestamp_queue
+ *(void **) (&snd_seq_port_info_get_timestamp_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_get_timestamp_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_client
+ *(void **) (&snd_seq_port_info_set_client_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_client");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_port
+ *(void **) (&snd_seq_port_info_set_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_addr
+ *(void **) (&snd_seq_port_info_set_addr_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_addr");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_name
+ *(void **) (&snd_seq_port_info_set_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_capability
+ *(void **) (&snd_seq_port_info_set_capability_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_capability");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_type
+ *(void **) (&snd_seq_port_info_set_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_midi_channels
+ *(void **) (&snd_seq_port_info_set_midi_channels_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_midi_channels");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_midi_voices
+ *(void **) (&snd_seq_port_info_set_midi_voices_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_midi_voices");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_synth_voices
+ *(void **) (&snd_seq_port_info_set_synth_voices_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_synth_voices");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_port_specified
+ *(void **) (&snd_seq_port_info_set_port_specified_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_port_specified");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_timestamping
+ *(void **) (&snd_seq_port_info_set_timestamping_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_timestamping");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_timestamp_real
+ *(void **) (&snd_seq_port_info_set_timestamp_real_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_timestamp_real");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_info_set_timestamp_queue
+ *(void **) (&snd_seq_port_info_set_timestamp_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_info_set_timestamp_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_create_port
+ *(void **) (&snd_seq_create_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_create_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_delete_port
+ *(void **) (&snd_seq_delete_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_delete_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_port_info
+ *(void **) (&snd_seq_get_port_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_port_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_any_port_info
+ *(void **) (&snd_seq_get_any_port_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_any_port_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_port_info
+ *(void **) (&snd_seq_set_port_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_port_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_next_port
+ *(void **) (&snd_seq_query_next_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_next_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_sizeof
+ *(void **) (&snd_seq_port_subscribe_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_malloc
+ *(void **) (&snd_seq_port_subscribe_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_free
+ *(void **) (&snd_seq_port_subscribe_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_copy
+ *(void **) (&snd_seq_port_subscribe_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_get_sender
+ *(void **) (&snd_seq_port_subscribe_get_sender_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_get_sender");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_get_dest
+ *(void **) (&snd_seq_port_subscribe_get_dest_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_get_dest");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_get_queue
+ *(void **) (&snd_seq_port_subscribe_get_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_get_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_get_exclusive
+ *(void **) (&snd_seq_port_subscribe_get_exclusive_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_get_exclusive");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_get_time_update
+ *(void **) (&snd_seq_port_subscribe_get_time_update_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_get_time_update");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_get_time_real
+ *(void **) (&snd_seq_port_subscribe_get_time_real_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_get_time_real");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_set_sender
+ *(void **) (&snd_seq_port_subscribe_set_sender_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_set_sender");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_set_dest
+ *(void **) (&snd_seq_port_subscribe_set_dest_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_set_dest");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_set_queue
+ *(void **) (&snd_seq_port_subscribe_set_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_set_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_set_exclusive
+ *(void **) (&snd_seq_port_subscribe_set_exclusive_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_set_exclusive");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_set_time_update
+ *(void **) (&snd_seq_port_subscribe_set_time_update_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_set_time_update");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_port_subscribe_set_time_real
+ *(void **) (&snd_seq_port_subscribe_set_time_real_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_port_subscribe_set_time_real");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_port_subscription
+ *(void **) (&snd_seq_get_port_subscription_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_port_subscription");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_subscribe_port
+ *(void **) (&snd_seq_subscribe_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_subscribe_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_unsubscribe_port
+ *(void **) (&snd_seq_unsubscribe_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_unsubscribe_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_sizeof
+ *(void **) (&snd_seq_query_subscribe_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_malloc
+ *(void **) (&snd_seq_query_subscribe_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_free
+ *(void **) (&snd_seq_query_subscribe_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_copy
+ *(void **) (&snd_seq_query_subscribe_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_client
+ *(void **) (&snd_seq_query_subscribe_get_client_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_client");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_port
+ *(void **) (&snd_seq_query_subscribe_get_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_root
+ *(void **) (&snd_seq_query_subscribe_get_root_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_root");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_type
+ *(void **) (&snd_seq_query_subscribe_get_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_index
+ *(void **) (&snd_seq_query_subscribe_get_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_num_subs
+ *(void **) (&snd_seq_query_subscribe_get_num_subs_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_num_subs");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_addr
+ *(void **) (&snd_seq_query_subscribe_get_addr_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_addr");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_queue
+ *(void **) (&snd_seq_query_subscribe_get_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_exclusive
+ *(void **) (&snd_seq_query_subscribe_get_exclusive_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_exclusive");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_time_update
+ *(void **) (&snd_seq_query_subscribe_get_time_update_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_time_update");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_get_time_real
+ *(void **) (&snd_seq_query_subscribe_get_time_real_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_get_time_real");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_set_client
+ *(void **) (&snd_seq_query_subscribe_set_client_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_set_client");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_set_port
+ *(void **) (&snd_seq_query_subscribe_set_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_set_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_set_root
+ *(void **) (&snd_seq_query_subscribe_set_root_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_set_root");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_set_type
+ *(void **) (&snd_seq_query_subscribe_set_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_set_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_subscribe_set_index
+ *(void **) (&snd_seq_query_subscribe_set_index_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_subscribe_set_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_port_subscribers
+ *(void **) (&snd_seq_query_port_subscribers_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_port_subscribers");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_sizeof
+ *(void **) (&snd_seq_queue_info_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_malloc
+ *(void **) (&snd_seq_queue_info_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_free
+ *(void **) (&snd_seq_queue_info_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_copy
+ *(void **) (&snd_seq_queue_info_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_get_queue
+ *(void **) (&snd_seq_queue_info_get_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_get_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_get_name
+ *(void **) (&snd_seq_queue_info_get_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_get_owner
+ *(void **) (&snd_seq_queue_info_get_owner_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_get_owner");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_get_locked
+ *(void **) (&snd_seq_queue_info_get_locked_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_get_locked");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_get_flags
+ *(void **) (&snd_seq_queue_info_get_flags_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_get_flags");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_set_name
+ *(void **) (&snd_seq_queue_info_set_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_set_owner
+ *(void **) (&snd_seq_queue_info_set_owner_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_set_owner");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_set_locked
+ *(void **) (&snd_seq_queue_info_set_locked_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_set_locked");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_info_set_flags
+ *(void **) (&snd_seq_queue_info_set_flags_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_info_set_flags");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_create_queue
+ *(void **) (&snd_seq_create_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_create_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_alloc_named_queue
+ *(void **) (&snd_seq_alloc_named_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_alloc_named_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_alloc_queue
+ *(void **) (&snd_seq_alloc_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_alloc_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_free_queue
+ *(void **) (&snd_seq_free_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_free_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_queue_info
+ *(void **) (&snd_seq_get_queue_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_queue_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_queue_info
+ *(void **) (&snd_seq_set_queue_info_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_queue_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_query_named_queue
+ *(void **) (&snd_seq_query_named_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_query_named_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_queue_usage
+ *(void **) (&snd_seq_get_queue_usage_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_queue_usage");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_queue_usage
+ *(void **) (&snd_seq_set_queue_usage_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_queue_usage");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_status_sizeof
+ *(void **) (&snd_seq_queue_status_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_status_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_status_malloc
+ *(void **) (&snd_seq_queue_status_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_status_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_status_free
+ *(void **) (&snd_seq_queue_status_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_status_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_status_copy
+ *(void **) (&snd_seq_queue_status_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_status_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_status_get_queue
+ *(void **) (&snd_seq_queue_status_get_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_status_get_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_status_get_events
+ *(void **) (&snd_seq_queue_status_get_events_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_status_get_events");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_status_get_tick_time
+ *(void **) (&snd_seq_queue_status_get_tick_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_status_get_tick_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_status_get_real_time
+ *(void **) (&snd_seq_queue_status_get_real_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_status_get_real_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_status_get_status
+ *(void **) (&snd_seq_queue_status_get_status_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_status_get_status");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_queue_status
+ *(void **) (&snd_seq_get_queue_status_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_queue_status");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_sizeof
+ *(void **) (&snd_seq_queue_tempo_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_malloc
+ *(void **) (&snd_seq_queue_tempo_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_free
+ *(void **) (&snd_seq_queue_tempo_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_copy
+ *(void **) (&snd_seq_queue_tempo_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_get_queue
+ *(void **) (&snd_seq_queue_tempo_get_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_get_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_get_tempo
+ *(void **) (&snd_seq_queue_tempo_get_tempo_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_get_tempo");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_get_ppq
+ *(void **) (&snd_seq_queue_tempo_get_ppq_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_get_ppq");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_get_skew
+ *(void **) (&snd_seq_queue_tempo_get_skew_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_get_skew");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_get_skew_base
+ *(void **) (&snd_seq_queue_tempo_get_skew_base_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_get_skew_base");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_set_tempo
+ *(void **) (&snd_seq_queue_tempo_set_tempo_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_set_tempo");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_set_ppq
+ *(void **) (&snd_seq_queue_tempo_set_ppq_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_set_ppq");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_set_skew
+ *(void **) (&snd_seq_queue_tempo_set_skew_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_set_skew");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_tempo_set_skew_base
+ *(void **) (&snd_seq_queue_tempo_set_skew_base_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_tempo_set_skew_base");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_queue_tempo
+ *(void **) (&snd_seq_get_queue_tempo_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_queue_tempo");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_queue_tempo
+ *(void **) (&snd_seq_set_queue_tempo_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_queue_tempo");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_sizeof
+ *(void **) (&snd_seq_queue_timer_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_malloc
+ *(void **) (&snd_seq_queue_timer_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_free
+ *(void **) (&snd_seq_queue_timer_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_copy
+ *(void **) (&snd_seq_queue_timer_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_get_queue
+ *(void **) (&snd_seq_queue_timer_get_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_get_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_get_type
+ *(void **) (&snd_seq_queue_timer_get_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_get_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_get_id
+ *(void **) (&snd_seq_queue_timer_get_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_get_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_get_resolution
+ *(void **) (&snd_seq_queue_timer_get_resolution_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_get_resolution");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_set_type
+ *(void **) (&snd_seq_queue_timer_set_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_set_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_set_id
+ *(void **) (&snd_seq_queue_timer_set_id_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_set_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_queue_timer_set_resolution
+ *(void **) (&snd_seq_queue_timer_set_resolution_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_queue_timer_set_resolution");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_queue_timer
+ *(void **) (&snd_seq_get_queue_timer_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_queue_timer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_queue_timer
+ *(void **) (&snd_seq_set_queue_timer_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_queue_timer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_free_event
+ *(void **) (&snd_seq_free_event_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_free_event");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_event_length
+ *(void **) (&snd_seq_event_length_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_event_length");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_event_output
+ *(void **) (&snd_seq_event_output_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_event_output");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_event_output_buffer
+ *(void **) (&snd_seq_event_output_buffer_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_event_output_buffer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_event_output_direct
+ *(void **) (&snd_seq_event_output_direct_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_event_output_direct");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_event_input
+ *(void **) (&snd_seq_event_input_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_event_input");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_event_input_pending
+ *(void **) (&snd_seq_event_input_pending_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_event_input_pending");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_drain_output
+ *(void **) (&snd_seq_drain_output_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_drain_output");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_event_output_pending
+ *(void **) (&snd_seq_event_output_pending_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_event_output_pending");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_extract_output
+ *(void **) (&snd_seq_extract_output_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_extract_output");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_drop_output
+ *(void **) (&snd_seq_drop_output_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_drop_output");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_drop_output_buffer
+ *(void **) (&snd_seq_drop_output_buffer_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_drop_output_buffer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_drop_input
+ *(void **) (&snd_seq_drop_input_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_drop_input");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_drop_input_buffer
+ *(void **) (&snd_seq_drop_input_buffer_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_drop_input_buffer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_sizeof
+ *(void **) (&snd_seq_remove_events_sizeof_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_sizeof");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_malloc
+ *(void **) (&snd_seq_remove_events_malloc_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_malloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_free
+ *(void **) (&snd_seq_remove_events_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_copy
+ *(void **) (&snd_seq_remove_events_copy_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_get_condition
+ *(void **) (&snd_seq_remove_events_get_condition_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_get_condition");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_get_queue
+ *(void **) (&snd_seq_remove_events_get_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_get_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_get_time
+ *(void **) (&snd_seq_remove_events_get_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_get_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_get_dest
+ *(void **) (&snd_seq_remove_events_get_dest_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_get_dest");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_get_channel
+ *(void **) (&snd_seq_remove_events_get_channel_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_get_channel");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_get_event_type
+ *(void **) (&snd_seq_remove_events_get_event_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_get_event_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_get_tag
+ *(void **) (&snd_seq_remove_events_get_tag_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_get_tag");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_set_condition
+ *(void **) (&snd_seq_remove_events_set_condition_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_set_condition");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_set_queue
+ *(void **) (&snd_seq_remove_events_set_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_set_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_set_time
+ *(void **) (&snd_seq_remove_events_set_time_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_set_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_set_dest
+ *(void **) (&snd_seq_remove_events_set_dest_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_set_dest");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_set_channel
+ *(void **) (&snd_seq_remove_events_set_channel_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_set_channel");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_set_event_type
+ *(void **) (&snd_seq_remove_events_set_event_type_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_set_event_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events_set_tag
+ *(void **) (&snd_seq_remove_events_set_tag_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events_set_tag");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_remove_events
+ *(void **) (&snd_seq_remove_events_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_remove_events");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_bit
+ *(void **) (&snd_seq_set_bit_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_bit");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_unset_bit
+ *(void **) (&snd_seq_unset_bit_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_unset_bit");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_change_bit
+ *(void **) (&snd_seq_change_bit_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_change_bit");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_get_bit
+ *(void **) (&snd_seq_get_bit_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_get_bit");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_control_queue
+ *(void **) (&snd_seq_control_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_control_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_create_simple_port
+ *(void **) (&snd_seq_create_simple_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_create_simple_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_delete_simple_port
+ *(void **) (&snd_seq_delete_simple_port_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_delete_simple_port");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_connect_from
+ *(void **) (&snd_seq_connect_from_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_connect_from");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_connect_to
+ *(void **) (&snd_seq_connect_to_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_connect_to");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_disconnect_from
+ *(void **) (&snd_seq_disconnect_from_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_disconnect_from");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_disconnect_to
+ *(void **) (&snd_seq_disconnect_to_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_disconnect_to");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_client_name
+ *(void **) (&snd_seq_set_client_name_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_client_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_client_event_filter
+ *(void **) (&snd_seq_set_client_event_filter_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_client_event_filter");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_client_pool_output
+ *(void **) (&snd_seq_set_client_pool_output_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_client_pool_output");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_client_pool_output_room
+ *(void **) (&snd_seq_set_client_pool_output_room_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_client_pool_output_room");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_set_client_pool_input
+ *(void **) (&snd_seq_set_client_pool_input_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_set_client_pool_input");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_sync_output_queue
+ *(void **) (&snd_seq_sync_output_queue_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_sync_output_queue");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_parse_address
+ *(void **) (&snd_seq_parse_address_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_parse_address");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_reset_pool_output
+ *(void **) (&snd_seq_reset_pool_output_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_reset_pool_output");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_seq_reset_pool_input
+ *(void **) (&snd_seq_reset_pool_input_dylibloader_wrapper_asound) = dlsym(handle, "snd_seq_reset_pool_input");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_midi_event_new
+ *(void **) (&snd_midi_event_new_dylibloader_wrapper_asound) = dlsym(handle, "snd_midi_event_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_midi_event_resize_buffer
+ *(void **) (&snd_midi_event_resize_buffer_dylibloader_wrapper_asound) = dlsym(handle, "snd_midi_event_resize_buffer");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_midi_event_free
+ *(void **) (&snd_midi_event_free_dylibloader_wrapper_asound) = dlsym(handle, "snd_midi_event_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_midi_event_init
+ *(void **) (&snd_midi_event_init_dylibloader_wrapper_asound) = dlsym(handle, "snd_midi_event_init");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_midi_event_reset_encode
+ *(void **) (&snd_midi_event_reset_encode_dylibloader_wrapper_asound) = dlsym(handle, "snd_midi_event_reset_encode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_midi_event_reset_decode
+ *(void **) (&snd_midi_event_reset_decode_dylibloader_wrapper_asound) = dlsym(handle, "snd_midi_event_reset_decode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_midi_event_no_status
+ *(void **) (&snd_midi_event_no_status_dylibloader_wrapper_asound) = dlsym(handle, "snd_midi_event_no_status");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_midi_event_encode
+ *(void **) (&snd_midi_event_encode_dylibloader_wrapper_asound) = dlsym(handle, "snd_midi_event_encode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_midi_event_encode_byte
+ *(void **) (&snd_midi_event_encode_byte_dylibloader_wrapper_asound) = dlsym(handle, "snd_midi_event_encode_byte");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// snd_midi_event_decode
+ *(void **) (&snd_midi_event_decode_dylibloader_wrapper_asound) = dlsym(handle, "snd_midi_event_decode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+return 0;
+}
diff --git a/drivers/alsa/asound-so_wrap.h b/drivers/alsa/asound-so_wrap.h
new file mode 100644
index 0000000000..650c651b79
--- /dev/null
+++ b/drivers/alsa/asound-so_wrap.h
@@ -0,0 +1,5148 @@
+#ifndef DYLIBLOAD_WRAPPER_ASOUND
+#define DYLIBLOAD_WRAPPER_ASOUND
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by /home/hp/Projects/godot/pulse/generate-wrapper.py 0.2 on 2021-02-18 00:19:14
+// flags: /home/hp/Projects/godot/pulse/generate-wrapper.py --include /usr/include/alsa/asoundlib.h --sys-include <alsa/asoundlib.h> --soname libasound.so.2 --init-name asound --output-header asound-so_wrap.h --output-implementation asound-so_wrap.c
+//
+#define snd_asoundlib_version snd_asoundlib_version_dylibloader_orig_asound
+#define snd_dlpath snd_dlpath_dylibloader_orig_asound
+#define snd_dlopen snd_dlopen_dylibloader_orig_asound
+#define snd_dlsym snd_dlsym_dylibloader_orig_asound
+#define snd_dlclose snd_dlclose_dylibloader_orig_asound
+#define snd_async_add_handler snd_async_add_handler_dylibloader_orig_asound
+#define snd_async_del_handler snd_async_del_handler_dylibloader_orig_asound
+#define snd_async_handler_get_fd snd_async_handler_get_fd_dylibloader_orig_asound
+#define snd_async_handler_get_signo snd_async_handler_get_signo_dylibloader_orig_asound
+#define snd_async_handler_get_callback_private snd_async_handler_get_callback_private_dylibloader_orig_asound
+#define snd_shm_area_create snd_shm_area_create_dylibloader_orig_asound
+#define snd_shm_area_share snd_shm_area_share_dylibloader_orig_asound
+#define snd_shm_area_destroy snd_shm_area_destroy_dylibloader_orig_asound
+#define snd_user_file snd_user_file_dylibloader_orig_asound
+#define snd_input_stdio_open snd_input_stdio_open_dylibloader_orig_asound
+#define snd_input_stdio_attach snd_input_stdio_attach_dylibloader_orig_asound
+#define snd_input_buffer_open snd_input_buffer_open_dylibloader_orig_asound
+#define snd_input_close snd_input_close_dylibloader_orig_asound
+#define snd_input_scanf snd_input_scanf_dylibloader_orig_asound
+#define snd_input_gets snd_input_gets_dylibloader_orig_asound
+#define snd_input_getc snd_input_getc_dylibloader_orig_asound
+#define snd_input_ungetc snd_input_ungetc_dylibloader_orig_asound
+#define snd_output_stdio_open snd_output_stdio_open_dylibloader_orig_asound
+#define snd_output_stdio_attach snd_output_stdio_attach_dylibloader_orig_asound
+#define snd_output_buffer_open snd_output_buffer_open_dylibloader_orig_asound
+#define snd_output_buffer_string snd_output_buffer_string_dylibloader_orig_asound
+#define snd_output_close snd_output_close_dylibloader_orig_asound
+#define snd_output_printf snd_output_printf_dylibloader_orig_asound
+#define snd_output_vprintf snd_output_vprintf_dylibloader_orig_asound
+#define snd_output_puts snd_output_puts_dylibloader_orig_asound
+#define snd_output_putc snd_output_putc_dylibloader_orig_asound
+#define snd_output_flush snd_output_flush_dylibloader_orig_asound
+#define snd_strerror snd_strerror_dylibloader_orig_asound
+#define snd_lib_error_set_handler snd_lib_error_set_handler_dylibloader_orig_asound
+#define snd_lib_error_set_local snd_lib_error_set_local_dylibloader_orig_asound
+#define snd_config_topdir snd_config_topdir_dylibloader_orig_asound
+#define snd_config_top snd_config_top_dylibloader_orig_asound
+#define snd_config_load snd_config_load_dylibloader_orig_asound
+#define snd_config_load_override snd_config_load_override_dylibloader_orig_asound
+#define snd_config_save snd_config_save_dylibloader_orig_asound
+#define snd_config_update snd_config_update_dylibloader_orig_asound
+#define snd_config_update_r snd_config_update_r_dylibloader_orig_asound
+#define snd_config_update_free snd_config_update_free_dylibloader_orig_asound
+#define snd_config_update_free_global snd_config_update_free_global_dylibloader_orig_asound
+#define snd_config_update_ref snd_config_update_ref_dylibloader_orig_asound
+#define snd_config_ref snd_config_ref_dylibloader_orig_asound
+#define snd_config_unref snd_config_unref_dylibloader_orig_asound
+#define snd_config_search snd_config_search_dylibloader_orig_asound
+#define snd_config_searchv snd_config_searchv_dylibloader_orig_asound
+#define snd_config_search_definition snd_config_search_definition_dylibloader_orig_asound
+#define snd_config_expand snd_config_expand_dylibloader_orig_asound
+#define snd_config_evaluate snd_config_evaluate_dylibloader_orig_asound
+#define snd_config_add snd_config_add_dylibloader_orig_asound
+#define snd_config_add_before snd_config_add_before_dylibloader_orig_asound
+#define snd_config_add_after snd_config_add_after_dylibloader_orig_asound
+#define snd_config_remove snd_config_remove_dylibloader_orig_asound
+#define snd_config_delete snd_config_delete_dylibloader_orig_asound
+#define snd_config_delete_compound_members snd_config_delete_compound_members_dylibloader_orig_asound
+#define snd_config_copy snd_config_copy_dylibloader_orig_asound
+#define snd_config_make snd_config_make_dylibloader_orig_asound
+#define snd_config_make_integer snd_config_make_integer_dylibloader_orig_asound
+#define snd_config_make_integer64 snd_config_make_integer64_dylibloader_orig_asound
+#define snd_config_make_real snd_config_make_real_dylibloader_orig_asound
+#define snd_config_make_string snd_config_make_string_dylibloader_orig_asound
+#define snd_config_make_pointer snd_config_make_pointer_dylibloader_orig_asound
+#define snd_config_make_compound snd_config_make_compound_dylibloader_orig_asound
+#define snd_config_imake_integer snd_config_imake_integer_dylibloader_orig_asound
+#define snd_config_imake_integer64 snd_config_imake_integer64_dylibloader_orig_asound
+#define snd_config_imake_real snd_config_imake_real_dylibloader_orig_asound
+#define snd_config_imake_string snd_config_imake_string_dylibloader_orig_asound
+#define snd_config_imake_safe_string snd_config_imake_safe_string_dylibloader_orig_asound
+#define snd_config_imake_pointer snd_config_imake_pointer_dylibloader_orig_asound
+#define snd_config_get_type snd_config_get_type_dylibloader_orig_asound
+#define snd_config_is_array snd_config_is_array_dylibloader_orig_asound
+#define snd_config_set_id snd_config_set_id_dylibloader_orig_asound
+#define snd_config_set_integer snd_config_set_integer_dylibloader_orig_asound
+#define snd_config_set_integer64 snd_config_set_integer64_dylibloader_orig_asound
+#define snd_config_set_real snd_config_set_real_dylibloader_orig_asound
+#define snd_config_set_string snd_config_set_string_dylibloader_orig_asound
+#define snd_config_set_ascii snd_config_set_ascii_dylibloader_orig_asound
+#define snd_config_set_pointer snd_config_set_pointer_dylibloader_orig_asound
+#define snd_config_get_id snd_config_get_id_dylibloader_orig_asound
+#define snd_config_get_integer snd_config_get_integer_dylibloader_orig_asound
+#define snd_config_get_integer64 snd_config_get_integer64_dylibloader_orig_asound
+#define snd_config_get_real snd_config_get_real_dylibloader_orig_asound
+#define snd_config_get_ireal snd_config_get_ireal_dylibloader_orig_asound
+#define snd_config_get_string snd_config_get_string_dylibloader_orig_asound
+#define snd_config_get_ascii snd_config_get_ascii_dylibloader_orig_asound
+#define snd_config_get_pointer snd_config_get_pointer_dylibloader_orig_asound
+#define snd_config_test_id snd_config_test_id_dylibloader_orig_asound
+#define snd_config_iterator_first snd_config_iterator_first_dylibloader_orig_asound
+#define snd_config_iterator_next snd_config_iterator_next_dylibloader_orig_asound
+#define snd_config_iterator_end snd_config_iterator_end_dylibloader_orig_asound
+#define snd_config_iterator_entry snd_config_iterator_entry_dylibloader_orig_asound
+#define snd_config_get_bool_ascii snd_config_get_bool_ascii_dylibloader_orig_asound
+#define snd_config_get_bool snd_config_get_bool_dylibloader_orig_asound
+#define snd_config_get_ctl_iface_ascii snd_config_get_ctl_iface_ascii_dylibloader_orig_asound
+#define snd_config_get_ctl_iface snd_config_get_ctl_iface_dylibloader_orig_asound
+#define snd_names_list snd_names_list_dylibloader_orig_asound
+#define snd_names_list_free snd_names_list_free_dylibloader_orig_asound
+#define snd_pcm_open snd_pcm_open_dylibloader_orig_asound
+#define snd_pcm_open_lconf snd_pcm_open_lconf_dylibloader_orig_asound
+#define snd_pcm_open_fallback snd_pcm_open_fallback_dylibloader_orig_asound
+#define snd_pcm_close snd_pcm_close_dylibloader_orig_asound
+#define snd_pcm_name snd_pcm_name_dylibloader_orig_asound
+#define snd_pcm_type snd_pcm_type_dylibloader_orig_asound
+#define snd_pcm_stream snd_pcm_stream_dylibloader_orig_asound
+#define snd_pcm_poll_descriptors_count snd_pcm_poll_descriptors_count_dylibloader_orig_asound
+#define snd_pcm_poll_descriptors snd_pcm_poll_descriptors_dylibloader_orig_asound
+#define snd_pcm_poll_descriptors_revents snd_pcm_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_pcm_nonblock snd_pcm_nonblock_dylibloader_orig_asound
+#define snd_async_add_pcm_handler snd_async_add_pcm_handler_dylibloader_orig_asound
+#define snd_async_handler_get_pcm snd_async_handler_get_pcm_dylibloader_orig_asound
+#define snd_pcm_info snd_pcm_info_dylibloader_orig_asound
+#define snd_pcm_hw_params_current snd_pcm_hw_params_current_dylibloader_orig_asound
+#define snd_pcm_hw_params snd_pcm_hw_params_dylibloader_orig_asound
+#define snd_pcm_hw_free snd_pcm_hw_free_dylibloader_orig_asound
+#define snd_pcm_sw_params_current snd_pcm_sw_params_current_dylibloader_orig_asound
+#define snd_pcm_sw_params snd_pcm_sw_params_dylibloader_orig_asound
+#define snd_pcm_prepare snd_pcm_prepare_dylibloader_orig_asound
+#define snd_pcm_reset snd_pcm_reset_dylibloader_orig_asound
+#define snd_pcm_status snd_pcm_status_dylibloader_orig_asound
+#define snd_pcm_start snd_pcm_start_dylibloader_orig_asound
+#define snd_pcm_drop snd_pcm_drop_dylibloader_orig_asound
+#define snd_pcm_drain snd_pcm_drain_dylibloader_orig_asound
+#define snd_pcm_pause snd_pcm_pause_dylibloader_orig_asound
+#define snd_pcm_state snd_pcm_state_dylibloader_orig_asound
+#define snd_pcm_hwsync snd_pcm_hwsync_dylibloader_orig_asound
+#define snd_pcm_delay snd_pcm_delay_dylibloader_orig_asound
+#define snd_pcm_resume snd_pcm_resume_dylibloader_orig_asound
+#define snd_pcm_htimestamp snd_pcm_htimestamp_dylibloader_orig_asound
+#define snd_pcm_avail snd_pcm_avail_dylibloader_orig_asound
+#define snd_pcm_avail_update snd_pcm_avail_update_dylibloader_orig_asound
+#define snd_pcm_avail_delay snd_pcm_avail_delay_dylibloader_orig_asound
+#define snd_pcm_rewindable snd_pcm_rewindable_dylibloader_orig_asound
+#define snd_pcm_rewind snd_pcm_rewind_dylibloader_orig_asound
+#define snd_pcm_forwardable snd_pcm_forwardable_dylibloader_orig_asound
+#define snd_pcm_forward snd_pcm_forward_dylibloader_orig_asound
+#define snd_pcm_writei snd_pcm_writei_dylibloader_orig_asound
+#define snd_pcm_readi snd_pcm_readi_dylibloader_orig_asound
+#define snd_pcm_writen snd_pcm_writen_dylibloader_orig_asound
+#define snd_pcm_readn snd_pcm_readn_dylibloader_orig_asound
+#define snd_pcm_wait snd_pcm_wait_dylibloader_orig_asound
+#define snd_pcm_link snd_pcm_link_dylibloader_orig_asound
+#define snd_pcm_unlink snd_pcm_unlink_dylibloader_orig_asound
+#define snd_pcm_query_chmaps snd_pcm_query_chmaps_dylibloader_orig_asound
+#define snd_pcm_query_chmaps_from_hw snd_pcm_query_chmaps_from_hw_dylibloader_orig_asound
+#define snd_pcm_free_chmaps snd_pcm_free_chmaps_dylibloader_orig_asound
+#define snd_pcm_get_chmap snd_pcm_get_chmap_dylibloader_orig_asound
+#define snd_pcm_set_chmap snd_pcm_set_chmap_dylibloader_orig_asound
+#define snd_pcm_chmap_type_name snd_pcm_chmap_type_name_dylibloader_orig_asound
+#define snd_pcm_chmap_name snd_pcm_chmap_name_dylibloader_orig_asound
+#define snd_pcm_chmap_long_name snd_pcm_chmap_long_name_dylibloader_orig_asound
+#define snd_pcm_chmap_print snd_pcm_chmap_print_dylibloader_orig_asound
+#define snd_pcm_chmap_from_string snd_pcm_chmap_from_string_dylibloader_orig_asound
+#define snd_pcm_chmap_parse_string snd_pcm_chmap_parse_string_dylibloader_orig_asound
+#define snd_pcm_recover snd_pcm_recover_dylibloader_orig_asound
+#define snd_pcm_set_params snd_pcm_set_params_dylibloader_orig_asound
+#define snd_pcm_get_params snd_pcm_get_params_dylibloader_orig_asound
+#define snd_pcm_info_sizeof snd_pcm_info_sizeof_dylibloader_orig_asound
+#define snd_pcm_info_malloc snd_pcm_info_malloc_dylibloader_orig_asound
+#define snd_pcm_info_free snd_pcm_info_free_dylibloader_orig_asound
+#define snd_pcm_info_copy snd_pcm_info_copy_dylibloader_orig_asound
+#define snd_pcm_info_get_device snd_pcm_info_get_device_dylibloader_orig_asound
+#define snd_pcm_info_get_subdevice snd_pcm_info_get_subdevice_dylibloader_orig_asound
+#define snd_pcm_info_get_stream snd_pcm_info_get_stream_dylibloader_orig_asound
+#define snd_pcm_info_get_card snd_pcm_info_get_card_dylibloader_orig_asound
+#define snd_pcm_info_get_id snd_pcm_info_get_id_dylibloader_orig_asound
+#define snd_pcm_info_get_name snd_pcm_info_get_name_dylibloader_orig_asound
+#define snd_pcm_info_get_subdevice_name snd_pcm_info_get_subdevice_name_dylibloader_orig_asound
+#define snd_pcm_info_get_class snd_pcm_info_get_class_dylibloader_orig_asound
+#define snd_pcm_info_get_subclass snd_pcm_info_get_subclass_dylibloader_orig_asound
+#define snd_pcm_info_get_subdevices_count snd_pcm_info_get_subdevices_count_dylibloader_orig_asound
+#define snd_pcm_info_get_subdevices_avail snd_pcm_info_get_subdevices_avail_dylibloader_orig_asound
+#define snd_pcm_info_get_sync snd_pcm_info_get_sync_dylibloader_orig_asound
+#define snd_pcm_info_set_device snd_pcm_info_set_device_dylibloader_orig_asound
+#define snd_pcm_info_set_subdevice snd_pcm_info_set_subdevice_dylibloader_orig_asound
+#define snd_pcm_info_set_stream snd_pcm_info_set_stream_dylibloader_orig_asound
+#define snd_pcm_hw_params_any snd_pcm_hw_params_any_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_mmap_sample_resolution snd_pcm_hw_params_can_mmap_sample_resolution_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_double snd_pcm_hw_params_is_double_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_batch snd_pcm_hw_params_is_batch_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_block_transfer snd_pcm_hw_params_is_block_transfer_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_monotonic snd_pcm_hw_params_is_monotonic_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_overrange snd_pcm_hw_params_can_overrange_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_pause snd_pcm_hw_params_can_pause_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_resume snd_pcm_hw_params_can_resume_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_half_duplex snd_pcm_hw_params_is_half_duplex_dylibloader_orig_asound
+#define snd_pcm_hw_params_is_joint_duplex snd_pcm_hw_params_is_joint_duplex_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_sync_start snd_pcm_hw_params_can_sync_start_dylibloader_orig_asound
+#define snd_pcm_hw_params_can_disable_period_wakeup snd_pcm_hw_params_can_disable_period_wakeup_dylibloader_orig_asound
+#define snd_pcm_hw_params_supports_audio_wallclock_ts snd_pcm_hw_params_supports_audio_wallclock_ts_dylibloader_orig_asound
+#define snd_pcm_hw_params_supports_audio_ts_type snd_pcm_hw_params_supports_audio_ts_type_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_rate_numden snd_pcm_hw_params_get_rate_numden_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_sbits snd_pcm_hw_params_get_sbits_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_fifo_size snd_pcm_hw_params_get_fifo_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_sizeof snd_pcm_hw_params_sizeof_dylibloader_orig_asound
+#define snd_pcm_hw_params_malloc snd_pcm_hw_params_malloc_dylibloader_orig_asound
+#define snd_pcm_hw_params_free snd_pcm_hw_params_free_dylibloader_orig_asound
+#define snd_pcm_hw_params_copy snd_pcm_hw_params_copy_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_access snd_pcm_hw_params_get_access_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_access snd_pcm_hw_params_test_access_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_access snd_pcm_hw_params_set_access_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_access_first snd_pcm_hw_params_set_access_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_access_last snd_pcm_hw_params_set_access_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_access_mask snd_pcm_hw_params_set_access_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_access_mask snd_pcm_hw_params_get_access_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_format snd_pcm_hw_params_get_format_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_format snd_pcm_hw_params_test_format_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_format snd_pcm_hw_params_set_format_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_format_first snd_pcm_hw_params_set_format_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_format_last snd_pcm_hw_params_set_format_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_format_mask snd_pcm_hw_params_set_format_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_format_mask snd_pcm_hw_params_get_format_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_subformat snd_pcm_hw_params_get_subformat_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_subformat snd_pcm_hw_params_test_subformat_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_subformat snd_pcm_hw_params_set_subformat_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_subformat_first snd_pcm_hw_params_set_subformat_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_subformat_last snd_pcm_hw_params_set_subformat_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_subformat_mask snd_pcm_hw_params_set_subformat_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_subformat_mask snd_pcm_hw_params_get_subformat_mask_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_channels snd_pcm_hw_params_get_channels_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_channels_min snd_pcm_hw_params_get_channels_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_channels_max snd_pcm_hw_params_get_channels_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_channels snd_pcm_hw_params_test_channels_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels snd_pcm_hw_params_set_channels_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_min snd_pcm_hw_params_set_channels_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_max snd_pcm_hw_params_set_channels_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_minmax snd_pcm_hw_params_set_channels_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_near snd_pcm_hw_params_set_channels_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_first snd_pcm_hw_params_set_channels_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_channels_last snd_pcm_hw_params_set_channels_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_rate snd_pcm_hw_params_get_rate_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_rate_min snd_pcm_hw_params_get_rate_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_rate_max snd_pcm_hw_params_get_rate_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_rate snd_pcm_hw_params_test_rate_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate snd_pcm_hw_params_set_rate_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_min snd_pcm_hw_params_set_rate_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_max snd_pcm_hw_params_set_rate_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_minmax snd_pcm_hw_params_set_rate_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_near snd_pcm_hw_params_set_rate_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_first snd_pcm_hw_params_set_rate_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_last snd_pcm_hw_params_set_rate_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_rate_resample snd_pcm_hw_params_set_rate_resample_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_rate_resample snd_pcm_hw_params_get_rate_resample_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_export_buffer snd_pcm_hw_params_set_export_buffer_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_export_buffer snd_pcm_hw_params_get_export_buffer_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_wakeup snd_pcm_hw_params_set_period_wakeup_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_wakeup snd_pcm_hw_params_get_period_wakeup_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_time snd_pcm_hw_params_get_period_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_time_min snd_pcm_hw_params_get_period_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_time_max snd_pcm_hw_params_get_period_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_period_time snd_pcm_hw_params_test_period_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time snd_pcm_hw_params_set_period_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_min snd_pcm_hw_params_set_period_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_max snd_pcm_hw_params_set_period_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_minmax snd_pcm_hw_params_set_period_time_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_near snd_pcm_hw_params_set_period_time_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_first snd_pcm_hw_params_set_period_time_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_time_last snd_pcm_hw_params_set_period_time_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_size snd_pcm_hw_params_get_period_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_size_min snd_pcm_hw_params_get_period_size_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_period_size_max snd_pcm_hw_params_get_period_size_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_period_size snd_pcm_hw_params_test_period_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size snd_pcm_hw_params_set_period_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_min snd_pcm_hw_params_set_period_size_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_max snd_pcm_hw_params_set_period_size_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_minmax snd_pcm_hw_params_set_period_size_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_near snd_pcm_hw_params_set_period_size_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_first snd_pcm_hw_params_set_period_size_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_last snd_pcm_hw_params_set_period_size_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_period_size_integer snd_pcm_hw_params_set_period_size_integer_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_periods snd_pcm_hw_params_get_periods_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_periods_min snd_pcm_hw_params_get_periods_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_periods_max snd_pcm_hw_params_get_periods_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_periods snd_pcm_hw_params_test_periods_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods snd_pcm_hw_params_set_periods_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_min snd_pcm_hw_params_set_periods_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_max snd_pcm_hw_params_set_periods_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_minmax snd_pcm_hw_params_set_periods_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_near snd_pcm_hw_params_set_periods_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_first snd_pcm_hw_params_set_periods_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_last snd_pcm_hw_params_set_periods_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_periods_integer snd_pcm_hw_params_set_periods_integer_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_time snd_pcm_hw_params_get_buffer_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_time_min snd_pcm_hw_params_get_buffer_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_time_max snd_pcm_hw_params_get_buffer_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_buffer_time snd_pcm_hw_params_test_buffer_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time snd_pcm_hw_params_set_buffer_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_min snd_pcm_hw_params_set_buffer_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_max snd_pcm_hw_params_set_buffer_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_minmax snd_pcm_hw_params_set_buffer_time_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_near snd_pcm_hw_params_set_buffer_time_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_first snd_pcm_hw_params_set_buffer_time_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_time_last snd_pcm_hw_params_set_buffer_time_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_size snd_pcm_hw_params_get_buffer_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_size_min snd_pcm_hw_params_get_buffer_size_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_buffer_size_max snd_pcm_hw_params_get_buffer_size_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_buffer_size snd_pcm_hw_params_test_buffer_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size snd_pcm_hw_params_set_buffer_size_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_min snd_pcm_hw_params_set_buffer_size_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_max snd_pcm_hw_params_set_buffer_size_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_minmax snd_pcm_hw_params_set_buffer_size_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_near snd_pcm_hw_params_set_buffer_size_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_first snd_pcm_hw_params_set_buffer_size_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_buffer_size_last snd_pcm_hw_params_set_buffer_size_last_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_min_align snd_pcm_hw_params_get_min_align_dylibloader_orig_asound
+#define snd_pcm_sw_params_sizeof snd_pcm_sw_params_sizeof_dylibloader_orig_asound
+#define snd_pcm_sw_params_malloc snd_pcm_sw_params_malloc_dylibloader_orig_asound
+#define snd_pcm_sw_params_free snd_pcm_sw_params_free_dylibloader_orig_asound
+#define snd_pcm_sw_params_copy snd_pcm_sw_params_copy_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_boundary snd_pcm_sw_params_get_boundary_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_tstamp_mode snd_pcm_sw_params_set_tstamp_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_tstamp_mode snd_pcm_sw_params_get_tstamp_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_tstamp_type snd_pcm_sw_params_set_tstamp_type_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_tstamp_type snd_pcm_sw_params_get_tstamp_type_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_avail_min snd_pcm_sw_params_set_avail_min_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_avail_min snd_pcm_sw_params_get_avail_min_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_period_event snd_pcm_sw_params_set_period_event_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_period_event snd_pcm_sw_params_get_period_event_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_start_threshold snd_pcm_sw_params_set_start_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_start_threshold snd_pcm_sw_params_get_start_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_stop_threshold snd_pcm_sw_params_set_stop_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_stop_threshold snd_pcm_sw_params_get_stop_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_silence_threshold snd_pcm_sw_params_set_silence_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_silence_threshold snd_pcm_sw_params_get_silence_threshold_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_silence_size snd_pcm_sw_params_set_silence_size_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_silence_size snd_pcm_sw_params_get_silence_size_dylibloader_orig_asound
+#define snd_pcm_access_mask_sizeof snd_pcm_access_mask_sizeof_dylibloader_orig_asound
+#define snd_pcm_access_mask_malloc snd_pcm_access_mask_malloc_dylibloader_orig_asound
+#define snd_pcm_access_mask_free snd_pcm_access_mask_free_dylibloader_orig_asound
+#define snd_pcm_access_mask_copy snd_pcm_access_mask_copy_dylibloader_orig_asound
+#define snd_pcm_access_mask_none snd_pcm_access_mask_none_dylibloader_orig_asound
+#define snd_pcm_access_mask_any snd_pcm_access_mask_any_dylibloader_orig_asound
+#define snd_pcm_access_mask_test snd_pcm_access_mask_test_dylibloader_orig_asound
+#define snd_pcm_access_mask_empty snd_pcm_access_mask_empty_dylibloader_orig_asound
+#define snd_pcm_access_mask_set snd_pcm_access_mask_set_dylibloader_orig_asound
+#define snd_pcm_access_mask_reset snd_pcm_access_mask_reset_dylibloader_orig_asound
+#define snd_pcm_format_mask_sizeof snd_pcm_format_mask_sizeof_dylibloader_orig_asound
+#define snd_pcm_format_mask_malloc snd_pcm_format_mask_malloc_dylibloader_orig_asound
+#define snd_pcm_format_mask_free snd_pcm_format_mask_free_dylibloader_orig_asound
+#define snd_pcm_format_mask_copy snd_pcm_format_mask_copy_dylibloader_orig_asound
+#define snd_pcm_format_mask_none snd_pcm_format_mask_none_dylibloader_orig_asound
+#define snd_pcm_format_mask_any snd_pcm_format_mask_any_dylibloader_orig_asound
+#define snd_pcm_format_mask_test snd_pcm_format_mask_test_dylibloader_orig_asound
+#define snd_pcm_format_mask_empty snd_pcm_format_mask_empty_dylibloader_orig_asound
+#define snd_pcm_format_mask_set snd_pcm_format_mask_set_dylibloader_orig_asound
+#define snd_pcm_format_mask_reset snd_pcm_format_mask_reset_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_sizeof snd_pcm_subformat_mask_sizeof_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_malloc snd_pcm_subformat_mask_malloc_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_free snd_pcm_subformat_mask_free_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_copy snd_pcm_subformat_mask_copy_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_none snd_pcm_subformat_mask_none_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_any snd_pcm_subformat_mask_any_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_test snd_pcm_subformat_mask_test_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_empty snd_pcm_subformat_mask_empty_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_set snd_pcm_subformat_mask_set_dylibloader_orig_asound
+#define snd_pcm_subformat_mask_reset snd_pcm_subformat_mask_reset_dylibloader_orig_asound
+#define snd_pcm_status_sizeof snd_pcm_status_sizeof_dylibloader_orig_asound
+#define snd_pcm_status_malloc snd_pcm_status_malloc_dylibloader_orig_asound
+#define snd_pcm_status_free snd_pcm_status_free_dylibloader_orig_asound
+#define snd_pcm_status_copy snd_pcm_status_copy_dylibloader_orig_asound
+#define snd_pcm_status_get_state snd_pcm_status_get_state_dylibloader_orig_asound
+#define snd_pcm_status_get_trigger_tstamp snd_pcm_status_get_trigger_tstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_trigger_htstamp snd_pcm_status_get_trigger_htstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_tstamp snd_pcm_status_get_tstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_htstamp snd_pcm_status_get_htstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_audio_htstamp snd_pcm_status_get_audio_htstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_driver_htstamp snd_pcm_status_get_driver_htstamp_dylibloader_orig_asound
+#define snd_pcm_status_get_audio_htstamp_report snd_pcm_status_get_audio_htstamp_report_dylibloader_orig_asound
+#define snd_pcm_status_set_audio_htstamp_config snd_pcm_status_set_audio_htstamp_config_dylibloader_orig_asound
+#define snd_pcm_status_get_delay snd_pcm_status_get_delay_dylibloader_orig_asound
+#define snd_pcm_status_get_avail snd_pcm_status_get_avail_dylibloader_orig_asound
+#define snd_pcm_status_get_avail_max snd_pcm_status_get_avail_max_dylibloader_orig_asound
+#define snd_pcm_status_get_overrange snd_pcm_status_get_overrange_dylibloader_orig_asound
+#define snd_pcm_type_name snd_pcm_type_name_dylibloader_orig_asound
+#define snd_pcm_stream_name snd_pcm_stream_name_dylibloader_orig_asound
+#define snd_pcm_access_name snd_pcm_access_name_dylibloader_orig_asound
+#define snd_pcm_format_name snd_pcm_format_name_dylibloader_orig_asound
+#define snd_pcm_format_description snd_pcm_format_description_dylibloader_orig_asound
+#define snd_pcm_subformat_name snd_pcm_subformat_name_dylibloader_orig_asound
+#define snd_pcm_subformat_description snd_pcm_subformat_description_dylibloader_orig_asound
+#define snd_pcm_format_value snd_pcm_format_value_dylibloader_orig_asound
+#define snd_pcm_tstamp_mode_name snd_pcm_tstamp_mode_name_dylibloader_orig_asound
+#define snd_pcm_state_name snd_pcm_state_name_dylibloader_orig_asound
+#define snd_pcm_dump snd_pcm_dump_dylibloader_orig_asound
+#define snd_pcm_dump_hw_setup snd_pcm_dump_hw_setup_dylibloader_orig_asound
+#define snd_pcm_dump_sw_setup snd_pcm_dump_sw_setup_dylibloader_orig_asound
+#define snd_pcm_dump_setup snd_pcm_dump_setup_dylibloader_orig_asound
+#define snd_pcm_hw_params_dump snd_pcm_hw_params_dump_dylibloader_orig_asound
+#define snd_pcm_sw_params_dump snd_pcm_sw_params_dump_dylibloader_orig_asound
+#define snd_pcm_status_dump snd_pcm_status_dump_dylibloader_orig_asound
+#define snd_pcm_mmap_begin snd_pcm_mmap_begin_dylibloader_orig_asound
+#define snd_pcm_mmap_commit snd_pcm_mmap_commit_dylibloader_orig_asound
+#define snd_pcm_mmap_writei snd_pcm_mmap_writei_dylibloader_orig_asound
+#define snd_pcm_mmap_readi snd_pcm_mmap_readi_dylibloader_orig_asound
+#define snd_pcm_mmap_writen snd_pcm_mmap_writen_dylibloader_orig_asound
+#define snd_pcm_mmap_readn snd_pcm_mmap_readn_dylibloader_orig_asound
+#define snd_pcm_format_signed snd_pcm_format_signed_dylibloader_orig_asound
+#define snd_pcm_format_unsigned snd_pcm_format_unsigned_dylibloader_orig_asound
+#define snd_pcm_format_linear snd_pcm_format_linear_dylibloader_orig_asound
+#define snd_pcm_format_float snd_pcm_format_float_dylibloader_orig_asound
+#define snd_pcm_format_little_endian snd_pcm_format_little_endian_dylibloader_orig_asound
+#define snd_pcm_format_big_endian snd_pcm_format_big_endian_dylibloader_orig_asound
+#define snd_pcm_format_cpu_endian snd_pcm_format_cpu_endian_dylibloader_orig_asound
+#define snd_pcm_format_width snd_pcm_format_width_dylibloader_orig_asound
+#define snd_pcm_format_physical_width snd_pcm_format_physical_width_dylibloader_orig_asound
+#define snd_pcm_build_linear_format snd_pcm_build_linear_format_dylibloader_orig_asound
+#define snd_pcm_format_size snd_pcm_format_size_dylibloader_orig_asound
+#define snd_pcm_format_silence snd_pcm_format_silence_dylibloader_orig_asound
+#define snd_pcm_format_silence_16 snd_pcm_format_silence_16_dylibloader_orig_asound
+#define snd_pcm_format_silence_32 snd_pcm_format_silence_32_dylibloader_orig_asound
+#define snd_pcm_format_silence_64 snd_pcm_format_silence_64_dylibloader_orig_asound
+#define snd_pcm_format_set_silence snd_pcm_format_set_silence_dylibloader_orig_asound
+#define snd_pcm_bytes_to_frames snd_pcm_bytes_to_frames_dylibloader_orig_asound
+#define snd_pcm_frames_to_bytes snd_pcm_frames_to_bytes_dylibloader_orig_asound
+#define snd_pcm_bytes_to_samples snd_pcm_bytes_to_samples_dylibloader_orig_asound
+#define snd_pcm_samples_to_bytes snd_pcm_samples_to_bytes_dylibloader_orig_asound
+#define snd_pcm_area_silence snd_pcm_area_silence_dylibloader_orig_asound
+#define snd_pcm_areas_silence snd_pcm_areas_silence_dylibloader_orig_asound
+#define snd_pcm_area_copy snd_pcm_area_copy_dylibloader_orig_asound
+#define snd_pcm_areas_copy snd_pcm_areas_copy_dylibloader_orig_asound
+#define snd_pcm_areas_copy_wrap snd_pcm_areas_copy_wrap_dylibloader_orig_asound
+#define snd_pcm_hook_get_pcm snd_pcm_hook_get_pcm_dylibloader_orig_asound
+#define snd_pcm_hook_get_private snd_pcm_hook_get_private_dylibloader_orig_asound
+#define snd_pcm_hook_set_private snd_pcm_hook_set_private_dylibloader_orig_asound
+#define snd_pcm_hook_add snd_pcm_hook_add_dylibloader_orig_asound
+#define snd_pcm_hook_remove snd_pcm_hook_remove_dylibloader_orig_asound
+#define snd_pcm_meter_get_bufsize snd_pcm_meter_get_bufsize_dylibloader_orig_asound
+#define snd_pcm_meter_get_channels snd_pcm_meter_get_channels_dylibloader_orig_asound
+#define snd_pcm_meter_get_rate snd_pcm_meter_get_rate_dylibloader_orig_asound
+#define snd_pcm_meter_get_now snd_pcm_meter_get_now_dylibloader_orig_asound
+#define snd_pcm_meter_get_boundary snd_pcm_meter_get_boundary_dylibloader_orig_asound
+#define snd_pcm_meter_add_scope snd_pcm_meter_add_scope_dylibloader_orig_asound
+#define snd_pcm_meter_search_scope snd_pcm_meter_search_scope_dylibloader_orig_asound
+#define snd_pcm_scope_malloc snd_pcm_scope_malloc_dylibloader_orig_asound
+#define snd_pcm_scope_set_ops snd_pcm_scope_set_ops_dylibloader_orig_asound
+#define snd_pcm_scope_set_name snd_pcm_scope_set_name_dylibloader_orig_asound
+#define snd_pcm_scope_get_name snd_pcm_scope_get_name_dylibloader_orig_asound
+#define snd_pcm_scope_get_callback_private snd_pcm_scope_get_callback_private_dylibloader_orig_asound
+#define snd_pcm_scope_set_callback_private snd_pcm_scope_set_callback_private_dylibloader_orig_asound
+#define snd_pcm_scope_s16_open snd_pcm_scope_s16_open_dylibloader_orig_asound
+#define snd_pcm_scope_s16_get_channel_buffer snd_pcm_scope_s16_get_channel_buffer_dylibloader_orig_asound
+#define snd_spcm_init snd_spcm_init_dylibloader_orig_asound
+#define snd_spcm_init_duplex snd_spcm_init_duplex_dylibloader_orig_asound
+#define snd_spcm_init_get_params snd_spcm_init_get_params_dylibloader_orig_asound
+#define snd_pcm_start_mode_name snd_pcm_start_mode_name_dylibloader_orig_asound
+#define snd_pcm_xrun_mode_name snd_pcm_xrun_mode_name_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_start_mode snd_pcm_sw_params_set_start_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_start_mode snd_pcm_sw_params_get_start_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_xrun_mode snd_pcm_sw_params_set_xrun_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_xrun_mode snd_pcm_sw_params_get_xrun_mode_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_xfer_align snd_pcm_sw_params_set_xfer_align_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_xfer_align snd_pcm_sw_params_get_xfer_align_dylibloader_orig_asound
+#define snd_pcm_sw_params_set_sleep_min snd_pcm_sw_params_set_sleep_min_dylibloader_orig_asound
+#define snd_pcm_sw_params_get_sleep_min snd_pcm_sw_params_get_sleep_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_tick_time snd_pcm_hw_params_get_tick_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_tick_time_min snd_pcm_hw_params_get_tick_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_get_tick_time_max snd_pcm_hw_params_get_tick_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_test_tick_time snd_pcm_hw_params_test_tick_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time snd_pcm_hw_params_set_tick_time_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_min snd_pcm_hw_params_set_tick_time_min_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_max snd_pcm_hw_params_set_tick_time_max_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_minmax snd_pcm_hw_params_set_tick_time_minmax_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_near snd_pcm_hw_params_set_tick_time_near_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_first snd_pcm_hw_params_set_tick_time_first_dylibloader_orig_asound
+#define snd_pcm_hw_params_set_tick_time_last snd_pcm_hw_params_set_tick_time_last_dylibloader_orig_asound
+#define snd_rawmidi_open snd_rawmidi_open_dylibloader_orig_asound
+#define snd_rawmidi_open_lconf snd_rawmidi_open_lconf_dylibloader_orig_asound
+#define snd_rawmidi_close snd_rawmidi_close_dylibloader_orig_asound
+#define snd_rawmidi_poll_descriptors_count snd_rawmidi_poll_descriptors_count_dylibloader_orig_asound
+#define snd_rawmidi_poll_descriptors snd_rawmidi_poll_descriptors_dylibloader_orig_asound
+#define snd_rawmidi_poll_descriptors_revents snd_rawmidi_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_rawmidi_nonblock snd_rawmidi_nonblock_dylibloader_orig_asound
+#define snd_rawmidi_info_sizeof snd_rawmidi_info_sizeof_dylibloader_orig_asound
+#define snd_rawmidi_info_malloc snd_rawmidi_info_malloc_dylibloader_orig_asound
+#define snd_rawmidi_info_free snd_rawmidi_info_free_dylibloader_orig_asound
+#define snd_rawmidi_info_copy snd_rawmidi_info_copy_dylibloader_orig_asound
+#define snd_rawmidi_info_get_device snd_rawmidi_info_get_device_dylibloader_orig_asound
+#define snd_rawmidi_info_get_subdevice snd_rawmidi_info_get_subdevice_dylibloader_orig_asound
+#define snd_rawmidi_info_get_stream snd_rawmidi_info_get_stream_dylibloader_orig_asound
+#define snd_rawmidi_info_get_card snd_rawmidi_info_get_card_dylibloader_orig_asound
+#define snd_rawmidi_info_get_flags snd_rawmidi_info_get_flags_dylibloader_orig_asound
+#define snd_rawmidi_info_get_id snd_rawmidi_info_get_id_dylibloader_orig_asound
+#define snd_rawmidi_info_get_name snd_rawmidi_info_get_name_dylibloader_orig_asound
+#define snd_rawmidi_info_get_subdevice_name snd_rawmidi_info_get_subdevice_name_dylibloader_orig_asound
+#define snd_rawmidi_info_get_subdevices_count snd_rawmidi_info_get_subdevices_count_dylibloader_orig_asound
+#define snd_rawmidi_info_get_subdevices_avail snd_rawmidi_info_get_subdevices_avail_dylibloader_orig_asound
+#define snd_rawmidi_info_set_device snd_rawmidi_info_set_device_dylibloader_orig_asound
+#define snd_rawmidi_info_set_subdevice snd_rawmidi_info_set_subdevice_dylibloader_orig_asound
+#define snd_rawmidi_info_set_stream snd_rawmidi_info_set_stream_dylibloader_orig_asound
+#define snd_rawmidi_info snd_rawmidi_info_dylibloader_orig_asound
+#define snd_rawmidi_params_sizeof snd_rawmidi_params_sizeof_dylibloader_orig_asound
+#define snd_rawmidi_params_malloc snd_rawmidi_params_malloc_dylibloader_orig_asound
+#define snd_rawmidi_params_free snd_rawmidi_params_free_dylibloader_orig_asound
+#define snd_rawmidi_params_copy snd_rawmidi_params_copy_dylibloader_orig_asound
+#define snd_rawmidi_params_set_buffer_size snd_rawmidi_params_set_buffer_size_dylibloader_orig_asound
+#define snd_rawmidi_params_get_buffer_size snd_rawmidi_params_get_buffer_size_dylibloader_orig_asound
+#define snd_rawmidi_params_set_avail_min snd_rawmidi_params_set_avail_min_dylibloader_orig_asound
+#define snd_rawmidi_params_get_avail_min snd_rawmidi_params_get_avail_min_dylibloader_orig_asound
+#define snd_rawmidi_params_set_no_active_sensing snd_rawmidi_params_set_no_active_sensing_dylibloader_orig_asound
+#define snd_rawmidi_params_get_no_active_sensing snd_rawmidi_params_get_no_active_sensing_dylibloader_orig_asound
+#define snd_rawmidi_params snd_rawmidi_params_dylibloader_orig_asound
+#define snd_rawmidi_params_current snd_rawmidi_params_current_dylibloader_orig_asound
+#define snd_rawmidi_status_sizeof snd_rawmidi_status_sizeof_dylibloader_orig_asound
+#define snd_rawmidi_status_malloc snd_rawmidi_status_malloc_dylibloader_orig_asound
+#define snd_rawmidi_status_free snd_rawmidi_status_free_dylibloader_orig_asound
+#define snd_rawmidi_status_copy snd_rawmidi_status_copy_dylibloader_orig_asound
+#define snd_rawmidi_status_get_tstamp snd_rawmidi_status_get_tstamp_dylibloader_orig_asound
+#define snd_rawmidi_status_get_avail snd_rawmidi_status_get_avail_dylibloader_orig_asound
+#define snd_rawmidi_status_get_xruns snd_rawmidi_status_get_xruns_dylibloader_orig_asound
+#define snd_rawmidi_status snd_rawmidi_status_dylibloader_orig_asound
+#define snd_rawmidi_drain snd_rawmidi_drain_dylibloader_orig_asound
+#define snd_rawmidi_drop snd_rawmidi_drop_dylibloader_orig_asound
+#define snd_rawmidi_write snd_rawmidi_write_dylibloader_orig_asound
+#define snd_rawmidi_read snd_rawmidi_read_dylibloader_orig_asound
+#define snd_rawmidi_name snd_rawmidi_name_dylibloader_orig_asound
+#define snd_rawmidi_type snd_rawmidi_type_dylibloader_orig_asound
+#define snd_rawmidi_stream snd_rawmidi_stream_dylibloader_orig_asound
+#define snd_timer_query_open snd_timer_query_open_dylibloader_orig_asound
+#define snd_timer_query_open_lconf snd_timer_query_open_lconf_dylibloader_orig_asound
+#define snd_timer_query_close snd_timer_query_close_dylibloader_orig_asound
+#define snd_timer_query_next_device snd_timer_query_next_device_dylibloader_orig_asound
+#define snd_timer_query_info snd_timer_query_info_dylibloader_orig_asound
+#define snd_timer_query_params snd_timer_query_params_dylibloader_orig_asound
+#define snd_timer_query_status snd_timer_query_status_dylibloader_orig_asound
+#define snd_timer_open snd_timer_open_dylibloader_orig_asound
+#define snd_timer_open_lconf snd_timer_open_lconf_dylibloader_orig_asound
+#define snd_timer_close snd_timer_close_dylibloader_orig_asound
+#define snd_async_add_timer_handler snd_async_add_timer_handler_dylibloader_orig_asound
+#define snd_async_handler_get_timer snd_async_handler_get_timer_dylibloader_orig_asound
+#define snd_timer_poll_descriptors_count snd_timer_poll_descriptors_count_dylibloader_orig_asound
+#define snd_timer_poll_descriptors snd_timer_poll_descriptors_dylibloader_orig_asound
+#define snd_timer_poll_descriptors_revents snd_timer_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_timer_info snd_timer_info_dylibloader_orig_asound
+#define snd_timer_params snd_timer_params_dylibloader_orig_asound
+#define snd_timer_status snd_timer_status_dylibloader_orig_asound
+#define snd_timer_start snd_timer_start_dylibloader_orig_asound
+#define snd_timer_stop snd_timer_stop_dylibloader_orig_asound
+#define snd_timer_continue snd_timer_continue_dylibloader_orig_asound
+#define snd_timer_read snd_timer_read_dylibloader_orig_asound
+#define snd_timer_id_sizeof snd_timer_id_sizeof_dylibloader_orig_asound
+#define snd_timer_id_malloc snd_timer_id_malloc_dylibloader_orig_asound
+#define snd_timer_id_free snd_timer_id_free_dylibloader_orig_asound
+#define snd_timer_id_copy snd_timer_id_copy_dylibloader_orig_asound
+#define snd_timer_id_set_class snd_timer_id_set_class_dylibloader_orig_asound
+#define snd_timer_id_get_class snd_timer_id_get_class_dylibloader_orig_asound
+#define snd_timer_id_set_sclass snd_timer_id_set_sclass_dylibloader_orig_asound
+#define snd_timer_id_get_sclass snd_timer_id_get_sclass_dylibloader_orig_asound
+#define snd_timer_id_set_card snd_timer_id_set_card_dylibloader_orig_asound
+#define snd_timer_id_get_card snd_timer_id_get_card_dylibloader_orig_asound
+#define snd_timer_id_set_device snd_timer_id_set_device_dylibloader_orig_asound
+#define snd_timer_id_get_device snd_timer_id_get_device_dylibloader_orig_asound
+#define snd_timer_id_set_subdevice snd_timer_id_set_subdevice_dylibloader_orig_asound
+#define snd_timer_id_get_subdevice snd_timer_id_get_subdevice_dylibloader_orig_asound
+#define snd_timer_ginfo_sizeof snd_timer_ginfo_sizeof_dylibloader_orig_asound
+#define snd_timer_ginfo_malloc snd_timer_ginfo_malloc_dylibloader_orig_asound
+#define snd_timer_ginfo_free snd_timer_ginfo_free_dylibloader_orig_asound
+#define snd_timer_ginfo_copy snd_timer_ginfo_copy_dylibloader_orig_asound
+#define snd_timer_ginfo_set_tid snd_timer_ginfo_set_tid_dylibloader_orig_asound
+#define snd_timer_ginfo_get_tid snd_timer_ginfo_get_tid_dylibloader_orig_asound
+#define snd_timer_ginfo_get_flags snd_timer_ginfo_get_flags_dylibloader_orig_asound
+#define snd_timer_ginfo_get_card snd_timer_ginfo_get_card_dylibloader_orig_asound
+#define snd_timer_ginfo_get_id snd_timer_ginfo_get_id_dylibloader_orig_asound
+#define snd_timer_ginfo_get_name snd_timer_ginfo_get_name_dylibloader_orig_asound
+#define snd_timer_ginfo_get_resolution snd_timer_ginfo_get_resolution_dylibloader_orig_asound
+#define snd_timer_ginfo_get_resolution_min snd_timer_ginfo_get_resolution_min_dylibloader_orig_asound
+#define snd_timer_ginfo_get_resolution_max snd_timer_ginfo_get_resolution_max_dylibloader_orig_asound
+#define snd_timer_ginfo_get_clients snd_timer_ginfo_get_clients_dylibloader_orig_asound
+#define snd_timer_info_sizeof snd_timer_info_sizeof_dylibloader_orig_asound
+#define snd_timer_info_malloc snd_timer_info_malloc_dylibloader_orig_asound
+#define snd_timer_info_free snd_timer_info_free_dylibloader_orig_asound
+#define snd_timer_info_copy snd_timer_info_copy_dylibloader_orig_asound
+#define snd_timer_info_is_slave snd_timer_info_is_slave_dylibloader_orig_asound
+#define snd_timer_info_get_card snd_timer_info_get_card_dylibloader_orig_asound
+#define snd_timer_info_get_id snd_timer_info_get_id_dylibloader_orig_asound
+#define snd_timer_info_get_name snd_timer_info_get_name_dylibloader_orig_asound
+#define snd_timer_info_get_resolution snd_timer_info_get_resolution_dylibloader_orig_asound
+#define snd_timer_params_sizeof snd_timer_params_sizeof_dylibloader_orig_asound
+#define snd_timer_params_malloc snd_timer_params_malloc_dylibloader_orig_asound
+#define snd_timer_params_free snd_timer_params_free_dylibloader_orig_asound
+#define snd_timer_params_copy snd_timer_params_copy_dylibloader_orig_asound
+#define snd_timer_params_set_auto_start snd_timer_params_set_auto_start_dylibloader_orig_asound
+#define snd_timer_params_get_auto_start snd_timer_params_get_auto_start_dylibloader_orig_asound
+#define snd_timer_params_set_exclusive snd_timer_params_set_exclusive_dylibloader_orig_asound
+#define snd_timer_params_get_exclusive snd_timer_params_get_exclusive_dylibloader_orig_asound
+#define snd_timer_params_set_early_event snd_timer_params_set_early_event_dylibloader_orig_asound
+#define snd_timer_params_get_early_event snd_timer_params_get_early_event_dylibloader_orig_asound
+#define snd_timer_params_set_ticks snd_timer_params_set_ticks_dylibloader_orig_asound
+#define snd_timer_params_get_ticks snd_timer_params_get_ticks_dylibloader_orig_asound
+#define snd_timer_params_set_queue_size snd_timer_params_set_queue_size_dylibloader_orig_asound
+#define snd_timer_params_get_queue_size snd_timer_params_get_queue_size_dylibloader_orig_asound
+#define snd_timer_params_set_filter snd_timer_params_set_filter_dylibloader_orig_asound
+#define snd_timer_params_get_filter snd_timer_params_get_filter_dylibloader_orig_asound
+#define snd_timer_status_sizeof snd_timer_status_sizeof_dylibloader_orig_asound
+#define snd_timer_status_malloc snd_timer_status_malloc_dylibloader_orig_asound
+#define snd_timer_status_free snd_timer_status_free_dylibloader_orig_asound
+#define snd_timer_status_copy snd_timer_status_copy_dylibloader_orig_asound
+#define snd_timer_status_get_timestamp snd_timer_status_get_timestamp_dylibloader_orig_asound
+#define snd_timer_status_get_resolution snd_timer_status_get_resolution_dylibloader_orig_asound
+#define snd_timer_status_get_lost snd_timer_status_get_lost_dylibloader_orig_asound
+#define snd_timer_status_get_overrun snd_timer_status_get_overrun_dylibloader_orig_asound
+#define snd_timer_status_get_queue snd_timer_status_get_queue_dylibloader_orig_asound
+#define snd_timer_info_get_ticks snd_timer_info_get_ticks_dylibloader_orig_asound
+#define snd_hwdep_open snd_hwdep_open_dylibloader_orig_asound
+#define snd_hwdep_close snd_hwdep_close_dylibloader_orig_asound
+#define snd_hwdep_poll_descriptors snd_hwdep_poll_descriptors_dylibloader_orig_asound
+#define snd_hwdep_poll_descriptors_count snd_hwdep_poll_descriptors_count_dylibloader_orig_asound
+#define snd_hwdep_poll_descriptors_revents snd_hwdep_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_hwdep_nonblock snd_hwdep_nonblock_dylibloader_orig_asound
+#define snd_hwdep_info snd_hwdep_info_dylibloader_orig_asound
+#define snd_hwdep_dsp_status snd_hwdep_dsp_status_dylibloader_orig_asound
+#define snd_hwdep_dsp_load snd_hwdep_dsp_load_dylibloader_orig_asound
+#define snd_hwdep_ioctl snd_hwdep_ioctl_dylibloader_orig_asound
+#define snd_hwdep_write snd_hwdep_write_dylibloader_orig_asound
+#define snd_hwdep_read snd_hwdep_read_dylibloader_orig_asound
+#define snd_hwdep_info_sizeof snd_hwdep_info_sizeof_dylibloader_orig_asound
+#define snd_hwdep_info_malloc snd_hwdep_info_malloc_dylibloader_orig_asound
+#define snd_hwdep_info_free snd_hwdep_info_free_dylibloader_orig_asound
+#define snd_hwdep_info_copy snd_hwdep_info_copy_dylibloader_orig_asound
+#define snd_hwdep_info_get_device snd_hwdep_info_get_device_dylibloader_orig_asound
+#define snd_hwdep_info_get_card snd_hwdep_info_get_card_dylibloader_orig_asound
+#define snd_hwdep_info_get_id snd_hwdep_info_get_id_dylibloader_orig_asound
+#define snd_hwdep_info_get_name snd_hwdep_info_get_name_dylibloader_orig_asound
+#define snd_hwdep_info_get_iface snd_hwdep_info_get_iface_dylibloader_orig_asound
+#define snd_hwdep_info_set_device snd_hwdep_info_set_device_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_sizeof snd_hwdep_dsp_status_sizeof_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_malloc snd_hwdep_dsp_status_malloc_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_free snd_hwdep_dsp_status_free_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_copy snd_hwdep_dsp_status_copy_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_get_version snd_hwdep_dsp_status_get_version_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_get_id snd_hwdep_dsp_status_get_id_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_get_num_dsps snd_hwdep_dsp_status_get_num_dsps_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_get_dsp_loaded snd_hwdep_dsp_status_get_dsp_loaded_dylibloader_orig_asound
+#define snd_hwdep_dsp_status_get_chip_ready snd_hwdep_dsp_status_get_chip_ready_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_sizeof snd_hwdep_dsp_image_sizeof_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_malloc snd_hwdep_dsp_image_malloc_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_free snd_hwdep_dsp_image_free_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_copy snd_hwdep_dsp_image_copy_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_get_index snd_hwdep_dsp_image_get_index_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_get_name snd_hwdep_dsp_image_get_name_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_get_image snd_hwdep_dsp_image_get_image_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_get_length snd_hwdep_dsp_image_get_length_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_set_index snd_hwdep_dsp_image_set_index_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_set_name snd_hwdep_dsp_image_set_name_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_set_image snd_hwdep_dsp_image_set_image_dylibloader_orig_asound
+#define snd_hwdep_dsp_image_set_length snd_hwdep_dsp_image_set_length_dylibloader_orig_asound
+#define snd_card_load snd_card_load_dylibloader_orig_asound
+#define snd_card_next snd_card_next_dylibloader_orig_asound
+#define snd_card_get_index snd_card_get_index_dylibloader_orig_asound
+#define snd_card_get_name snd_card_get_name_dylibloader_orig_asound
+#define snd_card_get_longname snd_card_get_longname_dylibloader_orig_asound
+#define snd_device_name_hint snd_device_name_hint_dylibloader_orig_asound
+#define snd_device_name_free_hint snd_device_name_free_hint_dylibloader_orig_asound
+#define snd_device_name_get_hint snd_device_name_get_hint_dylibloader_orig_asound
+#define snd_ctl_open snd_ctl_open_dylibloader_orig_asound
+#define snd_ctl_open_lconf snd_ctl_open_lconf_dylibloader_orig_asound
+#define snd_ctl_open_fallback snd_ctl_open_fallback_dylibloader_orig_asound
+#define snd_ctl_close snd_ctl_close_dylibloader_orig_asound
+#define snd_ctl_nonblock snd_ctl_nonblock_dylibloader_orig_asound
+#define snd_async_add_ctl_handler snd_async_add_ctl_handler_dylibloader_orig_asound
+#define snd_async_handler_get_ctl snd_async_handler_get_ctl_dylibloader_orig_asound
+#define snd_ctl_poll_descriptors_count snd_ctl_poll_descriptors_count_dylibloader_orig_asound
+#define snd_ctl_poll_descriptors snd_ctl_poll_descriptors_dylibloader_orig_asound
+#define snd_ctl_poll_descriptors_revents snd_ctl_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_ctl_subscribe_events snd_ctl_subscribe_events_dylibloader_orig_asound
+#define snd_ctl_card_info snd_ctl_card_info_dylibloader_orig_asound
+#define snd_ctl_elem_list snd_ctl_elem_list_dylibloader_orig_asound
+#define snd_ctl_elem_info snd_ctl_elem_info_dylibloader_orig_asound
+#define snd_ctl_elem_read snd_ctl_elem_read_dylibloader_orig_asound
+#define snd_ctl_elem_write snd_ctl_elem_write_dylibloader_orig_asound
+#define snd_ctl_elem_lock snd_ctl_elem_lock_dylibloader_orig_asound
+#define snd_ctl_elem_unlock snd_ctl_elem_unlock_dylibloader_orig_asound
+#define snd_ctl_elem_tlv_read snd_ctl_elem_tlv_read_dylibloader_orig_asound
+#define snd_ctl_elem_tlv_write snd_ctl_elem_tlv_write_dylibloader_orig_asound
+#define snd_ctl_elem_tlv_command snd_ctl_elem_tlv_command_dylibloader_orig_asound
+#define snd_ctl_hwdep_next_device snd_ctl_hwdep_next_device_dylibloader_orig_asound
+#define snd_ctl_hwdep_info snd_ctl_hwdep_info_dylibloader_orig_asound
+#define snd_ctl_pcm_next_device snd_ctl_pcm_next_device_dylibloader_orig_asound
+#define snd_ctl_pcm_info snd_ctl_pcm_info_dylibloader_orig_asound
+#define snd_ctl_pcm_prefer_subdevice snd_ctl_pcm_prefer_subdevice_dylibloader_orig_asound
+#define snd_ctl_rawmidi_next_device snd_ctl_rawmidi_next_device_dylibloader_orig_asound
+#define snd_ctl_rawmidi_info snd_ctl_rawmidi_info_dylibloader_orig_asound
+#define snd_ctl_rawmidi_prefer_subdevice snd_ctl_rawmidi_prefer_subdevice_dylibloader_orig_asound
+#define snd_ctl_set_power_state snd_ctl_set_power_state_dylibloader_orig_asound
+#define snd_ctl_get_power_state snd_ctl_get_power_state_dylibloader_orig_asound
+#define snd_ctl_read snd_ctl_read_dylibloader_orig_asound
+#define snd_ctl_wait snd_ctl_wait_dylibloader_orig_asound
+#define snd_ctl_name snd_ctl_name_dylibloader_orig_asound
+#define snd_ctl_type snd_ctl_type_dylibloader_orig_asound
+#define snd_ctl_elem_type_name snd_ctl_elem_type_name_dylibloader_orig_asound
+#define snd_ctl_elem_iface_name snd_ctl_elem_iface_name_dylibloader_orig_asound
+#define snd_ctl_event_type_name snd_ctl_event_type_name_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_mask snd_ctl_event_elem_get_mask_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_numid snd_ctl_event_elem_get_numid_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_id snd_ctl_event_elem_get_id_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_interface snd_ctl_event_elem_get_interface_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_device snd_ctl_event_elem_get_device_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_subdevice snd_ctl_event_elem_get_subdevice_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_name snd_ctl_event_elem_get_name_dylibloader_orig_asound
+#define snd_ctl_event_elem_get_index snd_ctl_event_elem_get_index_dylibloader_orig_asound
+#define snd_ctl_elem_list_alloc_space snd_ctl_elem_list_alloc_space_dylibloader_orig_asound
+#define snd_ctl_elem_list_free_space snd_ctl_elem_list_free_space_dylibloader_orig_asound
+#define snd_ctl_ascii_elem_id_get snd_ctl_ascii_elem_id_get_dylibloader_orig_asound
+#define snd_ctl_ascii_elem_id_parse snd_ctl_ascii_elem_id_parse_dylibloader_orig_asound
+#define snd_ctl_ascii_value_parse snd_ctl_ascii_value_parse_dylibloader_orig_asound
+#define snd_ctl_elem_id_sizeof snd_ctl_elem_id_sizeof_dylibloader_orig_asound
+#define snd_ctl_elem_id_malloc snd_ctl_elem_id_malloc_dylibloader_orig_asound
+#define snd_ctl_elem_id_free snd_ctl_elem_id_free_dylibloader_orig_asound
+#define snd_ctl_elem_id_clear snd_ctl_elem_id_clear_dylibloader_orig_asound
+#define snd_ctl_elem_id_copy snd_ctl_elem_id_copy_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_numid snd_ctl_elem_id_get_numid_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_interface snd_ctl_elem_id_get_interface_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_device snd_ctl_elem_id_get_device_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_subdevice snd_ctl_elem_id_get_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_name snd_ctl_elem_id_get_name_dylibloader_orig_asound
+#define snd_ctl_elem_id_get_index snd_ctl_elem_id_get_index_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_numid snd_ctl_elem_id_set_numid_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_interface snd_ctl_elem_id_set_interface_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_device snd_ctl_elem_id_set_device_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_subdevice snd_ctl_elem_id_set_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_name snd_ctl_elem_id_set_name_dylibloader_orig_asound
+#define snd_ctl_elem_id_set_index snd_ctl_elem_id_set_index_dylibloader_orig_asound
+#define snd_ctl_card_info_sizeof snd_ctl_card_info_sizeof_dylibloader_orig_asound
+#define snd_ctl_card_info_malloc snd_ctl_card_info_malloc_dylibloader_orig_asound
+#define snd_ctl_card_info_free snd_ctl_card_info_free_dylibloader_orig_asound
+#define snd_ctl_card_info_clear snd_ctl_card_info_clear_dylibloader_orig_asound
+#define snd_ctl_card_info_copy snd_ctl_card_info_copy_dylibloader_orig_asound
+#define snd_ctl_card_info_get_card snd_ctl_card_info_get_card_dylibloader_orig_asound
+#define snd_ctl_card_info_get_id snd_ctl_card_info_get_id_dylibloader_orig_asound
+#define snd_ctl_card_info_get_driver snd_ctl_card_info_get_driver_dylibloader_orig_asound
+#define snd_ctl_card_info_get_name snd_ctl_card_info_get_name_dylibloader_orig_asound
+#define snd_ctl_card_info_get_longname snd_ctl_card_info_get_longname_dylibloader_orig_asound
+#define snd_ctl_card_info_get_mixername snd_ctl_card_info_get_mixername_dylibloader_orig_asound
+#define snd_ctl_card_info_get_components snd_ctl_card_info_get_components_dylibloader_orig_asound
+#define snd_ctl_event_sizeof snd_ctl_event_sizeof_dylibloader_orig_asound
+#define snd_ctl_event_malloc snd_ctl_event_malloc_dylibloader_orig_asound
+#define snd_ctl_event_free snd_ctl_event_free_dylibloader_orig_asound
+#define snd_ctl_event_clear snd_ctl_event_clear_dylibloader_orig_asound
+#define snd_ctl_event_copy snd_ctl_event_copy_dylibloader_orig_asound
+#define snd_ctl_event_get_type snd_ctl_event_get_type_dylibloader_orig_asound
+#define snd_ctl_elem_list_sizeof snd_ctl_elem_list_sizeof_dylibloader_orig_asound
+#define snd_ctl_elem_list_malloc snd_ctl_elem_list_malloc_dylibloader_orig_asound
+#define snd_ctl_elem_list_free snd_ctl_elem_list_free_dylibloader_orig_asound
+#define snd_ctl_elem_list_clear snd_ctl_elem_list_clear_dylibloader_orig_asound
+#define snd_ctl_elem_list_copy snd_ctl_elem_list_copy_dylibloader_orig_asound
+#define snd_ctl_elem_list_set_offset snd_ctl_elem_list_set_offset_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_used snd_ctl_elem_list_get_used_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_count snd_ctl_elem_list_get_count_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_id snd_ctl_elem_list_get_id_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_numid snd_ctl_elem_list_get_numid_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_interface snd_ctl_elem_list_get_interface_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_device snd_ctl_elem_list_get_device_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_subdevice snd_ctl_elem_list_get_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_name snd_ctl_elem_list_get_name_dylibloader_orig_asound
+#define snd_ctl_elem_list_get_index snd_ctl_elem_list_get_index_dylibloader_orig_asound
+#define snd_ctl_elem_info_sizeof snd_ctl_elem_info_sizeof_dylibloader_orig_asound
+#define snd_ctl_elem_info_malloc snd_ctl_elem_info_malloc_dylibloader_orig_asound
+#define snd_ctl_elem_info_free snd_ctl_elem_info_free_dylibloader_orig_asound
+#define snd_ctl_elem_info_clear snd_ctl_elem_info_clear_dylibloader_orig_asound
+#define snd_ctl_elem_info_copy snd_ctl_elem_info_copy_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_type snd_ctl_elem_info_get_type_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_readable snd_ctl_elem_info_is_readable_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_writable snd_ctl_elem_info_is_writable_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_volatile snd_ctl_elem_info_is_volatile_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_inactive snd_ctl_elem_info_is_inactive_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_locked snd_ctl_elem_info_is_locked_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_tlv_readable snd_ctl_elem_info_is_tlv_readable_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_tlv_writable snd_ctl_elem_info_is_tlv_writable_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_tlv_commandable snd_ctl_elem_info_is_tlv_commandable_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_owner snd_ctl_elem_info_is_owner_dylibloader_orig_asound
+#define snd_ctl_elem_info_is_user snd_ctl_elem_info_is_user_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_owner snd_ctl_elem_info_get_owner_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_count snd_ctl_elem_info_get_count_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_min snd_ctl_elem_info_get_min_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_max snd_ctl_elem_info_get_max_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_step snd_ctl_elem_info_get_step_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_min64 snd_ctl_elem_info_get_min64_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_max64 snd_ctl_elem_info_get_max64_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_step64 snd_ctl_elem_info_get_step64_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_items snd_ctl_elem_info_get_items_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_item snd_ctl_elem_info_set_item_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_item_name snd_ctl_elem_info_get_item_name_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_dimensions snd_ctl_elem_info_get_dimensions_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_dimension snd_ctl_elem_info_get_dimension_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_dimension snd_ctl_elem_info_set_dimension_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_id snd_ctl_elem_info_get_id_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_numid snd_ctl_elem_info_get_numid_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_interface snd_ctl_elem_info_get_interface_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_device snd_ctl_elem_info_get_device_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_subdevice snd_ctl_elem_info_get_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_name snd_ctl_elem_info_get_name_dylibloader_orig_asound
+#define snd_ctl_elem_info_get_index snd_ctl_elem_info_get_index_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_id snd_ctl_elem_info_set_id_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_numid snd_ctl_elem_info_set_numid_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_interface snd_ctl_elem_info_set_interface_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_device snd_ctl_elem_info_set_device_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_subdevice snd_ctl_elem_info_set_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_name snd_ctl_elem_info_set_name_dylibloader_orig_asound
+#define snd_ctl_elem_info_set_index snd_ctl_elem_info_set_index_dylibloader_orig_asound
+#define snd_ctl_add_integer_elem_set snd_ctl_add_integer_elem_set_dylibloader_orig_asound
+#define snd_ctl_add_integer64_elem_set snd_ctl_add_integer64_elem_set_dylibloader_orig_asound
+#define snd_ctl_add_boolean_elem_set snd_ctl_add_boolean_elem_set_dylibloader_orig_asound
+#define snd_ctl_add_enumerated_elem_set snd_ctl_add_enumerated_elem_set_dylibloader_orig_asound
+#define snd_ctl_add_bytes_elem_set snd_ctl_add_bytes_elem_set_dylibloader_orig_asound
+#define snd_ctl_elem_add_integer snd_ctl_elem_add_integer_dylibloader_orig_asound
+#define snd_ctl_elem_add_integer64 snd_ctl_elem_add_integer64_dylibloader_orig_asound
+#define snd_ctl_elem_add_boolean snd_ctl_elem_add_boolean_dylibloader_orig_asound
+#define snd_ctl_elem_add_enumerated snd_ctl_elem_add_enumerated_dylibloader_orig_asound
+#define snd_ctl_elem_add_iec958 snd_ctl_elem_add_iec958_dylibloader_orig_asound
+#define snd_ctl_elem_remove snd_ctl_elem_remove_dylibloader_orig_asound
+#define snd_ctl_elem_value_sizeof snd_ctl_elem_value_sizeof_dylibloader_orig_asound
+#define snd_ctl_elem_value_malloc snd_ctl_elem_value_malloc_dylibloader_orig_asound
+#define snd_ctl_elem_value_free snd_ctl_elem_value_free_dylibloader_orig_asound
+#define snd_ctl_elem_value_clear snd_ctl_elem_value_clear_dylibloader_orig_asound
+#define snd_ctl_elem_value_copy snd_ctl_elem_value_copy_dylibloader_orig_asound
+#define snd_ctl_elem_value_compare snd_ctl_elem_value_compare_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_id snd_ctl_elem_value_get_id_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_numid snd_ctl_elem_value_get_numid_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_interface snd_ctl_elem_value_get_interface_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_device snd_ctl_elem_value_get_device_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_subdevice snd_ctl_elem_value_get_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_name snd_ctl_elem_value_get_name_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_index snd_ctl_elem_value_get_index_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_id snd_ctl_elem_value_set_id_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_numid snd_ctl_elem_value_set_numid_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_interface snd_ctl_elem_value_set_interface_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_device snd_ctl_elem_value_set_device_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_subdevice snd_ctl_elem_value_set_subdevice_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_name snd_ctl_elem_value_set_name_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_index snd_ctl_elem_value_set_index_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_boolean snd_ctl_elem_value_get_boolean_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_integer snd_ctl_elem_value_get_integer_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_integer64 snd_ctl_elem_value_get_integer64_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_enumerated snd_ctl_elem_value_get_enumerated_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_byte snd_ctl_elem_value_get_byte_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_boolean snd_ctl_elem_value_set_boolean_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_integer snd_ctl_elem_value_set_integer_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_integer64 snd_ctl_elem_value_set_integer64_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_enumerated snd_ctl_elem_value_set_enumerated_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_byte snd_ctl_elem_value_set_byte_dylibloader_orig_asound
+#define snd_ctl_elem_set_bytes snd_ctl_elem_set_bytes_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_bytes snd_ctl_elem_value_get_bytes_dylibloader_orig_asound
+#define snd_ctl_elem_value_get_iec958 snd_ctl_elem_value_get_iec958_dylibloader_orig_asound
+#define snd_ctl_elem_value_set_iec958 snd_ctl_elem_value_set_iec958_dylibloader_orig_asound
+#define snd_tlv_parse_dB_info snd_tlv_parse_dB_info_dylibloader_orig_asound
+#define snd_tlv_get_dB_range snd_tlv_get_dB_range_dylibloader_orig_asound
+#define snd_tlv_convert_to_dB snd_tlv_convert_to_dB_dylibloader_orig_asound
+#define snd_tlv_convert_from_dB snd_tlv_convert_from_dB_dylibloader_orig_asound
+#define snd_ctl_get_dB_range snd_ctl_get_dB_range_dylibloader_orig_asound
+#define snd_ctl_convert_to_dB snd_ctl_convert_to_dB_dylibloader_orig_asound
+#define snd_ctl_convert_from_dB snd_ctl_convert_from_dB_dylibloader_orig_asound
+#define snd_hctl_compare_fast snd_hctl_compare_fast_dylibloader_orig_asound
+#define snd_hctl_open snd_hctl_open_dylibloader_orig_asound
+#define snd_hctl_open_ctl snd_hctl_open_ctl_dylibloader_orig_asound
+#define snd_hctl_close snd_hctl_close_dylibloader_orig_asound
+#define snd_hctl_nonblock snd_hctl_nonblock_dylibloader_orig_asound
+#define snd_hctl_poll_descriptors_count snd_hctl_poll_descriptors_count_dylibloader_orig_asound
+#define snd_hctl_poll_descriptors snd_hctl_poll_descriptors_dylibloader_orig_asound
+#define snd_hctl_poll_descriptors_revents snd_hctl_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_hctl_get_count snd_hctl_get_count_dylibloader_orig_asound
+#define snd_hctl_set_compare snd_hctl_set_compare_dylibloader_orig_asound
+#define snd_hctl_first_elem snd_hctl_first_elem_dylibloader_orig_asound
+#define snd_hctl_last_elem snd_hctl_last_elem_dylibloader_orig_asound
+#define snd_hctl_find_elem snd_hctl_find_elem_dylibloader_orig_asound
+#define snd_hctl_set_callback snd_hctl_set_callback_dylibloader_orig_asound
+#define snd_hctl_set_callback_private snd_hctl_set_callback_private_dylibloader_orig_asound
+#define snd_hctl_get_callback_private snd_hctl_get_callback_private_dylibloader_orig_asound
+#define snd_hctl_load snd_hctl_load_dylibloader_orig_asound
+#define snd_hctl_free snd_hctl_free_dylibloader_orig_asound
+#define snd_hctl_handle_events snd_hctl_handle_events_dylibloader_orig_asound
+#define snd_hctl_name snd_hctl_name_dylibloader_orig_asound
+#define snd_hctl_wait snd_hctl_wait_dylibloader_orig_asound
+#define snd_hctl_ctl snd_hctl_ctl_dylibloader_orig_asound
+#define snd_hctl_elem_next snd_hctl_elem_next_dylibloader_orig_asound
+#define snd_hctl_elem_prev snd_hctl_elem_prev_dylibloader_orig_asound
+#define snd_hctl_elem_info snd_hctl_elem_info_dylibloader_orig_asound
+#define snd_hctl_elem_read snd_hctl_elem_read_dylibloader_orig_asound
+#define snd_hctl_elem_write snd_hctl_elem_write_dylibloader_orig_asound
+#define snd_hctl_elem_tlv_read snd_hctl_elem_tlv_read_dylibloader_orig_asound
+#define snd_hctl_elem_tlv_write snd_hctl_elem_tlv_write_dylibloader_orig_asound
+#define snd_hctl_elem_tlv_command snd_hctl_elem_tlv_command_dylibloader_orig_asound
+#define snd_hctl_elem_get_hctl snd_hctl_elem_get_hctl_dylibloader_orig_asound
+#define snd_hctl_elem_get_id snd_hctl_elem_get_id_dylibloader_orig_asound
+#define snd_hctl_elem_get_numid snd_hctl_elem_get_numid_dylibloader_orig_asound
+#define snd_hctl_elem_get_interface snd_hctl_elem_get_interface_dylibloader_orig_asound
+#define snd_hctl_elem_get_device snd_hctl_elem_get_device_dylibloader_orig_asound
+#define snd_hctl_elem_get_subdevice snd_hctl_elem_get_subdevice_dylibloader_orig_asound
+#define snd_hctl_elem_get_name snd_hctl_elem_get_name_dylibloader_orig_asound
+#define snd_hctl_elem_get_index snd_hctl_elem_get_index_dylibloader_orig_asound
+#define snd_hctl_elem_set_callback snd_hctl_elem_set_callback_dylibloader_orig_asound
+#define snd_hctl_elem_get_callback_private snd_hctl_elem_get_callback_private_dylibloader_orig_asound
+#define snd_hctl_elem_set_callback_private snd_hctl_elem_set_callback_private_dylibloader_orig_asound
+#define snd_sctl_build snd_sctl_build_dylibloader_orig_asound
+#define snd_sctl_free snd_sctl_free_dylibloader_orig_asound
+#define snd_sctl_install snd_sctl_install_dylibloader_orig_asound
+#define snd_sctl_remove snd_sctl_remove_dylibloader_orig_asound
+#define snd_mixer_open snd_mixer_open_dylibloader_orig_asound
+#define snd_mixer_close snd_mixer_close_dylibloader_orig_asound
+#define snd_mixer_first_elem snd_mixer_first_elem_dylibloader_orig_asound
+#define snd_mixer_last_elem snd_mixer_last_elem_dylibloader_orig_asound
+#define snd_mixer_handle_events snd_mixer_handle_events_dylibloader_orig_asound
+#define snd_mixer_attach snd_mixer_attach_dylibloader_orig_asound
+#define snd_mixer_attach_hctl snd_mixer_attach_hctl_dylibloader_orig_asound
+#define snd_mixer_detach snd_mixer_detach_dylibloader_orig_asound
+#define snd_mixer_detach_hctl snd_mixer_detach_hctl_dylibloader_orig_asound
+#define snd_mixer_get_hctl snd_mixer_get_hctl_dylibloader_orig_asound
+#define snd_mixer_poll_descriptors_count snd_mixer_poll_descriptors_count_dylibloader_orig_asound
+#define snd_mixer_poll_descriptors snd_mixer_poll_descriptors_dylibloader_orig_asound
+#define snd_mixer_poll_descriptors_revents snd_mixer_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_mixer_load snd_mixer_load_dylibloader_orig_asound
+#define snd_mixer_free snd_mixer_free_dylibloader_orig_asound
+#define snd_mixer_wait snd_mixer_wait_dylibloader_orig_asound
+#define snd_mixer_set_compare snd_mixer_set_compare_dylibloader_orig_asound
+#define snd_mixer_set_callback snd_mixer_set_callback_dylibloader_orig_asound
+#define snd_mixer_get_callback_private snd_mixer_get_callback_private_dylibloader_orig_asound
+#define snd_mixer_set_callback_private snd_mixer_set_callback_private_dylibloader_orig_asound
+#define snd_mixer_get_count snd_mixer_get_count_dylibloader_orig_asound
+#define snd_mixer_class_unregister snd_mixer_class_unregister_dylibloader_orig_asound
+#define snd_mixer_elem_next snd_mixer_elem_next_dylibloader_orig_asound
+#define snd_mixer_elem_prev snd_mixer_elem_prev_dylibloader_orig_asound
+#define snd_mixer_elem_set_callback snd_mixer_elem_set_callback_dylibloader_orig_asound
+#define snd_mixer_elem_get_callback_private snd_mixer_elem_get_callback_private_dylibloader_orig_asound
+#define snd_mixer_elem_set_callback_private snd_mixer_elem_set_callback_private_dylibloader_orig_asound
+#define snd_mixer_elem_get_type snd_mixer_elem_get_type_dylibloader_orig_asound
+#define snd_mixer_class_register snd_mixer_class_register_dylibloader_orig_asound
+#define snd_mixer_elem_new snd_mixer_elem_new_dylibloader_orig_asound
+#define snd_mixer_elem_add snd_mixer_elem_add_dylibloader_orig_asound
+#define snd_mixer_elem_remove snd_mixer_elem_remove_dylibloader_orig_asound
+#define snd_mixer_elem_free snd_mixer_elem_free_dylibloader_orig_asound
+#define snd_mixer_elem_info snd_mixer_elem_info_dylibloader_orig_asound
+#define snd_mixer_elem_value snd_mixer_elem_value_dylibloader_orig_asound
+#define snd_mixer_elem_attach snd_mixer_elem_attach_dylibloader_orig_asound
+#define snd_mixer_elem_detach snd_mixer_elem_detach_dylibloader_orig_asound
+#define snd_mixer_elem_empty snd_mixer_elem_empty_dylibloader_orig_asound
+#define snd_mixer_elem_get_private snd_mixer_elem_get_private_dylibloader_orig_asound
+#define snd_mixer_class_sizeof snd_mixer_class_sizeof_dylibloader_orig_asound
+#define snd_mixer_class_malloc snd_mixer_class_malloc_dylibloader_orig_asound
+#define snd_mixer_class_free snd_mixer_class_free_dylibloader_orig_asound
+#define snd_mixer_class_copy snd_mixer_class_copy_dylibloader_orig_asound
+#define snd_mixer_class_get_mixer snd_mixer_class_get_mixer_dylibloader_orig_asound
+#define snd_mixer_class_get_event snd_mixer_class_get_event_dylibloader_orig_asound
+#define snd_mixer_class_get_private snd_mixer_class_get_private_dylibloader_orig_asound
+#define snd_mixer_class_get_compare snd_mixer_class_get_compare_dylibloader_orig_asound
+#define snd_mixer_class_set_event snd_mixer_class_set_event_dylibloader_orig_asound
+#define snd_mixer_class_set_private snd_mixer_class_set_private_dylibloader_orig_asound
+#define snd_mixer_class_set_private_free snd_mixer_class_set_private_free_dylibloader_orig_asound
+#define snd_mixer_class_set_compare snd_mixer_class_set_compare_dylibloader_orig_asound
+#define snd_mixer_selem_channel_name snd_mixer_selem_channel_name_dylibloader_orig_asound
+#define snd_mixer_selem_register snd_mixer_selem_register_dylibloader_orig_asound
+#define snd_mixer_selem_get_id snd_mixer_selem_get_id_dylibloader_orig_asound
+#define snd_mixer_selem_get_name snd_mixer_selem_get_name_dylibloader_orig_asound
+#define snd_mixer_selem_get_index snd_mixer_selem_get_index_dylibloader_orig_asound
+#define snd_mixer_find_selem snd_mixer_find_selem_dylibloader_orig_asound
+#define snd_mixer_selem_is_active snd_mixer_selem_is_active_dylibloader_orig_asound
+#define snd_mixer_selem_is_playback_mono snd_mixer_selem_is_playback_mono_dylibloader_orig_asound
+#define snd_mixer_selem_has_playback_channel snd_mixer_selem_has_playback_channel_dylibloader_orig_asound
+#define snd_mixer_selem_is_capture_mono snd_mixer_selem_is_capture_mono_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_channel snd_mixer_selem_has_capture_channel_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_group snd_mixer_selem_get_capture_group_dylibloader_orig_asound
+#define snd_mixer_selem_has_common_volume snd_mixer_selem_has_common_volume_dylibloader_orig_asound
+#define snd_mixer_selem_has_playback_volume snd_mixer_selem_has_playback_volume_dylibloader_orig_asound
+#define snd_mixer_selem_has_playback_volume_joined snd_mixer_selem_has_playback_volume_joined_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_volume snd_mixer_selem_has_capture_volume_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_volume_joined snd_mixer_selem_has_capture_volume_joined_dylibloader_orig_asound
+#define snd_mixer_selem_has_common_switch snd_mixer_selem_has_common_switch_dylibloader_orig_asound
+#define snd_mixer_selem_has_playback_switch snd_mixer_selem_has_playback_switch_dylibloader_orig_asound
+#define snd_mixer_selem_has_playback_switch_joined snd_mixer_selem_has_playback_switch_joined_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_switch snd_mixer_selem_has_capture_switch_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_switch_joined snd_mixer_selem_has_capture_switch_joined_dylibloader_orig_asound
+#define snd_mixer_selem_has_capture_switch_exclusive snd_mixer_selem_has_capture_switch_exclusive_dylibloader_orig_asound
+#define snd_mixer_selem_ask_playback_vol_dB snd_mixer_selem_ask_playback_vol_dB_dylibloader_orig_asound
+#define snd_mixer_selem_ask_capture_vol_dB snd_mixer_selem_ask_capture_vol_dB_dylibloader_orig_asound
+#define snd_mixer_selem_ask_playback_dB_vol snd_mixer_selem_ask_playback_dB_vol_dylibloader_orig_asound
+#define snd_mixer_selem_ask_capture_dB_vol snd_mixer_selem_ask_capture_dB_vol_dylibloader_orig_asound
+#define snd_mixer_selem_get_playback_volume snd_mixer_selem_get_playback_volume_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_volume snd_mixer_selem_get_capture_volume_dylibloader_orig_asound
+#define snd_mixer_selem_get_playback_dB snd_mixer_selem_get_playback_dB_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_dB snd_mixer_selem_get_capture_dB_dylibloader_orig_asound
+#define snd_mixer_selem_get_playback_switch snd_mixer_selem_get_playback_switch_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_switch snd_mixer_selem_get_capture_switch_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_volume snd_mixer_selem_set_playback_volume_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_volume snd_mixer_selem_set_capture_volume_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_dB snd_mixer_selem_set_playback_dB_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_dB snd_mixer_selem_set_capture_dB_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_volume_all snd_mixer_selem_set_playback_volume_all_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_volume_all snd_mixer_selem_set_capture_volume_all_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_dB_all snd_mixer_selem_set_playback_dB_all_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_dB_all snd_mixer_selem_set_capture_dB_all_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_switch snd_mixer_selem_set_playback_switch_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_switch snd_mixer_selem_set_capture_switch_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_switch_all snd_mixer_selem_set_playback_switch_all_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_switch_all snd_mixer_selem_set_capture_switch_all_dylibloader_orig_asound
+#define snd_mixer_selem_get_playback_volume_range snd_mixer_selem_get_playback_volume_range_dylibloader_orig_asound
+#define snd_mixer_selem_get_playback_dB_range snd_mixer_selem_get_playback_dB_range_dylibloader_orig_asound
+#define snd_mixer_selem_set_playback_volume_range snd_mixer_selem_set_playback_volume_range_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_volume_range snd_mixer_selem_get_capture_volume_range_dylibloader_orig_asound
+#define snd_mixer_selem_get_capture_dB_range snd_mixer_selem_get_capture_dB_range_dylibloader_orig_asound
+#define snd_mixer_selem_set_capture_volume_range snd_mixer_selem_set_capture_volume_range_dylibloader_orig_asound
+#define snd_mixer_selem_is_enumerated snd_mixer_selem_is_enumerated_dylibloader_orig_asound
+#define snd_mixer_selem_is_enum_playback snd_mixer_selem_is_enum_playback_dylibloader_orig_asound
+#define snd_mixer_selem_is_enum_capture snd_mixer_selem_is_enum_capture_dylibloader_orig_asound
+#define snd_mixer_selem_get_enum_items snd_mixer_selem_get_enum_items_dylibloader_orig_asound
+#define snd_mixer_selem_get_enum_item_name snd_mixer_selem_get_enum_item_name_dylibloader_orig_asound
+#define snd_mixer_selem_get_enum_item snd_mixer_selem_get_enum_item_dylibloader_orig_asound
+#define snd_mixer_selem_set_enum_item snd_mixer_selem_set_enum_item_dylibloader_orig_asound
+#define snd_mixer_selem_id_sizeof snd_mixer_selem_id_sizeof_dylibloader_orig_asound
+#define snd_mixer_selem_id_malloc snd_mixer_selem_id_malloc_dylibloader_orig_asound
+#define snd_mixer_selem_id_free snd_mixer_selem_id_free_dylibloader_orig_asound
+#define snd_mixer_selem_id_copy snd_mixer_selem_id_copy_dylibloader_orig_asound
+#define snd_mixer_selem_id_get_name snd_mixer_selem_id_get_name_dylibloader_orig_asound
+#define snd_mixer_selem_id_get_index snd_mixer_selem_id_get_index_dylibloader_orig_asound
+#define snd_mixer_selem_id_set_name snd_mixer_selem_id_set_name_dylibloader_orig_asound
+#define snd_mixer_selem_id_set_index snd_mixer_selem_id_set_index_dylibloader_orig_asound
+#define snd_mixer_selem_id_parse snd_mixer_selem_id_parse_dylibloader_orig_asound
+#define snd_seq_open snd_seq_open_dylibloader_orig_asound
+#define snd_seq_open_lconf snd_seq_open_lconf_dylibloader_orig_asound
+#define snd_seq_name snd_seq_name_dylibloader_orig_asound
+#define snd_seq_type snd_seq_type_dylibloader_orig_asound
+#define snd_seq_close snd_seq_close_dylibloader_orig_asound
+#define snd_seq_poll_descriptors_count snd_seq_poll_descriptors_count_dylibloader_orig_asound
+#define snd_seq_poll_descriptors snd_seq_poll_descriptors_dylibloader_orig_asound
+#define snd_seq_poll_descriptors_revents snd_seq_poll_descriptors_revents_dylibloader_orig_asound
+#define snd_seq_nonblock snd_seq_nonblock_dylibloader_orig_asound
+#define snd_seq_client_id snd_seq_client_id_dylibloader_orig_asound
+#define snd_seq_get_output_buffer_size snd_seq_get_output_buffer_size_dylibloader_orig_asound
+#define snd_seq_get_input_buffer_size snd_seq_get_input_buffer_size_dylibloader_orig_asound
+#define snd_seq_set_output_buffer_size snd_seq_set_output_buffer_size_dylibloader_orig_asound
+#define snd_seq_set_input_buffer_size snd_seq_set_input_buffer_size_dylibloader_orig_asound
+#define snd_seq_system_info_sizeof snd_seq_system_info_sizeof_dylibloader_orig_asound
+#define snd_seq_system_info_malloc snd_seq_system_info_malloc_dylibloader_orig_asound
+#define snd_seq_system_info_free snd_seq_system_info_free_dylibloader_orig_asound
+#define snd_seq_system_info_copy snd_seq_system_info_copy_dylibloader_orig_asound
+#define snd_seq_system_info_get_queues snd_seq_system_info_get_queues_dylibloader_orig_asound
+#define snd_seq_system_info_get_clients snd_seq_system_info_get_clients_dylibloader_orig_asound
+#define snd_seq_system_info_get_ports snd_seq_system_info_get_ports_dylibloader_orig_asound
+#define snd_seq_system_info_get_channels snd_seq_system_info_get_channels_dylibloader_orig_asound
+#define snd_seq_system_info_get_cur_clients snd_seq_system_info_get_cur_clients_dylibloader_orig_asound
+#define snd_seq_system_info_get_cur_queues snd_seq_system_info_get_cur_queues_dylibloader_orig_asound
+#define snd_seq_system_info snd_seq_system_info_dylibloader_orig_asound
+#define snd_seq_client_info_sizeof snd_seq_client_info_sizeof_dylibloader_orig_asound
+#define snd_seq_client_info_malloc snd_seq_client_info_malloc_dylibloader_orig_asound
+#define snd_seq_client_info_free snd_seq_client_info_free_dylibloader_orig_asound
+#define snd_seq_client_info_copy snd_seq_client_info_copy_dylibloader_orig_asound
+#define snd_seq_client_info_get_client snd_seq_client_info_get_client_dylibloader_orig_asound
+#define snd_seq_client_info_get_type snd_seq_client_info_get_type_dylibloader_orig_asound
+#define snd_seq_client_info_get_name snd_seq_client_info_get_name_dylibloader_orig_asound
+#define snd_seq_client_info_get_broadcast_filter snd_seq_client_info_get_broadcast_filter_dylibloader_orig_asound
+#define snd_seq_client_info_get_error_bounce snd_seq_client_info_get_error_bounce_dylibloader_orig_asound
+#define snd_seq_client_info_get_card snd_seq_client_info_get_card_dylibloader_orig_asound
+#define snd_seq_client_info_get_pid snd_seq_client_info_get_pid_dylibloader_orig_asound
+#define snd_seq_client_info_get_event_filter snd_seq_client_info_get_event_filter_dylibloader_orig_asound
+#define snd_seq_client_info_get_num_ports snd_seq_client_info_get_num_ports_dylibloader_orig_asound
+#define snd_seq_client_info_get_event_lost snd_seq_client_info_get_event_lost_dylibloader_orig_asound
+#define snd_seq_client_info_set_client snd_seq_client_info_set_client_dylibloader_orig_asound
+#define snd_seq_client_info_set_name snd_seq_client_info_set_name_dylibloader_orig_asound
+#define snd_seq_client_info_set_broadcast_filter snd_seq_client_info_set_broadcast_filter_dylibloader_orig_asound
+#define snd_seq_client_info_set_error_bounce snd_seq_client_info_set_error_bounce_dylibloader_orig_asound
+#define snd_seq_client_info_set_event_filter snd_seq_client_info_set_event_filter_dylibloader_orig_asound
+#define snd_seq_client_info_event_filter_clear snd_seq_client_info_event_filter_clear_dylibloader_orig_asound
+#define snd_seq_client_info_event_filter_add snd_seq_client_info_event_filter_add_dylibloader_orig_asound
+#define snd_seq_client_info_event_filter_del snd_seq_client_info_event_filter_del_dylibloader_orig_asound
+#define snd_seq_client_info_event_filter_check snd_seq_client_info_event_filter_check_dylibloader_orig_asound
+#define snd_seq_get_client_info snd_seq_get_client_info_dylibloader_orig_asound
+#define snd_seq_get_any_client_info snd_seq_get_any_client_info_dylibloader_orig_asound
+#define snd_seq_set_client_info snd_seq_set_client_info_dylibloader_orig_asound
+#define snd_seq_query_next_client snd_seq_query_next_client_dylibloader_orig_asound
+#define snd_seq_client_pool_sizeof snd_seq_client_pool_sizeof_dylibloader_orig_asound
+#define snd_seq_client_pool_malloc snd_seq_client_pool_malloc_dylibloader_orig_asound
+#define snd_seq_client_pool_free snd_seq_client_pool_free_dylibloader_orig_asound
+#define snd_seq_client_pool_copy snd_seq_client_pool_copy_dylibloader_orig_asound
+#define snd_seq_client_pool_get_client snd_seq_client_pool_get_client_dylibloader_orig_asound
+#define snd_seq_client_pool_get_output_pool snd_seq_client_pool_get_output_pool_dylibloader_orig_asound
+#define snd_seq_client_pool_get_input_pool snd_seq_client_pool_get_input_pool_dylibloader_orig_asound
+#define snd_seq_client_pool_get_output_room snd_seq_client_pool_get_output_room_dylibloader_orig_asound
+#define snd_seq_client_pool_get_output_free snd_seq_client_pool_get_output_free_dylibloader_orig_asound
+#define snd_seq_client_pool_get_input_free snd_seq_client_pool_get_input_free_dylibloader_orig_asound
+#define snd_seq_client_pool_set_output_pool snd_seq_client_pool_set_output_pool_dylibloader_orig_asound
+#define snd_seq_client_pool_set_input_pool snd_seq_client_pool_set_input_pool_dylibloader_orig_asound
+#define snd_seq_client_pool_set_output_room snd_seq_client_pool_set_output_room_dylibloader_orig_asound
+#define snd_seq_get_client_pool snd_seq_get_client_pool_dylibloader_orig_asound
+#define snd_seq_set_client_pool snd_seq_set_client_pool_dylibloader_orig_asound
+#define snd_seq_port_info_sizeof snd_seq_port_info_sizeof_dylibloader_orig_asound
+#define snd_seq_port_info_malloc snd_seq_port_info_malloc_dylibloader_orig_asound
+#define snd_seq_port_info_free snd_seq_port_info_free_dylibloader_orig_asound
+#define snd_seq_port_info_copy snd_seq_port_info_copy_dylibloader_orig_asound
+#define snd_seq_port_info_get_client snd_seq_port_info_get_client_dylibloader_orig_asound
+#define snd_seq_port_info_get_port snd_seq_port_info_get_port_dylibloader_orig_asound
+#define snd_seq_port_info_get_addr snd_seq_port_info_get_addr_dylibloader_orig_asound
+#define snd_seq_port_info_get_name snd_seq_port_info_get_name_dylibloader_orig_asound
+#define snd_seq_port_info_get_capability snd_seq_port_info_get_capability_dylibloader_orig_asound
+#define snd_seq_port_info_get_type snd_seq_port_info_get_type_dylibloader_orig_asound
+#define snd_seq_port_info_get_midi_channels snd_seq_port_info_get_midi_channels_dylibloader_orig_asound
+#define snd_seq_port_info_get_midi_voices snd_seq_port_info_get_midi_voices_dylibloader_orig_asound
+#define snd_seq_port_info_get_synth_voices snd_seq_port_info_get_synth_voices_dylibloader_orig_asound
+#define snd_seq_port_info_get_read_use snd_seq_port_info_get_read_use_dylibloader_orig_asound
+#define snd_seq_port_info_get_write_use snd_seq_port_info_get_write_use_dylibloader_orig_asound
+#define snd_seq_port_info_get_port_specified snd_seq_port_info_get_port_specified_dylibloader_orig_asound
+#define snd_seq_port_info_get_timestamping snd_seq_port_info_get_timestamping_dylibloader_orig_asound
+#define snd_seq_port_info_get_timestamp_real snd_seq_port_info_get_timestamp_real_dylibloader_orig_asound
+#define snd_seq_port_info_get_timestamp_queue snd_seq_port_info_get_timestamp_queue_dylibloader_orig_asound
+#define snd_seq_port_info_set_client snd_seq_port_info_set_client_dylibloader_orig_asound
+#define snd_seq_port_info_set_port snd_seq_port_info_set_port_dylibloader_orig_asound
+#define snd_seq_port_info_set_addr snd_seq_port_info_set_addr_dylibloader_orig_asound
+#define snd_seq_port_info_set_name snd_seq_port_info_set_name_dylibloader_orig_asound
+#define snd_seq_port_info_set_capability snd_seq_port_info_set_capability_dylibloader_orig_asound
+#define snd_seq_port_info_set_type snd_seq_port_info_set_type_dylibloader_orig_asound
+#define snd_seq_port_info_set_midi_channels snd_seq_port_info_set_midi_channels_dylibloader_orig_asound
+#define snd_seq_port_info_set_midi_voices snd_seq_port_info_set_midi_voices_dylibloader_orig_asound
+#define snd_seq_port_info_set_synth_voices snd_seq_port_info_set_synth_voices_dylibloader_orig_asound
+#define snd_seq_port_info_set_port_specified snd_seq_port_info_set_port_specified_dylibloader_orig_asound
+#define snd_seq_port_info_set_timestamping snd_seq_port_info_set_timestamping_dylibloader_orig_asound
+#define snd_seq_port_info_set_timestamp_real snd_seq_port_info_set_timestamp_real_dylibloader_orig_asound
+#define snd_seq_port_info_set_timestamp_queue snd_seq_port_info_set_timestamp_queue_dylibloader_orig_asound
+#define snd_seq_create_port snd_seq_create_port_dylibloader_orig_asound
+#define snd_seq_delete_port snd_seq_delete_port_dylibloader_orig_asound
+#define snd_seq_get_port_info snd_seq_get_port_info_dylibloader_orig_asound
+#define snd_seq_get_any_port_info snd_seq_get_any_port_info_dylibloader_orig_asound
+#define snd_seq_set_port_info snd_seq_set_port_info_dylibloader_orig_asound
+#define snd_seq_query_next_port snd_seq_query_next_port_dylibloader_orig_asound
+#define snd_seq_port_subscribe_sizeof snd_seq_port_subscribe_sizeof_dylibloader_orig_asound
+#define snd_seq_port_subscribe_malloc snd_seq_port_subscribe_malloc_dylibloader_orig_asound
+#define snd_seq_port_subscribe_free snd_seq_port_subscribe_free_dylibloader_orig_asound
+#define snd_seq_port_subscribe_copy snd_seq_port_subscribe_copy_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_sender snd_seq_port_subscribe_get_sender_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_dest snd_seq_port_subscribe_get_dest_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_queue snd_seq_port_subscribe_get_queue_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_exclusive snd_seq_port_subscribe_get_exclusive_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_time_update snd_seq_port_subscribe_get_time_update_dylibloader_orig_asound
+#define snd_seq_port_subscribe_get_time_real snd_seq_port_subscribe_get_time_real_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_sender snd_seq_port_subscribe_set_sender_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_dest snd_seq_port_subscribe_set_dest_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_queue snd_seq_port_subscribe_set_queue_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_exclusive snd_seq_port_subscribe_set_exclusive_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_time_update snd_seq_port_subscribe_set_time_update_dylibloader_orig_asound
+#define snd_seq_port_subscribe_set_time_real snd_seq_port_subscribe_set_time_real_dylibloader_orig_asound
+#define snd_seq_get_port_subscription snd_seq_get_port_subscription_dylibloader_orig_asound
+#define snd_seq_subscribe_port snd_seq_subscribe_port_dylibloader_orig_asound
+#define snd_seq_unsubscribe_port snd_seq_unsubscribe_port_dylibloader_orig_asound
+#define snd_seq_query_subscribe_sizeof snd_seq_query_subscribe_sizeof_dylibloader_orig_asound
+#define snd_seq_query_subscribe_malloc snd_seq_query_subscribe_malloc_dylibloader_orig_asound
+#define snd_seq_query_subscribe_free snd_seq_query_subscribe_free_dylibloader_orig_asound
+#define snd_seq_query_subscribe_copy snd_seq_query_subscribe_copy_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_client snd_seq_query_subscribe_get_client_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_port snd_seq_query_subscribe_get_port_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_root snd_seq_query_subscribe_get_root_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_type snd_seq_query_subscribe_get_type_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_index snd_seq_query_subscribe_get_index_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_num_subs snd_seq_query_subscribe_get_num_subs_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_addr snd_seq_query_subscribe_get_addr_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_queue snd_seq_query_subscribe_get_queue_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_exclusive snd_seq_query_subscribe_get_exclusive_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_time_update snd_seq_query_subscribe_get_time_update_dylibloader_orig_asound
+#define snd_seq_query_subscribe_get_time_real snd_seq_query_subscribe_get_time_real_dylibloader_orig_asound
+#define snd_seq_query_subscribe_set_client snd_seq_query_subscribe_set_client_dylibloader_orig_asound
+#define snd_seq_query_subscribe_set_port snd_seq_query_subscribe_set_port_dylibloader_orig_asound
+#define snd_seq_query_subscribe_set_root snd_seq_query_subscribe_set_root_dylibloader_orig_asound
+#define snd_seq_query_subscribe_set_type snd_seq_query_subscribe_set_type_dylibloader_orig_asound
+#define snd_seq_query_subscribe_set_index snd_seq_query_subscribe_set_index_dylibloader_orig_asound
+#define snd_seq_query_port_subscribers snd_seq_query_port_subscribers_dylibloader_orig_asound
+#define snd_seq_queue_info_sizeof snd_seq_queue_info_sizeof_dylibloader_orig_asound
+#define snd_seq_queue_info_malloc snd_seq_queue_info_malloc_dylibloader_orig_asound
+#define snd_seq_queue_info_free snd_seq_queue_info_free_dylibloader_orig_asound
+#define snd_seq_queue_info_copy snd_seq_queue_info_copy_dylibloader_orig_asound
+#define snd_seq_queue_info_get_queue snd_seq_queue_info_get_queue_dylibloader_orig_asound
+#define snd_seq_queue_info_get_name snd_seq_queue_info_get_name_dylibloader_orig_asound
+#define snd_seq_queue_info_get_owner snd_seq_queue_info_get_owner_dylibloader_orig_asound
+#define snd_seq_queue_info_get_locked snd_seq_queue_info_get_locked_dylibloader_orig_asound
+#define snd_seq_queue_info_get_flags snd_seq_queue_info_get_flags_dylibloader_orig_asound
+#define snd_seq_queue_info_set_name snd_seq_queue_info_set_name_dylibloader_orig_asound
+#define snd_seq_queue_info_set_owner snd_seq_queue_info_set_owner_dylibloader_orig_asound
+#define snd_seq_queue_info_set_locked snd_seq_queue_info_set_locked_dylibloader_orig_asound
+#define snd_seq_queue_info_set_flags snd_seq_queue_info_set_flags_dylibloader_orig_asound
+#define snd_seq_create_queue snd_seq_create_queue_dylibloader_orig_asound
+#define snd_seq_alloc_named_queue snd_seq_alloc_named_queue_dylibloader_orig_asound
+#define snd_seq_alloc_queue snd_seq_alloc_queue_dylibloader_orig_asound
+#define snd_seq_free_queue snd_seq_free_queue_dylibloader_orig_asound
+#define snd_seq_get_queue_info snd_seq_get_queue_info_dylibloader_orig_asound
+#define snd_seq_set_queue_info snd_seq_set_queue_info_dylibloader_orig_asound
+#define snd_seq_query_named_queue snd_seq_query_named_queue_dylibloader_orig_asound
+#define snd_seq_get_queue_usage snd_seq_get_queue_usage_dylibloader_orig_asound
+#define snd_seq_set_queue_usage snd_seq_set_queue_usage_dylibloader_orig_asound
+#define snd_seq_queue_status_sizeof snd_seq_queue_status_sizeof_dylibloader_orig_asound
+#define snd_seq_queue_status_malloc snd_seq_queue_status_malloc_dylibloader_orig_asound
+#define snd_seq_queue_status_free snd_seq_queue_status_free_dylibloader_orig_asound
+#define snd_seq_queue_status_copy snd_seq_queue_status_copy_dylibloader_orig_asound
+#define snd_seq_queue_status_get_queue snd_seq_queue_status_get_queue_dylibloader_orig_asound
+#define snd_seq_queue_status_get_events snd_seq_queue_status_get_events_dylibloader_orig_asound
+#define snd_seq_queue_status_get_tick_time snd_seq_queue_status_get_tick_time_dylibloader_orig_asound
+#define snd_seq_queue_status_get_real_time snd_seq_queue_status_get_real_time_dylibloader_orig_asound
+#define snd_seq_queue_status_get_status snd_seq_queue_status_get_status_dylibloader_orig_asound
+#define snd_seq_get_queue_status snd_seq_get_queue_status_dylibloader_orig_asound
+#define snd_seq_queue_tempo_sizeof snd_seq_queue_tempo_sizeof_dylibloader_orig_asound
+#define snd_seq_queue_tempo_malloc snd_seq_queue_tempo_malloc_dylibloader_orig_asound
+#define snd_seq_queue_tempo_free snd_seq_queue_tempo_free_dylibloader_orig_asound
+#define snd_seq_queue_tempo_copy snd_seq_queue_tempo_copy_dylibloader_orig_asound
+#define snd_seq_queue_tempo_get_queue snd_seq_queue_tempo_get_queue_dylibloader_orig_asound
+#define snd_seq_queue_tempo_get_tempo snd_seq_queue_tempo_get_tempo_dylibloader_orig_asound
+#define snd_seq_queue_tempo_get_ppq snd_seq_queue_tempo_get_ppq_dylibloader_orig_asound
+#define snd_seq_queue_tempo_get_skew snd_seq_queue_tempo_get_skew_dylibloader_orig_asound
+#define snd_seq_queue_tempo_get_skew_base snd_seq_queue_tempo_get_skew_base_dylibloader_orig_asound
+#define snd_seq_queue_tempo_set_tempo snd_seq_queue_tempo_set_tempo_dylibloader_orig_asound
+#define snd_seq_queue_tempo_set_ppq snd_seq_queue_tempo_set_ppq_dylibloader_orig_asound
+#define snd_seq_queue_tempo_set_skew snd_seq_queue_tempo_set_skew_dylibloader_orig_asound
+#define snd_seq_queue_tempo_set_skew_base snd_seq_queue_tempo_set_skew_base_dylibloader_orig_asound
+#define snd_seq_get_queue_tempo snd_seq_get_queue_tempo_dylibloader_orig_asound
+#define snd_seq_set_queue_tempo snd_seq_set_queue_tempo_dylibloader_orig_asound
+#define snd_seq_queue_timer_sizeof snd_seq_queue_timer_sizeof_dylibloader_orig_asound
+#define snd_seq_queue_timer_malloc snd_seq_queue_timer_malloc_dylibloader_orig_asound
+#define snd_seq_queue_timer_free snd_seq_queue_timer_free_dylibloader_orig_asound
+#define snd_seq_queue_timer_copy snd_seq_queue_timer_copy_dylibloader_orig_asound
+#define snd_seq_queue_timer_get_queue snd_seq_queue_timer_get_queue_dylibloader_orig_asound
+#define snd_seq_queue_timer_get_type snd_seq_queue_timer_get_type_dylibloader_orig_asound
+#define snd_seq_queue_timer_get_id snd_seq_queue_timer_get_id_dylibloader_orig_asound
+#define snd_seq_queue_timer_get_resolution snd_seq_queue_timer_get_resolution_dylibloader_orig_asound
+#define snd_seq_queue_timer_set_type snd_seq_queue_timer_set_type_dylibloader_orig_asound
+#define snd_seq_queue_timer_set_id snd_seq_queue_timer_set_id_dylibloader_orig_asound
+#define snd_seq_queue_timer_set_resolution snd_seq_queue_timer_set_resolution_dylibloader_orig_asound
+#define snd_seq_get_queue_timer snd_seq_get_queue_timer_dylibloader_orig_asound
+#define snd_seq_set_queue_timer snd_seq_set_queue_timer_dylibloader_orig_asound
+#define snd_seq_free_event snd_seq_free_event_dylibloader_orig_asound
+#define snd_seq_event_length snd_seq_event_length_dylibloader_orig_asound
+#define snd_seq_event_output snd_seq_event_output_dylibloader_orig_asound
+#define snd_seq_event_output_buffer snd_seq_event_output_buffer_dylibloader_orig_asound
+#define snd_seq_event_output_direct snd_seq_event_output_direct_dylibloader_orig_asound
+#define snd_seq_event_input snd_seq_event_input_dylibloader_orig_asound
+#define snd_seq_event_input_pending snd_seq_event_input_pending_dylibloader_orig_asound
+#define snd_seq_drain_output snd_seq_drain_output_dylibloader_orig_asound
+#define snd_seq_event_output_pending snd_seq_event_output_pending_dylibloader_orig_asound
+#define snd_seq_extract_output snd_seq_extract_output_dylibloader_orig_asound
+#define snd_seq_drop_output snd_seq_drop_output_dylibloader_orig_asound
+#define snd_seq_drop_output_buffer snd_seq_drop_output_buffer_dylibloader_orig_asound
+#define snd_seq_drop_input snd_seq_drop_input_dylibloader_orig_asound
+#define snd_seq_drop_input_buffer snd_seq_drop_input_buffer_dylibloader_orig_asound
+#define snd_seq_remove_events_sizeof snd_seq_remove_events_sizeof_dylibloader_orig_asound
+#define snd_seq_remove_events_malloc snd_seq_remove_events_malloc_dylibloader_orig_asound
+#define snd_seq_remove_events_free snd_seq_remove_events_free_dylibloader_orig_asound
+#define snd_seq_remove_events_copy snd_seq_remove_events_copy_dylibloader_orig_asound
+#define snd_seq_remove_events_get_condition snd_seq_remove_events_get_condition_dylibloader_orig_asound
+#define snd_seq_remove_events_get_queue snd_seq_remove_events_get_queue_dylibloader_orig_asound
+#define snd_seq_remove_events_get_time snd_seq_remove_events_get_time_dylibloader_orig_asound
+#define snd_seq_remove_events_get_dest snd_seq_remove_events_get_dest_dylibloader_orig_asound
+#define snd_seq_remove_events_get_channel snd_seq_remove_events_get_channel_dylibloader_orig_asound
+#define snd_seq_remove_events_get_event_type snd_seq_remove_events_get_event_type_dylibloader_orig_asound
+#define snd_seq_remove_events_get_tag snd_seq_remove_events_get_tag_dylibloader_orig_asound
+#define snd_seq_remove_events_set_condition snd_seq_remove_events_set_condition_dylibloader_orig_asound
+#define snd_seq_remove_events_set_queue snd_seq_remove_events_set_queue_dylibloader_orig_asound
+#define snd_seq_remove_events_set_time snd_seq_remove_events_set_time_dylibloader_orig_asound
+#define snd_seq_remove_events_set_dest snd_seq_remove_events_set_dest_dylibloader_orig_asound
+#define snd_seq_remove_events_set_channel snd_seq_remove_events_set_channel_dylibloader_orig_asound
+#define snd_seq_remove_events_set_event_type snd_seq_remove_events_set_event_type_dylibloader_orig_asound
+#define snd_seq_remove_events_set_tag snd_seq_remove_events_set_tag_dylibloader_orig_asound
+#define snd_seq_remove_events snd_seq_remove_events_dylibloader_orig_asound
+#define snd_seq_set_bit snd_seq_set_bit_dylibloader_orig_asound
+#define snd_seq_unset_bit snd_seq_unset_bit_dylibloader_orig_asound
+#define snd_seq_change_bit snd_seq_change_bit_dylibloader_orig_asound
+#define snd_seq_get_bit snd_seq_get_bit_dylibloader_orig_asound
+#define snd_seq_control_queue snd_seq_control_queue_dylibloader_orig_asound
+#define snd_seq_create_simple_port snd_seq_create_simple_port_dylibloader_orig_asound
+#define snd_seq_delete_simple_port snd_seq_delete_simple_port_dylibloader_orig_asound
+#define snd_seq_connect_from snd_seq_connect_from_dylibloader_orig_asound
+#define snd_seq_connect_to snd_seq_connect_to_dylibloader_orig_asound
+#define snd_seq_disconnect_from snd_seq_disconnect_from_dylibloader_orig_asound
+#define snd_seq_disconnect_to snd_seq_disconnect_to_dylibloader_orig_asound
+#define snd_seq_set_client_name snd_seq_set_client_name_dylibloader_orig_asound
+#define snd_seq_set_client_event_filter snd_seq_set_client_event_filter_dylibloader_orig_asound
+#define snd_seq_set_client_pool_output snd_seq_set_client_pool_output_dylibloader_orig_asound
+#define snd_seq_set_client_pool_output_room snd_seq_set_client_pool_output_room_dylibloader_orig_asound
+#define snd_seq_set_client_pool_input snd_seq_set_client_pool_input_dylibloader_orig_asound
+#define snd_seq_sync_output_queue snd_seq_sync_output_queue_dylibloader_orig_asound
+#define snd_seq_parse_address snd_seq_parse_address_dylibloader_orig_asound
+#define snd_seq_reset_pool_output snd_seq_reset_pool_output_dylibloader_orig_asound
+#define snd_seq_reset_pool_input snd_seq_reset_pool_input_dylibloader_orig_asound
+#define snd_midi_event_new snd_midi_event_new_dylibloader_orig_asound
+#define snd_midi_event_resize_buffer snd_midi_event_resize_buffer_dylibloader_orig_asound
+#define snd_midi_event_free snd_midi_event_free_dylibloader_orig_asound
+#define snd_midi_event_init snd_midi_event_init_dylibloader_orig_asound
+#define snd_midi_event_reset_encode snd_midi_event_reset_encode_dylibloader_orig_asound
+#define snd_midi_event_reset_decode snd_midi_event_reset_decode_dylibloader_orig_asound
+#define snd_midi_event_no_status snd_midi_event_no_status_dylibloader_orig_asound
+#define snd_midi_event_encode snd_midi_event_encode_dylibloader_orig_asound
+#define snd_midi_event_encode_byte snd_midi_event_encode_byte_dylibloader_orig_asound
+#define snd_midi_event_decode snd_midi_event_decode_dylibloader_orig_asound
+#include <alsa/asoundlib.h>
+#undef snd_asoundlib_version
+#undef snd_dlpath
+#undef snd_dlopen
+#undef snd_dlsym
+#undef snd_dlclose
+#undef snd_async_add_handler
+#undef snd_async_del_handler
+#undef snd_async_handler_get_fd
+#undef snd_async_handler_get_signo
+#undef snd_async_handler_get_callback_private
+#undef snd_shm_area_create
+#undef snd_shm_area_share
+#undef snd_shm_area_destroy
+#undef snd_user_file
+#undef snd_input_stdio_open
+#undef snd_input_stdio_attach
+#undef snd_input_buffer_open
+#undef snd_input_close
+#undef snd_input_scanf
+#undef snd_input_gets
+#undef snd_input_getc
+#undef snd_input_ungetc
+#undef snd_output_stdio_open
+#undef snd_output_stdio_attach
+#undef snd_output_buffer_open
+#undef snd_output_buffer_string
+#undef snd_output_close
+#undef snd_output_printf
+#undef snd_output_vprintf
+#undef snd_output_puts
+#undef snd_output_putc
+#undef snd_output_flush
+#undef snd_strerror
+#undef snd_lib_error_set_handler
+#undef snd_lib_error_set_local
+#undef snd_config_topdir
+#undef snd_config_top
+#undef snd_config_load
+#undef snd_config_load_override
+#undef snd_config_save
+#undef snd_config_update
+#undef snd_config_update_r
+#undef snd_config_update_free
+#undef snd_config_update_free_global
+#undef snd_config_update_ref
+#undef snd_config_ref
+#undef snd_config_unref
+#undef snd_config_search
+#undef snd_config_searchv
+#undef snd_config_search_definition
+#undef snd_config_expand
+#undef snd_config_evaluate
+#undef snd_config_add
+#undef snd_config_add_before
+#undef snd_config_add_after
+#undef snd_config_remove
+#undef snd_config_delete
+#undef snd_config_delete_compound_members
+#undef snd_config_copy
+#undef snd_config_make
+#undef snd_config_make_integer
+#undef snd_config_make_integer64
+#undef snd_config_make_real
+#undef snd_config_make_string
+#undef snd_config_make_pointer
+#undef snd_config_make_compound
+#undef snd_config_imake_integer
+#undef snd_config_imake_integer64
+#undef snd_config_imake_real
+#undef snd_config_imake_string
+#undef snd_config_imake_safe_string
+#undef snd_config_imake_pointer
+#undef snd_config_get_type
+#undef snd_config_is_array
+#undef snd_config_set_id
+#undef snd_config_set_integer
+#undef snd_config_set_integer64
+#undef snd_config_set_real
+#undef snd_config_set_string
+#undef snd_config_set_ascii
+#undef snd_config_set_pointer
+#undef snd_config_get_id
+#undef snd_config_get_integer
+#undef snd_config_get_integer64
+#undef snd_config_get_real
+#undef snd_config_get_ireal
+#undef snd_config_get_string
+#undef snd_config_get_ascii
+#undef snd_config_get_pointer
+#undef snd_config_test_id
+#undef snd_config_iterator_first
+#undef snd_config_iterator_next
+#undef snd_config_iterator_end
+#undef snd_config_iterator_entry
+#undef snd_config_get_bool_ascii
+#undef snd_config_get_bool
+#undef snd_config_get_ctl_iface_ascii
+#undef snd_config_get_ctl_iface
+#undef snd_names_list
+#undef snd_names_list_free
+#undef snd_pcm_open
+#undef snd_pcm_open_lconf
+#undef snd_pcm_open_fallback
+#undef snd_pcm_close
+#undef snd_pcm_name
+#undef snd_pcm_type
+#undef snd_pcm_stream
+#undef snd_pcm_poll_descriptors_count
+#undef snd_pcm_poll_descriptors
+#undef snd_pcm_poll_descriptors_revents
+#undef snd_pcm_nonblock
+#undef snd_async_add_pcm_handler
+#undef snd_async_handler_get_pcm
+#undef snd_pcm_info
+#undef snd_pcm_hw_params_current
+#undef snd_pcm_hw_params
+#undef snd_pcm_hw_free
+#undef snd_pcm_sw_params_current
+#undef snd_pcm_sw_params
+#undef snd_pcm_prepare
+#undef snd_pcm_reset
+#undef snd_pcm_status
+#undef snd_pcm_start
+#undef snd_pcm_drop
+#undef snd_pcm_drain
+#undef snd_pcm_pause
+#undef snd_pcm_state
+#undef snd_pcm_hwsync
+#undef snd_pcm_delay
+#undef snd_pcm_resume
+#undef snd_pcm_htimestamp
+#undef snd_pcm_avail
+#undef snd_pcm_avail_update
+#undef snd_pcm_avail_delay
+#undef snd_pcm_rewindable
+#undef snd_pcm_rewind
+#undef snd_pcm_forwardable
+#undef snd_pcm_forward
+#undef snd_pcm_writei
+#undef snd_pcm_readi
+#undef snd_pcm_writen
+#undef snd_pcm_readn
+#undef snd_pcm_wait
+#undef snd_pcm_link
+#undef snd_pcm_unlink
+#undef snd_pcm_query_chmaps
+#undef snd_pcm_query_chmaps_from_hw
+#undef snd_pcm_free_chmaps
+#undef snd_pcm_get_chmap
+#undef snd_pcm_set_chmap
+#undef snd_pcm_chmap_type_name
+#undef snd_pcm_chmap_name
+#undef snd_pcm_chmap_long_name
+#undef snd_pcm_chmap_print
+#undef snd_pcm_chmap_from_string
+#undef snd_pcm_chmap_parse_string
+#undef snd_pcm_recover
+#undef snd_pcm_set_params
+#undef snd_pcm_get_params
+#undef snd_pcm_info_sizeof
+#undef snd_pcm_info_malloc
+#undef snd_pcm_info_free
+#undef snd_pcm_info_copy
+#undef snd_pcm_info_get_device
+#undef snd_pcm_info_get_subdevice
+#undef snd_pcm_info_get_stream
+#undef snd_pcm_info_get_card
+#undef snd_pcm_info_get_id
+#undef snd_pcm_info_get_name
+#undef snd_pcm_info_get_subdevice_name
+#undef snd_pcm_info_get_class
+#undef snd_pcm_info_get_subclass
+#undef snd_pcm_info_get_subdevices_count
+#undef snd_pcm_info_get_subdevices_avail
+#undef snd_pcm_info_get_sync
+#undef snd_pcm_info_set_device
+#undef snd_pcm_info_set_subdevice
+#undef snd_pcm_info_set_stream
+#undef snd_pcm_hw_params_any
+#undef snd_pcm_hw_params_can_mmap_sample_resolution
+#undef snd_pcm_hw_params_is_double
+#undef snd_pcm_hw_params_is_batch
+#undef snd_pcm_hw_params_is_block_transfer
+#undef snd_pcm_hw_params_is_monotonic
+#undef snd_pcm_hw_params_can_overrange
+#undef snd_pcm_hw_params_can_pause
+#undef snd_pcm_hw_params_can_resume
+#undef snd_pcm_hw_params_is_half_duplex
+#undef snd_pcm_hw_params_is_joint_duplex
+#undef snd_pcm_hw_params_can_sync_start
+#undef snd_pcm_hw_params_can_disable_period_wakeup
+#undef snd_pcm_hw_params_supports_audio_wallclock_ts
+#undef snd_pcm_hw_params_supports_audio_ts_type
+#undef snd_pcm_hw_params_get_rate_numden
+#undef snd_pcm_hw_params_get_sbits
+#undef snd_pcm_hw_params_get_fifo_size
+#undef snd_pcm_hw_params_sizeof
+#undef snd_pcm_hw_params_malloc
+#undef snd_pcm_hw_params_free
+#undef snd_pcm_hw_params_copy
+#undef snd_pcm_hw_params_get_access
+#undef snd_pcm_hw_params_test_access
+#undef snd_pcm_hw_params_set_access
+#undef snd_pcm_hw_params_set_access_first
+#undef snd_pcm_hw_params_set_access_last
+#undef snd_pcm_hw_params_set_access_mask
+#undef snd_pcm_hw_params_get_access_mask
+#undef snd_pcm_hw_params_get_format
+#undef snd_pcm_hw_params_test_format
+#undef snd_pcm_hw_params_set_format
+#undef snd_pcm_hw_params_set_format_first
+#undef snd_pcm_hw_params_set_format_last
+#undef snd_pcm_hw_params_set_format_mask
+#undef snd_pcm_hw_params_get_format_mask
+#undef snd_pcm_hw_params_get_subformat
+#undef snd_pcm_hw_params_test_subformat
+#undef snd_pcm_hw_params_set_subformat
+#undef snd_pcm_hw_params_set_subformat_first
+#undef snd_pcm_hw_params_set_subformat_last
+#undef snd_pcm_hw_params_set_subformat_mask
+#undef snd_pcm_hw_params_get_subformat_mask
+#undef snd_pcm_hw_params_get_channels
+#undef snd_pcm_hw_params_get_channels_min
+#undef snd_pcm_hw_params_get_channels_max
+#undef snd_pcm_hw_params_test_channels
+#undef snd_pcm_hw_params_set_channels
+#undef snd_pcm_hw_params_set_channels_min
+#undef snd_pcm_hw_params_set_channels_max
+#undef snd_pcm_hw_params_set_channels_minmax
+#undef snd_pcm_hw_params_set_channels_near
+#undef snd_pcm_hw_params_set_channels_first
+#undef snd_pcm_hw_params_set_channels_last
+#undef snd_pcm_hw_params_get_rate
+#undef snd_pcm_hw_params_get_rate_min
+#undef snd_pcm_hw_params_get_rate_max
+#undef snd_pcm_hw_params_test_rate
+#undef snd_pcm_hw_params_set_rate
+#undef snd_pcm_hw_params_set_rate_min
+#undef snd_pcm_hw_params_set_rate_max
+#undef snd_pcm_hw_params_set_rate_minmax
+#undef snd_pcm_hw_params_set_rate_near
+#undef snd_pcm_hw_params_set_rate_first
+#undef snd_pcm_hw_params_set_rate_last
+#undef snd_pcm_hw_params_set_rate_resample
+#undef snd_pcm_hw_params_get_rate_resample
+#undef snd_pcm_hw_params_set_export_buffer
+#undef snd_pcm_hw_params_get_export_buffer
+#undef snd_pcm_hw_params_set_period_wakeup
+#undef snd_pcm_hw_params_get_period_wakeup
+#undef snd_pcm_hw_params_get_period_time
+#undef snd_pcm_hw_params_get_period_time_min
+#undef snd_pcm_hw_params_get_period_time_max
+#undef snd_pcm_hw_params_test_period_time
+#undef snd_pcm_hw_params_set_period_time
+#undef snd_pcm_hw_params_set_period_time_min
+#undef snd_pcm_hw_params_set_period_time_max
+#undef snd_pcm_hw_params_set_period_time_minmax
+#undef snd_pcm_hw_params_set_period_time_near
+#undef snd_pcm_hw_params_set_period_time_first
+#undef snd_pcm_hw_params_set_period_time_last
+#undef snd_pcm_hw_params_get_period_size
+#undef snd_pcm_hw_params_get_period_size_min
+#undef snd_pcm_hw_params_get_period_size_max
+#undef snd_pcm_hw_params_test_period_size
+#undef snd_pcm_hw_params_set_period_size
+#undef snd_pcm_hw_params_set_period_size_min
+#undef snd_pcm_hw_params_set_period_size_max
+#undef snd_pcm_hw_params_set_period_size_minmax
+#undef snd_pcm_hw_params_set_period_size_near
+#undef snd_pcm_hw_params_set_period_size_first
+#undef snd_pcm_hw_params_set_period_size_last
+#undef snd_pcm_hw_params_set_period_size_integer
+#undef snd_pcm_hw_params_get_periods
+#undef snd_pcm_hw_params_get_periods_min
+#undef snd_pcm_hw_params_get_periods_max
+#undef snd_pcm_hw_params_test_periods
+#undef snd_pcm_hw_params_set_periods
+#undef snd_pcm_hw_params_set_periods_min
+#undef snd_pcm_hw_params_set_periods_max
+#undef snd_pcm_hw_params_set_periods_minmax
+#undef snd_pcm_hw_params_set_periods_near
+#undef snd_pcm_hw_params_set_periods_first
+#undef snd_pcm_hw_params_set_periods_last
+#undef snd_pcm_hw_params_set_periods_integer
+#undef snd_pcm_hw_params_get_buffer_time
+#undef snd_pcm_hw_params_get_buffer_time_min
+#undef snd_pcm_hw_params_get_buffer_time_max
+#undef snd_pcm_hw_params_test_buffer_time
+#undef snd_pcm_hw_params_set_buffer_time
+#undef snd_pcm_hw_params_set_buffer_time_min
+#undef snd_pcm_hw_params_set_buffer_time_max
+#undef snd_pcm_hw_params_set_buffer_time_minmax
+#undef snd_pcm_hw_params_set_buffer_time_near
+#undef snd_pcm_hw_params_set_buffer_time_first
+#undef snd_pcm_hw_params_set_buffer_time_last
+#undef snd_pcm_hw_params_get_buffer_size
+#undef snd_pcm_hw_params_get_buffer_size_min
+#undef snd_pcm_hw_params_get_buffer_size_max
+#undef snd_pcm_hw_params_test_buffer_size
+#undef snd_pcm_hw_params_set_buffer_size
+#undef snd_pcm_hw_params_set_buffer_size_min
+#undef snd_pcm_hw_params_set_buffer_size_max
+#undef snd_pcm_hw_params_set_buffer_size_minmax
+#undef snd_pcm_hw_params_set_buffer_size_near
+#undef snd_pcm_hw_params_set_buffer_size_first
+#undef snd_pcm_hw_params_set_buffer_size_last
+#undef snd_pcm_hw_params_get_min_align
+#undef snd_pcm_sw_params_sizeof
+#undef snd_pcm_sw_params_malloc
+#undef snd_pcm_sw_params_free
+#undef snd_pcm_sw_params_copy
+#undef snd_pcm_sw_params_get_boundary
+#undef snd_pcm_sw_params_set_tstamp_mode
+#undef snd_pcm_sw_params_get_tstamp_mode
+#undef snd_pcm_sw_params_set_tstamp_type
+#undef snd_pcm_sw_params_get_tstamp_type
+#undef snd_pcm_sw_params_set_avail_min
+#undef snd_pcm_sw_params_get_avail_min
+#undef snd_pcm_sw_params_set_period_event
+#undef snd_pcm_sw_params_get_period_event
+#undef snd_pcm_sw_params_set_start_threshold
+#undef snd_pcm_sw_params_get_start_threshold
+#undef snd_pcm_sw_params_set_stop_threshold
+#undef snd_pcm_sw_params_get_stop_threshold
+#undef snd_pcm_sw_params_set_silence_threshold
+#undef snd_pcm_sw_params_get_silence_threshold
+#undef snd_pcm_sw_params_set_silence_size
+#undef snd_pcm_sw_params_get_silence_size
+#undef snd_pcm_access_mask_sizeof
+#undef snd_pcm_access_mask_malloc
+#undef snd_pcm_access_mask_free
+#undef snd_pcm_access_mask_copy
+#undef snd_pcm_access_mask_none
+#undef snd_pcm_access_mask_any
+#undef snd_pcm_access_mask_test
+#undef snd_pcm_access_mask_empty
+#undef snd_pcm_access_mask_set
+#undef snd_pcm_access_mask_reset
+#undef snd_pcm_format_mask_sizeof
+#undef snd_pcm_format_mask_malloc
+#undef snd_pcm_format_mask_free
+#undef snd_pcm_format_mask_copy
+#undef snd_pcm_format_mask_none
+#undef snd_pcm_format_mask_any
+#undef snd_pcm_format_mask_test
+#undef snd_pcm_format_mask_empty
+#undef snd_pcm_format_mask_set
+#undef snd_pcm_format_mask_reset
+#undef snd_pcm_subformat_mask_sizeof
+#undef snd_pcm_subformat_mask_malloc
+#undef snd_pcm_subformat_mask_free
+#undef snd_pcm_subformat_mask_copy
+#undef snd_pcm_subformat_mask_none
+#undef snd_pcm_subformat_mask_any
+#undef snd_pcm_subformat_mask_test
+#undef snd_pcm_subformat_mask_empty
+#undef snd_pcm_subformat_mask_set
+#undef snd_pcm_subformat_mask_reset
+#undef snd_pcm_status_sizeof
+#undef snd_pcm_status_malloc
+#undef snd_pcm_status_free
+#undef snd_pcm_status_copy
+#undef snd_pcm_status_get_state
+#undef snd_pcm_status_get_trigger_tstamp
+#undef snd_pcm_status_get_trigger_htstamp
+#undef snd_pcm_status_get_tstamp
+#undef snd_pcm_status_get_htstamp
+#undef snd_pcm_status_get_audio_htstamp
+#undef snd_pcm_status_get_driver_htstamp
+#undef snd_pcm_status_get_audio_htstamp_report
+#undef snd_pcm_status_set_audio_htstamp_config
+#undef snd_pcm_status_get_delay
+#undef snd_pcm_status_get_avail
+#undef snd_pcm_status_get_avail_max
+#undef snd_pcm_status_get_overrange
+#undef snd_pcm_type_name
+#undef snd_pcm_stream_name
+#undef snd_pcm_access_name
+#undef snd_pcm_format_name
+#undef snd_pcm_format_description
+#undef snd_pcm_subformat_name
+#undef snd_pcm_subformat_description
+#undef snd_pcm_format_value
+#undef snd_pcm_tstamp_mode_name
+#undef snd_pcm_state_name
+#undef snd_pcm_dump
+#undef snd_pcm_dump_hw_setup
+#undef snd_pcm_dump_sw_setup
+#undef snd_pcm_dump_setup
+#undef snd_pcm_hw_params_dump
+#undef snd_pcm_sw_params_dump
+#undef snd_pcm_status_dump
+#undef snd_pcm_mmap_begin
+#undef snd_pcm_mmap_commit
+#undef snd_pcm_mmap_writei
+#undef snd_pcm_mmap_readi
+#undef snd_pcm_mmap_writen
+#undef snd_pcm_mmap_readn
+#undef snd_pcm_format_signed
+#undef snd_pcm_format_unsigned
+#undef snd_pcm_format_linear
+#undef snd_pcm_format_float
+#undef snd_pcm_format_little_endian
+#undef snd_pcm_format_big_endian
+#undef snd_pcm_format_cpu_endian
+#undef snd_pcm_format_width
+#undef snd_pcm_format_physical_width
+#undef snd_pcm_build_linear_format
+#undef snd_pcm_format_size
+#undef snd_pcm_format_silence
+#undef snd_pcm_format_silence_16
+#undef snd_pcm_format_silence_32
+#undef snd_pcm_format_silence_64
+#undef snd_pcm_format_set_silence
+#undef snd_pcm_bytes_to_frames
+#undef snd_pcm_frames_to_bytes
+#undef snd_pcm_bytes_to_samples
+#undef snd_pcm_samples_to_bytes
+#undef snd_pcm_area_silence
+#undef snd_pcm_areas_silence
+#undef snd_pcm_area_copy
+#undef snd_pcm_areas_copy
+#undef snd_pcm_areas_copy_wrap
+#undef snd_pcm_hook_get_pcm
+#undef snd_pcm_hook_get_private
+#undef snd_pcm_hook_set_private
+#undef snd_pcm_hook_add
+#undef snd_pcm_hook_remove
+#undef snd_pcm_meter_get_bufsize
+#undef snd_pcm_meter_get_channels
+#undef snd_pcm_meter_get_rate
+#undef snd_pcm_meter_get_now
+#undef snd_pcm_meter_get_boundary
+#undef snd_pcm_meter_add_scope
+#undef snd_pcm_meter_search_scope
+#undef snd_pcm_scope_malloc
+#undef snd_pcm_scope_set_ops
+#undef snd_pcm_scope_set_name
+#undef snd_pcm_scope_get_name
+#undef snd_pcm_scope_get_callback_private
+#undef snd_pcm_scope_set_callback_private
+#undef snd_pcm_scope_s16_open
+#undef snd_pcm_scope_s16_get_channel_buffer
+#undef snd_spcm_init
+#undef snd_spcm_init_duplex
+#undef snd_spcm_init_get_params
+#undef snd_pcm_start_mode_name
+#undef snd_pcm_xrun_mode_name
+#undef snd_pcm_sw_params_set_start_mode
+#undef snd_pcm_sw_params_get_start_mode
+#undef snd_pcm_sw_params_set_xrun_mode
+#undef snd_pcm_sw_params_get_xrun_mode
+#undef snd_pcm_sw_params_set_xfer_align
+#undef snd_pcm_sw_params_get_xfer_align
+#undef snd_pcm_sw_params_set_sleep_min
+#undef snd_pcm_sw_params_get_sleep_min
+#undef snd_pcm_hw_params_get_tick_time
+#undef snd_pcm_hw_params_get_tick_time_min
+#undef snd_pcm_hw_params_get_tick_time_max
+#undef snd_pcm_hw_params_test_tick_time
+#undef snd_pcm_hw_params_set_tick_time
+#undef snd_pcm_hw_params_set_tick_time_min
+#undef snd_pcm_hw_params_set_tick_time_max
+#undef snd_pcm_hw_params_set_tick_time_minmax
+#undef snd_pcm_hw_params_set_tick_time_near
+#undef snd_pcm_hw_params_set_tick_time_first
+#undef snd_pcm_hw_params_set_tick_time_last
+#undef snd_rawmidi_open
+#undef snd_rawmidi_open_lconf
+#undef snd_rawmidi_close
+#undef snd_rawmidi_poll_descriptors_count
+#undef snd_rawmidi_poll_descriptors
+#undef snd_rawmidi_poll_descriptors_revents
+#undef snd_rawmidi_nonblock
+#undef snd_rawmidi_info_sizeof
+#undef snd_rawmidi_info_malloc
+#undef snd_rawmidi_info_free
+#undef snd_rawmidi_info_copy
+#undef snd_rawmidi_info_get_device
+#undef snd_rawmidi_info_get_subdevice
+#undef snd_rawmidi_info_get_stream
+#undef snd_rawmidi_info_get_card
+#undef snd_rawmidi_info_get_flags
+#undef snd_rawmidi_info_get_id
+#undef snd_rawmidi_info_get_name
+#undef snd_rawmidi_info_get_subdevice_name
+#undef snd_rawmidi_info_get_subdevices_count
+#undef snd_rawmidi_info_get_subdevices_avail
+#undef snd_rawmidi_info_set_device
+#undef snd_rawmidi_info_set_subdevice
+#undef snd_rawmidi_info_set_stream
+#undef snd_rawmidi_info
+#undef snd_rawmidi_params_sizeof
+#undef snd_rawmidi_params_malloc
+#undef snd_rawmidi_params_free
+#undef snd_rawmidi_params_copy
+#undef snd_rawmidi_params_set_buffer_size
+#undef snd_rawmidi_params_get_buffer_size
+#undef snd_rawmidi_params_set_avail_min
+#undef snd_rawmidi_params_get_avail_min
+#undef snd_rawmidi_params_set_no_active_sensing
+#undef snd_rawmidi_params_get_no_active_sensing
+#undef snd_rawmidi_params
+#undef snd_rawmidi_params_current
+#undef snd_rawmidi_status_sizeof
+#undef snd_rawmidi_status_malloc
+#undef snd_rawmidi_status_free
+#undef snd_rawmidi_status_copy
+#undef snd_rawmidi_status_get_tstamp
+#undef snd_rawmidi_status_get_avail
+#undef snd_rawmidi_status_get_xruns
+#undef snd_rawmidi_status
+#undef snd_rawmidi_drain
+#undef snd_rawmidi_drop
+#undef snd_rawmidi_write
+#undef snd_rawmidi_read
+#undef snd_rawmidi_name
+#undef snd_rawmidi_type
+#undef snd_rawmidi_stream
+#undef snd_timer_query_open
+#undef snd_timer_query_open_lconf
+#undef snd_timer_query_close
+#undef snd_timer_query_next_device
+#undef snd_timer_query_info
+#undef snd_timer_query_params
+#undef snd_timer_query_status
+#undef snd_timer_open
+#undef snd_timer_open_lconf
+#undef snd_timer_close
+#undef snd_async_add_timer_handler
+#undef snd_async_handler_get_timer
+#undef snd_timer_poll_descriptors_count
+#undef snd_timer_poll_descriptors
+#undef snd_timer_poll_descriptors_revents
+#undef snd_timer_info
+#undef snd_timer_params
+#undef snd_timer_status
+#undef snd_timer_start
+#undef snd_timer_stop
+#undef snd_timer_continue
+#undef snd_timer_read
+#undef snd_timer_id_sizeof
+#undef snd_timer_id_malloc
+#undef snd_timer_id_free
+#undef snd_timer_id_copy
+#undef snd_timer_id_set_class
+#undef snd_timer_id_get_class
+#undef snd_timer_id_set_sclass
+#undef snd_timer_id_get_sclass
+#undef snd_timer_id_set_card
+#undef snd_timer_id_get_card
+#undef snd_timer_id_set_device
+#undef snd_timer_id_get_device
+#undef snd_timer_id_set_subdevice
+#undef snd_timer_id_get_subdevice
+#undef snd_timer_ginfo_sizeof
+#undef snd_timer_ginfo_malloc
+#undef snd_timer_ginfo_free
+#undef snd_timer_ginfo_copy
+#undef snd_timer_ginfo_set_tid
+#undef snd_timer_ginfo_get_tid
+#undef snd_timer_ginfo_get_flags
+#undef snd_timer_ginfo_get_card
+#undef snd_timer_ginfo_get_id
+#undef snd_timer_ginfo_get_name
+#undef snd_timer_ginfo_get_resolution
+#undef snd_timer_ginfo_get_resolution_min
+#undef snd_timer_ginfo_get_resolution_max
+#undef snd_timer_ginfo_get_clients
+#undef snd_timer_info_sizeof
+#undef snd_timer_info_malloc
+#undef snd_timer_info_free
+#undef snd_timer_info_copy
+#undef snd_timer_info_is_slave
+#undef snd_timer_info_get_card
+#undef snd_timer_info_get_id
+#undef snd_timer_info_get_name
+#undef snd_timer_info_get_resolution
+#undef snd_timer_params_sizeof
+#undef snd_timer_params_malloc
+#undef snd_timer_params_free
+#undef snd_timer_params_copy
+#undef snd_timer_params_set_auto_start
+#undef snd_timer_params_get_auto_start
+#undef snd_timer_params_set_exclusive
+#undef snd_timer_params_get_exclusive
+#undef snd_timer_params_set_early_event
+#undef snd_timer_params_get_early_event
+#undef snd_timer_params_set_ticks
+#undef snd_timer_params_get_ticks
+#undef snd_timer_params_set_queue_size
+#undef snd_timer_params_get_queue_size
+#undef snd_timer_params_set_filter
+#undef snd_timer_params_get_filter
+#undef snd_timer_status_sizeof
+#undef snd_timer_status_malloc
+#undef snd_timer_status_free
+#undef snd_timer_status_copy
+#undef snd_timer_status_get_timestamp
+#undef snd_timer_status_get_resolution
+#undef snd_timer_status_get_lost
+#undef snd_timer_status_get_overrun
+#undef snd_timer_status_get_queue
+#undef snd_timer_info_get_ticks
+#undef snd_hwdep_open
+#undef snd_hwdep_close
+#undef snd_hwdep_poll_descriptors
+#undef snd_hwdep_poll_descriptors_count
+#undef snd_hwdep_poll_descriptors_revents
+#undef snd_hwdep_nonblock
+#undef snd_hwdep_info
+#undef snd_hwdep_dsp_status
+#undef snd_hwdep_dsp_load
+#undef snd_hwdep_ioctl
+#undef snd_hwdep_write
+#undef snd_hwdep_read
+#undef snd_hwdep_info_sizeof
+#undef snd_hwdep_info_malloc
+#undef snd_hwdep_info_free
+#undef snd_hwdep_info_copy
+#undef snd_hwdep_info_get_device
+#undef snd_hwdep_info_get_card
+#undef snd_hwdep_info_get_id
+#undef snd_hwdep_info_get_name
+#undef snd_hwdep_info_get_iface
+#undef snd_hwdep_info_set_device
+#undef snd_hwdep_dsp_status_sizeof
+#undef snd_hwdep_dsp_status_malloc
+#undef snd_hwdep_dsp_status_free
+#undef snd_hwdep_dsp_status_copy
+#undef snd_hwdep_dsp_status_get_version
+#undef snd_hwdep_dsp_status_get_id
+#undef snd_hwdep_dsp_status_get_num_dsps
+#undef snd_hwdep_dsp_status_get_dsp_loaded
+#undef snd_hwdep_dsp_status_get_chip_ready
+#undef snd_hwdep_dsp_image_sizeof
+#undef snd_hwdep_dsp_image_malloc
+#undef snd_hwdep_dsp_image_free
+#undef snd_hwdep_dsp_image_copy
+#undef snd_hwdep_dsp_image_get_index
+#undef snd_hwdep_dsp_image_get_name
+#undef snd_hwdep_dsp_image_get_image
+#undef snd_hwdep_dsp_image_get_length
+#undef snd_hwdep_dsp_image_set_index
+#undef snd_hwdep_dsp_image_set_name
+#undef snd_hwdep_dsp_image_set_image
+#undef snd_hwdep_dsp_image_set_length
+#undef snd_card_load
+#undef snd_card_next
+#undef snd_card_get_index
+#undef snd_card_get_name
+#undef snd_card_get_longname
+#undef snd_device_name_hint
+#undef snd_device_name_free_hint
+#undef snd_device_name_get_hint
+#undef snd_ctl_open
+#undef snd_ctl_open_lconf
+#undef snd_ctl_open_fallback
+#undef snd_ctl_close
+#undef snd_ctl_nonblock
+#undef snd_async_add_ctl_handler
+#undef snd_async_handler_get_ctl
+#undef snd_ctl_poll_descriptors_count
+#undef snd_ctl_poll_descriptors
+#undef snd_ctl_poll_descriptors_revents
+#undef snd_ctl_subscribe_events
+#undef snd_ctl_card_info
+#undef snd_ctl_elem_list
+#undef snd_ctl_elem_info
+#undef snd_ctl_elem_read
+#undef snd_ctl_elem_write
+#undef snd_ctl_elem_lock
+#undef snd_ctl_elem_unlock
+#undef snd_ctl_elem_tlv_read
+#undef snd_ctl_elem_tlv_write
+#undef snd_ctl_elem_tlv_command
+#undef snd_ctl_hwdep_next_device
+#undef snd_ctl_hwdep_info
+#undef snd_ctl_pcm_next_device
+#undef snd_ctl_pcm_info
+#undef snd_ctl_pcm_prefer_subdevice
+#undef snd_ctl_rawmidi_next_device
+#undef snd_ctl_rawmidi_info
+#undef snd_ctl_rawmidi_prefer_subdevice
+#undef snd_ctl_set_power_state
+#undef snd_ctl_get_power_state
+#undef snd_ctl_read
+#undef snd_ctl_wait
+#undef snd_ctl_name
+#undef snd_ctl_type
+#undef snd_ctl_elem_type_name
+#undef snd_ctl_elem_iface_name
+#undef snd_ctl_event_type_name
+#undef snd_ctl_event_elem_get_mask
+#undef snd_ctl_event_elem_get_numid
+#undef snd_ctl_event_elem_get_id
+#undef snd_ctl_event_elem_get_interface
+#undef snd_ctl_event_elem_get_device
+#undef snd_ctl_event_elem_get_subdevice
+#undef snd_ctl_event_elem_get_name
+#undef snd_ctl_event_elem_get_index
+#undef snd_ctl_elem_list_alloc_space
+#undef snd_ctl_elem_list_free_space
+#undef snd_ctl_ascii_elem_id_get
+#undef snd_ctl_ascii_elem_id_parse
+#undef snd_ctl_ascii_value_parse
+#undef snd_ctl_elem_id_sizeof
+#undef snd_ctl_elem_id_malloc
+#undef snd_ctl_elem_id_free
+#undef snd_ctl_elem_id_clear
+#undef snd_ctl_elem_id_copy
+#undef snd_ctl_elem_id_get_numid
+#undef snd_ctl_elem_id_get_interface
+#undef snd_ctl_elem_id_get_device
+#undef snd_ctl_elem_id_get_subdevice
+#undef snd_ctl_elem_id_get_name
+#undef snd_ctl_elem_id_get_index
+#undef snd_ctl_elem_id_set_numid
+#undef snd_ctl_elem_id_set_interface
+#undef snd_ctl_elem_id_set_device
+#undef snd_ctl_elem_id_set_subdevice
+#undef snd_ctl_elem_id_set_name
+#undef snd_ctl_elem_id_set_index
+#undef snd_ctl_card_info_sizeof
+#undef snd_ctl_card_info_malloc
+#undef snd_ctl_card_info_free
+#undef snd_ctl_card_info_clear
+#undef snd_ctl_card_info_copy
+#undef snd_ctl_card_info_get_card
+#undef snd_ctl_card_info_get_id
+#undef snd_ctl_card_info_get_driver
+#undef snd_ctl_card_info_get_name
+#undef snd_ctl_card_info_get_longname
+#undef snd_ctl_card_info_get_mixername
+#undef snd_ctl_card_info_get_components
+#undef snd_ctl_event_sizeof
+#undef snd_ctl_event_malloc
+#undef snd_ctl_event_free
+#undef snd_ctl_event_clear
+#undef snd_ctl_event_copy
+#undef snd_ctl_event_get_type
+#undef snd_ctl_elem_list_sizeof
+#undef snd_ctl_elem_list_malloc
+#undef snd_ctl_elem_list_free
+#undef snd_ctl_elem_list_clear
+#undef snd_ctl_elem_list_copy
+#undef snd_ctl_elem_list_set_offset
+#undef snd_ctl_elem_list_get_used
+#undef snd_ctl_elem_list_get_count
+#undef snd_ctl_elem_list_get_id
+#undef snd_ctl_elem_list_get_numid
+#undef snd_ctl_elem_list_get_interface
+#undef snd_ctl_elem_list_get_device
+#undef snd_ctl_elem_list_get_subdevice
+#undef snd_ctl_elem_list_get_name
+#undef snd_ctl_elem_list_get_index
+#undef snd_ctl_elem_info_sizeof
+#undef snd_ctl_elem_info_malloc
+#undef snd_ctl_elem_info_free
+#undef snd_ctl_elem_info_clear
+#undef snd_ctl_elem_info_copy
+#undef snd_ctl_elem_info_get_type
+#undef snd_ctl_elem_info_is_readable
+#undef snd_ctl_elem_info_is_writable
+#undef snd_ctl_elem_info_is_volatile
+#undef snd_ctl_elem_info_is_inactive
+#undef snd_ctl_elem_info_is_locked
+#undef snd_ctl_elem_info_is_tlv_readable
+#undef snd_ctl_elem_info_is_tlv_writable
+#undef snd_ctl_elem_info_is_tlv_commandable
+#undef snd_ctl_elem_info_is_owner
+#undef snd_ctl_elem_info_is_user
+#undef snd_ctl_elem_info_get_owner
+#undef snd_ctl_elem_info_get_count
+#undef snd_ctl_elem_info_get_min
+#undef snd_ctl_elem_info_get_max
+#undef snd_ctl_elem_info_get_step
+#undef snd_ctl_elem_info_get_min64
+#undef snd_ctl_elem_info_get_max64
+#undef snd_ctl_elem_info_get_step64
+#undef snd_ctl_elem_info_get_items
+#undef snd_ctl_elem_info_set_item
+#undef snd_ctl_elem_info_get_item_name
+#undef snd_ctl_elem_info_get_dimensions
+#undef snd_ctl_elem_info_get_dimension
+#undef snd_ctl_elem_info_set_dimension
+#undef snd_ctl_elem_info_get_id
+#undef snd_ctl_elem_info_get_numid
+#undef snd_ctl_elem_info_get_interface
+#undef snd_ctl_elem_info_get_device
+#undef snd_ctl_elem_info_get_subdevice
+#undef snd_ctl_elem_info_get_name
+#undef snd_ctl_elem_info_get_index
+#undef snd_ctl_elem_info_set_id
+#undef snd_ctl_elem_info_set_numid
+#undef snd_ctl_elem_info_set_interface
+#undef snd_ctl_elem_info_set_device
+#undef snd_ctl_elem_info_set_subdevice
+#undef snd_ctl_elem_info_set_name
+#undef snd_ctl_elem_info_set_index
+#undef snd_ctl_add_integer_elem_set
+#undef snd_ctl_add_integer64_elem_set
+#undef snd_ctl_add_boolean_elem_set
+#undef snd_ctl_add_enumerated_elem_set
+#undef snd_ctl_add_bytes_elem_set
+#undef snd_ctl_elem_add_integer
+#undef snd_ctl_elem_add_integer64
+#undef snd_ctl_elem_add_boolean
+#undef snd_ctl_elem_add_enumerated
+#undef snd_ctl_elem_add_iec958
+#undef snd_ctl_elem_remove
+#undef snd_ctl_elem_value_sizeof
+#undef snd_ctl_elem_value_malloc
+#undef snd_ctl_elem_value_free
+#undef snd_ctl_elem_value_clear
+#undef snd_ctl_elem_value_copy
+#undef snd_ctl_elem_value_compare
+#undef snd_ctl_elem_value_get_id
+#undef snd_ctl_elem_value_get_numid
+#undef snd_ctl_elem_value_get_interface
+#undef snd_ctl_elem_value_get_device
+#undef snd_ctl_elem_value_get_subdevice
+#undef snd_ctl_elem_value_get_name
+#undef snd_ctl_elem_value_get_index
+#undef snd_ctl_elem_value_set_id
+#undef snd_ctl_elem_value_set_numid
+#undef snd_ctl_elem_value_set_interface
+#undef snd_ctl_elem_value_set_device
+#undef snd_ctl_elem_value_set_subdevice
+#undef snd_ctl_elem_value_set_name
+#undef snd_ctl_elem_value_set_index
+#undef snd_ctl_elem_value_get_boolean
+#undef snd_ctl_elem_value_get_integer
+#undef snd_ctl_elem_value_get_integer64
+#undef snd_ctl_elem_value_get_enumerated
+#undef snd_ctl_elem_value_get_byte
+#undef snd_ctl_elem_value_set_boolean
+#undef snd_ctl_elem_value_set_integer
+#undef snd_ctl_elem_value_set_integer64
+#undef snd_ctl_elem_value_set_enumerated
+#undef snd_ctl_elem_value_set_byte
+#undef snd_ctl_elem_set_bytes
+#undef snd_ctl_elem_value_get_bytes
+#undef snd_ctl_elem_value_get_iec958
+#undef snd_ctl_elem_value_set_iec958
+#undef snd_tlv_parse_dB_info
+#undef snd_tlv_get_dB_range
+#undef snd_tlv_convert_to_dB
+#undef snd_tlv_convert_from_dB
+#undef snd_ctl_get_dB_range
+#undef snd_ctl_convert_to_dB
+#undef snd_ctl_convert_from_dB
+#undef snd_hctl_compare_fast
+#undef snd_hctl_open
+#undef snd_hctl_open_ctl
+#undef snd_hctl_close
+#undef snd_hctl_nonblock
+#undef snd_hctl_poll_descriptors_count
+#undef snd_hctl_poll_descriptors
+#undef snd_hctl_poll_descriptors_revents
+#undef snd_hctl_get_count
+#undef snd_hctl_set_compare
+#undef snd_hctl_first_elem
+#undef snd_hctl_last_elem
+#undef snd_hctl_find_elem
+#undef snd_hctl_set_callback
+#undef snd_hctl_set_callback_private
+#undef snd_hctl_get_callback_private
+#undef snd_hctl_load
+#undef snd_hctl_free
+#undef snd_hctl_handle_events
+#undef snd_hctl_name
+#undef snd_hctl_wait
+#undef snd_hctl_ctl
+#undef snd_hctl_elem_next
+#undef snd_hctl_elem_prev
+#undef snd_hctl_elem_info
+#undef snd_hctl_elem_read
+#undef snd_hctl_elem_write
+#undef snd_hctl_elem_tlv_read
+#undef snd_hctl_elem_tlv_write
+#undef snd_hctl_elem_tlv_command
+#undef snd_hctl_elem_get_hctl
+#undef snd_hctl_elem_get_id
+#undef snd_hctl_elem_get_numid
+#undef snd_hctl_elem_get_interface
+#undef snd_hctl_elem_get_device
+#undef snd_hctl_elem_get_subdevice
+#undef snd_hctl_elem_get_name
+#undef snd_hctl_elem_get_index
+#undef snd_hctl_elem_set_callback
+#undef snd_hctl_elem_get_callback_private
+#undef snd_hctl_elem_set_callback_private
+#undef snd_sctl_build
+#undef snd_sctl_free
+#undef snd_sctl_install
+#undef snd_sctl_remove
+#undef snd_mixer_open
+#undef snd_mixer_close
+#undef snd_mixer_first_elem
+#undef snd_mixer_last_elem
+#undef snd_mixer_handle_events
+#undef snd_mixer_attach
+#undef snd_mixer_attach_hctl
+#undef snd_mixer_detach
+#undef snd_mixer_detach_hctl
+#undef snd_mixer_get_hctl
+#undef snd_mixer_poll_descriptors_count
+#undef snd_mixer_poll_descriptors
+#undef snd_mixer_poll_descriptors_revents
+#undef snd_mixer_load
+#undef snd_mixer_free
+#undef snd_mixer_wait
+#undef snd_mixer_set_compare
+#undef snd_mixer_set_callback
+#undef snd_mixer_get_callback_private
+#undef snd_mixer_set_callback_private
+#undef snd_mixer_get_count
+#undef snd_mixer_class_unregister
+#undef snd_mixer_elem_next
+#undef snd_mixer_elem_prev
+#undef snd_mixer_elem_set_callback
+#undef snd_mixer_elem_get_callback_private
+#undef snd_mixer_elem_set_callback_private
+#undef snd_mixer_elem_get_type
+#undef snd_mixer_class_register
+#undef snd_mixer_elem_new
+#undef snd_mixer_elem_add
+#undef snd_mixer_elem_remove
+#undef snd_mixer_elem_free
+#undef snd_mixer_elem_info
+#undef snd_mixer_elem_value
+#undef snd_mixer_elem_attach
+#undef snd_mixer_elem_detach
+#undef snd_mixer_elem_empty
+#undef snd_mixer_elem_get_private
+#undef snd_mixer_class_sizeof
+#undef snd_mixer_class_malloc
+#undef snd_mixer_class_free
+#undef snd_mixer_class_copy
+#undef snd_mixer_class_get_mixer
+#undef snd_mixer_class_get_event
+#undef snd_mixer_class_get_private
+#undef snd_mixer_class_get_compare
+#undef snd_mixer_class_set_event
+#undef snd_mixer_class_set_private
+#undef snd_mixer_class_set_private_free
+#undef snd_mixer_class_set_compare
+#undef snd_mixer_selem_channel_name
+#undef snd_mixer_selem_register
+#undef snd_mixer_selem_get_id
+#undef snd_mixer_selem_get_name
+#undef snd_mixer_selem_get_index
+#undef snd_mixer_find_selem
+#undef snd_mixer_selem_is_active
+#undef snd_mixer_selem_is_playback_mono
+#undef snd_mixer_selem_has_playback_channel
+#undef snd_mixer_selem_is_capture_mono
+#undef snd_mixer_selem_has_capture_channel
+#undef snd_mixer_selem_get_capture_group
+#undef snd_mixer_selem_has_common_volume
+#undef snd_mixer_selem_has_playback_volume
+#undef snd_mixer_selem_has_playback_volume_joined
+#undef snd_mixer_selem_has_capture_volume
+#undef snd_mixer_selem_has_capture_volume_joined
+#undef snd_mixer_selem_has_common_switch
+#undef snd_mixer_selem_has_playback_switch
+#undef snd_mixer_selem_has_playback_switch_joined
+#undef snd_mixer_selem_has_capture_switch
+#undef snd_mixer_selem_has_capture_switch_joined
+#undef snd_mixer_selem_has_capture_switch_exclusive
+#undef snd_mixer_selem_ask_playback_vol_dB
+#undef snd_mixer_selem_ask_capture_vol_dB
+#undef snd_mixer_selem_ask_playback_dB_vol
+#undef snd_mixer_selem_ask_capture_dB_vol
+#undef snd_mixer_selem_get_playback_volume
+#undef snd_mixer_selem_get_capture_volume
+#undef snd_mixer_selem_get_playback_dB
+#undef snd_mixer_selem_get_capture_dB
+#undef snd_mixer_selem_get_playback_switch
+#undef snd_mixer_selem_get_capture_switch
+#undef snd_mixer_selem_set_playback_volume
+#undef snd_mixer_selem_set_capture_volume
+#undef snd_mixer_selem_set_playback_dB
+#undef snd_mixer_selem_set_capture_dB
+#undef snd_mixer_selem_set_playback_volume_all
+#undef snd_mixer_selem_set_capture_volume_all
+#undef snd_mixer_selem_set_playback_dB_all
+#undef snd_mixer_selem_set_capture_dB_all
+#undef snd_mixer_selem_set_playback_switch
+#undef snd_mixer_selem_set_capture_switch
+#undef snd_mixer_selem_set_playback_switch_all
+#undef snd_mixer_selem_set_capture_switch_all
+#undef snd_mixer_selem_get_playback_volume_range
+#undef snd_mixer_selem_get_playback_dB_range
+#undef snd_mixer_selem_set_playback_volume_range
+#undef snd_mixer_selem_get_capture_volume_range
+#undef snd_mixer_selem_get_capture_dB_range
+#undef snd_mixer_selem_set_capture_volume_range
+#undef snd_mixer_selem_is_enumerated
+#undef snd_mixer_selem_is_enum_playback
+#undef snd_mixer_selem_is_enum_capture
+#undef snd_mixer_selem_get_enum_items
+#undef snd_mixer_selem_get_enum_item_name
+#undef snd_mixer_selem_get_enum_item
+#undef snd_mixer_selem_set_enum_item
+#undef snd_mixer_selem_id_sizeof
+#undef snd_mixer_selem_id_malloc
+#undef snd_mixer_selem_id_free
+#undef snd_mixer_selem_id_copy
+#undef snd_mixer_selem_id_get_name
+#undef snd_mixer_selem_id_get_index
+#undef snd_mixer_selem_id_set_name
+#undef snd_mixer_selem_id_set_index
+#undef snd_mixer_selem_id_parse
+#undef snd_seq_open
+#undef snd_seq_open_lconf
+#undef snd_seq_name
+#undef snd_seq_type
+#undef snd_seq_close
+#undef snd_seq_poll_descriptors_count
+#undef snd_seq_poll_descriptors
+#undef snd_seq_poll_descriptors_revents
+#undef snd_seq_nonblock
+#undef snd_seq_client_id
+#undef snd_seq_get_output_buffer_size
+#undef snd_seq_get_input_buffer_size
+#undef snd_seq_set_output_buffer_size
+#undef snd_seq_set_input_buffer_size
+#undef snd_seq_system_info_sizeof
+#undef snd_seq_system_info_malloc
+#undef snd_seq_system_info_free
+#undef snd_seq_system_info_copy
+#undef snd_seq_system_info_get_queues
+#undef snd_seq_system_info_get_clients
+#undef snd_seq_system_info_get_ports
+#undef snd_seq_system_info_get_channels
+#undef snd_seq_system_info_get_cur_clients
+#undef snd_seq_system_info_get_cur_queues
+#undef snd_seq_system_info
+#undef snd_seq_client_info_sizeof
+#undef snd_seq_client_info_malloc
+#undef snd_seq_client_info_free
+#undef snd_seq_client_info_copy
+#undef snd_seq_client_info_get_client
+#undef snd_seq_client_info_get_type
+#undef snd_seq_client_info_get_name
+#undef snd_seq_client_info_get_broadcast_filter
+#undef snd_seq_client_info_get_error_bounce
+#undef snd_seq_client_info_get_card
+#undef snd_seq_client_info_get_pid
+#undef snd_seq_client_info_get_event_filter
+#undef snd_seq_client_info_get_num_ports
+#undef snd_seq_client_info_get_event_lost
+#undef snd_seq_client_info_set_client
+#undef snd_seq_client_info_set_name
+#undef snd_seq_client_info_set_broadcast_filter
+#undef snd_seq_client_info_set_error_bounce
+#undef snd_seq_client_info_set_event_filter
+#undef snd_seq_client_info_event_filter_clear
+#undef snd_seq_client_info_event_filter_add
+#undef snd_seq_client_info_event_filter_del
+#undef snd_seq_client_info_event_filter_check
+#undef snd_seq_get_client_info
+#undef snd_seq_get_any_client_info
+#undef snd_seq_set_client_info
+#undef snd_seq_query_next_client
+#undef snd_seq_client_pool_sizeof
+#undef snd_seq_client_pool_malloc
+#undef snd_seq_client_pool_free
+#undef snd_seq_client_pool_copy
+#undef snd_seq_client_pool_get_client
+#undef snd_seq_client_pool_get_output_pool
+#undef snd_seq_client_pool_get_input_pool
+#undef snd_seq_client_pool_get_output_room
+#undef snd_seq_client_pool_get_output_free
+#undef snd_seq_client_pool_get_input_free
+#undef snd_seq_client_pool_set_output_pool
+#undef snd_seq_client_pool_set_input_pool
+#undef snd_seq_client_pool_set_output_room
+#undef snd_seq_get_client_pool
+#undef snd_seq_set_client_pool
+#undef snd_seq_port_info_sizeof
+#undef snd_seq_port_info_malloc
+#undef snd_seq_port_info_free
+#undef snd_seq_port_info_copy
+#undef snd_seq_port_info_get_client
+#undef snd_seq_port_info_get_port
+#undef snd_seq_port_info_get_addr
+#undef snd_seq_port_info_get_name
+#undef snd_seq_port_info_get_capability
+#undef snd_seq_port_info_get_type
+#undef snd_seq_port_info_get_midi_channels
+#undef snd_seq_port_info_get_midi_voices
+#undef snd_seq_port_info_get_synth_voices
+#undef snd_seq_port_info_get_read_use
+#undef snd_seq_port_info_get_write_use
+#undef snd_seq_port_info_get_port_specified
+#undef snd_seq_port_info_get_timestamping
+#undef snd_seq_port_info_get_timestamp_real
+#undef snd_seq_port_info_get_timestamp_queue
+#undef snd_seq_port_info_set_client
+#undef snd_seq_port_info_set_port
+#undef snd_seq_port_info_set_addr
+#undef snd_seq_port_info_set_name
+#undef snd_seq_port_info_set_capability
+#undef snd_seq_port_info_set_type
+#undef snd_seq_port_info_set_midi_channels
+#undef snd_seq_port_info_set_midi_voices
+#undef snd_seq_port_info_set_synth_voices
+#undef snd_seq_port_info_set_port_specified
+#undef snd_seq_port_info_set_timestamping
+#undef snd_seq_port_info_set_timestamp_real
+#undef snd_seq_port_info_set_timestamp_queue
+#undef snd_seq_create_port
+#undef snd_seq_delete_port
+#undef snd_seq_get_port_info
+#undef snd_seq_get_any_port_info
+#undef snd_seq_set_port_info
+#undef snd_seq_query_next_port
+#undef snd_seq_port_subscribe_sizeof
+#undef snd_seq_port_subscribe_malloc
+#undef snd_seq_port_subscribe_free
+#undef snd_seq_port_subscribe_copy
+#undef snd_seq_port_subscribe_get_sender
+#undef snd_seq_port_subscribe_get_dest
+#undef snd_seq_port_subscribe_get_queue
+#undef snd_seq_port_subscribe_get_exclusive
+#undef snd_seq_port_subscribe_get_time_update
+#undef snd_seq_port_subscribe_get_time_real
+#undef snd_seq_port_subscribe_set_sender
+#undef snd_seq_port_subscribe_set_dest
+#undef snd_seq_port_subscribe_set_queue
+#undef snd_seq_port_subscribe_set_exclusive
+#undef snd_seq_port_subscribe_set_time_update
+#undef snd_seq_port_subscribe_set_time_real
+#undef snd_seq_get_port_subscription
+#undef snd_seq_subscribe_port
+#undef snd_seq_unsubscribe_port
+#undef snd_seq_query_subscribe_sizeof
+#undef snd_seq_query_subscribe_malloc
+#undef snd_seq_query_subscribe_free
+#undef snd_seq_query_subscribe_copy
+#undef snd_seq_query_subscribe_get_client
+#undef snd_seq_query_subscribe_get_port
+#undef snd_seq_query_subscribe_get_root
+#undef snd_seq_query_subscribe_get_type
+#undef snd_seq_query_subscribe_get_index
+#undef snd_seq_query_subscribe_get_num_subs
+#undef snd_seq_query_subscribe_get_addr
+#undef snd_seq_query_subscribe_get_queue
+#undef snd_seq_query_subscribe_get_exclusive
+#undef snd_seq_query_subscribe_get_time_update
+#undef snd_seq_query_subscribe_get_time_real
+#undef snd_seq_query_subscribe_set_client
+#undef snd_seq_query_subscribe_set_port
+#undef snd_seq_query_subscribe_set_root
+#undef snd_seq_query_subscribe_set_type
+#undef snd_seq_query_subscribe_set_index
+#undef snd_seq_query_port_subscribers
+#undef snd_seq_queue_info_sizeof
+#undef snd_seq_queue_info_malloc
+#undef snd_seq_queue_info_free
+#undef snd_seq_queue_info_copy
+#undef snd_seq_queue_info_get_queue
+#undef snd_seq_queue_info_get_name
+#undef snd_seq_queue_info_get_owner
+#undef snd_seq_queue_info_get_locked
+#undef snd_seq_queue_info_get_flags
+#undef snd_seq_queue_info_set_name
+#undef snd_seq_queue_info_set_owner
+#undef snd_seq_queue_info_set_locked
+#undef snd_seq_queue_info_set_flags
+#undef snd_seq_create_queue
+#undef snd_seq_alloc_named_queue
+#undef snd_seq_alloc_queue
+#undef snd_seq_free_queue
+#undef snd_seq_get_queue_info
+#undef snd_seq_set_queue_info
+#undef snd_seq_query_named_queue
+#undef snd_seq_get_queue_usage
+#undef snd_seq_set_queue_usage
+#undef snd_seq_queue_status_sizeof
+#undef snd_seq_queue_status_malloc
+#undef snd_seq_queue_status_free
+#undef snd_seq_queue_status_copy
+#undef snd_seq_queue_status_get_queue
+#undef snd_seq_queue_status_get_events
+#undef snd_seq_queue_status_get_tick_time
+#undef snd_seq_queue_status_get_real_time
+#undef snd_seq_queue_status_get_status
+#undef snd_seq_get_queue_status
+#undef snd_seq_queue_tempo_sizeof
+#undef snd_seq_queue_tempo_malloc
+#undef snd_seq_queue_tempo_free
+#undef snd_seq_queue_tempo_copy
+#undef snd_seq_queue_tempo_get_queue
+#undef snd_seq_queue_tempo_get_tempo
+#undef snd_seq_queue_tempo_get_ppq
+#undef snd_seq_queue_tempo_get_skew
+#undef snd_seq_queue_tempo_get_skew_base
+#undef snd_seq_queue_tempo_set_tempo
+#undef snd_seq_queue_tempo_set_ppq
+#undef snd_seq_queue_tempo_set_skew
+#undef snd_seq_queue_tempo_set_skew_base
+#undef snd_seq_get_queue_tempo
+#undef snd_seq_set_queue_tempo
+#undef snd_seq_queue_timer_sizeof
+#undef snd_seq_queue_timer_malloc
+#undef snd_seq_queue_timer_free
+#undef snd_seq_queue_timer_copy
+#undef snd_seq_queue_timer_get_queue
+#undef snd_seq_queue_timer_get_type
+#undef snd_seq_queue_timer_get_id
+#undef snd_seq_queue_timer_get_resolution
+#undef snd_seq_queue_timer_set_type
+#undef snd_seq_queue_timer_set_id
+#undef snd_seq_queue_timer_set_resolution
+#undef snd_seq_get_queue_timer
+#undef snd_seq_set_queue_timer
+#undef snd_seq_free_event
+#undef snd_seq_event_length
+#undef snd_seq_event_output
+#undef snd_seq_event_output_buffer
+#undef snd_seq_event_output_direct
+#undef snd_seq_event_input
+#undef snd_seq_event_input_pending
+#undef snd_seq_drain_output
+#undef snd_seq_event_output_pending
+#undef snd_seq_extract_output
+#undef snd_seq_drop_output
+#undef snd_seq_drop_output_buffer
+#undef snd_seq_drop_input
+#undef snd_seq_drop_input_buffer
+#undef snd_seq_remove_events_sizeof
+#undef snd_seq_remove_events_malloc
+#undef snd_seq_remove_events_free
+#undef snd_seq_remove_events_copy
+#undef snd_seq_remove_events_get_condition
+#undef snd_seq_remove_events_get_queue
+#undef snd_seq_remove_events_get_time
+#undef snd_seq_remove_events_get_dest
+#undef snd_seq_remove_events_get_channel
+#undef snd_seq_remove_events_get_event_type
+#undef snd_seq_remove_events_get_tag
+#undef snd_seq_remove_events_set_condition
+#undef snd_seq_remove_events_set_queue
+#undef snd_seq_remove_events_set_time
+#undef snd_seq_remove_events_set_dest
+#undef snd_seq_remove_events_set_channel
+#undef snd_seq_remove_events_set_event_type
+#undef snd_seq_remove_events_set_tag
+#undef snd_seq_remove_events
+#undef snd_seq_set_bit
+#undef snd_seq_unset_bit
+#undef snd_seq_change_bit
+#undef snd_seq_get_bit
+#undef snd_seq_control_queue
+#undef snd_seq_create_simple_port
+#undef snd_seq_delete_simple_port
+#undef snd_seq_connect_from
+#undef snd_seq_connect_to
+#undef snd_seq_disconnect_from
+#undef snd_seq_disconnect_to
+#undef snd_seq_set_client_name
+#undef snd_seq_set_client_event_filter
+#undef snd_seq_set_client_pool_output
+#undef snd_seq_set_client_pool_output_room
+#undef snd_seq_set_client_pool_input
+#undef snd_seq_sync_output_queue
+#undef snd_seq_parse_address
+#undef snd_seq_reset_pool_output
+#undef snd_seq_reset_pool_input
+#undef snd_midi_event_new
+#undef snd_midi_event_resize_buffer
+#undef snd_midi_event_free
+#undef snd_midi_event_init
+#undef snd_midi_event_reset_encode
+#undef snd_midi_event_reset_decode
+#undef snd_midi_event_no_status
+#undef snd_midi_event_encode
+#undef snd_midi_event_encode_byte
+#undef snd_midi_event_decode
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define snd_asoundlib_version snd_asoundlib_version_dylibloader_wrapper_asound
+#define snd_dlpath snd_dlpath_dylibloader_wrapper_asound
+#define snd_dlopen snd_dlopen_dylibloader_wrapper_asound
+#define snd_dlsym snd_dlsym_dylibloader_wrapper_asound
+#define snd_dlclose snd_dlclose_dylibloader_wrapper_asound
+#define snd_async_add_handler snd_async_add_handler_dylibloader_wrapper_asound
+#define snd_async_del_handler snd_async_del_handler_dylibloader_wrapper_asound
+#define snd_async_handler_get_fd snd_async_handler_get_fd_dylibloader_wrapper_asound
+#define snd_async_handler_get_signo snd_async_handler_get_signo_dylibloader_wrapper_asound
+#define snd_async_handler_get_callback_private snd_async_handler_get_callback_private_dylibloader_wrapper_asound
+#define snd_shm_area_create snd_shm_area_create_dylibloader_wrapper_asound
+#define snd_shm_area_share snd_shm_area_share_dylibloader_wrapper_asound
+#define snd_shm_area_destroy snd_shm_area_destroy_dylibloader_wrapper_asound
+#define snd_user_file snd_user_file_dylibloader_wrapper_asound
+#define snd_input_stdio_open snd_input_stdio_open_dylibloader_wrapper_asound
+#define snd_input_stdio_attach snd_input_stdio_attach_dylibloader_wrapper_asound
+#define snd_input_buffer_open snd_input_buffer_open_dylibloader_wrapper_asound
+#define snd_input_close snd_input_close_dylibloader_wrapper_asound
+#define snd_input_scanf snd_input_scanf_dylibloader_wrapper_asound
+#define snd_input_gets snd_input_gets_dylibloader_wrapper_asound
+#define snd_input_getc snd_input_getc_dylibloader_wrapper_asound
+#define snd_input_ungetc snd_input_ungetc_dylibloader_wrapper_asound
+#define snd_output_stdio_open snd_output_stdio_open_dylibloader_wrapper_asound
+#define snd_output_stdio_attach snd_output_stdio_attach_dylibloader_wrapper_asound
+#define snd_output_buffer_open snd_output_buffer_open_dylibloader_wrapper_asound
+#define snd_output_buffer_string snd_output_buffer_string_dylibloader_wrapper_asound
+#define snd_output_close snd_output_close_dylibloader_wrapper_asound
+#define snd_output_printf snd_output_printf_dylibloader_wrapper_asound
+#define snd_output_vprintf snd_output_vprintf_dylibloader_wrapper_asound
+#define snd_output_puts snd_output_puts_dylibloader_wrapper_asound
+#define snd_output_putc snd_output_putc_dylibloader_wrapper_asound
+#define snd_output_flush snd_output_flush_dylibloader_wrapper_asound
+#define snd_strerror snd_strerror_dylibloader_wrapper_asound
+#define snd_lib_error_set_handler snd_lib_error_set_handler_dylibloader_wrapper_asound
+#define snd_lib_error_set_local snd_lib_error_set_local_dylibloader_wrapper_asound
+#define snd_config_topdir snd_config_topdir_dylibloader_wrapper_asound
+#define snd_config_top snd_config_top_dylibloader_wrapper_asound
+#define snd_config_load snd_config_load_dylibloader_wrapper_asound
+#define snd_config_load_override snd_config_load_override_dylibloader_wrapper_asound
+#define snd_config_save snd_config_save_dylibloader_wrapper_asound
+#define snd_config_update snd_config_update_dylibloader_wrapper_asound
+#define snd_config_update_r snd_config_update_r_dylibloader_wrapper_asound
+#define snd_config_update_free snd_config_update_free_dylibloader_wrapper_asound
+#define snd_config_update_free_global snd_config_update_free_global_dylibloader_wrapper_asound
+#define snd_config_update_ref snd_config_update_ref_dylibloader_wrapper_asound
+#define snd_config_ref snd_config_ref_dylibloader_wrapper_asound
+#define snd_config_unref snd_config_unref_dylibloader_wrapper_asound
+#define snd_config_search snd_config_search_dylibloader_wrapper_asound
+#define snd_config_searchv snd_config_searchv_dylibloader_wrapper_asound
+#define snd_config_search_definition snd_config_search_definition_dylibloader_wrapper_asound
+#define snd_config_expand snd_config_expand_dylibloader_wrapper_asound
+#define snd_config_evaluate snd_config_evaluate_dylibloader_wrapper_asound
+#define snd_config_add snd_config_add_dylibloader_wrapper_asound
+#define snd_config_add_before snd_config_add_before_dylibloader_wrapper_asound
+#define snd_config_add_after snd_config_add_after_dylibloader_wrapper_asound
+#define snd_config_remove snd_config_remove_dylibloader_wrapper_asound
+#define snd_config_delete snd_config_delete_dylibloader_wrapper_asound
+#define snd_config_delete_compound_members snd_config_delete_compound_members_dylibloader_wrapper_asound
+#define snd_config_copy snd_config_copy_dylibloader_wrapper_asound
+#define snd_config_make snd_config_make_dylibloader_wrapper_asound
+#define snd_config_make_integer snd_config_make_integer_dylibloader_wrapper_asound
+#define snd_config_make_integer64 snd_config_make_integer64_dylibloader_wrapper_asound
+#define snd_config_make_real snd_config_make_real_dylibloader_wrapper_asound
+#define snd_config_make_string snd_config_make_string_dylibloader_wrapper_asound
+#define snd_config_make_pointer snd_config_make_pointer_dylibloader_wrapper_asound
+#define snd_config_make_compound snd_config_make_compound_dylibloader_wrapper_asound
+#define snd_config_imake_integer snd_config_imake_integer_dylibloader_wrapper_asound
+#define snd_config_imake_integer64 snd_config_imake_integer64_dylibloader_wrapper_asound
+#define snd_config_imake_real snd_config_imake_real_dylibloader_wrapper_asound
+#define snd_config_imake_string snd_config_imake_string_dylibloader_wrapper_asound
+#define snd_config_imake_safe_string snd_config_imake_safe_string_dylibloader_wrapper_asound
+#define snd_config_imake_pointer snd_config_imake_pointer_dylibloader_wrapper_asound
+#define snd_config_get_type snd_config_get_type_dylibloader_wrapper_asound
+#define snd_config_is_array snd_config_is_array_dylibloader_wrapper_asound
+#define snd_config_set_id snd_config_set_id_dylibloader_wrapper_asound
+#define snd_config_set_integer snd_config_set_integer_dylibloader_wrapper_asound
+#define snd_config_set_integer64 snd_config_set_integer64_dylibloader_wrapper_asound
+#define snd_config_set_real snd_config_set_real_dylibloader_wrapper_asound
+#define snd_config_set_string snd_config_set_string_dylibloader_wrapper_asound
+#define snd_config_set_ascii snd_config_set_ascii_dylibloader_wrapper_asound
+#define snd_config_set_pointer snd_config_set_pointer_dylibloader_wrapper_asound
+#define snd_config_get_id snd_config_get_id_dylibloader_wrapper_asound
+#define snd_config_get_integer snd_config_get_integer_dylibloader_wrapper_asound
+#define snd_config_get_integer64 snd_config_get_integer64_dylibloader_wrapper_asound
+#define snd_config_get_real snd_config_get_real_dylibloader_wrapper_asound
+#define snd_config_get_ireal snd_config_get_ireal_dylibloader_wrapper_asound
+#define snd_config_get_string snd_config_get_string_dylibloader_wrapper_asound
+#define snd_config_get_ascii snd_config_get_ascii_dylibloader_wrapper_asound
+#define snd_config_get_pointer snd_config_get_pointer_dylibloader_wrapper_asound
+#define snd_config_test_id snd_config_test_id_dylibloader_wrapper_asound
+#define snd_config_iterator_first snd_config_iterator_first_dylibloader_wrapper_asound
+#define snd_config_iterator_next snd_config_iterator_next_dylibloader_wrapper_asound
+#define snd_config_iterator_end snd_config_iterator_end_dylibloader_wrapper_asound
+#define snd_config_iterator_entry snd_config_iterator_entry_dylibloader_wrapper_asound
+#define snd_config_get_bool_ascii snd_config_get_bool_ascii_dylibloader_wrapper_asound
+#define snd_config_get_bool snd_config_get_bool_dylibloader_wrapper_asound
+#define snd_config_get_ctl_iface_ascii snd_config_get_ctl_iface_ascii_dylibloader_wrapper_asound
+#define snd_config_get_ctl_iface snd_config_get_ctl_iface_dylibloader_wrapper_asound
+#define snd_names_list snd_names_list_dylibloader_wrapper_asound
+#define snd_names_list_free snd_names_list_free_dylibloader_wrapper_asound
+#define snd_pcm_open snd_pcm_open_dylibloader_wrapper_asound
+#define snd_pcm_open_lconf snd_pcm_open_lconf_dylibloader_wrapper_asound
+#define snd_pcm_open_fallback snd_pcm_open_fallback_dylibloader_wrapper_asound
+#define snd_pcm_close snd_pcm_close_dylibloader_wrapper_asound
+#define snd_pcm_name snd_pcm_name_dylibloader_wrapper_asound
+#define snd_pcm_type snd_pcm_type_dylibloader_wrapper_asound
+#define snd_pcm_stream snd_pcm_stream_dylibloader_wrapper_asound
+#define snd_pcm_poll_descriptors_count snd_pcm_poll_descriptors_count_dylibloader_wrapper_asound
+#define snd_pcm_poll_descriptors snd_pcm_poll_descriptors_dylibloader_wrapper_asound
+#define snd_pcm_poll_descriptors_revents snd_pcm_poll_descriptors_revents_dylibloader_wrapper_asound
+#define snd_pcm_nonblock snd_pcm_nonblock_dylibloader_wrapper_asound
+#define snd_async_add_pcm_handler snd_async_add_pcm_handler_dylibloader_wrapper_asound
+#define snd_async_handler_get_pcm snd_async_handler_get_pcm_dylibloader_wrapper_asound
+#define snd_pcm_info snd_pcm_info_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_current snd_pcm_hw_params_current_dylibloader_wrapper_asound
+#define snd_pcm_hw_params snd_pcm_hw_params_dylibloader_wrapper_asound
+#define snd_pcm_hw_free snd_pcm_hw_free_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_current snd_pcm_sw_params_current_dylibloader_wrapper_asound
+#define snd_pcm_sw_params snd_pcm_sw_params_dylibloader_wrapper_asound
+#define snd_pcm_prepare snd_pcm_prepare_dylibloader_wrapper_asound
+#define snd_pcm_reset snd_pcm_reset_dylibloader_wrapper_asound
+#define snd_pcm_status snd_pcm_status_dylibloader_wrapper_asound
+#define snd_pcm_start snd_pcm_start_dylibloader_wrapper_asound
+#define snd_pcm_drop snd_pcm_drop_dylibloader_wrapper_asound
+#define snd_pcm_drain snd_pcm_drain_dylibloader_wrapper_asound
+#define snd_pcm_pause snd_pcm_pause_dylibloader_wrapper_asound
+#define snd_pcm_state snd_pcm_state_dylibloader_wrapper_asound
+#define snd_pcm_hwsync snd_pcm_hwsync_dylibloader_wrapper_asound
+#define snd_pcm_delay snd_pcm_delay_dylibloader_wrapper_asound
+#define snd_pcm_resume snd_pcm_resume_dylibloader_wrapper_asound
+#define snd_pcm_htimestamp snd_pcm_htimestamp_dylibloader_wrapper_asound
+#define snd_pcm_avail snd_pcm_avail_dylibloader_wrapper_asound
+#define snd_pcm_avail_update snd_pcm_avail_update_dylibloader_wrapper_asound
+#define snd_pcm_avail_delay snd_pcm_avail_delay_dylibloader_wrapper_asound
+#define snd_pcm_rewindable snd_pcm_rewindable_dylibloader_wrapper_asound
+#define snd_pcm_rewind snd_pcm_rewind_dylibloader_wrapper_asound
+#define snd_pcm_forwardable snd_pcm_forwardable_dylibloader_wrapper_asound
+#define snd_pcm_forward snd_pcm_forward_dylibloader_wrapper_asound
+#define snd_pcm_writei snd_pcm_writei_dylibloader_wrapper_asound
+#define snd_pcm_readi snd_pcm_readi_dylibloader_wrapper_asound
+#define snd_pcm_writen snd_pcm_writen_dylibloader_wrapper_asound
+#define snd_pcm_readn snd_pcm_readn_dylibloader_wrapper_asound
+#define snd_pcm_wait snd_pcm_wait_dylibloader_wrapper_asound
+#define snd_pcm_link snd_pcm_link_dylibloader_wrapper_asound
+#define snd_pcm_unlink snd_pcm_unlink_dylibloader_wrapper_asound
+#define snd_pcm_query_chmaps snd_pcm_query_chmaps_dylibloader_wrapper_asound
+#define snd_pcm_query_chmaps_from_hw snd_pcm_query_chmaps_from_hw_dylibloader_wrapper_asound
+#define snd_pcm_free_chmaps snd_pcm_free_chmaps_dylibloader_wrapper_asound
+#define snd_pcm_get_chmap snd_pcm_get_chmap_dylibloader_wrapper_asound
+#define snd_pcm_set_chmap snd_pcm_set_chmap_dylibloader_wrapper_asound
+#define snd_pcm_chmap_type_name snd_pcm_chmap_type_name_dylibloader_wrapper_asound
+#define snd_pcm_chmap_name snd_pcm_chmap_name_dylibloader_wrapper_asound
+#define snd_pcm_chmap_long_name snd_pcm_chmap_long_name_dylibloader_wrapper_asound
+#define snd_pcm_chmap_print snd_pcm_chmap_print_dylibloader_wrapper_asound
+#define snd_pcm_chmap_from_string snd_pcm_chmap_from_string_dylibloader_wrapper_asound
+#define snd_pcm_chmap_parse_string snd_pcm_chmap_parse_string_dylibloader_wrapper_asound
+#define snd_pcm_recover snd_pcm_recover_dylibloader_wrapper_asound
+#define snd_pcm_set_params snd_pcm_set_params_dylibloader_wrapper_asound
+#define snd_pcm_get_params snd_pcm_get_params_dylibloader_wrapper_asound
+#define snd_pcm_info_sizeof snd_pcm_info_sizeof_dylibloader_wrapper_asound
+#define snd_pcm_info_malloc snd_pcm_info_malloc_dylibloader_wrapper_asound
+#define snd_pcm_info_free snd_pcm_info_free_dylibloader_wrapper_asound
+#define snd_pcm_info_copy snd_pcm_info_copy_dylibloader_wrapper_asound
+#define snd_pcm_info_get_device snd_pcm_info_get_device_dylibloader_wrapper_asound
+#define snd_pcm_info_get_subdevice snd_pcm_info_get_subdevice_dylibloader_wrapper_asound
+#define snd_pcm_info_get_stream snd_pcm_info_get_stream_dylibloader_wrapper_asound
+#define snd_pcm_info_get_card snd_pcm_info_get_card_dylibloader_wrapper_asound
+#define snd_pcm_info_get_id snd_pcm_info_get_id_dylibloader_wrapper_asound
+#define snd_pcm_info_get_name snd_pcm_info_get_name_dylibloader_wrapper_asound
+#define snd_pcm_info_get_subdevice_name snd_pcm_info_get_subdevice_name_dylibloader_wrapper_asound
+#define snd_pcm_info_get_class snd_pcm_info_get_class_dylibloader_wrapper_asound
+#define snd_pcm_info_get_subclass snd_pcm_info_get_subclass_dylibloader_wrapper_asound
+#define snd_pcm_info_get_subdevices_count snd_pcm_info_get_subdevices_count_dylibloader_wrapper_asound
+#define snd_pcm_info_get_subdevices_avail snd_pcm_info_get_subdevices_avail_dylibloader_wrapper_asound
+#define snd_pcm_info_get_sync snd_pcm_info_get_sync_dylibloader_wrapper_asound
+#define snd_pcm_info_set_device snd_pcm_info_set_device_dylibloader_wrapper_asound
+#define snd_pcm_info_set_subdevice snd_pcm_info_set_subdevice_dylibloader_wrapper_asound
+#define snd_pcm_info_set_stream snd_pcm_info_set_stream_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_any snd_pcm_hw_params_any_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_can_mmap_sample_resolution snd_pcm_hw_params_can_mmap_sample_resolution_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_is_double snd_pcm_hw_params_is_double_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_is_batch snd_pcm_hw_params_is_batch_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_is_block_transfer snd_pcm_hw_params_is_block_transfer_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_is_monotonic snd_pcm_hw_params_is_monotonic_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_can_overrange snd_pcm_hw_params_can_overrange_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_can_pause snd_pcm_hw_params_can_pause_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_can_resume snd_pcm_hw_params_can_resume_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_is_half_duplex snd_pcm_hw_params_is_half_duplex_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_is_joint_duplex snd_pcm_hw_params_is_joint_duplex_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_can_sync_start snd_pcm_hw_params_can_sync_start_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_can_disable_period_wakeup snd_pcm_hw_params_can_disable_period_wakeup_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_supports_audio_wallclock_ts snd_pcm_hw_params_supports_audio_wallclock_ts_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_supports_audio_ts_type snd_pcm_hw_params_supports_audio_ts_type_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_rate_numden snd_pcm_hw_params_get_rate_numden_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_sbits snd_pcm_hw_params_get_sbits_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_fifo_size snd_pcm_hw_params_get_fifo_size_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_sizeof snd_pcm_hw_params_sizeof_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_malloc snd_pcm_hw_params_malloc_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_free snd_pcm_hw_params_free_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_copy snd_pcm_hw_params_copy_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_access snd_pcm_hw_params_get_access_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_access snd_pcm_hw_params_test_access_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_access snd_pcm_hw_params_set_access_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_access_first snd_pcm_hw_params_set_access_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_access_last snd_pcm_hw_params_set_access_last_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_access_mask snd_pcm_hw_params_set_access_mask_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_access_mask snd_pcm_hw_params_get_access_mask_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_format snd_pcm_hw_params_get_format_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_format snd_pcm_hw_params_test_format_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_format snd_pcm_hw_params_set_format_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_format_first snd_pcm_hw_params_set_format_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_format_last snd_pcm_hw_params_set_format_last_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_format_mask snd_pcm_hw_params_set_format_mask_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_format_mask snd_pcm_hw_params_get_format_mask_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_subformat snd_pcm_hw_params_get_subformat_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_subformat snd_pcm_hw_params_test_subformat_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_subformat snd_pcm_hw_params_set_subformat_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_subformat_first snd_pcm_hw_params_set_subformat_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_subformat_last snd_pcm_hw_params_set_subformat_last_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_subformat_mask snd_pcm_hw_params_set_subformat_mask_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_subformat_mask snd_pcm_hw_params_get_subformat_mask_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_channels snd_pcm_hw_params_get_channels_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_channels_min snd_pcm_hw_params_get_channels_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_channels_max snd_pcm_hw_params_get_channels_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_channels snd_pcm_hw_params_test_channels_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_channels snd_pcm_hw_params_set_channels_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_channels_min snd_pcm_hw_params_set_channels_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_channels_max snd_pcm_hw_params_set_channels_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_channels_minmax snd_pcm_hw_params_set_channels_minmax_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_channels_near snd_pcm_hw_params_set_channels_near_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_channels_first snd_pcm_hw_params_set_channels_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_channels_last snd_pcm_hw_params_set_channels_last_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_rate snd_pcm_hw_params_get_rate_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_rate_min snd_pcm_hw_params_get_rate_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_rate_max snd_pcm_hw_params_get_rate_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_rate snd_pcm_hw_params_test_rate_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_rate snd_pcm_hw_params_set_rate_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_rate_min snd_pcm_hw_params_set_rate_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_rate_max snd_pcm_hw_params_set_rate_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_rate_minmax snd_pcm_hw_params_set_rate_minmax_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_rate_near snd_pcm_hw_params_set_rate_near_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_rate_first snd_pcm_hw_params_set_rate_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_rate_last snd_pcm_hw_params_set_rate_last_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_rate_resample snd_pcm_hw_params_set_rate_resample_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_rate_resample snd_pcm_hw_params_get_rate_resample_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_export_buffer snd_pcm_hw_params_set_export_buffer_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_export_buffer snd_pcm_hw_params_get_export_buffer_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_wakeup snd_pcm_hw_params_set_period_wakeup_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_period_wakeup snd_pcm_hw_params_get_period_wakeup_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_period_time snd_pcm_hw_params_get_period_time_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_period_time_min snd_pcm_hw_params_get_period_time_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_period_time_max snd_pcm_hw_params_get_period_time_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_period_time snd_pcm_hw_params_test_period_time_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_time snd_pcm_hw_params_set_period_time_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_time_min snd_pcm_hw_params_set_period_time_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_time_max snd_pcm_hw_params_set_period_time_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_time_minmax snd_pcm_hw_params_set_period_time_minmax_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_time_near snd_pcm_hw_params_set_period_time_near_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_time_first snd_pcm_hw_params_set_period_time_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_time_last snd_pcm_hw_params_set_period_time_last_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_period_size snd_pcm_hw_params_get_period_size_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_period_size_min snd_pcm_hw_params_get_period_size_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_period_size_max snd_pcm_hw_params_get_period_size_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_period_size snd_pcm_hw_params_test_period_size_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_size snd_pcm_hw_params_set_period_size_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_size_min snd_pcm_hw_params_set_period_size_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_size_max snd_pcm_hw_params_set_period_size_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_size_minmax snd_pcm_hw_params_set_period_size_minmax_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_size_near snd_pcm_hw_params_set_period_size_near_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_size_first snd_pcm_hw_params_set_period_size_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_size_last snd_pcm_hw_params_set_period_size_last_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_period_size_integer snd_pcm_hw_params_set_period_size_integer_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_periods snd_pcm_hw_params_get_periods_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_periods_min snd_pcm_hw_params_get_periods_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_periods_max snd_pcm_hw_params_get_periods_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_periods snd_pcm_hw_params_test_periods_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_periods snd_pcm_hw_params_set_periods_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_periods_min snd_pcm_hw_params_set_periods_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_periods_max snd_pcm_hw_params_set_periods_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_periods_minmax snd_pcm_hw_params_set_periods_minmax_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_periods_near snd_pcm_hw_params_set_periods_near_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_periods_first snd_pcm_hw_params_set_periods_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_periods_last snd_pcm_hw_params_set_periods_last_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_periods_integer snd_pcm_hw_params_set_periods_integer_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_buffer_time snd_pcm_hw_params_get_buffer_time_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_buffer_time_min snd_pcm_hw_params_get_buffer_time_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_buffer_time_max snd_pcm_hw_params_get_buffer_time_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_buffer_time snd_pcm_hw_params_test_buffer_time_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_time snd_pcm_hw_params_set_buffer_time_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_time_min snd_pcm_hw_params_set_buffer_time_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_time_max snd_pcm_hw_params_set_buffer_time_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_time_minmax snd_pcm_hw_params_set_buffer_time_minmax_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_time_near snd_pcm_hw_params_set_buffer_time_near_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_time_first snd_pcm_hw_params_set_buffer_time_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_time_last snd_pcm_hw_params_set_buffer_time_last_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_buffer_size snd_pcm_hw_params_get_buffer_size_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_buffer_size_min snd_pcm_hw_params_get_buffer_size_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_buffer_size_max snd_pcm_hw_params_get_buffer_size_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_buffer_size snd_pcm_hw_params_test_buffer_size_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_size snd_pcm_hw_params_set_buffer_size_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_size_min snd_pcm_hw_params_set_buffer_size_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_size_max snd_pcm_hw_params_set_buffer_size_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_size_minmax snd_pcm_hw_params_set_buffer_size_minmax_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_size_near snd_pcm_hw_params_set_buffer_size_near_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_size_first snd_pcm_hw_params_set_buffer_size_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_buffer_size_last snd_pcm_hw_params_set_buffer_size_last_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_min_align snd_pcm_hw_params_get_min_align_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_sizeof snd_pcm_sw_params_sizeof_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_malloc snd_pcm_sw_params_malloc_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_free snd_pcm_sw_params_free_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_copy snd_pcm_sw_params_copy_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_boundary snd_pcm_sw_params_get_boundary_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_tstamp_mode snd_pcm_sw_params_set_tstamp_mode_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_tstamp_mode snd_pcm_sw_params_get_tstamp_mode_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_tstamp_type snd_pcm_sw_params_set_tstamp_type_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_tstamp_type snd_pcm_sw_params_get_tstamp_type_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_avail_min snd_pcm_sw_params_set_avail_min_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_avail_min snd_pcm_sw_params_get_avail_min_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_period_event snd_pcm_sw_params_set_period_event_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_period_event snd_pcm_sw_params_get_period_event_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_start_threshold snd_pcm_sw_params_set_start_threshold_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_start_threshold snd_pcm_sw_params_get_start_threshold_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_stop_threshold snd_pcm_sw_params_set_stop_threshold_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_stop_threshold snd_pcm_sw_params_get_stop_threshold_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_silence_threshold snd_pcm_sw_params_set_silence_threshold_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_silence_threshold snd_pcm_sw_params_get_silence_threshold_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_silence_size snd_pcm_sw_params_set_silence_size_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_silence_size snd_pcm_sw_params_get_silence_size_dylibloader_wrapper_asound
+#define snd_pcm_access_mask_sizeof snd_pcm_access_mask_sizeof_dylibloader_wrapper_asound
+#define snd_pcm_access_mask_malloc snd_pcm_access_mask_malloc_dylibloader_wrapper_asound
+#define snd_pcm_access_mask_free snd_pcm_access_mask_free_dylibloader_wrapper_asound
+#define snd_pcm_access_mask_copy snd_pcm_access_mask_copy_dylibloader_wrapper_asound
+#define snd_pcm_access_mask_none snd_pcm_access_mask_none_dylibloader_wrapper_asound
+#define snd_pcm_access_mask_any snd_pcm_access_mask_any_dylibloader_wrapper_asound
+#define snd_pcm_access_mask_test snd_pcm_access_mask_test_dylibloader_wrapper_asound
+#define snd_pcm_access_mask_empty snd_pcm_access_mask_empty_dylibloader_wrapper_asound
+#define snd_pcm_access_mask_set snd_pcm_access_mask_set_dylibloader_wrapper_asound
+#define snd_pcm_access_mask_reset snd_pcm_access_mask_reset_dylibloader_wrapper_asound
+#define snd_pcm_format_mask_sizeof snd_pcm_format_mask_sizeof_dylibloader_wrapper_asound
+#define snd_pcm_format_mask_malloc snd_pcm_format_mask_malloc_dylibloader_wrapper_asound
+#define snd_pcm_format_mask_free snd_pcm_format_mask_free_dylibloader_wrapper_asound
+#define snd_pcm_format_mask_copy snd_pcm_format_mask_copy_dylibloader_wrapper_asound
+#define snd_pcm_format_mask_none snd_pcm_format_mask_none_dylibloader_wrapper_asound
+#define snd_pcm_format_mask_any snd_pcm_format_mask_any_dylibloader_wrapper_asound
+#define snd_pcm_format_mask_test snd_pcm_format_mask_test_dylibloader_wrapper_asound
+#define snd_pcm_format_mask_empty snd_pcm_format_mask_empty_dylibloader_wrapper_asound
+#define snd_pcm_format_mask_set snd_pcm_format_mask_set_dylibloader_wrapper_asound
+#define snd_pcm_format_mask_reset snd_pcm_format_mask_reset_dylibloader_wrapper_asound
+#define snd_pcm_subformat_mask_sizeof snd_pcm_subformat_mask_sizeof_dylibloader_wrapper_asound
+#define snd_pcm_subformat_mask_malloc snd_pcm_subformat_mask_malloc_dylibloader_wrapper_asound
+#define snd_pcm_subformat_mask_free snd_pcm_subformat_mask_free_dylibloader_wrapper_asound
+#define snd_pcm_subformat_mask_copy snd_pcm_subformat_mask_copy_dylibloader_wrapper_asound
+#define snd_pcm_subformat_mask_none snd_pcm_subformat_mask_none_dylibloader_wrapper_asound
+#define snd_pcm_subformat_mask_any snd_pcm_subformat_mask_any_dylibloader_wrapper_asound
+#define snd_pcm_subformat_mask_test snd_pcm_subformat_mask_test_dylibloader_wrapper_asound
+#define snd_pcm_subformat_mask_empty snd_pcm_subformat_mask_empty_dylibloader_wrapper_asound
+#define snd_pcm_subformat_mask_set snd_pcm_subformat_mask_set_dylibloader_wrapper_asound
+#define snd_pcm_subformat_mask_reset snd_pcm_subformat_mask_reset_dylibloader_wrapper_asound
+#define snd_pcm_status_sizeof snd_pcm_status_sizeof_dylibloader_wrapper_asound
+#define snd_pcm_status_malloc snd_pcm_status_malloc_dylibloader_wrapper_asound
+#define snd_pcm_status_free snd_pcm_status_free_dylibloader_wrapper_asound
+#define snd_pcm_status_copy snd_pcm_status_copy_dylibloader_wrapper_asound
+#define snd_pcm_status_get_state snd_pcm_status_get_state_dylibloader_wrapper_asound
+#define snd_pcm_status_get_trigger_tstamp snd_pcm_status_get_trigger_tstamp_dylibloader_wrapper_asound
+#define snd_pcm_status_get_trigger_htstamp snd_pcm_status_get_trigger_htstamp_dylibloader_wrapper_asound
+#define snd_pcm_status_get_tstamp snd_pcm_status_get_tstamp_dylibloader_wrapper_asound
+#define snd_pcm_status_get_htstamp snd_pcm_status_get_htstamp_dylibloader_wrapper_asound
+#define snd_pcm_status_get_audio_htstamp snd_pcm_status_get_audio_htstamp_dylibloader_wrapper_asound
+#define snd_pcm_status_get_driver_htstamp snd_pcm_status_get_driver_htstamp_dylibloader_wrapper_asound
+#define snd_pcm_status_get_audio_htstamp_report snd_pcm_status_get_audio_htstamp_report_dylibloader_wrapper_asound
+#define snd_pcm_status_set_audio_htstamp_config snd_pcm_status_set_audio_htstamp_config_dylibloader_wrapper_asound
+#define snd_pcm_status_get_delay snd_pcm_status_get_delay_dylibloader_wrapper_asound
+#define snd_pcm_status_get_avail snd_pcm_status_get_avail_dylibloader_wrapper_asound
+#define snd_pcm_status_get_avail_max snd_pcm_status_get_avail_max_dylibloader_wrapper_asound
+#define snd_pcm_status_get_overrange snd_pcm_status_get_overrange_dylibloader_wrapper_asound
+#define snd_pcm_type_name snd_pcm_type_name_dylibloader_wrapper_asound
+#define snd_pcm_stream_name snd_pcm_stream_name_dylibloader_wrapper_asound
+#define snd_pcm_access_name snd_pcm_access_name_dylibloader_wrapper_asound
+#define snd_pcm_format_name snd_pcm_format_name_dylibloader_wrapper_asound
+#define snd_pcm_format_description snd_pcm_format_description_dylibloader_wrapper_asound
+#define snd_pcm_subformat_name snd_pcm_subformat_name_dylibloader_wrapper_asound
+#define snd_pcm_subformat_description snd_pcm_subformat_description_dylibloader_wrapper_asound
+#define snd_pcm_format_value snd_pcm_format_value_dylibloader_wrapper_asound
+#define snd_pcm_tstamp_mode_name snd_pcm_tstamp_mode_name_dylibloader_wrapper_asound
+#define snd_pcm_state_name snd_pcm_state_name_dylibloader_wrapper_asound
+#define snd_pcm_dump snd_pcm_dump_dylibloader_wrapper_asound
+#define snd_pcm_dump_hw_setup snd_pcm_dump_hw_setup_dylibloader_wrapper_asound
+#define snd_pcm_dump_sw_setup snd_pcm_dump_sw_setup_dylibloader_wrapper_asound
+#define snd_pcm_dump_setup snd_pcm_dump_setup_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_dump snd_pcm_hw_params_dump_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_dump snd_pcm_sw_params_dump_dylibloader_wrapper_asound
+#define snd_pcm_status_dump snd_pcm_status_dump_dylibloader_wrapper_asound
+#define snd_pcm_mmap_begin snd_pcm_mmap_begin_dylibloader_wrapper_asound
+#define snd_pcm_mmap_commit snd_pcm_mmap_commit_dylibloader_wrapper_asound
+#define snd_pcm_mmap_writei snd_pcm_mmap_writei_dylibloader_wrapper_asound
+#define snd_pcm_mmap_readi snd_pcm_mmap_readi_dylibloader_wrapper_asound
+#define snd_pcm_mmap_writen snd_pcm_mmap_writen_dylibloader_wrapper_asound
+#define snd_pcm_mmap_readn snd_pcm_mmap_readn_dylibloader_wrapper_asound
+#define snd_pcm_format_signed snd_pcm_format_signed_dylibloader_wrapper_asound
+#define snd_pcm_format_unsigned snd_pcm_format_unsigned_dylibloader_wrapper_asound
+#define snd_pcm_format_linear snd_pcm_format_linear_dylibloader_wrapper_asound
+#define snd_pcm_format_float snd_pcm_format_float_dylibloader_wrapper_asound
+#define snd_pcm_format_little_endian snd_pcm_format_little_endian_dylibloader_wrapper_asound
+#define snd_pcm_format_big_endian snd_pcm_format_big_endian_dylibloader_wrapper_asound
+#define snd_pcm_format_cpu_endian snd_pcm_format_cpu_endian_dylibloader_wrapper_asound
+#define snd_pcm_format_width snd_pcm_format_width_dylibloader_wrapper_asound
+#define snd_pcm_format_physical_width snd_pcm_format_physical_width_dylibloader_wrapper_asound
+#define snd_pcm_build_linear_format snd_pcm_build_linear_format_dylibloader_wrapper_asound
+#define snd_pcm_format_size snd_pcm_format_size_dylibloader_wrapper_asound
+#define snd_pcm_format_silence snd_pcm_format_silence_dylibloader_wrapper_asound
+#define snd_pcm_format_silence_16 snd_pcm_format_silence_16_dylibloader_wrapper_asound
+#define snd_pcm_format_silence_32 snd_pcm_format_silence_32_dylibloader_wrapper_asound
+#define snd_pcm_format_silence_64 snd_pcm_format_silence_64_dylibloader_wrapper_asound
+#define snd_pcm_format_set_silence snd_pcm_format_set_silence_dylibloader_wrapper_asound
+#define snd_pcm_bytes_to_frames snd_pcm_bytes_to_frames_dylibloader_wrapper_asound
+#define snd_pcm_frames_to_bytes snd_pcm_frames_to_bytes_dylibloader_wrapper_asound
+#define snd_pcm_bytes_to_samples snd_pcm_bytes_to_samples_dylibloader_wrapper_asound
+#define snd_pcm_samples_to_bytes snd_pcm_samples_to_bytes_dylibloader_wrapper_asound
+#define snd_pcm_area_silence snd_pcm_area_silence_dylibloader_wrapper_asound
+#define snd_pcm_areas_silence snd_pcm_areas_silence_dylibloader_wrapper_asound
+#define snd_pcm_area_copy snd_pcm_area_copy_dylibloader_wrapper_asound
+#define snd_pcm_areas_copy snd_pcm_areas_copy_dylibloader_wrapper_asound
+#define snd_pcm_areas_copy_wrap snd_pcm_areas_copy_wrap_dylibloader_wrapper_asound
+#define snd_pcm_hook_get_pcm snd_pcm_hook_get_pcm_dylibloader_wrapper_asound
+#define snd_pcm_hook_get_private snd_pcm_hook_get_private_dylibloader_wrapper_asound
+#define snd_pcm_hook_set_private snd_pcm_hook_set_private_dylibloader_wrapper_asound
+#define snd_pcm_hook_add snd_pcm_hook_add_dylibloader_wrapper_asound
+#define snd_pcm_hook_remove snd_pcm_hook_remove_dylibloader_wrapper_asound
+#define snd_pcm_meter_get_bufsize snd_pcm_meter_get_bufsize_dylibloader_wrapper_asound
+#define snd_pcm_meter_get_channels snd_pcm_meter_get_channels_dylibloader_wrapper_asound
+#define snd_pcm_meter_get_rate snd_pcm_meter_get_rate_dylibloader_wrapper_asound
+#define snd_pcm_meter_get_now snd_pcm_meter_get_now_dylibloader_wrapper_asound
+#define snd_pcm_meter_get_boundary snd_pcm_meter_get_boundary_dylibloader_wrapper_asound
+#define snd_pcm_meter_add_scope snd_pcm_meter_add_scope_dylibloader_wrapper_asound
+#define snd_pcm_meter_search_scope snd_pcm_meter_search_scope_dylibloader_wrapper_asound
+#define snd_pcm_scope_malloc snd_pcm_scope_malloc_dylibloader_wrapper_asound
+#define snd_pcm_scope_set_ops snd_pcm_scope_set_ops_dylibloader_wrapper_asound
+#define snd_pcm_scope_set_name snd_pcm_scope_set_name_dylibloader_wrapper_asound
+#define snd_pcm_scope_get_name snd_pcm_scope_get_name_dylibloader_wrapper_asound
+#define snd_pcm_scope_get_callback_private snd_pcm_scope_get_callback_private_dylibloader_wrapper_asound
+#define snd_pcm_scope_set_callback_private snd_pcm_scope_set_callback_private_dylibloader_wrapper_asound
+#define snd_pcm_scope_s16_open snd_pcm_scope_s16_open_dylibloader_wrapper_asound
+#define snd_pcm_scope_s16_get_channel_buffer snd_pcm_scope_s16_get_channel_buffer_dylibloader_wrapper_asound
+#define snd_spcm_init snd_spcm_init_dylibloader_wrapper_asound
+#define snd_spcm_init_duplex snd_spcm_init_duplex_dylibloader_wrapper_asound
+#define snd_spcm_init_get_params snd_spcm_init_get_params_dylibloader_wrapper_asound
+#define snd_pcm_start_mode_name snd_pcm_start_mode_name_dylibloader_wrapper_asound
+#define snd_pcm_xrun_mode_name snd_pcm_xrun_mode_name_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_start_mode snd_pcm_sw_params_set_start_mode_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_start_mode snd_pcm_sw_params_get_start_mode_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_xrun_mode snd_pcm_sw_params_set_xrun_mode_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_xrun_mode snd_pcm_sw_params_get_xrun_mode_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_xfer_align snd_pcm_sw_params_set_xfer_align_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_xfer_align snd_pcm_sw_params_get_xfer_align_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_set_sleep_min snd_pcm_sw_params_set_sleep_min_dylibloader_wrapper_asound
+#define snd_pcm_sw_params_get_sleep_min snd_pcm_sw_params_get_sleep_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_tick_time snd_pcm_hw_params_get_tick_time_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_tick_time_min snd_pcm_hw_params_get_tick_time_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_get_tick_time_max snd_pcm_hw_params_get_tick_time_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_test_tick_time snd_pcm_hw_params_test_tick_time_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_tick_time snd_pcm_hw_params_set_tick_time_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_tick_time_min snd_pcm_hw_params_set_tick_time_min_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_tick_time_max snd_pcm_hw_params_set_tick_time_max_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_tick_time_minmax snd_pcm_hw_params_set_tick_time_minmax_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_tick_time_near snd_pcm_hw_params_set_tick_time_near_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_tick_time_first snd_pcm_hw_params_set_tick_time_first_dylibloader_wrapper_asound
+#define snd_pcm_hw_params_set_tick_time_last snd_pcm_hw_params_set_tick_time_last_dylibloader_wrapper_asound
+#define snd_rawmidi_open snd_rawmidi_open_dylibloader_wrapper_asound
+#define snd_rawmidi_open_lconf snd_rawmidi_open_lconf_dylibloader_wrapper_asound
+#define snd_rawmidi_close snd_rawmidi_close_dylibloader_wrapper_asound
+#define snd_rawmidi_poll_descriptors_count snd_rawmidi_poll_descriptors_count_dylibloader_wrapper_asound
+#define snd_rawmidi_poll_descriptors snd_rawmidi_poll_descriptors_dylibloader_wrapper_asound
+#define snd_rawmidi_poll_descriptors_revents snd_rawmidi_poll_descriptors_revents_dylibloader_wrapper_asound
+#define snd_rawmidi_nonblock snd_rawmidi_nonblock_dylibloader_wrapper_asound
+#define snd_rawmidi_info_sizeof snd_rawmidi_info_sizeof_dylibloader_wrapper_asound
+#define snd_rawmidi_info_malloc snd_rawmidi_info_malloc_dylibloader_wrapper_asound
+#define snd_rawmidi_info_free snd_rawmidi_info_free_dylibloader_wrapper_asound
+#define snd_rawmidi_info_copy snd_rawmidi_info_copy_dylibloader_wrapper_asound
+#define snd_rawmidi_info_get_device snd_rawmidi_info_get_device_dylibloader_wrapper_asound
+#define snd_rawmidi_info_get_subdevice snd_rawmidi_info_get_subdevice_dylibloader_wrapper_asound
+#define snd_rawmidi_info_get_stream snd_rawmidi_info_get_stream_dylibloader_wrapper_asound
+#define snd_rawmidi_info_get_card snd_rawmidi_info_get_card_dylibloader_wrapper_asound
+#define snd_rawmidi_info_get_flags snd_rawmidi_info_get_flags_dylibloader_wrapper_asound
+#define snd_rawmidi_info_get_id snd_rawmidi_info_get_id_dylibloader_wrapper_asound
+#define snd_rawmidi_info_get_name snd_rawmidi_info_get_name_dylibloader_wrapper_asound
+#define snd_rawmidi_info_get_subdevice_name snd_rawmidi_info_get_subdevice_name_dylibloader_wrapper_asound
+#define snd_rawmidi_info_get_subdevices_count snd_rawmidi_info_get_subdevices_count_dylibloader_wrapper_asound
+#define snd_rawmidi_info_get_subdevices_avail snd_rawmidi_info_get_subdevices_avail_dylibloader_wrapper_asound
+#define snd_rawmidi_info_set_device snd_rawmidi_info_set_device_dylibloader_wrapper_asound
+#define snd_rawmidi_info_set_subdevice snd_rawmidi_info_set_subdevice_dylibloader_wrapper_asound
+#define snd_rawmidi_info_set_stream snd_rawmidi_info_set_stream_dylibloader_wrapper_asound
+#define snd_rawmidi_info snd_rawmidi_info_dylibloader_wrapper_asound
+#define snd_rawmidi_params_sizeof snd_rawmidi_params_sizeof_dylibloader_wrapper_asound
+#define snd_rawmidi_params_malloc snd_rawmidi_params_malloc_dylibloader_wrapper_asound
+#define snd_rawmidi_params_free snd_rawmidi_params_free_dylibloader_wrapper_asound
+#define snd_rawmidi_params_copy snd_rawmidi_params_copy_dylibloader_wrapper_asound
+#define snd_rawmidi_params_set_buffer_size snd_rawmidi_params_set_buffer_size_dylibloader_wrapper_asound
+#define snd_rawmidi_params_get_buffer_size snd_rawmidi_params_get_buffer_size_dylibloader_wrapper_asound
+#define snd_rawmidi_params_set_avail_min snd_rawmidi_params_set_avail_min_dylibloader_wrapper_asound
+#define snd_rawmidi_params_get_avail_min snd_rawmidi_params_get_avail_min_dylibloader_wrapper_asound
+#define snd_rawmidi_params_set_no_active_sensing snd_rawmidi_params_set_no_active_sensing_dylibloader_wrapper_asound
+#define snd_rawmidi_params_get_no_active_sensing snd_rawmidi_params_get_no_active_sensing_dylibloader_wrapper_asound
+#define snd_rawmidi_params snd_rawmidi_params_dylibloader_wrapper_asound
+#define snd_rawmidi_params_current snd_rawmidi_params_current_dylibloader_wrapper_asound
+#define snd_rawmidi_status_sizeof snd_rawmidi_status_sizeof_dylibloader_wrapper_asound
+#define snd_rawmidi_status_malloc snd_rawmidi_status_malloc_dylibloader_wrapper_asound
+#define snd_rawmidi_status_free snd_rawmidi_status_free_dylibloader_wrapper_asound
+#define snd_rawmidi_status_copy snd_rawmidi_status_copy_dylibloader_wrapper_asound
+#define snd_rawmidi_status_get_tstamp snd_rawmidi_status_get_tstamp_dylibloader_wrapper_asound
+#define snd_rawmidi_status_get_avail snd_rawmidi_status_get_avail_dylibloader_wrapper_asound
+#define snd_rawmidi_status_get_xruns snd_rawmidi_status_get_xruns_dylibloader_wrapper_asound
+#define snd_rawmidi_status snd_rawmidi_status_dylibloader_wrapper_asound
+#define snd_rawmidi_drain snd_rawmidi_drain_dylibloader_wrapper_asound
+#define snd_rawmidi_drop snd_rawmidi_drop_dylibloader_wrapper_asound
+#define snd_rawmidi_write snd_rawmidi_write_dylibloader_wrapper_asound
+#define snd_rawmidi_read snd_rawmidi_read_dylibloader_wrapper_asound
+#define snd_rawmidi_name snd_rawmidi_name_dylibloader_wrapper_asound
+#define snd_rawmidi_type snd_rawmidi_type_dylibloader_wrapper_asound
+#define snd_rawmidi_stream snd_rawmidi_stream_dylibloader_wrapper_asound
+#define snd_timer_query_open snd_timer_query_open_dylibloader_wrapper_asound
+#define snd_timer_query_open_lconf snd_timer_query_open_lconf_dylibloader_wrapper_asound
+#define snd_timer_query_close snd_timer_query_close_dylibloader_wrapper_asound
+#define snd_timer_query_next_device snd_timer_query_next_device_dylibloader_wrapper_asound
+#define snd_timer_query_info snd_timer_query_info_dylibloader_wrapper_asound
+#define snd_timer_query_params snd_timer_query_params_dylibloader_wrapper_asound
+#define snd_timer_query_status snd_timer_query_status_dylibloader_wrapper_asound
+#define snd_timer_open snd_timer_open_dylibloader_wrapper_asound
+#define snd_timer_open_lconf snd_timer_open_lconf_dylibloader_wrapper_asound
+#define snd_timer_close snd_timer_close_dylibloader_wrapper_asound
+#define snd_async_add_timer_handler snd_async_add_timer_handler_dylibloader_wrapper_asound
+#define snd_async_handler_get_timer snd_async_handler_get_timer_dylibloader_wrapper_asound
+#define snd_timer_poll_descriptors_count snd_timer_poll_descriptors_count_dylibloader_wrapper_asound
+#define snd_timer_poll_descriptors snd_timer_poll_descriptors_dylibloader_wrapper_asound
+#define snd_timer_poll_descriptors_revents snd_timer_poll_descriptors_revents_dylibloader_wrapper_asound
+#define snd_timer_info snd_timer_info_dylibloader_wrapper_asound
+#define snd_timer_params snd_timer_params_dylibloader_wrapper_asound
+#define snd_timer_status snd_timer_status_dylibloader_wrapper_asound
+#define snd_timer_start snd_timer_start_dylibloader_wrapper_asound
+#define snd_timer_stop snd_timer_stop_dylibloader_wrapper_asound
+#define snd_timer_continue snd_timer_continue_dylibloader_wrapper_asound
+#define snd_timer_read snd_timer_read_dylibloader_wrapper_asound
+#define snd_timer_id_sizeof snd_timer_id_sizeof_dylibloader_wrapper_asound
+#define snd_timer_id_malloc snd_timer_id_malloc_dylibloader_wrapper_asound
+#define snd_timer_id_free snd_timer_id_free_dylibloader_wrapper_asound
+#define snd_timer_id_copy snd_timer_id_copy_dylibloader_wrapper_asound
+#define snd_timer_id_set_class snd_timer_id_set_class_dylibloader_wrapper_asound
+#define snd_timer_id_get_class snd_timer_id_get_class_dylibloader_wrapper_asound
+#define snd_timer_id_set_sclass snd_timer_id_set_sclass_dylibloader_wrapper_asound
+#define snd_timer_id_get_sclass snd_timer_id_get_sclass_dylibloader_wrapper_asound
+#define snd_timer_id_set_card snd_timer_id_set_card_dylibloader_wrapper_asound
+#define snd_timer_id_get_card snd_timer_id_get_card_dylibloader_wrapper_asound
+#define snd_timer_id_set_device snd_timer_id_set_device_dylibloader_wrapper_asound
+#define snd_timer_id_get_device snd_timer_id_get_device_dylibloader_wrapper_asound
+#define snd_timer_id_set_subdevice snd_timer_id_set_subdevice_dylibloader_wrapper_asound
+#define snd_timer_id_get_subdevice snd_timer_id_get_subdevice_dylibloader_wrapper_asound
+#define snd_timer_ginfo_sizeof snd_timer_ginfo_sizeof_dylibloader_wrapper_asound
+#define snd_timer_ginfo_malloc snd_timer_ginfo_malloc_dylibloader_wrapper_asound
+#define snd_timer_ginfo_free snd_timer_ginfo_free_dylibloader_wrapper_asound
+#define snd_timer_ginfo_copy snd_timer_ginfo_copy_dylibloader_wrapper_asound
+#define snd_timer_ginfo_set_tid snd_timer_ginfo_set_tid_dylibloader_wrapper_asound
+#define snd_timer_ginfo_get_tid snd_timer_ginfo_get_tid_dylibloader_wrapper_asound
+#define snd_timer_ginfo_get_flags snd_timer_ginfo_get_flags_dylibloader_wrapper_asound
+#define snd_timer_ginfo_get_card snd_timer_ginfo_get_card_dylibloader_wrapper_asound
+#define snd_timer_ginfo_get_id snd_timer_ginfo_get_id_dylibloader_wrapper_asound
+#define snd_timer_ginfo_get_name snd_timer_ginfo_get_name_dylibloader_wrapper_asound
+#define snd_timer_ginfo_get_resolution snd_timer_ginfo_get_resolution_dylibloader_wrapper_asound
+#define snd_timer_ginfo_get_resolution_min snd_timer_ginfo_get_resolution_min_dylibloader_wrapper_asound
+#define snd_timer_ginfo_get_resolution_max snd_timer_ginfo_get_resolution_max_dylibloader_wrapper_asound
+#define snd_timer_ginfo_get_clients snd_timer_ginfo_get_clients_dylibloader_wrapper_asound
+#define snd_timer_info_sizeof snd_timer_info_sizeof_dylibloader_wrapper_asound
+#define snd_timer_info_malloc snd_timer_info_malloc_dylibloader_wrapper_asound
+#define snd_timer_info_free snd_timer_info_free_dylibloader_wrapper_asound
+#define snd_timer_info_copy snd_timer_info_copy_dylibloader_wrapper_asound
+#define snd_timer_info_is_slave snd_timer_info_is_slave_dylibloader_wrapper_asound
+#define snd_timer_info_get_card snd_timer_info_get_card_dylibloader_wrapper_asound
+#define snd_timer_info_get_id snd_timer_info_get_id_dylibloader_wrapper_asound
+#define snd_timer_info_get_name snd_timer_info_get_name_dylibloader_wrapper_asound
+#define snd_timer_info_get_resolution snd_timer_info_get_resolution_dylibloader_wrapper_asound
+#define snd_timer_params_sizeof snd_timer_params_sizeof_dylibloader_wrapper_asound
+#define snd_timer_params_malloc snd_timer_params_malloc_dylibloader_wrapper_asound
+#define snd_timer_params_free snd_timer_params_free_dylibloader_wrapper_asound
+#define snd_timer_params_copy snd_timer_params_copy_dylibloader_wrapper_asound
+#define snd_timer_params_set_auto_start snd_timer_params_set_auto_start_dylibloader_wrapper_asound
+#define snd_timer_params_get_auto_start snd_timer_params_get_auto_start_dylibloader_wrapper_asound
+#define snd_timer_params_set_exclusive snd_timer_params_set_exclusive_dylibloader_wrapper_asound
+#define snd_timer_params_get_exclusive snd_timer_params_get_exclusive_dylibloader_wrapper_asound
+#define snd_timer_params_set_early_event snd_timer_params_set_early_event_dylibloader_wrapper_asound
+#define snd_timer_params_get_early_event snd_timer_params_get_early_event_dylibloader_wrapper_asound
+#define snd_timer_params_set_ticks snd_timer_params_set_ticks_dylibloader_wrapper_asound
+#define snd_timer_params_get_ticks snd_timer_params_get_ticks_dylibloader_wrapper_asound
+#define snd_timer_params_set_queue_size snd_timer_params_set_queue_size_dylibloader_wrapper_asound
+#define snd_timer_params_get_queue_size snd_timer_params_get_queue_size_dylibloader_wrapper_asound
+#define snd_timer_params_set_filter snd_timer_params_set_filter_dylibloader_wrapper_asound
+#define snd_timer_params_get_filter snd_timer_params_get_filter_dylibloader_wrapper_asound
+#define snd_timer_status_sizeof snd_timer_status_sizeof_dylibloader_wrapper_asound
+#define snd_timer_status_malloc snd_timer_status_malloc_dylibloader_wrapper_asound
+#define snd_timer_status_free snd_timer_status_free_dylibloader_wrapper_asound
+#define snd_timer_status_copy snd_timer_status_copy_dylibloader_wrapper_asound
+#define snd_timer_status_get_timestamp snd_timer_status_get_timestamp_dylibloader_wrapper_asound
+#define snd_timer_status_get_resolution snd_timer_status_get_resolution_dylibloader_wrapper_asound
+#define snd_timer_status_get_lost snd_timer_status_get_lost_dylibloader_wrapper_asound
+#define snd_timer_status_get_overrun snd_timer_status_get_overrun_dylibloader_wrapper_asound
+#define snd_timer_status_get_queue snd_timer_status_get_queue_dylibloader_wrapper_asound
+#define snd_timer_info_get_ticks snd_timer_info_get_ticks_dylibloader_wrapper_asound
+#define snd_hwdep_open snd_hwdep_open_dylibloader_wrapper_asound
+#define snd_hwdep_close snd_hwdep_close_dylibloader_wrapper_asound
+#define snd_hwdep_poll_descriptors snd_hwdep_poll_descriptors_dylibloader_wrapper_asound
+#define snd_hwdep_poll_descriptors_count snd_hwdep_poll_descriptors_count_dylibloader_wrapper_asound
+#define snd_hwdep_poll_descriptors_revents snd_hwdep_poll_descriptors_revents_dylibloader_wrapper_asound
+#define snd_hwdep_nonblock snd_hwdep_nonblock_dylibloader_wrapper_asound
+#define snd_hwdep_info snd_hwdep_info_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_status snd_hwdep_dsp_status_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_load snd_hwdep_dsp_load_dylibloader_wrapper_asound
+#define snd_hwdep_ioctl snd_hwdep_ioctl_dylibloader_wrapper_asound
+#define snd_hwdep_write snd_hwdep_write_dylibloader_wrapper_asound
+#define snd_hwdep_read snd_hwdep_read_dylibloader_wrapper_asound
+#define snd_hwdep_info_sizeof snd_hwdep_info_sizeof_dylibloader_wrapper_asound
+#define snd_hwdep_info_malloc snd_hwdep_info_malloc_dylibloader_wrapper_asound
+#define snd_hwdep_info_free snd_hwdep_info_free_dylibloader_wrapper_asound
+#define snd_hwdep_info_copy snd_hwdep_info_copy_dylibloader_wrapper_asound
+#define snd_hwdep_info_get_device snd_hwdep_info_get_device_dylibloader_wrapper_asound
+#define snd_hwdep_info_get_card snd_hwdep_info_get_card_dylibloader_wrapper_asound
+#define snd_hwdep_info_get_id snd_hwdep_info_get_id_dylibloader_wrapper_asound
+#define snd_hwdep_info_get_name snd_hwdep_info_get_name_dylibloader_wrapper_asound
+#define snd_hwdep_info_get_iface snd_hwdep_info_get_iface_dylibloader_wrapper_asound
+#define snd_hwdep_info_set_device snd_hwdep_info_set_device_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_status_sizeof snd_hwdep_dsp_status_sizeof_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_status_malloc snd_hwdep_dsp_status_malloc_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_status_free snd_hwdep_dsp_status_free_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_status_copy snd_hwdep_dsp_status_copy_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_status_get_version snd_hwdep_dsp_status_get_version_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_status_get_id snd_hwdep_dsp_status_get_id_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_status_get_num_dsps snd_hwdep_dsp_status_get_num_dsps_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_status_get_dsp_loaded snd_hwdep_dsp_status_get_dsp_loaded_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_status_get_chip_ready snd_hwdep_dsp_status_get_chip_ready_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_sizeof snd_hwdep_dsp_image_sizeof_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_malloc snd_hwdep_dsp_image_malloc_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_free snd_hwdep_dsp_image_free_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_copy snd_hwdep_dsp_image_copy_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_get_index snd_hwdep_dsp_image_get_index_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_get_name snd_hwdep_dsp_image_get_name_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_get_image snd_hwdep_dsp_image_get_image_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_get_length snd_hwdep_dsp_image_get_length_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_set_index snd_hwdep_dsp_image_set_index_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_set_name snd_hwdep_dsp_image_set_name_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_set_image snd_hwdep_dsp_image_set_image_dylibloader_wrapper_asound
+#define snd_hwdep_dsp_image_set_length snd_hwdep_dsp_image_set_length_dylibloader_wrapper_asound
+#define snd_card_load snd_card_load_dylibloader_wrapper_asound
+#define snd_card_next snd_card_next_dylibloader_wrapper_asound
+#define snd_card_get_index snd_card_get_index_dylibloader_wrapper_asound
+#define snd_card_get_name snd_card_get_name_dylibloader_wrapper_asound
+#define snd_card_get_longname snd_card_get_longname_dylibloader_wrapper_asound
+#define snd_device_name_hint snd_device_name_hint_dylibloader_wrapper_asound
+#define snd_device_name_free_hint snd_device_name_free_hint_dylibloader_wrapper_asound
+#define snd_device_name_get_hint snd_device_name_get_hint_dylibloader_wrapper_asound
+#define snd_ctl_open snd_ctl_open_dylibloader_wrapper_asound
+#define snd_ctl_open_lconf snd_ctl_open_lconf_dylibloader_wrapper_asound
+#define snd_ctl_open_fallback snd_ctl_open_fallback_dylibloader_wrapper_asound
+#define snd_ctl_close snd_ctl_close_dylibloader_wrapper_asound
+#define snd_ctl_nonblock snd_ctl_nonblock_dylibloader_wrapper_asound
+#define snd_async_add_ctl_handler snd_async_add_ctl_handler_dylibloader_wrapper_asound
+#define snd_async_handler_get_ctl snd_async_handler_get_ctl_dylibloader_wrapper_asound
+#define snd_ctl_poll_descriptors_count snd_ctl_poll_descriptors_count_dylibloader_wrapper_asound
+#define snd_ctl_poll_descriptors snd_ctl_poll_descriptors_dylibloader_wrapper_asound
+#define snd_ctl_poll_descriptors_revents snd_ctl_poll_descriptors_revents_dylibloader_wrapper_asound
+#define snd_ctl_subscribe_events snd_ctl_subscribe_events_dylibloader_wrapper_asound
+#define snd_ctl_card_info snd_ctl_card_info_dylibloader_wrapper_asound
+#define snd_ctl_elem_list snd_ctl_elem_list_dylibloader_wrapper_asound
+#define snd_ctl_elem_info snd_ctl_elem_info_dylibloader_wrapper_asound
+#define snd_ctl_elem_read snd_ctl_elem_read_dylibloader_wrapper_asound
+#define snd_ctl_elem_write snd_ctl_elem_write_dylibloader_wrapper_asound
+#define snd_ctl_elem_lock snd_ctl_elem_lock_dylibloader_wrapper_asound
+#define snd_ctl_elem_unlock snd_ctl_elem_unlock_dylibloader_wrapper_asound
+#define snd_ctl_elem_tlv_read snd_ctl_elem_tlv_read_dylibloader_wrapper_asound
+#define snd_ctl_elem_tlv_write snd_ctl_elem_tlv_write_dylibloader_wrapper_asound
+#define snd_ctl_elem_tlv_command snd_ctl_elem_tlv_command_dylibloader_wrapper_asound
+#define snd_ctl_hwdep_next_device snd_ctl_hwdep_next_device_dylibloader_wrapper_asound
+#define snd_ctl_hwdep_info snd_ctl_hwdep_info_dylibloader_wrapper_asound
+#define snd_ctl_pcm_next_device snd_ctl_pcm_next_device_dylibloader_wrapper_asound
+#define snd_ctl_pcm_info snd_ctl_pcm_info_dylibloader_wrapper_asound
+#define snd_ctl_pcm_prefer_subdevice snd_ctl_pcm_prefer_subdevice_dylibloader_wrapper_asound
+#define snd_ctl_rawmidi_next_device snd_ctl_rawmidi_next_device_dylibloader_wrapper_asound
+#define snd_ctl_rawmidi_info snd_ctl_rawmidi_info_dylibloader_wrapper_asound
+#define snd_ctl_rawmidi_prefer_subdevice snd_ctl_rawmidi_prefer_subdevice_dylibloader_wrapper_asound
+#define snd_ctl_set_power_state snd_ctl_set_power_state_dylibloader_wrapper_asound
+#define snd_ctl_get_power_state snd_ctl_get_power_state_dylibloader_wrapper_asound
+#define snd_ctl_read snd_ctl_read_dylibloader_wrapper_asound
+#define snd_ctl_wait snd_ctl_wait_dylibloader_wrapper_asound
+#define snd_ctl_name snd_ctl_name_dylibloader_wrapper_asound
+#define snd_ctl_type snd_ctl_type_dylibloader_wrapper_asound
+#define snd_ctl_elem_type_name snd_ctl_elem_type_name_dylibloader_wrapper_asound
+#define snd_ctl_elem_iface_name snd_ctl_elem_iface_name_dylibloader_wrapper_asound
+#define snd_ctl_event_type_name snd_ctl_event_type_name_dylibloader_wrapper_asound
+#define snd_ctl_event_elem_get_mask snd_ctl_event_elem_get_mask_dylibloader_wrapper_asound
+#define snd_ctl_event_elem_get_numid snd_ctl_event_elem_get_numid_dylibloader_wrapper_asound
+#define snd_ctl_event_elem_get_id snd_ctl_event_elem_get_id_dylibloader_wrapper_asound
+#define snd_ctl_event_elem_get_interface snd_ctl_event_elem_get_interface_dylibloader_wrapper_asound
+#define snd_ctl_event_elem_get_device snd_ctl_event_elem_get_device_dylibloader_wrapper_asound
+#define snd_ctl_event_elem_get_subdevice snd_ctl_event_elem_get_subdevice_dylibloader_wrapper_asound
+#define snd_ctl_event_elem_get_name snd_ctl_event_elem_get_name_dylibloader_wrapper_asound
+#define snd_ctl_event_elem_get_index snd_ctl_event_elem_get_index_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_alloc_space snd_ctl_elem_list_alloc_space_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_free_space snd_ctl_elem_list_free_space_dylibloader_wrapper_asound
+#define snd_ctl_ascii_elem_id_get snd_ctl_ascii_elem_id_get_dylibloader_wrapper_asound
+#define snd_ctl_ascii_elem_id_parse snd_ctl_ascii_elem_id_parse_dylibloader_wrapper_asound
+#define snd_ctl_ascii_value_parse snd_ctl_ascii_value_parse_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_sizeof snd_ctl_elem_id_sizeof_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_malloc snd_ctl_elem_id_malloc_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_free snd_ctl_elem_id_free_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_clear snd_ctl_elem_id_clear_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_copy snd_ctl_elem_id_copy_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_get_numid snd_ctl_elem_id_get_numid_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_get_interface snd_ctl_elem_id_get_interface_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_get_device snd_ctl_elem_id_get_device_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_get_subdevice snd_ctl_elem_id_get_subdevice_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_get_name snd_ctl_elem_id_get_name_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_get_index snd_ctl_elem_id_get_index_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_set_numid snd_ctl_elem_id_set_numid_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_set_interface snd_ctl_elem_id_set_interface_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_set_device snd_ctl_elem_id_set_device_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_set_subdevice snd_ctl_elem_id_set_subdevice_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_set_name snd_ctl_elem_id_set_name_dylibloader_wrapper_asound
+#define snd_ctl_elem_id_set_index snd_ctl_elem_id_set_index_dylibloader_wrapper_asound
+#define snd_ctl_card_info_sizeof snd_ctl_card_info_sizeof_dylibloader_wrapper_asound
+#define snd_ctl_card_info_malloc snd_ctl_card_info_malloc_dylibloader_wrapper_asound
+#define snd_ctl_card_info_free snd_ctl_card_info_free_dylibloader_wrapper_asound
+#define snd_ctl_card_info_clear snd_ctl_card_info_clear_dylibloader_wrapper_asound
+#define snd_ctl_card_info_copy snd_ctl_card_info_copy_dylibloader_wrapper_asound
+#define snd_ctl_card_info_get_card snd_ctl_card_info_get_card_dylibloader_wrapper_asound
+#define snd_ctl_card_info_get_id snd_ctl_card_info_get_id_dylibloader_wrapper_asound
+#define snd_ctl_card_info_get_driver snd_ctl_card_info_get_driver_dylibloader_wrapper_asound
+#define snd_ctl_card_info_get_name snd_ctl_card_info_get_name_dylibloader_wrapper_asound
+#define snd_ctl_card_info_get_longname snd_ctl_card_info_get_longname_dylibloader_wrapper_asound
+#define snd_ctl_card_info_get_mixername snd_ctl_card_info_get_mixername_dylibloader_wrapper_asound
+#define snd_ctl_card_info_get_components snd_ctl_card_info_get_components_dylibloader_wrapper_asound
+#define snd_ctl_event_sizeof snd_ctl_event_sizeof_dylibloader_wrapper_asound
+#define snd_ctl_event_malloc snd_ctl_event_malloc_dylibloader_wrapper_asound
+#define snd_ctl_event_free snd_ctl_event_free_dylibloader_wrapper_asound
+#define snd_ctl_event_clear snd_ctl_event_clear_dylibloader_wrapper_asound
+#define snd_ctl_event_copy snd_ctl_event_copy_dylibloader_wrapper_asound
+#define snd_ctl_event_get_type snd_ctl_event_get_type_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_sizeof snd_ctl_elem_list_sizeof_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_malloc snd_ctl_elem_list_malloc_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_free snd_ctl_elem_list_free_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_clear snd_ctl_elem_list_clear_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_copy snd_ctl_elem_list_copy_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_set_offset snd_ctl_elem_list_set_offset_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_get_used snd_ctl_elem_list_get_used_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_get_count snd_ctl_elem_list_get_count_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_get_id snd_ctl_elem_list_get_id_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_get_numid snd_ctl_elem_list_get_numid_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_get_interface snd_ctl_elem_list_get_interface_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_get_device snd_ctl_elem_list_get_device_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_get_subdevice snd_ctl_elem_list_get_subdevice_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_get_name snd_ctl_elem_list_get_name_dylibloader_wrapper_asound
+#define snd_ctl_elem_list_get_index snd_ctl_elem_list_get_index_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_sizeof snd_ctl_elem_info_sizeof_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_malloc snd_ctl_elem_info_malloc_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_free snd_ctl_elem_info_free_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_clear snd_ctl_elem_info_clear_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_copy snd_ctl_elem_info_copy_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_type snd_ctl_elem_info_get_type_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_is_readable snd_ctl_elem_info_is_readable_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_is_writable snd_ctl_elem_info_is_writable_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_is_volatile snd_ctl_elem_info_is_volatile_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_is_inactive snd_ctl_elem_info_is_inactive_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_is_locked snd_ctl_elem_info_is_locked_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_is_tlv_readable snd_ctl_elem_info_is_tlv_readable_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_is_tlv_writable snd_ctl_elem_info_is_tlv_writable_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_is_tlv_commandable snd_ctl_elem_info_is_tlv_commandable_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_is_owner snd_ctl_elem_info_is_owner_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_is_user snd_ctl_elem_info_is_user_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_owner snd_ctl_elem_info_get_owner_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_count snd_ctl_elem_info_get_count_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_min snd_ctl_elem_info_get_min_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_max snd_ctl_elem_info_get_max_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_step snd_ctl_elem_info_get_step_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_min64 snd_ctl_elem_info_get_min64_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_max64 snd_ctl_elem_info_get_max64_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_step64 snd_ctl_elem_info_get_step64_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_items snd_ctl_elem_info_get_items_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_set_item snd_ctl_elem_info_set_item_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_item_name snd_ctl_elem_info_get_item_name_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_dimensions snd_ctl_elem_info_get_dimensions_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_dimension snd_ctl_elem_info_get_dimension_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_set_dimension snd_ctl_elem_info_set_dimension_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_id snd_ctl_elem_info_get_id_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_numid snd_ctl_elem_info_get_numid_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_interface snd_ctl_elem_info_get_interface_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_device snd_ctl_elem_info_get_device_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_subdevice snd_ctl_elem_info_get_subdevice_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_name snd_ctl_elem_info_get_name_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_get_index snd_ctl_elem_info_get_index_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_set_id snd_ctl_elem_info_set_id_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_set_numid snd_ctl_elem_info_set_numid_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_set_interface snd_ctl_elem_info_set_interface_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_set_device snd_ctl_elem_info_set_device_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_set_subdevice snd_ctl_elem_info_set_subdevice_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_set_name snd_ctl_elem_info_set_name_dylibloader_wrapper_asound
+#define snd_ctl_elem_info_set_index snd_ctl_elem_info_set_index_dylibloader_wrapper_asound
+#define snd_ctl_add_integer_elem_set snd_ctl_add_integer_elem_set_dylibloader_wrapper_asound
+#define snd_ctl_add_integer64_elem_set snd_ctl_add_integer64_elem_set_dylibloader_wrapper_asound
+#define snd_ctl_add_boolean_elem_set snd_ctl_add_boolean_elem_set_dylibloader_wrapper_asound
+#define snd_ctl_add_enumerated_elem_set snd_ctl_add_enumerated_elem_set_dylibloader_wrapper_asound
+#define snd_ctl_add_bytes_elem_set snd_ctl_add_bytes_elem_set_dylibloader_wrapper_asound
+#define snd_ctl_elem_add_integer snd_ctl_elem_add_integer_dylibloader_wrapper_asound
+#define snd_ctl_elem_add_integer64 snd_ctl_elem_add_integer64_dylibloader_wrapper_asound
+#define snd_ctl_elem_add_boolean snd_ctl_elem_add_boolean_dylibloader_wrapper_asound
+#define snd_ctl_elem_add_enumerated snd_ctl_elem_add_enumerated_dylibloader_wrapper_asound
+#define snd_ctl_elem_add_iec958 snd_ctl_elem_add_iec958_dylibloader_wrapper_asound
+#define snd_ctl_elem_remove snd_ctl_elem_remove_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_sizeof snd_ctl_elem_value_sizeof_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_malloc snd_ctl_elem_value_malloc_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_free snd_ctl_elem_value_free_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_clear snd_ctl_elem_value_clear_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_copy snd_ctl_elem_value_copy_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_compare snd_ctl_elem_value_compare_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_id snd_ctl_elem_value_get_id_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_numid snd_ctl_elem_value_get_numid_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_interface snd_ctl_elem_value_get_interface_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_device snd_ctl_elem_value_get_device_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_subdevice snd_ctl_elem_value_get_subdevice_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_name snd_ctl_elem_value_get_name_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_index snd_ctl_elem_value_get_index_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_id snd_ctl_elem_value_set_id_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_numid snd_ctl_elem_value_set_numid_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_interface snd_ctl_elem_value_set_interface_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_device snd_ctl_elem_value_set_device_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_subdevice snd_ctl_elem_value_set_subdevice_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_name snd_ctl_elem_value_set_name_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_index snd_ctl_elem_value_set_index_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_boolean snd_ctl_elem_value_get_boolean_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_integer snd_ctl_elem_value_get_integer_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_integer64 snd_ctl_elem_value_get_integer64_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_enumerated snd_ctl_elem_value_get_enumerated_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_byte snd_ctl_elem_value_get_byte_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_boolean snd_ctl_elem_value_set_boolean_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_integer snd_ctl_elem_value_set_integer_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_integer64 snd_ctl_elem_value_set_integer64_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_enumerated snd_ctl_elem_value_set_enumerated_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_byte snd_ctl_elem_value_set_byte_dylibloader_wrapper_asound
+#define snd_ctl_elem_set_bytes snd_ctl_elem_set_bytes_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_bytes snd_ctl_elem_value_get_bytes_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_get_iec958 snd_ctl_elem_value_get_iec958_dylibloader_wrapper_asound
+#define snd_ctl_elem_value_set_iec958 snd_ctl_elem_value_set_iec958_dylibloader_wrapper_asound
+#define snd_tlv_parse_dB_info snd_tlv_parse_dB_info_dylibloader_wrapper_asound
+#define snd_tlv_get_dB_range snd_tlv_get_dB_range_dylibloader_wrapper_asound
+#define snd_tlv_convert_to_dB snd_tlv_convert_to_dB_dylibloader_wrapper_asound
+#define snd_tlv_convert_from_dB snd_tlv_convert_from_dB_dylibloader_wrapper_asound
+#define snd_ctl_get_dB_range snd_ctl_get_dB_range_dylibloader_wrapper_asound
+#define snd_ctl_convert_to_dB snd_ctl_convert_to_dB_dylibloader_wrapper_asound
+#define snd_ctl_convert_from_dB snd_ctl_convert_from_dB_dylibloader_wrapper_asound
+#define snd_hctl_compare_fast snd_hctl_compare_fast_dylibloader_wrapper_asound
+#define snd_hctl_open snd_hctl_open_dylibloader_wrapper_asound
+#define snd_hctl_open_ctl snd_hctl_open_ctl_dylibloader_wrapper_asound
+#define snd_hctl_close snd_hctl_close_dylibloader_wrapper_asound
+#define snd_hctl_nonblock snd_hctl_nonblock_dylibloader_wrapper_asound
+#define snd_hctl_poll_descriptors_count snd_hctl_poll_descriptors_count_dylibloader_wrapper_asound
+#define snd_hctl_poll_descriptors snd_hctl_poll_descriptors_dylibloader_wrapper_asound
+#define snd_hctl_poll_descriptors_revents snd_hctl_poll_descriptors_revents_dylibloader_wrapper_asound
+#define snd_hctl_get_count snd_hctl_get_count_dylibloader_wrapper_asound
+#define snd_hctl_set_compare snd_hctl_set_compare_dylibloader_wrapper_asound
+#define snd_hctl_first_elem snd_hctl_first_elem_dylibloader_wrapper_asound
+#define snd_hctl_last_elem snd_hctl_last_elem_dylibloader_wrapper_asound
+#define snd_hctl_find_elem snd_hctl_find_elem_dylibloader_wrapper_asound
+#define snd_hctl_set_callback snd_hctl_set_callback_dylibloader_wrapper_asound
+#define snd_hctl_set_callback_private snd_hctl_set_callback_private_dylibloader_wrapper_asound
+#define snd_hctl_get_callback_private snd_hctl_get_callback_private_dylibloader_wrapper_asound
+#define snd_hctl_load snd_hctl_load_dylibloader_wrapper_asound
+#define snd_hctl_free snd_hctl_free_dylibloader_wrapper_asound
+#define snd_hctl_handle_events snd_hctl_handle_events_dylibloader_wrapper_asound
+#define snd_hctl_name snd_hctl_name_dylibloader_wrapper_asound
+#define snd_hctl_wait snd_hctl_wait_dylibloader_wrapper_asound
+#define snd_hctl_ctl snd_hctl_ctl_dylibloader_wrapper_asound
+#define snd_hctl_elem_next snd_hctl_elem_next_dylibloader_wrapper_asound
+#define snd_hctl_elem_prev snd_hctl_elem_prev_dylibloader_wrapper_asound
+#define snd_hctl_elem_info snd_hctl_elem_info_dylibloader_wrapper_asound
+#define snd_hctl_elem_read snd_hctl_elem_read_dylibloader_wrapper_asound
+#define snd_hctl_elem_write snd_hctl_elem_write_dylibloader_wrapper_asound
+#define snd_hctl_elem_tlv_read snd_hctl_elem_tlv_read_dylibloader_wrapper_asound
+#define snd_hctl_elem_tlv_write snd_hctl_elem_tlv_write_dylibloader_wrapper_asound
+#define snd_hctl_elem_tlv_command snd_hctl_elem_tlv_command_dylibloader_wrapper_asound
+#define snd_hctl_elem_get_hctl snd_hctl_elem_get_hctl_dylibloader_wrapper_asound
+#define snd_hctl_elem_get_id snd_hctl_elem_get_id_dylibloader_wrapper_asound
+#define snd_hctl_elem_get_numid snd_hctl_elem_get_numid_dylibloader_wrapper_asound
+#define snd_hctl_elem_get_interface snd_hctl_elem_get_interface_dylibloader_wrapper_asound
+#define snd_hctl_elem_get_device snd_hctl_elem_get_device_dylibloader_wrapper_asound
+#define snd_hctl_elem_get_subdevice snd_hctl_elem_get_subdevice_dylibloader_wrapper_asound
+#define snd_hctl_elem_get_name snd_hctl_elem_get_name_dylibloader_wrapper_asound
+#define snd_hctl_elem_get_index snd_hctl_elem_get_index_dylibloader_wrapper_asound
+#define snd_hctl_elem_set_callback snd_hctl_elem_set_callback_dylibloader_wrapper_asound
+#define snd_hctl_elem_get_callback_private snd_hctl_elem_get_callback_private_dylibloader_wrapper_asound
+#define snd_hctl_elem_set_callback_private snd_hctl_elem_set_callback_private_dylibloader_wrapper_asound
+#define snd_sctl_build snd_sctl_build_dylibloader_wrapper_asound
+#define snd_sctl_free snd_sctl_free_dylibloader_wrapper_asound
+#define snd_sctl_install snd_sctl_install_dylibloader_wrapper_asound
+#define snd_sctl_remove snd_sctl_remove_dylibloader_wrapper_asound
+#define snd_mixer_open snd_mixer_open_dylibloader_wrapper_asound
+#define snd_mixer_close snd_mixer_close_dylibloader_wrapper_asound
+#define snd_mixer_first_elem snd_mixer_first_elem_dylibloader_wrapper_asound
+#define snd_mixer_last_elem snd_mixer_last_elem_dylibloader_wrapper_asound
+#define snd_mixer_handle_events snd_mixer_handle_events_dylibloader_wrapper_asound
+#define snd_mixer_attach snd_mixer_attach_dylibloader_wrapper_asound
+#define snd_mixer_attach_hctl snd_mixer_attach_hctl_dylibloader_wrapper_asound
+#define snd_mixer_detach snd_mixer_detach_dylibloader_wrapper_asound
+#define snd_mixer_detach_hctl snd_mixer_detach_hctl_dylibloader_wrapper_asound
+#define snd_mixer_get_hctl snd_mixer_get_hctl_dylibloader_wrapper_asound
+#define snd_mixer_poll_descriptors_count snd_mixer_poll_descriptors_count_dylibloader_wrapper_asound
+#define snd_mixer_poll_descriptors snd_mixer_poll_descriptors_dylibloader_wrapper_asound
+#define snd_mixer_poll_descriptors_revents snd_mixer_poll_descriptors_revents_dylibloader_wrapper_asound
+#define snd_mixer_load snd_mixer_load_dylibloader_wrapper_asound
+#define snd_mixer_free snd_mixer_free_dylibloader_wrapper_asound
+#define snd_mixer_wait snd_mixer_wait_dylibloader_wrapper_asound
+#define snd_mixer_set_compare snd_mixer_set_compare_dylibloader_wrapper_asound
+#define snd_mixer_set_callback snd_mixer_set_callback_dylibloader_wrapper_asound
+#define snd_mixer_get_callback_private snd_mixer_get_callback_private_dylibloader_wrapper_asound
+#define snd_mixer_set_callback_private snd_mixer_set_callback_private_dylibloader_wrapper_asound
+#define snd_mixer_get_count snd_mixer_get_count_dylibloader_wrapper_asound
+#define snd_mixer_class_unregister snd_mixer_class_unregister_dylibloader_wrapper_asound
+#define snd_mixer_elem_next snd_mixer_elem_next_dylibloader_wrapper_asound
+#define snd_mixer_elem_prev snd_mixer_elem_prev_dylibloader_wrapper_asound
+#define snd_mixer_elem_set_callback snd_mixer_elem_set_callback_dylibloader_wrapper_asound
+#define snd_mixer_elem_get_callback_private snd_mixer_elem_get_callback_private_dylibloader_wrapper_asound
+#define snd_mixer_elem_set_callback_private snd_mixer_elem_set_callback_private_dylibloader_wrapper_asound
+#define snd_mixer_elem_get_type snd_mixer_elem_get_type_dylibloader_wrapper_asound
+#define snd_mixer_class_register snd_mixer_class_register_dylibloader_wrapper_asound
+#define snd_mixer_elem_new snd_mixer_elem_new_dylibloader_wrapper_asound
+#define snd_mixer_elem_add snd_mixer_elem_add_dylibloader_wrapper_asound
+#define snd_mixer_elem_remove snd_mixer_elem_remove_dylibloader_wrapper_asound
+#define snd_mixer_elem_free snd_mixer_elem_free_dylibloader_wrapper_asound
+#define snd_mixer_elem_info snd_mixer_elem_info_dylibloader_wrapper_asound
+#define snd_mixer_elem_value snd_mixer_elem_value_dylibloader_wrapper_asound
+#define snd_mixer_elem_attach snd_mixer_elem_attach_dylibloader_wrapper_asound
+#define snd_mixer_elem_detach snd_mixer_elem_detach_dylibloader_wrapper_asound
+#define snd_mixer_elem_empty snd_mixer_elem_empty_dylibloader_wrapper_asound
+#define snd_mixer_elem_get_private snd_mixer_elem_get_private_dylibloader_wrapper_asound
+#define snd_mixer_class_sizeof snd_mixer_class_sizeof_dylibloader_wrapper_asound
+#define snd_mixer_class_malloc snd_mixer_class_malloc_dylibloader_wrapper_asound
+#define snd_mixer_class_free snd_mixer_class_free_dylibloader_wrapper_asound
+#define snd_mixer_class_copy snd_mixer_class_copy_dylibloader_wrapper_asound
+#define snd_mixer_class_get_mixer snd_mixer_class_get_mixer_dylibloader_wrapper_asound
+#define snd_mixer_class_get_event snd_mixer_class_get_event_dylibloader_wrapper_asound
+#define snd_mixer_class_get_private snd_mixer_class_get_private_dylibloader_wrapper_asound
+#define snd_mixer_class_get_compare snd_mixer_class_get_compare_dylibloader_wrapper_asound
+#define snd_mixer_class_set_event snd_mixer_class_set_event_dylibloader_wrapper_asound
+#define snd_mixer_class_set_private snd_mixer_class_set_private_dylibloader_wrapper_asound
+#define snd_mixer_class_set_private_free snd_mixer_class_set_private_free_dylibloader_wrapper_asound
+#define snd_mixer_class_set_compare snd_mixer_class_set_compare_dylibloader_wrapper_asound
+#define snd_mixer_selem_channel_name snd_mixer_selem_channel_name_dylibloader_wrapper_asound
+#define snd_mixer_selem_register snd_mixer_selem_register_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_id snd_mixer_selem_get_id_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_name snd_mixer_selem_get_name_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_index snd_mixer_selem_get_index_dylibloader_wrapper_asound
+#define snd_mixer_find_selem snd_mixer_find_selem_dylibloader_wrapper_asound
+#define snd_mixer_selem_is_active snd_mixer_selem_is_active_dylibloader_wrapper_asound
+#define snd_mixer_selem_is_playback_mono snd_mixer_selem_is_playback_mono_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_playback_channel snd_mixer_selem_has_playback_channel_dylibloader_wrapper_asound
+#define snd_mixer_selem_is_capture_mono snd_mixer_selem_is_capture_mono_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_capture_channel snd_mixer_selem_has_capture_channel_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_capture_group snd_mixer_selem_get_capture_group_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_common_volume snd_mixer_selem_has_common_volume_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_playback_volume snd_mixer_selem_has_playback_volume_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_playback_volume_joined snd_mixer_selem_has_playback_volume_joined_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_capture_volume snd_mixer_selem_has_capture_volume_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_capture_volume_joined snd_mixer_selem_has_capture_volume_joined_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_common_switch snd_mixer_selem_has_common_switch_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_playback_switch snd_mixer_selem_has_playback_switch_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_playback_switch_joined snd_mixer_selem_has_playback_switch_joined_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_capture_switch snd_mixer_selem_has_capture_switch_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_capture_switch_joined snd_mixer_selem_has_capture_switch_joined_dylibloader_wrapper_asound
+#define snd_mixer_selem_has_capture_switch_exclusive snd_mixer_selem_has_capture_switch_exclusive_dylibloader_wrapper_asound
+#define snd_mixer_selem_ask_playback_vol_dB snd_mixer_selem_ask_playback_vol_dB_dylibloader_wrapper_asound
+#define snd_mixer_selem_ask_capture_vol_dB snd_mixer_selem_ask_capture_vol_dB_dylibloader_wrapper_asound
+#define snd_mixer_selem_ask_playback_dB_vol snd_mixer_selem_ask_playback_dB_vol_dylibloader_wrapper_asound
+#define snd_mixer_selem_ask_capture_dB_vol snd_mixer_selem_ask_capture_dB_vol_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_playback_volume snd_mixer_selem_get_playback_volume_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_capture_volume snd_mixer_selem_get_capture_volume_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_playback_dB snd_mixer_selem_get_playback_dB_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_capture_dB snd_mixer_selem_get_capture_dB_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_playback_switch snd_mixer_selem_get_playback_switch_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_capture_switch snd_mixer_selem_get_capture_switch_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_playback_volume snd_mixer_selem_set_playback_volume_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_capture_volume snd_mixer_selem_set_capture_volume_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_playback_dB snd_mixer_selem_set_playback_dB_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_capture_dB snd_mixer_selem_set_capture_dB_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_playback_volume_all snd_mixer_selem_set_playback_volume_all_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_capture_volume_all snd_mixer_selem_set_capture_volume_all_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_playback_dB_all snd_mixer_selem_set_playback_dB_all_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_capture_dB_all snd_mixer_selem_set_capture_dB_all_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_playback_switch snd_mixer_selem_set_playback_switch_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_capture_switch snd_mixer_selem_set_capture_switch_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_playback_switch_all snd_mixer_selem_set_playback_switch_all_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_capture_switch_all snd_mixer_selem_set_capture_switch_all_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_playback_volume_range snd_mixer_selem_get_playback_volume_range_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_playback_dB_range snd_mixer_selem_get_playback_dB_range_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_playback_volume_range snd_mixer_selem_set_playback_volume_range_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_capture_volume_range snd_mixer_selem_get_capture_volume_range_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_capture_dB_range snd_mixer_selem_get_capture_dB_range_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_capture_volume_range snd_mixer_selem_set_capture_volume_range_dylibloader_wrapper_asound
+#define snd_mixer_selem_is_enumerated snd_mixer_selem_is_enumerated_dylibloader_wrapper_asound
+#define snd_mixer_selem_is_enum_playback snd_mixer_selem_is_enum_playback_dylibloader_wrapper_asound
+#define snd_mixer_selem_is_enum_capture snd_mixer_selem_is_enum_capture_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_enum_items snd_mixer_selem_get_enum_items_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_enum_item_name snd_mixer_selem_get_enum_item_name_dylibloader_wrapper_asound
+#define snd_mixer_selem_get_enum_item snd_mixer_selem_get_enum_item_dylibloader_wrapper_asound
+#define snd_mixer_selem_set_enum_item snd_mixer_selem_set_enum_item_dylibloader_wrapper_asound
+#define snd_mixer_selem_id_sizeof snd_mixer_selem_id_sizeof_dylibloader_wrapper_asound
+#define snd_mixer_selem_id_malloc snd_mixer_selem_id_malloc_dylibloader_wrapper_asound
+#define snd_mixer_selem_id_free snd_mixer_selem_id_free_dylibloader_wrapper_asound
+#define snd_mixer_selem_id_copy snd_mixer_selem_id_copy_dylibloader_wrapper_asound
+#define snd_mixer_selem_id_get_name snd_mixer_selem_id_get_name_dylibloader_wrapper_asound
+#define snd_mixer_selem_id_get_index snd_mixer_selem_id_get_index_dylibloader_wrapper_asound
+#define snd_mixer_selem_id_set_name snd_mixer_selem_id_set_name_dylibloader_wrapper_asound
+#define snd_mixer_selem_id_set_index snd_mixer_selem_id_set_index_dylibloader_wrapper_asound
+#define snd_mixer_selem_id_parse snd_mixer_selem_id_parse_dylibloader_wrapper_asound
+#define snd_seq_open snd_seq_open_dylibloader_wrapper_asound
+#define snd_seq_open_lconf snd_seq_open_lconf_dylibloader_wrapper_asound
+#define snd_seq_name snd_seq_name_dylibloader_wrapper_asound
+#define snd_seq_type snd_seq_type_dylibloader_wrapper_asound
+#define snd_seq_close snd_seq_close_dylibloader_wrapper_asound
+#define snd_seq_poll_descriptors_count snd_seq_poll_descriptors_count_dylibloader_wrapper_asound
+#define snd_seq_poll_descriptors snd_seq_poll_descriptors_dylibloader_wrapper_asound
+#define snd_seq_poll_descriptors_revents snd_seq_poll_descriptors_revents_dylibloader_wrapper_asound
+#define snd_seq_nonblock snd_seq_nonblock_dylibloader_wrapper_asound
+#define snd_seq_client_id snd_seq_client_id_dylibloader_wrapper_asound
+#define snd_seq_get_output_buffer_size snd_seq_get_output_buffer_size_dylibloader_wrapper_asound
+#define snd_seq_get_input_buffer_size snd_seq_get_input_buffer_size_dylibloader_wrapper_asound
+#define snd_seq_set_output_buffer_size snd_seq_set_output_buffer_size_dylibloader_wrapper_asound
+#define snd_seq_set_input_buffer_size snd_seq_set_input_buffer_size_dylibloader_wrapper_asound
+#define snd_seq_system_info_sizeof snd_seq_system_info_sizeof_dylibloader_wrapper_asound
+#define snd_seq_system_info_malloc snd_seq_system_info_malloc_dylibloader_wrapper_asound
+#define snd_seq_system_info_free snd_seq_system_info_free_dylibloader_wrapper_asound
+#define snd_seq_system_info_copy snd_seq_system_info_copy_dylibloader_wrapper_asound
+#define snd_seq_system_info_get_queues snd_seq_system_info_get_queues_dylibloader_wrapper_asound
+#define snd_seq_system_info_get_clients snd_seq_system_info_get_clients_dylibloader_wrapper_asound
+#define snd_seq_system_info_get_ports snd_seq_system_info_get_ports_dylibloader_wrapper_asound
+#define snd_seq_system_info_get_channels snd_seq_system_info_get_channels_dylibloader_wrapper_asound
+#define snd_seq_system_info_get_cur_clients snd_seq_system_info_get_cur_clients_dylibloader_wrapper_asound
+#define snd_seq_system_info_get_cur_queues snd_seq_system_info_get_cur_queues_dylibloader_wrapper_asound
+#define snd_seq_system_info snd_seq_system_info_dylibloader_wrapper_asound
+#define snd_seq_client_info_sizeof snd_seq_client_info_sizeof_dylibloader_wrapper_asound
+#define snd_seq_client_info_malloc snd_seq_client_info_malloc_dylibloader_wrapper_asound
+#define snd_seq_client_info_free snd_seq_client_info_free_dylibloader_wrapper_asound
+#define snd_seq_client_info_copy snd_seq_client_info_copy_dylibloader_wrapper_asound
+#define snd_seq_client_info_get_client snd_seq_client_info_get_client_dylibloader_wrapper_asound
+#define snd_seq_client_info_get_type snd_seq_client_info_get_type_dylibloader_wrapper_asound
+#define snd_seq_client_info_get_name snd_seq_client_info_get_name_dylibloader_wrapper_asound
+#define snd_seq_client_info_get_broadcast_filter snd_seq_client_info_get_broadcast_filter_dylibloader_wrapper_asound
+#define snd_seq_client_info_get_error_bounce snd_seq_client_info_get_error_bounce_dylibloader_wrapper_asound
+#define snd_seq_client_info_get_card snd_seq_client_info_get_card_dylibloader_wrapper_asound
+#define snd_seq_client_info_get_pid snd_seq_client_info_get_pid_dylibloader_wrapper_asound
+#define snd_seq_client_info_get_event_filter snd_seq_client_info_get_event_filter_dylibloader_wrapper_asound
+#define snd_seq_client_info_get_num_ports snd_seq_client_info_get_num_ports_dylibloader_wrapper_asound
+#define snd_seq_client_info_get_event_lost snd_seq_client_info_get_event_lost_dylibloader_wrapper_asound
+#define snd_seq_client_info_set_client snd_seq_client_info_set_client_dylibloader_wrapper_asound
+#define snd_seq_client_info_set_name snd_seq_client_info_set_name_dylibloader_wrapper_asound
+#define snd_seq_client_info_set_broadcast_filter snd_seq_client_info_set_broadcast_filter_dylibloader_wrapper_asound
+#define snd_seq_client_info_set_error_bounce snd_seq_client_info_set_error_bounce_dylibloader_wrapper_asound
+#define snd_seq_client_info_set_event_filter snd_seq_client_info_set_event_filter_dylibloader_wrapper_asound
+#define snd_seq_client_info_event_filter_clear snd_seq_client_info_event_filter_clear_dylibloader_wrapper_asound
+#define snd_seq_client_info_event_filter_add snd_seq_client_info_event_filter_add_dylibloader_wrapper_asound
+#define snd_seq_client_info_event_filter_del snd_seq_client_info_event_filter_del_dylibloader_wrapper_asound
+#define snd_seq_client_info_event_filter_check snd_seq_client_info_event_filter_check_dylibloader_wrapper_asound
+#define snd_seq_get_client_info snd_seq_get_client_info_dylibloader_wrapper_asound
+#define snd_seq_get_any_client_info snd_seq_get_any_client_info_dylibloader_wrapper_asound
+#define snd_seq_set_client_info snd_seq_set_client_info_dylibloader_wrapper_asound
+#define snd_seq_query_next_client snd_seq_query_next_client_dylibloader_wrapper_asound
+#define snd_seq_client_pool_sizeof snd_seq_client_pool_sizeof_dylibloader_wrapper_asound
+#define snd_seq_client_pool_malloc snd_seq_client_pool_malloc_dylibloader_wrapper_asound
+#define snd_seq_client_pool_free snd_seq_client_pool_free_dylibloader_wrapper_asound
+#define snd_seq_client_pool_copy snd_seq_client_pool_copy_dylibloader_wrapper_asound
+#define snd_seq_client_pool_get_client snd_seq_client_pool_get_client_dylibloader_wrapper_asound
+#define snd_seq_client_pool_get_output_pool snd_seq_client_pool_get_output_pool_dylibloader_wrapper_asound
+#define snd_seq_client_pool_get_input_pool snd_seq_client_pool_get_input_pool_dylibloader_wrapper_asound
+#define snd_seq_client_pool_get_output_room snd_seq_client_pool_get_output_room_dylibloader_wrapper_asound
+#define snd_seq_client_pool_get_output_free snd_seq_client_pool_get_output_free_dylibloader_wrapper_asound
+#define snd_seq_client_pool_get_input_free snd_seq_client_pool_get_input_free_dylibloader_wrapper_asound
+#define snd_seq_client_pool_set_output_pool snd_seq_client_pool_set_output_pool_dylibloader_wrapper_asound
+#define snd_seq_client_pool_set_input_pool snd_seq_client_pool_set_input_pool_dylibloader_wrapper_asound
+#define snd_seq_client_pool_set_output_room snd_seq_client_pool_set_output_room_dylibloader_wrapper_asound
+#define snd_seq_get_client_pool snd_seq_get_client_pool_dylibloader_wrapper_asound
+#define snd_seq_set_client_pool snd_seq_set_client_pool_dylibloader_wrapper_asound
+#define snd_seq_port_info_sizeof snd_seq_port_info_sizeof_dylibloader_wrapper_asound
+#define snd_seq_port_info_malloc snd_seq_port_info_malloc_dylibloader_wrapper_asound
+#define snd_seq_port_info_free snd_seq_port_info_free_dylibloader_wrapper_asound
+#define snd_seq_port_info_copy snd_seq_port_info_copy_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_client snd_seq_port_info_get_client_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_port snd_seq_port_info_get_port_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_addr snd_seq_port_info_get_addr_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_name snd_seq_port_info_get_name_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_capability snd_seq_port_info_get_capability_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_type snd_seq_port_info_get_type_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_midi_channels snd_seq_port_info_get_midi_channels_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_midi_voices snd_seq_port_info_get_midi_voices_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_synth_voices snd_seq_port_info_get_synth_voices_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_read_use snd_seq_port_info_get_read_use_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_write_use snd_seq_port_info_get_write_use_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_port_specified snd_seq_port_info_get_port_specified_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_timestamping snd_seq_port_info_get_timestamping_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_timestamp_real snd_seq_port_info_get_timestamp_real_dylibloader_wrapper_asound
+#define snd_seq_port_info_get_timestamp_queue snd_seq_port_info_get_timestamp_queue_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_client snd_seq_port_info_set_client_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_port snd_seq_port_info_set_port_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_addr snd_seq_port_info_set_addr_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_name snd_seq_port_info_set_name_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_capability snd_seq_port_info_set_capability_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_type snd_seq_port_info_set_type_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_midi_channels snd_seq_port_info_set_midi_channels_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_midi_voices snd_seq_port_info_set_midi_voices_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_synth_voices snd_seq_port_info_set_synth_voices_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_port_specified snd_seq_port_info_set_port_specified_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_timestamping snd_seq_port_info_set_timestamping_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_timestamp_real snd_seq_port_info_set_timestamp_real_dylibloader_wrapper_asound
+#define snd_seq_port_info_set_timestamp_queue snd_seq_port_info_set_timestamp_queue_dylibloader_wrapper_asound
+#define snd_seq_create_port snd_seq_create_port_dylibloader_wrapper_asound
+#define snd_seq_delete_port snd_seq_delete_port_dylibloader_wrapper_asound
+#define snd_seq_get_port_info snd_seq_get_port_info_dylibloader_wrapper_asound
+#define snd_seq_get_any_port_info snd_seq_get_any_port_info_dylibloader_wrapper_asound
+#define snd_seq_set_port_info snd_seq_set_port_info_dylibloader_wrapper_asound
+#define snd_seq_query_next_port snd_seq_query_next_port_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_sizeof snd_seq_port_subscribe_sizeof_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_malloc snd_seq_port_subscribe_malloc_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_free snd_seq_port_subscribe_free_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_copy snd_seq_port_subscribe_copy_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_get_sender snd_seq_port_subscribe_get_sender_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_get_dest snd_seq_port_subscribe_get_dest_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_get_queue snd_seq_port_subscribe_get_queue_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_get_exclusive snd_seq_port_subscribe_get_exclusive_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_get_time_update snd_seq_port_subscribe_get_time_update_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_get_time_real snd_seq_port_subscribe_get_time_real_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_set_sender snd_seq_port_subscribe_set_sender_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_set_dest snd_seq_port_subscribe_set_dest_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_set_queue snd_seq_port_subscribe_set_queue_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_set_exclusive snd_seq_port_subscribe_set_exclusive_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_set_time_update snd_seq_port_subscribe_set_time_update_dylibloader_wrapper_asound
+#define snd_seq_port_subscribe_set_time_real snd_seq_port_subscribe_set_time_real_dylibloader_wrapper_asound
+#define snd_seq_get_port_subscription snd_seq_get_port_subscription_dylibloader_wrapper_asound
+#define snd_seq_subscribe_port snd_seq_subscribe_port_dylibloader_wrapper_asound
+#define snd_seq_unsubscribe_port snd_seq_unsubscribe_port_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_sizeof snd_seq_query_subscribe_sizeof_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_malloc snd_seq_query_subscribe_malloc_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_free snd_seq_query_subscribe_free_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_copy snd_seq_query_subscribe_copy_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_client snd_seq_query_subscribe_get_client_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_port snd_seq_query_subscribe_get_port_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_root snd_seq_query_subscribe_get_root_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_type snd_seq_query_subscribe_get_type_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_index snd_seq_query_subscribe_get_index_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_num_subs snd_seq_query_subscribe_get_num_subs_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_addr snd_seq_query_subscribe_get_addr_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_queue snd_seq_query_subscribe_get_queue_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_exclusive snd_seq_query_subscribe_get_exclusive_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_time_update snd_seq_query_subscribe_get_time_update_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_get_time_real snd_seq_query_subscribe_get_time_real_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_set_client snd_seq_query_subscribe_set_client_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_set_port snd_seq_query_subscribe_set_port_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_set_root snd_seq_query_subscribe_set_root_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_set_type snd_seq_query_subscribe_set_type_dylibloader_wrapper_asound
+#define snd_seq_query_subscribe_set_index snd_seq_query_subscribe_set_index_dylibloader_wrapper_asound
+#define snd_seq_query_port_subscribers snd_seq_query_port_subscribers_dylibloader_wrapper_asound
+#define snd_seq_queue_info_sizeof snd_seq_queue_info_sizeof_dylibloader_wrapper_asound
+#define snd_seq_queue_info_malloc snd_seq_queue_info_malloc_dylibloader_wrapper_asound
+#define snd_seq_queue_info_free snd_seq_queue_info_free_dylibloader_wrapper_asound
+#define snd_seq_queue_info_copy snd_seq_queue_info_copy_dylibloader_wrapper_asound
+#define snd_seq_queue_info_get_queue snd_seq_queue_info_get_queue_dylibloader_wrapper_asound
+#define snd_seq_queue_info_get_name snd_seq_queue_info_get_name_dylibloader_wrapper_asound
+#define snd_seq_queue_info_get_owner snd_seq_queue_info_get_owner_dylibloader_wrapper_asound
+#define snd_seq_queue_info_get_locked snd_seq_queue_info_get_locked_dylibloader_wrapper_asound
+#define snd_seq_queue_info_get_flags snd_seq_queue_info_get_flags_dylibloader_wrapper_asound
+#define snd_seq_queue_info_set_name snd_seq_queue_info_set_name_dylibloader_wrapper_asound
+#define snd_seq_queue_info_set_owner snd_seq_queue_info_set_owner_dylibloader_wrapper_asound
+#define snd_seq_queue_info_set_locked snd_seq_queue_info_set_locked_dylibloader_wrapper_asound
+#define snd_seq_queue_info_set_flags snd_seq_queue_info_set_flags_dylibloader_wrapper_asound
+#define snd_seq_create_queue snd_seq_create_queue_dylibloader_wrapper_asound
+#define snd_seq_alloc_named_queue snd_seq_alloc_named_queue_dylibloader_wrapper_asound
+#define snd_seq_alloc_queue snd_seq_alloc_queue_dylibloader_wrapper_asound
+#define snd_seq_free_queue snd_seq_free_queue_dylibloader_wrapper_asound
+#define snd_seq_get_queue_info snd_seq_get_queue_info_dylibloader_wrapper_asound
+#define snd_seq_set_queue_info snd_seq_set_queue_info_dylibloader_wrapper_asound
+#define snd_seq_query_named_queue snd_seq_query_named_queue_dylibloader_wrapper_asound
+#define snd_seq_get_queue_usage snd_seq_get_queue_usage_dylibloader_wrapper_asound
+#define snd_seq_set_queue_usage snd_seq_set_queue_usage_dylibloader_wrapper_asound
+#define snd_seq_queue_status_sizeof snd_seq_queue_status_sizeof_dylibloader_wrapper_asound
+#define snd_seq_queue_status_malloc snd_seq_queue_status_malloc_dylibloader_wrapper_asound
+#define snd_seq_queue_status_free snd_seq_queue_status_free_dylibloader_wrapper_asound
+#define snd_seq_queue_status_copy snd_seq_queue_status_copy_dylibloader_wrapper_asound
+#define snd_seq_queue_status_get_queue snd_seq_queue_status_get_queue_dylibloader_wrapper_asound
+#define snd_seq_queue_status_get_events snd_seq_queue_status_get_events_dylibloader_wrapper_asound
+#define snd_seq_queue_status_get_tick_time snd_seq_queue_status_get_tick_time_dylibloader_wrapper_asound
+#define snd_seq_queue_status_get_real_time snd_seq_queue_status_get_real_time_dylibloader_wrapper_asound
+#define snd_seq_queue_status_get_status snd_seq_queue_status_get_status_dylibloader_wrapper_asound
+#define snd_seq_get_queue_status snd_seq_get_queue_status_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_sizeof snd_seq_queue_tempo_sizeof_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_malloc snd_seq_queue_tempo_malloc_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_free snd_seq_queue_tempo_free_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_copy snd_seq_queue_tempo_copy_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_get_queue snd_seq_queue_tempo_get_queue_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_get_tempo snd_seq_queue_tempo_get_tempo_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_get_ppq snd_seq_queue_tempo_get_ppq_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_get_skew snd_seq_queue_tempo_get_skew_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_get_skew_base snd_seq_queue_tempo_get_skew_base_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_set_tempo snd_seq_queue_tempo_set_tempo_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_set_ppq snd_seq_queue_tempo_set_ppq_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_set_skew snd_seq_queue_tempo_set_skew_dylibloader_wrapper_asound
+#define snd_seq_queue_tempo_set_skew_base snd_seq_queue_tempo_set_skew_base_dylibloader_wrapper_asound
+#define snd_seq_get_queue_tempo snd_seq_get_queue_tempo_dylibloader_wrapper_asound
+#define snd_seq_set_queue_tempo snd_seq_set_queue_tempo_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_sizeof snd_seq_queue_timer_sizeof_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_malloc snd_seq_queue_timer_malloc_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_free snd_seq_queue_timer_free_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_copy snd_seq_queue_timer_copy_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_get_queue snd_seq_queue_timer_get_queue_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_get_type snd_seq_queue_timer_get_type_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_get_id snd_seq_queue_timer_get_id_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_get_resolution snd_seq_queue_timer_get_resolution_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_set_type snd_seq_queue_timer_set_type_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_set_id snd_seq_queue_timer_set_id_dylibloader_wrapper_asound
+#define snd_seq_queue_timer_set_resolution snd_seq_queue_timer_set_resolution_dylibloader_wrapper_asound
+#define snd_seq_get_queue_timer snd_seq_get_queue_timer_dylibloader_wrapper_asound
+#define snd_seq_set_queue_timer snd_seq_set_queue_timer_dylibloader_wrapper_asound
+#define snd_seq_free_event snd_seq_free_event_dylibloader_wrapper_asound
+#define snd_seq_event_length snd_seq_event_length_dylibloader_wrapper_asound
+#define snd_seq_event_output snd_seq_event_output_dylibloader_wrapper_asound
+#define snd_seq_event_output_buffer snd_seq_event_output_buffer_dylibloader_wrapper_asound
+#define snd_seq_event_output_direct snd_seq_event_output_direct_dylibloader_wrapper_asound
+#define snd_seq_event_input snd_seq_event_input_dylibloader_wrapper_asound
+#define snd_seq_event_input_pending snd_seq_event_input_pending_dylibloader_wrapper_asound
+#define snd_seq_drain_output snd_seq_drain_output_dylibloader_wrapper_asound
+#define snd_seq_event_output_pending snd_seq_event_output_pending_dylibloader_wrapper_asound
+#define snd_seq_extract_output snd_seq_extract_output_dylibloader_wrapper_asound
+#define snd_seq_drop_output snd_seq_drop_output_dylibloader_wrapper_asound
+#define snd_seq_drop_output_buffer snd_seq_drop_output_buffer_dylibloader_wrapper_asound
+#define snd_seq_drop_input snd_seq_drop_input_dylibloader_wrapper_asound
+#define snd_seq_drop_input_buffer snd_seq_drop_input_buffer_dylibloader_wrapper_asound
+#define snd_seq_remove_events_sizeof snd_seq_remove_events_sizeof_dylibloader_wrapper_asound
+#define snd_seq_remove_events_malloc snd_seq_remove_events_malloc_dylibloader_wrapper_asound
+#define snd_seq_remove_events_free snd_seq_remove_events_free_dylibloader_wrapper_asound
+#define snd_seq_remove_events_copy snd_seq_remove_events_copy_dylibloader_wrapper_asound
+#define snd_seq_remove_events_get_condition snd_seq_remove_events_get_condition_dylibloader_wrapper_asound
+#define snd_seq_remove_events_get_queue snd_seq_remove_events_get_queue_dylibloader_wrapper_asound
+#define snd_seq_remove_events_get_time snd_seq_remove_events_get_time_dylibloader_wrapper_asound
+#define snd_seq_remove_events_get_dest snd_seq_remove_events_get_dest_dylibloader_wrapper_asound
+#define snd_seq_remove_events_get_channel snd_seq_remove_events_get_channel_dylibloader_wrapper_asound
+#define snd_seq_remove_events_get_event_type snd_seq_remove_events_get_event_type_dylibloader_wrapper_asound
+#define snd_seq_remove_events_get_tag snd_seq_remove_events_get_tag_dylibloader_wrapper_asound
+#define snd_seq_remove_events_set_condition snd_seq_remove_events_set_condition_dylibloader_wrapper_asound
+#define snd_seq_remove_events_set_queue snd_seq_remove_events_set_queue_dylibloader_wrapper_asound
+#define snd_seq_remove_events_set_time snd_seq_remove_events_set_time_dylibloader_wrapper_asound
+#define snd_seq_remove_events_set_dest snd_seq_remove_events_set_dest_dylibloader_wrapper_asound
+#define snd_seq_remove_events_set_channel snd_seq_remove_events_set_channel_dylibloader_wrapper_asound
+#define snd_seq_remove_events_set_event_type snd_seq_remove_events_set_event_type_dylibloader_wrapper_asound
+#define snd_seq_remove_events_set_tag snd_seq_remove_events_set_tag_dylibloader_wrapper_asound
+#define snd_seq_remove_events snd_seq_remove_events_dylibloader_wrapper_asound
+#define snd_seq_set_bit snd_seq_set_bit_dylibloader_wrapper_asound
+#define snd_seq_unset_bit snd_seq_unset_bit_dylibloader_wrapper_asound
+#define snd_seq_change_bit snd_seq_change_bit_dylibloader_wrapper_asound
+#define snd_seq_get_bit snd_seq_get_bit_dylibloader_wrapper_asound
+#define snd_seq_control_queue snd_seq_control_queue_dylibloader_wrapper_asound
+#define snd_seq_create_simple_port snd_seq_create_simple_port_dylibloader_wrapper_asound
+#define snd_seq_delete_simple_port snd_seq_delete_simple_port_dylibloader_wrapper_asound
+#define snd_seq_connect_from snd_seq_connect_from_dylibloader_wrapper_asound
+#define snd_seq_connect_to snd_seq_connect_to_dylibloader_wrapper_asound
+#define snd_seq_disconnect_from snd_seq_disconnect_from_dylibloader_wrapper_asound
+#define snd_seq_disconnect_to snd_seq_disconnect_to_dylibloader_wrapper_asound
+#define snd_seq_set_client_name snd_seq_set_client_name_dylibloader_wrapper_asound
+#define snd_seq_set_client_event_filter snd_seq_set_client_event_filter_dylibloader_wrapper_asound
+#define snd_seq_set_client_pool_output snd_seq_set_client_pool_output_dylibloader_wrapper_asound
+#define snd_seq_set_client_pool_output_room snd_seq_set_client_pool_output_room_dylibloader_wrapper_asound
+#define snd_seq_set_client_pool_input snd_seq_set_client_pool_input_dylibloader_wrapper_asound
+#define snd_seq_sync_output_queue snd_seq_sync_output_queue_dylibloader_wrapper_asound
+#define snd_seq_parse_address snd_seq_parse_address_dylibloader_wrapper_asound
+#define snd_seq_reset_pool_output snd_seq_reset_pool_output_dylibloader_wrapper_asound
+#define snd_seq_reset_pool_input snd_seq_reset_pool_input_dylibloader_wrapper_asound
+#define snd_midi_event_new snd_midi_event_new_dylibloader_wrapper_asound
+#define snd_midi_event_resize_buffer snd_midi_event_resize_buffer_dylibloader_wrapper_asound
+#define snd_midi_event_free snd_midi_event_free_dylibloader_wrapper_asound
+#define snd_midi_event_init snd_midi_event_init_dylibloader_wrapper_asound
+#define snd_midi_event_reset_encode snd_midi_event_reset_encode_dylibloader_wrapper_asound
+#define snd_midi_event_reset_decode snd_midi_event_reset_decode_dylibloader_wrapper_asound
+#define snd_midi_event_no_status snd_midi_event_no_status_dylibloader_wrapper_asound
+#define snd_midi_event_encode snd_midi_event_encode_dylibloader_wrapper_asound
+#define snd_midi_event_encode_byte snd_midi_event_encode_byte_dylibloader_wrapper_asound
+#define snd_midi_event_decode snd_midi_event_decode_dylibloader_wrapper_asound
+extern const char* (*snd_asoundlib_version_dylibloader_wrapper_asound)( void);
+extern int (*snd_dlpath_dylibloader_wrapper_asound)( char*, size_t,const char*);
+extern void* (*snd_dlopen_dylibloader_wrapper_asound)(const char*, int, char*, size_t);
+extern void* (*snd_dlsym_dylibloader_wrapper_asound)( void*,const char*,const char*);
+extern int (*snd_dlclose_dylibloader_wrapper_asound)( void*);
+extern int (*snd_async_add_handler_dylibloader_wrapper_asound)( snd_async_handler_t**, int, snd_async_callback_t, void*);
+extern int (*snd_async_del_handler_dylibloader_wrapper_asound)( snd_async_handler_t*);
+extern int (*snd_async_handler_get_fd_dylibloader_wrapper_asound)( snd_async_handler_t*);
+extern int (*snd_async_handler_get_signo_dylibloader_wrapper_asound)( snd_async_handler_t*);
+extern void* (*snd_async_handler_get_callback_private_dylibloader_wrapper_asound)( snd_async_handler_t*);
+extern struct snd_shm_area* (*snd_shm_area_create_dylibloader_wrapper_asound)( int, void*);
+extern struct snd_shm_area* (*snd_shm_area_share_dylibloader_wrapper_asound)(struct snd_shm_area*);
+extern int (*snd_shm_area_destroy_dylibloader_wrapper_asound)(struct snd_shm_area*);
+extern int (*snd_user_file_dylibloader_wrapper_asound)(const char*, char**);
+extern int (*snd_input_stdio_open_dylibloader_wrapper_asound)( snd_input_t**,const char*,const char*);
+extern int (*snd_input_stdio_attach_dylibloader_wrapper_asound)( snd_input_t**, FILE*, int);
+extern int (*snd_input_buffer_open_dylibloader_wrapper_asound)( snd_input_t**,const char*, ssize_t);
+extern int (*snd_input_close_dylibloader_wrapper_asound)( snd_input_t*);
+extern int (*snd_input_scanf_dylibloader_wrapper_asound)( snd_input_t*,const char*,...);
+extern char* (*snd_input_gets_dylibloader_wrapper_asound)( snd_input_t*, char*, size_t);
+extern int (*snd_input_getc_dylibloader_wrapper_asound)( snd_input_t*);
+extern int (*snd_input_ungetc_dylibloader_wrapper_asound)( snd_input_t*, int);
+extern int (*snd_output_stdio_open_dylibloader_wrapper_asound)( snd_output_t**,const char*,const char*);
+extern int (*snd_output_stdio_attach_dylibloader_wrapper_asound)( snd_output_t**, FILE*, int);
+extern int (*snd_output_buffer_open_dylibloader_wrapper_asound)( snd_output_t**);
+extern size_t (*snd_output_buffer_string_dylibloader_wrapper_asound)( snd_output_t*, char**);
+extern int (*snd_output_close_dylibloader_wrapper_asound)( snd_output_t*);
+extern int (*snd_output_printf_dylibloader_wrapper_asound)( snd_output_t*,const char*,...);
+extern int (*snd_output_vprintf_dylibloader_wrapper_asound)( snd_output_t*,const char*, va_list);
+extern int (*snd_output_puts_dylibloader_wrapper_asound)( snd_output_t*,const char*);
+extern int (*snd_output_putc_dylibloader_wrapper_asound)( snd_output_t*, int);
+extern int (*snd_output_flush_dylibloader_wrapper_asound)( snd_output_t*);
+extern const char* (*snd_strerror_dylibloader_wrapper_asound)( int);
+extern int (*snd_lib_error_set_handler_dylibloader_wrapper_asound)( snd_lib_error_handler_t);
+extern snd_local_error_handler_t (*snd_lib_error_set_local_dylibloader_wrapper_asound)( snd_local_error_handler_t);
+extern const char* (*snd_config_topdir_dylibloader_wrapper_asound)( void);
+extern int (*snd_config_top_dylibloader_wrapper_asound)( snd_config_t**);
+extern int (*snd_config_load_dylibloader_wrapper_asound)( snd_config_t*, snd_input_t*);
+extern int (*snd_config_load_override_dylibloader_wrapper_asound)( snd_config_t*, snd_input_t*);
+extern int (*snd_config_save_dylibloader_wrapper_asound)( snd_config_t*, snd_output_t*);
+extern int (*snd_config_update_dylibloader_wrapper_asound)( void);
+extern int (*snd_config_update_r_dylibloader_wrapper_asound)( snd_config_t**, snd_config_update_t**,const char*);
+extern int (*snd_config_update_free_dylibloader_wrapper_asound)( snd_config_update_t*);
+extern int (*snd_config_update_free_global_dylibloader_wrapper_asound)( void);
+extern int (*snd_config_update_ref_dylibloader_wrapper_asound)( snd_config_t**);
+extern void (*snd_config_ref_dylibloader_wrapper_asound)( snd_config_t*);
+extern void (*snd_config_unref_dylibloader_wrapper_asound)( snd_config_t*);
+extern int (*snd_config_search_dylibloader_wrapper_asound)( snd_config_t*,const char*, snd_config_t**);
+extern int (*snd_config_searchv_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t**,...);
+extern int (*snd_config_search_definition_dylibloader_wrapper_asound)( snd_config_t*,const char*,const char*, snd_config_t**);
+extern int (*snd_config_expand_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t*,const char*, snd_config_t*, snd_config_t**);
+extern int (*snd_config_evaluate_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t*, snd_config_t*, snd_config_t**);
+extern int (*snd_config_add_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t*);
+extern int (*snd_config_add_before_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t*);
+extern int (*snd_config_add_after_dylibloader_wrapper_asound)( snd_config_t*, snd_config_t*);
+extern int (*snd_config_remove_dylibloader_wrapper_asound)( snd_config_t*);
+extern int (*snd_config_delete_dylibloader_wrapper_asound)( snd_config_t*);
+extern int (*snd_config_delete_compound_members_dylibloader_wrapper_asound)(const snd_config_t*);
+extern int (*snd_config_copy_dylibloader_wrapper_asound)( snd_config_t**, snd_config_t*);
+extern int (*snd_config_make_dylibloader_wrapper_asound)( snd_config_t**,const char*, snd_config_type_t);
+extern int (*snd_config_make_integer_dylibloader_wrapper_asound)( snd_config_t**,const char*);
+extern int (*snd_config_make_integer64_dylibloader_wrapper_asound)( snd_config_t**,const char*);
+extern int (*snd_config_make_real_dylibloader_wrapper_asound)( snd_config_t**,const char*);
+extern int (*snd_config_make_string_dylibloader_wrapper_asound)( snd_config_t**,const char*);
+extern int (*snd_config_make_pointer_dylibloader_wrapper_asound)( snd_config_t**,const char*);
+extern int (*snd_config_make_compound_dylibloader_wrapper_asound)( snd_config_t**,const char*, int);
+extern int (*snd_config_imake_integer_dylibloader_wrapper_asound)( snd_config_t**,const char*,const long);
+extern int (*snd_config_imake_integer64_dylibloader_wrapper_asound)( snd_config_t**,const char*,const long long);
+extern int (*snd_config_imake_real_dylibloader_wrapper_asound)( snd_config_t**,const char*,const double);
+extern int (*snd_config_imake_string_dylibloader_wrapper_asound)( snd_config_t**,const char*,const char*);
+extern int (*snd_config_imake_safe_string_dylibloader_wrapper_asound)( snd_config_t**,const char*,const char*);
+extern int (*snd_config_imake_pointer_dylibloader_wrapper_asound)( snd_config_t**,const char*,const void*);
+extern snd_config_type_t (*snd_config_get_type_dylibloader_wrapper_asound)(const snd_config_t*);
+extern int (*snd_config_is_array_dylibloader_wrapper_asound)(const snd_config_t*);
+extern int (*snd_config_set_id_dylibloader_wrapper_asound)( snd_config_t*,const char*);
+extern int (*snd_config_set_integer_dylibloader_wrapper_asound)( snd_config_t*, long);
+extern int (*snd_config_set_integer64_dylibloader_wrapper_asound)( snd_config_t*, long long);
+extern int (*snd_config_set_real_dylibloader_wrapper_asound)( snd_config_t*, double);
+extern int (*snd_config_set_string_dylibloader_wrapper_asound)( snd_config_t*,const char*);
+extern int (*snd_config_set_ascii_dylibloader_wrapper_asound)( snd_config_t*,const char*);
+extern int (*snd_config_set_pointer_dylibloader_wrapper_asound)( snd_config_t*,const void*);
+extern int (*snd_config_get_id_dylibloader_wrapper_asound)(const snd_config_t*,const char**);
+extern int (*snd_config_get_integer_dylibloader_wrapper_asound)(const snd_config_t*, long*);
+extern int (*snd_config_get_integer64_dylibloader_wrapper_asound)(const snd_config_t*, long long*);
+extern int (*snd_config_get_real_dylibloader_wrapper_asound)(const snd_config_t*, double*);
+extern int (*snd_config_get_ireal_dylibloader_wrapper_asound)(const snd_config_t*, double*);
+extern int (*snd_config_get_string_dylibloader_wrapper_asound)(const snd_config_t*,const char**);
+extern int (*snd_config_get_ascii_dylibloader_wrapper_asound)(const snd_config_t*, char**);
+extern int (*snd_config_get_pointer_dylibloader_wrapper_asound)(const snd_config_t*,const void**);
+extern int (*snd_config_test_id_dylibloader_wrapper_asound)(const snd_config_t*,const char*);
+extern snd_config_iterator_t (*snd_config_iterator_first_dylibloader_wrapper_asound)(const snd_config_t*);
+extern snd_config_iterator_t (*snd_config_iterator_next_dylibloader_wrapper_asound)(const snd_config_iterator_t);
+extern snd_config_iterator_t (*snd_config_iterator_end_dylibloader_wrapper_asound)(const snd_config_t*);
+extern snd_config_t* (*snd_config_iterator_entry_dylibloader_wrapper_asound)(const snd_config_iterator_t);
+extern int (*snd_config_get_bool_ascii_dylibloader_wrapper_asound)(const char*);
+extern int (*snd_config_get_bool_dylibloader_wrapper_asound)(const snd_config_t*);
+extern int (*snd_config_get_ctl_iface_ascii_dylibloader_wrapper_asound)(const char*);
+extern int (*snd_config_get_ctl_iface_dylibloader_wrapper_asound)(const snd_config_t*);
+extern int (*snd_names_list_dylibloader_wrapper_asound)(const char*, snd_devname_t**);
+extern void (*snd_names_list_free_dylibloader_wrapper_asound)( snd_devname_t*);
+extern int (*snd_pcm_open_dylibloader_wrapper_asound)( snd_pcm_t**,const char*, snd_pcm_stream_t, int);
+extern int (*snd_pcm_open_lconf_dylibloader_wrapper_asound)( snd_pcm_t**,const char*, snd_pcm_stream_t, int, snd_config_t*);
+extern int (*snd_pcm_open_fallback_dylibloader_wrapper_asound)( snd_pcm_t**, snd_config_t*,const char*,const char*, snd_pcm_stream_t, int);
+extern int (*snd_pcm_close_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern const char* (*snd_pcm_name_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern snd_pcm_type_t (*snd_pcm_type_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern snd_pcm_stream_t (*snd_pcm_stream_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_poll_descriptors_count_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_poll_descriptors_dylibloader_wrapper_asound)( snd_pcm_t*,struct pollfd*, unsigned int);
+extern int (*snd_pcm_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_pcm_t*,struct pollfd*, unsigned int, unsigned short*);
+extern int (*snd_pcm_nonblock_dylibloader_wrapper_asound)( snd_pcm_t*, int);
+extern int (*snd_async_add_pcm_handler_dylibloader_wrapper_asound)( snd_async_handler_t**, snd_pcm_t*, snd_async_callback_t, void*);
+extern snd_pcm_t* (*snd_async_handler_get_pcm_dylibloader_wrapper_asound)( snd_async_handler_t*);
+extern int (*snd_pcm_info_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_info_t*);
+extern int (*snd_pcm_hw_params_current_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_free_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_sw_params_current_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*);
+extern int (*snd_pcm_sw_params_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*);
+extern int (*snd_pcm_prepare_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_reset_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_status_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_status_t*);
+extern int (*snd_pcm_start_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_drop_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_drain_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_pause_dylibloader_wrapper_asound)( snd_pcm_t*, int);
+extern snd_pcm_state_t (*snd_pcm_state_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_hwsync_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_delay_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sframes_t*);
+extern int (*snd_pcm_resume_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_htimestamp_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_uframes_t*, snd_htimestamp_t*);
+extern snd_pcm_sframes_t (*snd_pcm_avail_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern snd_pcm_sframes_t (*snd_pcm_avail_update_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_avail_delay_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sframes_t*, snd_pcm_sframes_t*);
+extern snd_pcm_sframes_t (*snd_pcm_rewindable_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern snd_pcm_sframes_t (*snd_pcm_rewind_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_uframes_t);
+extern snd_pcm_sframes_t (*snd_pcm_forwardable_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern snd_pcm_sframes_t (*snd_pcm_forward_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_uframes_t);
+extern snd_pcm_sframes_t (*snd_pcm_writei_dylibloader_wrapper_asound)( snd_pcm_t*,const void*, snd_pcm_uframes_t);
+extern snd_pcm_sframes_t (*snd_pcm_readi_dylibloader_wrapper_asound)( snd_pcm_t*, void*, snd_pcm_uframes_t);
+extern snd_pcm_sframes_t (*snd_pcm_writen_dylibloader_wrapper_asound)( snd_pcm_t*, void**, snd_pcm_uframes_t);
+extern snd_pcm_sframes_t (*snd_pcm_readn_dylibloader_wrapper_asound)( snd_pcm_t*, void**, snd_pcm_uframes_t);
+extern int (*snd_pcm_wait_dylibloader_wrapper_asound)( snd_pcm_t*, int);
+extern int (*snd_pcm_link_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_t*);
+extern int (*snd_pcm_unlink_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern snd_pcm_chmap_query_t** (*snd_pcm_query_chmaps_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern snd_pcm_chmap_query_t** (*snd_pcm_query_chmaps_from_hw_dylibloader_wrapper_asound)( int, int, int, snd_pcm_stream_t);
+extern void (*snd_pcm_free_chmaps_dylibloader_wrapper_asound)( snd_pcm_chmap_query_t**);
+extern snd_pcm_chmap_t* (*snd_pcm_get_chmap_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_set_chmap_dylibloader_wrapper_asound)( snd_pcm_t*,const snd_pcm_chmap_t*);
+extern const char* (*snd_pcm_chmap_type_name_dylibloader_wrapper_asound)(enum snd_pcm_chmap_type);
+extern const char* (*snd_pcm_chmap_name_dylibloader_wrapper_asound)(enum snd_pcm_chmap_position);
+extern const char* (*snd_pcm_chmap_long_name_dylibloader_wrapper_asound)(enum snd_pcm_chmap_position);
+extern int (*snd_pcm_chmap_print_dylibloader_wrapper_asound)(const snd_pcm_chmap_t*, size_t, char*);
+extern unsigned int (*snd_pcm_chmap_from_string_dylibloader_wrapper_asound)(const char*);
+extern snd_pcm_chmap_t* (*snd_pcm_chmap_parse_string_dylibloader_wrapper_asound)(const char*);
+extern int (*snd_pcm_recover_dylibloader_wrapper_asound)( snd_pcm_t*, int, int);
+extern int (*snd_pcm_set_params_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_format_t, snd_pcm_access_t, unsigned int, unsigned int, int, unsigned int);
+extern int (*snd_pcm_get_params_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_uframes_t*, snd_pcm_uframes_t*);
+extern size_t (*snd_pcm_info_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_pcm_info_malloc_dylibloader_wrapper_asound)( snd_pcm_info_t**);
+extern void (*snd_pcm_info_free_dylibloader_wrapper_asound)( snd_pcm_info_t*);
+extern void (*snd_pcm_info_copy_dylibloader_wrapper_asound)( snd_pcm_info_t*,const snd_pcm_info_t*);
+extern unsigned int (*snd_pcm_info_get_device_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern unsigned int (*snd_pcm_info_get_subdevice_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern snd_pcm_stream_t (*snd_pcm_info_get_stream_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern int (*snd_pcm_info_get_card_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern const char* (*snd_pcm_info_get_id_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern const char* (*snd_pcm_info_get_name_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern const char* (*snd_pcm_info_get_subdevice_name_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern snd_pcm_class_t (*snd_pcm_info_get_class_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern snd_pcm_subclass_t (*snd_pcm_info_get_subclass_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern unsigned int (*snd_pcm_info_get_subdevices_count_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern unsigned int (*snd_pcm_info_get_subdevices_avail_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern snd_pcm_sync_id_t (*snd_pcm_info_get_sync_dylibloader_wrapper_asound)(const snd_pcm_info_t*);
+extern void (*snd_pcm_info_set_device_dylibloader_wrapper_asound)( snd_pcm_info_t*, unsigned int);
+extern void (*snd_pcm_info_set_subdevice_dylibloader_wrapper_asound)( snd_pcm_info_t*, unsigned int);
+extern void (*snd_pcm_info_set_stream_dylibloader_wrapper_asound)( snd_pcm_info_t*, snd_pcm_stream_t);
+extern int (*snd_pcm_hw_params_any_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_can_mmap_sample_resolution_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_is_double_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_is_batch_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_is_block_transfer_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_is_monotonic_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_can_overrange_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_can_pause_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_can_resume_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_is_half_duplex_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_is_joint_duplex_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_can_sync_start_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_can_disable_period_wakeup_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_supports_audio_wallclock_ts_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_supports_audio_ts_type_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, int);
+extern int (*snd_pcm_hw_params_get_rate_numden_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, unsigned int*);
+extern int (*snd_pcm_hw_params_get_sbits_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_get_fifo_size_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*);
+extern size_t (*snd_pcm_hw_params_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_pcm_hw_params_malloc_dylibloader_wrapper_asound)( snd_pcm_hw_params_t**);
+extern void (*snd_pcm_hw_params_free_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*);
+extern void (*snd_pcm_hw_params_copy_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*,const snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_get_access_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_access_t*);
+extern int (*snd_pcm_hw_params_test_access_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_access_t);
+extern int (*snd_pcm_hw_params_set_access_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_access_t);
+extern int (*snd_pcm_hw_params_set_access_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_access_t*);
+extern int (*snd_pcm_hw_params_set_access_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_access_t*);
+extern int (*snd_pcm_hw_params_set_access_mask_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_access_mask_t*);
+extern int (*snd_pcm_hw_params_get_access_mask_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*, snd_pcm_access_mask_t*);
+extern int (*snd_pcm_hw_params_get_format_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_format_t*);
+extern int (*snd_pcm_hw_params_test_format_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_format_t);
+extern int (*snd_pcm_hw_params_set_format_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_format_t);
+extern int (*snd_pcm_hw_params_set_format_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_format_t*);
+extern int (*snd_pcm_hw_params_set_format_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_format_t*);
+extern int (*snd_pcm_hw_params_set_format_mask_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_format_mask_t*);
+extern void (*snd_pcm_hw_params_get_format_mask_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*, snd_pcm_format_mask_t*);
+extern int (*snd_pcm_hw_params_get_subformat_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_subformat_t*);
+extern int (*snd_pcm_hw_params_test_subformat_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_subformat_t);
+extern int (*snd_pcm_hw_params_set_subformat_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_subformat_t);
+extern int (*snd_pcm_hw_params_set_subformat_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_subformat_t*);
+extern int (*snd_pcm_hw_params_set_subformat_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_subformat_t*);
+extern int (*snd_pcm_hw_params_set_subformat_mask_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_subformat_mask_t*);
+extern void (*snd_pcm_hw_params_get_subformat_mask_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*, snd_pcm_subformat_mask_t*);
+extern int (*snd_pcm_hw_params_get_channels_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_get_channels_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_get_channels_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_test_channels_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int);
+extern int (*snd_pcm_hw_params_set_channels_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int);
+extern int (*snd_pcm_hw_params_set_channels_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_set_channels_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_set_channels_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, unsigned int*);
+extern int (*snd_pcm_hw_params_set_channels_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_set_channels_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_set_channels_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_get_rate_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_rate_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_rate_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_test_rate_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+extern int (*snd_pcm_hw_params_set_rate_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+extern int (*snd_pcm_hw_params_set_rate_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_rate_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_rate_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_rate_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_rate_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_rate_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_rate_resample_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int);
+extern int (*snd_pcm_hw_params_get_rate_resample_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_set_export_buffer_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int);
+extern int (*snd_pcm_hw_params_get_export_buffer_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_set_period_wakeup_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int);
+extern int (*snd_pcm_hw_params_get_period_wakeup_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_get_period_time_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_period_time_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_period_time_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_test_period_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+extern int (*snd_pcm_hw_params_set_period_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+extern int (*snd_pcm_hw_params_set_period_time_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_period_time_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_period_time_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_period_time_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_period_time_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_period_time_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_period_size_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+extern int (*snd_pcm_hw_params_get_period_size_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+extern int (*snd_pcm_hw_params_get_period_size_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+extern int (*snd_pcm_hw_params_test_period_size_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t, int);
+extern int (*snd_pcm_hw_params_set_period_size_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t, int);
+extern int (*snd_pcm_hw_params_set_period_size_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+extern int (*snd_pcm_hw_params_set_period_size_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+extern int (*snd_pcm_hw_params_set_period_size_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*, snd_pcm_uframes_t*, int*);
+extern int (*snd_pcm_hw_params_set_period_size_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+extern int (*snd_pcm_hw_params_set_period_size_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+extern int (*snd_pcm_hw_params_set_period_size_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, int*);
+extern int (*snd_pcm_hw_params_set_period_size_integer_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_get_periods_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_periods_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_periods_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_test_periods_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+extern int (*snd_pcm_hw_params_set_periods_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+extern int (*snd_pcm_hw_params_set_periods_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_periods_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_periods_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_periods_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_periods_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_periods_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_periods_integer_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*);
+extern int (*snd_pcm_hw_params_get_buffer_time_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_buffer_time_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_buffer_time_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_test_buffer_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+extern int (*snd_pcm_hw_params_set_buffer_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+extern int (*snd_pcm_hw_params_set_buffer_time_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_buffer_time_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_buffer_time_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_buffer_time_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_buffer_time_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_buffer_time_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_buffer_size_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_hw_params_get_buffer_size_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_hw_params_get_buffer_size_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_hw_params_test_buffer_size_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t);
+extern int (*snd_pcm_hw_params_set_buffer_size_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t);
+extern int (*snd_pcm_hw_params_set_buffer_size_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_hw_params_set_buffer_size_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_hw_params_set_buffer_size_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_hw_params_set_buffer_size_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_hw_params_set_buffer_size_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_hw_params_set_buffer_size_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_hw_params_get_min_align_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, snd_pcm_uframes_t*);
+extern size_t (*snd_pcm_sw_params_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_pcm_sw_params_malloc_dylibloader_wrapper_asound)( snd_pcm_sw_params_t**);
+extern void (*snd_pcm_sw_params_free_dylibloader_wrapper_asound)( snd_pcm_sw_params_t*);
+extern void (*snd_pcm_sw_params_copy_dylibloader_wrapper_asound)( snd_pcm_sw_params_t*,const snd_pcm_sw_params_t*);
+extern int (*snd_pcm_sw_params_get_boundary_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_sw_params_set_tstamp_mode_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_tstamp_t);
+extern int (*snd_pcm_sw_params_get_tstamp_mode_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_tstamp_t*);
+extern int (*snd_pcm_sw_params_set_tstamp_type_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_tstamp_type_t);
+extern int (*snd_pcm_sw_params_get_tstamp_type_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_tstamp_type_t*);
+extern int (*snd_pcm_sw_params_set_avail_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+extern int (*snd_pcm_sw_params_get_avail_min_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_sw_params_set_period_event_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, int);
+extern int (*snd_pcm_sw_params_get_period_event_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, int*);
+extern int (*snd_pcm_sw_params_set_start_threshold_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+extern int (*snd_pcm_sw_params_get_start_threshold_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_sw_params_set_stop_threshold_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+extern int (*snd_pcm_sw_params_get_stop_threshold_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_sw_params_set_silence_threshold_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+extern int (*snd_pcm_sw_params_get_silence_threshold_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_sw_params_set_silence_size_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+extern int (*snd_pcm_sw_params_get_silence_size_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+extern size_t (*snd_pcm_access_mask_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_pcm_access_mask_malloc_dylibloader_wrapper_asound)( snd_pcm_access_mask_t**);
+extern void (*snd_pcm_access_mask_free_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*);
+extern void (*snd_pcm_access_mask_copy_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*,const snd_pcm_access_mask_t*);
+extern void (*snd_pcm_access_mask_none_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*);
+extern void (*snd_pcm_access_mask_any_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*);
+extern int (*snd_pcm_access_mask_test_dylibloader_wrapper_asound)(const snd_pcm_access_mask_t*, snd_pcm_access_t);
+extern int (*snd_pcm_access_mask_empty_dylibloader_wrapper_asound)(const snd_pcm_access_mask_t*);
+extern void (*snd_pcm_access_mask_set_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*, snd_pcm_access_t);
+extern void (*snd_pcm_access_mask_reset_dylibloader_wrapper_asound)( snd_pcm_access_mask_t*, snd_pcm_access_t);
+extern size_t (*snd_pcm_format_mask_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_pcm_format_mask_malloc_dylibloader_wrapper_asound)( snd_pcm_format_mask_t**);
+extern void (*snd_pcm_format_mask_free_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*);
+extern void (*snd_pcm_format_mask_copy_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*,const snd_pcm_format_mask_t*);
+extern void (*snd_pcm_format_mask_none_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*);
+extern void (*snd_pcm_format_mask_any_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*);
+extern int (*snd_pcm_format_mask_test_dylibloader_wrapper_asound)(const snd_pcm_format_mask_t*, snd_pcm_format_t);
+extern int (*snd_pcm_format_mask_empty_dylibloader_wrapper_asound)(const snd_pcm_format_mask_t*);
+extern void (*snd_pcm_format_mask_set_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*, snd_pcm_format_t);
+extern void (*snd_pcm_format_mask_reset_dylibloader_wrapper_asound)( snd_pcm_format_mask_t*, snd_pcm_format_t);
+extern size_t (*snd_pcm_subformat_mask_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_pcm_subformat_mask_malloc_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t**);
+extern void (*snd_pcm_subformat_mask_free_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*);
+extern void (*snd_pcm_subformat_mask_copy_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*,const snd_pcm_subformat_mask_t*);
+extern void (*snd_pcm_subformat_mask_none_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*);
+extern void (*snd_pcm_subformat_mask_any_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*);
+extern int (*snd_pcm_subformat_mask_test_dylibloader_wrapper_asound)(const snd_pcm_subformat_mask_t*, snd_pcm_subformat_t);
+extern int (*snd_pcm_subformat_mask_empty_dylibloader_wrapper_asound)(const snd_pcm_subformat_mask_t*);
+extern void (*snd_pcm_subformat_mask_set_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*, snd_pcm_subformat_t);
+extern void (*snd_pcm_subformat_mask_reset_dylibloader_wrapper_asound)( snd_pcm_subformat_mask_t*, snd_pcm_subformat_t);
+extern size_t (*snd_pcm_status_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_pcm_status_malloc_dylibloader_wrapper_asound)( snd_pcm_status_t**);
+extern void (*snd_pcm_status_free_dylibloader_wrapper_asound)( snd_pcm_status_t*);
+extern void (*snd_pcm_status_copy_dylibloader_wrapper_asound)( snd_pcm_status_t*,const snd_pcm_status_t*);
+extern snd_pcm_state_t (*snd_pcm_status_get_state_dylibloader_wrapper_asound)(const snd_pcm_status_t*);
+extern void (*snd_pcm_status_get_trigger_tstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_timestamp_t*);
+extern void (*snd_pcm_status_get_trigger_htstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_htimestamp_t*);
+extern void (*snd_pcm_status_get_tstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_timestamp_t*);
+extern void (*snd_pcm_status_get_htstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_htimestamp_t*);
+extern void (*snd_pcm_status_get_audio_htstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_htimestamp_t*);
+extern void (*snd_pcm_status_get_driver_htstamp_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_htimestamp_t*);
+extern void (*snd_pcm_status_get_audio_htstamp_report_dylibloader_wrapper_asound)(const snd_pcm_status_t*, snd_pcm_audio_tstamp_report_t*);
+extern void (*snd_pcm_status_set_audio_htstamp_config_dylibloader_wrapper_asound)( snd_pcm_status_t*, snd_pcm_audio_tstamp_config_t*);
+extern snd_pcm_sframes_t (*snd_pcm_status_get_delay_dylibloader_wrapper_asound)(const snd_pcm_status_t*);
+extern snd_pcm_uframes_t (*snd_pcm_status_get_avail_dylibloader_wrapper_asound)(const snd_pcm_status_t*);
+extern snd_pcm_uframes_t (*snd_pcm_status_get_avail_max_dylibloader_wrapper_asound)(const snd_pcm_status_t*);
+extern snd_pcm_uframes_t (*snd_pcm_status_get_overrange_dylibloader_wrapper_asound)(const snd_pcm_status_t*);
+extern const char* (*snd_pcm_type_name_dylibloader_wrapper_asound)( snd_pcm_type_t);
+extern const char* (*snd_pcm_stream_name_dylibloader_wrapper_asound)(const snd_pcm_stream_t);
+extern const char* (*snd_pcm_access_name_dylibloader_wrapper_asound)(const snd_pcm_access_t);
+extern const char* (*snd_pcm_format_name_dylibloader_wrapper_asound)(const snd_pcm_format_t);
+extern const char* (*snd_pcm_format_description_dylibloader_wrapper_asound)(const snd_pcm_format_t);
+extern const char* (*snd_pcm_subformat_name_dylibloader_wrapper_asound)(const snd_pcm_subformat_t);
+extern const char* (*snd_pcm_subformat_description_dylibloader_wrapper_asound)(const snd_pcm_subformat_t);
+extern snd_pcm_format_t (*snd_pcm_format_value_dylibloader_wrapper_asound)(const char*);
+extern const char* (*snd_pcm_tstamp_mode_name_dylibloader_wrapper_asound)(const snd_pcm_tstamp_t);
+extern const char* (*snd_pcm_state_name_dylibloader_wrapper_asound)(const snd_pcm_state_t);
+extern int (*snd_pcm_dump_dylibloader_wrapper_asound)( snd_pcm_t*, snd_output_t*);
+extern int (*snd_pcm_dump_hw_setup_dylibloader_wrapper_asound)( snd_pcm_t*, snd_output_t*);
+extern int (*snd_pcm_dump_sw_setup_dylibloader_wrapper_asound)( snd_pcm_t*, snd_output_t*);
+extern int (*snd_pcm_dump_setup_dylibloader_wrapper_asound)( snd_pcm_t*, snd_output_t*);
+extern int (*snd_pcm_hw_params_dump_dylibloader_wrapper_asound)( snd_pcm_hw_params_t*, snd_output_t*);
+extern int (*snd_pcm_sw_params_dump_dylibloader_wrapper_asound)( snd_pcm_sw_params_t*, snd_output_t*);
+extern int (*snd_pcm_status_dump_dylibloader_wrapper_asound)( snd_pcm_status_t*, snd_output_t*);
+extern int (*snd_pcm_mmap_begin_dylibloader_wrapper_asound)( snd_pcm_t*,const snd_pcm_channel_area_t**, snd_pcm_uframes_t*, snd_pcm_uframes_t*);
+extern snd_pcm_sframes_t (*snd_pcm_mmap_commit_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_uframes_t, snd_pcm_uframes_t);
+extern snd_pcm_sframes_t (*snd_pcm_mmap_writei_dylibloader_wrapper_asound)( snd_pcm_t*,const void*, snd_pcm_uframes_t);
+extern snd_pcm_sframes_t (*snd_pcm_mmap_readi_dylibloader_wrapper_asound)( snd_pcm_t*, void*, snd_pcm_uframes_t);
+extern snd_pcm_sframes_t (*snd_pcm_mmap_writen_dylibloader_wrapper_asound)( snd_pcm_t*, void**, snd_pcm_uframes_t);
+extern snd_pcm_sframes_t (*snd_pcm_mmap_readn_dylibloader_wrapper_asound)( snd_pcm_t*, void**, snd_pcm_uframes_t);
+extern int (*snd_pcm_format_signed_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern int (*snd_pcm_format_unsigned_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern int (*snd_pcm_format_linear_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern int (*snd_pcm_format_float_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern int (*snd_pcm_format_little_endian_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern int (*snd_pcm_format_big_endian_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern int (*snd_pcm_format_cpu_endian_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern int (*snd_pcm_format_width_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern int (*snd_pcm_format_physical_width_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern snd_pcm_format_t (*snd_pcm_build_linear_format_dylibloader_wrapper_asound)( int, int, int, int);
+extern ssize_t (*snd_pcm_format_size_dylibloader_wrapper_asound)( snd_pcm_format_t, size_t);
+extern uint8_t (*snd_pcm_format_silence_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern uint16_t (*snd_pcm_format_silence_16_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern uint32_t (*snd_pcm_format_silence_32_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern uint64_t (*snd_pcm_format_silence_64_dylibloader_wrapper_asound)( snd_pcm_format_t);
+extern int (*snd_pcm_format_set_silence_dylibloader_wrapper_asound)( snd_pcm_format_t, void*, unsigned int);
+extern snd_pcm_sframes_t (*snd_pcm_bytes_to_frames_dylibloader_wrapper_asound)( snd_pcm_t*, ssize_t);
+extern ssize_t (*snd_pcm_frames_to_bytes_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sframes_t);
+extern long (*snd_pcm_bytes_to_samples_dylibloader_wrapper_asound)( snd_pcm_t*, ssize_t);
+extern ssize_t (*snd_pcm_samples_to_bytes_dylibloader_wrapper_asound)( snd_pcm_t*, long);
+extern int (*snd_pcm_area_silence_dylibloader_wrapper_asound)(const snd_pcm_channel_area_t*, snd_pcm_uframes_t, unsigned int, snd_pcm_format_t);
+extern int (*snd_pcm_areas_silence_dylibloader_wrapper_asound)(const snd_pcm_channel_area_t*, snd_pcm_uframes_t, unsigned int, snd_pcm_uframes_t, snd_pcm_format_t);
+extern int (*snd_pcm_area_copy_dylibloader_wrapper_asound)(const snd_pcm_channel_area_t*, snd_pcm_uframes_t,const snd_pcm_channel_area_t*, snd_pcm_uframes_t, unsigned int, snd_pcm_format_t);
+extern int (*snd_pcm_areas_copy_dylibloader_wrapper_asound)(const snd_pcm_channel_area_t*, snd_pcm_uframes_t,const snd_pcm_channel_area_t*, snd_pcm_uframes_t, unsigned int, snd_pcm_uframes_t, snd_pcm_format_t);
+extern int (*snd_pcm_areas_copy_wrap_dylibloader_wrapper_asound)(const snd_pcm_channel_area_t*, snd_pcm_uframes_t,const snd_pcm_uframes_t,const snd_pcm_channel_area_t*, snd_pcm_uframes_t,const snd_pcm_uframes_t,const unsigned int, snd_pcm_uframes_t,const snd_pcm_format_t);
+extern snd_pcm_t* (*snd_pcm_hook_get_pcm_dylibloader_wrapper_asound)( snd_pcm_hook_t*);
+extern void* (*snd_pcm_hook_get_private_dylibloader_wrapper_asound)( snd_pcm_hook_t*);
+extern void (*snd_pcm_hook_set_private_dylibloader_wrapper_asound)( snd_pcm_hook_t*, void*);
+extern int (*snd_pcm_hook_add_dylibloader_wrapper_asound)( snd_pcm_hook_t**, snd_pcm_t*, snd_pcm_hook_type_t, snd_pcm_hook_func_t, void*);
+extern int (*snd_pcm_hook_remove_dylibloader_wrapper_asound)( snd_pcm_hook_t*);
+extern snd_pcm_uframes_t (*snd_pcm_meter_get_bufsize_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern unsigned int (*snd_pcm_meter_get_channels_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern unsigned int (*snd_pcm_meter_get_rate_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern snd_pcm_uframes_t (*snd_pcm_meter_get_now_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern snd_pcm_uframes_t (*snd_pcm_meter_get_boundary_dylibloader_wrapper_asound)( snd_pcm_t*);
+extern int (*snd_pcm_meter_add_scope_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_scope_t*);
+extern snd_pcm_scope_t* (*snd_pcm_meter_search_scope_dylibloader_wrapper_asound)( snd_pcm_t*,const char*);
+extern int (*snd_pcm_scope_malloc_dylibloader_wrapper_asound)( snd_pcm_scope_t**);
+extern void (*snd_pcm_scope_set_ops_dylibloader_wrapper_asound)( snd_pcm_scope_t*,const snd_pcm_scope_ops_t*);
+extern void (*snd_pcm_scope_set_name_dylibloader_wrapper_asound)( snd_pcm_scope_t*,const char*);
+extern const char* (*snd_pcm_scope_get_name_dylibloader_wrapper_asound)( snd_pcm_scope_t*);
+extern void* (*snd_pcm_scope_get_callback_private_dylibloader_wrapper_asound)( snd_pcm_scope_t*);
+extern void (*snd_pcm_scope_set_callback_private_dylibloader_wrapper_asound)( snd_pcm_scope_t*, void*);
+extern int (*snd_pcm_scope_s16_open_dylibloader_wrapper_asound)( snd_pcm_t*,const char*, snd_pcm_scope_t**);
+extern int16_t* (*snd_pcm_scope_s16_get_channel_buffer_dylibloader_wrapper_asound)( snd_pcm_scope_t*, unsigned int);
+extern int (*snd_spcm_init_dylibloader_wrapper_asound)( snd_pcm_t*, unsigned int, unsigned int, snd_pcm_format_t, snd_pcm_subformat_t, snd_spcm_latency_t, snd_pcm_access_t, snd_spcm_xrun_type_t);
+extern int (*snd_spcm_init_duplex_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_t*, unsigned int, unsigned int, snd_pcm_format_t, snd_pcm_subformat_t, snd_spcm_latency_t, snd_pcm_access_t, snd_spcm_xrun_type_t, snd_spcm_duplex_type_t);
+extern int (*snd_spcm_init_get_params_dylibloader_wrapper_asound)( snd_pcm_t*, unsigned int*, snd_pcm_uframes_t*, snd_pcm_uframes_t*);
+extern const char* (*snd_pcm_start_mode_name_dylibloader_wrapper_asound)( snd_pcm_start_t);
+extern const char* (*snd_pcm_xrun_mode_name_dylibloader_wrapper_asound)( snd_pcm_xrun_t);
+extern int (*snd_pcm_sw_params_set_start_mode_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_start_t);
+extern snd_pcm_start_t (*snd_pcm_sw_params_get_start_mode_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*);
+extern int (*snd_pcm_sw_params_set_xrun_mode_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_xrun_t);
+extern snd_pcm_xrun_t (*snd_pcm_sw_params_get_xrun_mode_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*);
+extern int (*snd_pcm_sw_params_set_xfer_align_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, snd_pcm_uframes_t);
+extern int (*snd_pcm_sw_params_get_xfer_align_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, snd_pcm_uframes_t*);
+extern int (*snd_pcm_sw_params_set_sleep_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_sw_params_t*, unsigned int);
+extern int (*snd_pcm_sw_params_get_sleep_min_dylibloader_wrapper_asound)(const snd_pcm_sw_params_t*, unsigned int*);
+extern int (*snd_pcm_hw_params_get_tick_time_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_tick_time_min_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_get_tick_time_max_dylibloader_wrapper_asound)(const snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_test_tick_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+extern int (*snd_pcm_hw_params_set_tick_time_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int);
+extern int (*snd_pcm_hw_params_set_tick_time_min_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_tick_time_max_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_tick_time_minmax_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_tick_time_near_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_tick_time_first_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_pcm_hw_params_set_tick_time_last_dylibloader_wrapper_asound)( snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int*, int*);
+extern int (*snd_rawmidi_open_dylibloader_wrapper_asound)( snd_rawmidi_t**, snd_rawmidi_t**,const char*, int);
+extern int (*snd_rawmidi_open_lconf_dylibloader_wrapper_asound)( snd_rawmidi_t**, snd_rawmidi_t**,const char*, int, snd_config_t*);
+extern int (*snd_rawmidi_close_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+extern int (*snd_rawmidi_poll_descriptors_count_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+extern int (*snd_rawmidi_poll_descriptors_dylibloader_wrapper_asound)( snd_rawmidi_t*,struct pollfd*, unsigned int);
+extern int (*snd_rawmidi_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_rawmidi_t*,struct pollfd*, unsigned int, unsigned short*);
+extern int (*snd_rawmidi_nonblock_dylibloader_wrapper_asound)( snd_rawmidi_t*, int);
+extern size_t (*snd_rawmidi_info_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_rawmidi_info_malloc_dylibloader_wrapper_asound)( snd_rawmidi_info_t**);
+extern void (*snd_rawmidi_info_free_dylibloader_wrapper_asound)( snd_rawmidi_info_t*);
+extern void (*snd_rawmidi_info_copy_dylibloader_wrapper_asound)( snd_rawmidi_info_t*,const snd_rawmidi_info_t*);
+extern unsigned int (*snd_rawmidi_info_get_device_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+extern unsigned int (*snd_rawmidi_info_get_subdevice_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+extern snd_rawmidi_stream_t (*snd_rawmidi_info_get_stream_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+extern int (*snd_rawmidi_info_get_card_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+extern unsigned int (*snd_rawmidi_info_get_flags_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+extern const char* (*snd_rawmidi_info_get_id_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+extern const char* (*snd_rawmidi_info_get_name_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+extern const char* (*snd_rawmidi_info_get_subdevice_name_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+extern unsigned int (*snd_rawmidi_info_get_subdevices_count_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+extern unsigned int (*snd_rawmidi_info_get_subdevices_avail_dylibloader_wrapper_asound)(const snd_rawmidi_info_t*);
+extern void (*snd_rawmidi_info_set_device_dylibloader_wrapper_asound)( snd_rawmidi_info_t*, unsigned int);
+extern void (*snd_rawmidi_info_set_subdevice_dylibloader_wrapper_asound)( snd_rawmidi_info_t*, unsigned int);
+extern void (*snd_rawmidi_info_set_stream_dylibloader_wrapper_asound)( snd_rawmidi_info_t*, snd_rawmidi_stream_t);
+extern int (*snd_rawmidi_info_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_info_t*);
+extern size_t (*snd_rawmidi_params_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_rawmidi_params_malloc_dylibloader_wrapper_asound)( snd_rawmidi_params_t**);
+extern void (*snd_rawmidi_params_free_dylibloader_wrapper_asound)( snd_rawmidi_params_t*);
+extern void (*snd_rawmidi_params_copy_dylibloader_wrapper_asound)( snd_rawmidi_params_t*,const snd_rawmidi_params_t*);
+extern int (*snd_rawmidi_params_set_buffer_size_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_params_t*, size_t);
+extern size_t (*snd_rawmidi_params_get_buffer_size_dylibloader_wrapper_asound)(const snd_rawmidi_params_t*);
+extern int (*snd_rawmidi_params_set_avail_min_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_params_t*, size_t);
+extern size_t (*snd_rawmidi_params_get_avail_min_dylibloader_wrapper_asound)(const snd_rawmidi_params_t*);
+extern int (*snd_rawmidi_params_set_no_active_sensing_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_params_t*, int);
+extern int (*snd_rawmidi_params_get_no_active_sensing_dylibloader_wrapper_asound)(const snd_rawmidi_params_t*);
+extern int (*snd_rawmidi_params_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_params_t*);
+extern int (*snd_rawmidi_params_current_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_params_t*);
+extern size_t (*snd_rawmidi_status_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_rawmidi_status_malloc_dylibloader_wrapper_asound)( snd_rawmidi_status_t**);
+extern void (*snd_rawmidi_status_free_dylibloader_wrapper_asound)( snd_rawmidi_status_t*);
+extern void (*snd_rawmidi_status_copy_dylibloader_wrapper_asound)( snd_rawmidi_status_t*,const snd_rawmidi_status_t*);
+extern void (*snd_rawmidi_status_get_tstamp_dylibloader_wrapper_asound)(const snd_rawmidi_status_t*, snd_htimestamp_t*);
+extern size_t (*snd_rawmidi_status_get_avail_dylibloader_wrapper_asound)(const snd_rawmidi_status_t*);
+extern size_t (*snd_rawmidi_status_get_xruns_dylibloader_wrapper_asound)(const snd_rawmidi_status_t*);
+extern int (*snd_rawmidi_status_dylibloader_wrapper_asound)( snd_rawmidi_t*, snd_rawmidi_status_t*);
+extern int (*snd_rawmidi_drain_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+extern int (*snd_rawmidi_drop_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+extern ssize_t (*snd_rawmidi_write_dylibloader_wrapper_asound)( snd_rawmidi_t*,const void*, size_t);
+extern ssize_t (*snd_rawmidi_read_dylibloader_wrapper_asound)( snd_rawmidi_t*, void*, size_t);
+extern const char* (*snd_rawmidi_name_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+extern snd_rawmidi_type_t (*snd_rawmidi_type_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+extern snd_rawmidi_stream_t (*snd_rawmidi_stream_dylibloader_wrapper_asound)( snd_rawmidi_t*);
+extern int (*snd_timer_query_open_dylibloader_wrapper_asound)( snd_timer_query_t**,const char*, int);
+extern int (*snd_timer_query_open_lconf_dylibloader_wrapper_asound)( snd_timer_query_t**,const char*, int, snd_config_t*);
+extern int (*snd_timer_query_close_dylibloader_wrapper_asound)( snd_timer_query_t*);
+extern int (*snd_timer_query_next_device_dylibloader_wrapper_asound)( snd_timer_query_t*, snd_timer_id_t*);
+extern int (*snd_timer_query_info_dylibloader_wrapper_asound)( snd_timer_query_t*, snd_timer_ginfo_t*);
+extern int (*snd_timer_query_params_dylibloader_wrapper_asound)( snd_timer_query_t*, snd_timer_gparams_t*);
+extern int (*snd_timer_query_status_dylibloader_wrapper_asound)( snd_timer_query_t*, snd_timer_gstatus_t*);
+extern int (*snd_timer_open_dylibloader_wrapper_asound)( snd_timer_t**,const char*, int);
+extern int (*snd_timer_open_lconf_dylibloader_wrapper_asound)( snd_timer_t**,const char*, int, snd_config_t*);
+extern int (*snd_timer_close_dylibloader_wrapper_asound)( snd_timer_t*);
+extern int (*snd_async_add_timer_handler_dylibloader_wrapper_asound)( snd_async_handler_t**, snd_timer_t*, snd_async_callback_t, void*);
+extern snd_timer_t* (*snd_async_handler_get_timer_dylibloader_wrapper_asound)( snd_async_handler_t*);
+extern int (*snd_timer_poll_descriptors_count_dylibloader_wrapper_asound)( snd_timer_t*);
+extern int (*snd_timer_poll_descriptors_dylibloader_wrapper_asound)( snd_timer_t*,struct pollfd*, unsigned int);
+extern int (*snd_timer_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_timer_t*,struct pollfd*, unsigned int, unsigned short*);
+extern int (*snd_timer_info_dylibloader_wrapper_asound)( snd_timer_t*, snd_timer_info_t*);
+extern int (*snd_timer_params_dylibloader_wrapper_asound)( snd_timer_t*, snd_timer_params_t*);
+extern int (*snd_timer_status_dylibloader_wrapper_asound)( snd_timer_t*, snd_timer_status_t*);
+extern int (*snd_timer_start_dylibloader_wrapper_asound)( snd_timer_t*);
+extern int (*snd_timer_stop_dylibloader_wrapper_asound)( snd_timer_t*);
+extern int (*snd_timer_continue_dylibloader_wrapper_asound)( snd_timer_t*);
+extern ssize_t (*snd_timer_read_dylibloader_wrapper_asound)( snd_timer_t*, void*, size_t);
+extern size_t (*snd_timer_id_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_timer_id_malloc_dylibloader_wrapper_asound)( snd_timer_id_t**);
+extern void (*snd_timer_id_free_dylibloader_wrapper_asound)( snd_timer_id_t*);
+extern void (*snd_timer_id_copy_dylibloader_wrapper_asound)( snd_timer_id_t*,const snd_timer_id_t*);
+extern void (*snd_timer_id_set_class_dylibloader_wrapper_asound)( snd_timer_id_t*, int);
+extern int (*snd_timer_id_get_class_dylibloader_wrapper_asound)( snd_timer_id_t*);
+extern void (*snd_timer_id_set_sclass_dylibloader_wrapper_asound)( snd_timer_id_t*, int);
+extern int (*snd_timer_id_get_sclass_dylibloader_wrapper_asound)( snd_timer_id_t*);
+extern void (*snd_timer_id_set_card_dylibloader_wrapper_asound)( snd_timer_id_t*, int);
+extern int (*snd_timer_id_get_card_dylibloader_wrapper_asound)( snd_timer_id_t*);
+extern void (*snd_timer_id_set_device_dylibloader_wrapper_asound)( snd_timer_id_t*, int);
+extern int (*snd_timer_id_get_device_dylibloader_wrapper_asound)( snd_timer_id_t*);
+extern void (*snd_timer_id_set_subdevice_dylibloader_wrapper_asound)( snd_timer_id_t*, int);
+extern int (*snd_timer_id_get_subdevice_dylibloader_wrapper_asound)( snd_timer_id_t*);
+extern size_t (*snd_timer_ginfo_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_timer_ginfo_malloc_dylibloader_wrapper_asound)( snd_timer_ginfo_t**);
+extern void (*snd_timer_ginfo_free_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+extern void (*snd_timer_ginfo_copy_dylibloader_wrapper_asound)( snd_timer_ginfo_t*,const snd_timer_ginfo_t*);
+extern int (*snd_timer_ginfo_set_tid_dylibloader_wrapper_asound)( snd_timer_ginfo_t*, snd_timer_id_t*);
+extern snd_timer_id_t* (*snd_timer_ginfo_get_tid_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+extern unsigned int (*snd_timer_ginfo_get_flags_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+extern int (*snd_timer_ginfo_get_card_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+extern char* (*snd_timer_ginfo_get_id_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+extern char* (*snd_timer_ginfo_get_name_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+extern unsigned long (*snd_timer_ginfo_get_resolution_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+extern unsigned long (*snd_timer_ginfo_get_resolution_min_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+extern unsigned long (*snd_timer_ginfo_get_resolution_max_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+extern unsigned int (*snd_timer_ginfo_get_clients_dylibloader_wrapper_asound)( snd_timer_ginfo_t*);
+extern size_t (*snd_timer_info_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_timer_info_malloc_dylibloader_wrapper_asound)( snd_timer_info_t**);
+extern void (*snd_timer_info_free_dylibloader_wrapper_asound)( snd_timer_info_t*);
+extern void (*snd_timer_info_copy_dylibloader_wrapper_asound)( snd_timer_info_t*,const snd_timer_info_t*);
+extern int (*snd_timer_info_is_slave_dylibloader_wrapper_asound)( snd_timer_info_t*);
+extern int (*snd_timer_info_get_card_dylibloader_wrapper_asound)( snd_timer_info_t*);
+extern const char* (*snd_timer_info_get_id_dylibloader_wrapper_asound)( snd_timer_info_t*);
+extern const char* (*snd_timer_info_get_name_dylibloader_wrapper_asound)( snd_timer_info_t*);
+extern long (*snd_timer_info_get_resolution_dylibloader_wrapper_asound)( snd_timer_info_t*);
+extern size_t (*snd_timer_params_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_timer_params_malloc_dylibloader_wrapper_asound)( snd_timer_params_t**);
+extern void (*snd_timer_params_free_dylibloader_wrapper_asound)( snd_timer_params_t*);
+extern void (*snd_timer_params_copy_dylibloader_wrapper_asound)( snd_timer_params_t*,const snd_timer_params_t*);
+extern int (*snd_timer_params_set_auto_start_dylibloader_wrapper_asound)( snd_timer_params_t*, int);
+extern int (*snd_timer_params_get_auto_start_dylibloader_wrapper_asound)( snd_timer_params_t*);
+extern int (*snd_timer_params_set_exclusive_dylibloader_wrapper_asound)( snd_timer_params_t*, int);
+extern int (*snd_timer_params_get_exclusive_dylibloader_wrapper_asound)( snd_timer_params_t*);
+extern int (*snd_timer_params_set_early_event_dylibloader_wrapper_asound)( snd_timer_params_t*, int);
+extern int (*snd_timer_params_get_early_event_dylibloader_wrapper_asound)( snd_timer_params_t*);
+extern void (*snd_timer_params_set_ticks_dylibloader_wrapper_asound)( snd_timer_params_t*, long);
+extern long (*snd_timer_params_get_ticks_dylibloader_wrapper_asound)( snd_timer_params_t*);
+extern void (*snd_timer_params_set_queue_size_dylibloader_wrapper_asound)( snd_timer_params_t*, long);
+extern long (*snd_timer_params_get_queue_size_dylibloader_wrapper_asound)( snd_timer_params_t*);
+extern void (*snd_timer_params_set_filter_dylibloader_wrapper_asound)( snd_timer_params_t*, unsigned int);
+extern unsigned int (*snd_timer_params_get_filter_dylibloader_wrapper_asound)( snd_timer_params_t*);
+extern size_t (*snd_timer_status_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_timer_status_malloc_dylibloader_wrapper_asound)( snd_timer_status_t**);
+extern void (*snd_timer_status_free_dylibloader_wrapper_asound)( snd_timer_status_t*);
+extern void (*snd_timer_status_copy_dylibloader_wrapper_asound)( snd_timer_status_t*,const snd_timer_status_t*);
+extern snd_htimestamp_t (*snd_timer_status_get_timestamp_dylibloader_wrapper_asound)( snd_timer_status_t*);
+extern long (*snd_timer_status_get_resolution_dylibloader_wrapper_asound)( snd_timer_status_t*);
+extern long (*snd_timer_status_get_lost_dylibloader_wrapper_asound)( snd_timer_status_t*);
+extern long (*snd_timer_status_get_overrun_dylibloader_wrapper_asound)( snd_timer_status_t*);
+extern long (*snd_timer_status_get_queue_dylibloader_wrapper_asound)( snd_timer_status_t*);
+extern long (*snd_timer_info_get_ticks_dylibloader_wrapper_asound)( snd_timer_info_t*);
+extern int (*snd_hwdep_open_dylibloader_wrapper_asound)( snd_hwdep_t**,const char*, int);
+extern int (*snd_hwdep_close_dylibloader_wrapper_asound)( snd_hwdep_t*);
+extern int (*snd_hwdep_poll_descriptors_dylibloader_wrapper_asound)( snd_hwdep_t*,struct pollfd*, unsigned int);
+extern int (*snd_hwdep_poll_descriptors_count_dylibloader_wrapper_asound)( snd_hwdep_t*);
+extern int (*snd_hwdep_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_hwdep_t*,struct pollfd*, unsigned int, unsigned short*);
+extern int (*snd_hwdep_nonblock_dylibloader_wrapper_asound)( snd_hwdep_t*, int);
+extern int (*snd_hwdep_info_dylibloader_wrapper_asound)( snd_hwdep_t*, snd_hwdep_info_t*);
+extern int (*snd_hwdep_dsp_status_dylibloader_wrapper_asound)( snd_hwdep_t*, snd_hwdep_dsp_status_t*);
+extern int (*snd_hwdep_dsp_load_dylibloader_wrapper_asound)( snd_hwdep_t*, snd_hwdep_dsp_image_t*);
+extern int (*snd_hwdep_ioctl_dylibloader_wrapper_asound)( snd_hwdep_t*, unsigned int, void*);
+extern ssize_t (*snd_hwdep_write_dylibloader_wrapper_asound)( snd_hwdep_t*,const void*, size_t);
+extern ssize_t (*snd_hwdep_read_dylibloader_wrapper_asound)( snd_hwdep_t*, void*, size_t);
+extern size_t (*snd_hwdep_info_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_hwdep_info_malloc_dylibloader_wrapper_asound)( snd_hwdep_info_t**);
+extern void (*snd_hwdep_info_free_dylibloader_wrapper_asound)( snd_hwdep_info_t*);
+extern void (*snd_hwdep_info_copy_dylibloader_wrapper_asound)( snd_hwdep_info_t*,const snd_hwdep_info_t*);
+extern unsigned int (*snd_hwdep_info_get_device_dylibloader_wrapper_asound)(const snd_hwdep_info_t*);
+extern int (*snd_hwdep_info_get_card_dylibloader_wrapper_asound)(const snd_hwdep_info_t*);
+extern const char* (*snd_hwdep_info_get_id_dylibloader_wrapper_asound)(const snd_hwdep_info_t*);
+extern const char* (*snd_hwdep_info_get_name_dylibloader_wrapper_asound)(const snd_hwdep_info_t*);
+extern snd_hwdep_iface_t (*snd_hwdep_info_get_iface_dylibloader_wrapper_asound)(const snd_hwdep_info_t*);
+extern void (*snd_hwdep_info_set_device_dylibloader_wrapper_asound)( snd_hwdep_info_t*, unsigned int);
+extern size_t (*snd_hwdep_dsp_status_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_hwdep_dsp_status_malloc_dylibloader_wrapper_asound)( snd_hwdep_dsp_status_t**);
+extern void (*snd_hwdep_dsp_status_free_dylibloader_wrapper_asound)( snd_hwdep_dsp_status_t*);
+extern void (*snd_hwdep_dsp_status_copy_dylibloader_wrapper_asound)( snd_hwdep_dsp_status_t*,const snd_hwdep_dsp_status_t*);
+extern unsigned int (*snd_hwdep_dsp_status_get_version_dylibloader_wrapper_asound)(const snd_hwdep_dsp_status_t*);
+extern const char* (*snd_hwdep_dsp_status_get_id_dylibloader_wrapper_asound)(const snd_hwdep_dsp_status_t*);
+extern unsigned int (*snd_hwdep_dsp_status_get_num_dsps_dylibloader_wrapper_asound)(const snd_hwdep_dsp_status_t*);
+extern unsigned int (*snd_hwdep_dsp_status_get_dsp_loaded_dylibloader_wrapper_asound)(const snd_hwdep_dsp_status_t*);
+extern unsigned int (*snd_hwdep_dsp_status_get_chip_ready_dylibloader_wrapper_asound)(const snd_hwdep_dsp_status_t*);
+extern size_t (*snd_hwdep_dsp_image_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_hwdep_dsp_image_malloc_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t**);
+extern void (*snd_hwdep_dsp_image_free_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*);
+extern void (*snd_hwdep_dsp_image_copy_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*,const snd_hwdep_dsp_image_t*);
+extern unsigned int (*snd_hwdep_dsp_image_get_index_dylibloader_wrapper_asound)(const snd_hwdep_dsp_image_t*);
+extern const char* (*snd_hwdep_dsp_image_get_name_dylibloader_wrapper_asound)(const snd_hwdep_dsp_image_t*);
+extern const void* (*snd_hwdep_dsp_image_get_image_dylibloader_wrapper_asound)(const snd_hwdep_dsp_image_t*);
+extern size_t (*snd_hwdep_dsp_image_get_length_dylibloader_wrapper_asound)(const snd_hwdep_dsp_image_t*);
+extern void (*snd_hwdep_dsp_image_set_index_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*, unsigned int);
+extern void (*snd_hwdep_dsp_image_set_name_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*,const char*);
+extern void (*snd_hwdep_dsp_image_set_image_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*, void*);
+extern void (*snd_hwdep_dsp_image_set_length_dylibloader_wrapper_asound)( snd_hwdep_dsp_image_t*, size_t);
+extern int (*snd_card_load_dylibloader_wrapper_asound)( int);
+extern int (*snd_card_next_dylibloader_wrapper_asound)( int*);
+extern int (*snd_card_get_index_dylibloader_wrapper_asound)(const char*);
+extern int (*snd_card_get_name_dylibloader_wrapper_asound)( int, char**);
+extern int (*snd_card_get_longname_dylibloader_wrapper_asound)( int, char**);
+extern int (*snd_device_name_hint_dylibloader_wrapper_asound)( int,const char*, void***);
+extern int (*snd_device_name_free_hint_dylibloader_wrapper_asound)( void**);
+extern char* (*snd_device_name_get_hint_dylibloader_wrapper_asound)(const void*,const char*);
+extern int (*snd_ctl_open_dylibloader_wrapper_asound)( snd_ctl_t**,const char*, int);
+extern int (*snd_ctl_open_lconf_dylibloader_wrapper_asound)( snd_ctl_t**,const char*, int, snd_config_t*);
+extern int (*snd_ctl_open_fallback_dylibloader_wrapper_asound)( snd_ctl_t**, snd_config_t*,const char*,const char*, int);
+extern int (*snd_ctl_close_dylibloader_wrapper_asound)( snd_ctl_t*);
+extern int (*snd_ctl_nonblock_dylibloader_wrapper_asound)( snd_ctl_t*, int);
+extern int (*snd_async_add_ctl_handler_dylibloader_wrapper_asound)( snd_async_handler_t**, snd_ctl_t*, snd_async_callback_t, void*);
+extern snd_ctl_t* (*snd_async_handler_get_ctl_dylibloader_wrapper_asound)( snd_async_handler_t*);
+extern int (*snd_ctl_poll_descriptors_count_dylibloader_wrapper_asound)( snd_ctl_t*);
+extern int (*snd_ctl_poll_descriptors_dylibloader_wrapper_asound)( snd_ctl_t*,struct pollfd*, unsigned int);
+extern int (*snd_ctl_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_ctl_t*,struct pollfd*, unsigned int, unsigned short*);
+extern int (*snd_ctl_subscribe_events_dylibloader_wrapper_asound)( snd_ctl_t*, int);
+extern int (*snd_ctl_card_info_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_card_info_t*);
+extern int (*snd_ctl_elem_list_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_list_t*);
+extern int (*snd_ctl_elem_info_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_read_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_value_t*);
+extern int (*snd_ctl_elem_write_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_value_t*);
+extern int (*snd_ctl_elem_lock_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_id_t*);
+extern int (*snd_ctl_elem_unlock_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_id_t*);
+extern int (*snd_ctl_elem_tlv_read_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, unsigned int*, unsigned int);
+extern int (*snd_ctl_elem_tlv_write_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*,const unsigned int*);
+extern int (*snd_ctl_elem_tlv_command_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*,const unsigned int*);
+extern int (*snd_ctl_hwdep_next_device_dylibloader_wrapper_asound)( snd_ctl_t*, int*);
+extern int (*snd_ctl_hwdep_info_dylibloader_wrapper_asound)( snd_ctl_t*, snd_hwdep_info_t*);
+extern int (*snd_ctl_pcm_next_device_dylibloader_wrapper_asound)( snd_ctl_t*, int*);
+extern int (*snd_ctl_pcm_info_dylibloader_wrapper_asound)( snd_ctl_t*, snd_pcm_info_t*);
+extern int (*snd_ctl_pcm_prefer_subdevice_dylibloader_wrapper_asound)( snd_ctl_t*, int);
+extern int (*snd_ctl_rawmidi_next_device_dylibloader_wrapper_asound)( snd_ctl_t*, int*);
+extern int (*snd_ctl_rawmidi_info_dylibloader_wrapper_asound)( snd_ctl_t*, snd_rawmidi_info_t*);
+extern int (*snd_ctl_rawmidi_prefer_subdevice_dylibloader_wrapper_asound)( snd_ctl_t*, int);
+extern int (*snd_ctl_set_power_state_dylibloader_wrapper_asound)( snd_ctl_t*, unsigned int);
+extern int (*snd_ctl_get_power_state_dylibloader_wrapper_asound)( snd_ctl_t*, unsigned int*);
+extern int (*snd_ctl_read_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_event_t*);
+extern int (*snd_ctl_wait_dylibloader_wrapper_asound)( snd_ctl_t*, int);
+extern const char* (*snd_ctl_name_dylibloader_wrapper_asound)( snd_ctl_t*);
+extern snd_ctl_type_t (*snd_ctl_type_dylibloader_wrapper_asound)( snd_ctl_t*);
+extern const char* (*snd_ctl_elem_type_name_dylibloader_wrapper_asound)( snd_ctl_elem_type_t);
+extern const char* (*snd_ctl_elem_iface_name_dylibloader_wrapper_asound)( snd_ctl_elem_iface_t);
+extern const char* (*snd_ctl_event_type_name_dylibloader_wrapper_asound)( snd_ctl_event_type_t);
+extern unsigned int (*snd_ctl_event_elem_get_mask_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+extern unsigned int (*snd_ctl_event_elem_get_numid_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+extern void (*snd_ctl_event_elem_get_id_dylibloader_wrapper_asound)(const snd_ctl_event_t*, snd_ctl_elem_id_t*);
+extern snd_ctl_elem_iface_t (*snd_ctl_event_elem_get_interface_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+extern unsigned int (*snd_ctl_event_elem_get_device_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+extern unsigned int (*snd_ctl_event_elem_get_subdevice_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+extern const char* (*snd_ctl_event_elem_get_name_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+extern unsigned int (*snd_ctl_event_elem_get_index_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+extern int (*snd_ctl_elem_list_alloc_space_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*, unsigned int);
+extern void (*snd_ctl_elem_list_free_space_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*);
+extern char* (*snd_ctl_ascii_elem_id_get_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*);
+extern int (*snd_ctl_ascii_elem_id_parse_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*,const char*);
+extern int (*snd_ctl_ascii_value_parse_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_value_t*, snd_ctl_elem_info_t*,const char*);
+extern size_t (*snd_ctl_elem_id_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_ctl_elem_id_malloc_dylibloader_wrapper_asound)( snd_ctl_elem_id_t**);
+extern void (*snd_ctl_elem_id_free_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*);
+extern void (*snd_ctl_elem_id_clear_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*);
+extern void (*snd_ctl_elem_id_copy_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*,const snd_ctl_elem_id_t*);
+extern unsigned int (*snd_ctl_elem_id_get_numid_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+extern snd_ctl_elem_iface_t (*snd_ctl_elem_id_get_interface_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+extern unsigned int (*snd_ctl_elem_id_get_device_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+extern unsigned int (*snd_ctl_elem_id_get_subdevice_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+extern const char* (*snd_ctl_elem_id_get_name_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+extern unsigned int (*snd_ctl_elem_id_get_index_dylibloader_wrapper_asound)(const snd_ctl_elem_id_t*);
+extern void (*snd_ctl_elem_id_set_numid_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*, unsigned int);
+extern void (*snd_ctl_elem_id_set_interface_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*, snd_ctl_elem_iface_t);
+extern void (*snd_ctl_elem_id_set_device_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*, unsigned int);
+extern void (*snd_ctl_elem_id_set_subdevice_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*, unsigned int);
+extern void (*snd_ctl_elem_id_set_name_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*,const char*);
+extern void (*snd_ctl_elem_id_set_index_dylibloader_wrapper_asound)( snd_ctl_elem_id_t*, unsigned int);
+extern size_t (*snd_ctl_card_info_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_ctl_card_info_malloc_dylibloader_wrapper_asound)( snd_ctl_card_info_t**);
+extern void (*snd_ctl_card_info_free_dylibloader_wrapper_asound)( snd_ctl_card_info_t*);
+extern void (*snd_ctl_card_info_clear_dylibloader_wrapper_asound)( snd_ctl_card_info_t*);
+extern void (*snd_ctl_card_info_copy_dylibloader_wrapper_asound)( snd_ctl_card_info_t*,const snd_ctl_card_info_t*);
+extern int (*snd_ctl_card_info_get_card_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+extern const char* (*snd_ctl_card_info_get_id_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+extern const char* (*snd_ctl_card_info_get_driver_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+extern const char* (*snd_ctl_card_info_get_name_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+extern const char* (*snd_ctl_card_info_get_longname_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+extern const char* (*snd_ctl_card_info_get_mixername_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+extern const char* (*snd_ctl_card_info_get_components_dylibloader_wrapper_asound)(const snd_ctl_card_info_t*);
+extern size_t (*snd_ctl_event_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_ctl_event_malloc_dylibloader_wrapper_asound)( snd_ctl_event_t**);
+extern void (*snd_ctl_event_free_dylibloader_wrapper_asound)( snd_ctl_event_t*);
+extern void (*snd_ctl_event_clear_dylibloader_wrapper_asound)( snd_ctl_event_t*);
+extern void (*snd_ctl_event_copy_dylibloader_wrapper_asound)( snd_ctl_event_t*,const snd_ctl_event_t*);
+extern snd_ctl_event_type_t (*snd_ctl_event_get_type_dylibloader_wrapper_asound)(const snd_ctl_event_t*);
+extern size_t (*snd_ctl_elem_list_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_ctl_elem_list_malloc_dylibloader_wrapper_asound)( snd_ctl_elem_list_t**);
+extern void (*snd_ctl_elem_list_free_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*);
+extern void (*snd_ctl_elem_list_clear_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*);
+extern void (*snd_ctl_elem_list_copy_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*,const snd_ctl_elem_list_t*);
+extern void (*snd_ctl_elem_list_set_offset_dylibloader_wrapper_asound)( snd_ctl_elem_list_t*, unsigned int);
+extern unsigned int (*snd_ctl_elem_list_get_used_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*);
+extern unsigned int (*snd_ctl_elem_list_get_count_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*);
+extern void (*snd_ctl_elem_list_get_id_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int, snd_ctl_elem_id_t*);
+extern unsigned int (*snd_ctl_elem_list_get_numid_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+extern snd_ctl_elem_iface_t (*snd_ctl_elem_list_get_interface_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+extern unsigned int (*snd_ctl_elem_list_get_device_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+extern unsigned int (*snd_ctl_elem_list_get_subdevice_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+extern const char* (*snd_ctl_elem_list_get_name_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+extern unsigned int (*snd_ctl_elem_list_get_index_dylibloader_wrapper_asound)(const snd_ctl_elem_list_t*, unsigned int);
+extern size_t (*snd_ctl_elem_info_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_ctl_elem_info_malloc_dylibloader_wrapper_asound)( snd_ctl_elem_info_t**);
+extern void (*snd_ctl_elem_info_free_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*);
+extern void (*snd_ctl_elem_info_clear_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*);
+extern void (*snd_ctl_elem_info_copy_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*,const snd_ctl_elem_info_t*);
+extern snd_ctl_elem_type_t (*snd_ctl_elem_info_get_type_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_is_readable_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_is_writable_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_is_volatile_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_is_inactive_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_is_locked_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_is_tlv_readable_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_is_tlv_writable_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_is_tlv_commandable_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_is_owner_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_is_user_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern pid_t (*snd_ctl_elem_info_get_owner_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern unsigned int (*snd_ctl_elem_info_get_count_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern long (*snd_ctl_elem_info_get_min_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern long (*snd_ctl_elem_info_get_max_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern long (*snd_ctl_elem_info_get_step_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern long long (*snd_ctl_elem_info_get_min64_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern long long (*snd_ctl_elem_info_get_max64_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern long long (*snd_ctl_elem_info_get_step64_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern unsigned int (*snd_ctl_elem_info_get_items_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern void (*snd_ctl_elem_info_set_item_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, unsigned int);
+extern const char* (*snd_ctl_elem_info_get_item_name_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_get_dimensions_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern int (*snd_ctl_elem_info_get_dimension_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*, unsigned int);
+extern int (*snd_ctl_elem_info_set_dimension_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*,const int [4]);
+extern void (*snd_ctl_elem_info_get_id_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*, snd_ctl_elem_id_t*);
+extern unsigned int (*snd_ctl_elem_info_get_numid_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern snd_ctl_elem_iface_t (*snd_ctl_elem_info_get_interface_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern unsigned int (*snd_ctl_elem_info_get_device_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern unsigned int (*snd_ctl_elem_info_get_subdevice_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern const char* (*snd_ctl_elem_info_get_name_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern unsigned int (*snd_ctl_elem_info_get_index_dylibloader_wrapper_asound)(const snd_ctl_elem_info_t*);
+extern void (*snd_ctl_elem_info_set_id_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*,const snd_ctl_elem_id_t*);
+extern void (*snd_ctl_elem_info_set_numid_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, unsigned int);
+extern void (*snd_ctl_elem_info_set_interface_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, snd_ctl_elem_iface_t);
+extern void (*snd_ctl_elem_info_set_device_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, unsigned int);
+extern void (*snd_ctl_elem_info_set_subdevice_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, unsigned int);
+extern void (*snd_ctl_elem_info_set_name_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*,const char*);
+extern void (*snd_ctl_elem_info_set_index_dylibloader_wrapper_asound)( snd_ctl_elem_info_t*, unsigned int);
+extern int (*snd_ctl_add_integer_elem_set_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*, unsigned int, unsigned int, long, long, long);
+extern int (*snd_ctl_add_integer64_elem_set_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*, unsigned int, unsigned int, long long, long long, long long);
+extern int (*snd_ctl_add_boolean_elem_set_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*, unsigned int, unsigned int);
+extern int (*snd_ctl_add_enumerated_elem_set_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*, unsigned int, unsigned int, unsigned int,const char* []);
+extern int (*snd_ctl_add_bytes_elem_set_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_info_t*, unsigned int, unsigned int);
+extern int (*snd_ctl_elem_add_integer_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, unsigned int, long, long, long);
+extern int (*snd_ctl_elem_add_integer64_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, unsigned int, long long, long long, long long);
+extern int (*snd_ctl_elem_add_boolean_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, unsigned int);
+extern int (*snd_ctl_elem_add_enumerated_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, unsigned int, unsigned int,const char* []);
+extern int (*snd_ctl_elem_add_iec958_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*);
+extern int (*snd_ctl_elem_remove_dylibloader_wrapper_asound)( snd_ctl_t*, snd_ctl_elem_id_t*);
+extern size_t (*snd_ctl_elem_value_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_ctl_elem_value_malloc_dylibloader_wrapper_asound)( snd_ctl_elem_value_t**);
+extern void (*snd_ctl_elem_value_free_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*);
+extern void (*snd_ctl_elem_value_clear_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*);
+extern void (*snd_ctl_elem_value_copy_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*,const snd_ctl_elem_value_t*);
+extern int (*snd_ctl_elem_value_compare_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*,const snd_ctl_elem_value_t*);
+extern void (*snd_ctl_elem_value_get_id_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, snd_ctl_elem_id_t*);
+extern unsigned int (*snd_ctl_elem_value_get_numid_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+extern snd_ctl_elem_iface_t (*snd_ctl_elem_value_get_interface_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+extern unsigned int (*snd_ctl_elem_value_get_device_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+extern unsigned int (*snd_ctl_elem_value_get_subdevice_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+extern const char* (*snd_ctl_elem_value_get_name_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+extern unsigned int (*snd_ctl_elem_value_get_index_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+extern void (*snd_ctl_elem_value_set_id_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*,const snd_ctl_elem_id_t*);
+extern void (*snd_ctl_elem_value_set_numid_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int);
+extern void (*snd_ctl_elem_value_set_interface_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, snd_ctl_elem_iface_t);
+extern void (*snd_ctl_elem_value_set_device_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int);
+extern void (*snd_ctl_elem_value_set_subdevice_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int);
+extern void (*snd_ctl_elem_value_set_name_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*,const char*);
+extern void (*snd_ctl_elem_value_set_index_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int);
+extern int (*snd_ctl_elem_value_get_boolean_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, unsigned int);
+extern long (*snd_ctl_elem_value_get_integer_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, unsigned int);
+extern long long (*snd_ctl_elem_value_get_integer64_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, unsigned int);
+extern unsigned int (*snd_ctl_elem_value_get_enumerated_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, unsigned int);
+extern unsigned char (*snd_ctl_elem_value_get_byte_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, unsigned int);
+extern void (*snd_ctl_elem_value_set_boolean_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int, long);
+extern void (*snd_ctl_elem_value_set_integer_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int, long);
+extern void (*snd_ctl_elem_value_set_integer64_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int, long long);
+extern void (*snd_ctl_elem_value_set_enumerated_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int, unsigned int);
+extern void (*snd_ctl_elem_value_set_byte_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, unsigned int, unsigned char);
+extern void (*snd_ctl_elem_set_bytes_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*, void*, size_t);
+extern const void* (*snd_ctl_elem_value_get_bytes_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*);
+extern void (*snd_ctl_elem_value_get_iec958_dylibloader_wrapper_asound)(const snd_ctl_elem_value_t*, snd_aes_iec958_t*);
+extern void (*snd_ctl_elem_value_set_iec958_dylibloader_wrapper_asound)( snd_ctl_elem_value_t*,const snd_aes_iec958_t*);
+extern int (*snd_tlv_parse_dB_info_dylibloader_wrapper_asound)( unsigned int*, unsigned int, unsigned int**);
+extern int (*snd_tlv_get_dB_range_dylibloader_wrapper_asound)( unsigned int*, long, long, long*, long*);
+extern int (*snd_tlv_convert_to_dB_dylibloader_wrapper_asound)( unsigned int*, long, long, long, long*);
+extern int (*snd_tlv_convert_from_dB_dylibloader_wrapper_asound)( unsigned int*, long, long, long, long*, int);
+extern int (*snd_ctl_get_dB_range_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, long*, long*);
+extern int (*snd_ctl_convert_to_dB_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, long, long*);
+extern int (*snd_ctl_convert_from_dB_dylibloader_wrapper_asound)( snd_ctl_t*,const snd_ctl_elem_id_t*, long, long*, int);
+extern int (*snd_hctl_compare_fast_dylibloader_wrapper_asound)(const snd_hctl_elem_t*,const snd_hctl_elem_t*);
+extern int (*snd_hctl_open_dylibloader_wrapper_asound)( snd_hctl_t**,const char*, int);
+extern int (*snd_hctl_open_ctl_dylibloader_wrapper_asound)( snd_hctl_t**, snd_ctl_t*);
+extern int (*snd_hctl_close_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern int (*snd_hctl_nonblock_dylibloader_wrapper_asound)( snd_hctl_t*, int);
+extern int (*snd_hctl_poll_descriptors_count_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern int (*snd_hctl_poll_descriptors_dylibloader_wrapper_asound)( snd_hctl_t*,struct pollfd*, unsigned int);
+extern int (*snd_hctl_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_hctl_t*,struct pollfd*, unsigned int, unsigned short*);
+extern unsigned int (*snd_hctl_get_count_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern int (*snd_hctl_set_compare_dylibloader_wrapper_asound)( snd_hctl_t*, snd_hctl_compare_t);
+extern snd_hctl_elem_t* (*snd_hctl_first_elem_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern snd_hctl_elem_t* (*snd_hctl_last_elem_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern snd_hctl_elem_t* (*snd_hctl_find_elem_dylibloader_wrapper_asound)( snd_hctl_t*,const snd_ctl_elem_id_t*);
+extern void (*snd_hctl_set_callback_dylibloader_wrapper_asound)( snd_hctl_t*, snd_hctl_callback_t);
+extern void (*snd_hctl_set_callback_private_dylibloader_wrapper_asound)( snd_hctl_t*, void*);
+extern void* (*snd_hctl_get_callback_private_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern int (*snd_hctl_load_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern int (*snd_hctl_free_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern int (*snd_hctl_handle_events_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern const char* (*snd_hctl_name_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern int (*snd_hctl_wait_dylibloader_wrapper_asound)( snd_hctl_t*, int);
+extern snd_ctl_t* (*snd_hctl_ctl_dylibloader_wrapper_asound)( snd_hctl_t*);
+extern snd_hctl_elem_t* (*snd_hctl_elem_next_dylibloader_wrapper_asound)( snd_hctl_elem_t*);
+extern snd_hctl_elem_t* (*snd_hctl_elem_prev_dylibloader_wrapper_asound)( snd_hctl_elem_t*);
+extern int (*snd_hctl_elem_info_dylibloader_wrapper_asound)( snd_hctl_elem_t*, snd_ctl_elem_info_t*);
+extern int (*snd_hctl_elem_read_dylibloader_wrapper_asound)( snd_hctl_elem_t*, snd_ctl_elem_value_t*);
+extern int (*snd_hctl_elem_write_dylibloader_wrapper_asound)( snd_hctl_elem_t*, snd_ctl_elem_value_t*);
+extern int (*snd_hctl_elem_tlv_read_dylibloader_wrapper_asound)( snd_hctl_elem_t*, unsigned int*, unsigned int);
+extern int (*snd_hctl_elem_tlv_write_dylibloader_wrapper_asound)( snd_hctl_elem_t*,const unsigned int*);
+extern int (*snd_hctl_elem_tlv_command_dylibloader_wrapper_asound)( snd_hctl_elem_t*,const unsigned int*);
+extern snd_hctl_t* (*snd_hctl_elem_get_hctl_dylibloader_wrapper_asound)( snd_hctl_elem_t*);
+extern void (*snd_hctl_elem_get_id_dylibloader_wrapper_asound)(const snd_hctl_elem_t*, snd_ctl_elem_id_t*);
+extern unsigned int (*snd_hctl_elem_get_numid_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+extern snd_ctl_elem_iface_t (*snd_hctl_elem_get_interface_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+extern unsigned int (*snd_hctl_elem_get_device_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+extern unsigned int (*snd_hctl_elem_get_subdevice_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+extern const char* (*snd_hctl_elem_get_name_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+extern unsigned int (*snd_hctl_elem_get_index_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+extern void (*snd_hctl_elem_set_callback_dylibloader_wrapper_asound)( snd_hctl_elem_t*, snd_hctl_elem_callback_t);
+extern void* (*snd_hctl_elem_get_callback_private_dylibloader_wrapper_asound)(const snd_hctl_elem_t*);
+extern void (*snd_hctl_elem_set_callback_private_dylibloader_wrapper_asound)( snd_hctl_elem_t*, void*);
+extern int (*snd_sctl_build_dylibloader_wrapper_asound)( snd_sctl_t**, snd_ctl_t*, snd_config_t*, snd_config_t*, int);
+extern int (*snd_sctl_free_dylibloader_wrapper_asound)( snd_sctl_t*);
+extern int (*snd_sctl_install_dylibloader_wrapper_asound)( snd_sctl_t*);
+extern int (*snd_sctl_remove_dylibloader_wrapper_asound)( snd_sctl_t*);
+extern int (*snd_mixer_open_dylibloader_wrapper_asound)( snd_mixer_t**, int);
+extern int (*snd_mixer_close_dylibloader_wrapper_asound)( snd_mixer_t*);
+extern snd_mixer_elem_t* (*snd_mixer_first_elem_dylibloader_wrapper_asound)( snd_mixer_t*);
+extern snd_mixer_elem_t* (*snd_mixer_last_elem_dylibloader_wrapper_asound)( snd_mixer_t*);
+extern int (*snd_mixer_handle_events_dylibloader_wrapper_asound)( snd_mixer_t*);
+extern int (*snd_mixer_attach_dylibloader_wrapper_asound)( snd_mixer_t*,const char*);
+extern int (*snd_mixer_attach_hctl_dylibloader_wrapper_asound)( snd_mixer_t*, snd_hctl_t*);
+extern int (*snd_mixer_detach_dylibloader_wrapper_asound)( snd_mixer_t*,const char*);
+extern int (*snd_mixer_detach_hctl_dylibloader_wrapper_asound)( snd_mixer_t*, snd_hctl_t*);
+extern int (*snd_mixer_get_hctl_dylibloader_wrapper_asound)( snd_mixer_t*,const char*, snd_hctl_t**);
+extern int (*snd_mixer_poll_descriptors_count_dylibloader_wrapper_asound)( snd_mixer_t*);
+extern int (*snd_mixer_poll_descriptors_dylibloader_wrapper_asound)( snd_mixer_t*,struct pollfd*, unsigned int);
+extern int (*snd_mixer_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_mixer_t*,struct pollfd*, unsigned int, unsigned short*);
+extern int (*snd_mixer_load_dylibloader_wrapper_asound)( snd_mixer_t*);
+extern void (*snd_mixer_free_dylibloader_wrapper_asound)( snd_mixer_t*);
+extern int (*snd_mixer_wait_dylibloader_wrapper_asound)( snd_mixer_t*, int);
+extern int (*snd_mixer_set_compare_dylibloader_wrapper_asound)( snd_mixer_t*, snd_mixer_compare_t);
+extern void (*snd_mixer_set_callback_dylibloader_wrapper_asound)( snd_mixer_t*, snd_mixer_callback_t);
+extern void* (*snd_mixer_get_callback_private_dylibloader_wrapper_asound)(const snd_mixer_t*);
+extern void (*snd_mixer_set_callback_private_dylibloader_wrapper_asound)( snd_mixer_t*, void*);
+extern unsigned int (*snd_mixer_get_count_dylibloader_wrapper_asound)(const snd_mixer_t*);
+extern int (*snd_mixer_class_unregister_dylibloader_wrapper_asound)( snd_mixer_class_t*);
+extern snd_mixer_elem_t* (*snd_mixer_elem_next_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern snd_mixer_elem_t* (*snd_mixer_elem_prev_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern void (*snd_mixer_elem_set_callback_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_elem_callback_t);
+extern void* (*snd_mixer_elem_get_callback_private_dylibloader_wrapper_asound)(const snd_mixer_elem_t*);
+extern void (*snd_mixer_elem_set_callback_private_dylibloader_wrapper_asound)( snd_mixer_elem_t*, void*);
+extern snd_mixer_elem_type_t (*snd_mixer_elem_get_type_dylibloader_wrapper_asound)(const snd_mixer_elem_t*);
+extern int (*snd_mixer_class_register_dylibloader_wrapper_asound)( snd_mixer_class_t*, snd_mixer_t*);
+extern int (*snd_mixer_elem_new_dylibloader_wrapper_asound)( snd_mixer_elem_t**, snd_mixer_elem_type_t, int, void*, void*);
+extern int (*snd_mixer_elem_add_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_class_t*);
+extern int (*snd_mixer_elem_remove_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern void (*snd_mixer_elem_free_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_elem_info_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_elem_value_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_elem_attach_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_hctl_elem_t*);
+extern int (*snd_mixer_elem_detach_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_hctl_elem_t*);
+extern int (*snd_mixer_elem_empty_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern void* (*snd_mixer_elem_get_private_dylibloader_wrapper_asound)(const snd_mixer_elem_t*);
+extern size_t (*snd_mixer_class_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_mixer_class_malloc_dylibloader_wrapper_asound)( snd_mixer_class_t**);
+extern void (*snd_mixer_class_free_dylibloader_wrapper_asound)( snd_mixer_class_t*);
+extern void (*snd_mixer_class_copy_dylibloader_wrapper_asound)( snd_mixer_class_t*,const snd_mixer_class_t*);
+extern snd_mixer_t* (*snd_mixer_class_get_mixer_dylibloader_wrapper_asound)(const snd_mixer_class_t*);
+extern snd_mixer_event_t (*snd_mixer_class_get_event_dylibloader_wrapper_asound)(const snd_mixer_class_t*);
+extern void* (*snd_mixer_class_get_private_dylibloader_wrapper_asound)(const snd_mixer_class_t*);
+extern snd_mixer_compare_t (*snd_mixer_class_get_compare_dylibloader_wrapper_asound)(const snd_mixer_class_t*);
+extern int (*snd_mixer_class_set_event_dylibloader_wrapper_asound)( snd_mixer_class_t*, snd_mixer_event_t);
+extern int (*snd_mixer_class_set_private_dylibloader_wrapper_asound)( snd_mixer_class_t*, void*);
+extern int (*snd_mixer_class_set_private_free_dylibloader_wrapper_asound)( snd_mixer_class_t*, void*);
+extern int (*snd_mixer_class_set_compare_dylibloader_wrapper_asound)( snd_mixer_class_t*, snd_mixer_compare_t);
+extern const char* (*snd_mixer_selem_channel_name_dylibloader_wrapper_asound)( snd_mixer_selem_channel_id_t);
+extern int (*snd_mixer_selem_register_dylibloader_wrapper_asound)( snd_mixer_t*,struct snd_mixer_selem_regopt*, snd_mixer_class_t**);
+extern void (*snd_mixer_selem_get_id_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_id_t*);
+extern const char* (*snd_mixer_selem_get_name_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern unsigned int (*snd_mixer_selem_get_index_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern snd_mixer_elem_t* (*snd_mixer_find_selem_dylibloader_wrapper_asound)( snd_mixer_t*,const snd_mixer_selem_id_t*);
+extern int (*snd_mixer_selem_is_active_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_is_playback_mono_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_playback_channel_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t);
+extern int (*snd_mixer_selem_is_capture_mono_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_capture_channel_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t);
+extern int (*snd_mixer_selem_get_capture_group_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_common_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_playback_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_playback_volume_joined_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_capture_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_capture_volume_joined_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_common_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_playback_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_playback_switch_joined_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_capture_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_capture_switch_joined_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_has_capture_switch_exclusive_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_ask_playback_vol_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, long*);
+extern int (*snd_mixer_selem_ask_capture_vol_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, long*);
+extern int (*snd_mixer_selem_ask_playback_dB_vol_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, int, long*);
+extern int (*snd_mixer_selem_ask_capture_dB_vol_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, int, long*);
+extern int (*snd_mixer_selem_get_playback_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long*);
+extern int (*snd_mixer_selem_get_capture_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long*);
+extern int (*snd_mixer_selem_get_playback_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long*);
+extern int (*snd_mixer_selem_get_capture_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long*);
+extern int (*snd_mixer_selem_get_playback_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, int*);
+extern int (*snd_mixer_selem_get_capture_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, int*);
+extern int (*snd_mixer_selem_set_playback_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long);
+extern int (*snd_mixer_selem_set_capture_volume_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long);
+extern int (*snd_mixer_selem_set_playback_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long, int);
+extern int (*snd_mixer_selem_set_capture_dB_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, long, int);
+extern int (*snd_mixer_selem_set_playback_volume_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long);
+extern int (*snd_mixer_selem_set_capture_volume_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long);
+extern int (*snd_mixer_selem_set_playback_dB_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, int);
+extern int (*snd_mixer_selem_set_capture_dB_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, int);
+extern int (*snd_mixer_selem_set_playback_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, int);
+extern int (*snd_mixer_selem_set_capture_switch_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, int);
+extern int (*snd_mixer_selem_set_playback_switch_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, int);
+extern int (*snd_mixer_selem_set_capture_switch_all_dylibloader_wrapper_asound)( snd_mixer_elem_t*, int);
+extern int (*snd_mixer_selem_get_playback_volume_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long*, long*);
+extern int (*snd_mixer_selem_get_playback_dB_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long*, long*);
+extern int (*snd_mixer_selem_set_playback_volume_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, long);
+extern int (*snd_mixer_selem_get_capture_volume_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long*, long*);
+extern int (*snd_mixer_selem_get_capture_dB_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long*, long*);
+extern int (*snd_mixer_selem_set_capture_volume_range_dylibloader_wrapper_asound)( snd_mixer_elem_t*, long, long);
+extern int (*snd_mixer_selem_is_enumerated_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_is_enum_playback_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_is_enum_capture_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_get_enum_items_dylibloader_wrapper_asound)( snd_mixer_elem_t*);
+extern int (*snd_mixer_selem_get_enum_item_name_dylibloader_wrapper_asound)( snd_mixer_elem_t*, unsigned int, size_t, char*);
+extern int (*snd_mixer_selem_get_enum_item_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, unsigned int*);
+extern int (*snd_mixer_selem_set_enum_item_dylibloader_wrapper_asound)( snd_mixer_elem_t*, snd_mixer_selem_channel_id_t, unsigned int);
+extern size_t (*snd_mixer_selem_id_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_mixer_selem_id_malloc_dylibloader_wrapper_asound)( snd_mixer_selem_id_t**);
+extern void (*snd_mixer_selem_id_free_dylibloader_wrapper_asound)( snd_mixer_selem_id_t*);
+extern void (*snd_mixer_selem_id_copy_dylibloader_wrapper_asound)( snd_mixer_selem_id_t*,const snd_mixer_selem_id_t*);
+extern const char* (*snd_mixer_selem_id_get_name_dylibloader_wrapper_asound)(const snd_mixer_selem_id_t*);
+extern unsigned int (*snd_mixer_selem_id_get_index_dylibloader_wrapper_asound)(const snd_mixer_selem_id_t*);
+extern void (*snd_mixer_selem_id_set_name_dylibloader_wrapper_asound)( snd_mixer_selem_id_t*,const char*);
+extern void (*snd_mixer_selem_id_set_index_dylibloader_wrapper_asound)( snd_mixer_selem_id_t*, unsigned int);
+extern int (*snd_mixer_selem_id_parse_dylibloader_wrapper_asound)( snd_mixer_selem_id_t*,const char*);
+extern int (*snd_seq_open_dylibloader_wrapper_asound)( snd_seq_t**,const char*, int, int);
+extern int (*snd_seq_open_lconf_dylibloader_wrapper_asound)( snd_seq_t**,const char*, int, int, snd_config_t*);
+extern const char* (*snd_seq_name_dylibloader_wrapper_asound)( snd_seq_t*);
+extern snd_seq_type_t (*snd_seq_type_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_close_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_poll_descriptors_count_dylibloader_wrapper_asound)( snd_seq_t*, short);
+extern int (*snd_seq_poll_descriptors_dylibloader_wrapper_asound)( snd_seq_t*,struct pollfd*, unsigned int, short);
+extern int (*snd_seq_poll_descriptors_revents_dylibloader_wrapper_asound)( snd_seq_t*,struct pollfd*, unsigned int, unsigned short*);
+extern int (*snd_seq_nonblock_dylibloader_wrapper_asound)( snd_seq_t*, int);
+extern int (*snd_seq_client_id_dylibloader_wrapper_asound)( snd_seq_t*);
+extern size_t (*snd_seq_get_output_buffer_size_dylibloader_wrapper_asound)( snd_seq_t*);
+extern size_t (*snd_seq_get_input_buffer_size_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_set_output_buffer_size_dylibloader_wrapper_asound)( snd_seq_t*, size_t);
+extern int (*snd_seq_set_input_buffer_size_dylibloader_wrapper_asound)( snd_seq_t*, size_t);
+extern size_t (*snd_seq_system_info_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_system_info_malloc_dylibloader_wrapper_asound)( snd_seq_system_info_t**);
+extern void (*snd_seq_system_info_free_dylibloader_wrapper_asound)( snd_seq_system_info_t*);
+extern void (*snd_seq_system_info_copy_dylibloader_wrapper_asound)( snd_seq_system_info_t*,const snd_seq_system_info_t*);
+extern int (*snd_seq_system_info_get_queues_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+extern int (*snd_seq_system_info_get_clients_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+extern int (*snd_seq_system_info_get_ports_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+extern int (*snd_seq_system_info_get_channels_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+extern int (*snd_seq_system_info_get_cur_clients_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+extern int (*snd_seq_system_info_get_cur_queues_dylibloader_wrapper_asound)(const snd_seq_system_info_t*);
+extern int (*snd_seq_system_info_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_system_info_t*);
+extern size_t (*snd_seq_client_info_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_client_info_malloc_dylibloader_wrapper_asound)( snd_seq_client_info_t**);
+extern void (*snd_seq_client_info_free_dylibloader_wrapper_asound)( snd_seq_client_info_t*);
+extern void (*snd_seq_client_info_copy_dylibloader_wrapper_asound)( snd_seq_client_info_t*,const snd_seq_client_info_t*);
+extern int (*snd_seq_client_info_get_client_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+extern snd_seq_client_type_t (*snd_seq_client_info_get_type_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+extern const char* (*snd_seq_client_info_get_name_dylibloader_wrapper_asound)( snd_seq_client_info_t*);
+extern int (*snd_seq_client_info_get_broadcast_filter_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+extern int (*snd_seq_client_info_get_error_bounce_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+extern int (*snd_seq_client_info_get_card_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+extern int (*snd_seq_client_info_get_pid_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+extern const unsigned char* (*snd_seq_client_info_get_event_filter_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+extern int (*snd_seq_client_info_get_num_ports_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+extern int (*snd_seq_client_info_get_event_lost_dylibloader_wrapper_asound)(const snd_seq_client_info_t*);
+extern void (*snd_seq_client_info_set_client_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+extern void (*snd_seq_client_info_set_name_dylibloader_wrapper_asound)( snd_seq_client_info_t*,const char*);
+extern void (*snd_seq_client_info_set_broadcast_filter_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+extern void (*snd_seq_client_info_set_error_bounce_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+extern void (*snd_seq_client_info_set_event_filter_dylibloader_wrapper_asound)( snd_seq_client_info_t*, unsigned char*);
+extern void (*snd_seq_client_info_event_filter_clear_dylibloader_wrapper_asound)( snd_seq_client_info_t*);
+extern void (*snd_seq_client_info_event_filter_add_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+extern void (*snd_seq_client_info_event_filter_del_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+extern int (*snd_seq_client_info_event_filter_check_dylibloader_wrapper_asound)( snd_seq_client_info_t*, int);
+extern int (*snd_seq_get_client_info_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_client_info_t*);
+extern int (*snd_seq_get_any_client_info_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_client_info_t*);
+extern int (*snd_seq_set_client_info_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_client_info_t*);
+extern int (*snd_seq_query_next_client_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_client_info_t*);
+extern size_t (*snd_seq_client_pool_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_client_pool_malloc_dylibloader_wrapper_asound)( snd_seq_client_pool_t**);
+extern void (*snd_seq_client_pool_free_dylibloader_wrapper_asound)( snd_seq_client_pool_t*);
+extern void (*snd_seq_client_pool_copy_dylibloader_wrapper_asound)( snd_seq_client_pool_t*,const snd_seq_client_pool_t*);
+extern int (*snd_seq_client_pool_get_client_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+extern size_t (*snd_seq_client_pool_get_output_pool_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+extern size_t (*snd_seq_client_pool_get_input_pool_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+extern size_t (*snd_seq_client_pool_get_output_room_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+extern size_t (*snd_seq_client_pool_get_output_free_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+extern size_t (*snd_seq_client_pool_get_input_free_dylibloader_wrapper_asound)(const snd_seq_client_pool_t*);
+extern void (*snd_seq_client_pool_set_output_pool_dylibloader_wrapper_asound)( snd_seq_client_pool_t*, size_t);
+extern void (*snd_seq_client_pool_set_input_pool_dylibloader_wrapper_asound)( snd_seq_client_pool_t*, size_t);
+extern void (*snd_seq_client_pool_set_output_room_dylibloader_wrapper_asound)( snd_seq_client_pool_t*, size_t);
+extern int (*snd_seq_get_client_pool_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_client_pool_t*);
+extern int (*snd_seq_set_client_pool_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_client_pool_t*);
+extern size_t (*snd_seq_port_info_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_port_info_malloc_dylibloader_wrapper_asound)( snd_seq_port_info_t**);
+extern void (*snd_seq_port_info_free_dylibloader_wrapper_asound)( snd_seq_port_info_t*);
+extern void (*snd_seq_port_info_copy_dylibloader_wrapper_asound)( snd_seq_port_info_t*,const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_client_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_port_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern const snd_seq_addr_t* (*snd_seq_port_info_get_addr_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern const char* (*snd_seq_port_info_get_name_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern unsigned int (*snd_seq_port_info_get_capability_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern unsigned int (*snd_seq_port_info_get_type_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_midi_channels_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_midi_voices_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_synth_voices_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_read_use_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_write_use_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_port_specified_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_timestamping_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_timestamp_real_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern int (*snd_seq_port_info_get_timestamp_queue_dylibloader_wrapper_asound)(const snd_seq_port_info_t*);
+extern void (*snd_seq_port_info_set_client_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+extern void (*snd_seq_port_info_set_port_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+extern void (*snd_seq_port_info_set_addr_dylibloader_wrapper_asound)( snd_seq_port_info_t*,const snd_seq_addr_t*);
+extern void (*snd_seq_port_info_set_name_dylibloader_wrapper_asound)( snd_seq_port_info_t*,const char*);
+extern void (*snd_seq_port_info_set_capability_dylibloader_wrapper_asound)( snd_seq_port_info_t*, unsigned int);
+extern void (*snd_seq_port_info_set_type_dylibloader_wrapper_asound)( snd_seq_port_info_t*, unsigned int);
+extern void (*snd_seq_port_info_set_midi_channels_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+extern void (*snd_seq_port_info_set_midi_voices_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+extern void (*snd_seq_port_info_set_synth_voices_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+extern void (*snd_seq_port_info_set_port_specified_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+extern void (*snd_seq_port_info_set_timestamping_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+extern void (*snd_seq_port_info_set_timestamp_real_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+extern void (*snd_seq_port_info_set_timestamp_queue_dylibloader_wrapper_asound)( snd_seq_port_info_t*, int);
+extern int (*snd_seq_create_port_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_port_info_t*);
+extern int (*snd_seq_delete_port_dylibloader_wrapper_asound)( snd_seq_t*, int);
+extern int (*snd_seq_get_port_info_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_port_info_t*);
+extern int (*snd_seq_get_any_port_info_dylibloader_wrapper_asound)( snd_seq_t*, int, int, snd_seq_port_info_t*);
+extern int (*snd_seq_set_port_info_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_port_info_t*);
+extern int (*snd_seq_query_next_port_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_port_info_t*);
+extern size_t (*snd_seq_port_subscribe_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_port_subscribe_malloc_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t**);
+extern void (*snd_seq_port_subscribe_free_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*);
+extern void (*snd_seq_port_subscribe_copy_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*,const snd_seq_port_subscribe_t*);
+extern const snd_seq_addr_t* (*snd_seq_port_subscribe_get_sender_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+extern const snd_seq_addr_t* (*snd_seq_port_subscribe_get_dest_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+extern int (*snd_seq_port_subscribe_get_queue_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+extern int (*snd_seq_port_subscribe_get_exclusive_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+extern int (*snd_seq_port_subscribe_get_time_update_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+extern int (*snd_seq_port_subscribe_get_time_real_dylibloader_wrapper_asound)(const snd_seq_port_subscribe_t*);
+extern void (*snd_seq_port_subscribe_set_sender_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*,const snd_seq_addr_t*);
+extern void (*snd_seq_port_subscribe_set_dest_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*,const snd_seq_addr_t*);
+extern void (*snd_seq_port_subscribe_set_queue_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*, int);
+extern void (*snd_seq_port_subscribe_set_exclusive_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*, int);
+extern void (*snd_seq_port_subscribe_set_time_update_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*, int);
+extern void (*snd_seq_port_subscribe_set_time_real_dylibloader_wrapper_asound)( snd_seq_port_subscribe_t*, int);
+extern int (*snd_seq_get_port_subscription_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_port_subscribe_t*);
+extern int (*snd_seq_subscribe_port_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_port_subscribe_t*);
+extern int (*snd_seq_unsubscribe_port_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_port_subscribe_t*);
+extern size_t (*snd_seq_query_subscribe_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_query_subscribe_malloc_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t**);
+extern void (*snd_seq_query_subscribe_free_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*);
+extern void (*snd_seq_query_subscribe_copy_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*,const snd_seq_query_subscribe_t*);
+extern int (*snd_seq_query_subscribe_get_client_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern int (*snd_seq_query_subscribe_get_port_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern const snd_seq_addr_t* (*snd_seq_query_subscribe_get_root_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern snd_seq_query_subs_type_t (*snd_seq_query_subscribe_get_type_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern int (*snd_seq_query_subscribe_get_index_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern int (*snd_seq_query_subscribe_get_num_subs_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern const snd_seq_addr_t* (*snd_seq_query_subscribe_get_addr_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern int (*snd_seq_query_subscribe_get_queue_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern int (*snd_seq_query_subscribe_get_exclusive_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern int (*snd_seq_query_subscribe_get_time_update_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern int (*snd_seq_query_subscribe_get_time_real_dylibloader_wrapper_asound)(const snd_seq_query_subscribe_t*);
+extern void (*snd_seq_query_subscribe_set_client_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*, int);
+extern void (*snd_seq_query_subscribe_set_port_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*, int);
+extern void (*snd_seq_query_subscribe_set_root_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*,const snd_seq_addr_t*);
+extern void (*snd_seq_query_subscribe_set_type_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*, snd_seq_query_subs_type_t);
+extern void (*snd_seq_query_subscribe_set_index_dylibloader_wrapper_asound)( snd_seq_query_subscribe_t*, int);
+extern int (*snd_seq_query_port_subscribers_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_query_subscribe_t*);
+extern size_t (*snd_seq_queue_info_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_queue_info_malloc_dylibloader_wrapper_asound)( snd_seq_queue_info_t**);
+extern void (*snd_seq_queue_info_free_dylibloader_wrapper_asound)( snd_seq_queue_info_t*);
+extern void (*snd_seq_queue_info_copy_dylibloader_wrapper_asound)( snd_seq_queue_info_t*,const snd_seq_queue_info_t*);
+extern int (*snd_seq_queue_info_get_queue_dylibloader_wrapper_asound)(const snd_seq_queue_info_t*);
+extern const char* (*snd_seq_queue_info_get_name_dylibloader_wrapper_asound)(const snd_seq_queue_info_t*);
+extern int (*snd_seq_queue_info_get_owner_dylibloader_wrapper_asound)(const snd_seq_queue_info_t*);
+extern int (*snd_seq_queue_info_get_locked_dylibloader_wrapper_asound)(const snd_seq_queue_info_t*);
+extern unsigned int (*snd_seq_queue_info_get_flags_dylibloader_wrapper_asound)(const snd_seq_queue_info_t*);
+extern void (*snd_seq_queue_info_set_name_dylibloader_wrapper_asound)( snd_seq_queue_info_t*,const char*);
+extern void (*snd_seq_queue_info_set_owner_dylibloader_wrapper_asound)( snd_seq_queue_info_t*, int);
+extern void (*snd_seq_queue_info_set_locked_dylibloader_wrapper_asound)( snd_seq_queue_info_t*, int);
+extern void (*snd_seq_queue_info_set_flags_dylibloader_wrapper_asound)( snd_seq_queue_info_t*, unsigned int);
+extern int (*snd_seq_create_queue_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_queue_info_t*);
+extern int (*snd_seq_alloc_named_queue_dylibloader_wrapper_asound)( snd_seq_t*,const char*);
+extern int (*snd_seq_alloc_queue_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_free_queue_dylibloader_wrapper_asound)( snd_seq_t*, int);
+extern int (*snd_seq_get_queue_info_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_info_t*);
+extern int (*snd_seq_set_queue_info_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_info_t*);
+extern int (*snd_seq_query_named_queue_dylibloader_wrapper_asound)( snd_seq_t*,const char*);
+extern int (*snd_seq_get_queue_usage_dylibloader_wrapper_asound)( snd_seq_t*, int);
+extern int (*snd_seq_set_queue_usage_dylibloader_wrapper_asound)( snd_seq_t*, int, int);
+extern size_t (*snd_seq_queue_status_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_queue_status_malloc_dylibloader_wrapper_asound)( snd_seq_queue_status_t**);
+extern void (*snd_seq_queue_status_free_dylibloader_wrapper_asound)( snd_seq_queue_status_t*);
+extern void (*snd_seq_queue_status_copy_dylibloader_wrapper_asound)( snd_seq_queue_status_t*,const snd_seq_queue_status_t*);
+extern int (*snd_seq_queue_status_get_queue_dylibloader_wrapper_asound)(const snd_seq_queue_status_t*);
+extern int (*snd_seq_queue_status_get_events_dylibloader_wrapper_asound)(const snd_seq_queue_status_t*);
+extern snd_seq_tick_time_t (*snd_seq_queue_status_get_tick_time_dylibloader_wrapper_asound)(const snd_seq_queue_status_t*);
+extern const snd_seq_real_time_t* (*snd_seq_queue_status_get_real_time_dylibloader_wrapper_asound)(const snd_seq_queue_status_t*);
+extern unsigned int (*snd_seq_queue_status_get_status_dylibloader_wrapper_asound)(const snd_seq_queue_status_t*);
+extern int (*snd_seq_get_queue_status_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_status_t*);
+extern size_t (*snd_seq_queue_tempo_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_queue_tempo_malloc_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t**);
+extern void (*snd_seq_queue_tempo_free_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*);
+extern void (*snd_seq_queue_tempo_copy_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*,const snd_seq_queue_tempo_t*);
+extern int (*snd_seq_queue_tempo_get_queue_dylibloader_wrapper_asound)(const snd_seq_queue_tempo_t*);
+extern unsigned int (*snd_seq_queue_tempo_get_tempo_dylibloader_wrapper_asound)(const snd_seq_queue_tempo_t*);
+extern int (*snd_seq_queue_tempo_get_ppq_dylibloader_wrapper_asound)(const snd_seq_queue_tempo_t*);
+extern unsigned int (*snd_seq_queue_tempo_get_skew_dylibloader_wrapper_asound)(const snd_seq_queue_tempo_t*);
+extern unsigned int (*snd_seq_queue_tempo_get_skew_base_dylibloader_wrapper_asound)(const snd_seq_queue_tempo_t*);
+extern void (*snd_seq_queue_tempo_set_tempo_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*, unsigned int);
+extern void (*snd_seq_queue_tempo_set_ppq_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*, int);
+extern void (*snd_seq_queue_tempo_set_skew_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*, unsigned int);
+extern void (*snd_seq_queue_tempo_set_skew_base_dylibloader_wrapper_asound)( snd_seq_queue_tempo_t*, unsigned int);
+extern int (*snd_seq_get_queue_tempo_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_tempo_t*);
+extern int (*snd_seq_set_queue_tempo_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_tempo_t*);
+extern size_t (*snd_seq_queue_timer_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_queue_timer_malloc_dylibloader_wrapper_asound)( snd_seq_queue_timer_t**);
+extern void (*snd_seq_queue_timer_free_dylibloader_wrapper_asound)( snd_seq_queue_timer_t*);
+extern void (*snd_seq_queue_timer_copy_dylibloader_wrapper_asound)( snd_seq_queue_timer_t*,const snd_seq_queue_timer_t*);
+extern int (*snd_seq_queue_timer_get_queue_dylibloader_wrapper_asound)(const snd_seq_queue_timer_t*);
+extern snd_seq_queue_timer_type_t (*snd_seq_queue_timer_get_type_dylibloader_wrapper_asound)(const snd_seq_queue_timer_t*);
+extern const snd_timer_id_t* (*snd_seq_queue_timer_get_id_dylibloader_wrapper_asound)(const snd_seq_queue_timer_t*);
+extern unsigned int (*snd_seq_queue_timer_get_resolution_dylibloader_wrapper_asound)(const snd_seq_queue_timer_t*);
+extern void (*snd_seq_queue_timer_set_type_dylibloader_wrapper_asound)( snd_seq_queue_timer_t*, snd_seq_queue_timer_type_t);
+extern void (*snd_seq_queue_timer_set_id_dylibloader_wrapper_asound)( snd_seq_queue_timer_t*,const snd_timer_id_t*);
+extern void (*snd_seq_queue_timer_set_resolution_dylibloader_wrapper_asound)( snd_seq_queue_timer_t*, unsigned int);
+extern int (*snd_seq_get_queue_timer_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_timer_t*);
+extern int (*snd_seq_set_queue_timer_dylibloader_wrapper_asound)( snd_seq_t*, int, snd_seq_queue_timer_t*);
+extern int (*snd_seq_free_event_dylibloader_wrapper_asound)( snd_seq_event_t*);
+extern ssize_t (*snd_seq_event_length_dylibloader_wrapper_asound)( snd_seq_event_t*);
+extern int (*snd_seq_event_output_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_event_t*);
+extern int (*snd_seq_event_output_buffer_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_event_t*);
+extern int (*snd_seq_event_output_direct_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_event_t*);
+extern int (*snd_seq_event_input_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_event_t**);
+extern int (*snd_seq_event_input_pending_dylibloader_wrapper_asound)( snd_seq_t*, int);
+extern int (*snd_seq_drain_output_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_event_output_pending_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_extract_output_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_event_t**);
+extern int (*snd_seq_drop_output_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_drop_output_buffer_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_drop_input_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_drop_input_buffer_dylibloader_wrapper_asound)( snd_seq_t*);
+extern size_t (*snd_seq_remove_events_sizeof_dylibloader_wrapper_asound)( void);
+extern int (*snd_seq_remove_events_malloc_dylibloader_wrapper_asound)( snd_seq_remove_events_t**);
+extern void (*snd_seq_remove_events_free_dylibloader_wrapper_asound)( snd_seq_remove_events_t*);
+extern void (*snd_seq_remove_events_copy_dylibloader_wrapper_asound)( snd_seq_remove_events_t*,const snd_seq_remove_events_t*);
+extern unsigned int (*snd_seq_remove_events_get_condition_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+extern int (*snd_seq_remove_events_get_queue_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+extern const snd_seq_timestamp_t* (*snd_seq_remove_events_get_time_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+extern const snd_seq_addr_t* (*snd_seq_remove_events_get_dest_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+extern int (*snd_seq_remove_events_get_channel_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+extern int (*snd_seq_remove_events_get_event_type_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+extern int (*snd_seq_remove_events_get_tag_dylibloader_wrapper_asound)(const snd_seq_remove_events_t*);
+extern void (*snd_seq_remove_events_set_condition_dylibloader_wrapper_asound)( snd_seq_remove_events_t*, unsigned int);
+extern void (*snd_seq_remove_events_set_queue_dylibloader_wrapper_asound)( snd_seq_remove_events_t*, int);
+extern void (*snd_seq_remove_events_set_time_dylibloader_wrapper_asound)( snd_seq_remove_events_t*,const snd_seq_timestamp_t*);
+extern void (*snd_seq_remove_events_set_dest_dylibloader_wrapper_asound)( snd_seq_remove_events_t*,const snd_seq_addr_t*);
+extern void (*snd_seq_remove_events_set_channel_dylibloader_wrapper_asound)( snd_seq_remove_events_t*, int);
+extern void (*snd_seq_remove_events_set_event_type_dylibloader_wrapper_asound)( snd_seq_remove_events_t*, int);
+extern void (*snd_seq_remove_events_set_tag_dylibloader_wrapper_asound)( snd_seq_remove_events_t*, int);
+extern int (*snd_seq_remove_events_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_remove_events_t*);
+extern void (*snd_seq_set_bit_dylibloader_wrapper_asound)( int, void*);
+extern void (*snd_seq_unset_bit_dylibloader_wrapper_asound)( int, void*);
+extern int (*snd_seq_change_bit_dylibloader_wrapper_asound)( int, void*);
+extern int (*snd_seq_get_bit_dylibloader_wrapper_asound)( int, void*);
+extern int (*snd_seq_control_queue_dylibloader_wrapper_asound)( snd_seq_t*, int, int, int, snd_seq_event_t*);
+extern int (*snd_seq_create_simple_port_dylibloader_wrapper_asound)( snd_seq_t*,const char*, unsigned int, unsigned int);
+extern int (*snd_seq_delete_simple_port_dylibloader_wrapper_asound)( snd_seq_t*, int);
+extern int (*snd_seq_connect_from_dylibloader_wrapper_asound)( snd_seq_t*, int, int, int);
+extern int (*snd_seq_connect_to_dylibloader_wrapper_asound)( snd_seq_t*, int, int, int);
+extern int (*snd_seq_disconnect_from_dylibloader_wrapper_asound)( snd_seq_t*, int, int, int);
+extern int (*snd_seq_disconnect_to_dylibloader_wrapper_asound)( snd_seq_t*, int, int, int);
+extern int (*snd_seq_set_client_name_dylibloader_wrapper_asound)( snd_seq_t*,const char*);
+extern int (*snd_seq_set_client_event_filter_dylibloader_wrapper_asound)( snd_seq_t*, int);
+extern int (*snd_seq_set_client_pool_output_dylibloader_wrapper_asound)( snd_seq_t*, size_t);
+extern int (*snd_seq_set_client_pool_output_room_dylibloader_wrapper_asound)( snd_seq_t*, size_t);
+extern int (*snd_seq_set_client_pool_input_dylibloader_wrapper_asound)( snd_seq_t*, size_t);
+extern int (*snd_seq_sync_output_queue_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_parse_address_dylibloader_wrapper_asound)( snd_seq_t*, snd_seq_addr_t*,const char*);
+extern int (*snd_seq_reset_pool_output_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_seq_reset_pool_input_dylibloader_wrapper_asound)( snd_seq_t*);
+extern int (*snd_midi_event_new_dylibloader_wrapper_asound)( size_t, snd_midi_event_t**);
+extern int (*snd_midi_event_resize_buffer_dylibloader_wrapper_asound)( snd_midi_event_t*, size_t);
+extern void (*snd_midi_event_free_dylibloader_wrapper_asound)( snd_midi_event_t*);
+extern void (*snd_midi_event_init_dylibloader_wrapper_asound)( snd_midi_event_t*);
+extern void (*snd_midi_event_reset_encode_dylibloader_wrapper_asound)( snd_midi_event_t*);
+extern void (*snd_midi_event_reset_decode_dylibloader_wrapper_asound)( snd_midi_event_t*);
+extern void (*snd_midi_event_no_status_dylibloader_wrapper_asound)( snd_midi_event_t*, int);
+extern long (*snd_midi_event_encode_dylibloader_wrapper_asound)( snd_midi_event_t*,const unsigned char*, long, snd_seq_event_t*);
+extern int (*snd_midi_event_encode_byte_dylibloader_wrapper_asound)( snd_midi_event_t*, int, snd_seq_event_t*);
+extern long (*snd_midi_event_decode_dylibloader_wrapper_asound)( snd_midi_event_t*, unsigned char*, long,const snd_seq_event_t*);
+int initialize_asound();
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp
index 5b0d2233e0..bc6079f314 100644
--- a/drivers/alsa/audio_driver_alsa.cpp
+++ b/drivers/alsa/audio_driver_alsa.cpp
@@ -37,8 +37,14 @@
#include <errno.h>
+#ifdef PULSEAUDIO_ENABLED
+extern "C" {
+extern int initialize_pulse();
+}
+#endif
+
Error AudioDriverALSA::init_device() {
- mix_rate = GLOBAL_GET("audio/mix_rate");
+ mix_rate = GLOBAL_GET("audio/driver/mix_rate");
speaker_mode = SPEAKER_MODE_STEREO;
channels = 2;
@@ -104,7 +110,7 @@ Error AudioDriverALSA::init_device() {
// In ALSA the period size seems to be the one that will determine the actual latency
// Ref: https://www.alsa-project.org/main/index.php/FramesPeriods
unsigned int periods = 2;
- int latency = GLOBAL_GET("audio/output_latency");
+ int latency = GLOBAL_GET("audio/driver/output_latency");
buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
buffer_size = buffer_frames * periods;
period_size = buffer_frames;
@@ -147,13 +153,23 @@ Error AudioDriverALSA::init_device() {
}
Error AudioDriverALSA::init() {
+#ifdef PULSEAUDIO_ENABLED
+ // On pulse enabled systems Alsa will silently use pulse.
+ // It doesn't matter if this fails as that likely means there is no pulse
+ initialize_pulse();
+#endif
+
+ if (initialize_asound()) {
+ return ERR_CANT_OPEN;
+ }
+
active = false;
thread_exited = false;
exit_thread = false;
Error err = init_device();
if (err == OK) {
- thread = Thread::create(AudioDriverALSA::thread_func, this);
+ thread.start(AudioDriverALSA::thread_func, this);
}
return err;
@@ -291,16 +307,10 @@ void AudioDriverALSA::set_device(String device) {
}
void AudioDriverALSA::lock() {
- if (!thread) {
- return;
- }
mutex.lock();
}
void AudioDriverALSA::unlock() {
- if (!thread) {
- return;
- }
mutex.unlock();
}
@@ -312,13 +322,8 @@ void AudioDriverALSA::finish_device() {
}
void AudioDriverALSA::finish() {
- if (thread) {
- exit_thread = true;
- Thread::wait_to_finish(thread);
-
- memdelete(thread);
- thread = nullptr;
- }
+ exit_thread = true;
+ thread.wait_to_finish();
finish_device();
}
diff --git a/drivers/alsa/audio_driver_alsa.h b/drivers/alsa/audio_driver_alsa.h
index 7441229704..ca97e76bc2 100644
--- a/drivers/alsa/audio_driver_alsa.h
+++ b/drivers/alsa/audio_driver_alsa.h
@@ -37,10 +37,10 @@
#include "core/os/thread.h"
#include "servers/audio_server.h"
-#include <alsa/asoundlib.h>
+#include "asound-so_wrap.h"
class AudioDriverALSA : public AudioDriver {
- Thread *thread = nullptr;
+ Thread thread;
Mutex mutex;
snd_pcm_t *pcm_handle = nullptr;
diff --git a/drivers/alsamidi/midi_driver_alsamidi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp
index 2e1034fc66..245ea07730 100644
--- a/drivers/alsamidi/midi_driver_alsamidi.cpp
+++ b/drivers/alsamidi/midi_driver_alsamidi.cpp
@@ -150,19 +150,14 @@ Error MIDIDriverALSAMidi::open() {
snd_device_name_free_hint(hints);
exit_thread = false;
- thread = Thread::create(MIDIDriverALSAMidi::thread_func, this);
+ thread.start(MIDIDriverALSAMidi::thread_func, this);
return OK;
}
void MIDIDriverALSAMidi::close() {
- if (thread) {
- exit_thread = true;
- Thread::wait_to_finish(thread);
-
- memdelete(thread);
- thread = nullptr;
- }
+ exit_thread = true;
+ thread.wait_to_finish();
for (int i = 0; i < connected_inputs.size(); i++) {
snd_rawmidi_t *midi_in = connected_inputs[i];
@@ -198,8 +193,6 @@ PackedStringArray MIDIDriverALSAMidi::get_connected_inputs() {
}
MIDIDriverALSAMidi::MIDIDriverALSAMidi() {
- thread = nullptr;
-
exit_thread = false;
}
diff --git a/drivers/alsamidi/midi_driver_alsamidi.h b/drivers/alsamidi/midi_driver_alsamidi.h
index 1ce0d397df..c327712ee7 100644
--- a/drivers/alsamidi/midi_driver_alsamidi.h
+++ b/drivers/alsamidi/midi_driver_alsamidi.h
@@ -38,11 +38,11 @@
#include "core/os/thread.h"
#include "core/templates/vector.h"
-#include <alsa/asoundlib.h>
+#include "../alsa/asound-so_wrap.h"
#include <stdio.h>
class MIDIDriverALSAMidi : public MIDIDriver {
- Thread *thread;
+ Thread thread;
Mutex mutex;
Vector<snd_rawmidi_t *> connected_inputs;
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp
index 6f88107086..baa60f5526 100644
--- a/drivers/coreaudio/audio_driver_coreaudio.cpp
+++ b/drivers/coreaudio/audio_driver_coreaudio.cpp
@@ -116,7 +116,7 @@ Error AudioDriverCoreAudio::init() {
break;
}
- mix_rate = GLOBAL_GET("audio/mix_rate");
+ mix_rate = GLOBAL_GET("audio/driver/mix_rate");
zeromem(&strdesc, sizeof(strdesc));
strdesc.mFormatID = kAudioFormatLinearPCM;
@@ -131,7 +131,7 @@ Error AudioDriverCoreAudio::init() {
result = AudioUnitSetProperty(audio_unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, kOutputBus, &strdesc, sizeof(strdesc));
ERR_FAIL_COND_V(result != noErr, FAILED);
- int latency = GLOBAL_GET("audio/output_latency");
+ int latency = GLOBAL_GET("audio/driver/output_latency");
// Sample rate is independent of channels (ref: https://stackoverflow.com/questions/11048825/audio-sample-frequency-rely-on-channels)
buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
@@ -157,7 +157,7 @@ Error AudioDriverCoreAudio::init() {
result = AudioUnitInitialize(audio_unit);
ERR_FAIL_COND_V(result != noErr, FAILED);
- if (GLOBAL_GET("audio/enable_audio_input")) {
+ if (GLOBAL_GET("audio/driver/enable_input")) {
return capture_init();
}
return OK;
@@ -403,7 +403,7 @@ Error AudioDriverCoreAudio::capture_init() {
break;
}
- mix_rate = GLOBAL_GET("audio/mix_rate");
+ mix_rate = GLOBAL_GET("audio/driver/mix_rate");
zeromem(&strdesc, sizeof(strdesc));
strdesc.mFormatID = kAudioFormatLinearPCM;
diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h
index 2507add506..a76520dcdb 100644
--- a/drivers/dummy/rasterizer_dummy.h
+++ b/drivers/dummy/rasterizer_dummy.h
@@ -66,11 +66,11 @@ public:
/* SHADOW ATLAS API */
RID shadow_atlas_create() override { return RID(); }
- void shadow_atlas_set_size(RID p_atlas, int p_size) override {}
+ void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_16_bits = false) override {}
void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) override {}
bool shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version) override { return false; }
- void directional_shadow_atlas_set_size(int p_size) override {}
+ void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = false) override {}
int get_directional_light_shadow_size(RID p_light_intance) override { return 0; }
void set_directional_shadow_count(int p_count) override {}
@@ -80,11 +80,11 @@ public:
int sdfgi_get_pending_region_count(RID p_render_buffers) const override { return 0; }
AABB sdfgi_get_pending_region_bounds(RID p_render_buffers, int p_region) const override { return AABB(); }
uint32_t sdfgi_get_pending_region_cascade(RID p_render_buffers, int p_region) const override { return 0; }
- void sdfgi_update_probes(RID p_render_buffers, RID p_environment, const Vector<RID> &p_directional_lights, const RID *p_positional_light_instances, uint32_t p_positional_light_count) override {}
/* SKY API */
- RID sky_create() override { return RID(); }
+ RID sky_allocate() override { return RID(); }
+ void sky_initialize(RID p_rid) override {}
void sky_set_radiance_size(RID p_sky, int p_radiance_size) override {}
void sky_set_mode(RID p_sky, RS::SkyMode p_samples) override {}
void sky_set_material(RID p_sky, RID p_material) override {}
@@ -92,8 +92,8 @@ public:
/* ENVIRONMENT API */
- RID environment_create() override { return RID(); }
-
+ RID environment_allocate() override { return RID(); }
+ void environment_initialize(RID p_rid) override {}
void environment_set_background(RID p_env, RS::EnvironmentBG p_bg) override {}
void environment_set_sky(RID p_env, RID p_sky) override {}
void environment_set_sky_custom_fov(RID p_env, float p_scale) override {}
@@ -112,21 +112,20 @@ public:
void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect) override {}
void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override {}
- void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, bool p_use_multibounce, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override {}
+ void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) override {}
void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) override {}
void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) override {}
+ void environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) override {}
void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) override {}
void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, bool p_use_1d_color_correction, RID p_color_correction) override {}
void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) override {}
- void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, RS::EnvVolumetricFogShadowFilter p_shadow_filter) override {}
+ void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount) override {}
void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) override {}
void environment_set_volumetric_fog_filter_active(bool p_enable) override {}
- void environment_set_volumetric_fog_directional_shadow_shrink_size(int p_shrink_size) override {}
- void environment_set_volumetric_fog_positional_shadow_shrink_size(int p_shrink_size) override {}
Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) override { return Ref<Image>(); }
@@ -134,8 +133,8 @@ public:
RS::EnvironmentBG environment_get_background(RID p_env) const override { return RS::ENV_BG_KEEP; }
int environment_get_canvas_max_layer(RID p_env) const override { return 0; }
- RID camera_effects_create() override { return RID(); }
-
+ RID camera_effects_allocate() override { return RID(); }
+ void camera_effects_initialize(RID p_rid) override {}
void camera_effects_set_dof_blur_quality(RS::DOFBlurQuality p_quality, bool p_use_jitter) override {}
void camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokehShape p_shape) override {}
@@ -176,11 +175,8 @@ public:
void gi_probe_set_quality(RS::GIProbeQuality) override {}
- void render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold) override {}
- void render_shadow(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<GeometryInstance *> &p_instances, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0, float p_screen_lod_threshold = 0.0) override {}
+ void render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr) override {}
void render_material(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) override {}
- void render_sdfgi(RID p_render_buffers, int p_region, const PagedArray<GeometryInstance *> &p_instances) override {}
- void render_sdfgi_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const PagedArray<RID> *p_positional_lights) override {}
void render_particle_collider_heightfield(RID p_collider, const Transform &p_transform, const PagedArray<GeometryInstance *> &p_instances) override {}
void set_scene_pass(uint64_t p_pass) override {}
@@ -189,6 +185,7 @@ public:
RID render_buffers_create() override { return RID(); }
void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_width, int p_height, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_debanding) override {}
+ void gi_set_use_half_resolution(bool p_enable) override {}
void screen_space_roughness_limiter_set_active(bool p_enable, float p_amount, float p_curve) override {}
bool screen_space_roughness_limiter_is_active() const override { return false; }
@@ -210,61 +207,48 @@ public:
class RasterizerStorageDummy : public RendererStorage {
public:
+ bool can_create_resources_async() const override { return false; }
+
/* TEXTURE API */
struct DummyTexture {
- int width = 0;
- int height = 0;
- uint32_t flags = 0;
- Image::Format format = Image::Format::FORMAT_MAX;
Ref<Image> image;
- String path;
- };
-
- struct DummySurface {
- uint32_t format = 0;
- RS::PrimitiveType primitive = RS::PrimitiveType::PRIMITIVE_MAX;
- Vector<uint8_t> array;
- int vertex_count = 0;
- Vector<uint8_t> index_array;
- int index_count = 0;
- AABB aabb;
- Vector<Vector<uint8_t>> blend_shapes;
- Vector<AABB> bone_aabbs;
- };
-
- struct DummyMesh {
- Vector<DummySurface> surfaces;
- int blend_shape_count = 0;
- RS::BlendShapeMode blend_shape_mode = RS::BlendShapeMode::BLEND_SHAPE_MODE_NORMALIZED;
};
-
mutable RID_PtrOwner<DummyTexture> texture_owner;
- mutable RID_PtrOwner<DummyMesh> mesh_owner;
- RID texture_2d_create(const Ref<Image> &p_image) override { return RID(); }
- RID texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type) override { return RID(); }
- RID texture_3d_create(Image::Format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data) override { return RID(); }
- RID texture_proxy_create(RID p_base) override { return RID(); }
+ RID texture_allocate() override {
+ DummyTexture *texture = memnew(DummyTexture);
+ ERR_FAIL_COND_V(!texture, RID());
+ return texture_owner.make_rid(texture);
+ }
+ void texture_2d_initialize(RID p_texture, const Ref<Image> &p_image) override {
+ DummyTexture *t = texture_owner.getornull(p_texture);
+ ERR_FAIL_COND(!t);
+ t->image = p_image->duplicate();
+ }
+ void texture_2d_layered_initialize(RID p_texture, const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type) override {}
void texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) override {}
void texture_2d_update(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) override {}
+ void texture_3d_initialize(RID p_texture, Image::Format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data) override {}
void texture_3d_update(RID p_texture, const Vector<Ref<Image>> &p_data) override {}
+ void texture_proxy_initialize(RID p_texture, RID p_base) override {}
void texture_proxy_update(RID p_proxy, RID p_base) override {}
- RID texture_2d_placeholder_create() override { return RID(); }
- RID texture_2d_layered_placeholder_create(RenderingServer::TextureLayeredType p_layered_type) override { return RID(); }
- RID texture_3d_placeholder_create() override { return RID(); }
+ void texture_2d_placeholder_initialize(RID p_texture) override {}
+ void texture_2d_layered_placeholder_initialize(RID p_texture, RenderingServer::TextureLayeredType p_layered_type) override {}
+ void texture_3d_placeholder_initialize(RID p_texture) override {}
+
+ Ref<Image> texture_2d_get(RID p_texture) const override {
+ DummyTexture *t = texture_owner.getornull(p_texture);
+ ERR_FAIL_COND_V(!t, Ref<Image>());
+ return t->image;
+ }
- Ref<Image> texture_2d_get(RID p_texture) const override { return Ref<Image>(); }
Ref<Image> texture_2d_layer_get(RID p_texture, int p_layer) const override { return Ref<Image>(); }
Vector<Ref<Image>> texture_3d_get(RID p_texture) const override { return Vector<Ref<Image>>(); }
void texture_replace(RID p_texture, RID p_by_texture) override {}
void texture_set_size_override(RID p_texture, int p_width, int p_height) override {}
-// FIXME: Disabled during Vulkan refactoring, should be ported.
-#if 0
- void texture_bind(RID p_texture, uint32_t p_texture_no) = 0;
-#endif
void texture_set_path(RID p_texture, const String &p_path) override {}
String texture_get_path(RID p_texture) const override { return String(); }
@@ -282,113 +266,18 @@ public:
/* CANVAS TEXTURE API */
- RID canvas_texture_create() override { return RID(); }
+ RID canvas_texture_allocate() override { return RID(); }
+ void canvas_texture_initialize(RID p_rid) override {}
void canvas_texture_set_channel(RID p_canvas_texture, RS::CanvasTextureChannel p_channel, RID p_texture) override {}
void canvas_texture_set_shading_parameters(RID p_canvas_texture, const Color &p_base_color, float p_shininess) override {}
void canvas_texture_set_texture_filter(RID p_item, RS::CanvasItemTextureFilter p_filter) override {}
void canvas_texture_set_texture_repeat(RID p_item, RS::CanvasItemTextureRepeat p_repeat) override {}
-#if 0
- RID texture_create() override {
- DummyTexture *texture = memnew(DummyTexture);
- ERR_FAIL_COND_V(!texture, RID());
- return texture_owner.make_rid(texture);
- }
-
- void texture_allocate(RID p_texture, int p_width, int p_height, int p_depth_3d, Image::Format p_format, RenderingServer::TextureType p_type = RS::TEXTURE_TYPE_2D, uint32_t p_flags = RS::TEXTURE_FLAGS_DEFAULT) override {
- DummyTexture *t = texture_owner.getornull(p_texture);
- ERR_FAIL_COND(!t);
- t->width = p_width;
- t->height = p_height;
- t->flags = p_flags;
- t->format = p_format;
- t->image = Ref<Image>(memnew(Image));
- t->image->create(p_width, p_height, false, p_format);
- }
- void texture_set_data(RID p_texture, const Ref<Image> &p_image, int p_level) override {
- DummyTexture *t = texture_owner.getornull(p_texture);
- ERR_FAIL_COND(!t);
- t->width = p_image->get_width();
- t->height = p_image->get_height();
- t->format = p_image->get_format();
- t->image->create(t->width, t->height, false, t->format, p_image->get_data());
- }
-
- void texture_set_data_partial(RID p_texture, const Ref<Image> &p_image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int p_dst_mip, int p_level) override {
- DummyTexture *t = texture_owner.getornull(p_texture);
-
- ERR_FAIL_COND(!t);
- ERR_FAIL_COND_MSG(p_image.is_null(), "It's not a reference to a valid Image object.");
- ERR_FAIL_COND(t->format != p_image->get_format());
- ERR_FAIL_COND(src_w <= 0 || src_h <= 0);
- ERR_FAIL_COND(src_x < 0 || src_y < 0 || src_x + src_w > p_image->get_width() || src_y + src_h > p_image->get_height());
- ERR_FAIL_COND(dst_x < 0 || dst_y < 0 || dst_x + src_w > t->width || dst_y + src_h > t->height);
-
- t->image->blit_rect(p_image, Rect2(src_x, src_y, src_w, src_h), Vector2(dst_x, dst_y));
- }
-
- Ref<Image> texture_get_data(RID p_texture, int p_level) const override {
- DummyTexture *t = texture_owner.getornull(p_texture);
- ERR_FAIL_COND_V(!t, Ref<Image>());
- return t->image;
- }
- void texture_set_flags(RID p_texture, uint32_t p_flags) override {
- DummyTexture *t = texture_owner.getornull(p_texture);
- ERR_FAIL_COND(!t);
- t->flags = p_flags;
- }
- uint32_t texture_get_flags(RID p_texture) const override {
- DummyTexture *t = texture_owner.getornull(p_texture);
- ERR_FAIL_COND_V(!t, 0);
- return t->flags;
- }
- Image::Format texture_get_format(RID p_texture) const override {
- DummyTexture *t = texture_owner.getornull(p_texture);
- ERR_FAIL_COND_V(!t, Image::FORMAT_RGB8);
- return t->format;
- }
-
- RenderingServer::TextureType texture_get_type(RID p_texture) const override { return RS::TEXTURE_TYPE_2D; }
- uint32_t texture_get_texid(RID p_texture) const override { return 0; }
- uint32_t texture_get_width(RID p_texture) const override { return 0; }
- uint32_t texture_get_height(RID p_texture) const override { return 0; }
- uint32_t texture_get_depth(RID p_texture) const override { return 0; }
- void texture_set_size_override(RID p_texture, int p_width, int p_height, int p_depth_3d) override {}
- void texture_bind(RID p_texture, uint32_t p_texture_no) override {}
-
- void texture_set_path(RID p_texture, const String &p_path) override {
- DummyTexture *t = texture_owner.getornull(p_texture);
- ERR_FAIL_COND(!t);
- t->path = p_path;
- }
- String texture_get_path(RID p_texture) const override {
- DummyTexture *t = texture_owner.getornull(p_texture);
- ERR_FAIL_COND_V(!t, String());
- return t->path;
- }
-
- void texture_set_shrink_all_x2_on_set_data(bool p_enable) override {}
-
- void texture_debug_usage(List<RS::TextureInfo> *r_info) override {}
-
- RID texture_create_radiance_cubemap(RID p_source, int p_resolution = -1) const override { return RID(); }
-
- void texture_set_detect_3d_callback(RID p_texture, RenderingServer::TextureDetectCallback p_callback, void *p_userdata) override {}
- void texture_set_detect_srgb_callback(RID p_texture, RenderingServer::TextureDetectCallback p_callback, void *p_userdata) override {}
- void texture_set_detect_normal_callback(RID p_texture, RenderingServer::TextureDetectCallback p_callback, void *p_userdata) override {}
-
- void textures_keep_original(bool p_enable) override {}
-
- void texture_set_proxy(RID p_proxy, RID p_base) override {}
- Size2 texture_size_with_proxy(RID p_texture) const override { return Size2(); }
- void texture_set_force_redraw_if_visible(RID p_texture, bool p_enable) override {}
-#endif
-
/* SHADER API */
- RID shader_create() override { return RID(); }
-
+ RID shader_allocate() override { return RID(); }
+ void shader_initialize(RID p_rid) override {}
void shader_set_code(RID p_shader, const String &p_code) override {}
String shader_get_code(RID p_shader) const override { return ""; }
void shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const override {}
@@ -401,8 +290,8 @@ public:
/* COMMON MATERIAL API */
- RID material_create() override { return RID(); }
-
+ RID material_allocate() override { return RID(); }
+ void material_initialize(RID p_rid) override {}
void material_set_render_priority(RID p_material, int priority) override {}
void material_set_shader(RID p_shader_material, RID p_shader) override {}
@@ -418,14 +307,8 @@ public:
/* MESH API */
- RID mesh_create() override {
- DummyMesh *mesh = memnew(DummyMesh);
- ERR_FAIL_COND_V(!mesh, RID());
- mesh->blend_shape_count = 0;
- mesh->blend_shape_mode = RS::BLEND_SHAPE_MODE_NORMALIZED;
- return mesh_owner.make_rid(mesh);
- }
-
+ RID mesh_allocate() override { return RID(); }
+ void mesh_initialize(RID p_rid) override {}
void mesh_set_blend_shape_count(RID p_mesh, int p_blend_shape_count) override {}
bool mesh_needs_instance(RID p_mesh, bool p_has_skeleton) override { return false; }
RID mesh_instance_create(RID p_base) override { return RID(); }
@@ -438,139 +321,31 @@ public:
void mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) override {}
-#if 0
- void mesh_add_surface(RID p_mesh, uint32_t p_format, RS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>()) override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND(!m);
-
- m->surfaces.push_back(DummySurface());
- DummySurface *s = &m->surfaces.write[m->surfaces.size() - 1];
- s->format = p_format;
- s->primitive = p_primitive;
- s->array = p_array;
- s->vertex_count = p_vertex_count;
- s->index_array = p_index_array;
- s->index_count = p_index_count;
- s->aabb = p_aabb;
- s->blend_shapes = p_blend_shapes;
- s->bone_aabbs = p_bone_aabbs;
- }
-
- void mesh_set_blend_shape_count(RID p_mesh, int p_amount) override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND(!m);
- m->blend_shape_count = p_amount;
- }
-#endif
-
- int mesh_get_blend_shape_count(RID p_mesh) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, 0);
- return m->blend_shape_count;
- }
+ int mesh_get_blend_shape_count(RID p_mesh) const override { return 0; }
- void mesh_set_blend_shape_mode(RID p_mesh, RS::BlendShapeMode p_mode) override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND(!m);
- m->blend_shape_mode = p_mode;
- }
- RS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, RS::BLEND_SHAPE_MODE_NORMALIZED);
- return m->blend_shape_mode;
- }
+ void mesh_set_blend_shape_mode(RID p_mesh, RS::BlendShapeMode p_mode) override {}
+ RS::BlendShapeMode mesh_get_blend_shape_mode(RID p_mesh) const override { return RS::BLEND_SHAPE_MODE_NORMALIZED; }
void mesh_surface_update_region(RID p_mesh, int p_surface, int p_offset, const Vector<uint8_t> &p_data) override {}
void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material) override {}
RID mesh_surface_get_material(RID p_mesh, int p_surface) const override { return RID(); }
-#if 0
- int mesh_surface_get_array_len(RID p_mesh, int p_surface) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, 0);
-
- return m->surfaces[p_surface].vertex_count;
- }
- int mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, 0);
-
- return m->surfaces[p_surface].index_count;
- }
-
- Vector<uint8_t> mesh_surface_get_array(RID p_mesh, int p_surface) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, Vector<uint8_t>());
-
- return m->surfaces[p_surface].array;
- }
- Vector<uint8_t> mesh_surface_get_index_array(RID p_mesh, int p_surface) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, Vector<uint8_t>());
-
- return m->surfaces[p_surface].index_array;
- }
-
- uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, 0);
-
- return m->surfaces[p_surface].format;
- }
- RS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, RS::PRIMITIVE_POINTS);
-
- return m->surfaces[p_surface].primitive;
- }
-
- AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, AABB());
-
- return m->surfaces[p_surface].aabb;
- }
- Vector<Vector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, Vector<Vector<uint8_t> >());
-
- return m->surfaces[p_surface].blend_shapes;
- }
- Vector<AABB> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, Vector<AABB>());
-
- return m->surfaces[p_surface].bone_aabbs;
- }
-
- void mesh_remove_surface(RID p_mesh, int p_index) override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND(!m);
- ERR_FAIL_COND(p_index >= m->surfaces.size());
-
- m->surfaces.remove(p_index);
- }
-#endif
-
RS::SurfaceData mesh_get_surface(RID p_mesh, int p_surface) const override { return RS::SurfaceData(); }
- int mesh_get_surface_count(RID p_mesh) const override {
- DummyMesh *m = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!m, 0);
- return m->surfaces.size();
- }
+ int mesh_get_surface_count(RID p_mesh) const override { return 0; }
void mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) override {}
AABB mesh_get_custom_aabb(RID p_mesh) const override { return AABB(); }
AABB mesh_get_aabb(RID p_mesh, RID p_skeleton = RID()) override { return AABB(); }
+ void mesh_set_shadow_mesh(RID p_mesh, RID p_shadow_mesh) override {}
void mesh_clear(RID p_mesh) override {}
/* MULTIMESH API */
- RID multimesh_create() override { return RID(); }
-
- void multimesh_allocate(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false) override {}
+ RID multimesh_allocate() override { return RID(); }
+ void multimesh_initialize(RID p_rid) override {}
+ void multimesh_allocate_data(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false) override {}
int multimesh_get_instance_count(RID p_multimesh) const override { return 0; }
void multimesh_set_mesh(RID p_multimesh, RID p_mesh) override {}
@@ -594,7 +369,8 @@ public:
/* IMMEDIATE API */
- RID immediate_create() override { return RID(); }
+ RID immediate_allocate() override { return RID(); }
+ void immediate_initialize(RID p_rid) override {}
void immediate_begin(RID p_immediate, RS::PrimitiveType p_rimitive, RID p_texture = RID()) override {}
void immediate_vertex(RID p_immediate, const Vector3 &p_vertex) override {}
void immediate_normal(RID p_immediate, const Vector3 &p_normal) override {}
@@ -610,8 +386,9 @@ public:
/* SKELETON API */
- RID skeleton_create() override { return RID(); }
- void skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) override {}
+ RID skeleton_allocate() override { return RID(); }
+ void skeleton_initialize(RID p_rid) override {}
+ void skeleton_allocate_data(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) override {}
void skeleton_set_base_transform_2d(RID p_skeleton, const Transform2D &p_base_transform) override {}
int skeleton_get_bone_count(RID p_skeleton) const override { return 0; }
void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform) override {}
@@ -621,7 +398,14 @@ public:
/* Light API */
- RID light_create(RS::LightType p_type) override { return RID(); }
+ RID directional_light_allocate() override { return RID(); }
+ void directional_light_initialize(RID p_rid) override {}
+ RID omni_light_allocate() override { return RID(); }
+ void omni_light_initialize(RID p_rid) override {}
+ RID spot_light_allocate() override { return RID(); }
+ void spot_light_initialize(RID p_rid) override {}
+ RID reflection_probe_allocate() override { return RID(); }
+ void reflection_probe_initialize(RID p_rid) override {}
void light_set_color(RID p_light, const Color &p_color) override {}
void light_set_param(RID p_light, RS::LightParam p_param, float p_value) override {}
@@ -659,8 +443,6 @@ public:
/* PROBE API */
- RID reflection_probe_create() override { return RID(); }
-
void reflection_probe_set_update_mode(RID p_probe, RS::ReflectionProbeUpdateMode p_mode) override {}
void reflection_probe_set_intensity(RID p_probe, float p_intensity) override {}
void reflection_probe_set_ambient_mode(RID p_probe, RS::ReflectionProbeAmbientMode p_mode) override {}
@@ -688,7 +470,8 @@ public:
/* DECAL API */
- RID decal_create() override { return RID(); }
+ RID decal_allocate() override { return RID(); }
+ void decal_initialize(RID p_rid) override {}
void decal_set_extents(RID p_decal, const Vector3 &p_extents) override {}
void decal_set_texture(RID p_decal, RS::DecalTexture p_type, RID p_texture) override {}
void decal_set_emission_energy(RID p_decal, float p_energy) override {}
@@ -703,9 +486,9 @@ public:
/* GI PROBE API */
- RID gi_probe_create() override { return RID(); }
-
- void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) override {}
+ RID gi_probe_allocate() override { return RID(); }
+ void gi_probe_initialize(RID p_rid) override {}
+ void gi_probe_allocate_data(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) override {}
AABB gi_probe_get_bounds(RID p_gi_probe) const override { return AABB(); }
Vector3i gi_probe_get_octree_size(RID p_gi_probe) const override { return Vector3i(); }
@@ -749,72 +532,8 @@ public:
uint32_t gi_probe_get_version(RID p_gi_probe) override { return 0; }
/* LIGHTMAP CAPTURE */
-#if 0
- struct Instantiable {
- SelfList<RendererSceneRender::GeometryInstance>::List instance_list;
-
- _FORCE_INLINE_ void instance_change_notify(bool p_aabb = true, bool p_materials = true) override {
- SelfList<RendererSceneRender::GeometryInstance> *instances = instance_list.first();
- while (instances) override {
- //instances->self()->base_changed(p_aabb, p_materials);
- instances = instances->next();
- }
- }
-
- _FORCE_INLINE_ void instance_remove_deps() override {
- SelfList<RendererSceneRender::GeometryInstance> *instances = instance_list.first();
- while (instances) override {
- SelfList<RendererSceneRender::GeometryInstance> *next = instances->next();
- //instances->self()->base_removed();
- instances = next;
- }
- }
-
- Instantiable() override {}
- ~Instantiable() override {
- }
- };
-
- struct LightmapCapture : public Instantiable {
- Vector<LightmapCaptureOctree> octree;
- AABB bounds;
- Transform cell_xform;
- int cell_subdiv;
- float energy;
- LightmapCapture() override {
- energy = 1.0;
- cell_subdiv = 1;
- }
- };
-
- mutable RID_PtrOwner<LightmapCapture> lightmap_capture_data_owner;
- void lightmap_capture_set_bounds(RID p_capture, const AABB &p_bounds) override {}
- AABB lightmap_capture_get_bounds(RID p_capture) const override { return AABB(); }
- void lightmap_capture_set_octree(RID p_capture, const Vector<uint8_t> &p_octree) override {}
- RID lightmap_capture_create() override {
- LightmapCapture *capture = memnew(LightmapCapture);
- return lightmap_capture_data_owner.make_rid(capture);
- }
- Vector<uint8_t> lightmap_capture_get_octree(RID p_capture) const override {
- const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture);
- ERR_FAIL_COND_V(!capture, Vector<uint8_t>());
- return Vector<uint8_t>();
- }
- void lightmap_capture_set_octree_cell_transform(RID p_capture, const Transform &p_xform) override {}
- Transform lightmap_capture_get_octree_cell_transform(RID p_capture) const override { return Transform(); }
- void lightmap_capture_set_octree_cell_subdiv(RID p_capture, int p_subdiv) override {}
- int lightmap_capture_get_octree_cell_subdiv(RID p_capture) const override { return 0; }
- void lightmap_capture_set_energy(RID p_capture, float p_energy) override {}
- float lightmap_capture_get_energy(RID p_capture) const override { return 0.0; }
- const Vector<LightmapCaptureOctree> *lightmap_capture_get_octree_ptr(RID p_capture) const override {
- const LightmapCapture *capture = lightmap_capture_data_owner.getornull(p_capture);
- ERR_FAIL_COND_V(!capture, nullptr);
- return &capture->octree;
- }
-#endif
-
- RID lightmap_create() override { return RID(); }
-
+ RID lightmap_allocate() override { return RID(); }
+ void lightmap_initialize(RID p_rid) override {}
void lightmap_set_textures(RID p_lightmap, RID p_light, bool p_uses_spherical_haromics) override {}
void lightmap_set_probe_bounds(RID p_lightmap, const AABB &p_bounds) override {}
void lightmap_set_probe_interior(RID p_lightmap, bool p_interior) override {}
@@ -831,8 +550,8 @@ public:
/* PARTICLES */
- RID particles_create() override { return RID(); }
-
+ RID particles_allocate() override { return RID(); }
+ void particles_initialize(RID p_rid) override {}
void particles_emit(RID p_particles, const Transform &p_transform, const Vector3 &p_velocity, const Color &p_color, const Color &p_custom, uint32_t p_emit_flags) override {}
void particles_set_emitting(RID p_particles, bool p_emitting) override {}
void particles_set_amount(RID p_particles, int p_amount) override {}
@@ -874,7 +593,8 @@ public:
/* PARTICLES COLLISION */
- RID particles_collision_create() override { return RID(); }
+ RID particles_collision_allocate() override { return RID(); }
+ void particles_collision_initialize(RID p_rid) override {}
void particles_collision_set_collision_type(RID p_particles_collision, RS::ParticlesCollisionType p_type) override {}
void particles_collision_set_cull_mask(RID p_particles_collision, uint32_t p_cull_mask) override {}
void particles_collision_set_sphere_radius(RID p_particles_collision, float p_radius) override {}
@@ -933,14 +653,7 @@ public:
void render_target_set_sdf_size_and_scale(RID p_render_target, RS::ViewportSDFOversize p_size, RS::ViewportSDFScale p_scale) override {}
Rect2i render_target_get_sdf_rect(RID p_render_target) const override { return Rect2i(); }
- RS::InstanceType get_base_type(RID p_rid) const override {
- if (mesh_owner.owns(p_rid)) {
- return RS::INSTANCE_MESH;
- }
-
- return RS::INSTANCE_NONE;
- }
-
+ RS::InstanceType get_base_type(RID p_rid) const override { return RS::INSTANCE_NONE; }
bool free(RID p_rid) override {
if (texture_owner.owns(p_rid)) {
// delete the texture
@@ -948,13 +661,6 @@ public:
texture_owner.free(p_rid);
memdelete(texture);
}
-
- if (mesh_owner.owns(p_rid)) {
- // delete the mesh
- DummyMesh *mesh = mesh_owner.getornull(p_rid);
- mesh_owner.free(p_rid);
- memdelete(mesh);
- }
return true;
}
diff --git a/drivers/dummy/texture_loader_dummy.cpp b/drivers/dummy/texture_loader_dummy.cpp
index 2484e6d140..f148e42845 100644
--- a/drivers/dummy/texture_loader_dummy.cpp
+++ b/drivers/dummy/texture_loader_dummy.cpp
@@ -35,7 +35,7 @@
#include <string.h>
-RES ResourceFormatDummyTexture::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatDummyTexture::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
unsigned int width = 8;
unsigned int height = 8;
diff --git a/drivers/dummy/texture_loader_dummy.h b/drivers/dummy/texture_loader_dummy.h
index 3b71b5824f..00e6b9cc53 100644
--- a/drivers/dummy/texture_loader_dummy.h
+++ b/drivers/dummy/texture_loader_dummy.h
@@ -36,7 +36,7 @@
class ResourceFormatDummyTexture : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/drivers/pulseaudio/SCsub b/drivers/pulseaudio/SCsub
index 91e1140b75..467d1448dc 100644
--- a/drivers/pulseaudio/SCsub
+++ b/drivers/pulseaudio/SCsub
@@ -2,4 +2,7 @@
Import("env")
+if "pulseaudio" in env and env["pulseaudio"]:
+ env.add_source_files(env.drivers_sources, "pulse-so_wrap.c")
+
env.add_source_files(env.drivers_sources, "*.cpp")
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
index 440b7d7f53..01bed4e735 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
@@ -179,7 +179,7 @@ Error AudioDriverPulseAudio::init_device() {
break;
}
- int latency = GLOBAL_GET("audio/output_latency");
+ int latency = GLOBAL_GET("audio/driver/output_latency");
buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
pa_buffer_size = buffer_frames * pa_map.channels;
@@ -233,11 +233,15 @@ Error AudioDriverPulseAudio::init_device() {
}
Error AudioDriverPulseAudio::init() {
+ if (initialize_pulse()) {
+ return ERR_CANT_OPEN;
+ }
+
active = false;
thread_exited = false;
exit_thread = false;
- mix_rate = GLOBAL_GET("audio/mix_rate");
+ mix_rate = GLOBAL_GET("audio/driver/mix_rate");
pa_ml = pa_mainloop_new();
ERR_FAIL_COND_V(pa_ml == nullptr, ERR_CANT_OPEN);
@@ -287,7 +291,7 @@ Error AudioDriverPulseAudio::init() {
Error err = init_device();
if (err == OK) {
- thread = Thread::create(AudioDriverPulseAudio::thread_func, this);
+ thread.start(AudioDriverPulseAudio::thread_func, this);
}
return OK;
@@ -581,16 +585,10 @@ void AudioDriverPulseAudio::set_device(String device) {
}
void AudioDriverPulseAudio::lock() {
- if (!thread) {
- return;
- }
mutex.lock();
}
void AudioDriverPulseAudio::unlock() {
- if (!thread) {
- return;
- }
mutex.unlock();
}
@@ -603,12 +601,12 @@ void AudioDriverPulseAudio::finish_device() {
}
void AudioDriverPulseAudio::finish() {
- if (!thread) {
+ if (!thread.is_started()) {
return;
}
exit_thread = true;
- Thread::wait_to_finish(thread);
+ thread.wait_to_finish();
finish_device();
@@ -622,10 +620,6 @@ void AudioDriverPulseAudio::finish() {
pa_mainloop_free(pa_ml);
pa_ml = nullptr;
}
-
- memdelete(thread);
-
- thread = nullptr;
}
Error AudioDriverPulseAudio::capture_init_device() {
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.h b/drivers/pulseaudio/audio_driver_pulseaudio.h
index 71ab2ef1c8..fa9b573d94 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.h
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.h
@@ -37,10 +37,10 @@
#include "core/os/thread.h"
#include "servers/audio_server.h"
-#include <pulse/pulseaudio.h>
+#include "pulse-so_wrap.h"
class AudioDriverPulseAudio : public AudioDriver {
- Thread *thread = nullptr;
+ Thread thread;
Mutex mutex;
pa_mainloop *pa_ml = nullptr;
diff --git a/drivers/pulseaudio/pulse-so_wrap.c b/drivers/pulseaudio/pulse-so_wrap.c
new file mode 100644
index 0000000000..fdb002a2e5
--- /dev/null
+++ b/drivers/pulseaudio/pulse-so_wrap.c
@@ -0,0 +1,3232 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by /home/hp/Projects/godot/pulse/generate-wrapper.py 0.2 on 2021-02-18 00:19:07
+// flags: /home/hp/Projects/godot/pulse/generate-wrapper.py --include /usr/include/pulse/pulseaudio.h --sys-include <pulse/pulseaudio.h> --soname libpulse.so.0 --omit-prefix _pa_ --init-name pulse --output-header pulse-so_wrap.h --output-implementation pulse-so_wrap.c
+//
+#define pa_get_library_version pa_get_library_version_dylibloader_orig_pulse
+#define pa_bytes_per_second pa_bytes_per_second_dylibloader_orig_pulse
+#define pa_frame_size pa_frame_size_dylibloader_orig_pulse
+#define pa_sample_size pa_sample_size_dylibloader_orig_pulse
+#define pa_sample_size_of_format pa_sample_size_of_format_dylibloader_orig_pulse
+#define pa_bytes_to_usec pa_bytes_to_usec_dylibloader_orig_pulse
+#define pa_usec_to_bytes pa_usec_to_bytes_dylibloader_orig_pulse
+#define pa_sample_spec_init pa_sample_spec_init_dylibloader_orig_pulse
+#define pa_sample_format_valid pa_sample_format_valid_dylibloader_orig_pulse
+#define pa_sample_rate_valid pa_sample_rate_valid_dylibloader_orig_pulse
+#define pa_channels_valid pa_channels_valid_dylibloader_orig_pulse
+#define pa_sample_spec_valid pa_sample_spec_valid_dylibloader_orig_pulse
+#define pa_sample_spec_equal pa_sample_spec_equal_dylibloader_orig_pulse
+#define pa_sample_format_to_string pa_sample_format_to_string_dylibloader_orig_pulse
+#define pa_parse_sample_format pa_parse_sample_format_dylibloader_orig_pulse
+#define pa_sample_spec_snprint pa_sample_spec_snprint_dylibloader_orig_pulse
+#define pa_bytes_snprint pa_bytes_snprint_dylibloader_orig_pulse
+#define pa_sample_format_is_le pa_sample_format_is_le_dylibloader_orig_pulse
+#define pa_sample_format_is_be pa_sample_format_is_be_dylibloader_orig_pulse
+#define pa_direction_valid pa_direction_valid_dylibloader_orig_pulse
+#define pa_direction_to_string pa_direction_to_string_dylibloader_orig_pulse
+#define pa_mainloop_api_once pa_mainloop_api_once_dylibloader_orig_pulse
+#define pa_proplist_new pa_proplist_new_dylibloader_orig_pulse
+#define pa_proplist_free pa_proplist_free_dylibloader_orig_pulse
+#define pa_proplist_key_valid pa_proplist_key_valid_dylibloader_orig_pulse
+#define pa_proplist_sets pa_proplist_sets_dylibloader_orig_pulse
+#define pa_proplist_setp pa_proplist_setp_dylibloader_orig_pulse
+#define pa_proplist_setf pa_proplist_setf_dylibloader_orig_pulse
+#define pa_proplist_set pa_proplist_set_dylibloader_orig_pulse
+#define pa_proplist_gets pa_proplist_gets_dylibloader_orig_pulse
+#define pa_proplist_get pa_proplist_get_dylibloader_orig_pulse
+#define pa_proplist_update pa_proplist_update_dylibloader_orig_pulse
+#define pa_proplist_unset pa_proplist_unset_dylibloader_orig_pulse
+#define pa_proplist_unset_many pa_proplist_unset_many_dylibloader_orig_pulse
+#define pa_proplist_iterate pa_proplist_iterate_dylibloader_orig_pulse
+#define pa_proplist_to_string pa_proplist_to_string_dylibloader_orig_pulse
+#define pa_proplist_to_string_sep pa_proplist_to_string_sep_dylibloader_orig_pulse
+#define pa_proplist_from_string pa_proplist_from_string_dylibloader_orig_pulse
+#define pa_proplist_contains pa_proplist_contains_dylibloader_orig_pulse
+#define pa_proplist_clear pa_proplist_clear_dylibloader_orig_pulse
+#define pa_proplist_copy pa_proplist_copy_dylibloader_orig_pulse
+#define pa_proplist_size pa_proplist_size_dylibloader_orig_pulse
+#define pa_proplist_isempty pa_proplist_isempty_dylibloader_orig_pulse
+#define pa_proplist_equal pa_proplist_equal_dylibloader_orig_pulse
+#define pa_channel_map_init pa_channel_map_init_dylibloader_orig_pulse
+#define pa_channel_map_init_mono pa_channel_map_init_mono_dylibloader_orig_pulse
+#define pa_channel_map_init_stereo pa_channel_map_init_stereo_dylibloader_orig_pulse
+#define pa_channel_map_init_auto pa_channel_map_init_auto_dylibloader_orig_pulse
+#define pa_channel_map_init_extend pa_channel_map_init_extend_dylibloader_orig_pulse
+#define pa_channel_position_to_string pa_channel_position_to_string_dylibloader_orig_pulse
+#define pa_channel_position_from_string pa_channel_position_from_string_dylibloader_orig_pulse
+#define pa_channel_position_to_pretty_string pa_channel_position_to_pretty_string_dylibloader_orig_pulse
+#define pa_channel_map_snprint pa_channel_map_snprint_dylibloader_orig_pulse
+#define pa_channel_map_parse pa_channel_map_parse_dylibloader_orig_pulse
+#define pa_channel_map_equal pa_channel_map_equal_dylibloader_orig_pulse
+#define pa_channel_map_valid pa_channel_map_valid_dylibloader_orig_pulse
+#define pa_channel_map_compatible pa_channel_map_compatible_dylibloader_orig_pulse
+#define pa_channel_map_superset pa_channel_map_superset_dylibloader_orig_pulse
+#define pa_channel_map_can_balance pa_channel_map_can_balance_dylibloader_orig_pulse
+#define pa_channel_map_can_fade pa_channel_map_can_fade_dylibloader_orig_pulse
+#define pa_channel_map_can_lfe_balance pa_channel_map_can_lfe_balance_dylibloader_orig_pulse
+#define pa_channel_map_to_name pa_channel_map_to_name_dylibloader_orig_pulse
+#define pa_channel_map_to_pretty_name pa_channel_map_to_pretty_name_dylibloader_orig_pulse
+#define pa_channel_map_has_position pa_channel_map_has_position_dylibloader_orig_pulse
+#define pa_channel_map_mask pa_channel_map_mask_dylibloader_orig_pulse
+#define pa_encoding_to_string pa_encoding_to_string_dylibloader_orig_pulse
+#define pa_encoding_from_string pa_encoding_from_string_dylibloader_orig_pulse
+#define pa_format_info_new pa_format_info_new_dylibloader_orig_pulse
+#define pa_format_info_copy pa_format_info_copy_dylibloader_orig_pulse
+#define pa_format_info_free pa_format_info_free_dylibloader_orig_pulse
+#define pa_format_info_valid pa_format_info_valid_dylibloader_orig_pulse
+#define pa_format_info_is_pcm pa_format_info_is_pcm_dylibloader_orig_pulse
+#define pa_format_info_is_compatible pa_format_info_is_compatible_dylibloader_orig_pulse
+#define pa_format_info_snprint pa_format_info_snprint_dylibloader_orig_pulse
+#define pa_format_info_from_string pa_format_info_from_string_dylibloader_orig_pulse
+#define pa_format_info_from_sample_spec pa_format_info_from_sample_spec_dylibloader_orig_pulse
+#define pa_format_info_to_sample_spec pa_format_info_to_sample_spec_dylibloader_orig_pulse
+#define pa_format_info_get_prop_type pa_format_info_get_prop_type_dylibloader_orig_pulse
+#define pa_format_info_get_prop_int pa_format_info_get_prop_int_dylibloader_orig_pulse
+#define pa_format_info_get_prop_int_range pa_format_info_get_prop_int_range_dylibloader_orig_pulse
+#define pa_format_info_get_prop_int_array pa_format_info_get_prop_int_array_dylibloader_orig_pulse
+#define pa_format_info_get_prop_string pa_format_info_get_prop_string_dylibloader_orig_pulse
+#define pa_format_info_get_prop_string_array pa_format_info_get_prop_string_array_dylibloader_orig_pulse
+#define pa_format_info_free_string_array pa_format_info_free_string_array_dylibloader_orig_pulse
+#define pa_format_info_get_sample_format pa_format_info_get_sample_format_dylibloader_orig_pulse
+#define pa_format_info_get_rate pa_format_info_get_rate_dylibloader_orig_pulse
+#define pa_format_info_get_channels pa_format_info_get_channels_dylibloader_orig_pulse
+#define pa_format_info_get_channel_map pa_format_info_get_channel_map_dylibloader_orig_pulse
+#define pa_format_info_set_prop_int pa_format_info_set_prop_int_dylibloader_orig_pulse
+#define pa_format_info_set_prop_int_array pa_format_info_set_prop_int_array_dylibloader_orig_pulse
+#define pa_format_info_set_prop_int_range pa_format_info_set_prop_int_range_dylibloader_orig_pulse
+#define pa_format_info_set_prop_string pa_format_info_set_prop_string_dylibloader_orig_pulse
+#define pa_format_info_set_prop_string_array pa_format_info_set_prop_string_array_dylibloader_orig_pulse
+#define pa_format_info_set_sample_format pa_format_info_set_sample_format_dylibloader_orig_pulse
+#define pa_format_info_set_rate pa_format_info_set_rate_dylibloader_orig_pulse
+#define pa_format_info_set_channels pa_format_info_set_channels_dylibloader_orig_pulse
+#define pa_format_info_set_channel_map pa_format_info_set_channel_map_dylibloader_orig_pulse
+#define pa_operation_ref pa_operation_ref_dylibloader_orig_pulse
+#define pa_operation_unref pa_operation_unref_dylibloader_orig_pulse
+#define pa_operation_cancel pa_operation_cancel_dylibloader_orig_pulse
+#define pa_operation_get_state pa_operation_get_state_dylibloader_orig_pulse
+#define pa_operation_set_state_callback pa_operation_set_state_callback_dylibloader_orig_pulse
+#define pa_context_new pa_context_new_dylibloader_orig_pulse
+#define pa_context_new_with_proplist pa_context_new_with_proplist_dylibloader_orig_pulse
+#define pa_context_unref pa_context_unref_dylibloader_orig_pulse
+#define pa_context_ref pa_context_ref_dylibloader_orig_pulse
+#define pa_context_set_state_callback pa_context_set_state_callback_dylibloader_orig_pulse
+#define pa_context_set_event_callback pa_context_set_event_callback_dylibloader_orig_pulse
+#define pa_context_errno pa_context_errno_dylibloader_orig_pulse
+#define pa_context_is_pending pa_context_is_pending_dylibloader_orig_pulse
+#define pa_context_get_state pa_context_get_state_dylibloader_orig_pulse
+#define pa_context_connect pa_context_connect_dylibloader_orig_pulse
+#define pa_context_disconnect pa_context_disconnect_dylibloader_orig_pulse
+#define pa_context_drain pa_context_drain_dylibloader_orig_pulse
+#define pa_context_exit_daemon pa_context_exit_daemon_dylibloader_orig_pulse
+#define pa_context_set_default_sink pa_context_set_default_sink_dylibloader_orig_pulse
+#define pa_context_set_default_source pa_context_set_default_source_dylibloader_orig_pulse
+#define pa_context_is_local pa_context_is_local_dylibloader_orig_pulse
+#define pa_context_set_name pa_context_set_name_dylibloader_orig_pulse
+#define pa_context_get_server pa_context_get_server_dylibloader_orig_pulse
+#define pa_context_get_protocol_version pa_context_get_protocol_version_dylibloader_orig_pulse
+#define pa_context_get_server_protocol_version pa_context_get_server_protocol_version_dylibloader_orig_pulse
+#define pa_context_proplist_update pa_context_proplist_update_dylibloader_orig_pulse
+#define pa_context_proplist_remove pa_context_proplist_remove_dylibloader_orig_pulse
+#define pa_context_get_index pa_context_get_index_dylibloader_orig_pulse
+#define pa_context_rttime_new pa_context_rttime_new_dylibloader_orig_pulse
+#define pa_context_rttime_restart pa_context_rttime_restart_dylibloader_orig_pulse
+#define pa_context_get_tile_size pa_context_get_tile_size_dylibloader_orig_pulse
+#define pa_context_load_cookie_from_file pa_context_load_cookie_from_file_dylibloader_orig_pulse
+#define pa_cvolume_equal pa_cvolume_equal_dylibloader_orig_pulse
+#define pa_cvolume_init pa_cvolume_init_dylibloader_orig_pulse
+#define pa_cvolume_set pa_cvolume_set_dylibloader_orig_pulse
+#define pa_cvolume_snprint pa_cvolume_snprint_dylibloader_orig_pulse
+#define pa_sw_cvolume_snprint_dB pa_sw_cvolume_snprint_dB_dylibloader_orig_pulse
+#define pa_cvolume_snprint_verbose pa_cvolume_snprint_verbose_dylibloader_orig_pulse
+#define pa_volume_snprint pa_volume_snprint_dylibloader_orig_pulse
+#define pa_sw_volume_snprint_dB pa_sw_volume_snprint_dB_dylibloader_orig_pulse
+#define pa_volume_snprint_verbose pa_volume_snprint_verbose_dylibloader_orig_pulse
+#define pa_cvolume_avg pa_cvolume_avg_dylibloader_orig_pulse
+#define pa_cvolume_avg_mask pa_cvolume_avg_mask_dylibloader_orig_pulse
+#define pa_cvolume_max pa_cvolume_max_dylibloader_orig_pulse
+#define pa_cvolume_max_mask pa_cvolume_max_mask_dylibloader_orig_pulse
+#define pa_cvolume_min pa_cvolume_min_dylibloader_orig_pulse
+#define pa_cvolume_min_mask pa_cvolume_min_mask_dylibloader_orig_pulse
+#define pa_cvolume_valid pa_cvolume_valid_dylibloader_orig_pulse
+#define pa_cvolume_channels_equal_to pa_cvolume_channels_equal_to_dylibloader_orig_pulse
+#define pa_sw_volume_multiply pa_sw_volume_multiply_dylibloader_orig_pulse
+#define pa_sw_cvolume_multiply pa_sw_cvolume_multiply_dylibloader_orig_pulse
+#define pa_sw_cvolume_multiply_scalar pa_sw_cvolume_multiply_scalar_dylibloader_orig_pulse
+#define pa_sw_volume_divide pa_sw_volume_divide_dylibloader_orig_pulse
+#define pa_sw_cvolume_divide pa_sw_cvolume_divide_dylibloader_orig_pulse
+#define pa_sw_cvolume_divide_scalar pa_sw_cvolume_divide_scalar_dylibloader_orig_pulse
+#define pa_sw_volume_from_dB pa_sw_volume_from_dB_dylibloader_orig_pulse
+#define pa_sw_volume_to_dB pa_sw_volume_to_dB_dylibloader_orig_pulse
+#define pa_sw_volume_from_linear pa_sw_volume_from_linear_dylibloader_orig_pulse
+#define pa_sw_volume_to_linear pa_sw_volume_to_linear_dylibloader_orig_pulse
+#define pa_cvolume_remap pa_cvolume_remap_dylibloader_orig_pulse
+#define pa_cvolume_compatible pa_cvolume_compatible_dylibloader_orig_pulse
+#define pa_cvolume_compatible_with_channel_map pa_cvolume_compatible_with_channel_map_dylibloader_orig_pulse
+#define pa_cvolume_get_balance pa_cvolume_get_balance_dylibloader_orig_pulse
+#define pa_cvolume_set_balance pa_cvolume_set_balance_dylibloader_orig_pulse
+#define pa_cvolume_get_fade pa_cvolume_get_fade_dylibloader_orig_pulse
+#define pa_cvolume_set_fade pa_cvolume_set_fade_dylibloader_orig_pulse
+#define pa_cvolume_get_lfe_balance pa_cvolume_get_lfe_balance_dylibloader_orig_pulse
+#define pa_cvolume_set_lfe_balance pa_cvolume_set_lfe_balance_dylibloader_orig_pulse
+#define pa_cvolume_scale pa_cvolume_scale_dylibloader_orig_pulse
+#define pa_cvolume_scale_mask pa_cvolume_scale_mask_dylibloader_orig_pulse
+#define pa_cvolume_set_position pa_cvolume_set_position_dylibloader_orig_pulse
+#define pa_cvolume_get_position pa_cvolume_get_position_dylibloader_orig_pulse
+#define pa_cvolume_merge pa_cvolume_merge_dylibloader_orig_pulse
+#define pa_cvolume_inc_clamp pa_cvolume_inc_clamp_dylibloader_orig_pulse
+#define pa_cvolume_inc pa_cvolume_inc_dylibloader_orig_pulse
+#define pa_cvolume_dec pa_cvolume_dec_dylibloader_orig_pulse
+#define pa_stream_new pa_stream_new_dylibloader_orig_pulse
+#define pa_stream_new_with_proplist pa_stream_new_with_proplist_dylibloader_orig_pulse
+#define pa_stream_new_extended pa_stream_new_extended_dylibloader_orig_pulse
+#define pa_stream_unref pa_stream_unref_dylibloader_orig_pulse
+#define pa_stream_ref pa_stream_ref_dylibloader_orig_pulse
+#define pa_stream_get_state pa_stream_get_state_dylibloader_orig_pulse
+#define pa_stream_get_context pa_stream_get_context_dylibloader_orig_pulse
+#define pa_stream_get_index pa_stream_get_index_dylibloader_orig_pulse
+#define pa_stream_get_device_index pa_stream_get_device_index_dylibloader_orig_pulse
+#define pa_stream_get_device_name pa_stream_get_device_name_dylibloader_orig_pulse
+#define pa_stream_is_suspended pa_stream_is_suspended_dylibloader_orig_pulse
+#define pa_stream_is_corked pa_stream_is_corked_dylibloader_orig_pulse
+#define pa_stream_connect_playback pa_stream_connect_playback_dylibloader_orig_pulse
+#define pa_stream_connect_record pa_stream_connect_record_dylibloader_orig_pulse
+#define pa_stream_disconnect pa_stream_disconnect_dylibloader_orig_pulse
+#define pa_stream_begin_write pa_stream_begin_write_dylibloader_orig_pulse
+#define pa_stream_cancel_write pa_stream_cancel_write_dylibloader_orig_pulse
+#define pa_stream_write pa_stream_write_dylibloader_orig_pulse
+#define pa_stream_write_ext_free pa_stream_write_ext_free_dylibloader_orig_pulse
+#define pa_stream_peek pa_stream_peek_dylibloader_orig_pulse
+#define pa_stream_drop pa_stream_drop_dylibloader_orig_pulse
+#define pa_stream_writable_size pa_stream_writable_size_dylibloader_orig_pulse
+#define pa_stream_readable_size pa_stream_readable_size_dylibloader_orig_pulse
+#define pa_stream_drain pa_stream_drain_dylibloader_orig_pulse
+#define pa_stream_update_timing_info pa_stream_update_timing_info_dylibloader_orig_pulse
+#define pa_stream_set_state_callback pa_stream_set_state_callback_dylibloader_orig_pulse
+#define pa_stream_set_write_callback pa_stream_set_write_callback_dylibloader_orig_pulse
+#define pa_stream_set_read_callback pa_stream_set_read_callback_dylibloader_orig_pulse
+#define pa_stream_set_overflow_callback pa_stream_set_overflow_callback_dylibloader_orig_pulse
+#define pa_stream_get_underflow_index pa_stream_get_underflow_index_dylibloader_orig_pulse
+#define pa_stream_set_underflow_callback pa_stream_set_underflow_callback_dylibloader_orig_pulse
+#define pa_stream_set_started_callback pa_stream_set_started_callback_dylibloader_orig_pulse
+#define pa_stream_set_latency_update_callback pa_stream_set_latency_update_callback_dylibloader_orig_pulse
+#define pa_stream_set_moved_callback pa_stream_set_moved_callback_dylibloader_orig_pulse
+#define pa_stream_set_suspended_callback pa_stream_set_suspended_callback_dylibloader_orig_pulse
+#define pa_stream_set_event_callback pa_stream_set_event_callback_dylibloader_orig_pulse
+#define pa_stream_set_buffer_attr_callback pa_stream_set_buffer_attr_callback_dylibloader_orig_pulse
+#define pa_stream_cork pa_stream_cork_dylibloader_orig_pulse
+#define pa_stream_flush pa_stream_flush_dylibloader_orig_pulse
+#define pa_stream_prebuf pa_stream_prebuf_dylibloader_orig_pulse
+#define pa_stream_trigger pa_stream_trigger_dylibloader_orig_pulse
+#define pa_stream_set_name pa_stream_set_name_dylibloader_orig_pulse
+#define pa_stream_get_time pa_stream_get_time_dylibloader_orig_pulse
+#define pa_stream_get_latency pa_stream_get_latency_dylibloader_orig_pulse
+#define pa_stream_get_timing_info pa_stream_get_timing_info_dylibloader_orig_pulse
+#define pa_stream_get_sample_spec pa_stream_get_sample_spec_dylibloader_orig_pulse
+#define pa_stream_get_channel_map pa_stream_get_channel_map_dylibloader_orig_pulse
+#define pa_stream_get_format_info pa_stream_get_format_info_dylibloader_orig_pulse
+#define pa_stream_get_buffer_attr pa_stream_get_buffer_attr_dylibloader_orig_pulse
+#define pa_stream_set_buffer_attr pa_stream_set_buffer_attr_dylibloader_orig_pulse
+#define pa_stream_update_sample_rate pa_stream_update_sample_rate_dylibloader_orig_pulse
+#define pa_stream_proplist_update pa_stream_proplist_update_dylibloader_orig_pulse
+#define pa_stream_proplist_remove pa_stream_proplist_remove_dylibloader_orig_pulse
+#define pa_stream_set_monitor_stream pa_stream_set_monitor_stream_dylibloader_orig_pulse
+#define pa_stream_get_monitor_stream pa_stream_get_monitor_stream_dylibloader_orig_pulse
+#define pa_context_get_sink_info_by_name pa_context_get_sink_info_by_name_dylibloader_orig_pulse
+#define pa_context_get_sink_info_by_index pa_context_get_sink_info_by_index_dylibloader_orig_pulse
+#define pa_context_get_sink_info_list pa_context_get_sink_info_list_dylibloader_orig_pulse
+#define pa_context_set_sink_volume_by_index pa_context_set_sink_volume_by_index_dylibloader_orig_pulse
+#define pa_context_set_sink_volume_by_name pa_context_set_sink_volume_by_name_dylibloader_orig_pulse
+#define pa_context_set_sink_mute_by_index pa_context_set_sink_mute_by_index_dylibloader_orig_pulse
+#define pa_context_set_sink_mute_by_name pa_context_set_sink_mute_by_name_dylibloader_orig_pulse
+#define pa_context_suspend_sink_by_name pa_context_suspend_sink_by_name_dylibloader_orig_pulse
+#define pa_context_suspend_sink_by_index pa_context_suspend_sink_by_index_dylibloader_orig_pulse
+#define pa_context_set_sink_port_by_index pa_context_set_sink_port_by_index_dylibloader_orig_pulse
+#define pa_context_set_sink_port_by_name pa_context_set_sink_port_by_name_dylibloader_orig_pulse
+#define pa_context_get_source_info_by_name pa_context_get_source_info_by_name_dylibloader_orig_pulse
+#define pa_context_get_source_info_by_index pa_context_get_source_info_by_index_dylibloader_orig_pulse
+#define pa_context_get_source_info_list pa_context_get_source_info_list_dylibloader_orig_pulse
+#define pa_context_set_source_volume_by_index pa_context_set_source_volume_by_index_dylibloader_orig_pulse
+#define pa_context_set_source_volume_by_name pa_context_set_source_volume_by_name_dylibloader_orig_pulse
+#define pa_context_set_source_mute_by_index pa_context_set_source_mute_by_index_dylibloader_orig_pulse
+#define pa_context_set_source_mute_by_name pa_context_set_source_mute_by_name_dylibloader_orig_pulse
+#define pa_context_suspend_source_by_name pa_context_suspend_source_by_name_dylibloader_orig_pulse
+#define pa_context_suspend_source_by_index pa_context_suspend_source_by_index_dylibloader_orig_pulse
+#define pa_context_set_source_port_by_index pa_context_set_source_port_by_index_dylibloader_orig_pulse
+#define pa_context_set_source_port_by_name pa_context_set_source_port_by_name_dylibloader_orig_pulse
+#define pa_context_get_server_info pa_context_get_server_info_dylibloader_orig_pulse
+#define pa_context_get_module_info pa_context_get_module_info_dylibloader_orig_pulse
+#define pa_context_get_module_info_list pa_context_get_module_info_list_dylibloader_orig_pulse
+#define pa_context_load_module pa_context_load_module_dylibloader_orig_pulse
+#define pa_context_unload_module pa_context_unload_module_dylibloader_orig_pulse
+#define pa_context_get_client_info pa_context_get_client_info_dylibloader_orig_pulse
+#define pa_context_get_client_info_list pa_context_get_client_info_list_dylibloader_orig_pulse
+#define pa_context_kill_client pa_context_kill_client_dylibloader_orig_pulse
+#define pa_context_get_card_info_by_index pa_context_get_card_info_by_index_dylibloader_orig_pulse
+#define pa_context_get_card_info_by_name pa_context_get_card_info_by_name_dylibloader_orig_pulse
+#define pa_context_get_card_info_list pa_context_get_card_info_list_dylibloader_orig_pulse
+#define pa_context_set_card_profile_by_index pa_context_set_card_profile_by_index_dylibloader_orig_pulse
+#define pa_context_set_card_profile_by_name pa_context_set_card_profile_by_name_dylibloader_orig_pulse
+#define pa_context_set_port_latency_offset pa_context_set_port_latency_offset_dylibloader_orig_pulse
+#define pa_context_get_sink_input_info pa_context_get_sink_input_info_dylibloader_orig_pulse
+#define pa_context_get_sink_input_info_list pa_context_get_sink_input_info_list_dylibloader_orig_pulse
+#define pa_context_move_sink_input_by_name pa_context_move_sink_input_by_name_dylibloader_orig_pulse
+#define pa_context_move_sink_input_by_index pa_context_move_sink_input_by_index_dylibloader_orig_pulse
+#define pa_context_set_sink_input_volume pa_context_set_sink_input_volume_dylibloader_orig_pulse
+#define pa_context_set_sink_input_mute pa_context_set_sink_input_mute_dylibloader_orig_pulse
+#define pa_context_kill_sink_input pa_context_kill_sink_input_dylibloader_orig_pulse
+#define pa_context_get_source_output_info pa_context_get_source_output_info_dylibloader_orig_pulse
+#define pa_context_get_source_output_info_list pa_context_get_source_output_info_list_dylibloader_orig_pulse
+#define pa_context_move_source_output_by_name pa_context_move_source_output_by_name_dylibloader_orig_pulse
+#define pa_context_move_source_output_by_index pa_context_move_source_output_by_index_dylibloader_orig_pulse
+#define pa_context_set_source_output_volume pa_context_set_source_output_volume_dylibloader_orig_pulse
+#define pa_context_set_source_output_mute pa_context_set_source_output_mute_dylibloader_orig_pulse
+#define pa_context_kill_source_output pa_context_kill_source_output_dylibloader_orig_pulse
+#define pa_context_stat pa_context_stat_dylibloader_orig_pulse
+#define pa_context_get_sample_info_by_name pa_context_get_sample_info_by_name_dylibloader_orig_pulse
+#define pa_context_get_sample_info_by_index pa_context_get_sample_info_by_index_dylibloader_orig_pulse
+#define pa_context_get_sample_info_list pa_context_get_sample_info_list_dylibloader_orig_pulse
+#define pa_context_get_autoload_info_by_name pa_context_get_autoload_info_by_name_dylibloader_orig_pulse
+#define pa_context_get_autoload_info_by_index pa_context_get_autoload_info_by_index_dylibloader_orig_pulse
+#define pa_context_get_autoload_info_list pa_context_get_autoload_info_list_dylibloader_orig_pulse
+#define pa_context_add_autoload pa_context_add_autoload_dylibloader_orig_pulse
+#define pa_context_remove_autoload_by_name pa_context_remove_autoload_by_name_dylibloader_orig_pulse
+#define pa_context_remove_autoload_by_index pa_context_remove_autoload_by_index_dylibloader_orig_pulse
+#define pa_context_subscribe pa_context_subscribe_dylibloader_orig_pulse
+#define pa_context_set_subscribe_callback pa_context_set_subscribe_callback_dylibloader_orig_pulse
+#define pa_stream_connect_upload pa_stream_connect_upload_dylibloader_orig_pulse
+#define pa_stream_finish_upload pa_stream_finish_upload_dylibloader_orig_pulse
+#define pa_context_remove_sample pa_context_remove_sample_dylibloader_orig_pulse
+#define pa_context_play_sample pa_context_play_sample_dylibloader_orig_pulse
+#define pa_context_play_sample_with_proplist pa_context_play_sample_with_proplist_dylibloader_orig_pulse
+#define pa_strerror pa_strerror_dylibloader_orig_pulse
+#define pa_xmalloc pa_xmalloc_dylibloader_orig_pulse
+#define pa_xmalloc0 pa_xmalloc0_dylibloader_orig_pulse
+#define pa_xrealloc pa_xrealloc_dylibloader_orig_pulse
+#define pa_xfree pa_xfree_dylibloader_orig_pulse
+#define pa_xstrdup pa_xstrdup_dylibloader_orig_pulse
+#define pa_xstrndup pa_xstrndup_dylibloader_orig_pulse
+#define pa_xmemdup pa_xmemdup_dylibloader_orig_pulse
+#define pa_utf8_valid pa_utf8_valid_dylibloader_orig_pulse
+#define pa_ascii_valid pa_ascii_valid_dylibloader_orig_pulse
+#define pa_utf8_filter pa_utf8_filter_dylibloader_orig_pulse
+#define pa_ascii_filter pa_ascii_filter_dylibloader_orig_pulse
+#define pa_utf8_to_locale pa_utf8_to_locale_dylibloader_orig_pulse
+#define pa_locale_to_utf8 pa_locale_to_utf8_dylibloader_orig_pulse
+#define pa_threaded_mainloop_new pa_threaded_mainloop_new_dylibloader_orig_pulse
+#define pa_threaded_mainloop_free pa_threaded_mainloop_free_dylibloader_orig_pulse
+#define pa_threaded_mainloop_start pa_threaded_mainloop_start_dylibloader_orig_pulse
+#define pa_threaded_mainloop_stop pa_threaded_mainloop_stop_dylibloader_orig_pulse
+#define pa_threaded_mainloop_lock pa_threaded_mainloop_lock_dylibloader_orig_pulse
+#define pa_threaded_mainloop_unlock pa_threaded_mainloop_unlock_dylibloader_orig_pulse
+#define pa_threaded_mainloop_wait pa_threaded_mainloop_wait_dylibloader_orig_pulse
+#define pa_threaded_mainloop_signal pa_threaded_mainloop_signal_dylibloader_orig_pulse
+#define pa_threaded_mainloop_accept pa_threaded_mainloop_accept_dylibloader_orig_pulse
+#define pa_threaded_mainloop_get_retval pa_threaded_mainloop_get_retval_dylibloader_orig_pulse
+#define pa_threaded_mainloop_get_api pa_threaded_mainloop_get_api_dylibloader_orig_pulse
+#define pa_threaded_mainloop_in_thread pa_threaded_mainloop_in_thread_dylibloader_orig_pulse
+#define pa_threaded_mainloop_set_name pa_threaded_mainloop_set_name_dylibloader_orig_pulse
+#define pa_threaded_mainloop_once_unlocked pa_threaded_mainloop_once_unlocked_dylibloader_orig_pulse
+#define pa_mainloop_new pa_mainloop_new_dylibloader_orig_pulse
+#define pa_mainloop_free pa_mainloop_free_dylibloader_orig_pulse
+#define pa_mainloop_prepare pa_mainloop_prepare_dylibloader_orig_pulse
+#define pa_mainloop_poll pa_mainloop_poll_dylibloader_orig_pulse
+#define pa_mainloop_dispatch pa_mainloop_dispatch_dylibloader_orig_pulse
+#define pa_mainloop_get_retval pa_mainloop_get_retval_dylibloader_orig_pulse
+#define pa_mainloop_iterate pa_mainloop_iterate_dylibloader_orig_pulse
+#define pa_mainloop_run pa_mainloop_run_dylibloader_orig_pulse
+#define pa_mainloop_get_api pa_mainloop_get_api_dylibloader_orig_pulse
+#define pa_mainloop_quit pa_mainloop_quit_dylibloader_orig_pulse
+#define pa_mainloop_wakeup pa_mainloop_wakeup_dylibloader_orig_pulse
+#define pa_mainloop_set_poll_func pa_mainloop_set_poll_func_dylibloader_orig_pulse
+#define pa_signal_init pa_signal_init_dylibloader_orig_pulse
+#define pa_signal_done pa_signal_done_dylibloader_orig_pulse
+#define pa_signal_new pa_signal_new_dylibloader_orig_pulse
+#define pa_signal_free pa_signal_free_dylibloader_orig_pulse
+#define pa_signal_set_destroy pa_signal_set_destroy_dylibloader_orig_pulse
+#define pa_get_user_name pa_get_user_name_dylibloader_orig_pulse
+#define pa_get_host_name pa_get_host_name_dylibloader_orig_pulse
+#define pa_get_fqdn pa_get_fqdn_dylibloader_orig_pulse
+#define pa_get_home_dir pa_get_home_dir_dylibloader_orig_pulse
+#define pa_get_binary_name pa_get_binary_name_dylibloader_orig_pulse
+#define pa_path_get_filename pa_path_get_filename_dylibloader_orig_pulse
+#define pa_msleep pa_msleep_dylibloader_orig_pulse
+#define pa_thread_make_realtime pa_thread_make_realtime_dylibloader_orig_pulse
+#define pa_gettimeofday pa_gettimeofday_dylibloader_orig_pulse
+#define pa_timeval_diff pa_timeval_diff_dylibloader_orig_pulse
+#define pa_timeval_cmp pa_timeval_cmp_dylibloader_orig_pulse
+#define pa_timeval_age pa_timeval_age_dylibloader_orig_pulse
+#define pa_timeval_add pa_timeval_add_dylibloader_orig_pulse
+#define pa_timeval_sub pa_timeval_sub_dylibloader_orig_pulse
+#define pa_timeval_store pa_timeval_store_dylibloader_orig_pulse
+#define pa_timeval_load pa_timeval_load_dylibloader_orig_pulse
+#define pa_rtclock_now pa_rtclock_now_dylibloader_orig_pulse
+#include <pulse/pulseaudio.h>
+#undef pa_get_library_version
+#undef pa_bytes_per_second
+#undef pa_frame_size
+#undef pa_sample_size
+#undef pa_sample_size_of_format
+#undef pa_bytes_to_usec
+#undef pa_usec_to_bytes
+#undef pa_sample_spec_init
+#undef pa_sample_format_valid
+#undef pa_sample_rate_valid
+#undef pa_channels_valid
+#undef pa_sample_spec_valid
+#undef pa_sample_spec_equal
+#undef pa_sample_format_to_string
+#undef pa_parse_sample_format
+#undef pa_sample_spec_snprint
+#undef pa_bytes_snprint
+#undef pa_sample_format_is_le
+#undef pa_sample_format_is_be
+#undef pa_direction_valid
+#undef pa_direction_to_string
+#undef pa_mainloop_api_once
+#undef pa_proplist_new
+#undef pa_proplist_free
+#undef pa_proplist_key_valid
+#undef pa_proplist_sets
+#undef pa_proplist_setp
+#undef pa_proplist_setf
+#undef pa_proplist_set
+#undef pa_proplist_gets
+#undef pa_proplist_get
+#undef pa_proplist_update
+#undef pa_proplist_unset
+#undef pa_proplist_unset_many
+#undef pa_proplist_iterate
+#undef pa_proplist_to_string
+#undef pa_proplist_to_string_sep
+#undef pa_proplist_from_string
+#undef pa_proplist_contains
+#undef pa_proplist_clear
+#undef pa_proplist_copy
+#undef pa_proplist_size
+#undef pa_proplist_isempty
+#undef pa_proplist_equal
+#undef pa_channel_map_init
+#undef pa_channel_map_init_mono
+#undef pa_channel_map_init_stereo
+#undef pa_channel_map_init_auto
+#undef pa_channel_map_init_extend
+#undef pa_channel_position_to_string
+#undef pa_channel_position_from_string
+#undef pa_channel_position_to_pretty_string
+#undef pa_channel_map_snprint
+#undef pa_channel_map_parse
+#undef pa_channel_map_equal
+#undef pa_channel_map_valid
+#undef pa_channel_map_compatible
+#undef pa_channel_map_superset
+#undef pa_channel_map_can_balance
+#undef pa_channel_map_can_fade
+#undef pa_channel_map_can_lfe_balance
+#undef pa_channel_map_to_name
+#undef pa_channel_map_to_pretty_name
+#undef pa_channel_map_has_position
+#undef pa_channel_map_mask
+#undef pa_encoding_to_string
+#undef pa_encoding_from_string
+#undef pa_format_info_new
+#undef pa_format_info_copy
+#undef pa_format_info_free
+#undef pa_format_info_valid
+#undef pa_format_info_is_pcm
+#undef pa_format_info_is_compatible
+#undef pa_format_info_snprint
+#undef pa_format_info_from_string
+#undef pa_format_info_from_sample_spec
+#undef pa_format_info_to_sample_spec
+#undef pa_format_info_get_prop_type
+#undef pa_format_info_get_prop_int
+#undef pa_format_info_get_prop_int_range
+#undef pa_format_info_get_prop_int_array
+#undef pa_format_info_get_prop_string
+#undef pa_format_info_get_prop_string_array
+#undef pa_format_info_free_string_array
+#undef pa_format_info_get_sample_format
+#undef pa_format_info_get_rate
+#undef pa_format_info_get_channels
+#undef pa_format_info_get_channel_map
+#undef pa_format_info_set_prop_int
+#undef pa_format_info_set_prop_int_array
+#undef pa_format_info_set_prop_int_range
+#undef pa_format_info_set_prop_string
+#undef pa_format_info_set_prop_string_array
+#undef pa_format_info_set_sample_format
+#undef pa_format_info_set_rate
+#undef pa_format_info_set_channels
+#undef pa_format_info_set_channel_map
+#undef pa_operation_ref
+#undef pa_operation_unref
+#undef pa_operation_cancel
+#undef pa_operation_get_state
+#undef pa_operation_set_state_callback
+#undef pa_context_new
+#undef pa_context_new_with_proplist
+#undef pa_context_unref
+#undef pa_context_ref
+#undef pa_context_set_state_callback
+#undef pa_context_set_event_callback
+#undef pa_context_errno
+#undef pa_context_is_pending
+#undef pa_context_get_state
+#undef pa_context_connect
+#undef pa_context_disconnect
+#undef pa_context_drain
+#undef pa_context_exit_daemon
+#undef pa_context_set_default_sink
+#undef pa_context_set_default_source
+#undef pa_context_is_local
+#undef pa_context_set_name
+#undef pa_context_get_server
+#undef pa_context_get_protocol_version
+#undef pa_context_get_server_protocol_version
+#undef pa_context_proplist_update
+#undef pa_context_proplist_remove
+#undef pa_context_get_index
+#undef pa_context_rttime_new
+#undef pa_context_rttime_restart
+#undef pa_context_get_tile_size
+#undef pa_context_load_cookie_from_file
+#undef pa_cvolume_equal
+#undef pa_cvolume_init
+#undef pa_cvolume_set
+#undef pa_cvolume_snprint
+#undef pa_sw_cvolume_snprint_dB
+#undef pa_cvolume_snprint_verbose
+#undef pa_volume_snprint
+#undef pa_sw_volume_snprint_dB
+#undef pa_volume_snprint_verbose
+#undef pa_cvolume_avg
+#undef pa_cvolume_avg_mask
+#undef pa_cvolume_max
+#undef pa_cvolume_max_mask
+#undef pa_cvolume_min
+#undef pa_cvolume_min_mask
+#undef pa_cvolume_valid
+#undef pa_cvolume_channels_equal_to
+#undef pa_sw_volume_multiply
+#undef pa_sw_cvolume_multiply
+#undef pa_sw_cvolume_multiply_scalar
+#undef pa_sw_volume_divide
+#undef pa_sw_cvolume_divide
+#undef pa_sw_cvolume_divide_scalar
+#undef pa_sw_volume_from_dB
+#undef pa_sw_volume_to_dB
+#undef pa_sw_volume_from_linear
+#undef pa_sw_volume_to_linear
+#undef pa_cvolume_remap
+#undef pa_cvolume_compatible
+#undef pa_cvolume_compatible_with_channel_map
+#undef pa_cvolume_get_balance
+#undef pa_cvolume_set_balance
+#undef pa_cvolume_get_fade
+#undef pa_cvolume_set_fade
+#undef pa_cvolume_get_lfe_balance
+#undef pa_cvolume_set_lfe_balance
+#undef pa_cvolume_scale
+#undef pa_cvolume_scale_mask
+#undef pa_cvolume_set_position
+#undef pa_cvolume_get_position
+#undef pa_cvolume_merge
+#undef pa_cvolume_inc_clamp
+#undef pa_cvolume_inc
+#undef pa_cvolume_dec
+#undef pa_stream_new
+#undef pa_stream_new_with_proplist
+#undef pa_stream_new_extended
+#undef pa_stream_unref
+#undef pa_stream_ref
+#undef pa_stream_get_state
+#undef pa_stream_get_context
+#undef pa_stream_get_index
+#undef pa_stream_get_device_index
+#undef pa_stream_get_device_name
+#undef pa_stream_is_suspended
+#undef pa_stream_is_corked
+#undef pa_stream_connect_playback
+#undef pa_stream_connect_record
+#undef pa_stream_disconnect
+#undef pa_stream_begin_write
+#undef pa_stream_cancel_write
+#undef pa_stream_write
+#undef pa_stream_write_ext_free
+#undef pa_stream_peek
+#undef pa_stream_drop
+#undef pa_stream_writable_size
+#undef pa_stream_readable_size
+#undef pa_stream_drain
+#undef pa_stream_update_timing_info
+#undef pa_stream_set_state_callback
+#undef pa_stream_set_write_callback
+#undef pa_stream_set_read_callback
+#undef pa_stream_set_overflow_callback
+#undef pa_stream_get_underflow_index
+#undef pa_stream_set_underflow_callback
+#undef pa_stream_set_started_callback
+#undef pa_stream_set_latency_update_callback
+#undef pa_stream_set_moved_callback
+#undef pa_stream_set_suspended_callback
+#undef pa_stream_set_event_callback
+#undef pa_stream_set_buffer_attr_callback
+#undef pa_stream_cork
+#undef pa_stream_flush
+#undef pa_stream_prebuf
+#undef pa_stream_trigger
+#undef pa_stream_set_name
+#undef pa_stream_get_time
+#undef pa_stream_get_latency
+#undef pa_stream_get_timing_info
+#undef pa_stream_get_sample_spec
+#undef pa_stream_get_channel_map
+#undef pa_stream_get_format_info
+#undef pa_stream_get_buffer_attr
+#undef pa_stream_set_buffer_attr
+#undef pa_stream_update_sample_rate
+#undef pa_stream_proplist_update
+#undef pa_stream_proplist_remove
+#undef pa_stream_set_monitor_stream
+#undef pa_stream_get_monitor_stream
+#undef pa_context_get_sink_info_by_name
+#undef pa_context_get_sink_info_by_index
+#undef pa_context_get_sink_info_list
+#undef pa_context_set_sink_volume_by_index
+#undef pa_context_set_sink_volume_by_name
+#undef pa_context_set_sink_mute_by_index
+#undef pa_context_set_sink_mute_by_name
+#undef pa_context_suspend_sink_by_name
+#undef pa_context_suspend_sink_by_index
+#undef pa_context_set_sink_port_by_index
+#undef pa_context_set_sink_port_by_name
+#undef pa_context_get_source_info_by_name
+#undef pa_context_get_source_info_by_index
+#undef pa_context_get_source_info_list
+#undef pa_context_set_source_volume_by_index
+#undef pa_context_set_source_volume_by_name
+#undef pa_context_set_source_mute_by_index
+#undef pa_context_set_source_mute_by_name
+#undef pa_context_suspend_source_by_name
+#undef pa_context_suspend_source_by_index
+#undef pa_context_set_source_port_by_index
+#undef pa_context_set_source_port_by_name
+#undef pa_context_get_server_info
+#undef pa_context_get_module_info
+#undef pa_context_get_module_info_list
+#undef pa_context_load_module
+#undef pa_context_unload_module
+#undef pa_context_get_client_info
+#undef pa_context_get_client_info_list
+#undef pa_context_kill_client
+#undef pa_context_get_card_info_by_index
+#undef pa_context_get_card_info_by_name
+#undef pa_context_get_card_info_list
+#undef pa_context_set_card_profile_by_index
+#undef pa_context_set_card_profile_by_name
+#undef pa_context_set_port_latency_offset
+#undef pa_context_get_sink_input_info
+#undef pa_context_get_sink_input_info_list
+#undef pa_context_move_sink_input_by_name
+#undef pa_context_move_sink_input_by_index
+#undef pa_context_set_sink_input_volume
+#undef pa_context_set_sink_input_mute
+#undef pa_context_kill_sink_input
+#undef pa_context_get_source_output_info
+#undef pa_context_get_source_output_info_list
+#undef pa_context_move_source_output_by_name
+#undef pa_context_move_source_output_by_index
+#undef pa_context_set_source_output_volume
+#undef pa_context_set_source_output_mute
+#undef pa_context_kill_source_output
+#undef pa_context_stat
+#undef pa_context_get_sample_info_by_name
+#undef pa_context_get_sample_info_by_index
+#undef pa_context_get_sample_info_list
+#undef pa_context_get_autoload_info_by_name
+#undef pa_context_get_autoload_info_by_index
+#undef pa_context_get_autoload_info_list
+#undef pa_context_add_autoload
+#undef pa_context_remove_autoload_by_name
+#undef pa_context_remove_autoload_by_index
+#undef pa_context_subscribe
+#undef pa_context_set_subscribe_callback
+#undef pa_stream_connect_upload
+#undef pa_stream_finish_upload
+#undef pa_context_remove_sample
+#undef pa_context_play_sample
+#undef pa_context_play_sample_with_proplist
+#undef pa_strerror
+#undef pa_xmalloc
+#undef pa_xmalloc0
+#undef pa_xrealloc
+#undef pa_xfree
+#undef pa_xstrdup
+#undef pa_xstrndup
+#undef pa_xmemdup
+#undef pa_utf8_valid
+#undef pa_ascii_valid
+#undef pa_utf8_filter
+#undef pa_ascii_filter
+#undef pa_utf8_to_locale
+#undef pa_locale_to_utf8
+#undef pa_threaded_mainloop_new
+#undef pa_threaded_mainloop_free
+#undef pa_threaded_mainloop_start
+#undef pa_threaded_mainloop_stop
+#undef pa_threaded_mainloop_lock
+#undef pa_threaded_mainloop_unlock
+#undef pa_threaded_mainloop_wait
+#undef pa_threaded_mainloop_signal
+#undef pa_threaded_mainloop_accept
+#undef pa_threaded_mainloop_get_retval
+#undef pa_threaded_mainloop_get_api
+#undef pa_threaded_mainloop_in_thread
+#undef pa_threaded_mainloop_set_name
+#undef pa_threaded_mainloop_once_unlocked
+#undef pa_mainloop_new
+#undef pa_mainloop_free
+#undef pa_mainloop_prepare
+#undef pa_mainloop_poll
+#undef pa_mainloop_dispatch
+#undef pa_mainloop_get_retval
+#undef pa_mainloop_iterate
+#undef pa_mainloop_run
+#undef pa_mainloop_get_api
+#undef pa_mainloop_quit
+#undef pa_mainloop_wakeup
+#undef pa_mainloop_set_poll_func
+#undef pa_signal_init
+#undef pa_signal_done
+#undef pa_signal_new
+#undef pa_signal_free
+#undef pa_signal_set_destroy
+#undef pa_get_user_name
+#undef pa_get_host_name
+#undef pa_get_fqdn
+#undef pa_get_home_dir
+#undef pa_get_binary_name
+#undef pa_path_get_filename
+#undef pa_msleep
+#undef pa_thread_make_realtime
+#undef pa_gettimeofday
+#undef pa_timeval_diff
+#undef pa_timeval_cmp
+#undef pa_timeval_age
+#undef pa_timeval_add
+#undef pa_timeval_sub
+#undef pa_timeval_store
+#undef pa_timeval_load
+#undef pa_rtclock_now
+#include <dlfcn.h>
+#include <stdio.h>
+const char* (*pa_get_library_version_dylibloader_wrapper_pulse)( void);
+size_t (*pa_bytes_per_second_dylibloader_wrapper_pulse)(const pa_sample_spec*);
+size_t (*pa_frame_size_dylibloader_wrapper_pulse)(const pa_sample_spec*);
+size_t (*pa_sample_size_dylibloader_wrapper_pulse)(const pa_sample_spec*);
+size_t (*pa_sample_size_of_format_dylibloader_wrapper_pulse)( pa_sample_format_t);
+pa_usec_t (*pa_bytes_to_usec_dylibloader_wrapper_pulse)( uint64_t,const pa_sample_spec*);
+size_t (*pa_usec_to_bytes_dylibloader_wrapper_pulse)( pa_usec_t,const pa_sample_spec*);
+pa_sample_spec* (*pa_sample_spec_init_dylibloader_wrapper_pulse)( pa_sample_spec*);
+int (*pa_sample_format_valid_dylibloader_wrapper_pulse)( unsigned);
+int (*pa_sample_rate_valid_dylibloader_wrapper_pulse)( uint32_t);
+int (*pa_channels_valid_dylibloader_wrapper_pulse)( uint8_t);
+int (*pa_sample_spec_valid_dylibloader_wrapper_pulse)(const pa_sample_spec*);
+int (*pa_sample_spec_equal_dylibloader_wrapper_pulse)(const pa_sample_spec*,const pa_sample_spec*);
+const char* (*pa_sample_format_to_string_dylibloader_wrapper_pulse)( pa_sample_format_t);
+pa_sample_format_t (*pa_parse_sample_format_dylibloader_wrapper_pulse)(const char*);
+char* (*pa_sample_spec_snprint_dylibloader_wrapper_pulse)( char*, size_t,const pa_sample_spec*);
+char* (*pa_bytes_snprint_dylibloader_wrapper_pulse)( char*, size_t, unsigned);
+int (*pa_sample_format_is_le_dylibloader_wrapper_pulse)( pa_sample_format_t);
+int (*pa_sample_format_is_be_dylibloader_wrapper_pulse)( pa_sample_format_t);
+int (*pa_direction_valid_dylibloader_wrapper_pulse)( pa_direction_t);
+const char* (*pa_direction_to_string_dylibloader_wrapper_pulse)( pa_direction_t);
+void (*pa_mainloop_api_once_dylibloader_wrapper_pulse)( pa_mainloop_api*, void*, void*);
+pa_proplist* (*pa_proplist_new_dylibloader_wrapper_pulse)( void);
+void (*pa_proplist_free_dylibloader_wrapper_pulse)( pa_proplist*);
+int (*pa_proplist_key_valid_dylibloader_wrapper_pulse)(const char*);
+int (*pa_proplist_sets_dylibloader_wrapper_pulse)( pa_proplist*,const char*,const char*);
+int (*pa_proplist_setp_dylibloader_wrapper_pulse)( pa_proplist*,const char*);
+int (*pa_proplist_setf_dylibloader_wrapper_pulse)( pa_proplist*,const char*,const char*,...);
+int (*pa_proplist_set_dylibloader_wrapper_pulse)( pa_proplist*,const char*,const void*, size_t);
+const char* (*pa_proplist_gets_dylibloader_wrapper_pulse)(const pa_proplist*,const char*);
+int (*pa_proplist_get_dylibloader_wrapper_pulse)(const pa_proplist*,const char*,const void**, size_t*);
+void (*pa_proplist_update_dylibloader_wrapper_pulse)( pa_proplist*, pa_update_mode_t,const pa_proplist*);
+int (*pa_proplist_unset_dylibloader_wrapper_pulse)( pa_proplist*,const char*);
+int (*pa_proplist_unset_many_dylibloader_wrapper_pulse)( pa_proplist*,const char* []);
+const char* (*pa_proplist_iterate_dylibloader_wrapper_pulse)(const pa_proplist*, void**);
+char* (*pa_proplist_to_string_dylibloader_wrapper_pulse)(const pa_proplist*);
+char* (*pa_proplist_to_string_sep_dylibloader_wrapper_pulse)(const pa_proplist*,const char*);
+pa_proplist* (*pa_proplist_from_string_dylibloader_wrapper_pulse)(const char*);
+int (*pa_proplist_contains_dylibloader_wrapper_pulse)(const pa_proplist*,const char*);
+void (*pa_proplist_clear_dylibloader_wrapper_pulse)( pa_proplist*);
+pa_proplist* (*pa_proplist_copy_dylibloader_wrapper_pulse)(const pa_proplist*);
+unsigned (*pa_proplist_size_dylibloader_wrapper_pulse)(const pa_proplist*);
+int (*pa_proplist_isempty_dylibloader_wrapper_pulse)(const pa_proplist*);
+int (*pa_proplist_equal_dylibloader_wrapper_pulse)(const pa_proplist*,const pa_proplist*);
+pa_channel_map* (*pa_channel_map_init_dylibloader_wrapper_pulse)( pa_channel_map*);
+pa_channel_map* (*pa_channel_map_init_mono_dylibloader_wrapper_pulse)( pa_channel_map*);
+pa_channel_map* (*pa_channel_map_init_stereo_dylibloader_wrapper_pulse)( pa_channel_map*);
+pa_channel_map* (*pa_channel_map_init_auto_dylibloader_wrapper_pulse)( pa_channel_map*, unsigned, pa_channel_map_def_t);
+pa_channel_map* (*pa_channel_map_init_extend_dylibloader_wrapper_pulse)( pa_channel_map*, unsigned, pa_channel_map_def_t);
+const char* (*pa_channel_position_to_string_dylibloader_wrapper_pulse)( pa_channel_position_t);
+pa_channel_position_t (*pa_channel_position_from_string_dylibloader_wrapper_pulse)(const char*);
+const char* (*pa_channel_position_to_pretty_string_dylibloader_wrapper_pulse)( pa_channel_position_t);
+char* (*pa_channel_map_snprint_dylibloader_wrapper_pulse)( char*, size_t,const pa_channel_map*);
+pa_channel_map* (*pa_channel_map_parse_dylibloader_wrapper_pulse)( pa_channel_map*,const char*);
+int (*pa_channel_map_equal_dylibloader_wrapper_pulse)(const pa_channel_map*,const pa_channel_map*);
+int (*pa_channel_map_valid_dylibloader_wrapper_pulse)(const pa_channel_map*);
+int (*pa_channel_map_compatible_dylibloader_wrapper_pulse)(const pa_channel_map*,const pa_sample_spec*);
+int (*pa_channel_map_superset_dylibloader_wrapper_pulse)(const pa_channel_map*,const pa_channel_map*);
+int (*pa_channel_map_can_balance_dylibloader_wrapper_pulse)(const pa_channel_map*);
+int (*pa_channel_map_can_fade_dylibloader_wrapper_pulse)(const pa_channel_map*);
+int (*pa_channel_map_can_lfe_balance_dylibloader_wrapper_pulse)(const pa_channel_map*);
+const char* (*pa_channel_map_to_name_dylibloader_wrapper_pulse)(const pa_channel_map*);
+const char* (*pa_channel_map_to_pretty_name_dylibloader_wrapper_pulse)(const pa_channel_map*);
+int (*pa_channel_map_has_position_dylibloader_wrapper_pulse)(const pa_channel_map*, pa_channel_position_t);
+pa_channel_position_mask_t (*pa_channel_map_mask_dylibloader_wrapper_pulse)(const pa_channel_map*);
+const char* (*pa_encoding_to_string_dylibloader_wrapper_pulse)( pa_encoding_t);
+pa_encoding_t (*pa_encoding_from_string_dylibloader_wrapper_pulse)(const char*);
+pa_format_info* (*pa_format_info_new_dylibloader_wrapper_pulse)( void);
+pa_format_info* (*pa_format_info_copy_dylibloader_wrapper_pulse)(const pa_format_info*);
+void (*pa_format_info_free_dylibloader_wrapper_pulse)( pa_format_info*);
+int (*pa_format_info_valid_dylibloader_wrapper_pulse)(const pa_format_info*);
+int (*pa_format_info_is_pcm_dylibloader_wrapper_pulse)(const pa_format_info*);
+int (*pa_format_info_is_compatible_dylibloader_wrapper_pulse)(const pa_format_info*,const pa_format_info*);
+char* (*pa_format_info_snprint_dylibloader_wrapper_pulse)( char*, size_t,const pa_format_info*);
+pa_format_info* (*pa_format_info_from_string_dylibloader_wrapper_pulse)(const char*);
+pa_format_info* (*pa_format_info_from_sample_spec_dylibloader_wrapper_pulse)(const pa_sample_spec*,const pa_channel_map*);
+int (*pa_format_info_to_sample_spec_dylibloader_wrapper_pulse)(const pa_format_info*, pa_sample_spec*, pa_channel_map*);
+pa_prop_type_t (*pa_format_info_get_prop_type_dylibloader_wrapper_pulse)(const pa_format_info*,const char*);
+int (*pa_format_info_get_prop_int_dylibloader_wrapper_pulse)(const pa_format_info*,const char*, int*);
+int (*pa_format_info_get_prop_int_range_dylibloader_wrapper_pulse)(const pa_format_info*,const char*, int*, int*);
+int (*pa_format_info_get_prop_int_array_dylibloader_wrapper_pulse)(const pa_format_info*,const char*, int**, int*);
+int (*pa_format_info_get_prop_string_dylibloader_wrapper_pulse)(const pa_format_info*,const char*, char**);
+int (*pa_format_info_get_prop_string_array_dylibloader_wrapper_pulse)(const pa_format_info*,const char*, char***, int*);
+void (*pa_format_info_free_string_array_dylibloader_wrapper_pulse)( char**, int);
+int (*pa_format_info_get_sample_format_dylibloader_wrapper_pulse)(const pa_format_info*, pa_sample_format_t*);
+int (*pa_format_info_get_rate_dylibloader_wrapper_pulse)(const pa_format_info*, uint32_t*);
+int (*pa_format_info_get_channels_dylibloader_wrapper_pulse)(const pa_format_info*, uint8_t*);
+int (*pa_format_info_get_channel_map_dylibloader_wrapper_pulse)(const pa_format_info*, pa_channel_map*);
+void (*pa_format_info_set_prop_int_dylibloader_wrapper_pulse)( pa_format_info*,const char*, int);
+void (*pa_format_info_set_prop_int_array_dylibloader_wrapper_pulse)( pa_format_info*,const char*,const int*, int);
+void (*pa_format_info_set_prop_int_range_dylibloader_wrapper_pulse)( pa_format_info*,const char*, int, int);
+void (*pa_format_info_set_prop_string_dylibloader_wrapper_pulse)( pa_format_info*,const char*,const char*);
+void (*pa_format_info_set_prop_string_array_dylibloader_wrapper_pulse)( pa_format_info*,const char*,const char**, int);
+void (*pa_format_info_set_sample_format_dylibloader_wrapper_pulse)( pa_format_info*, pa_sample_format_t);
+void (*pa_format_info_set_rate_dylibloader_wrapper_pulse)( pa_format_info*, int);
+void (*pa_format_info_set_channels_dylibloader_wrapper_pulse)( pa_format_info*, int);
+void (*pa_format_info_set_channel_map_dylibloader_wrapper_pulse)( pa_format_info*,const pa_channel_map*);
+pa_operation* (*pa_operation_ref_dylibloader_wrapper_pulse)( pa_operation*);
+void (*pa_operation_unref_dylibloader_wrapper_pulse)( pa_operation*);
+void (*pa_operation_cancel_dylibloader_wrapper_pulse)( pa_operation*);
+pa_operation_state_t (*pa_operation_get_state_dylibloader_wrapper_pulse)(const pa_operation*);
+void (*pa_operation_set_state_callback_dylibloader_wrapper_pulse)( pa_operation*, pa_operation_notify_cb_t, void*);
+pa_context* (*pa_context_new_dylibloader_wrapper_pulse)( pa_mainloop_api*,const char*);
+pa_context* (*pa_context_new_with_proplist_dylibloader_wrapper_pulse)( pa_mainloop_api*,const char*,const pa_proplist*);
+void (*pa_context_unref_dylibloader_wrapper_pulse)( pa_context*);
+pa_context* (*pa_context_ref_dylibloader_wrapper_pulse)( pa_context*);
+void (*pa_context_set_state_callback_dylibloader_wrapper_pulse)( pa_context*, pa_context_notify_cb_t, void*);
+void (*pa_context_set_event_callback_dylibloader_wrapper_pulse)( pa_context*, pa_context_event_cb_t, void*);
+int (*pa_context_errno_dylibloader_wrapper_pulse)(const pa_context*);
+int (*pa_context_is_pending_dylibloader_wrapper_pulse)(const pa_context*);
+pa_context_state_t (*pa_context_get_state_dylibloader_wrapper_pulse)(const pa_context*);
+int (*pa_context_connect_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_context_flags_t,const pa_spawn_api*);
+void (*pa_context_disconnect_dylibloader_wrapper_pulse)( pa_context*);
+pa_operation* (*pa_context_drain_dylibloader_wrapper_pulse)( pa_context*, pa_context_notify_cb_t, void*);
+pa_operation* (*pa_context_exit_daemon_dylibloader_wrapper_pulse)( pa_context*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_default_sink_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_default_source_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_context_success_cb_t, void*);
+int (*pa_context_is_local_dylibloader_wrapper_pulse)(const pa_context*);
+pa_operation* (*pa_context_set_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_context_success_cb_t, void*);
+const char* (*pa_context_get_server_dylibloader_wrapper_pulse)(const pa_context*);
+uint32_t (*pa_context_get_protocol_version_dylibloader_wrapper_pulse)(const pa_context*);
+uint32_t (*pa_context_get_server_protocol_version_dylibloader_wrapper_pulse)(const pa_context*);
+pa_operation* (*pa_context_proplist_update_dylibloader_wrapper_pulse)( pa_context*, pa_update_mode_t,const pa_proplist*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_proplist_remove_dylibloader_wrapper_pulse)( pa_context*,const char* [], pa_context_success_cb_t, void*);
+uint32_t (*pa_context_get_index_dylibloader_wrapper_pulse)(const pa_context*);
+pa_time_event* (*pa_context_rttime_new_dylibloader_wrapper_pulse)(const pa_context*, pa_usec_t, pa_time_event_cb_t, void*);
+void (*pa_context_rttime_restart_dylibloader_wrapper_pulse)(const pa_context*, pa_time_event*, pa_usec_t);
+size_t (*pa_context_get_tile_size_dylibloader_wrapper_pulse)(const pa_context*,const pa_sample_spec*);
+int (*pa_context_load_cookie_from_file_dylibloader_wrapper_pulse)( pa_context*,const char*);
+int (*pa_cvolume_equal_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_cvolume*);
+pa_cvolume* (*pa_cvolume_init_dylibloader_wrapper_pulse)( pa_cvolume*);
+pa_cvolume* (*pa_cvolume_set_dylibloader_wrapper_pulse)( pa_cvolume*, unsigned, pa_volume_t);
+char* (*pa_cvolume_snprint_dylibloader_wrapper_pulse)( char*, size_t,const pa_cvolume*);
+char* (*pa_sw_cvolume_snprint_dB_dylibloader_wrapper_pulse)( char*, size_t,const pa_cvolume*);
+char* (*pa_cvolume_snprint_verbose_dylibloader_wrapper_pulse)( char*, size_t,const pa_cvolume*,const pa_channel_map*, int);
+char* (*pa_volume_snprint_dylibloader_wrapper_pulse)( char*, size_t, pa_volume_t);
+char* (*pa_sw_volume_snprint_dB_dylibloader_wrapper_pulse)( char*, size_t, pa_volume_t);
+char* (*pa_volume_snprint_verbose_dylibloader_wrapper_pulse)( char*, size_t, pa_volume_t, int);
+pa_volume_t (*pa_cvolume_avg_dylibloader_wrapper_pulse)(const pa_cvolume*);
+pa_volume_t (*pa_cvolume_avg_mask_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*, pa_channel_position_mask_t);
+pa_volume_t (*pa_cvolume_max_dylibloader_wrapper_pulse)(const pa_cvolume*);
+pa_volume_t (*pa_cvolume_max_mask_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*, pa_channel_position_mask_t);
+pa_volume_t (*pa_cvolume_min_dylibloader_wrapper_pulse)(const pa_cvolume*);
+pa_volume_t (*pa_cvolume_min_mask_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*, pa_channel_position_mask_t);
+int (*pa_cvolume_valid_dylibloader_wrapper_pulse)(const pa_cvolume*);
+int (*pa_cvolume_channels_equal_to_dylibloader_wrapper_pulse)(const pa_cvolume*, pa_volume_t);
+pa_volume_t (*pa_sw_volume_multiply_dylibloader_wrapper_pulse)( pa_volume_t, pa_volume_t);
+pa_cvolume* (*pa_sw_cvolume_multiply_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_cvolume*,const pa_cvolume*);
+pa_cvolume* (*pa_sw_cvolume_multiply_scalar_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_cvolume*, pa_volume_t);
+pa_volume_t (*pa_sw_volume_divide_dylibloader_wrapper_pulse)( pa_volume_t, pa_volume_t);
+pa_cvolume* (*pa_sw_cvolume_divide_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_cvolume*,const pa_cvolume*);
+pa_cvolume* (*pa_sw_cvolume_divide_scalar_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_cvolume*, pa_volume_t);
+pa_volume_t (*pa_sw_volume_from_dB_dylibloader_wrapper_pulse)( double);
+double (*pa_sw_volume_to_dB_dylibloader_wrapper_pulse)( pa_volume_t);
+pa_volume_t (*pa_sw_volume_from_linear_dylibloader_wrapper_pulse)( double);
+double (*pa_sw_volume_to_linear_dylibloader_wrapper_pulse)( pa_volume_t);
+pa_cvolume* (*pa_cvolume_remap_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_channel_map*,const pa_channel_map*);
+int (*pa_cvolume_compatible_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_sample_spec*);
+int (*pa_cvolume_compatible_with_channel_map_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*);
+float (*pa_cvolume_get_balance_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*);
+pa_cvolume* (*pa_cvolume_set_balance_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_channel_map*, float);
+float (*pa_cvolume_get_fade_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*);
+pa_cvolume* (*pa_cvolume_set_fade_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_channel_map*, float);
+float (*pa_cvolume_get_lfe_balance_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*);
+pa_cvolume* (*pa_cvolume_set_lfe_balance_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_channel_map*, float);
+pa_cvolume* (*pa_cvolume_scale_dylibloader_wrapper_pulse)( pa_cvolume*, pa_volume_t);
+pa_cvolume* (*pa_cvolume_scale_mask_dylibloader_wrapper_pulse)( pa_cvolume*, pa_volume_t,const pa_channel_map*, pa_channel_position_mask_t);
+pa_cvolume* (*pa_cvolume_set_position_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_channel_map*, pa_channel_position_t, pa_volume_t);
+pa_volume_t (*pa_cvolume_get_position_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*, pa_channel_position_t);
+pa_cvolume* (*pa_cvolume_merge_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_cvolume*,const pa_cvolume*);
+pa_cvolume* (*pa_cvolume_inc_clamp_dylibloader_wrapper_pulse)( pa_cvolume*, pa_volume_t, pa_volume_t);
+pa_cvolume* (*pa_cvolume_inc_dylibloader_wrapper_pulse)( pa_cvolume*, pa_volume_t);
+pa_cvolume* (*pa_cvolume_dec_dylibloader_wrapper_pulse)( pa_cvolume*, pa_volume_t);
+pa_stream* (*pa_stream_new_dylibloader_wrapper_pulse)( pa_context*,const char*,const pa_sample_spec*,const pa_channel_map*);
+pa_stream* (*pa_stream_new_with_proplist_dylibloader_wrapper_pulse)( pa_context*,const char*,const pa_sample_spec*,const pa_channel_map*, pa_proplist*);
+pa_stream* (*pa_stream_new_extended_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_format_info**, unsigned int, pa_proplist*);
+void (*pa_stream_unref_dylibloader_wrapper_pulse)( pa_stream*);
+pa_stream* (*pa_stream_ref_dylibloader_wrapper_pulse)( pa_stream*);
+pa_stream_state_t (*pa_stream_get_state_dylibloader_wrapper_pulse)(const pa_stream*);
+pa_context* (*pa_stream_get_context_dylibloader_wrapper_pulse)(const pa_stream*);
+uint32_t (*pa_stream_get_index_dylibloader_wrapper_pulse)(const pa_stream*);
+uint32_t (*pa_stream_get_device_index_dylibloader_wrapper_pulse)(const pa_stream*);
+const char* (*pa_stream_get_device_name_dylibloader_wrapper_pulse)(const pa_stream*);
+int (*pa_stream_is_suspended_dylibloader_wrapper_pulse)(const pa_stream*);
+int (*pa_stream_is_corked_dylibloader_wrapper_pulse)(const pa_stream*);
+int (*pa_stream_connect_playback_dylibloader_wrapper_pulse)( pa_stream*,const char*,const pa_buffer_attr*, pa_stream_flags_t,const pa_cvolume*, pa_stream*);
+int (*pa_stream_connect_record_dylibloader_wrapper_pulse)( pa_stream*,const char*,const pa_buffer_attr*, pa_stream_flags_t);
+int (*pa_stream_disconnect_dylibloader_wrapper_pulse)( pa_stream*);
+int (*pa_stream_begin_write_dylibloader_wrapper_pulse)( pa_stream*, void**, size_t*);
+int (*pa_stream_cancel_write_dylibloader_wrapper_pulse)( pa_stream*);
+int (*pa_stream_write_dylibloader_wrapper_pulse)( pa_stream*,const void*, size_t, pa_free_cb_t, int64_t, pa_seek_mode_t);
+int (*pa_stream_write_ext_free_dylibloader_wrapper_pulse)( pa_stream*,const void*, size_t, pa_free_cb_t, void*, int64_t, pa_seek_mode_t);
+int (*pa_stream_peek_dylibloader_wrapper_pulse)( pa_stream*,const void**, size_t*);
+int (*pa_stream_drop_dylibloader_wrapper_pulse)( pa_stream*);
+size_t (*pa_stream_writable_size_dylibloader_wrapper_pulse)(const pa_stream*);
+size_t (*pa_stream_readable_size_dylibloader_wrapper_pulse)(const pa_stream*);
+pa_operation* (*pa_stream_drain_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_success_cb_t, void*);
+pa_operation* (*pa_stream_update_timing_info_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_success_cb_t, void*);
+void (*pa_stream_set_state_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+void (*pa_stream_set_write_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_request_cb_t, void*);
+void (*pa_stream_set_read_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_request_cb_t, void*);
+void (*pa_stream_set_overflow_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+int64_t (*pa_stream_get_underflow_index_dylibloader_wrapper_pulse)(const pa_stream*);
+void (*pa_stream_set_underflow_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+void (*pa_stream_set_started_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+void (*pa_stream_set_latency_update_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+void (*pa_stream_set_moved_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+void (*pa_stream_set_suspended_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+void (*pa_stream_set_event_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_event_cb_t, void*);
+void (*pa_stream_set_buffer_attr_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+pa_operation* (*pa_stream_cork_dylibloader_wrapper_pulse)( pa_stream*, int, pa_stream_success_cb_t, void*);
+pa_operation* (*pa_stream_flush_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_success_cb_t, void*);
+pa_operation* (*pa_stream_prebuf_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_success_cb_t, void*);
+pa_operation* (*pa_stream_trigger_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_success_cb_t, void*);
+pa_operation* (*pa_stream_set_name_dylibloader_wrapper_pulse)( pa_stream*,const char*, pa_stream_success_cb_t, void*);
+int (*pa_stream_get_time_dylibloader_wrapper_pulse)( pa_stream*, pa_usec_t*);
+int (*pa_stream_get_latency_dylibloader_wrapper_pulse)( pa_stream*, pa_usec_t*, int*);
+const pa_timing_info* (*pa_stream_get_timing_info_dylibloader_wrapper_pulse)( pa_stream*);
+const pa_sample_spec* (*pa_stream_get_sample_spec_dylibloader_wrapper_pulse)( pa_stream*);
+const pa_channel_map* (*pa_stream_get_channel_map_dylibloader_wrapper_pulse)( pa_stream*);
+const pa_format_info* (*pa_stream_get_format_info_dylibloader_wrapper_pulse)(const pa_stream*);
+const pa_buffer_attr* (*pa_stream_get_buffer_attr_dylibloader_wrapper_pulse)( pa_stream*);
+pa_operation* (*pa_stream_set_buffer_attr_dylibloader_wrapper_pulse)( pa_stream*,const pa_buffer_attr*, pa_stream_success_cb_t, void*);
+pa_operation* (*pa_stream_update_sample_rate_dylibloader_wrapper_pulse)( pa_stream*, uint32_t, pa_stream_success_cb_t, void*);
+pa_operation* (*pa_stream_proplist_update_dylibloader_wrapper_pulse)( pa_stream*, pa_update_mode_t, pa_proplist*, pa_stream_success_cb_t, void*);
+pa_operation* (*pa_stream_proplist_remove_dylibloader_wrapper_pulse)( pa_stream*,const char* [], pa_stream_success_cb_t, void*);
+int (*pa_stream_set_monitor_stream_dylibloader_wrapper_pulse)( pa_stream*, uint32_t);
+uint32_t (*pa_stream_get_monitor_stream_dylibloader_wrapper_pulse)(const pa_stream*);
+pa_operation* (*pa_context_get_sink_info_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_sink_info_cb_t, void*);
+pa_operation* (*pa_context_get_sink_info_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_sink_info_cb_t, void*);
+pa_operation* (*pa_context_get_sink_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_sink_info_cb_t, void*);
+pa_operation* (*pa_context_set_sink_volume_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const pa_cvolume*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_sink_volume_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*,const pa_cvolume*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_sink_mute_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_sink_mute_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, int, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_suspend_sink_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, int, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_suspend_sink_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_sink_port_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const char*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_sink_port_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_get_source_info_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_source_info_cb_t, void*);
+pa_operation* (*pa_context_get_source_info_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_source_info_cb_t, void*);
+pa_operation* (*pa_context_get_source_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_source_info_cb_t, void*);
+pa_operation* (*pa_context_set_source_volume_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const pa_cvolume*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_source_volume_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*,const pa_cvolume*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_source_mute_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_source_mute_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, int, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_suspend_source_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, int, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_suspend_source_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_source_port_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const char*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_source_port_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_get_server_info_dylibloader_wrapper_pulse)( pa_context*, pa_server_info_cb_t, void*);
+pa_operation* (*pa_context_get_module_info_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_module_info_cb_t, void*);
+pa_operation* (*pa_context_get_module_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_module_info_cb_t, void*);
+pa_operation* (*pa_context_load_module_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_context_index_cb_t, void*);
+pa_operation* (*pa_context_unload_module_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_get_client_info_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_client_info_cb_t, void*);
+pa_operation* (*pa_context_get_client_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_client_info_cb_t, void*);
+pa_operation* (*pa_context_kill_client_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_get_card_info_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_card_info_cb_t, void*);
+pa_operation* (*pa_context_get_card_info_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_card_info_cb_t, void*);
+pa_operation* (*pa_context_get_card_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_card_info_cb_t, void*);
+pa_operation* (*pa_context_set_card_profile_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const char*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_card_profile_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_port_latency_offset_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, int64_t, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_get_sink_input_info_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_sink_input_info_cb_t, void*);
+pa_operation* (*pa_context_get_sink_input_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_sink_input_info_cb_t, void*);
+pa_operation* (*pa_context_move_sink_input_by_name_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const char*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_move_sink_input_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, uint32_t, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_sink_input_volume_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const pa_cvolume*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_sink_input_mute_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_kill_sink_input_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_get_source_output_info_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_source_output_info_cb_t, void*);
+pa_operation* (*pa_context_get_source_output_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_source_output_info_cb_t, void*);
+pa_operation* (*pa_context_move_source_output_by_name_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const char*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_move_source_output_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, uint32_t, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_source_output_volume_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const pa_cvolume*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_set_source_output_mute_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_kill_source_output_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_stat_dylibloader_wrapper_pulse)( pa_context*, pa_stat_info_cb_t, void*);
+pa_operation* (*pa_context_get_sample_info_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_sample_info_cb_t, void*);
+pa_operation* (*pa_context_get_sample_info_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_sample_info_cb_t, void*);
+pa_operation* (*pa_context_get_sample_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_sample_info_cb_t, void*);
+pa_operation* (*pa_context_get_autoload_info_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_autoload_type_t, pa_autoload_info_cb_t, void*);
+pa_operation* (*pa_context_get_autoload_info_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_autoload_info_cb_t, void*);
+pa_operation* (*pa_context_get_autoload_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_autoload_info_cb_t, void*);
+pa_operation* (*pa_context_add_autoload_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_autoload_type_t,const char*,const char*, pa_context_index_cb_t, void*);
+pa_operation* (*pa_context_remove_autoload_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_autoload_type_t, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_remove_autoload_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_subscribe_dylibloader_wrapper_pulse)( pa_context*, pa_subscription_mask_t, pa_context_success_cb_t, void*);
+void (*pa_context_set_subscribe_callback_dylibloader_wrapper_pulse)( pa_context*, pa_context_subscribe_cb_t, void*);
+int (*pa_stream_connect_upload_dylibloader_wrapper_pulse)( pa_stream*, size_t);
+int (*pa_stream_finish_upload_dylibloader_wrapper_pulse)( pa_stream*);
+pa_operation* (*pa_context_remove_sample_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_play_sample_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_volume_t, pa_context_success_cb_t, void*);
+pa_operation* (*pa_context_play_sample_with_proplist_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_volume_t,const pa_proplist*, pa_context_play_sample_cb_t, void*);
+const char* (*pa_strerror_dylibloader_wrapper_pulse)( int);
+void* (*pa_xmalloc_dylibloader_wrapper_pulse)( size_t);
+void* (*pa_xmalloc0_dylibloader_wrapper_pulse)( size_t);
+void* (*pa_xrealloc_dylibloader_wrapper_pulse)( void*, size_t);
+void (*pa_xfree_dylibloader_wrapper_pulse)( void*);
+char* (*pa_xstrdup_dylibloader_wrapper_pulse)(const char*);
+char* (*pa_xstrndup_dylibloader_wrapper_pulse)(const char*, size_t);
+void* (*pa_xmemdup_dylibloader_wrapper_pulse)(const void*, size_t);
+char* (*pa_utf8_valid_dylibloader_wrapper_pulse)(const char*);
+char* (*pa_ascii_valid_dylibloader_wrapper_pulse)(const char*);
+char* (*pa_utf8_filter_dylibloader_wrapper_pulse)(const char*);
+char* (*pa_ascii_filter_dylibloader_wrapper_pulse)(const char*);
+char* (*pa_utf8_to_locale_dylibloader_wrapper_pulse)(const char*);
+char* (*pa_locale_to_utf8_dylibloader_wrapper_pulse)(const char*);
+pa_threaded_mainloop* (*pa_threaded_mainloop_new_dylibloader_wrapper_pulse)( void);
+void (*pa_threaded_mainloop_free_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+int (*pa_threaded_mainloop_start_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+void (*pa_threaded_mainloop_stop_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+void (*pa_threaded_mainloop_lock_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+void (*pa_threaded_mainloop_unlock_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+void (*pa_threaded_mainloop_wait_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+void (*pa_threaded_mainloop_signal_dylibloader_wrapper_pulse)( pa_threaded_mainloop*, int);
+void (*pa_threaded_mainloop_accept_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+int (*pa_threaded_mainloop_get_retval_dylibloader_wrapper_pulse)(const pa_threaded_mainloop*);
+pa_mainloop_api* (*pa_threaded_mainloop_get_api_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+int (*pa_threaded_mainloop_in_thread_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+void (*pa_threaded_mainloop_set_name_dylibloader_wrapper_pulse)( pa_threaded_mainloop*,const char*);
+void (*pa_threaded_mainloop_once_unlocked_dylibloader_wrapper_pulse)( pa_threaded_mainloop*, void*, void*);
+pa_mainloop* (*pa_mainloop_new_dylibloader_wrapper_pulse)( void);
+void (*pa_mainloop_free_dylibloader_wrapper_pulse)( pa_mainloop*);
+int (*pa_mainloop_prepare_dylibloader_wrapper_pulse)( pa_mainloop*, int);
+int (*pa_mainloop_poll_dylibloader_wrapper_pulse)( pa_mainloop*);
+int (*pa_mainloop_dispatch_dylibloader_wrapper_pulse)( pa_mainloop*);
+int (*pa_mainloop_get_retval_dylibloader_wrapper_pulse)(const pa_mainloop*);
+int (*pa_mainloop_iterate_dylibloader_wrapper_pulse)( pa_mainloop*, int, int*);
+int (*pa_mainloop_run_dylibloader_wrapper_pulse)( pa_mainloop*, int*);
+pa_mainloop_api* (*pa_mainloop_get_api_dylibloader_wrapper_pulse)( pa_mainloop*);
+void (*pa_mainloop_quit_dylibloader_wrapper_pulse)( pa_mainloop*, int);
+void (*pa_mainloop_wakeup_dylibloader_wrapper_pulse)( pa_mainloop*);
+void (*pa_mainloop_set_poll_func_dylibloader_wrapper_pulse)( pa_mainloop*, pa_poll_func, void*);
+int (*pa_signal_init_dylibloader_wrapper_pulse)( pa_mainloop_api*);
+void (*pa_signal_done_dylibloader_wrapper_pulse)( void);
+pa_signal_event* (*pa_signal_new_dylibloader_wrapper_pulse)( int, pa_signal_cb_t, void*);
+void (*pa_signal_free_dylibloader_wrapper_pulse)( pa_signal_event*);
+void (*pa_signal_set_destroy_dylibloader_wrapper_pulse)( pa_signal_event*, pa_signal_destroy_cb_t);
+char* (*pa_get_user_name_dylibloader_wrapper_pulse)( char*, size_t);
+char* (*pa_get_host_name_dylibloader_wrapper_pulse)( char*, size_t);
+char* (*pa_get_fqdn_dylibloader_wrapper_pulse)( char*, size_t);
+char* (*pa_get_home_dir_dylibloader_wrapper_pulse)( char*, size_t);
+char* (*pa_get_binary_name_dylibloader_wrapper_pulse)( char*, size_t);
+char* (*pa_path_get_filename_dylibloader_wrapper_pulse)(const char*);
+int (*pa_msleep_dylibloader_wrapper_pulse)( unsigned long);
+int (*pa_thread_make_realtime_dylibloader_wrapper_pulse)( int);
+struct timeval* (*pa_gettimeofday_dylibloader_wrapper_pulse)(struct timeval*);
+pa_usec_t (*pa_timeval_diff_dylibloader_wrapper_pulse)(struct timeval*,struct timeval*);
+int (*pa_timeval_cmp_dylibloader_wrapper_pulse)(struct timeval*,struct timeval*);
+pa_usec_t (*pa_timeval_age_dylibloader_wrapper_pulse)(struct timeval*);
+struct timeval* (*pa_timeval_add_dylibloader_wrapper_pulse)(struct timeval*, pa_usec_t);
+struct timeval* (*pa_timeval_sub_dylibloader_wrapper_pulse)(struct timeval*, pa_usec_t);
+struct timeval* (*pa_timeval_store_dylibloader_wrapper_pulse)(struct timeval*, pa_usec_t);
+pa_usec_t (*pa_timeval_load_dylibloader_wrapper_pulse)(struct timeval*);
+pa_usec_t (*pa_rtclock_now_dylibloader_wrapper_pulse)( void);
+int initialize_pulse() {
+ void *handle;
+ char *error;
+ handle = dlopen("libpulse.so.0", RTLD_LAZY);
+ if (!handle) {
+ fprintf(stderr, "%s\n", dlerror());
+ return(1);
+ }
+ dlerror();
+// pa_get_library_version
+ *(void **) (&pa_get_library_version_dylibloader_wrapper_pulse) = dlsym(handle, "pa_get_library_version");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_bytes_per_second
+ *(void **) (&pa_bytes_per_second_dylibloader_wrapper_pulse) = dlsym(handle, "pa_bytes_per_second");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_frame_size
+ *(void **) (&pa_frame_size_dylibloader_wrapper_pulse) = dlsym(handle, "pa_frame_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_size
+ *(void **) (&pa_sample_size_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_size_of_format
+ *(void **) (&pa_sample_size_of_format_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_size_of_format");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_bytes_to_usec
+ *(void **) (&pa_bytes_to_usec_dylibloader_wrapper_pulse) = dlsym(handle, "pa_bytes_to_usec");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_usec_to_bytes
+ *(void **) (&pa_usec_to_bytes_dylibloader_wrapper_pulse) = dlsym(handle, "pa_usec_to_bytes");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_spec_init
+ *(void **) (&pa_sample_spec_init_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_spec_init");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_format_valid
+ *(void **) (&pa_sample_format_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_format_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_rate_valid
+ *(void **) (&pa_sample_rate_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_rate_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channels_valid
+ *(void **) (&pa_channels_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channels_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_spec_valid
+ *(void **) (&pa_sample_spec_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_spec_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_spec_equal
+ *(void **) (&pa_sample_spec_equal_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_spec_equal");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_format_to_string
+ *(void **) (&pa_sample_format_to_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_format_to_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_parse_sample_format
+ *(void **) (&pa_parse_sample_format_dylibloader_wrapper_pulse) = dlsym(handle, "pa_parse_sample_format");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_spec_snprint
+ *(void **) (&pa_sample_spec_snprint_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_spec_snprint");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_bytes_snprint
+ *(void **) (&pa_bytes_snprint_dylibloader_wrapper_pulse) = dlsym(handle, "pa_bytes_snprint");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_format_is_le
+ *(void **) (&pa_sample_format_is_le_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_format_is_le");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sample_format_is_be
+ *(void **) (&pa_sample_format_is_be_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sample_format_is_be");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_direction_valid
+ *(void **) (&pa_direction_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_direction_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_direction_to_string
+ *(void **) (&pa_direction_to_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_direction_to_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_api_once
+ *(void **) (&pa_mainloop_api_once_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_api_once");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_new
+ *(void **) (&pa_proplist_new_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_free
+ *(void **) (&pa_proplist_free_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_key_valid
+ *(void **) (&pa_proplist_key_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_key_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_sets
+ *(void **) (&pa_proplist_sets_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_sets");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_setp
+ *(void **) (&pa_proplist_setp_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_setp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_setf
+ *(void **) (&pa_proplist_setf_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_setf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_set
+ *(void **) (&pa_proplist_set_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_set");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_gets
+ *(void **) (&pa_proplist_gets_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_gets");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_get
+ *(void **) (&pa_proplist_get_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_get");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_update
+ *(void **) (&pa_proplist_update_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_update");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_unset
+ *(void **) (&pa_proplist_unset_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_unset");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_unset_many
+ *(void **) (&pa_proplist_unset_many_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_unset_many");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_iterate
+ *(void **) (&pa_proplist_iterate_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_iterate");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_to_string
+ *(void **) (&pa_proplist_to_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_to_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_to_string_sep
+ *(void **) (&pa_proplist_to_string_sep_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_to_string_sep");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_from_string
+ *(void **) (&pa_proplist_from_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_from_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_contains
+ *(void **) (&pa_proplist_contains_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_contains");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_clear
+ *(void **) (&pa_proplist_clear_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_clear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_copy
+ *(void **) (&pa_proplist_copy_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_size
+ *(void **) (&pa_proplist_size_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_isempty
+ *(void **) (&pa_proplist_isempty_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_isempty");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_proplist_equal
+ *(void **) (&pa_proplist_equal_dylibloader_wrapper_pulse) = dlsym(handle, "pa_proplist_equal");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_init
+ *(void **) (&pa_channel_map_init_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_init");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_init_mono
+ *(void **) (&pa_channel_map_init_mono_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_init_mono");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_init_stereo
+ *(void **) (&pa_channel_map_init_stereo_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_init_stereo");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_init_auto
+ *(void **) (&pa_channel_map_init_auto_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_init_auto");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_init_extend
+ *(void **) (&pa_channel_map_init_extend_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_init_extend");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_position_to_string
+ *(void **) (&pa_channel_position_to_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_position_to_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_position_from_string
+ *(void **) (&pa_channel_position_from_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_position_from_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_position_to_pretty_string
+ *(void **) (&pa_channel_position_to_pretty_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_position_to_pretty_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_snprint
+ *(void **) (&pa_channel_map_snprint_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_snprint");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_parse
+ *(void **) (&pa_channel_map_parse_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_parse");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_equal
+ *(void **) (&pa_channel_map_equal_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_equal");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_valid
+ *(void **) (&pa_channel_map_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_compatible
+ *(void **) (&pa_channel_map_compatible_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_compatible");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_superset
+ *(void **) (&pa_channel_map_superset_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_superset");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_can_balance
+ *(void **) (&pa_channel_map_can_balance_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_can_balance");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_can_fade
+ *(void **) (&pa_channel_map_can_fade_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_can_fade");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_can_lfe_balance
+ *(void **) (&pa_channel_map_can_lfe_balance_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_can_lfe_balance");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_to_name
+ *(void **) (&pa_channel_map_to_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_to_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_to_pretty_name
+ *(void **) (&pa_channel_map_to_pretty_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_to_pretty_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_has_position
+ *(void **) (&pa_channel_map_has_position_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_has_position");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_channel_map_mask
+ *(void **) (&pa_channel_map_mask_dylibloader_wrapper_pulse) = dlsym(handle, "pa_channel_map_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_encoding_to_string
+ *(void **) (&pa_encoding_to_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_encoding_to_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_encoding_from_string
+ *(void **) (&pa_encoding_from_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_encoding_from_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_new
+ *(void **) (&pa_format_info_new_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_copy
+ *(void **) (&pa_format_info_copy_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_copy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_free
+ *(void **) (&pa_format_info_free_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_valid
+ *(void **) (&pa_format_info_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_is_pcm
+ *(void **) (&pa_format_info_is_pcm_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_is_pcm");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_is_compatible
+ *(void **) (&pa_format_info_is_compatible_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_is_compatible");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_snprint
+ *(void **) (&pa_format_info_snprint_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_snprint");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_from_string
+ *(void **) (&pa_format_info_from_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_from_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_from_sample_spec
+ *(void **) (&pa_format_info_from_sample_spec_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_from_sample_spec");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_to_sample_spec
+ *(void **) (&pa_format_info_to_sample_spec_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_to_sample_spec");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_get_prop_type
+ *(void **) (&pa_format_info_get_prop_type_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_get_prop_type");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_get_prop_int
+ *(void **) (&pa_format_info_get_prop_int_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_get_prop_int");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_get_prop_int_range
+ *(void **) (&pa_format_info_get_prop_int_range_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_get_prop_int_range");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_get_prop_int_array
+ *(void **) (&pa_format_info_get_prop_int_array_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_get_prop_int_array");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_get_prop_string
+ *(void **) (&pa_format_info_get_prop_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_get_prop_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_get_prop_string_array
+ *(void **) (&pa_format_info_get_prop_string_array_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_get_prop_string_array");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_free_string_array
+ *(void **) (&pa_format_info_free_string_array_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_free_string_array");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_get_sample_format
+ *(void **) (&pa_format_info_get_sample_format_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_get_sample_format");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_get_rate
+ *(void **) (&pa_format_info_get_rate_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_get_rate");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_get_channels
+ *(void **) (&pa_format_info_get_channels_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_get_channels");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_get_channel_map
+ *(void **) (&pa_format_info_get_channel_map_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_get_channel_map");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_set_prop_int
+ *(void **) (&pa_format_info_set_prop_int_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_set_prop_int");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_set_prop_int_array
+ *(void **) (&pa_format_info_set_prop_int_array_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_set_prop_int_array");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_set_prop_int_range
+ *(void **) (&pa_format_info_set_prop_int_range_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_set_prop_int_range");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_set_prop_string
+ *(void **) (&pa_format_info_set_prop_string_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_set_prop_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_set_prop_string_array
+ *(void **) (&pa_format_info_set_prop_string_array_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_set_prop_string_array");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_set_sample_format
+ *(void **) (&pa_format_info_set_sample_format_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_set_sample_format");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_set_rate
+ *(void **) (&pa_format_info_set_rate_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_set_rate");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_set_channels
+ *(void **) (&pa_format_info_set_channels_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_set_channels");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_format_info_set_channel_map
+ *(void **) (&pa_format_info_set_channel_map_dylibloader_wrapper_pulse) = dlsym(handle, "pa_format_info_set_channel_map");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_operation_ref
+ *(void **) (&pa_operation_ref_dylibloader_wrapper_pulse) = dlsym(handle, "pa_operation_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_operation_unref
+ *(void **) (&pa_operation_unref_dylibloader_wrapper_pulse) = dlsym(handle, "pa_operation_unref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_operation_cancel
+ *(void **) (&pa_operation_cancel_dylibloader_wrapper_pulse) = dlsym(handle, "pa_operation_cancel");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_operation_get_state
+ *(void **) (&pa_operation_get_state_dylibloader_wrapper_pulse) = dlsym(handle, "pa_operation_get_state");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_operation_set_state_callback
+ *(void **) (&pa_operation_set_state_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_operation_set_state_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_new
+ *(void **) (&pa_context_new_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_new_with_proplist
+ *(void **) (&pa_context_new_with_proplist_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_new_with_proplist");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_unref
+ *(void **) (&pa_context_unref_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_unref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_ref
+ *(void **) (&pa_context_ref_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_state_callback
+ *(void **) (&pa_context_set_state_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_state_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_event_callback
+ *(void **) (&pa_context_set_event_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_event_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_errno
+ *(void **) (&pa_context_errno_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_errno");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_is_pending
+ *(void **) (&pa_context_is_pending_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_is_pending");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_state
+ *(void **) (&pa_context_get_state_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_state");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_connect
+ *(void **) (&pa_context_connect_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_connect");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_disconnect
+ *(void **) (&pa_context_disconnect_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_disconnect");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_drain
+ *(void **) (&pa_context_drain_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_drain");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_exit_daemon
+ *(void **) (&pa_context_exit_daemon_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_exit_daemon");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_default_sink
+ *(void **) (&pa_context_set_default_sink_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_default_sink");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_default_source
+ *(void **) (&pa_context_set_default_source_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_default_source");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_is_local
+ *(void **) (&pa_context_is_local_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_is_local");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_name
+ *(void **) (&pa_context_set_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_server
+ *(void **) (&pa_context_get_server_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_server");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_protocol_version
+ *(void **) (&pa_context_get_protocol_version_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_protocol_version");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_server_protocol_version
+ *(void **) (&pa_context_get_server_protocol_version_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_server_protocol_version");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_proplist_update
+ *(void **) (&pa_context_proplist_update_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_proplist_update");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_proplist_remove
+ *(void **) (&pa_context_proplist_remove_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_proplist_remove");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_index
+ *(void **) (&pa_context_get_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_rttime_new
+ *(void **) (&pa_context_rttime_new_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_rttime_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_rttime_restart
+ *(void **) (&pa_context_rttime_restart_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_rttime_restart");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_tile_size
+ *(void **) (&pa_context_get_tile_size_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_tile_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_load_cookie_from_file
+ *(void **) (&pa_context_load_cookie_from_file_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_load_cookie_from_file");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_equal
+ *(void **) (&pa_cvolume_equal_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_equal");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_init
+ *(void **) (&pa_cvolume_init_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_init");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_set
+ *(void **) (&pa_cvolume_set_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_set");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_snprint
+ *(void **) (&pa_cvolume_snprint_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_snprint");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_cvolume_snprint_dB
+ *(void **) (&pa_sw_cvolume_snprint_dB_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_cvolume_snprint_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_snprint_verbose
+ *(void **) (&pa_cvolume_snprint_verbose_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_snprint_verbose");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_volume_snprint
+ *(void **) (&pa_volume_snprint_dylibloader_wrapper_pulse) = dlsym(handle, "pa_volume_snprint");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_volume_snprint_dB
+ *(void **) (&pa_sw_volume_snprint_dB_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_volume_snprint_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_volume_snprint_verbose
+ *(void **) (&pa_volume_snprint_verbose_dylibloader_wrapper_pulse) = dlsym(handle, "pa_volume_snprint_verbose");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_avg
+ *(void **) (&pa_cvolume_avg_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_avg");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_avg_mask
+ *(void **) (&pa_cvolume_avg_mask_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_avg_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_max
+ *(void **) (&pa_cvolume_max_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_max");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_max_mask
+ *(void **) (&pa_cvolume_max_mask_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_max_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_min
+ *(void **) (&pa_cvolume_min_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_min");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_min_mask
+ *(void **) (&pa_cvolume_min_mask_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_min_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_valid
+ *(void **) (&pa_cvolume_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_channels_equal_to
+ *(void **) (&pa_cvolume_channels_equal_to_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_channels_equal_to");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_volume_multiply
+ *(void **) (&pa_sw_volume_multiply_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_volume_multiply");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_cvolume_multiply
+ *(void **) (&pa_sw_cvolume_multiply_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_cvolume_multiply");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_cvolume_multiply_scalar
+ *(void **) (&pa_sw_cvolume_multiply_scalar_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_cvolume_multiply_scalar");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_volume_divide
+ *(void **) (&pa_sw_volume_divide_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_volume_divide");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_cvolume_divide
+ *(void **) (&pa_sw_cvolume_divide_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_cvolume_divide");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_cvolume_divide_scalar
+ *(void **) (&pa_sw_cvolume_divide_scalar_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_cvolume_divide_scalar");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_volume_from_dB
+ *(void **) (&pa_sw_volume_from_dB_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_volume_from_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_volume_to_dB
+ *(void **) (&pa_sw_volume_to_dB_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_volume_to_dB");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_volume_from_linear
+ *(void **) (&pa_sw_volume_from_linear_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_volume_from_linear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_sw_volume_to_linear
+ *(void **) (&pa_sw_volume_to_linear_dylibloader_wrapper_pulse) = dlsym(handle, "pa_sw_volume_to_linear");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_remap
+ *(void **) (&pa_cvolume_remap_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_remap");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_compatible
+ *(void **) (&pa_cvolume_compatible_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_compatible");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_compatible_with_channel_map
+ *(void **) (&pa_cvolume_compatible_with_channel_map_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_compatible_with_channel_map");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_get_balance
+ *(void **) (&pa_cvolume_get_balance_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_get_balance");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_set_balance
+ *(void **) (&pa_cvolume_set_balance_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_set_balance");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_get_fade
+ *(void **) (&pa_cvolume_get_fade_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_get_fade");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_set_fade
+ *(void **) (&pa_cvolume_set_fade_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_set_fade");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_get_lfe_balance
+ *(void **) (&pa_cvolume_get_lfe_balance_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_get_lfe_balance");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_set_lfe_balance
+ *(void **) (&pa_cvolume_set_lfe_balance_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_set_lfe_balance");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_scale
+ *(void **) (&pa_cvolume_scale_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_scale");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_scale_mask
+ *(void **) (&pa_cvolume_scale_mask_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_scale_mask");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_set_position
+ *(void **) (&pa_cvolume_set_position_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_set_position");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_get_position
+ *(void **) (&pa_cvolume_get_position_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_get_position");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_merge
+ *(void **) (&pa_cvolume_merge_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_merge");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_inc_clamp
+ *(void **) (&pa_cvolume_inc_clamp_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_inc_clamp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_inc
+ *(void **) (&pa_cvolume_inc_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_inc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_cvolume_dec
+ *(void **) (&pa_cvolume_dec_dylibloader_wrapper_pulse) = dlsym(handle, "pa_cvolume_dec");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_new
+ *(void **) (&pa_stream_new_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_new_with_proplist
+ *(void **) (&pa_stream_new_with_proplist_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_new_with_proplist");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_new_extended
+ *(void **) (&pa_stream_new_extended_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_new_extended");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_unref
+ *(void **) (&pa_stream_unref_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_unref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_ref
+ *(void **) (&pa_stream_ref_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_state
+ *(void **) (&pa_stream_get_state_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_state");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_context
+ *(void **) (&pa_stream_get_context_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_context");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_index
+ *(void **) (&pa_stream_get_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_device_index
+ *(void **) (&pa_stream_get_device_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_device_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_device_name
+ *(void **) (&pa_stream_get_device_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_device_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_is_suspended
+ *(void **) (&pa_stream_is_suspended_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_is_suspended");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_is_corked
+ *(void **) (&pa_stream_is_corked_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_is_corked");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_connect_playback
+ *(void **) (&pa_stream_connect_playback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_connect_playback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_connect_record
+ *(void **) (&pa_stream_connect_record_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_connect_record");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_disconnect
+ *(void **) (&pa_stream_disconnect_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_disconnect");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_begin_write
+ *(void **) (&pa_stream_begin_write_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_begin_write");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_cancel_write
+ *(void **) (&pa_stream_cancel_write_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_cancel_write");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_write
+ *(void **) (&pa_stream_write_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_write");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_write_ext_free
+ *(void **) (&pa_stream_write_ext_free_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_write_ext_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_peek
+ *(void **) (&pa_stream_peek_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_peek");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_drop
+ *(void **) (&pa_stream_drop_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_drop");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_writable_size
+ *(void **) (&pa_stream_writable_size_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_writable_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_readable_size
+ *(void **) (&pa_stream_readable_size_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_readable_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_drain
+ *(void **) (&pa_stream_drain_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_drain");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_update_timing_info
+ *(void **) (&pa_stream_update_timing_info_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_update_timing_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_state_callback
+ *(void **) (&pa_stream_set_state_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_state_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_write_callback
+ *(void **) (&pa_stream_set_write_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_write_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_read_callback
+ *(void **) (&pa_stream_set_read_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_read_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_overflow_callback
+ *(void **) (&pa_stream_set_overflow_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_overflow_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_underflow_index
+ *(void **) (&pa_stream_get_underflow_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_underflow_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_underflow_callback
+ *(void **) (&pa_stream_set_underflow_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_underflow_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_started_callback
+ *(void **) (&pa_stream_set_started_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_started_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_latency_update_callback
+ *(void **) (&pa_stream_set_latency_update_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_latency_update_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_moved_callback
+ *(void **) (&pa_stream_set_moved_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_moved_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_suspended_callback
+ *(void **) (&pa_stream_set_suspended_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_suspended_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_event_callback
+ *(void **) (&pa_stream_set_event_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_event_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_buffer_attr_callback
+ *(void **) (&pa_stream_set_buffer_attr_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_buffer_attr_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_cork
+ *(void **) (&pa_stream_cork_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_cork");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_flush
+ *(void **) (&pa_stream_flush_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_flush");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_prebuf
+ *(void **) (&pa_stream_prebuf_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_prebuf");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_trigger
+ *(void **) (&pa_stream_trigger_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_trigger");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_name
+ *(void **) (&pa_stream_set_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_time
+ *(void **) (&pa_stream_get_time_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_time");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_latency
+ *(void **) (&pa_stream_get_latency_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_latency");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_timing_info
+ *(void **) (&pa_stream_get_timing_info_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_timing_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_sample_spec
+ *(void **) (&pa_stream_get_sample_spec_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_sample_spec");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_channel_map
+ *(void **) (&pa_stream_get_channel_map_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_channel_map");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_format_info
+ *(void **) (&pa_stream_get_format_info_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_format_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_buffer_attr
+ *(void **) (&pa_stream_get_buffer_attr_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_buffer_attr");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_buffer_attr
+ *(void **) (&pa_stream_set_buffer_attr_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_buffer_attr");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_update_sample_rate
+ *(void **) (&pa_stream_update_sample_rate_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_update_sample_rate");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_proplist_update
+ *(void **) (&pa_stream_proplist_update_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_proplist_update");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_proplist_remove
+ *(void **) (&pa_stream_proplist_remove_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_proplist_remove");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_set_monitor_stream
+ *(void **) (&pa_stream_set_monitor_stream_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_set_monitor_stream");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_get_monitor_stream
+ *(void **) (&pa_stream_get_monitor_stream_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_get_monitor_stream");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_sink_info_by_name
+ *(void **) (&pa_context_get_sink_info_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_sink_info_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_sink_info_by_index
+ *(void **) (&pa_context_get_sink_info_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_sink_info_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_sink_info_list
+ *(void **) (&pa_context_get_sink_info_list_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_sink_info_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_sink_volume_by_index
+ *(void **) (&pa_context_set_sink_volume_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_sink_volume_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_sink_volume_by_name
+ *(void **) (&pa_context_set_sink_volume_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_sink_volume_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_sink_mute_by_index
+ *(void **) (&pa_context_set_sink_mute_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_sink_mute_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_sink_mute_by_name
+ *(void **) (&pa_context_set_sink_mute_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_sink_mute_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_suspend_sink_by_name
+ *(void **) (&pa_context_suspend_sink_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_suspend_sink_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_suspend_sink_by_index
+ *(void **) (&pa_context_suspend_sink_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_suspend_sink_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_sink_port_by_index
+ *(void **) (&pa_context_set_sink_port_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_sink_port_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_sink_port_by_name
+ *(void **) (&pa_context_set_sink_port_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_sink_port_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_source_info_by_name
+ *(void **) (&pa_context_get_source_info_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_source_info_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_source_info_by_index
+ *(void **) (&pa_context_get_source_info_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_source_info_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_source_info_list
+ *(void **) (&pa_context_get_source_info_list_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_source_info_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_source_volume_by_index
+ *(void **) (&pa_context_set_source_volume_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_source_volume_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_source_volume_by_name
+ *(void **) (&pa_context_set_source_volume_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_source_volume_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_source_mute_by_index
+ *(void **) (&pa_context_set_source_mute_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_source_mute_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_source_mute_by_name
+ *(void **) (&pa_context_set_source_mute_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_source_mute_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_suspend_source_by_name
+ *(void **) (&pa_context_suspend_source_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_suspend_source_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_suspend_source_by_index
+ *(void **) (&pa_context_suspend_source_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_suspend_source_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_source_port_by_index
+ *(void **) (&pa_context_set_source_port_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_source_port_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_source_port_by_name
+ *(void **) (&pa_context_set_source_port_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_source_port_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_server_info
+ *(void **) (&pa_context_get_server_info_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_server_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_module_info
+ *(void **) (&pa_context_get_module_info_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_module_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_module_info_list
+ *(void **) (&pa_context_get_module_info_list_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_module_info_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_load_module
+ *(void **) (&pa_context_load_module_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_load_module");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_unload_module
+ *(void **) (&pa_context_unload_module_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_unload_module");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_client_info
+ *(void **) (&pa_context_get_client_info_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_client_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_client_info_list
+ *(void **) (&pa_context_get_client_info_list_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_client_info_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_kill_client
+ *(void **) (&pa_context_kill_client_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_kill_client");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_card_info_by_index
+ *(void **) (&pa_context_get_card_info_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_card_info_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_card_info_by_name
+ *(void **) (&pa_context_get_card_info_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_card_info_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_card_info_list
+ *(void **) (&pa_context_get_card_info_list_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_card_info_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_card_profile_by_index
+ *(void **) (&pa_context_set_card_profile_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_card_profile_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_card_profile_by_name
+ *(void **) (&pa_context_set_card_profile_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_card_profile_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_port_latency_offset
+ *(void **) (&pa_context_set_port_latency_offset_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_port_latency_offset");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_sink_input_info
+ *(void **) (&pa_context_get_sink_input_info_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_sink_input_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_sink_input_info_list
+ *(void **) (&pa_context_get_sink_input_info_list_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_sink_input_info_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_move_sink_input_by_name
+ *(void **) (&pa_context_move_sink_input_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_move_sink_input_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_move_sink_input_by_index
+ *(void **) (&pa_context_move_sink_input_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_move_sink_input_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_sink_input_volume
+ *(void **) (&pa_context_set_sink_input_volume_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_sink_input_volume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_sink_input_mute
+ *(void **) (&pa_context_set_sink_input_mute_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_sink_input_mute");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_kill_sink_input
+ *(void **) (&pa_context_kill_sink_input_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_kill_sink_input");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_source_output_info
+ *(void **) (&pa_context_get_source_output_info_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_source_output_info");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_source_output_info_list
+ *(void **) (&pa_context_get_source_output_info_list_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_source_output_info_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_move_source_output_by_name
+ *(void **) (&pa_context_move_source_output_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_move_source_output_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_move_source_output_by_index
+ *(void **) (&pa_context_move_source_output_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_move_source_output_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_source_output_volume
+ *(void **) (&pa_context_set_source_output_volume_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_source_output_volume");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_source_output_mute
+ *(void **) (&pa_context_set_source_output_mute_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_source_output_mute");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_kill_source_output
+ *(void **) (&pa_context_kill_source_output_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_kill_source_output");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_stat
+ *(void **) (&pa_context_stat_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_stat");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_sample_info_by_name
+ *(void **) (&pa_context_get_sample_info_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_sample_info_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_sample_info_by_index
+ *(void **) (&pa_context_get_sample_info_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_sample_info_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_sample_info_list
+ *(void **) (&pa_context_get_sample_info_list_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_sample_info_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_autoload_info_by_name
+ *(void **) (&pa_context_get_autoload_info_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_autoload_info_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_autoload_info_by_index
+ *(void **) (&pa_context_get_autoload_info_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_autoload_info_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_get_autoload_info_list
+ *(void **) (&pa_context_get_autoload_info_list_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_get_autoload_info_list");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_add_autoload
+ *(void **) (&pa_context_add_autoload_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_add_autoload");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_remove_autoload_by_name
+ *(void **) (&pa_context_remove_autoload_by_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_remove_autoload_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_remove_autoload_by_index
+ *(void **) (&pa_context_remove_autoload_by_index_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_remove_autoload_by_index");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_subscribe
+ *(void **) (&pa_context_subscribe_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_subscribe");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_set_subscribe_callback
+ *(void **) (&pa_context_set_subscribe_callback_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_set_subscribe_callback");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_connect_upload
+ *(void **) (&pa_stream_connect_upload_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_connect_upload");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_stream_finish_upload
+ *(void **) (&pa_stream_finish_upload_dylibloader_wrapper_pulse) = dlsym(handle, "pa_stream_finish_upload");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_remove_sample
+ *(void **) (&pa_context_remove_sample_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_remove_sample");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_play_sample
+ *(void **) (&pa_context_play_sample_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_play_sample");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_context_play_sample_with_proplist
+ *(void **) (&pa_context_play_sample_with_proplist_dylibloader_wrapper_pulse) = dlsym(handle, "pa_context_play_sample_with_proplist");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_strerror
+ *(void **) (&pa_strerror_dylibloader_wrapper_pulse) = dlsym(handle, "pa_strerror");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_xmalloc
+ *(void **) (&pa_xmalloc_dylibloader_wrapper_pulse) = dlsym(handle, "pa_xmalloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_xmalloc0
+ *(void **) (&pa_xmalloc0_dylibloader_wrapper_pulse) = dlsym(handle, "pa_xmalloc0");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_xrealloc
+ *(void **) (&pa_xrealloc_dylibloader_wrapper_pulse) = dlsym(handle, "pa_xrealloc");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_xfree
+ *(void **) (&pa_xfree_dylibloader_wrapper_pulse) = dlsym(handle, "pa_xfree");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_xstrdup
+ *(void **) (&pa_xstrdup_dylibloader_wrapper_pulse) = dlsym(handle, "pa_xstrdup");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_xstrndup
+ *(void **) (&pa_xstrndup_dylibloader_wrapper_pulse) = dlsym(handle, "pa_xstrndup");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_xmemdup
+ *(void **) (&pa_xmemdup_dylibloader_wrapper_pulse) = dlsym(handle, "pa_xmemdup");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_utf8_valid
+ *(void **) (&pa_utf8_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_utf8_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_ascii_valid
+ *(void **) (&pa_ascii_valid_dylibloader_wrapper_pulse) = dlsym(handle, "pa_ascii_valid");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_utf8_filter
+ *(void **) (&pa_utf8_filter_dylibloader_wrapper_pulse) = dlsym(handle, "pa_utf8_filter");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_ascii_filter
+ *(void **) (&pa_ascii_filter_dylibloader_wrapper_pulse) = dlsym(handle, "pa_ascii_filter");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_utf8_to_locale
+ *(void **) (&pa_utf8_to_locale_dylibloader_wrapper_pulse) = dlsym(handle, "pa_utf8_to_locale");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_locale_to_utf8
+ *(void **) (&pa_locale_to_utf8_dylibloader_wrapper_pulse) = dlsym(handle, "pa_locale_to_utf8");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_new
+ *(void **) (&pa_threaded_mainloop_new_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_free
+ *(void **) (&pa_threaded_mainloop_free_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_start
+ *(void **) (&pa_threaded_mainloop_start_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_start");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_stop
+ *(void **) (&pa_threaded_mainloop_stop_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_stop");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_lock
+ *(void **) (&pa_threaded_mainloop_lock_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_lock");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_unlock
+ *(void **) (&pa_threaded_mainloop_unlock_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_unlock");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_wait
+ *(void **) (&pa_threaded_mainloop_wait_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_wait");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_signal
+ *(void **) (&pa_threaded_mainloop_signal_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_signal");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_accept
+ *(void **) (&pa_threaded_mainloop_accept_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_accept");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_get_retval
+ *(void **) (&pa_threaded_mainloop_get_retval_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_get_retval");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_get_api
+ *(void **) (&pa_threaded_mainloop_get_api_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_get_api");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_in_thread
+ *(void **) (&pa_threaded_mainloop_in_thread_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_in_thread");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_set_name
+ *(void **) (&pa_threaded_mainloop_set_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_set_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_threaded_mainloop_once_unlocked
+ *(void **) (&pa_threaded_mainloop_once_unlocked_dylibloader_wrapper_pulse) = dlsym(handle, "pa_threaded_mainloop_once_unlocked");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_new
+ *(void **) (&pa_mainloop_new_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_free
+ *(void **) (&pa_mainloop_free_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_prepare
+ *(void **) (&pa_mainloop_prepare_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_prepare");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_poll
+ *(void **) (&pa_mainloop_poll_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_poll");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_dispatch
+ *(void **) (&pa_mainloop_dispatch_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_dispatch");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_get_retval
+ *(void **) (&pa_mainloop_get_retval_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_get_retval");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_iterate
+ *(void **) (&pa_mainloop_iterate_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_iterate");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_run
+ *(void **) (&pa_mainloop_run_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_run");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_get_api
+ *(void **) (&pa_mainloop_get_api_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_get_api");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_quit
+ *(void **) (&pa_mainloop_quit_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_quit");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_wakeup
+ *(void **) (&pa_mainloop_wakeup_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_wakeup");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_mainloop_set_poll_func
+ *(void **) (&pa_mainloop_set_poll_func_dylibloader_wrapper_pulse) = dlsym(handle, "pa_mainloop_set_poll_func");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_signal_init
+ *(void **) (&pa_signal_init_dylibloader_wrapper_pulse) = dlsym(handle, "pa_signal_init");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_signal_done
+ *(void **) (&pa_signal_done_dylibloader_wrapper_pulse) = dlsym(handle, "pa_signal_done");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_signal_new
+ *(void **) (&pa_signal_new_dylibloader_wrapper_pulse) = dlsym(handle, "pa_signal_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_signal_free
+ *(void **) (&pa_signal_free_dylibloader_wrapper_pulse) = dlsym(handle, "pa_signal_free");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_signal_set_destroy
+ *(void **) (&pa_signal_set_destroy_dylibloader_wrapper_pulse) = dlsym(handle, "pa_signal_set_destroy");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_get_user_name
+ *(void **) (&pa_get_user_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_get_user_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_get_host_name
+ *(void **) (&pa_get_host_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_get_host_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_get_fqdn
+ *(void **) (&pa_get_fqdn_dylibloader_wrapper_pulse) = dlsym(handle, "pa_get_fqdn");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_get_home_dir
+ *(void **) (&pa_get_home_dir_dylibloader_wrapper_pulse) = dlsym(handle, "pa_get_home_dir");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_get_binary_name
+ *(void **) (&pa_get_binary_name_dylibloader_wrapper_pulse) = dlsym(handle, "pa_get_binary_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_path_get_filename
+ *(void **) (&pa_path_get_filename_dylibloader_wrapper_pulse) = dlsym(handle, "pa_path_get_filename");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_msleep
+ *(void **) (&pa_msleep_dylibloader_wrapper_pulse) = dlsym(handle, "pa_msleep");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_thread_make_realtime
+ *(void **) (&pa_thread_make_realtime_dylibloader_wrapper_pulse) = dlsym(handle, "pa_thread_make_realtime");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_gettimeofday
+ *(void **) (&pa_gettimeofday_dylibloader_wrapper_pulse) = dlsym(handle, "pa_gettimeofday");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_timeval_diff
+ *(void **) (&pa_timeval_diff_dylibloader_wrapper_pulse) = dlsym(handle, "pa_timeval_diff");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_timeval_cmp
+ *(void **) (&pa_timeval_cmp_dylibloader_wrapper_pulse) = dlsym(handle, "pa_timeval_cmp");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_timeval_age
+ *(void **) (&pa_timeval_age_dylibloader_wrapper_pulse) = dlsym(handle, "pa_timeval_age");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_timeval_add
+ *(void **) (&pa_timeval_add_dylibloader_wrapper_pulse) = dlsym(handle, "pa_timeval_add");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_timeval_sub
+ *(void **) (&pa_timeval_sub_dylibloader_wrapper_pulse) = dlsym(handle, "pa_timeval_sub");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_timeval_store
+ *(void **) (&pa_timeval_store_dylibloader_wrapper_pulse) = dlsym(handle, "pa_timeval_store");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_timeval_load
+ *(void **) (&pa_timeval_load_dylibloader_wrapper_pulse) = dlsym(handle, "pa_timeval_load");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// pa_rtclock_now
+ *(void **) (&pa_rtclock_now_dylibloader_wrapper_pulse) = dlsym(handle, "pa_rtclock_now");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+return 0;
+}
diff --git a/drivers/pulseaudio/pulse-so_wrap.h b/drivers/pulseaudio/pulse-so_wrap.h
new file mode 100644
index 0000000000..3f50617f81
--- /dev/null
+++ b/drivers/pulseaudio/pulse-so_wrap.h
@@ -0,0 +1,1444 @@
+#ifndef DYLIBLOAD_WRAPPER_PULSE
+#define DYLIBLOAD_WRAPPER_PULSE
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by /home/hp/Projects/godot/pulse/generate-wrapper.py 0.2 on 2021-02-18 00:19:07
+// flags: /home/hp/Projects/godot/pulse/generate-wrapper.py --include /usr/include/pulse/pulseaudio.h --sys-include <pulse/pulseaudio.h> --soname libpulse.so.0 --omit-prefix _pa_ --init-name pulse --output-header pulse-so_wrap.h --output-implementation pulse-so_wrap.c
+//
+#define pa_get_library_version pa_get_library_version_dylibloader_orig_pulse
+#define pa_bytes_per_second pa_bytes_per_second_dylibloader_orig_pulse
+#define pa_frame_size pa_frame_size_dylibloader_orig_pulse
+#define pa_sample_size pa_sample_size_dylibloader_orig_pulse
+#define pa_sample_size_of_format pa_sample_size_of_format_dylibloader_orig_pulse
+#define pa_bytes_to_usec pa_bytes_to_usec_dylibloader_orig_pulse
+#define pa_usec_to_bytes pa_usec_to_bytes_dylibloader_orig_pulse
+#define pa_sample_spec_init pa_sample_spec_init_dylibloader_orig_pulse
+#define pa_sample_format_valid pa_sample_format_valid_dylibloader_orig_pulse
+#define pa_sample_rate_valid pa_sample_rate_valid_dylibloader_orig_pulse
+#define pa_channels_valid pa_channels_valid_dylibloader_orig_pulse
+#define pa_sample_spec_valid pa_sample_spec_valid_dylibloader_orig_pulse
+#define pa_sample_spec_equal pa_sample_spec_equal_dylibloader_orig_pulse
+#define pa_sample_format_to_string pa_sample_format_to_string_dylibloader_orig_pulse
+#define pa_parse_sample_format pa_parse_sample_format_dylibloader_orig_pulse
+#define pa_sample_spec_snprint pa_sample_spec_snprint_dylibloader_orig_pulse
+#define pa_bytes_snprint pa_bytes_snprint_dylibloader_orig_pulse
+#define pa_sample_format_is_le pa_sample_format_is_le_dylibloader_orig_pulse
+#define pa_sample_format_is_be pa_sample_format_is_be_dylibloader_orig_pulse
+#define pa_direction_valid pa_direction_valid_dylibloader_orig_pulse
+#define pa_direction_to_string pa_direction_to_string_dylibloader_orig_pulse
+#define pa_mainloop_api_once pa_mainloop_api_once_dylibloader_orig_pulse
+#define pa_proplist_new pa_proplist_new_dylibloader_orig_pulse
+#define pa_proplist_free pa_proplist_free_dylibloader_orig_pulse
+#define pa_proplist_key_valid pa_proplist_key_valid_dylibloader_orig_pulse
+#define pa_proplist_sets pa_proplist_sets_dylibloader_orig_pulse
+#define pa_proplist_setp pa_proplist_setp_dylibloader_orig_pulse
+#define pa_proplist_setf pa_proplist_setf_dylibloader_orig_pulse
+#define pa_proplist_set pa_proplist_set_dylibloader_orig_pulse
+#define pa_proplist_gets pa_proplist_gets_dylibloader_orig_pulse
+#define pa_proplist_get pa_proplist_get_dylibloader_orig_pulse
+#define pa_proplist_update pa_proplist_update_dylibloader_orig_pulse
+#define pa_proplist_unset pa_proplist_unset_dylibloader_orig_pulse
+#define pa_proplist_unset_many pa_proplist_unset_many_dylibloader_orig_pulse
+#define pa_proplist_iterate pa_proplist_iterate_dylibloader_orig_pulse
+#define pa_proplist_to_string pa_proplist_to_string_dylibloader_orig_pulse
+#define pa_proplist_to_string_sep pa_proplist_to_string_sep_dylibloader_orig_pulse
+#define pa_proplist_from_string pa_proplist_from_string_dylibloader_orig_pulse
+#define pa_proplist_contains pa_proplist_contains_dylibloader_orig_pulse
+#define pa_proplist_clear pa_proplist_clear_dylibloader_orig_pulse
+#define pa_proplist_copy pa_proplist_copy_dylibloader_orig_pulse
+#define pa_proplist_size pa_proplist_size_dylibloader_orig_pulse
+#define pa_proplist_isempty pa_proplist_isempty_dylibloader_orig_pulse
+#define pa_proplist_equal pa_proplist_equal_dylibloader_orig_pulse
+#define pa_channel_map_init pa_channel_map_init_dylibloader_orig_pulse
+#define pa_channel_map_init_mono pa_channel_map_init_mono_dylibloader_orig_pulse
+#define pa_channel_map_init_stereo pa_channel_map_init_stereo_dylibloader_orig_pulse
+#define pa_channel_map_init_auto pa_channel_map_init_auto_dylibloader_orig_pulse
+#define pa_channel_map_init_extend pa_channel_map_init_extend_dylibloader_orig_pulse
+#define pa_channel_position_to_string pa_channel_position_to_string_dylibloader_orig_pulse
+#define pa_channel_position_from_string pa_channel_position_from_string_dylibloader_orig_pulse
+#define pa_channel_position_to_pretty_string pa_channel_position_to_pretty_string_dylibloader_orig_pulse
+#define pa_channel_map_snprint pa_channel_map_snprint_dylibloader_orig_pulse
+#define pa_channel_map_parse pa_channel_map_parse_dylibloader_orig_pulse
+#define pa_channel_map_equal pa_channel_map_equal_dylibloader_orig_pulse
+#define pa_channel_map_valid pa_channel_map_valid_dylibloader_orig_pulse
+#define pa_channel_map_compatible pa_channel_map_compatible_dylibloader_orig_pulse
+#define pa_channel_map_superset pa_channel_map_superset_dylibloader_orig_pulse
+#define pa_channel_map_can_balance pa_channel_map_can_balance_dylibloader_orig_pulse
+#define pa_channel_map_can_fade pa_channel_map_can_fade_dylibloader_orig_pulse
+#define pa_channel_map_can_lfe_balance pa_channel_map_can_lfe_balance_dylibloader_orig_pulse
+#define pa_channel_map_to_name pa_channel_map_to_name_dylibloader_orig_pulse
+#define pa_channel_map_to_pretty_name pa_channel_map_to_pretty_name_dylibloader_orig_pulse
+#define pa_channel_map_has_position pa_channel_map_has_position_dylibloader_orig_pulse
+#define pa_channel_map_mask pa_channel_map_mask_dylibloader_orig_pulse
+#define pa_encoding_to_string pa_encoding_to_string_dylibloader_orig_pulse
+#define pa_encoding_from_string pa_encoding_from_string_dylibloader_orig_pulse
+#define pa_format_info_new pa_format_info_new_dylibloader_orig_pulse
+#define pa_format_info_copy pa_format_info_copy_dylibloader_orig_pulse
+#define pa_format_info_free pa_format_info_free_dylibloader_orig_pulse
+#define pa_format_info_valid pa_format_info_valid_dylibloader_orig_pulse
+#define pa_format_info_is_pcm pa_format_info_is_pcm_dylibloader_orig_pulse
+#define pa_format_info_is_compatible pa_format_info_is_compatible_dylibloader_orig_pulse
+#define pa_format_info_snprint pa_format_info_snprint_dylibloader_orig_pulse
+#define pa_format_info_from_string pa_format_info_from_string_dylibloader_orig_pulse
+#define pa_format_info_from_sample_spec pa_format_info_from_sample_spec_dylibloader_orig_pulse
+#define pa_format_info_to_sample_spec pa_format_info_to_sample_spec_dylibloader_orig_pulse
+#define pa_format_info_get_prop_type pa_format_info_get_prop_type_dylibloader_orig_pulse
+#define pa_format_info_get_prop_int pa_format_info_get_prop_int_dylibloader_orig_pulse
+#define pa_format_info_get_prop_int_range pa_format_info_get_prop_int_range_dylibloader_orig_pulse
+#define pa_format_info_get_prop_int_array pa_format_info_get_prop_int_array_dylibloader_orig_pulse
+#define pa_format_info_get_prop_string pa_format_info_get_prop_string_dylibloader_orig_pulse
+#define pa_format_info_get_prop_string_array pa_format_info_get_prop_string_array_dylibloader_orig_pulse
+#define pa_format_info_free_string_array pa_format_info_free_string_array_dylibloader_orig_pulse
+#define pa_format_info_get_sample_format pa_format_info_get_sample_format_dylibloader_orig_pulse
+#define pa_format_info_get_rate pa_format_info_get_rate_dylibloader_orig_pulse
+#define pa_format_info_get_channels pa_format_info_get_channels_dylibloader_orig_pulse
+#define pa_format_info_get_channel_map pa_format_info_get_channel_map_dylibloader_orig_pulse
+#define pa_format_info_set_prop_int pa_format_info_set_prop_int_dylibloader_orig_pulse
+#define pa_format_info_set_prop_int_array pa_format_info_set_prop_int_array_dylibloader_orig_pulse
+#define pa_format_info_set_prop_int_range pa_format_info_set_prop_int_range_dylibloader_orig_pulse
+#define pa_format_info_set_prop_string pa_format_info_set_prop_string_dylibloader_orig_pulse
+#define pa_format_info_set_prop_string_array pa_format_info_set_prop_string_array_dylibloader_orig_pulse
+#define pa_format_info_set_sample_format pa_format_info_set_sample_format_dylibloader_orig_pulse
+#define pa_format_info_set_rate pa_format_info_set_rate_dylibloader_orig_pulse
+#define pa_format_info_set_channels pa_format_info_set_channels_dylibloader_orig_pulse
+#define pa_format_info_set_channel_map pa_format_info_set_channel_map_dylibloader_orig_pulse
+#define pa_operation_ref pa_operation_ref_dylibloader_orig_pulse
+#define pa_operation_unref pa_operation_unref_dylibloader_orig_pulse
+#define pa_operation_cancel pa_operation_cancel_dylibloader_orig_pulse
+#define pa_operation_get_state pa_operation_get_state_dylibloader_orig_pulse
+#define pa_operation_set_state_callback pa_operation_set_state_callback_dylibloader_orig_pulse
+#define pa_context_new pa_context_new_dylibloader_orig_pulse
+#define pa_context_new_with_proplist pa_context_new_with_proplist_dylibloader_orig_pulse
+#define pa_context_unref pa_context_unref_dylibloader_orig_pulse
+#define pa_context_ref pa_context_ref_dylibloader_orig_pulse
+#define pa_context_set_state_callback pa_context_set_state_callback_dylibloader_orig_pulse
+#define pa_context_set_event_callback pa_context_set_event_callback_dylibloader_orig_pulse
+#define pa_context_errno pa_context_errno_dylibloader_orig_pulse
+#define pa_context_is_pending pa_context_is_pending_dylibloader_orig_pulse
+#define pa_context_get_state pa_context_get_state_dylibloader_orig_pulse
+#define pa_context_connect pa_context_connect_dylibloader_orig_pulse
+#define pa_context_disconnect pa_context_disconnect_dylibloader_orig_pulse
+#define pa_context_drain pa_context_drain_dylibloader_orig_pulse
+#define pa_context_exit_daemon pa_context_exit_daemon_dylibloader_orig_pulse
+#define pa_context_set_default_sink pa_context_set_default_sink_dylibloader_orig_pulse
+#define pa_context_set_default_source pa_context_set_default_source_dylibloader_orig_pulse
+#define pa_context_is_local pa_context_is_local_dylibloader_orig_pulse
+#define pa_context_set_name pa_context_set_name_dylibloader_orig_pulse
+#define pa_context_get_server pa_context_get_server_dylibloader_orig_pulse
+#define pa_context_get_protocol_version pa_context_get_protocol_version_dylibloader_orig_pulse
+#define pa_context_get_server_protocol_version pa_context_get_server_protocol_version_dylibloader_orig_pulse
+#define pa_context_proplist_update pa_context_proplist_update_dylibloader_orig_pulse
+#define pa_context_proplist_remove pa_context_proplist_remove_dylibloader_orig_pulse
+#define pa_context_get_index pa_context_get_index_dylibloader_orig_pulse
+#define pa_context_rttime_new pa_context_rttime_new_dylibloader_orig_pulse
+#define pa_context_rttime_restart pa_context_rttime_restart_dylibloader_orig_pulse
+#define pa_context_get_tile_size pa_context_get_tile_size_dylibloader_orig_pulse
+#define pa_context_load_cookie_from_file pa_context_load_cookie_from_file_dylibloader_orig_pulse
+#define pa_cvolume_equal pa_cvolume_equal_dylibloader_orig_pulse
+#define pa_cvolume_init pa_cvolume_init_dylibloader_orig_pulse
+#define pa_cvolume_set pa_cvolume_set_dylibloader_orig_pulse
+#define pa_cvolume_snprint pa_cvolume_snprint_dylibloader_orig_pulse
+#define pa_sw_cvolume_snprint_dB pa_sw_cvolume_snprint_dB_dylibloader_orig_pulse
+#define pa_cvolume_snprint_verbose pa_cvolume_snprint_verbose_dylibloader_orig_pulse
+#define pa_volume_snprint pa_volume_snprint_dylibloader_orig_pulse
+#define pa_sw_volume_snprint_dB pa_sw_volume_snprint_dB_dylibloader_orig_pulse
+#define pa_volume_snprint_verbose pa_volume_snprint_verbose_dylibloader_orig_pulse
+#define pa_cvolume_avg pa_cvolume_avg_dylibloader_orig_pulse
+#define pa_cvolume_avg_mask pa_cvolume_avg_mask_dylibloader_orig_pulse
+#define pa_cvolume_max pa_cvolume_max_dylibloader_orig_pulse
+#define pa_cvolume_max_mask pa_cvolume_max_mask_dylibloader_orig_pulse
+#define pa_cvolume_min pa_cvolume_min_dylibloader_orig_pulse
+#define pa_cvolume_min_mask pa_cvolume_min_mask_dylibloader_orig_pulse
+#define pa_cvolume_valid pa_cvolume_valid_dylibloader_orig_pulse
+#define pa_cvolume_channels_equal_to pa_cvolume_channels_equal_to_dylibloader_orig_pulse
+#define pa_sw_volume_multiply pa_sw_volume_multiply_dylibloader_orig_pulse
+#define pa_sw_cvolume_multiply pa_sw_cvolume_multiply_dylibloader_orig_pulse
+#define pa_sw_cvolume_multiply_scalar pa_sw_cvolume_multiply_scalar_dylibloader_orig_pulse
+#define pa_sw_volume_divide pa_sw_volume_divide_dylibloader_orig_pulse
+#define pa_sw_cvolume_divide pa_sw_cvolume_divide_dylibloader_orig_pulse
+#define pa_sw_cvolume_divide_scalar pa_sw_cvolume_divide_scalar_dylibloader_orig_pulse
+#define pa_sw_volume_from_dB pa_sw_volume_from_dB_dylibloader_orig_pulse
+#define pa_sw_volume_to_dB pa_sw_volume_to_dB_dylibloader_orig_pulse
+#define pa_sw_volume_from_linear pa_sw_volume_from_linear_dylibloader_orig_pulse
+#define pa_sw_volume_to_linear pa_sw_volume_to_linear_dylibloader_orig_pulse
+#define pa_cvolume_remap pa_cvolume_remap_dylibloader_orig_pulse
+#define pa_cvolume_compatible pa_cvolume_compatible_dylibloader_orig_pulse
+#define pa_cvolume_compatible_with_channel_map pa_cvolume_compatible_with_channel_map_dylibloader_orig_pulse
+#define pa_cvolume_get_balance pa_cvolume_get_balance_dylibloader_orig_pulse
+#define pa_cvolume_set_balance pa_cvolume_set_balance_dylibloader_orig_pulse
+#define pa_cvolume_get_fade pa_cvolume_get_fade_dylibloader_orig_pulse
+#define pa_cvolume_set_fade pa_cvolume_set_fade_dylibloader_orig_pulse
+#define pa_cvolume_get_lfe_balance pa_cvolume_get_lfe_balance_dylibloader_orig_pulse
+#define pa_cvolume_set_lfe_balance pa_cvolume_set_lfe_balance_dylibloader_orig_pulse
+#define pa_cvolume_scale pa_cvolume_scale_dylibloader_orig_pulse
+#define pa_cvolume_scale_mask pa_cvolume_scale_mask_dylibloader_orig_pulse
+#define pa_cvolume_set_position pa_cvolume_set_position_dylibloader_orig_pulse
+#define pa_cvolume_get_position pa_cvolume_get_position_dylibloader_orig_pulse
+#define pa_cvolume_merge pa_cvolume_merge_dylibloader_orig_pulse
+#define pa_cvolume_inc_clamp pa_cvolume_inc_clamp_dylibloader_orig_pulse
+#define pa_cvolume_inc pa_cvolume_inc_dylibloader_orig_pulse
+#define pa_cvolume_dec pa_cvolume_dec_dylibloader_orig_pulse
+#define pa_stream_new pa_stream_new_dylibloader_orig_pulse
+#define pa_stream_new_with_proplist pa_stream_new_with_proplist_dylibloader_orig_pulse
+#define pa_stream_new_extended pa_stream_new_extended_dylibloader_orig_pulse
+#define pa_stream_unref pa_stream_unref_dylibloader_orig_pulse
+#define pa_stream_ref pa_stream_ref_dylibloader_orig_pulse
+#define pa_stream_get_state pa_stream_get_state_dylibloader_orig_pulse
+#define pa_stream_get_context pa_stream_get_context_dylibloader_orig_pulse
+#define pa_stream_get_index pa_stream_get_index_dylibloader_orig_pulse
+#define pa_stream_get_device_index pa_stream_get_device_index_dylibloader_orig_pulse
+#define pa_stream_get_device_name pa_stream_get_device_name_dylibloader_orig_pulse
+#define pa_stream_is_suspended pa_stream_is_suspended_dylibloader_orig_pulse
+#define pa_stream_is_corked pa_stream_is_corked_dylibloader_orig_pulse
+#define pa_stream_connect_playback pa_stream_connect_playback_dylibloader_orig_pulse
+#define pa_stream_connect_record pa_stream_connect_record_dylibloader_orig_pulse
+#define pa_stream_disconnect pa_stream_disconnect_dylibloader_orig_pulse
+#define pa_stream_begin_write pa_stream_begin_write_dylibloader_orig_pulse
+#define pa_stream_cancel_write pa_stream_cancel_write_dylibloader_orig_pulse
+#define pa_stream_write pa_stream_write_dylibloader_orig_pulse
+#define pa_stream_write_ext_free pa_stream_write_ext_free_dylibloader_orig_pulse
+#define pa_stream_peek pa_stream_peek_dylibloader_orig_pulse
+#define pa_stream_drop pa_stream_drop_dylibloader_orig_pulse
+#define pa_stream_writable_size pa_stream_writable_size_dylibloader_orig_pulse
+#define pa_stream_readable_size pa_stream_readable_size_dylibloader_orig_pulse
+#define pa_stream_drain pa_stream_drain_dylibloader_orig_pulse
+#define pa_stream_update_timing_info pa_stream_update_timing_info_dylibloader_orig_pulse
+#define pa_stream_set_state_callback pa_stream_set_state_callback_dylibloader_orig_pulse
+#define pa_stream_set_write_callback pa_stream_set_write_callback_dylibloader_orig_pulse
+#define pa_stream_set_read_callback pa_stream_set_read_callback_dylibloader_orig_pulse
+#define pa_stream_set_overflow_callback pa_stream_set_overflow_callback_dylibloader_orig_pulse
+#define pa_stream_get_underflow_index pa_stream_get_underflow_index_dylibloader_orig_pulse
+#define pa_stream_set_underflow_callback pa_stream_set_underflow_callback_dylibloader_orig_pulse
+#define pa_stream_set_started_callback pa_stream_set_started_callback_dylibloader_orig_pulse
+#define pa_stream_set_latency_update_callback pa_stream_set_latency_update_callback_dylibloader_orig_pulse
+#define pa_stream_set_moved_callback pa_stream_set_moved_callback_dylibloader_orig_pulse
+#define pa_stream_set_suspended_callback pa_stream_set_suspended_callback_dylibloader_orig_pulse
+#define pa_stream_set_event_callback pa_stream_set_event_callback_dylibloader_orig_pulse
+#define pa_stream_set_buffer_attr_callback pa_stream_set_buffer_attr_callback_dylibloader_orig_pulse
+#define pa_stream_cork pa_stream_cork_dylibloader_orig_pulse
+#define pa_stream_flush pa_stream_flush_dylibloader_orig_pulse
+#define pa_stream_prebuf pa_stream_prebuf_dylibloader_orig_pulse
+#define pa_stream_trigger pa_stream_trigger_dylibloader_orig_pulse
+#define pa_stream_set_name pa_stream_set_name_dylibloader_orig_pulse
+#define pa_stream_get_time pa_stream_get_time_dylibloader_orig_pulse
+#define pa_stream_get_latency pa_stream_get_latency_dylibloader_orig_pulse
+#define pa_stream_get_timing_info pa_stream_get_timing_info_dylibloader_orig_pulse
+#define pa_stream_get_sample_spec pa_stream_get_sample_spec_dylibloader_orig_pulse
+#define pa_stream_get_channel_map pa_stream_get_channel_map_dylibloader_orig_pulse
+#define pa_stream_get_format_info pa_stream_get_format_info_dylibloader_orig_pulse
+#define pa_stream_get_buffer_attr pa_stream_get_buffer_attr_dylibloader_orig_pulse
+#define pa_stream_set_buffer_attr pa_stream_set_buffer_attr_dylibloader_orig_pulse
+#define pa_stream_update_sample_rate pa_stream_update_sample_rate_dylibloader_orig_pulse
+#define pa_stream_proplist_update pa_stream_proplist_update_dylibloader_orig_pulse
+#define pa_stream_proplist_remove pa_stream_proplist_remove_dylibloader_orig_pulse
+#define pa_stream_set_monitor_stream pa_stream_set_monitor_stream_dylibloader_orig_pulse
+#define pa_stream_get_monitor_stream pa_stream_get_monitor_stream_dylibloader_orig_pulse
+#define pa_context_get_sink_info_by_name pa_context_get_sink_info_by_name_dylibloader_orig_pulse
+#define pa_context_get_sink_info_by_index pa_context_get_sink_info_by_index_dylibloader_orig_pulse
+#define pa_context_get_sink_info_list pa_context_get_sink_info_list_dylibloader_orig_pulse
+#define pa_context_set_sink_volume_by_index pa_context_set_sink_volume_by_index_dylibloader_orig_pulse
+#define pa_context_set_sink_volume_by_name pa_context_set_sink_volume_by_name_dylibloader_orig_pulse
+#define pa_context_set_sink_mute_by_index pa_context_set_sink_mute_by_index_dylibloader_orig_pulse
+#define pa_context_set_sink_mute_by_name pa_context_set_sink_mute_by_name_dylibloader_orig_pulse
+#define pa_context_suspend_sink_by_name pa_context_suspend_sink_by_name_dylibloader_orig_pulse
+#define pa_context_suspend_sink_by_index pa_context_suspend_sink_by_index_dylibloader_orig_pulse
+#define pa_context_set_sink_port_by_index pa_context_set_sink_port_by_index_dylibloader_orig_pulse
+#define pa_context_set_sink_port_by_name pa_context_set_sink_port_by_name_dylibloader_orig_pulse
+#define pa_context_get_source_info_by_name pa_context_get_source_info_by_name_dylibloader_orig_pulse
+#define pa_context_get_source_info_by_index pa_context_get_source_info_by_index_dylibloader_orig_pulse
+#define pa_context_get_source_info_list pa_context_get_source_info_list_dylibloader_orig_pulse
+#define pa_context_set_source_volume_by_index pa_context_set_source_volume_by_index_dylibloader_orig_pulse
+#define pa_context_set_source_volume_by_name pa_context_set_source_volume_by_name_dylibloader_orig_pulse
+#define pa_context_set_source_mute_by_index pa_context_set_source_mute_by_index_dylibloader_orig_pulse
+#define pa_context_set_source_mute_by_name pa_context_set_source_mute_by_name_dylibloader_orig_pulse
+#define pa_context_suspend_source_by_name pa_context_suspend_source_by_name_dylibloader_orig_pulse
+#define pa_context_suspend_source_by_index pa_context_suspend_source_by_index_dylibloader_orig_pulse
+#define pa_context_set_source_port_by_index pa_context_set_source_port_by_index_dylibloader_orig_pulse
+#define pa_context_set_source_port_by_name pa_context_set_source_port_by_name_dylibloader_orig_pulse
+#define pa_context_get_server_info pa_context_get_server_info_dylibloader_orig_pulse
+#define pa_context_get_module_info pa_context_get_module_info_dylibloader_orig_pulse
+#define pa_context_get_module_info_list pa_context_get_module_info_list_dylibloader_orig_pulse
+#define pa_context_load_module pa_context_load_module_dylibloader_orig_pulse
+#define pa_context_unload_module pa_context_unload_module_dylibloader_orig_pulse
+#define pa_context_get_client_info pa_context_get_client_info_dylibloader_orig_pulse
+#define pa_context_get_client_info_list pa_context_get_client_info_list_dylibloader_orig_pulse
+#define pa_context_kill_client pa_context_kill_client_dylibloader_orig_pulse
+#define pa_context_get_card_info_by_index pa_context_get_card_info_by_index_dylibloader_orig_pulse
+#define pa_context_get_card_info_by_name pa_context_get_card_info_by_name_dylibloader_orig_pulse
+#define pa_context_get_card_info_list pa_context_get_card_info_list_dylibloader_orig_pulse
+#define pa_context_set_card_profile_by_index pa_context_set_card_profile_by_index_dylibloader_orig_pulse
+#define pa_context_set_card_profile_by_name pa_context_set_card_profile_by_name_dylibloader_orig_pulse
+#define pa_context_set_port_latency_offset pa_context_set_port_latency_offset_dylibloader_orig_pulse
+#define pa_context_get_sink_input_info pa_context_get_sink_input_info_dylibloader_orig_pulse
+#define pa_context_get_sink_input_info_list pa_context_get_sink_input_info_list_dylibloader_orig_pulse
+#define pa_context_move_sink_input_by_name pa_context_move_sink_input_by_name_dylibloader_orig_pulse
+#define pa_context_move_sink_input_by_index pa_context_move_sink_input_by_index_dylibloader_orig_pulse
+#define pa_context_set_sink_input_volume pa_context_set_sink_input_volume_dylibloader_orig_pulse
+#define pa_context_set_sink_input_mute pa_context_set_sink_input_mute_dylibloader_orig_pulse
+#define pa_context_kill_sink_input pa_context_kill_sink_input_dylibloader_orig_pulse
+#define pa_context_get_source_output_info pa_context_get_source_output_info_dylibloader_orig_pulse
+#define pa_context_get_source_output_info_list pa_context_get_source_output_info_list_dylibloader_orig_pulse
+#define pa_context_move_source_output_by_name pa_context_move_source_output_by_name_dylibloader_orig_pulse
+#define pa_context_move_source_output_by_index pa_context_move_source_output_by_index_dylibloader_orig_pulse
+#define pa_context_set_source_output_volume pa_context_set_source_output_volume_dylibloader_orig_pulse
+#define pa_context_set_source_output_mute pa_context_set_source_output_mute_dylibloader_orig_pulse
+#define pa_context_kill_source_output pa_context_kill_source_output_dylibloader_orig_pulse
+#define pa_context_stat pa_context_stat_dylibloader_orig_pulse
+#define pa_context_get_sample_info_by_name pa_context_get_sample_info_by_name_dylibloader_orig_pulse
+#define pa_context_get_sample_info_by_index pa_context_get_sample_info_by_index_dylibloader_orig_pulse
+#define pa_context_get_sample_info_list pa_context_get_sample_info_list_dylibloader_orig_pulse
+#define pa_context_get_autoload_info_by_name pa_context_get_autoload_info_by_name_dylibloader_orig_pulse
+#define pa_context_get_autoload_info_by_index pa_context_get_autoload_info_by_index_dylibloader_orig_pulse
+#define pa_context_get_autoload_info_list pa_context_get_autoload_info_list_dylibloader_orig_pulse
+#define pa_context_add_autoload pa_context_add_autoload_dylibloader_orig_pulse
+#define pa_context_remove_autoload_by_name pa_context_remove_autoload_by_name_dylibloader_orig_pulse
+#define pa_context_remove_autoload_by_index pa_context_remove_autoload_by_index_dylibloader_orig_pulse
+#define pa_context_subscribe pa_context_subscribe_dylibloader_orig_pulse
+#define pa_context_set_subscribe_callback pa_context_set_subscribe_callback_dylibloader_orig_pulse
+#define pa_stream_connect_upload pa_stream_connect_upload_dylibloader_orig_pulse
+#define pa_stream_finish_upload pa_stream_finish_upload_dylibloader_orig_pulse
+#define pa_context_remove_sample pa_context_remove_sample_dylibloader_orig_pulse
+#define pa_context_play_sample pa_context_play_sample_dylibloader_orig_pulse
+#define pa_context_play_sample_with_proplist pa_context_play_sample_with_proplist_dylibloader_orig_pulse
+#define pa_strerror pa_strerror_dylibloader_orig_pulse
+#define pa_xmalloc pa_xmalloc_dylibloader_orig_pulse
+#define pa_xmalloc0 pa_xmalloc0_dylibloader_orig_pulse
+#define pa_xrealloc pa_xrealloc_dylibloader_orig_pulse
+#define pa_xfree pa_xfree_dylibloader_orig_pulse
+#define pa_xstrdup pa_xstrdup_dylibloader_orig_pulse
+#define pa_xstrndup pa_xstrndup_dylibloader_orig_pulse
+#define pa_xmemdup pa_xmemdup_dylibloader_orig_pulse
+#define pa_utf8_valid pa_utf8_valid_dylibloader_orig_pulse
+#define pa_ascii_valid pa_ascii_valid_dylibloader_orig_pulse
+#define pa_utf8_filter pa_utf8_filter_dylibloader_orig_pulse
+#define pa_ascii_filter pa_ascii_filter_dylibloader_orig_pulse
+#define pa_utf8_to_locale pa_utf8_to_locale_dylibloader_orig_pulse
+#define pa_locale_to_utf8 pa_locale_to_utf8_dylibloader_orig_pulse
+#define pa_threaded_mainloop_new pa_threaded_mainloop_new_dylibloader_orig_pulse
+#define pa_threaded_mainloop_free pa_threaded_mainloop_free_dylibloader_orig_pulse
+#define pa_threaded_mainloop_start pa_threaded_mainloop_start_dylibloader_orig_pulse
+#define pa_threaded_mainloop_stop pa_threaded_mainloop_stop_dylibloader_orig_pulse
+#define pa_threaded_mainloop_lock pa_threaded_mainloop_lock_dylibloader_orig_pulse
+#define pa_threaded_mainloop_unlock pa_threaded_mainloop_unlock_dylibloader_orig_pulse
+#define pa_threaded_mainloop_wait pa_threaded_mainloop_wait_dylibloader_orig_pulse
+#define pa_threaded_mainloop_signal pa_threaded_mainloop_signal_dylibloader_orig_pulse
+#define pa_threaded_mainloop_accept pa_threaded_mainloop_accept_dylibloader_orig_pulse
+#define pa_threaded_mainloop_get_retval pa_threaded_mainloop_get_retval_dylibloader_orig_pulse
+#define pa_threaded_mainloop_get_api pa_threaded_mainloop_get_api_dylibloader_orig_pulse
+#define pa_threaded_mainloop_in_thread pa_threaded_mainloop_in_thread_dylibloader_orig_pulse
+#define pa_threaded_mainloop_set_name pa_threaded_mainloop_set_name_dylibloader_orig_pulse
+#define pa_threaded_mainloop_once_unlocked pa_threaded_mainloop_once_unlocked_dylibloader_orig_pulse
+#define pa_mainloop_new pa_mainloop_new_dylibloader_orig_pulse
+#define pa_mainloop_free pa_mainloop_free_dylibloader_orig_pulse
+#define pa_mainloop_prepare pa_mainloop_prepare_dylibloader_orig_pulse
+#define pa_mainloop_poll pa_mainloop_poll_dylibloader_orig_pulse
+#define pa_mainloop_dispatch pa_mainloop_dispatch_dylibloader_orig_pulse
+#define pa_mainloop_get_retval pa_mainloop_get_retval_dylibloader_orig_pulse
+#define pa_mainloop_iterate pa_mainloop_iterate_dylibloader_orig_pulse
+#define pa_mainloop_run pa_mainloop_run_dylibloader_orig_pulse
+#define pa_mainloop_get_api pa_mainloop_get_api_dylibloader_orig_pulse
+#define pa_mainloop_quit pa_mainloop_quit_dylibloader_orig_pulse
+#define pa_mainloop_wakeup pa_mainloop_wakeup_dylibloader_orig_pulse
+#define pa_mainloop_set_poll_func pa_mainloop_set_poll_func_dylibloader_orig_pulse
+#define pa_signal_init pa_signal_init_dylibloader_orig_pulse
+#define pa_signal_done pa_signal_done_dylibloader_orig_pulse
+#define pa_signal_new pa_signal_new_dylibloader_orig_pulse
+#define pa_signal_free pa_signal_free_dylibloader_orig_pulse
+#define pa_signal_set_destroy pa_signal_set_destroy_dylibloader_orig_pulse
+#define pa_get_user_name pa_get_user_name_dylibloader_orig_pulse
+#define pa_get_host_name pa_get_host_name_dylibloader_orig_pulse
+#define pa_get_fqdn pa_get_fqdn_dylibloader_orig_pulse
+#define pa_get_home_dir pa_get_home_dir_dylibloader_orig_pulse
+#define pa_get_binary_name pa_get_binary_name_dylibloader_orig_pulse
+#define pa_path_get_filename pa_path_get_filename_dylibloader_orig_pulse
+#define pa_msleep pa_msleep_dylibloader_orig_pulse
+#define pa_thread_make_realtime pa_thread_make_realtime_dylibloader_orig_pulse
+#define pa_gettimeofday pa_gettimeofday_dylibloader_orig_pulse
+#define pa_timeval_diff pa_timeval_diff_dylibloader_orig_pulse
+#define pa_timeval_cmp pa_timeval_cmp_dylibloader_orig_pulse
+#define pa_timeval_age pa_timeval_age_dylibloader_orig_pulse
+#define pa_timeval_add pa_timeval_add_dylibloader_orig_pulse
+#define pa_timeval_sub pa_timeval_sub_dylibloader_orig_pulse
+#define pa_timeval_store pa_timeval_store_dylibloader_orig_pulse
+#define pa_timeval_load pa_timeval_load_dylibloader_orig_pulse
+#define pa_rtclock_now pa_rtclock_now_dylibloader_orig_pulse
+#include <pulse/pulseaudio.h>
+#undef pa_get_library_version
+#undef pa_bytes_per_second
+#undef pa_frame_size
+#undef pa_sample_size
+#undef pa_sample_size_of_format
+#undef pa_bytes_to_usec
+#undef pa_usec_to_bytes
+#undef pa_sample_spec_init
+#undef pa_sample_format_valid
+#undef pa_sample_rate_valid
+#undef pa_channels_valid
+#undef pa_sample_spec_valid
+#undef pa_sample_spec_equal
+#undef pa_sample_format_to_string
+#undef pa_parse_sample_format
+#undef pa_sample_spec_snprint
+#undef pa_bytes_snprint
+#undef pa_sample_format_is_le
+#undef pa_sample_format_is_be
+#undef pa_direction_valid
+#undef pa_direction_to_string
+#undef pa_mainloop_api_once
+#undef pa_proplist_new
+#undef pa_proplist_free
+#undef pa_proplist_key_valid
+#undef pa_proplist_sets
+#undef pa_proplist_setp
+#undef pa_proplist_setf
+#undef pa_proplist_set
+#undef pa_proplist_gets
+#undef pa_proplist_get
+#undef pa_proplist_update
+#undef pa_proplist_unset
+#undef pa_proplist_unset_many
+#undef pa_proplist_iterate
+#undef pa_proplist_to_string
+#undef pa_proplist_to_string_sep
+#undef pa_proplist_from_string
+#undef pa_proplist_contains
+#undef pa_proplist_clear
+#undef pa_proplist_copy
+#undef pa_proplist_size
+#undef pa_proplist_isempty
+#undef pa_proplist_equal
+#undef pa_channel_map_init
+#undef pa_channel_map_init_mono
+#undef pa_channel_map_init_stereo
+#undef pa_channel_map_init_auto
+#undef pa_channel_map_init_extend
+#undef pa_channel_position_to_string
+#undef pa_channel_position_from_string
+#undef pa_channel_position_to_pretty_string
+#undef pa_channel_map_snprint
+#undef pa_channel_map_parse
+#undef pa_channel_map_equal
+#undef pa_channel_map_valid
+#undef pa_channel_map_compatible
+#undef pa_channel_map_superset
+#undef pa_channel_map_can_balance
+#undef pa_channel_map_can_fade
+#undef pa_channel_map_can_lfe_balance
+#undef pa_channel_map_to_name
+#undef pa_channel_map_to_pretty_name
+#undef pa_channel_map_has_position
+#undef pa_channel_map_mask
+#undef pa_encoding_to_string
+#undef pa_encoding_from_string
+#undef pa_format_info_new
+#undef pa_format_info_copy
+#undef pa_format_info_free
+#undef pa_format_info_valid
+#undef pa_format_info_is_pcm
+#undef pa_format_info_is_compatible
+#undef pa_format_info_snprint
+#undef pa_format_info_from_string
+#undef pa_format_info_from_sample_spec
+#undef pa_format_info_to_sample_spec
+#undef pa_format_info_get_prop_type
+#undef pa_format_info_get_prop_int
+#undef pa_format_info_get_prop_int_range
+#undef pa_format_info_get_prop_int_array
+#undef pa_format_info_get_prop_string
+#undef pa_format_info_get_prop_string_array
+#undef pa_format_info_free_string_array
+#undef pa_format_info_get_sample_format
+#undef pa_format_info_get_rate
+#undef pa_format_info_get_channels
+#undef pa_format_info_get_channel_map
+#undef pa_format_info_set_prop_int
+#undef pa_format_info_set_prop_int_array
+#undef pa_format_info_set_prop_int_range
+#undef pa_format_info_set_prop_string
+#undef pa_format_info_set_prop_string_array
+#undef pa_format_info_set_sample_format
+#undef pa_format_info_set_rate
+#undef pa_format_info_set_channels
+#undef pa_format_info_set_channel_map
+#undef pa_operation_ref
+#undef pa_operation_unref
+#undef pa_operation_cancel
+#undef pa_operation_get_state
+#undef pa_operation_set_state_callback
+#undef pa_context_new
+#undef pa_context_new_with_proplist
+#undef pa_context_unref
+#undef pa_context_ref
+#undef pa_context_set_state_callback
+#undef pa_context_set_event_callback
+#undef pa_context_errno
+#undef pa_context_is_pending
+#undef pa_context_get_state
+#undef pa_context_connect
+#undef pa_context_disconnect
+#undef pa_context_drain
+#undef pa_context_exit_daemon
+#undef pa_context_set_default_sink
+#undef pa_context_set_default_source
+#undef pa_context_is_local
+#undef pa_context_set_name
+#undef pa_context_get_server
+#undef pa_context_get_protocol_version
+#undef pa_context_get_server_protocol_version
+#undef pa_context_proplist_update
+#undef pa_context_proplist_remove
+#undef pa_context_get_index
+#undef pa_context_rttime_new
+#undef pa_context_rttime_restart
+#undef pa_context_get_tile_size
+#undef pa_context_load_cookie_from_file
+#undef pa_cvolume_equal
+#undef pa_cvolume_init
+#undef pa_cvolume_set
+#undef pa_cvolume_snprint
+#undef pa_sw_cvolume_snprint_dB
+#undef pa_cvolume_snprint_verbose
+#undef pa_volume_snprint
+#undef pa_sw_volume_snprint_dB
+#undef pa_volume_snprint_verbose
+#undef pa_cvolume_avg
+#undef pa_cvolume_avg_mask
+#undef pa_cvolume_max
+#undef pa_cvolume_max_mask
+#undef pa_cvolume_min
+#undef pa_cvolume_min_mask
+#undef pa_cvolume_valid
+#undef pa_cvolume_channels_equal_to
+#undef pa_sw_volume_multiply
+#undef pa_sw_cvolume_multiply
+#undef pa_sw_cvolume_multiply_scalar
+#undef pa_sw_volume_divide
+#undef pa_sw_cvolume_divide
+#undef pa_sw_cvolume_divide_scalar
+#undef pa_sw_volume_from_dB
+#undef pa_sw_volume_to_dB
+#undef pa_sw_volume_from_linear
+#undef pa_sw_volume_to_linear
+#undef pa_cvolume_remap
+#undef pa_cvolume_compatible
+#undef pa_cvolume_compatible_with_channel_map
+#undef pa_cvolume_get_balance
+#undef pa_cvolume_set_balance
+#undef pa_cvolume_get_fade
+#undef pa_cvolume_set_fade
+#undef pa_cvolume_get_lfe_balance
+#undef pa_cvolume_set_lfe_balance
+#undef pa_cvolume_scale
+#undef pa_cvolume_scale_mask
+#undef pa_cvolume_set_position
+#undef pa_cvolume_get_position
+#undef pa_cvolume_merge
+#undef pa_cvolume_inc_clamp
+#undef pa_cvolume_inc
+#undef pa_cvolume_dec
+#undef pa_stream_new
+#undef pa_stream_new_with_proplist
+#undef pa_stream_new_extended
+#undef pa_stream_unref
+#undef pa_stream_ref
+#undef pa_stream_get_state
+#undef pa_stream_get_context
+#undef pa_stream_get_index
+#undef pa_stream_get_device_index
+#undef pa_stream_get_device_name
+#undef pa_stream_is_suspended
+#undef pa_stream_is_corked
+#undef pa_stream_connect_playback
+#undef pa_stream_connect_record
+#undef pa_stream_disconnect
+#undef pa_stream_begin_write
+#undef pa_stream_cancel_write
+#undef pa_stream_write
+#undef pa_stream_write_ext_free
+#undef pa_stream_peek
+#undef pa_stream_drop
+#undef pa_stream_writable_size
+#undef pa_stream_readable_size
+#undef pa_stream_drain
+#undef pa_stream_update_timing_info
+#undef pa_stream_set_state_callback
+#undef pa_stream_set_write_callback
+#undef pa_stream_set_read_callback
+#undef pa_stream_set_overflow_callback
+#undef pa_stream_get_underflow_index
+#undef pa_stream_set_underflow_callback
+#undef pa_stream_set_started_callback
+#undef pa_stream_set_latency_update_callback
+#undef pa_stream_set_moved_callback
+#undef pa_stream_set_suspended_callback
+#undef pa_stream_set_event_callback
+#undef pa_stream_set_buffer_attr_callback
+#undef pa_stream_cork
+#undef pa_stream_flush
+#undef pa_stream_prebuf
+#undef pa_stream_trigger
+#undef pa_stream_set_name
+#undef pa_stream_get_time
+#undef pa_stream_get_latency
+#undef pa_stream_get_timing_info
+#undef pa_stream_get_sample_spec
+#undef pa_stream_get_channel_map
+#undef pa_stream_get_format_info
+#undef pa_stream_get_buffer_attr
+#undef pa_stream_set_buffer_attr
+#undef pa_stream_update_sample_rate
+#undef pa_stream_proplist_update
+#undef pa_stream_proplist_remove
+#undef pa_stream_set_monitor_stream
+#undef pa_stream_get_monitor_stream
+#undef pa_context_get_sink_info_by_name
+#undef pa_context_get_sink_info_by_index
+#undef pa_context_get_sink_info_list
+#undef pa_context_set_sink_volume_by_index
+#undef pa_context_set_sink_volume_by_name
+#undef pa_context_set_sink_mute_by_index
+#undef pa_context_set_sink_mute_by_name
+#undef pa_context_suspend_sink_by_name
+#undef pa_context_suspend_sink_by_index
+#undef pa_context_set_sink_port_by_index
+#undef pa_context_set_sink_port_by_name
+#undef pa_context_get_source_info_by_name
+#undef pa_context_get_source_info_by_index
+#undef pa_context_get_source_info_list
+#undef pa_context_set_source_volume_by_index
+#undef pa_context_set_source_volume_by_name
+#undef pa_context_set_source_mute_by_index
+#undef pa_context_set_source_mute_by_name
+#undef pa_context_suspend_source_by_name
+#undef pa_context_suspend_source_by_index
+#undef pa_context_set_source_port_by_index
+#undef pa_context_set_source_port_by_name
+#undef pa_context_get_server_info
+#undef pa_context_get_module_info
+#undef pa_context_get_module_info_list
+#undef pa_context_load_module
+#undef pa_context_unload_module
+#undef pa_context_get_client_info
+#undef pa_context_get_client_info_list
+#undef pa_context_kill_client
+#undef pa_context_get_card_info_by_index
+#undef pa_context_get_card_info_by_name
+#undef pa_context_get_card_info_list
+#undef pa_context_set_card_profile_by_index
+#undef pa_context_set_card_profile_by_name
+#undef pa_context_set_port_latency_offset
+#undef pa_context_get_sink_input_info
+#undef pa_context_get_sink_input_info_list
+#undef pa_context_move_sink_input_by_name
+#undef pa_context_move_sink_input_by_index
+#undef pa_context_set_sink_input_volume
+#undef pa_context_set_sink_input_mute
+#undef pa_context_kill_sink_input
+#undef pa_context_get_source_output_info
+#undef pa_context_get_source_output_info_list
+#undef pa_context_move_source_output_by_name
+#undef pa_context_move_source_output_by_index
+#undef pa_context_set_source_output_volume
+#undef pa_context_set_source_output_mute
+#undef pa_context_kill_source_output
+#undef pa_context_stat
+#undef pa_context_get_sample_info_by_name
+#undef pa_context_get_sample_info_by_index
+#undef pa_context_get_sample_info_list
+#undef pa_context_get_autoload_info_by_name
+#undef pa_context_get_autoload_info_by_index
+#undef pa_context_get_autoload_info_list
+#undef pa_context_add_autoload
+#undef pa_context_remove_autoload_by_name
+#undef pa_context_remove_autoload_by_index
+#undef pa_context_subscribe
+#undef pa_context_set_subscribe_callback
+#undef pa_stream_connect_upload
+#undef pa_stream_finish_upload
+#undef pa_context_remove_sample
+#undef pa_context_play_sample
+#undef pa_context_play_sample_with_proplist
+#undef pa_strerror
+#undef pa_xmalloc
+#undef pa_xmalloc0
+#undef pa_xrealloc
+#undef pa_xfree
+#undef pa_xstrdup
+#undef pa_xstrndup
+#undef pa_xmemdup
+#undef pa_utf8_valid
+#undef pa_ascii_valid
+#undef pa_utf8_filter
+#undef pa_ascii_filter
+#undef pa_utf8_to_locale
+#undef pa_locale_to_utf8
+#undef pa_threaded_mainloop_new
+#undef pa_threaded_mainloop_free
+#undef pa_threaded_mainloop_start
+#undef pa_threaded_mainloop_stop
+#undef pa_threaded_mainloop_lock
+#undef pa_threaded_mainloop_unlock
+#undef pa_threaded_mainloop_wait
+#undef pa_threaded_mainloop_signal
+#undef pa_threaded_mainloop_accept
+#undef pa_threaded_mainloop_get_retval
+#undef pa_threaded_mainloop_get_api
+#undef pa_threaded_mainloop_in_thread
+#undef pa_threaded_mainloop_set_name
+#undef pa_threaded_mainloop_once_unlocked
+#undef pa_mainloop_new
+#undef pa_mainloop_free
+#undef pa_mainloop_prepare
+#undef pa_mainloop_poll
+#undef pa_mainloop_dispatch
+#undef pa_mainloop_get_retval
+#undef pa_mainloop_iterate
+#undef pa_mainloop_run
+#undef pa_mainloop_get_api
+#undef pa_mainloop_quit
+#undef pa_mainloop_wakeup
+#undef pa_mainloop_set_poll_func
+#undef pa_signal_init
+#undef pa_signal_done
+#undef pa_signal_new
+#undef pa_signal_free
+#undef pa_signal_set_destroy
+#undef pa_get_user_name
+#undef pa_get_host_name
+#undef pa_get_fqdn
+#undef pa_get_home_dir
+#undef pa_get_binary_name
+#undef pa_path_get_filename
+#undef pa_msleep
+#undef pa_thread_make_realtime
+#undef pa_gettimeofday
+#undef pa_timeval_diff
+#undef pa_timeval_cmp
+#undef pa_timeval_age
+#undef pa_timeval_add
+#undef pa_timeval_sub
+#undef pa_timeval_store
+#undef pa_timeval_load
+#undef pa_rtclock_now
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define pa_get_library_version pa_get_library_version_dylibloader_wrapper_pulse
+#define pa_bytes_per_second pa_bytes_per_second_dylibloader_wrapper_pulse
+#define pa_frame_size pa_frame_size_dylibloader_wrapper_pulse
+#define pa_sample_size pa_sample_size_dylibloader_wrapper_pulse
+#define pa_sample_size_of_format pa_sample_size_of_format_dylibloader_wrapper_pulse
+#define pa_bytes_to_usec pa_bytes_to_usec_dylibloader_wrapper_pulse
+#define pa_usec_to_bytes pa_usec_to_bytes_dylibloader_wrapper_pulse
+#define pa_sample_spec_init pa_sample_spec_init_dylibloader_wrapper_pulse
+#define pa_sample_format_valid pa_sample_format_valid_dylibloader_wrapper_pulse
+#define pa_sample_rate_valid pa_sample_rate_valid_dylibloader_wrapper_pulse
+#define pa_channels_valid pa_channels_valid_dylibloader_wrapper_pulse
+#define pa_sample_spec_valid pa_sample_spec_valid_dylibloader_wrapper_pulse
+#define pa_sample_spec_equal pa_sample_spec_equal_dylibloader_wrapper_pulse
+#define pa_sample_format_to_string pa_sample_format_to_string_dylibloader_wrapper_pulse
+#define pa_parse_sample_format pa_parse_sample_format_dylibloader_wrapper_pulse
+#define pa_sample_spec_snprint pa_sample_spec_snprint_dylibloader_wrapper_pulse
+#define pa_bytes_snprint pa_bytes_snprint_dylibloader_wrapper_pulse
+#define pa_sample_format_is_le pa_sample_format_is_le_dylibloader_wrapper_pulse
+#define pa_sample_format_is_be pa_sample_format_is_be_dylibloader_wrapper_pulse
+#define pa_direction_valid pa_direction_valid_dylibloader_wrapper_pulse
+#define pa_direction_to_string pa_direction_to_string_dylibloader_wrapper_pulse
+#define pa_mainloop_api_once pa_mainloop_api_once_dylibloader_wrapper_pulse
+#define pa_proplist_new pa_proplist_new_dylibloader_wrapper_pulse
+#define pa_proplist_free pa_proplist_free_dylibloader_wrapper_pulse
+#define pa_proplist_key_valid pa_proplist_key_valid_dylibloader_wrapper_pulse
+#define pa_proplist_sets pa_proplist_sets_dylibloader_wrapper_pulse
+#define pa_proplist_setp pa_proplist_setp_dylibloader_wrapper_pulse
+#define pa_proplist_setf pa_proplist_setf_dylibloader_wrapper_pulse
+#define pa_proplist_set pa_proplist_set_dylibloader_wrapper_pulse
+#define pa_proplist_gets pa_proplist_gets_dylibloader_wrapper_pulse
+#define pa_proplist_get pa_proplist_get_dylibloader_wrapper_pulse
+#define pa_proplist_update pa_proplist_update_dylibloader_wrapper_pulse
+#define pa_proplist_unset pa_proplist_unset_dylibloader_wrapper_pulse
+#define pa_proplist_unset_many pa_proplist_unset_many_dylibloader_wrapper_pulse
+#define pa_proplist_iterate pa_proplist_iterate_dylibloader_wrapper_pulse
+#define pa_proplist_to_string pa_proplist_to_string_dylibloader_wrapper_pulse
+#define pa_proplist_to_string_sep pa_proplist_to_string_sep_dylibloader_wrapper_pulse
+#define pa_proplist_from_string pa_proplist_from_string_dylibloader_wrapper_pulse
+#define pa_proplist_contains pa_proplist_contains_dylibloader_wrapper_pulse
+#define pa_proplist_clear pa_proplist_clear_dylibloader_wrapper_pulse
+#define pa_proplist_copy pa_proplist_copy_dylibloader_wrapper_pulse
+#define pa_proplist_size pa_proplist_size_dylibloader_wrapper_pulse
+#define pa_proplist_isempty pa_proplist_isempty_dylibloader_wrapper_pulse
+#define pa_proplist_equal pa_proplist_equal_dylibloader_wrapper_pulse
+#define pa_channel_map_init pa_channel_map_init_dylibloader_wrapper_pulse
+#define pa_channel_map_init_mono pa_channel_map_init_mono_dylibloader_wrapper_pulse
+#define pa_channel_map_init_stereo pa_channel_map_init_stereo_dylibloader_wrapper_pulse
+#define pa_channel_map_init_auto pa_channel_map_init_auto_dylibloader_wrapper_pulse
+#define pa_channel_map_init_extend pa_channel_map_init_extend_dylibloader_wrapper_pulse
+#define pa_channel_position_to_string pa_channel_position_to_string_dylibloader_wrapper_pulse
+#define pa_channel_position_from_string pa_channel_position_from_string_dylibloader_wrapper_pulse
+#define pa_channel_position_to_pretty_string pa_channel_position_to_pretty_string_dylibloader_wrapper_pulse
+#define pa_channel_map_snprint pa_channel_map_snprint_dylibloader_wrapper_pulse
+#define pa_channel_map_parse pa_channel_map_parse_dylibloader_wrapper_pulse
+#define pa_channel_map_equal pa_channel_map_equal_dylibloader_wrapper_pulse
+#define pa_channel_map_valid pa_channel_map_valid_dylibloader_wrapper_pulse
+#define pa_channel_map_compatible pa_channel_map_compatible_dylibloader_wrapper_pulse
+#define pa_channel_map_superset pa_channel_map_superset_dylibloader_wrapper_pulse
+#define pa_channel_map_can_balance pa_channel_map_can_balance_dylibloader_wrapper_pulse
+#define pa_channel_map_can_fade pa_channel_map_can_fade_dylibloader_wrapper_pulse
+#define pa_channel_map_can_lfe_balance pa_channel_map_can_lfe_balance_dylibloader_wrapper_pulse
+#define pa_channel_map_to_name pa_channel_map_to_name_dylibloader_wrapper_pulse
+#define pa_channel_map_to_pretty_name pa_channel_map_to_pretty_name_dylibloader_wrapper_pulse
+#define pa_channel_map_has_position pa_channel_map_has_position_dylibloader_wrapper_pulse
+#define pa_channel_map_mask pa_channel_map_mask_dylibloader_wrapper_pulse
+#define pa_encoding_to_string pa_encoding_to_string_dylibloader_wrapper_pulse
+#define pa_encoding_from_string pa_encoding_from_string_dylibloader_wrapper_pulse
+#define pa_format_info_new pa_format_info_new_dylibloader_wrapper_pulse
+#define pa_format_info_copy pa_format_info_copy_dylibloader_wrapper_pulse
+#define pa_format_info_free pa_format_info_free_dylibloader_wrapper_pulse
+#define pa_format_info_valid pa_format_info_valid_dylibloader_wrapper_pulse
+#define pa_format_info_is_pcm pa_format_info_is_pcm_dylibloader_wrapper_pulse
+#define pa_format_info_is_compatible pa_format_info_is_compatible_dylibloader_wrapper_pulse
+#define pa_format_info_snprint pa_format_info_snprint_dylibloader_wrapper_pulse
+#define pa_format_info_from_string pa_format_info_from_string_dylibloader_wrapper_pulse
+#define pa_format_info_from_sample_spec pa_format_info_from_sample_spec_dylibloader_wrapper_pulse
+#define pa_format_info_to_sample_spec pa_format_info_to_sample_spec_dylibloader_wrapper_pulse
+#define pa_format_info_get_prop_type pa_format_info_get_prop_type_dylibloader_wrapper_pulse
+#define pa_format_info_get_prop_int pa_format_info_get_prop_int_dylibloader_wrapper_pulse
+#define pa_format_info_get_prop_int_range pa_format_info_get_prop_int_range_dylibloader_wrapper_pulse
+#define pa_format_info_get_prop_int_array pa_format_info_get_prop_int_array_dylibloader_wrapper_pulse
+#define pa_format_info_get_prop_string pa_format_info_get_prop_string_dylibloader_wrapper_pulse
+#define pa_format_info_get_prop_string_array pa_format_info_get_prop_string_array_dylibloader_wrapper_pulse
+#define pa_format_info_free_string_array pa_format_info_free_string_array_dylibloader_wrapper_pulse
+#define pa_format_info_get_sample_format pa_format_info_get_sample_format_dylibloader_wrapper_pulse
+#define pa_format_info_get_rate pa_format_info_get_rate_dylibloader_wrapper_pulse
+#define pa_format_info_get_channels pa_format_info_get_channels_dylibloader_wrapper_pulse
+#define pa_format_info_get_channel_map pa_format_info_get_channel_map_dylibloader_wrapper_pulse
+#define pa_format_info_set_prop_int pa_format_info_set_prop_int_dylibloader_wrapper_pulse
+#define pa_format_info_set_prop_int_array pa_format_info_set_prop_int_array_dylibloader_wrapper_pulse
+#define pa_format_info_set_prop_int_range pa_format_info_set_prop_int_range_dylibloader_wrapper_pulse
+#define pa_format_info_set_prop_string pa_format_info_set_prop_string_dylibloader_wrapper_pulse
+#define pa_format_info_set_prop_string_array pa_format_info_set_prop_string_array_dylibloader_wrapper_pulse
+#define pa_format_info_set_sample_format pa_format_info_set_sample_format_dylibloader_wrapper_pulse
+#define pa_format_info_set_rate pa_format_info_set_rate_dylibloader_wrapper_pulse
+#define pa_format_info_set_channels pa_format_info_set_channels_dylibloader_wrapper_pulse
+#define pa_format_info_set_channel_map pa_format_info_set_channel_map_dylibloader_wrapper_pulse
+#define pa_operation_ref pa_operation_ref_dylibloader_wrapper_pulse
+#define pa_operation_unref pa_operation_unref_dylibloader_wrapper_pulse
+#define pa_operation_cancel pa_operation_cancel_dylibloader_wrapper_pulse
+#define pa_operation_get_state pa_operation_get_state_dylibloader_wrapper_pulse
+#define pa_operation_set_state_callback pa_operation_set_state_callback_dylibloader_wrapper_pulse
+#define pa_context_new pa_context_new_dylibloader_wrapper_pulse
+#define pa_context_new_with_proplist pa_context_new_with_proplist_dylibloader_wrapper_pulse
+#define pa_context_unref pa_context_unref_dylibloader_wrapper_pulse
+#define pa_context_ref pa_context_ref_dylibloader_wrapper_pulse
+#define pa_context_set_state_callback pa_context_set_state_callback_dylibloader_wrapper_pulse
+#define pa_context_set_event_callback pa_context_set_event_callback_dylibloader_wrapper_pulse
+#define pa_context_errno pa_context_errno_dylibloader_wrapper_pulse
+#define pa_context_is_pending pa_context_is_pending_dylibloader_wrapper_pulse
+#define pa_context_get_state pa_context_get_state_dylibloader_wrapper_pulse
+#define pa_context_connect pa_context_connect_dylibloader_wrapper_pulse
+#define pa_context_disconnect pa_context_disconnect_dylibloader_wrapper_pulse
+#define pa_context_drain pa_context_drain_dylibloader_wrapper_pulse
+#define pa_context_exit_daemon pa_context_exit_daemon_dylibloader_wrapper_pulse
+#define pa_context_set_default_sink pa_context_set_default_sink_dylibloader_wrapper_pulse
+#define pa_context_set_default_source pa_context_set_default_source_dylibloader_wrapper_pulse
+#define pa_context_is_local pa_context_is_local_dylibloader_wrapper_pulse
+#define pa_context_set_name pa_context_set_name_dylibloader_wrapper_pulse
+#define pa_context_get_server pa_context_get_server_dylibloader_wrapper_pulse
+#define pa_context_get_protocol_version pa_context_get_protocol_version_dylibloader_wrapper_pulse
+#define pa_context_get_server_protocol_version pa_context_get_server_protocol_version_dylibloader_wrapper_pulse
+#define pa_context_proplist_update pa_context_proplist_update_dylibloader_wrapper_pulse
+#define pa_context_proplist_remove pa_context_proplist_remove_dylibloader_wrapper_pulse
+#define pa_context_get_index pa_context_get_index_dylibloader_wrapper_pulse
+#define pa_context_rttime_new pa_context_rttime_new_dylibloader_wrapper_pulse
+#define pa_context_rttime_restart pa_context_rttime_restart_dylibloader_wrapper_pulse
+#define pa_context_get_tile_size pa_context_get_tile_size_dylibloader_wrapper_pulse
+#define pa_context_load_cookie_from_file pa_context_load_cookie_from_file_dylibloader_wrapper_pulse
+#define pa_cvolume_equal pa_cvolume_equal_dylibloader_wrapper_pulse
+#define pa_cvolume_init pa_cvolume_init_dylibloader_wrapper_pulse
+#define pa_cvolume_set pa_cvolume_set_dylibloader_wrapper_pulse
+#define pa_cvolume_snprint pa_cvolume_snprint_dylibloader_wrapper_pulse
+#define pa_sw_cvolume_snprint_dB pa_sw_cvolume_snprint_dB_dylibloader_wrapper_pulse
+#define pa_cvolume_snprint_verbose pa_cvolume_snprint_verbose_dylibloader_wrapper_pulse
+#define pa_volume_snprint pa_volume_snprint_dylibloader_wrapper_pulse
+#define pa_sw_volume_snprint_dB pa_sw_volume_snprint_dB_dylibloader_wrapper_pulse
+#define pa_volume_snprint_verbose pa_volume_snprint_verbose_dylibloader_wrapper_pulse
+#define pa_cvolume_avg pa_cvolume_avg_dylibloader_wrapper_pulse
+#define pa_cvolume_avg_mask pa_cvolume_avg_mask_dylibloader_wrapper_pulse
+#define pa_cvolume_max pa_cvolume_max_dylibloader_wrapper_pulse
+#define pa_cvolume_max_mask pa_cvolume_max_mask_dylibloader_wrapper_pulse
+#define pa_cvolume_min pa_cvolume_min_dylibloader_wrapper_pulse
+#define pa_cvolume_min_mask pa_cvolume_min_mask_dylibloader_wrapper_pulse
+#define pa_cvolume_valid pa_cvolume_valid_dylibloader_wrapper_pulse
+#define pa_cvolume_channels_equal_to pa_cvolume_channels_equal_to_dylibloader_wrapper_pulse
+#define pa_sw_volume_multiply pa_sw_volume_multiply_dylibloader_wrapper_pulse
+#define pa_sw_cvolume_multiply pa_sw_cvolume_multiply_dylibloader_wrapper_pulse
+#define pa_sw_cvolume_multiply_scalar pa_sw_cvolume_multiply_scalar_dylibloader_wrapper_pulse
+#define pa_sw_volume_divide pa_sw_volume_divide_dylibloader_wrapper_pulse
+#define pa_sw_cvolume_divide pa_sw_cvolume_divide_dylibloader_wrapper_pulse
+#define pa_sw_cvolume_divide_scalar pa_sw_cvolume_divide_scalar_dylibloader_wrapper_pulse
+#define pa_sw_volume_from_dB pa_sw_volume_from_dB_dylibloader_wrapper_pulse
+#define pa_sw_volume_to_dB pa_sw_volume_to_dB_dylibloader_wrapper_pulse
+#define pa_sw_volume_from_linear pa_sw_volume_from_linear_dylibloader_wrapper_pulse
+#define pa_sw_volume_to_linear pa_sw_volume_to_linear_dylibloader_wrapper_pulse
+#define pa_cvolume_remap pa_cvolume_remap_dylibloader_wrapper_pulse
+#define pa_cvolume_compatible pa_cvolume_compatible_dylibloader_wrapper_pulse
+#define pa_cvolume_compatible_with_channel_map pa_cvolume_compatible_with_channel_map_dylibloader_wrapper_pulse
+#define pa_cvolume_get_balance pa_cvolume_get_balance_dylibloader_wrapper_pulse
+#define pa_cvolume_set_balance pa_cvolume_set_balance_dylibloader_wrapper_pulse
+#define pa_cvolume_get_fade pa_cvolume_get_fade_dylibloader_wrapper_pulse
+#define pa_cvolume_set_fade pa_cvolume_set_fade_dylibloader_wrapper_pulse
+#define pa_cvolume_get_lfe_balance pa_cvolume_get_lfe_balance_dylibloader_wrapper_pulse
+#define pa_cvolume_set_lfe_balance pa_cvolume_set_lfe_balance_dylibloader_wrapper_pulse
+#define pa_cvolume_scale pa_cvolume_scale_dylibloader_wrapper_pulse
+#define pa_cvolume_scale_mask pa_cvolume_scale_mask_dylibloader_wrapper_pulse
+#define pa_cvolume_set_position pa_cvolume_set_position_dylibloader_wrapper_pulse
+#define pa_cvolume_get_position pa_cvolume_get_position_dylibloader_wrapper_pulse
+#define pa_cvolume_merge pa_cvolume_merge_dylibloader_wrapper_pulse
+#define pa_cvolume_inc_clamp pa_cvolume_inc_clamp_dylibloader_wrapper_pulse
+#define pa_cvolume_inc pa_cvolume_inc_dylibloader_wrapper_pulse
+#define pa_cvolume_dec pa_cvolume_dec_dylibloader_wrapper_pulse
+#define pa_stream_new pa_stream_new_dylibloader_wrapper_pulse
+#define pa_stream_new_with_proplist pa_stream_new_with_proplist_dylibloader_wrapper_pulse
+#define pa_stream_new_extended pa_stream_new_extended_dylibloader_wrapper_pulse
+#define pa_stream_unref pa_stream_unref_dylibloader_wrapper_pulse
+#define pa_stream_ref pa_stream_ref_dylibloader_wrapper_pulse
+#define pa_stream_get_state pa_stream_get_state_dylibloader_wrapper_pulse
+#define pa_stream_get_context pa_stream_get_context_dylibloader_wrapper_pulse
+#define pa_stream_get_index pa_stream_get_index_dylibloader_wrapper_pulse
+#define pa_stream_get_device_index pa_stream_get_device_index_dylibloader_wrapper_pulse
+#define pa_stream_get_device_name pa_stream_get_device_name_dylibloader_wrapper_pulse
+#define pa_stream_is_suspended pa_stream_is_suspended_dylibloader_wrapper_pulse
+#define pa_stream_is_corked pa_stream_is_corked_dylibloader_wrapper_pulse
+#define pa_stream_connect_playback pa_stream_connect_playback_dylibloader_wrapper_pulse
+#define pa_stream_connect_record pa_stream_connect_record_dylibloader_wrapper_pulse
+#define pa_stream_disconnect pa_stream_disconnect_dylibloader_wrapper_pulse
+#define pa_stream_begin_write pa_stream_begin_write_dylibloader_wrapper_pulse
+#define pa_stream_cancel_write pa_stream_cancel_write_dylibloader_wrapper_pulse
+#define pa_stream_write pa_stream_write_dylibloader_wrapper_pulse
+#define pa_stream_write_ext_free pa_stream_write_ext_free_dylibloader_wrapper_pulse
+#define pa_stream_peek pa_stream_peek_dylibloader_wrapper_pulse
+#define pa_stream_drop pa_stream_drop_dylibloader_wrapper_pulse
+#define pa_stream_writable_size pa_stream_writable_size_dylibloader_wrapper_pulse
+#define pa_stream_readable_size pa_stream_readable_size_dylibloader_wrapper_pulse
+#define pa_stream_drain pa_stream_drain_dylibloader_wrapper_pulse
+#define pa_stream_update_timing_info pa_stream_update_timing_info_dylibloader_wrapper_pulse
+#define pa_stream_set_state_callback pa_stream_set_state_callback_dylibloader_wrapper_pulse
+#define pa_stream_set_write_callback pa_stream_set_write_callback_dylibloader_wrapper_pulse
+#define pa_stream_set_read_callback pa_stream_set_read_callback_dylibloader_wrapper_pulse
+#define pa_stream_set_overflow_callback pa_stream_set_overflow_callback_dylibloader_wrapper_pulse
+#define pa_stream_get_underflow_index pa_stream_get_underflow_index_dylibloader_wrapper_pulse
+#define pa_stream_set_underflow_callback pa_stream_set_underflow_callback_dylibloader_wrapper_pulse
+#define pa_stream_set_started_callback pa_stream_set_started_callback_dylibloader_wrapper_pulse
+#define pa_stream_set_latency_update_callback pa_stream_set_latency_update_callback_dylibloader_wrapper_pulse
+#define pa_stream_set_moved_callback pa_stream_set_moved_callback_dylibloader_wrapper_pulse
+#define pa_stream_set_suspended_callback pa_stream_set_suspended_callback_dylibloader_wrapper_pulse
+#define pa_stream_set_event_callback pa_stream_set_event_callback_dylibloader_wrapper_pulse
+#define pa_stream_set_buffer_attr_callback pa_stream_set_buffer_attr_callback_dylibloader_wrapper_pulse
+#define pa_stream_cork pa_stream_cork_dylibloader_wrapper_pulse
+#define pa_stream_flush pa_stream_flush_dylibloader_wrapper_pulse
+#define pa_stream_prebuf pa_stream_prebuf_dylibloader_wrapper_pulse
+#define pa_stream_trigger pa_stream_trigger_dylibloader_wrapper_pulse
+#define pa_stream_set_name pa_stream_set_name_dylibloader_wrapper_pulse
+#define pa_stream_get_time pa_stream_get_time_dylibloader_wrapper_pulse
+#define pa_stream_get_latency pa_stream_get_latency_dylibloader_wrapper_pulse
+#define pa_stream_get_timing_info pa_stream_get_timing_info_dylibloader_wrapper_pulse
+#define pa_stream_get_sample_spec pa_stream_get_sample_spec_dylibloader_wrapper_pulse
+#define pa_stream_get_channel_map pa_stream_get_channel_map_dylibloader_wrapper_pulse
+#define pa_stream_get_format_info pa_stream_get_format_info_dylibloader_wrapper_pulse
+#define pa_stream_get_buffer_attr pa_stream_get_buffer_attr_dylibloader_wrapper_pulse
+#define pa_stream_set_buffer_attr pa_stream_set_buffer_attr_dylibloader_wrapper_pulse
+#define pa_stream_update_sample_rate pa_stream_update_sample_rate_dylibloader_wrapper_pulse
+#define pa_stream_proplist_update pa_stream_proplist_update_dylibloader_wrapper_pulse
+#define pa_stream_proplist_remove pa_stream_proplist_remove_dylibloader_wrapper_pulse
+#define pa_stream_set_monitor_stream pa_stream_set_monitor_stream_dylibloader_wrapper_pulse
+#define pa_stream_get_monitor_stream pa_stream_get_monitor_stream_dylibloader_wrapper_pulse
+#define pa_context_get_sink_info_by_name pa_context_get_sink_info_by_name_dylibloader_wrapper_pulse
+#define pa_context_get_sink_info_by_index pa_context_get_sink_info_by_index_dylibloader_wrapper_pulse
+#define pa_context_get_sink_info_list pa_context_get_sink_info_list_dylibloader_wrapper_pulse
+#define pa_context_set_sink_volume_by_index pa_context_set_sink_volume_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_sink_volume_by_name pa_context_set_sink_volume_by_name_dylibloader_wrapper_pulse
+#define pa_context_set_sink_mute_by_index pa_context_set_sink_mute_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_sink_mute_by_name pa_context_set_sink_mute_by_name_dylibloader_wrapper_pulse
+#define pa_context_suspend_sink_by_name pa_context_suspend_sink_by_name_dylibloader_wrapper_pulse
+#define pa_context_suspend_sink_by_index pa_context_suspend_sink_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_sink_port_by_index pa_context_set_sink_port_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_sink_port_by_name pa_context_set_sink_port_by_name_dylibloader_wrapper_pulse
+#define pa_context_get_source_info_by_name pa_context_get_source_info_by_name_dylibloader_wrapper_pulse
+#define pa_context_get_source_info_by_index pa_context_get_source_info_by_index_dylibloader_wrapper_pulse
+#define pa_context_get_source_info_list pa_context_get_source_info_list_dylibloader_wrapper_pulse
+#define pa_context_set_source_volume_by_index pa_context_set_source_volume_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_source_volume_by_name pa_context_set_source_volume_by_name_dylibloader_wrapper_pulse
+#define pa_context_set_source_mute_by_index pa_context_set_source_mute_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_source_mute_by_name pa_context_set_source_mute_by_name_dylibloader_wrapper_pulse
+#define pa_context_suspend_source_by_name pa_context_suspend_source_by_name_dylibloader_wrapper_pulse
+#define pa_context_suspend_source_by_index pa_context_suspend_source_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_source_port_by_index pa_context_set_source_port_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_source_port_by_name pa_context_set_source_port_by_name_dylibloader_wrapper_pulse
+#define pa_context_get_server_info pa_context_get_server_info_dylibloader_wrapper_pulse
+#define pa_context_get_module_info pa_context_get_module_info_dylibloader_wrapper_pulse
+#define pa_context_get_module_info_list pa_context_get_module_info_list_dylibloader_wrapper_pulse
+#define pa_context_load_module pa_context_load_module_dylibloader_wrapper_pulse
+#define pa_context_unload_module pa_context_unload_module_dylibloader_wrapper_pulse
+#define pa_context_get_client_info pa_context_get_client_info_dylibloader_wrapper_pulse
+#define pa_context_get_client_info_list pa_context_get_client_info_list_dylibloader_wrapper_pulse
+#define pa_context_kill_client pa_context_kill_client_dylibloader_wrapper_pulse
+#define pa_context_get_card_info_by_index pa_context_get_card_info_by_index_dylibloader_wrapper_pulse
+#define pa_context_get_card_info_by_name pa_context_get_card_info_by_name_dylibloader_wrapper_pulse
+#define pa_context_get_card_info_list pa_context_get_card_info_list_dylibloader_wrapper_pulse
+#define pa_context_set_card_profile_by_index pa_context_set_card_profile_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_card_profile_by_name pa_context_set_card_profile_by_name_dylibloader_wrapper_pulse
+#define pa_context_set_port_latency_offset pa_context_set_port_latency_offset_dylibloader_wrapper_pulse
+#define pa_context_get_sink_input_info pa_context_get_sink_input_info_dylibloader_wrapper_pulse
+#define pa_context_get_sink_input_info_list pa_context_get_sink_input_info_list_dylibloader_wrapper_pulse
+#define pa_context_move_sink_input_by_name pa_context_move_sink_input_by_name_dylibloader_wrapper_pulse
+#define pa_context_move_sink_input_by_index pa_context_move_sink_input_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_sink_input_volume pa_context_set_sink_input_volume_dylibloader_wrapper_pulse
+#define pa_context_set_sink_input_mute pa_context_set_sink_input_mute_dylibloader_wrapper_pulse
+#define pa_context_kill_sink_input pa_context_kill_sink_input_dylibloader_wrapper_pulse
+#define pa_context_get_source_output_info pa_context_get_source_output_info_dylibloader_wrapper_pulse
+#define pa_context_get_source_output_info_list pa_context_get_source_output_info_list_dylibloader_wrapper_pulse
+#define pa_context_move_source_output_by_name pa_context_move_source_output_by_name_dylibloader_wrapper_pulse
+#define pa_context_move_source_output_by_index pa_context_move_source_output_by_index_dylibloader_wrapper_pulse
+#define pa_context_set_source_output_volume pa_context_set_source_output_volume_dylibloader_wrapper_pulse
+#define pa_context_set_source_output_mute pa_context_set_source_output_mute_dylibloader_wrapper_pulse
+#define pa_context_kill_source_output pa_context_kill_source_output_dylibloader_wrapper_pulse
+#define pa_context_stat pa_context_stat_dylibloader_wrapper_pulse
+#define pa_context_get_sample_info_by_name pa_context_get_sample_info_by_name_dylibloader_wrapper_pulse
+#define pa_context_get_sample_info_by_index pa_context_get_sample_info_by_index_dylibloader_wrapper_pulse
+#define pa_context_get_sample_info_list pa_context_get_sample_info_list_dylibloader_wrapper_pulse
+#define pa_context_get_autoload_info_by_name pa_context_get_autoload_info_by_name_dylibloader_wrapper_pulse
+#define pa_context_get_autoload_info_by_index pa_context_get_autoload_info_by_index_dylibloader_wrapper_pulse
+#define pa_context_get_autoload_info_list pa_context_get_autoload_info_list_dylibloader_wrapper_pulse
+#define pa_context_add_autoload pa_context_add_autoload_dylibloader_wrapper_pulse
+#define pa_context_remove_autoload_by_name pa_context_remove_autoload_by_name_dylibloader_wrapper_pulse
+#define pa_context_remove_autoload_by_index pa_context_remove_autoload_by_index_dylibloader_wrapper_pulse
+#define pa_context_subscribe pa_context_subscribe_dylibloader_wrapper_pulse
+#define pa_context_set_subscribe_callback pa_context_set_subscribe_callback_dylibloader_wrapper_pulse
+#define pa_stream_connect_upload pa_stream_connect_upload_dylibloader_wrapper_pulse
+#define pa_stream_finish_upload pa_stream_finish_upload_dylibloader_wrapper_pulse
+#define pa_context_remove_sample pa_context_remove_sample_dylibloader_wrapper_pulse
+#define pa_context_play_sample pa_context_play_sample_dylibloader_wrapper_pulse
+#define pa_context_play_sample_with_proplist pa_context_play_sample_with_proplist_dylibloader_wrapper_pulse
+#define pa_strerror pa_strerror_dylibloader_wrapper_pulse
+#define pa_xmalloc pa_xmalloc_dylibloader_wrapper_pulse
+#define pa_xmalloc0 pa_xmalloc0_dylibloader_wrapper_pulse
+#define pa_xrealloc pa_xrealloc_dylibloader_wrapper_pulse
+#define pa_xfree pa_xfree_dylibloader_wrapper_pulse
+#define pa_xstrdup pa_xstrdup_dylibloader_wrapper_pulse
+#define pa_xstrndup pa_xstrndup_dylibloader_wrapper_pulse
+#define pa_xmemdup pa_xmemdup_dylibloader_wrapper_pulse
+#define pa_utf8_valid pa_utf8_valid_dylibloader_wrapper_pulse
+#define pa_ascii_valid pa_ascii_valid_dylibloader_wrapper_pulse
+#define pa_utf8_filter pa_utf8_filter_dylibloader_wrapper_pulse
+#define pa_ascii_filter pa_ascii_filter_dylibloader_wrapper_pulse
+#define pa_utf8_to_locale pa_utf8_to_locale_dylibloader_wrapper_pulse
+#define pa_locale_to_utf8 pa_locale_to_utf8_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_new pa_threaded_mainloop_new_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_free pa_threaded_mainloop_free_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_start pa_threaded_mainloop_start_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_stop pa_threaded_mainloop_stop_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_lock pa_threaded_mainloop_lock_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_unlock pa_threaded_mainloop_unlock_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_wait pa_threaded_mainloop_wait_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_signal pa_threaded_mainloop_signal_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_accept pa_threaded_mainloop_accept_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_get_retval pa_threaded_mainloop_get_retval_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_get_api pa_threaded_mainloop_get_api_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_in_thread pa_threaded_mainloop_in_thread_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_set_name pa_threaded_mainloop_set_name_dylibloader_wrapper_pulse
+#define pa_threaded_mainloop_once_unlocked pa_threaded_mainloop_once_unlocked_dylibloader_wrapper_pulse
+#define pa_mainloop_new pa_mainloop_new_dylibloader_wrapper_pulse
+#define pa_mainloop_free pa_mainloop_free_dylibloader_wrapper_pulse
+#define pa_mainloop_prepare pa_mainloop_prepare_dylibloader_wrapper_pulse
+#define pa_mainloop_poll pa_mainloop_poll_dylibloader_wrapper_pulse
+#define pa_mainloop_dispatch pa_mainloop_dispatch_dylibloader_wrapper_pulse
+#define pa_mainloop_get_retval pa_mainloop_get_retval_dylibloader_wrapper_pulse
+#define pa_mainloop_iterate pa_mainloop_iterate_dylibloader_wrapper_pulse
+#define pa_mainloop_run pa_mainloop_run_dylibloader_wrapper_pulse
+#define pa_mainloop_get_api pa_mainloop_get_api_dylibloader_wrapper_pulse
+#define pa_mainloop_quit pa_mainloop_quit_dylibloader_wrapper_pulse
+#define pa_mainloop_wakeup pa_mainloop_wakeup_dylibloader_wrapper_pulse
+#define pa_mainloop_set_poll_func pa_mainloop_set_poll_func_dylibloader_wrapper_pulse
+#define pa_signal_init pa_signal_init_dylibloader_wrapper_pulse
+#define pa_signal_done pa_signal_done_dylibloader_wrapper_pulse
+#define pa_signal_new pa_signal_new_dylibloader_wrapper_pulse
+#define pa_signal_free pa_signal_free_dylibloader_wrapper_pulse
+#define pa_signal_set_destroy pa_signal_set_destroy_dylibloader_wrapper_pulse
+#define pa_get_user_name pa_get_user_name_dylibloader_wrapper_pulse
+#define pa_get_host_name pa_get_host_name_dylibloader_wrapper_pulse
+#define pa_get_fqdn pa_get_fqdn_dylibloader_wrapper_pulse
+#define pa_get_home_dir pa_get_home_dir_dylibloader_wrapper_pulse
+#define pa_get_binary_name pa_get_binary_name_dylibloader_wrapper_pulse
+#define pa_path_get_filename pa_path_get_filename_dylibloader_wrapper_pulse
+#define pa_msleep pa_msleep_dylibloader_wrapper_pulse
+#define pa_thread_make_realtime pa_thread_make_realtime_dylibloader_wrapper_pulse
+#define pa_gettimeofday pa_gettimeofday_dylibloader_wrapper_pulse
+#define pa_timeval_diff pa_timeval_diff_dylibloader_wrapper_pulse
+#define pa_timeval_cmp pa_timeval_cmp_dylibloader_wrapper_pulse
+#define pa_timeval_age pa_timeval_age_dylibloader_wrapper_pulse
+#define pa_timeval_add pa_timeval_add_dylibloader_wrapper_pulse
+#define pa_timeval_sub pa_timeval_sub_dylibloader_wrapper_pulse
+#define pa_timeval_store pa_timeval_store_dylibloader_wrapper_pulse
+#define pa_timeval_load pa_timeval_load_dylibloader_wrapper_pulse
+#define pa_rtclock_now pa_rtclock_now_dylibloader_wrapper_pulse
+extern const char* (*pa_get_library_version_dylibloader_wrapper_pulse)( void);
+extern size_t (*pa_bytes_per_second_dylibloader_wrapper_pulse)(const pa_sample_spec*);
+extern size_t (*pa_frame_size_dylibloader_wrapper_pulse)(const pa_sample_spec*);
+extern size_t (*pa_sample_size_dylibloader_wrapper_pulse)(const pa_sample_spec*);
+extern size_t (*pa_sample_size_of_format_dylibloader_wrapper_pulse)( pa_sample_format_t);
+extern pa_usec_t (*pa_bytes_to_usec_dylibloader_wrapper_pulse)( uint64_t,const pa_sample_spec*);
+extern size_t (*pa_usec_to_bytes_dylibloader_wrapper_pulse)( pa_usec_t,const pa_sample_spec*);
+extern pa_sample_spec* (*pa_sample_spec_init_dylibloader_wrapper_pulse)( pa_sample_spec*);
+extern int (*pa_sample_format_valid_dylibloader_wrapper_pulse)( unsigned);
+extern int (*pa_sample_rate_valid_dylibloader_wrapper_pulse)( uint32_t);
+extern int (*pa_channels_valid_dylibloader_wrapper_pulse)( uint8_t);
+extern int (*pa_sample_spec_valid_dylibloader_wrapper_pulse)(const pa_sample_spec*);
+extern int (*pa_sample_spec_equal_dylibloader_wrapper_pulse)(const pa_sample_spec*,const pa_sample_spec*);
+extern const char* (*pa_sample_format_to_string_dylibloader_wrapper_pulse)( pa_sample_format_t);
+extern pa_sample_format_t (*pa_parse_sample_format_dylibloader_wrapper_pulse)(const char*);
+extern char* (*pa_sample_spec_snprint_dylibloader_wrapper_pulse)( char*, size_t,const pa_sample_spec*);
+extern char* (*pa_bytes_snprint_dylibloader_wrapper_pulse)( char*, size_t, unsigned);
+extern int (*pa_sample_format_is_le_dylibloader_wrapper_pulse)( pa_sample_format_t);
+extern int (*pa_sample_format_is_be_dylibloader_wrapper_pulse)( pa_sample_format_t);
+extern int (*pa_direction_valid_dylibloader_wrapper_pulse)( pa_direction_t);
+extern const char* (*pa_direction_to_string_dylibloader_wrapper_pulse)( pa_direction_t);
+extern void (*pa_mainloop_api_once_dylibloader_wrapper_pulse)( pa_mainloop_api*, void*, void*);
+extern pa_proplist* (*pa_proplist_new_dylibloader_wrapper_pulse)( void);
+extern void (*pa_proplist_free_dylibloader_wrapper_pulse)( pa_proplist*);
+extern int (*pa_proplist_key_valid_dylibloader_wrapper_pulse)(const char*);
+extern int (*pa_proplist_sets_dylibloader_wrapper_pulse)( pa_proplist*,const char*,const char*);
+extern int (*pa_proplist_setp_dylibloader_wrapper_pulse)( pa_proplist*,const char*);
+extern int (*pa_proplist_setf_dylibloader_wrapper_pulse)( pa_proplist*,const char*,const char*,...);
+extern int (*pa_proplist_set_dylibloader_wrapper_pulse)( pa_proplist*,const char*,const void*, size_t);
+extern const char* (*pa_proplist_gets_dylibloader_wrapper_pulse)(const pa_proplist*,const char*);
+extern int (*pa_proplist_get_dylibloader_wrapper_pulse)(const pa_proplist*,const char*,const void**, size_t*);
+extern void (*pa_proplist_update_dylibloader_wrapper_pulse)( pa_proplist*, pa_update_mode_t,const pa_proplist*);
+extern int (*pa_proplist_unset_dylibloader_wrapper_pulse)( pa_proplist*,const char*);
+extern int (*pa_proplist_unset_many_dylibloader_wrapper_pulse)( pa_proplist*,const char* []);
+extern const char* (*pa_proplist_iterate_dylibloader_wrapper_pulse)(const pa_proplist*, void**);
+extern char* (*pa_proplist_to_string_dylibloader_wrapper_pulse)(const pa_proplist*);
+extern char* (*pa_proplist_to_string_sep_dylibloader_wrapper_pulse)(const pa_proplist*,const char*);
+extern pa_proplist* (*pa_proplist_from_string_dylibloader_wrapper_pulse)(const char*);
+extern int (*pa_proplist_contains_dylibloader_wrapper_pulse)(const pa_proplist*,const char*);
+extern void (*pa_proplist_clear_dylibloader_wrapper_pulse)( pa_proplist*);
+extern pa_proplist* (*pa_proplist_copy_dylibloader_wrapper_pulse)(const pa_proplist*);
+extern unsigned (*pa_proplist_size_dylibloader_wrapper_pulse)(const pa_proplist*);
+extern int (*pa_proplist_isempty_dylibloader_wrapper_pulse)(const pa_proplist*);
+extern int (*pa_proplist_equal_dylibloader_wrapper_pulse)(const pa_proplist*,const pa_proplist*);
+extern pa_channel_map* (*pa_channel_map_init_dylibloader_wrapper_pulse)( pa_channel_map*);
+extern pa_channel_map* (*pa_channel_map_init_mono_dylibloader_wrapper_pulse)( pa_channel_map*);
+extern pa_channel_map* (*pa_channel_map_init_stereo_dylibloader_wrapper_pulse)( pa_channel_map*);
+extern pa_channel_map* (*pa_channel_map_init_auto_dylibloader_wrapper_pulse)( pa_channel_map*, unsigned, pa_channel_map_def_t);
+extern pa_channel_map* (*pa_channel_map_init_extend_dylibloader_wrapper_pulse)( pa_channel_map*, unsigned, pa_channel_map_def_t);
+extern const char* (*pa_channel_position_to_string_dylibloader_wrapper_pulse)( pa_channel_position_t);
+extern pa_channel_position_t (*pa_channel_position_from_string_dylibloader_wrapper_pulse)(const char*);
+extern const char* (*pa_channel_position_to_pretty_string_dylibloader_wrapper_pulse)( pa_channel_position_t);
+extern char* (*pa_channel_map_snprint_dylibloader_wrapper_pulse)( char*, size_t,const pa_channel_map*);
+extern pa_channel_map* (*pa_channel_map_parse_dylibloader_wrapper_pulse)( pa_channel_map*,const char*);
+extern int (*pa_channel_map_equal_dylibloader_wrapper_pulse)(const pa_channel_map*,const pa_channel_map*);
+extern int (*pa_channel_map_valid_dylibloader_wrapper_pulse)(const pa_channel_map*);
+extern int (*pa_channel_map_compatible_dylibloader_wrapper_pulse)(const pa_channel_map*,const pa_sample_spec*);
+extern int (*pa_channel_map_superset_dylibloader_wrapper_pulse)(const pa_channel_map*,const pa_channel_map*);
+extern int (*pa_channel_map_can_balance_dylibloader_wrapper_pulse)(const pa_channel_map*);
+extern int (*pa_channel_map_can_fade_dylibloader_wrapper_pulse)(const pa_channel_map*);
+extern int (*pa_channel_map_can_lfe_balance_dylibloader_wrapper_pulse)(const pa_channel_map*);
+extern const char* (*pa_channel_map_to_name_dylibloader_wrapper_pulse)(const pa_channel_map*);
+extern const char* (*pa_channel_map_to_pretty_name_dylibloader_wrapper_pulse)(const pa_channel_map*);
+extern int (*pa_channel_map_has_position_dylibloader_wrapper_pulse)(const pa_channel_map*, pa_channel_position_t);
+extern pa_channel_position_mask_t (*pa_channel_map_mask_dylibloader_wrapper_pulse)(const pa_channel_map*);
+extern const char* (*pa_encoding_to_string_dylibloader_wrapper_pulse)( pa_encoding_t);
+extern pa_encoding_t (*pa_encoding_from_string_dylibloader_wrapper_pulse)(const char*);
+extern pa_format_info* (*pa_format_info_new_dylibloader_wrapper_pulse)( void);
+extern pa_format_info* (*pa_format_info_copy_dylibloader_wrapper_pulse)(const pa_format_info*);
+extern void (*pa_format_info_free_dylibloader_wrapper_pulse)( pa_format_info*);
+extern int (*pa_format_info_valid_dylibloader_wrapper_pulse)(const pa_format_info*);
+extern int (*pa_format_info_is_pcm_dylibloader_wrapper_pulse)(const pa_format_info*);
+extern int (*pa_format_info_is_compatible_dylibloader_wrapper_pulse)(const pa_format_info*,const pa_format_info*);
+extern char* (*pa_format_info_snprint_dylibloader_wrapper_pulse)( char*, size_t,const pa_format_info*);
+extern pa_format_info* (*pa_format_info_from_string_dylibloader_wrapper_pulse)(const char*);
+extern pa_format_info* (*pa_format_info_from_sample_spec_dylibloader_wrapper_pulse)(const pa_sample_spec*,const pa_channel_map*);
+extern int (*pa_format_info_to_sample_spec_dylibloader_wrapper_pulse)(const pa_format_info*, pa_sample_spec*, pa_channel_map*);
+extern pa_prop_type_t (*pa_format_info_get_prop_type_dylibloader_wrapper_pulse)(const pa_format_info*,const char*);
+extern int (*pa_format_info_get_prop_int_dylibloader_wrapper_pulse)(const pa_format_info*,const char*, int*);
+extern int (*pa_format_info_get_prop_int_range_dylibloader_wrapper_pulse)(const pa_format_info*,const char*, int*, int*);
+extern int (*pa_format_info_get_prop_int_array_dylibloader_wrapper_pulse)(const pa_format_info*,const char*, int**, int*);
+extern int (*pa_format_info_get_prop_string_dylibloader_wrapper_pulse)(const pa_format_info*,const char*, char**);
+extern int (*pa_format_info_get_prop_string_array_dylibloader_wrapper_pulse)(const pa_format_info*,const char*, char***, int*);
+extern void (*pa_format_info_free_string_array_dylibloader_wrapper_pulse)( char**, int);
+extern int (*pa_format_info_get_sample_format_dylibloader_wrapper_pulse)(const pa_format_info*, pa_sample_format_t*);
+extern int (*pa_format_info_get_rate_dylibloader_wrapper_pulse)(const pa_format_info*, uint32_t*);
+extern int (*pa_format_info_get_channels_dylibloader_wrapper_pulse)(const pa_format_info*, uint8_t*);
+extern int (*pa_format_info_get_channel_map_dylibloader_wrapper_pulse)(const pa_format_info*, pa_channel_map*);
+extern void (*pa_format_info_set_prop_int_dylibloader_wrapper_pulse)( pa_format_info*,const char*, int);
+extern void (*pa_format_info_set_prop_int_array_dylibloader_wrapper_pulse)( pa_format_info*,const char*,const int*, int);
+extern void (*pa_format_info_set_prop_int_range_dylibloader_wrapper_pulse)( pa_format_info*,const char*, int, int);
+extern void (*pa_format_info_set_prop_string_dylibloader_wrapper_pulse)( pa_format_info*,const char*,const char*);
+extern void (*pa_format_info_set_prop_string_array_dylibloader_wrapper_pulse)( pa_format_info*,const char*,const char**, int);
+extern void (*pa_format_info_set_sample_format_dylibloader_wrapper_pulse)( pa_format_info*, pa_sample_format_t);
+extern void (*pa_format_info_set_rate_dylibloader_wrapper_pulse)( pa_format_info*, int);
+extern void (*pa_format_info_set_channels_dylibloader_wrapper_pulse)( pa_format_info*, int);
+extern void (*pa_format_info_set_channel_map_dylibloader_wrapper_pulse)( pa_format_info*,const pa_channel_map*);
+extern pa_operation* (*pa_operation_ref_dylibloader_wrapper_pulse)( pa_operation*);
+extern void (*pa_operation_unref_dylibloader_wrapper_pulse)( pa_operation*);
+extern void (*pa_operation_cancel_dylibloader_wrapper_pulse)( pa_operation*);
+extern pa_operation_state_t (*pa_operation_get_state_dylibloader_wrapper_pulse)(const pa_operation*);
+extern void (*pa_operation_set_state_callback_dylibloader_wrapper_pulse)( pa_operation*, pa_operation_notify_cb_t, void*);
+extern pa_context* (*pa_context_new_dylibloader_wrapper_pulse)( pa_mainloop_api*,const char*);
+extern pa_context* (*pa_context_new_with_proplist_dylibloader_wrapper_pulse)( pa_mainloop_api*,const char*,const pa_proplist*);
+extern void (*pa_context_unref_dylibloader_wrapper_pulse)( pa_context*);
+extern pa_context* (*pa_context_ref_dylibloader_wrapper_pulse)( pa_context*);
+extern void (*pa_context_set_state_callback_dylibloader_wrapper_pulse)( pa_context*, pa_context_notify_cb_t, void*);
+extern void (*pa_context_set_event_callback_dylibloader_wrapper_pulse)( pa_context*, pa_context_event_cb_t, void*);
+extern int (*pa_context_errno_dylibloader_wrapper_pulse)(const pa_context*);
+extern int (*pa_context_is_pending_dylibloader_wrapper_pulse)(const pa_context*);
+extern pa_context_state_t (*pa_context_get_state_dylibloader_wrapper_pulse)(const pa_context*);
+extern int (*pa_context_connect_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_context_flags_t,const pa_spawn_api*);
+extern void (*pa_context_disconnect_dylibloader_wrapper_pulse)( pa_context*);
+extern pa_operation* (*pa_context_drain_dylibloader_wrapper_pulse)( pa_context*, pa_context_notify_cb_t, void*);
+extern pa_operation* (*pa_context_exit_daemon_dylibloader_wrapper_pulse)( pa_context*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_default_sink_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_default_source_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_context_success_cb_t, void*);
+extern int (*pa_context_is_local_dylibloader_wrapper_pulse)(const pa_context*);
+extern pa_operation* (*pa_context_set_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_context_success_cb_t, void*);
+extern const char* (*pa_context_get_server_dylibloader_wrapper_pulse)(const pa_context*);
+extern uint32_t (*pa_context_get_protocol_version_dylibloader_wrapper_pulse)(const pa_context*);
+extern uint32_t (*pa_context_get_server_protocol_version_dylibloader_wrapper_pulse)(const pa_context*);
+extern pa_operation* (*pa_context_proplist_update_dylibloader_wrapper_pulse)( pa_context*, pa_update_mode_t,const pa_proplist*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_proplist_remove_dylibloader_wrapper_pulse)( pa_context*,const char* [], pa_context_success_cb_t, void*);
+extern uint32_t (*pa_context_get_index_dylibloader_wrapper_pulse)(const pa_context*);
+extern pa_time_event* (*pa_context_rttime_new_dylibloader_wrapper_pulse)(const pa_context*, pa_usec_t, pa_time_event_cb_t, void*);
+extern void (*pa_context_rttime_restart_dylibloader_wrapper_pulse)(const pa_context*, pa_time_event*, pa_usec_t);
+extern size_t (*pa_context_get_tile_size_dylibloader_wrapper_pulse)(const pa_context*,const pa_sample_spec*);
+extern int (*pa_context_load_cookie_from_file_dylibloader_wrapper_pulse)( pa_context*,const char*);
+extern int (*pa_cvolume_equal_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_cvolume*);
+extern pa_cvolume* (*pa_cvolume_init_dylibloader_wrapper_pulse)( pa_cvolume*);
+extern pa_cvolume* (*pa_cvolume_set_dylibloader_wrapper_pulse)( pa_cvolume*, unsigned, pa_volume_t);
+extern char* (*pa_cvolume_snprint_dylibloader_wrapper_pulse)( char*, size_t,const pa_cvolume*);
+extern char* (*pa_sw_cvolume_snprint_dB_dylibloader_wrapper_pulse)( char*, size_t,const pa_cvolume*);
+extern char* (*pa_cvolume_snprint_verbose_dylibloader_wrapper_pulse)( char*, size_t,const pa_cvolume*,const pa_channel_map*, int);
+extern char* (*pa_volume_snprint_dylibloader_wrapper_pulse)( char*, size_t, pa_volume_t);
+extern char* (*pa_sw_volume_snprint_dB_dylibloader_wrapper_pulse)( char*, size_t, pa_volume_t);
+extern char* (*pa_volume_snprint_verbose_dylibloader_wrapper_pulse)( char*, size_t, pa_volume_t, int);
+extern pa_volume_t (*pa_cvolume_avg_dylibloader_wrapper_pulse)(const pa_cvolume*);
+extern pa_volume_t (*pa_cvolume_avg_mask_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*, pa_channel_position_mask_t);
+extern pa_volume_t (*pa_cvolume_max_dylibloader_wrapper_pulse)(const pa_cvolume*);
+extern pa_volume_t (*pa_cvolume_max_mask_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*, pa_channel_position_mask_t);
+extern pa_volume_t (*pa_cvolume_min_dylibloader_wrapper_pulse)(const pa_cvolume*);
+extern pa_volume_t (*pa_cvolume_min_mask_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*, pa_channel_position_mask_t);
+extern int (*pa_cvolume_valid_dylibloader_wrapper_pulse)(const pa_cvolume*);
+extern int (*pa_cvolume_channels_equal_to_dylibloader_wrapper_pulse)(const pa_cvolume*, pa_volume_t);
+extern pa_volume_t (*pa_sw_volume_multiply_dylibloader_wrapper_pulse)( pa_volume_t, pa_volume_t);
+extern pa_cvolume* (*pa_sw_cvolume_multiply_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_cvolume*,const pa_cvolume*);
+extern pa_cvolume* (*pa_sw_cvolume_multiply_scalar_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_cvolume*, pa_volume_t);
+extern pa_volume_t (*pa_sw_volume_divide_dylibloader_wrapper_pulse)( pa_volume_t, pa_volume_t);
+extern pa_cvolume* (*pa_sw_cvolume_divide_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_cvolume*,const pa_cvolume*);
+extern pa_cvolume* (*pa_sw_cvolume_divide_scalar_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_cvolume*, pa_volume_t);
+extern pa_volume_t (*pa_sw_volume_from_dB_dylibloader_wrapper_pulse)( double);
+extern double (*pa_sw_volume_to_dB_dylibloader_wrapper_pulse)( pa_volume_t);
+extern pa_volume_t (*pa_sw_volume_from_linear_dylibloader_wrapper_pulse)( double);
+extern double (*pa_sw_volume_to_linear_dylibloader_wrapper_pulse)( pa_volume_t);
+extern pa_cvolume* (*pa_cvolume_remap_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_channel_map*,const pa_channel_map*);
+extern int (*pa_cvolume_compatible_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_sample_spec*);
+extern int (*pa_cvolume_compatible_with_channel_map_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*);
+extern float (*pa_cvolume_get_balance_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*);
+extern pa_cvolume* (*pa_cvolume_set_balance_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_channel_map*, float);
+extern float (*pa_cvolume_get_fade_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*);
+extern pa_cvolume* (*pa_cvolume_set_fade_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_channel_map*, float);
+extern float (*pa_cvolume_get_lfe_balance_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*);
+extern pa_cvolume* (*pa_cvolume_set_lfe_balance_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_channel_map*, float);
+extern pa_cvolume* (*pa_cvolume_scale_dylibloader_wrapper_pulse)( pa_cvolume*, pa_volume_t);
+extern pa_cvolume* (*pa_cvolume_scale_mask_dylibloader_wrapper_pulse)( pa_cvolume*, pa_volume_t,const pa_channel_map*, pa_channel_position_mask_t);
+extern pa_cvolume* (*pa_cvolume_set_position_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_channel_map*, pa_channel_position_t, pa_volume_t);
+extern pa_volume_t (*pa_cvolume_get_position_dylibloader_wrapper_pulse)(const pa_cvolume*,const pa_channel_map*, pa_channel_position_t);
+extern pa_cvolume* (*pa_cvolume_merge_dylibloader_wrapper_pulse)( pa_cvolume*,const pa_cvolume*,const pa_cvolume*);
+extern pa_cvolume* (*pa_cvolume_inc_clamp_dylibloader_wrapper_pulse)( pa_cvolume*, pa_volume_t, pa_volume_t);
+extern pa_cvolume* (*pa_cvolume_inc_dylibloader_wrapper_pulse)( pa_cvolume*, pa_volume_t);
+extern pa_cvolume* (*pa_cvolume_dec_dylibloader_wrapper_pulse)( pa_cvolume*, pa_volume_t);
+extern pa_stream* (*pa_stream_new_dylibloader_wrapper_pulse)( pa_context*,const char*,const pa_sample_spec*,const pa_channel_map*);
+extern pa_stream* (*pa_stream_new_with_proplist_dylibloader_wrapper_pulse)( pa_context*,const char*,const pa_sample_spec*,const pa_channel_map*, pa_proplist*);
+extern pa_stream* (*pa_stream_new_extended_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_format_info**, unsigned int, pa_proplist*);
+extern void (*pa_stream_unref_dylibloader_wrapper_pulse)( pa_stream*);
+extern pa_stream* (*pa_stream_ref_dylibloader_wrapper_pulse)( pa_stream*);
+extern pa_stream_state_t (*pa_stream_get_state_dylibloader_wrapper_pulse)(const pa_stream*);
+extern pa_context* (*pa_stream_get_context_dylibloader_wrapper_pulse)(const pa_stream*);
+extern uint32_t (*pa_stream_get_index_dylibloader_wrapper_pulse)(const pa_stream*);
+extern uint32_t (*pa_stream_get_device_index_dylibloader_wrapper_pulse)(const pa_stream*);
+extern const char* (*pa_stream_get_device_name_dylibloader_wrapper_pulse)(const pa_stream*);
+extern int (*pa_stream_is_suspended_dylibloader_wrapper_pulse)(const pa_stream*);
+extern int (*pa_stream_is_corked_dylibloader_wrapper_pulse)(const pa_stream*);
+extern int (*pa_stream_connect_playback_dylibloader_wrapper_pulse)( pa_stream*,const char*,const pa_buffer_attr*, pa_stream_flags_t,const pa_cvolume*, pa_stream*);
+extern int (*pa_stream_connect_record_dylibloader_wrapper_pulse)( pa_stream*,const char*,const pa_buffer_attr*, pa_stream_flags_t);
+extern int (*pa_stream_disconnect_dylibloader_wrapper_pulse)( pa_stream*);
+extern int (*pa_stream_begin_write_dylibloader_wrapper_pulse)( pa_stream*, void**, size_t*);
+extern int (*pa_stream_cancel_write_dylibloader_wrapper_pulse)( pa_stream*);
+extern int (*pa_stream_write_dylibloader_wrapper_pulse)( pa_stream*,const void*, size_t, pa_free_cb_t, int64_t, pa_seek_mode_t);
+extern int (*pa_stream_write_ext_free_dylibloader_wrapper_pulse)( pa_stream*,const void*, size_t, pa_free_cb_t, void*, int64_t, pa_seek_mode_t);
+extern int (*pa_stream_peek_dylibloader_wrapper_pulse)( pa_stream*,const void**, size_t*);
+extern int (*pa_stream_drop_dylibloader_wrapper_pulse)( pa_stream*);
+extern size_t (*pa_stream_writable_size_dylibloader_wrapper_pulse)(const pa_stream*);
+extern size_t (*pa_stream_readable_size_dylibloader_wrapper_pulse)(const pa_stream*);
+extern pa_operation* (*pa_stream_drain_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_success_cb_t, void*);
+extern pa_operation* (*pa_stream_update_timing_info_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_success_cb_t, void*);
+extern void (*pa_stream_set_state_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+extern void (*pa_stream_set_write_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_request_cb_t, void*);
+extern void (*pa_stream_set_read_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_request_cb_t, void*);
+extern void (*pa_stream_set_overflow_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+extern int64_t (*pa_stream_get_underflow_index_dylibloader_wrapper_pulse)(const pa_stream*);
+extern void (*pa_stream_set_underflow_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+extern void (*pa_stream_set_started_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+extern void (*pa_stream_set_latency_update_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+extern void (*pa_stream_set_moved_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+extern void (*pa_stream_set_suspended_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+extern void (*pa_stream_set_event_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_event_cb_t, void*);
+extern void (*pa_stream_set_buffer_attr_callback_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_notify_cb_t, void*);
+extern pa_operation* (*pa_stream_cork_dylibloader_wrapper_pulse)( pa_stream*, int, pa_stream_success_cb_t, void*);
+extern pa_operation* (*pa_stream_flush_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_success_cb_t, void*);
+extern pa_operation* (*pa_stream_prebuf_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_success_cb_t, void*);
+extern pa_operation* (*pa_stream_trigger_dylibloader_wrapper_pulse)( pa_stream*, pa_stream_success_cb_t, void*);
+extern pa_operation* (*pa_stream_set_name_dylibloader_wrapper_pulse)( pa_stream*,const char*, pa_stream_success_cb_t, void*);
+extern int (*pa_stream_get_time_dylibloader_wrapper_pulse)( pa_stream*, pa_usec_t*);
+extern int (*pa_stream_get_latency_dylibloader_wrapper_pulse)( pa_stream*, pa_usec_t*, int*);
+extern const pa_timing_info* (*pa_stream_get_timing_info_dylibloader_wrapper_pulse)( pa_stream*);
+extern const pa_sample_spec* (*pa_stream_get_sample_spec_dylibloader_wrapper_pulse)( pa_stream*);
+extern const pa_channel_map* (*pa_stream_get_channel_map_dylibloader_wrapper_pulse)( pa_stream*);
+extern const pa_format_info* (*pa_stream_get_format_info_dylibloader_wrapper_pulse)(const pa_stream*);
+extern const pa_buffer_attr* (*pa_stream_get_buffer_attr_dylibloader_wrapper_pulse)( pa_stream*);
+extern pa_operation* (*pa_stream_set_buffer_attr_dylibloader_wrapper_pulse)( pa_stream*,const pa_buffer_attr*, pa_stream_success_cb_t, void*);
+extern pa_operation* (*pa_stream_update_sample_rate_dylibloader_wrapper_pulse)( pa_stream*, uint32_t, pa_stream_success_cb_t, void*);
+extern pa_operation* (*pa_stream_proplist_update_dylibloader_wrapper_pulse)( pa_stream*, pa_update_mode_t, pa_proplist*, pa_stream_success_cb_t, void*);
+extern pa_operation* (*pa_stream_proplist_remove_dylibloader_wrapper_pulse)( pa_stream*,const char* [], pa_stream_success_cb_t, void*);
+extern int (*pa_stream_set_monitor_stream_dylibloader_wrapper_pulse)( pa_stream*, uint32_t);
+extern uint32_t (*pa_stream_get_monitor_stream_dylibloader_wrapper_pulse)(const pa_stream*);
+extern pa_operation* (*pa_context_get_sink_info_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_sink_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_sink_info_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_sink_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_sink_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_sink_info_cb_t, void*);
+extern pa_operation* (*pa_context_set_sink_volume_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const pa_cvolume*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_sink_volume_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*,const pa_cvolume*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_sink_mute_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_sink_mute_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, int, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_suspend_sink_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, int, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_suspend_sink_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_sink_port_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const char*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_sink_port_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_get_source_info_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_source_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_source_info_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_source_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_source_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_source_info_cb_t, void*);
+extern pa_operation* (*pa_context_set_source_volume_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const pa_cvolume*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_source_volume_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*,const pa_cvolume*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_source_mute_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_source_mute_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, int, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_suspend_source_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, int, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_suspend_source_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_source_port_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const char*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_source_port_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_get_server_info_dylibloader_wrapper_pulse)( pa_context*, pa_server_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_module_info_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_module_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_module_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_module_info_cb_t, void*);
+extern pa_operation* (*pa_context_load_module_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_context_index_cb_t, void*);
+extern pa_operation* (*pa_context_unload_module_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_get_client_info_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_client_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_client_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_client_info_cb_t, void*);
+extern pa_operation* (*pa_context_kill_client_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_get_card_info_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_card_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_card_info_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_card_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_card_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_card_info_cb_t, void*);
+extern pa_operation* (*pa_context_set_card_profile_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const char*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_card_profile_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_port_latency_offset_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, int64_t, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_get_sink_input_info_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_sink_input_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_sink_input_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_sink_input_info_cb_t, void*);
+extern pa_operation* (*pa_context_move_sink_input_by_name_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const char*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_move_sink_input_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, uint32_t, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_sink_input_volume_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const pa_cvolume*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_sink_input_mute_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_kill_sink_input_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_get_source_output_info_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_source_output_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_source_output_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_source_output_info_cb_t, void*);
+extern pa_operation* (*pa_context_move_source_output_by_name_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const char*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_move_source_output_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, uint32_t, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_source_output_volume_dylibloader_wrapper_pulse)( pa_context*, uint32_t,const pa_cvolume*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_set_source_output_mute_dylibloader_wrapper_pulse)( pa_context*, uint32_t, int, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_kill_source_output_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_stat_dylibloader_wrapper_pulse)( pa_context*, pa_stat_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_sample_info_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_sample_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_sample_info_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_sample_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_sample_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_sample_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_autoload_info_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_autoload_type_t, pa_autoload_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_autoload_info_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_autoload_info_cb_t, void*);
+extern pa_operation* (*pa_context_get_autoload_info_list_dylibloader_wrapper_pulse)( pa_context*, pa_autoload_info_cb_t, void*);
+extern pa_operation* (*pa_context_add_autoload_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_autoload_type_t,const char*,const char*, pa_context_index_cb_t, void*);
+extern pa_operation* (*pa_context_remove_autoload_by_name_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_autoload_type_t, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_remove_autoload_by_index_dylibloader_wrapper_pulse)( pa_context*, uint32_t, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_subscribe_dylibloader_wrapper_pulse)( pa_context*, pa_subscription_mask_t, pa_context_success_cb_t, void*);
+extern void (*pa_context_set_subscribe_callback_dylibloader_wrapper_pulse)( pa_context*, pa_context_subscribe_cb_t, void*);
+extern int (*pa_stream_connect_upload_dylibloader_wrapper_pulse)( pa_stream*, size_t);
+extern int (*pa_stream_finish_upload_dylibloader_wrapper_pulse)( pa_stream*);
+extern pa_operation* (*pa_context_remove_sample_dylibloader_wrapper_pulse)( pa_context*,const char*, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_play_sample_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_volume_t, pa_context_success_cb_t, void*);
+extern pa_operation* (*pa_context_play_sample_with_proplist_dylibloader_wrapper_pulse)( pa_context*,const char*,const char*, pa_volume_t,const pa_proplist*, pa_context_play_sample_cb_t, void*);
+extern const char* (*pa_strerror_dylibloader_wrapper_pulse)( int);
+extern void* (*pa_xmalloc_dylibloader_wrapper_pulse)( size_t);
+extern void* (*pa_xmalloc0_dylibloader_wrapper_pulse)( size_t);
+extern void* (*pa_xrealloc_dylibloader_wrapper_pulse)( void*, size_t);
+extern void (*pa_xfree_dylibloader_wrapper_pulse)( void*);
+extern char* (*pa_xstrdup_dylibloader_wrapper_pulse)(const char*);
+extern char* (*pa_xstrndup_dylibloader_wrapper_pulse)(const char*, size_t);
+extern void* (*pa_xmemdup_dylibloader_wrapper_pulse)(const void*, size_t);
+extern char* (*pa_utf8_valid_dylibloader_wrapper_pulse)(const char*);
+extern char* (*pa_ascii_valid_dylibloader_wrapper_pulse)(const char*);
+extern char* (*pa_utf8_filter_dylibloader_wrapper_pulse)(const char*);
+extern char* (*pa_ascii_filter_dylibloader_wrapper_pulse)(const char*);
+extern char* (*pa_utf8_to_locale_dylibloader_wrapper_pulse)(const char*);
+extern char* (*pa_locale_to_utf8_dylibloader_wrapper_pulse)(const char*);
+extern pa_threaded_mainloop* (*pa_threaded_mainloop_new_dylibloader_wrapper_pulse)( void);
+extern void (*pa_threaded_mainloop_free_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+extern int (*pa_threaded_mainloop_start_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+extern void (*pa_threaded_mainloop_stop_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+extern void (*pa_threaded_mainloop_lock_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+extern void (*pa_threaded_mainloop_unlock_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+extern void (*pa_threaded_mainloop_wait_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+extern void (*pa_threaded_mainloop_signal_dylibloader_wrapper_pulse)( pa_threaded_mainloop*, int);
+extern void (*pa_threaded_mainloop_accept_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+extern int (*pa_threaded_mainloop_get_retval_dylibloader_wrapper_pulse)(const pa_threaded_mainloop*);
+extern pa_mainloop_api* (*pa_threaded_mainloop_get_api_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+extern int (*pa_threaded_mainloop_in_thread_dylibloader_wrapper_pulse)( pa_threaded_mainloop*);
+extern void (*pa_threaded_mainloop_set_name_dylibloader_wrapper_pulse)( pa_threaded_mainloop*,const char*);
+extern void (*pa_threaded_mainloop_once_unlocked_dylibloader_wrapper_pulse)( pa_threaded_mainloop*, void*, void*);
+extern pa_mainloop* (*pa_mainloop_new_dylibloader_wrapper_pulse)( void);
+extern void (*pa_mainloop_free_dylibloader_wrapper_pulse)( pa_mainloop*);
+extern int (*pa_mainloop_prepare_dylibloader_wrapper_pulse)( pa_mainloop*, int);
+extern int (*pa_mainloop_poll_dylibloader_wrapper_pulse)( pa_mainloop*);
+extern int (*pa_mainloop_dispatch_dylibloader_wrapper_pulse)( pa_mainloop*);
+extern int (*pa_mainloop_get_retval_dylibloader_wrapper_pulse)(const pa_mainloop*);
+extern int (*pa_mainloop_iterate_dylibloader_wrapper_pulse)( pa_mainloop*, int, int*);
+extern int (*pa_mainloop_run_dylibloader_wrapper_pulse)( pa_mainloop*, int*);
+extern pa_mainloop_api* (*pa_mainloop_get_api_dylibloader_wrapper_pulse)( pa_mainloop*);
+extern void (*pa_mainloop_quit_dylibloader_wrapper_pulse)( pa_mainloop*, int);
+extern void (*pa_mainloop_wakeup_dylibloader_wrapper_pulse)( pa_mainloop*);
+extern void (*pa_mainloop_set_poll_func_dylibloader_wrapper_pulse)( pa_mainloop*, pa_poll_func, void*);
+extern int (*pa_signal_init_dylibloader_wrapper_pulse)( pa_mainloop_api*);
+extern void (*pa_signal_done_dylibloader_wrapper_pulse)( void);
+extern pa_signal_event* (*pa_signal_new_dylibloader_wrapper_pulse)( int, pa_signal_cb_t, void*);
+extern void (*pa_signal_free_dylibloader_wrapper_pulse)( pa_signal_event*);
+extern void (*pa_signal_set_destroy_dylibloader_wrapper_pulse)( pa_signal_event*, pa_signal_destroy_cb_t);
+extern char* (*pa_get_user_name_dylibloader_wrapper_pulse)( char*, size_t);
+extern char* (*pa_get_host_name_dylibloader_wrapper_pulse)( char*, size_t);
+extern char* (*pa_get_fqdn_dylibloader_wrapper_pulse)( char*, size_t);
+extern char* (*pa_get_home_dir_dylibloader_wrapper_pulse)( char*, size_t);
+extern char* (*pa_get_binary_name_dylibloader_wrapper_pulse)( char*, size_t);
+extern char* (*pa_path_get_filename_dylibloader_wrapper_pulse)(const char*);
+extern int (*pa_msleep_dylibloader_wrapper_pulse)( unsigned long);
+extern int (*pa_thread_make_realtime_dylibloader_wrapper_pulse)( int);
+extern struct timeval* (*pa_gettimeofday_dylibloader_wrapper_pulse)(struct timeval*);
+extern pa_usec_t (*pa_timeval_diff_dylibloader_wrapper_pulse)(struct timeval*,struct timeval*);
+extern int (*pa_timeval_cmp_dylibloader_wrapper_pulse)(struct timeval*,struct timeval*);
+extern pa_usec_t (*pa_timeval_age_dylibloader_wrapper_pulse)(struct timeval*);
+extern struct timeval* (*pa_timeval_add_dylibloader_wrapper_pulse)(struct timeval*, pa_usec_t);
+extern struct timeval* (*pa_timeval_sub_dylibloader_wrapper_pulse)(struct timeval*, pa_usec_t);
+extern struct timeval* (*pa_timeval_store_dylibloader_wrapper_pulse)(struct timeval*, pa_usec_t);
+extern pa_usec_t (*pa_timeval_load_dylibloader_wrapper_pulse)(struct timeval*);
+extern pa_usec_t (*pa_rtclock_now_dylibloader_wrapper_pulse)( void);
+int initialize_pulse();
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp
index 5dc039afd9..eda929850c 100644
--- a/drivers/unix/dir_access_unix.cpp
+++ b/drivers/unix/dir_access_unix.cpp
@@ -232,7 +232,7 @@ static void _get_drives(List<String> *list) {
// Parse only file:// links
if (strncmp(string, "file://", 7) == 0) {
// Strip any unwanted edges on the strings and push_back if it's not a duplicate
- String fpath = String(string + 7).strip_edges().split_spaces()[0].percent_decode();
+ String fpath = String(string + 7).strip_edges().split_spaces()[0].uri_decode();
if (!list->find(fpath)) {
list->push_back(fpath);
}
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index d94c2126ef..b9bd773c2e 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -35,11 +35,9 @@
#include "core/config/project_settings.h"
#include "core/debugger/engine_debugger.h"
#include "core/debugger/script_debugger.h"
-#include "core/os/thread_dummy.h"
#include "drivers/unix/dir_access_unix.h"
#include "drivers/unix/file_access_unix.h"
#include "drivers/unix/net_socket_posix.h"
-#include "drivers/unix/rw_lock_posix.h"
#include "drivers/unix/thread_posix.h"
#include "servers/rendering_server.h"
@@ -64,6 +62,7 @@
#include <string.h>
#include <sys/time.h>
#include <sys/wait.h>
+#include <time.h>
#include <unistd.h>
/// Clock Setup function (used by get_ticks_usec)
@@ -117,13 +116,10 @@ int OS_Unix::unix_initialize_audio(int p_audio_driver) {
}
void OS_Unix::initialize_core() {
-#ifdef NO_THREADS
- ThreadDummy::make_default();
- RWLockDummy::make_default();
-#else
- ThreadPosix::make_default();
- RWLockPosix::make_default();
+#if !defined(NO_THREADS)
+ init_thread_posix();
#endif
+
FileAccess::make_default<FileAccessUnix>(FileAccess::ACCESS_RESOURCES);
FileAccess::make_default<FileAccessUnix>(FileAccess::ACCESS_USERDATA);
FileAccess::make_default<FileAccessUnix>(FileAccess::ACCESS_FILESYSTEM);
diff --git a/drivers/unix/rw_lock_posix.cpp b/drivers/unix/rw_lock_posix.cpp
deleted file mode 100644
index af3ca3a597..0000000000
--- a/drivers/unix/rw_lock_posix.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/*************************************************************************/
-/* rw_lock_posix.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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. */
-/*************************************************************************/
-
-#if defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)
-
-#include "rw_lock_posix.h"
-
-#include "core/error/error_macros.h"
-#include "core/os/memory.h"
-#include <stdio.h>
-
-void RWLockPosix::read_lock() {
- int err = pthread_rwlock_rdlock(&rwlock);
- if (err != 0) {
- perror("Acquiring lock failed");
- }
- ERR_FAIL_COND(err != 0);
-}
-
-void RWLockPosix::read_unlock() {
- pthread_rwlock_unlock(&rwlock);
-}
-
-Error RWLockPosix::read_try_lock() {
- if (pthread_rwlock_tryrdlock(&rwlock) != 0) {
- return ERR_BUSY;
- } else {
- return OK;
- }
-}
-
-void RWLockPosix::write_lock() {
- int err = pthread_rwlock_wrlock(&rwlock);
- ERR_FAIL_COND(err != 0);
-}
-
-void RWLockPosix::write_unlock() {
- pthread_rwlock_unlock(&rwlock);
-}
-
-Error RWLockPosix::write_try_lock() {
- if (pthread_rwlock_trywrlock(&rwlock) != 0) {
- return ERR_BUSY;
- } else {
- return OK;
- }
-}
-
-RWLock *RWLockPosix::create_func_posix() {
- return memnew(RWLockPosix);
-}
-
-void RWLockPosix::make_default() {
- create_func = create_func_posix;
-}
-
-RWLockPosix::RWLockPosix() {
- //rwlock=PTHREAD_RWLOCK_INITIALIZER; fails on OSX
- pthread_rwlock_init(&rwlock, nullptr);
-}
-
-RWLockPosix::~RWLockPosix() {
- pthread_rwlock_destroy(&rwlock);
-}
-
-#endif
diff --git a/drivers/unix/rw_lock_posix.h b/drivers/unix/rw_lock_posix.h
deleted file mode 100644
index aecb2e18ab..0000000000
--- a/drivers/unix/rw_lock_posix.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*************************************************************************/
-/* rw_lock_posix.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 RWLOCKPOSIX_H
-#define RWLOCKPOSIX_H
-
-#if defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)
-
-#include "core/os/rw_lock.h"
-#include <pthread.h>
-
-class RWLockPosix : public RWLock {
- pthread_rwlock_t rwlock;
-
- static RWLock *create_func_posix();
-
-public:
- virtual void read_lock();
- virtual void read_unlock();
- virtual Error read_try_lock();
-
- virtual void write_lock();
- virtual void write_unlock();
- virtual Error write_try_lock();
-
- static void make_default();
-
- RWLockPosix();
-
- ~RWLockPosix();
-};
-
-#endif
-
-#endif // RWLOCKPOSIX_H
diff --git a/drivers/unix/thread_posix.cpp b/drivers/unix/thread_posix.cpp
index 5c7a546b29..19fab1d475 100644
--- a/drivers/unix/thread_posix.cpp
+++ b/drivers/unix/thread_posix.cpp
@@ -28,88 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "thread_posix.h"
-
#if (defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)) && !defined(NO_THREADS)
-#include "core/object/script_language.h"
-#include "core/os/memory.h"
-#include "core/templates/safe_refcount.h"
-
-#ifdef PTHREAD_BSD_SET_NAME
-#include <pthread_np.h>
-#endif
-
-static void _thread_id_key_destr_callback(void *p_value) {
- memdelete(static_cast<Thread::ID *>(p_value));
-}
-
-static pthread_key_t _create_thread_id_key() {
- pthread_key_t key;
- pthread_key_create(&key, &_thread_id_key_destr_callback);
- return key;
-}
-
-pthread_key_t ThreadPosix::thread_id_key = _create_thread_id_key();
-Thread::ID ThreadPosix::next_thread_id = 0;
-
-Thread::ID ThreadPosix::get_id() const {
- return id;
-}
-
-Thread *ThreadPosix::create_thread_posix() {
- return memnew(ThreadPosix);
-}
-
-void *ThreadPosix::thread_callback(void *userdata) {
- ThreadPosix *t = reinterpret_cast<ThreadPosix *>(userdata);
- t->id = atomic_increment(&next_thread_id);
- pthread_setspecific(thread_id_key, (void *)memnew(ID(t->id)));
-
- ScriptServer::thread_enter(); //scripts may need to attach a stack
-
- t->callback(t->user);
-
- ScriptServer::thread_exit();
-
- return nullptr;
-}
-
-Thread *ThreadPosix::create_func_posix(ThreadCreateCallback p_callback, void *p_user, const Settings &) {
- ThreadPosix *tr = memnew(ThreadPosix);
- tr->callback = p_callback;
- tr->user = p_user;
- pthread_attr_init(&tr->pthread_attr);
- pthread_attr_setdetachstate(&tr->pthread_attr, PTHREAD_CREATE_JOINABLE);
- pthread_attr_setstacksize(&tr->pthread_attr, 256 * 1024);
-
- pthread_create(&tr->pthread, &tr->pthread_attr, thread_callback, tr);
-
- return tr;
-}
-
-Thread::ID ThreadPosix::get_thread_id_func_posix() {
- void *value = pthread_getspecific(thread_id_key);
-
- if (value) {
- return *static_cast<ID *>(value);
- }
-
- ID new_id = atomic_increment(&next_thread_id);
- pthread_setspecific(thread_id_key, (void *)memnew(ID(new_id)));
- return new_id;
-}
-
-void ThreadPosix::wait_to_finish_func_posix(Thread *p_thread) {
- ThreadPosix *tp = static_cast<ThreadPosix *>(p_thread);
- ERR_FAIL_COND(!tp);
- ERR_FAIL_COND(tp->pthread == 0);
+#include "thread_posix.h"
- pthread_join(tp->pthread, nullptr);
- tp->pthread = 0;
-}
+#include "core/os/thread.h"
+#include "core/string/ustring.h"
-Error ThreadPosix::set_name_func_posix(const String &p_name) {
+static Error set_name(const String &p_name) {
#ifdef PTHREAD_NO_RENAME
return ERR_UNAVAILABLE;
@@ -137,20 +63,10 @@ Error ThreadPosix::set_name_func_posix(const String &p_name) {
return err == 0 ? OK : ERR_INVALID_PARAMETER;
#endif // PTHREAD_NO_RENAME
-};
-
-void ThreadPosix::make_default() {
- create_func = create_func_posix;
- get_thread_id_func = get_thread_id_func_posix;
- wait_to_finish_func = wait_to_finish_func_posix;
- set_name_func = set_name_func_posix;
-}
-
-ThreadPosix::ThreadPosix() {
- pthread = 0;
}
-ThreadPosix::~ThreadPosix() {
+void init_thread_posix() {
+ Thread::_set_platform_funcs(&set_name, nullptr);
}
#endif
diff --git a/drivers/unix/thread_posix.h b/drivers/unix/thread_posix.h
index fa2037e1a2..8b8a736bf0 100644
--- a/drivers/unix/thread_posix.h
+++ b/drivers/unix/thread_posix.h
@@ -31,42 +31,8 @@
#ifndef THREAD_POSIX_H
#define THREAD_POSIX_H
-#if (defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)) && !defined(NO_THREADS)
-
-#include "core/os/thread.h"
-#include <pthread.h>
-#include <sys/types.h>
-
-class ThreadPosix : public Thread {
- static pthread_key_t thread_id_key;
- static ID next_thread_id;
-
- pthread_t pthread;
- pthread_attr_t pthread_attr;
- ThreadCreateCallback callback;
- void *user;
- ID id;
-
- static Thread *create_thread_posix();
-
- static void *thread_callback(void *userdata);
-
- static Thread *create_func_posix(ThreadCreateCallback p_callback, void *, const Settings &);
- static ID get_thread_id_func_posix();
- static void wait_to_finish_func_posix(Thread *p_thread);
-
- static Error set_name_func_posix(const String &p_name);
-
- ThreadPosix();
-
-public:
- virtual ID get_id() const;
-
- static void make_default();
-
- ~ThreadPosix();
-};
-
+#if !defined(NO_THREADS)
+void init_thread_posix();
#endif
#endif
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 3dcdaef699..9584dd3f67 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -41,28 +41,62 @@
//#define FORCE_FULL_BARRIER
// Get the Vulkan object information and possible stage access types (bitwise OR'd with incoming values)
-RenderingDeviceVulkan::Buffer *RenderingDeviceVulkan::_get_buffer_from_owner(RID p_buffer, VkPipelineStageFlags &stage_mask, VkAccessFlags &access_mask) {
+RenderingDeviceVulkan::Buffer *RenderingDeviceVulkan::_get_buffer_from_owner(RID p_buffer, VkPipelineStageFlags &r_stage_mask, VkAccessFlags &r_access_mask, uint32_t p_post_barrier) {
Buffer *buffer = nullptr;
if (vertex_buffer_owner.owns(p_buffer)) {
- stage_mask |= VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
- access_mask |= VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT;
buffer = vertex_buffer_owner.getornull(p_buffer);
+
+ r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
+ r_access_mask |= VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT;
+ if (buffer->usage & VK_BUFFER_USAGE_STORAGE_BUFFER_BIT) {
+ if (p_post_barrier & BARRIER_MASK_RASTER) {
+ r_access_mask |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_COMPUTE) {
+ r_access_mask |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ r_stage_mask |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ }
+ }
} else if (index_buffer_owner.owns(p_buffer)) {
- stage_mask |= VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
- access_mask |= VK_ACCESS_INDEX_READ_BIT;
+ r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
+ r_access_mask |= VK_ACCESS_INDEX_READ_BIT;
buffer = index_buffer_owner.getornull(p_buffer);
} else if (uniform_buffer_owner.owns(p_buffer)) {
- stage_mask |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
- access_mask |= VK_ACCESS_UNIFORM_READ_BIT;
+ if (p_post_barrier & BARRIER_MASK_RASTER) {
+ r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_COMPUTE) {
+ r_stage_mask |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ }
+ r_access_mask |= VK_ACCESS_UNIFORM_READ_BIT;
buffer = uniform_buffer_owner.getornull(p_buffer);
} else if (texture_buffer_owner.owns(p_buffer)) {
- stage_mask |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
- access_mask |= VK_ACCESS_SHADER_READ_BIT;
+ if (p_post_barrier & BARRIER_MASK_RASTER) {
+ r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
+ r_access_mask |= VK_ACCESS_SHADER_READ_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_COMPUTE) {
+ r_stage_mask |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ r_access_mask |= VK_ACCESS_SHADER_READ_BIT;
+ }
+
buffer = &texture_buffer_owner.getornull(p_buffer)->buffer;
} else if (storage_buffer_owner.owns(p_buffer)) {
- stage_mask |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
- access_mask |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
buffer = storage_buffer_owner.getornull(p_buffer);
+ if (p_post_barrier & BARRIER_MASK_RASTER) {
+ r_stage_mask |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
+ r_access_mask |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_COMPUTE) {
+ r_stage_mask |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ r_access_mask |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+
+ if (buffer->usage & VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT) {
+ r_stage_mask |= VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT;
+ r_access_mask |= VK_ACCESS_INDIRECT_COMMAND_READ_BIT;
+ }
}
return buffer;
}
@@ -1595,6 +1629,9 @@ void RenderingDeviceVulkan::_memory_barrier(VkPipelineStageFlags p_src_stage_mas
mem_barrier.srcAccessMask = p_src_access;
mem_barrier.dstAccessMask = p_dst_sccess;
+ if (p_src_stage_mask == 0 || p_dst_stage_mask == 0) {
+ return; //no barrier, since this is invalid
+ }
vkCmdPipelineBarrier(p_sync_with_draw ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer, p_src_stage_mask, p_dst_stage_mask, 0, 1, &mem_barrier, 0, nullptr, 0, nullptr);
}
@@ -2067,6 +2104,48 @@ RID RenderingDeviceVulkan::texture_create_shared(const TextureView &p_view, RID
image_view_create_info.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
}
+ VkImageViewUsageCreateInfo usage_info;
+ usage_info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO;
+ usage_info.pNext = nullptr;
+ if (p_view.format_override != DATA_FORMAT_MAX) {
+ //need to validate usage with vulkan
+
+ usage_info.usage = 0;
+
+ if (texture.usage_flags & TEXTURE_USAGE_SAMPLING_BIT) {
+ usage_info.usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
+ }
+
+ if (texture.usage_flags & TEXTURE_USAGE_STORAGE_BIT) {
+ if (texture_is_format_supported_for_usage(p_view.format_override, TEXTURE_USAGE_STORAGE_BIT)) {
+ usage_info.usage |= VK_IMAGE_USAGE_STORAGE_BIT;
+ }
+ }
+
+ if (texture.usage_flags & TEXTURE_USAGE_COLOR_ATTACHMENT_BIT) {
+ if (texture_is_format_supported_for_usage(p_view.format_override, TEXTURE_USAGE_COLOR_ATTACHMENT_BIT)) {
+ usage_info.usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
+ }
+ }
+
+ if (texture.usage_flags & TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) {
+ usage_info.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
+ }
+
+ if (texture.usage_flags & TEXTURE_USAGE_CAN_UPDATE_BIT) {
+ usage_info.usage |= VK_IMAGE_USAGE_TRANSFER_DST_BIT;
+ }
+ if (texture.usage_flags & TEXTURE_USAGE_CAN_COPY_FROM_BIT) {
+ usage_info.usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
+ }
+
+ if (texture.usage_flags & TEXTURE_USAGE_CAN_COPY_TO_BIT) {
+ usage_info.usage |= VK_IMAGE_USAGE_TRANSFER_DST_BIT;
+ }
+
+ image_view_create_info.pNext = &usage_info;
+ }
+
VkResult err = vkCreateImageView(device, &image_view_create_info, nullptr, &texture.view);
ERR_FAIL_COND_V_MSG(err, RID(), "vkCreateImageView failed with error " + itos(err) + ".");
@@ -2196,11 +2275,11 @@ RID RenderingDeviceVulkan::texture_create_shared_from_slice(const TextureView &p
return id;
}
-Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, bool p_sync_with_draw) {
+Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, uint32_t p_post_barrier) {
_THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V_MSG(draw_list && p_sync_with_draw, ERR_INVALID_PARAMETER,
- "Updating textures in 'sync to draw' mode is forbidden during creation of a draw list");
+ ERR_FAIL_COND_V_MSG(draw_list || compute_list, ERR_INVALID_PARAMETER,
+ "Updating textures in is forbidden during creation of a draw or compute list");
Texture *texture = texture_owner.getornull(p_texture);
ERR_FAIL_COND_V(!texture, ERR_INVALID_PARAMETER);
@@ -2241,7 +2320,7 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con
const uint8_t *r = p_data.ptr();
- VkCommandBuffer command_buffer = p_sync_with_draw ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer;
+ VkCommandBuffer command_buffer = p_post_barrier ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer;
//barrier to transfer
{
@@ -2266,6 +2345,10 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con
}
uint32_t mipmap_offset = 0;
+
+ uint32_t logic_width = texture->width;
+ uint32_t logic_height = texture->height;
+
for (uint32_t mm_i = 0; mm_i < texture->mipmaps; mm_i++) {
uint32_t depth;
uint32_t image_total = get_image_format_required_size(texture->format, texture->width, texture->height, texture->depth, mm_i + 1, &width, &height, &depth);
@@ -2282,12 +2365,15 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con
uint32_t region_w = MIN(region_size, width - x);
uint32_t region_h = MIN(region_size, height - y);
+ uint32_t region_logic_w = MIN(region_size, logic_width - x);
+ uint32_t region_logic_h = MIN(region_size, logic_height - y);
+
uint32_t pixel_size = get_image_format_pixel_size(texture->format);
uint32_t to_allocate = region_w * region_h * pixel_size;
to_allocate >>= get_compressed_image_format_pixel_rshift(texture->format);
uint32_t alloc_offset, alloc_size;
- Error err = _staging_buffer_allocate(to_allocate, required_align, alloc_offset, alloc_size, false, p_sync_with_draw);
+ Error err = _staging_buffer_allocate(to_allocate, required_align, alloc_offset, alloc_size, false, p_post_barrier);
ERR_FAIL_COND_V(err, ERR_CANT_CREATE);
uint8_t *write_ptr;
@@ -2363,8 +2449,8 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con
buffer_image_copy.imageOffset.y = y;
buffer_image_copy.imageOffset.z = z;
- buffer_image_copy.imageExtent.width = region_w;
- buffer_image_copy.imageExtent.height = region_h;
+ buffer_image_copy.imageExtent.width = region_logic_w;
+ buffer_image_copy.imageExtent.height = region_logic_h;
buffer_image_copy.imageExtent.depth = 1;
vkCmdCopyBufferToImage(command_buffer, staging_buffer_blocks[staging_buffer_current].buffer, texture->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &buffer_image_copy);
@@ -2375,15 +2461,36 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con
}
mipmap_offset = image_total;
+ logic_width = MAX(1, logic_width >> 1);
+ logic_height = MAX(1, logic_height >> 1);
}
//barrier to restore layout
{
+ uint32_t barrier_flags = 0;
+ uint32_t access_flags = 0;
+ if (p_post_barrier & BARRIER_MASK_COMPUTE) {
+ barrier_flags |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_RASTER) {
+ barrier_flags |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_TRANSFER) {
+ barrier_flags |= VK_PIPELINE_STAGE_TRANSFER_BIT;
+ access_flags |= VK_ACCESS_TRANSFER_WRITE_BIT;
+ }
+
+ if (barrier_flags == 0) {
+ barrier_flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
+ }
+
VkImageMemoryBarrier image_memory_barrier;
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
image_memory_barrier.pNext = nullptr;
image_memory_barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
- image_memory_barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
+ image_memory_barrier.dstAccessMask = access_flags;
image_memory_barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
image_memory_barrier.newLayout = texture->layout;
image_memory_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
@@ -2395,8 +2502,15 @@ Error RenderingDeviceVulkan::texture_update(RID p_texture, uint32_t p_layer, con
image_memory_barrier.subresourceRange.baseArrayLayer = p_layer;
image_memory_barrier.subresourceRange.layerCount = 1;
- vkCmdPipelineBarrier(command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
+ vkCmdPipelineBarrier(command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, barrier_flags, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
+ }
+
+ if (texture->used_in_frame != frames_drawn) {
+ texture->used_in_raster = false;
+ texture->used_in_compute = false;
+ texture->used_in_frame = frames_drawn;
}
+ texture->used_in_transfer = true;
return OK;
}
@@ -2608,13 +2722,13 @@ bool RenderingDeviceVulkan::texture_is_valid(RID p_texture) {
return texture_owner.owns(p_texture);
}
-Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture, const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_size, uint32_t p_src_mipmap, uint32_t p_dst_mipmap, uint32_t p_src_layer, uint32_t p_dst_layer, bool p_sync_with_draw) {
+Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture, const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_size, uint32_t p_src_mipmap, uint32_t p_dst_mipmap, uint32_t p_src_layer, uint32_t p_dst_layer, uint32_t p_post_barrier) {
_THREAD_SAFE_METHOD_
Texture *src_tex = texture_owner.getornull(p_from_texture);
ERR_FAIL_COND_V(!src_tex, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V_MSG(p_sync_with_draw && src_tex->bound, ERR_INVALID_PARAMETER,
+ ERR_FAIL_COND_V_MSG(src_tex->bound, ERR_INVALID_PARAMETER,
"Source texture can't be copied while a render pass that uses it is being created. Ensure render pass is finalized (and that it was created with RENDER_PASS_CONTENTS_FINISH) to unbind this texture.");
ERR_FAIL_COND_V_MSG(!(src_tex->usage_flags & TEXTURE_USAGE_CAN_COPY_FROM_BIT), ERR_INVALID_PARAMETER,
"Source texture requires the TEXTURE_USAGE_CAN_COPY_FROM_BIT in order to be retrieved.");
@@ -2635,7 +2749,7 @@ Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture,
Texture *dst_tex = texture_owner.getornull(p_to_texture);
ERR_FAIL_COND_V(!dst_tex, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V_MSG(p_sync_with_draw && dst_tex->bound, ERR_INVALID_PARAMETER,
+ ERR_FAIL_COND_V_MSG(dst_tex->bound, ERR_INVALID_PARAMETER,
"Destination texture can't be copied while a render pass that uses it is being created. Ensure render pass is finalized (and that it was created with RENDER_PASS_CONTENTS_FINISH) to unbind this texture.");
ERR_FAIL_COND_V_MSG(!(dst_tex->usage_flags & TEXTURE_USAGE_CAN_COPY_TO_BIT), ERR_INVALID_PARAMETER,
"Destination texture requires the TEXTURE_USAGE_CAN_COPY_TO_BIT in order to be retrieved.");
@@ -2656,7 +2770,7 @@ Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture,
ERR_FAIL_COND_V_MSG(src_tex->read_aspect_mask != dst_tex->read_aspect_mask, ERR_INVALID_PARAMETER,
"Source and destination texture must be of the same type (color or depth).");
- VkCommandBuffer command_buffer = p_sync_with_draw ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer;
+ VkCommandBuffer command_buffer = frames[frame].draw_command_buffer;
{
//PRE Copy the image
@@ -2731,12 +2845,31 @@ Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture,
// RESTORE LAYOUT for SRC and DST
+ uint32_t barrier_flags = 0;
+ uint32_t access_flags = 0;
+ if (p_post_barrier & BARRIER_MASK_COMPUTE) {
+ barrier_flags |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_RASTER) {
+ barrier_flags |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_TRANSFER) {
+ barrier_flags |= VK_PIPELINE_STAGE_TRANSFER_BIT;
+ access_flags |= VK_ACCESS_TRANSFER_WRITE_BIT;
+ }
+
+ if (barrier_flags == 0) {
+ barrier_flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
+ }
+
{ //restore src
VkImageMemoryBarrier image_memory_barrier;
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
image_memory_barrier.pNext = nullptr;
image_memory_barrier.srcAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
- image_memory_barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ image_memory_barrier.dstAccessMask = access_flags;
image_memory_barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
image_memory_barrier.newLayout = src_tex->layout;
image_memory_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
@@ -2748,7 +2881,7 @@ Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture,
image_memory_barrier.subresourceRange.baseArrayLayer = p_src_layer;
image_memory_barrier.subresourceRange.layerCount = 1;
- vkCmdPipelineBarrier(command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
+ vkCmdPipelineBarrier(command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, barrier_flags, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
}
{ //make dst readable
@@ -2757,7 +2890,7 @@ Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture,
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
image_memory_barrier.pNext = nullptr;
image_memory_barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
- image_memory_barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ image_memory_barrier.dstAccessMask = access_flags;
image_memory_barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
image_memory_barrier.newLayout = dst_tex->layout;
@@ -2770,20 +2903,20 @@ Error RenderingDeviceVulkan::texture_copy(RID p_from_texture, RID p_to_texture,
image_memory_barrier.subresourceRange.baseArrayLayer = p_src_layer;
image_memory_barrier.subresourceRange.layerCount = 1;
- vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
+ vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, barrier_flags, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
}
}
return OK;
}
-Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID p_to_texture, bool p_sync_with_draw) {
+Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID p_to_texture, uint32_t p_post_barrier) {
_THREAD_SAFE_METHOD_
Texture *src_tex = texture_owner.getornull(p_from_texture);
ERR_FAIL_COND_V(!src_tex, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V_MSG(p_sync_with_draw && src_tex->bound, ERR_INVALID_PARAMETER,
+ ERR_FAIL_COND_V_MSG(src_tex->bound, ERR_INVALID_PARAMETER,
"Source texture can't be copied while a render pass that uses it is being created. Ensure render pass is finalized (and that it was created with RENDER_PASS_CONTENTS_FINISH) to unbind this texture.");
ERR_FAIL_COND_V_MSG(!(src_tex->usage_flags & TEXTURE_USAGE_CAN_COPY_FROM_BIT), ERR_INVALID_PARAMETER,
"Source texture requires the TEXTURE_USAGE_CAN_COPY_FROM_BIT in order to be retrieved.");
@@ -2794,7 +2927,7 @@ Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID
Texture *dst_tex = texture_owner.getornull(p_to_texture);
ERR_FAIL_COND_V(!dst_tex, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V_MSG(p_sync_with_draw && dst_tex->bound, ERR_INVALID_PARAMETER,
+ ERR_FAIL_COND_V_MSG(dst_tex->bound, ERR_INVALID_PARAMETER,
"Destination texture can't be copied while a render pass that uses it is being created. Ensure render pass is finalized (and that it was created with RENDER_PASS_CONTENTS_FINISH) to unbind this texture.");
ERR_FAIL_COND_V_MSG(!(dst_tex->usage_flags & TEXTURE_USAGE_CAN_COPY_TO_BIT), ERR_INVALID_PARAMETER,
"Destination texture requires the TEXTURE_USAGE_CAN_COPY_TO_BIT in order to be retrieved.");
@@ -2808,7 +2941,7 @@ Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID
ERR_FAIL_COND_V_MSG(src_tex->read_aspect_mask != dst_tex->read_aspect_mask, ERR_INVALID_PARAMETER,
"Source and destination texture must be of the same type (color or depth).");
- VkCommandBuffer command_buffer = p_sync_with_draw ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer;
+ VkCommandBuffer command_buffer = frames[frame].draw_command_buffer;
{
//PRE Copy the image
@@ -2883,12 +3016,31 @@ Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID
// RESTORE LAYOUT for SRC and DST
+ uint32_t barrier_flags = 0;
+ uint32_t access_flags = 0;
+ if (p_post_barrier & BARRIER_MASK_COMPUTE) {
+ barrier_flags |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_RASTER) {
+ barrier_flags |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_TRANSFER) {
+ barrier_flags |= VK_PIPELINE_STAGE_TRANSFER_BIT;
+ access_flags |= VK_ACCESS_TRANSFER_WRITE_BIT;
+ }
+
+ if (barrier_flags == 0) {
+ barrier_flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
+ }
+
{ //restore src
VkImageMemoryBarrier image_memory_barrier;
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
image_memory_barrier.pNext = nullptr;
image_memory_barrier.srcAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
- image_memory_barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ image_memory_barrier.dstAccessMask = access_flags;
image_memory_barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
image_memory_barrier.newLayout = src_tex->layout;
image_memory_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
@@ -2900,7 +3052,7 @@ Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID
image_memory_barrier.subresourceRange.baseArrayLayer = src_tex->base_layer;
image_memory_barrier.subresourceRange.layerCount = 1;
- vkCmdPipelineBarrier(command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
+ vkCmdPipelineBarrier(command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, barrier_flags, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
}
{ //make dst readable
@@ -2909,7 +3061,7 @@ Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
image_memory_barrier.pNext = nullptr;
image_memory_barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
- image_memory_barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ image_memory_barrier.dstAccessMask = access_flags;
image_memory_barrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
image_memory_barrier.newLayout = dst_tex->layout;
@@ -2922,20 +3074,20 @@ Error RenderingDeviceVulkan::texture_resolve_multisample(RID p_from_texture, RID
image_memory_barrier.subresourceRange.baseArrayLayer = dst_tex->base_layer;
image_memory_barrier.subresourceRange.layerCount = 1;
- vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
+ vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, barrier_flags, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
}
}
return OK;
}
-Error RenderingDeviceVulkan::texture_clear(RID p_texture, const Color &p_color, uint32_t p_base_mipmap, uint32_t p_mipmaps, uint32_t p_base_layer, uint32_t p_layers, bool p_sync_with_draw) {
+Error RenderingDeviceVulkan::texture_clear(RID p_texture, const Color &p_color, uint32_t p_base_mipmap, uint32_t p_mipmaps, uint32_t p_base_layer, uint32_t p_layers, uint32_t p_post_barrier) {
_THREAD_SAFE_METHOD_
Texture *src_tex = texture_owner.getornull(p_texture);
ERR_FAIL_COND_V(!src_tex, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V_MSG(p_sync_with_draw && src_tex->bound, ERR_INVALID_PARAMETER,
+ ERR_FAIL_COND_V_MSG(src_tex->bound, ERR_INVALID_PARAMETER,
"Source texture can't be cleared while a render pass that uses it is being created. Ensure render pass is finalized (and that it was created with RENDER_PASS_CONTENTS_FINISH) to unbind this texture.");
ERR_FAIL_COND_V(p_layers == 0, ERR_INVALID_PARAMETER);
@@ -2952,7 +3104,7 @@ Error RenderingDeviceVulkan::texture_clear(RID p_texture, const Color &p_color,
ERR_FAIL_COND_V(p_base_mipmap + p_mipmaps > src_tex->mipmaps, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(p_base_layer + p_layers > src_layer_count, ERR_INVALID_PARAMETER);
- VkCommandBuffer command_buffer = p_sync_with_draw ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer;
+ VkCommandBuffer command_buffer = frames[frame].draw_command_buffer;
VkImageLayout clear_layout = (src_tex->layout == VK_IMAGE_LAYOUT_GENERAL) ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
@@ -2999,11 +3151,31 @@ Error RenderingDeviceVulkan::texture_clear(RID p_texture, const Color &p_color,
vkCmdClearColorImage(command_buffer, src_tex->image, clear_layout, &clear_color, 1, &range);
{ // Barrier to post clear accesses (changing back the layout if needed)
+
+ uint32_t barrier_flags = 0;
+ uint32_t access_flags = 0;
+ if (p_post_barrier & BARRIER_MASK_COMPUTE) {
+ barrier_flags |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_RASTER) {
+ barrier_flags |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_TRANSFER) {
+ barrier_flags |= VK_PIPELINE_STAGE_TRANSFER_BIT;
+ access_flags |= VK_ACCESS_TRANSFER_WRITE_BIT;
+ }
+
+ if (barrier_flags == 0) {
+ barrier_flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
+ }
+
VkImageMemoryBarrier image_memory_barrier;
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
image_memory_barrier.pNext = nullptr;
image_memory_barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
- image_memory_barrier.dstAccessMask = valid_texture_access;
+ image_memory_barrier.dstAccessMask = access_flags;
image_memory_barrier.oldLayout = clear_layout;
image_memory_barrier.newLayout = src_tex->layout;
@@ -3016,8 +3188,15 @@ Error RenderingDeviceVulkan::texture_clear(RID p_texture, const Color &p_color,
image_memory_barrier.subresourceRange.baseArrayLayer = src_tex->base_layer + p_base_layer;
image_memory_barrier.subresourceRange.layerCount = p_layers;
- vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, valid_texture_stages, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
+ vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, barrier_flags, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
+ }
+
+ if (src_tex->used_in_frame != frames_drawn) {
+ src_tex->used_in_raster = false;
+ src_tex->used_in_compute = false;
+ src_tex->used_in_frame = frames_drawn;
}
+ src_tex->used_in_transfer = true;
return OK;
}
@@ -3104,6 +3283,7 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector<AttachmentF
// the read. If this is a performance issue, one could track the actual last accessor of each resource, adding only that
// stage
switch (is_depth_stencil ? p_initial_depth_action : p_initial_color_action) {
+ case INITIAL_ACTION_CLEAR_REGION:
case INITIAL_ACTION_CLEAR: {
description.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
@@ -3116,9 +3296,9 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector<AttachmentF
description.initialLayout = is_sampled ? VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL : (is_storage ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
} else if (p_format[i].usage_flags & TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) {
- description.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
- description.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; //don't care what is there
- description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
+ description.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
+ description.initialLayout = is_sampled ? VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL : (is_storage ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);
+ description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
dependency_from_external.srcStageMask |= reading_stages;
} else {
description.loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
@@ -3144,6 +3324,7 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector<AttachmentF
dependency_from_external.srcStageMask |= reading_stages;
}
} break;
+ case INITIAL_ACTION_CLEAR_REGION_CONTINUE:
case INITIAL_ACTION_CONTINUE: {
if (p_format[i].usage_flags & TEXTURE_USAGE_COLOR_ATTACHMENT_BIT) {
description.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
@@ -3151,7 +3332,7 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector<AttachmentF
description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
} else if (p_format[i].usage_flags & TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) {
description.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
- description.initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; //don't care what is there
+ description.initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
} else {
description.loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
@@ -3280,8 +3461,13 @@ VkRenderPass RenderingDeviceVulkan::_render_pass_create(const Vector<AttachmentF
render_pass_create_info.pAttachments = attachments.ptr();
render_pass_create_info.subpassCount = 1;
render_pass_create_info.pSubpasses = &subpass;
- render_pass_create_info.dependencyCount = 2;
- render_pass_create_info.pDependencies = dependencies;
+ // Commenting this because it seems it just avoids raster and compute to work at the same time.
+ // Other barriers seem to be protecting the render pass fine.
+ // render_pass_create_info.dependencyCount = 2;
+ // render_pass_create_info.pDependencies = dependencies;
+
+ render_pass_create_info.dependencyCount = 0;
+ render_pass_create_info.pDependencies = nullptr;
VkRenderPass render_pass;
VkResult res = vkCreateRenderPass(device, &render_pass_create_info, nullptr, &render_pass);
@@ -3963,6 +4149,8 @@ RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages
bool is_compute = false;
+ uint32_t compute_local_size[3] = { 0, 0, 0 };
+
for (int i = 0; i < p_stages.size(); i++) {
if (p_stages[i].shader_stage == SHADER_STAGE_COMPUTE) {
is_compute = true;
@@ -3979,6 +4167,11 @@ RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages
ERR_FAIL_COND_V_MSG(result != SPV_REFLECT_RESULT_SUCCESS, RID(),
"Reflection of SPIR-V shader stage '" + String(shader_stage_names[p_stages[i].shader_stage]) + "' failed parsing shader.");
+ if (is_compute) {
+ compute_local_size[0] = module.entry_points->local_size.x;
+ compute_local_size[1] = module.entry_points->local_size.y;
+ compute_local_size[2] = module.entry_points->local_size.z;
+ }
uint32_t binding_count = 0;
result = spvReflectEnumerateDescriptorBindings(&module, &binding_count, nullptr);
ERR_FAIL_COND_V_MSG(result != SPV_REFLECT_RESULT_SUCCESS, RID(),
@@ -4183,6 +4376,7 @@ RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages
}
}
}
+
uint32_t pc_count = 0;
result = spvReflectEnumeratePushConstantBlocks(&module, &pc_count, nullptr);
ERR_FAIL_COND_V_MSG(result != SPV_REFLECT_RESULT_SUCCESS, RID(),
@@ -4231,6 +4425,9 @@ RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages
shader.fragment_outputs = fragment_outputs;
shader.push_constant = push_constant;
shader.is_compute = is_compute;
+ shader.compute_local_size[0] = compute_local_size[0];
+ shader.compute_local_size[1] = compute_local_size[1];
+ shader.compute_local_size[2] = compute_local_size[2];
String error_text;
@@ -5037,19 +5234,22 @@ bool RenderingDeviceVulkan::uniform_set_is_valid(RID p_uniform_set) {
return uniform_set_owner.owns(p_uniform_set);
}
-Error RenderingDeviceVulkan::buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, bool p_sync_with_draw) {
+Error RenderingDeviceVulkan::buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, uint32_t p_post_barrier) {
_THREAD_SAFE_METHOD_
- ERR_FAIL_COND_V_MSG(draw_list && p_sync_with_draw, ERR_INVALID_PARAMETER,
- "Updating buffers in 'sync to draw' mode is forbidden during creation of a draw list");
- ERR_FAIL_COND_V_MSG(compute_list && p_sync_with_draw, ERR_INVALID_PARAMETER,
- "Updating buffers in 'sync to draw' mode is forbidden during creation of a compute list");
-
- // Protect subsequent updates...
- VkPipelineStageFlags dst_stage_mask = VK_PIPELINE_STAGE_TRANSFER_BIT;
- VkAccessFlags dst_access = VK_ACCESS_TRANSFER_WRITE_BIT;
+ ERR_FAIL_COND_V_MSG(draw_list, ERR_INVALID_PARAMETER,
+ "Updating buffers is forbidden during creation of a draw list");
+ ERR_FAIL_COND_V_MSG(compute_list, ERR_INVALID_PARAMETER,
+ "Updating buffers is forbidden during creation of a compute list");
- Buffer *buffer = _get_buffer_from_owner(p_buffer, dst_stage_mask, dst_access);
+ VkPipelineStageFlags dst_stage_mask = 0;
+ VkAccessFlags dst_access = 0;
+ if (p_post_barrier & BARRIER_MASK_TRANSFER) {
+ // Protect subsequent updates...
+ dst_stage_mask = VK_PIPELINE_STAGE_TRANSFER_BIT;
+ dst_access = VK_ACCESS_TRANSFER_WRITE_BIT;
+ }
+ Buffer *buffer = _get_buffer_from_owner(p_buffer, dst_stage_mask, dst_access, p_post_barrier);
if (!buffer) {
ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Buffer argument is not a valid buffer of any type.");
}
@@ -5057,35 +5257,48 @@ Error RenderingDeviceVulkan::buffer_update(RID p_buffer, uint32_t p_offset, uint
ERR_FAIL_COND_V_MSG(p_offset + p_size > buffer->size, ERR_INVALID_PARAMETER,
"Attempted to write buffer (" + itos((p_offset + p_size) - buffer->size) + " bytes) past the end.");
- _buffer_memory_barrier(buffer->buffer, p_offset, p_size, dst_stage_mask, VK_PIPELINE_STAGE_TRANSFER_BIT, dst_access, VK_ACCESS_TRANSFER_WRITE_BIT, p_sync_with_draw);
- Error err = _buffer_update(buffer, p_offset, (uint8_t *)p_data, p_size, p_sync_with_draw);
+ // no barrier should be needed here
+ // _buffer_memory_barrier(buffer->buffer, p_offset, p_size, dst_stage_mask, VK_PIPELINE_STAGE_TRANSFER_BIT, dst_access, VK_ACCESS_TRANSFER_WRITE_BIT, true);
+
+ Error err = _buffer_update(buffer, p_offset, (uint8_t *)p_data, p_size, p_post_barrier);
if (err) {
return err;
}
#ifdef FORCE_FULL_BARRIER
- _full_barrier(p_sync_with_draw);
+ _full_barrier(true);
#else
- _buffer_memory_barrier(buffer->buffer, p_offset, p_size, VK_PIPELINE_STAGE_TRANSFER_BIT, dst_stage_mask, VK_ACCESS_TRANSFER_WRITE_BIT, dst_access, p_sync_with_draw);
+ if (dst_stage_mask == 0) {
+ dst_stage_mask = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
+ }
+
+ if (p_post_barrier != RD::BARRIER_MASK_NO_BARRIER) {
+ _buffer_memory_barrier(buffer->buffer, p_offset, p_size, VK_PIPELINE_STAGE_TRANSFER_BIT, dst_stage_mask, VK_ACCESS_TRANSFER_WRITE_BIT, dst_access, true);
+ }
+
#endif
return err;
}
-Error RenderingDeviceVulkan::buffer_clear(RID p_buffer, uint32_t p_offset, uint32_t p_size, bool p_sync_with_draw) {
+Error RenderingDeviceVulkan::buffer_clear(RID p_buffer, uint32_t p_offset, uint32_t p_size, uint32_t p_post_barrier) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V_MSG((p_size % 4) != 0, ERR_INVALID_PARAMETER,
"Size must be a multiple of four");
- ERR_FAIL_COND_V_MSG(draw_list && p_sync_with_draw, ERR_INVALID_PARAMETER,
- "Updating buffers in 'sync to draw' mode is forbidden during creation of a draw list");
- ERR_FAIL_COND_V_MSG(compute_list && p_sync_with_draw, ERR_INVALID_PARAMETER,
- "Updating buffers in 'sync to draw' mode is forbidden during creation of a compute list");
+ ERR_FAIL_COND_V_MSG(draw_list, ERR_INVALID_PARAMETER,
+ "Updating buffers in is forbidden during creation of a draw list");
+ ERR_FAIL_COND_V_MSG(compute_list, ERR_INVALID_PARAMETER,
+ "Updating buffers is forbidden during creation of a compute list");
- // Protect subsequent updates...
- VkPipelineStageFlags dst_stage_mask = VK_PIPELINE_STAGE_TRANSFER_BIT;
- VkAccessFlags dst_access = VK_ACCESS_TRANSFER_WRITE_BIT;
+ VkPipelineStageFlags dst_stage_mask = 0;
+ VkAccessFlags dst_access = 0;
+ if (p_post_barrier & BARRIER_MASK_TRANSFER) {
+ // Protect subsequent updates...
+ dst_stage_mask = VK_PIPELINE_STAGE_TRANSFER_BIT;
+ dst_access = VK_ACCESS_TRANSFER_WRITE_BIT;
+ }
- Buffer *buffer = _get_buffer_from_owner(p_buffer, dst_stage_mask, dst_access);
+ Buffer *buffer = _get_buffer_from_owner(p_buffer, dst_stage_mask, dst_access, p_post_barrier);
if (!buffer) {
ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Buffer argument is not a valid buffer of any type.");
}
@@ -5093,14 +5306,20 @@ Error RenderingDeviceVulkan::buffer_clear(RID p_buffer, uint32_t p_offset, uint3
ERR_FAIL_COND_V_MSG(p_offset + p_size > buffer->size, ERR_INVALID_PARAMETER,
"Attempted to write buffer (" + itos((p_offset + p_size) - buffer->size) + " bytes) past the end.");
- _buffer_memory_barrier(buffer->buffer, p_offset, p_size, dst_stage_mask, VK_PIPELINE_STAGE_TRANSFER_BIT, dst_access, VK_ACCESS_TRANSFER_WRITE_BIT, p_sync_with_draw);
+ // should not be needed
+ // _buffer_memory_barrier(buffer->buffer, p_offset, p_size, dst_stage_mask, VK_PIPELINE_STAGE_TRANSFER_BIT, dst_access, VK_ACCESS_TRANSFER_WRITE_BIT, p_post_barrier);
- vkCmdFillBuffer(p_sync_with_draw ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer, buffer->buffer, p_offset, p_size, 0);
+ vkCmdFillBuffer(frames[frame].draw_command_buffer, buffer->buffer, p_offset, p_size, 0);
#ifdef FORCE_FULL_BARRIER
- _full_barrier(p_sync_with_draw);
+ _full_barrier(true);
#else
- _buffer_memory_barrier(buffer->buffer, p_offset, p_size, VK_PIPELINE_STAGE_TRANSFER_BIT, dst_stage_mask, VK_ACCESS_TRANSFER_WRITE_BIT, dst_access, p_sync_with_draw);
+ if (dst_stage_mask == 0) {
+ dst_stage_mask = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
+ }
+
+ _buffer_memory_barrier(buffer->buffer, p_offset, p_size, VK_PIPELINE_STAGE_TRANSFER_BIT, dst_stage_mask, VK_ACCESS_TRANSFER_WRITE_BIT, dst_access, dst_stage_mask);
+
#endif
return OK;
}
@@ -5112,7 +5331,7 @@ Vector<uint8_t> RenderingDeviceVulkan::buffer_get_data(RID p_buffer) {
VkPipelineShaderStageCreateFlags src_stage_mask = VK_PIPELINE_STAGE_TRANSFER_BIT;
VkAccessFlags src_access_mask = VK_ACCESS_TRANSFER_WRITE_BIT;
// Get the vulkan buffer and the potential stage/access possible
- Buffer *buffer = _get_buffer_from_owner(p_buffer, src_stage_mask, src_access_mask);
+ Buffer *buffer = _get_buffer_from_owner(p_buffer, src_stage_mask, src_access_mask, BARRIER_MASK_ALL);
if (!buffer) {
ERR_FAIL_V_MSG(Vector<uint8_t>(), "Buffer is either invalid or this type of buffer can't be retrieved. Only Index and Vertex buffers allow retrieving.");
}
@@ -5555,6 +5774,9 @@ RID RenderingDeviceVulkan::compute_pipeline_create(RID p_shader) {
pipeline.pipeline_layout = shader->pipeline_layout;
pipeline.shader = p_shader;
pipeline.push_constant_size = shader->push_constant.push_constant_size;
+ pipeline.local_group_size[0] = shader->compute_local_size[0];
+ pipeline.local_group_size[1] = shader->compute_local_size[1];
+ pipeline.local_group_size[2] = shader->compute_local_size[2];
//create ID to associate with this pipeline
RID id = compute_pipeline_owner.make_rid(pipeline);
@@ -5726,11 +5948,18 @@ Error RenderingDeviceVulkan::_draw_list_render_pass_begin(Framebuffer *framebuff
render_pass_begin.pNext = nullptr;
render_pass_begin.renderPass = render_pass;
render_pass_begin.framebuffer = vkframebuffer;
-
+ /*
+ * Given how API works, it makes sense to always fully operate on the whole framebuffer.
+ * This allows better continue operations for operations like shadowmapping.
render_pass_begin.renderArea.extent.width = viewport_size.width;
render_pass_begin.renderArea.extent.height = viewport_size.height;
render_pass_begin.renderArea.offset.x = viewport_offset.x;
render_pass_begin.renderArea.offset.y = viewport_offset.y;
+ */
+ render_pass_begin.renderArea.extent.width = framebuffer->size.width;
+ render_pass_begin.renderArea.extent.height = framebuffer->size.height;
+ render_pass_begin.renderArea.offset.x = 0;
+ render_pass_begin.renderArea.offset.y = 0;
Vector<VkClearValue> clear_values;
clear_values.resize(framebuffer->texture_ids.size());
@@ -5857,7 +6086,7 @@ RenderingDevice::DrawListID RenderingDeviceVulkan::draw_list_begin(RID p_framebu
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V_MSG(draw_list != nullptr, INVALID_ID, "Only one draw list can be active at the same time.");
- ERR_FAIL_COND_V_MSG(compute_list != nullptr, INVALID_ID, "Only one draw/compute list can be active at the same time.");
+ ERR_FAIL_COND_V_MSG(compute_list != nullptr && !compute_list->state.allow_draw_overlap, INVALID_ID, "Only one draw/compute list can be active at the same time.");
Framebuffer *framebuffer = framebuffer_owner.getornull(p_framebuffer);
ERR_FAIL_COND_V(!framebuffer, INVALID_ID);
@@ -5878,12 +6107,19 @@ RenderingDevice::DrawListID RenderingDeviceVulkan::draw_list_begin(RID p_framebu
viewport_offset = regioni.position;
viewport_size = regioni.size;
-
- if (p_initial_color_action == INITIAL_ACTION_CLEAR) {
+ if (p_initial_color_action == INITIAL_ACTION_CLEAR_REGION_CONTINUE) {
+ needs_clear_color = true;
+ p_initial_color_action = INITIAL_ACTION_CONTINUE;
+ }
+ if (p_initial_depth_action == INITIAL_ACTION_CLEAR_REGION_CONTINUE) {
+ needs_clear_depth = true;
+ p_initial_depth_action = INITIAL_ACTION_CONTINUE;
+ }
+ if (p_initial_color_action == INITIAL_ACTION_CLEAR_REGION) {
needs_clear_color = true;
p_initial_color_action = INITIAL_ACTION_KEEP;
}
- if (p_initial_depth_action == INITIAL_ACTION_CLEAR) {
+ if (p_initial_depth_action == INITIAL_ACTION_CLEAR_REGION) {
needs_clear_depth = true;
p_initial_depth_action = INITIAL_ACTION_KEEP;
}
@@ -5969,11 +6205,11 @@ Error RenderingDeviceVulkan::draw_list_begin_split(RID p_framebuffer, uint32_t p
viewport_offset = regioni.position;
viewport_size = regioni.size;
- if (p_initial_color_action == INITIAL_ACTION_CLEAR) {
+ if (p_initial_color_action == INITIAL_ACTION_CLEAR_REGION) {
needs_clear_color = true;
p_initial_color_action = INITIAL_ACTION_KEEP;
}
- if (p_initial_depth_action == INITIAL_ACTION_CLEAR) {
+ if (p_initial_depth_action == INITIAL_ACTION_CLEAR_REGION) {
needs_clear_depth = true;
p_initial_depth_action = INITIAL_ACTION_KEEP;
}
@@ -6226,6 +6462,19 @@ void RenderingDeviceVulkan::draw_list_bind_uniform_set(DrawListID p_list, RID p_
dl->state.sets[p_index].uniform_set_format = uniform_set->format;
dl->state.sets[p_index].uniform_set = p_uniform_set;
+ uint32_t mst_count = uniform_set->mutable_storage_textures.size();
+ if (mst_count) {
+ Texture **mst_textures = const_cast<UniformSet *>(uniform_set)->mutable_storage_textures.ptrw();
+ for (uint32_t i = 0; i < mst_count; i++) {
+ if (mst_textures[i]->used_in_frame != frames_drawn) {
+ mst_textures[i]->used_in_frame = frames_drawn;
+ mst_textures[i]->used_in_transfer = false;
+ mst_textures[i]->used_in_compute = false;
+ }
+ mst_textures[i]->used_in_raster = true;
+ }
+ }
+
#ifdef DEBUG_ENABLED
{ //validate that textures bound are not attached as framebuffer bindings
uint32_t attachable_count = uniform_set->attachable_textures.size();
@@ -6468,7 +6717,7 @@ void RenderingDeviceVulkan::draw_list_disable_scissor(DrawListID p_list) {
vkCmdSetScissor(dl->command_buffer, 0, 1, &scissor);
}
-void RenderingDeviceVulkan::draw_list_end() {
+void RenderingDeviceVulkan::draw_list_end(uint32_t p_post_barrier) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_MSG(!draw_list, "Immediate draw list is already inactive.");
@@ -6504,16 +6753,51 @@ void RenderingDeviceVulkan::draw_list_end() {
}
}
+ uint32_t barrier_flags = 0;
+ uint32_t access_flags = 0;
+ if (p_post_barrier & BARRIER_MASK_COMPUTE) {
+ barrier_flags |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_RASTER) {
+ barrier_flags |= VK_PIPELINE_STAGE_VERTEX_INPUT_BIT | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT /*| VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT*/;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_INDEX_READ_BIT | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT /*| VK_ACCESS_INDIRECT_COMMAND_READ_BIT*/;
+ }
+ if (p_post_barrier & BARRIER_MASK_TRANSFER) {
+ barrier_flags |= VK_PIPELINE_STAGE_TRANSFER_BIT;
+ access_flags |= VK_ACCESS_TRANSFER_WRITE_BIT | VK_ACCESS_TRANSFER_READ_BIT;
+ }
+
+ if (barrier_flags == 0) {
+ barrier_flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
+ }
+
draw_list_bound_textures.clear();
- for (int i = 0; i < draw_list_storage_textures.size(); i++) {
+ VkImageMemoryBarrier *image_barriers = nullptr;
+
+ uint32_t image_barrier_count = draw_list_storage_textures.size();
+
+ if (image_barrier_count) {
+ image_barriers = (VkImageMemoryBarrier *)alloca(sizeof(VkImageMemoryBarrier) * draw_list_storage_textures.size());
+ }
+
+ uint32_t src_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
+ uint32_t src_access = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
+
+ if (image_barrier_count) {
+ src_stage |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
+ src_access |= VK_ACCESS_SHADER_WRITE_BIT;
+ }
+
+ for (uint32_t i = 0; i < image_barrier_count; i++) {
Texture *texture = texture_owner.getornull(draw_list_storage_textures[i]);
- VkImageMemoryBarrier image_memory_barrier;
+ VkImageMemoryBarrier &image_memory_barrier = image_barriers[i];
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
image_memory_barrier.pNext = nullptr;
- image_memory_barrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
- image_memory_barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
+ image_memory_barrier.srcAccessMask = src_access;
+ image_memory_barrier.dstAccessMask = access_flags;
image_memory_barrier.oldLayout = texture->layout;
image_memory_barrier.newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
@@ -6526,8 +6810,6 @@ void RenderingDeviceVulkan::draw_list_end() {
image_memory_barrier.subresourceRange.baseArrayLayer = texture->base_layer;
image_memory_barrier.subresourceRange.layerCount = texture->layers;
- vkCmdPipelineBarrier(frames[frame].draw_command_buffer, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
-
texture->layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
}
@@ -6540,7 +6822,17 @@ void RenderingDeviceVulkan::draw_list_end() {
#ifdef FORCE_FULL_BARRIER
_full_barrier(true);
#else
- _memory_barrier(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_INDEX_READ_BIT | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT | VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT, true);
+
+ VkMemoryBarrier mem_barrier;
+ mem_barrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER;
+ mem_barrier.pNext = nullptr;
+ mem_barrier.srcAccessMask = src_access;
+ mem_barrier.dstAccessMask = access_flags;
+
+ if (image_barrier_count > 0 || p_post_barrier != BARRIER_MASK_NO_BARRIER) {
+ vkCmdPipelineBarrier(frames[frame].draw_command_buffer, src_stage, barrier_flags, 0, 1, &mem_barrier, 0, nullptr, image_barrier_count, image_barriers);
+ }
+
#endif
}
@@ -6548,12 +6840,13 @@ void RenderingDeviceVulkan::draw_list_end() {
/**** COMPUTE LISTS ****/
/***********************/
-RenderingDevice::ComputeListID RenderingDeviceVulkan::compute_list_begin() {
- ERR_FAIL_COND_V_MSG(draw_list != nullptr, INVALID_ID, "Only one draw list can be active at the same time.");
+RenderingDevice::ComputeListID RenderingDeviceVulkan::compute_list_begin(bool p_allow_draw_overlap) {
+ ERR_FAIL_COND_V_MSG(!p_allow_draw_overlap && draw_list != nullptr, INVALID_ID, "Only one draw list can be active at the same time.");
ERR_FAIL_COND_V_MSG(compute_list != nullptr, INVALID_ID, "Only one draw/compute list can be active at the same time.");
compute_list = memnew(ComputeList);
compute_list->command_buffer = frames[frame].draw_command_buffer;
+ compute_list->state.allow_draw_overlap = p_allow_draw_overlap;
return ID_TYPE_COMPUTE_LIST;
}
@@ -6610,6 +6903,9 @@ void RenderingDeviceVulkan::compute_list_bind_compute_pipeline(ComputeListID p_l
}
cl->state.pipeline_shader = pipeline->shader;
+ cl->state.local_group_size[0] = pipeline->local_group_size[0];
+ cl->state.local_group_size[1] = pipeline->local_group_size[1];
+ cl->state.local_group_size[2] = pipeline->local_group_size[2];
}
#ifdef DEBUG_ENABLED
@@ -6647,11 +6943,24 @@ void RenderingDeviceVulkan::compute_list_bind_uniform_set(ComputeListID p_list,
cl->state.sets[p_index].uniform_set = p_uniform_set;
uint32_t textures_to_sampled_count = uniform_set->mutable_sampled_textures.size();
+ uint32_t textures_to_storage_count = uniform_set->mutable_storage_textures.size();
+
Texture **textures_to_sampled = uniform_set->mutable_sampled_textures.ptrw();
+ VkImageMemoryBarrier *texture_barriers = nullptr;
+
+ if (textures_to_sampled_count + textures_to_storage_count) {
+ texture_barriers = (VkImageMemoryBarrier *)alloca(sizeof(VkImageMemoryBarrier) * (textures_to_sampled_count + textures_to_storage_count));
+ }
+ uint32_t texture_barrier_count = 0;
+
+ uint32_t src_stage_flags = 0;
+
for (uint32_t i = 0; i < textures_to_sampled_count; i++) {
if (textures_to_sampled[i]->layout != VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) {
- VkImageMemoryBarrier image_memory_barrier;
+ src_stage_flags |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+
+ VkImageMemoryBarrier &image_memory_barrier = texture_barriers[texture_barrier_count++];
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
image_memory_barrier.pNext = nullptr;
image_memory_barrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
@@ -6668,23 +6977,55 @@ void RenderingDeviceVulkan::compute_list_bind_uniform_set(ComputeListID p_list,
image_memory_barrier.subresourceRange.baseArrayLayer = textures_to_sampled[i]->base_layer;
image_memory_barrier.subresourceRange.layerCount = textures_to_sampled[i]->layers;
- vkCmdPipelineBarrier(cl->command_buffer, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
-
textures_to_sampled[i]->layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
cl->state.textures_to_sampled_layout.erase(textures_to_sampled[i]);
}
+
+ if (textures_to_sampled[i]->used_in_frame != frames_drawn) {
+ textures_to_sampled[i]->used_in_frame = frames_drawn;
+ textures_to_sampled[i]->used_in_transfer = false;
+ textures_to_sampled[i]->used_in_raster = false;
+ }
+ textures_to_sampled[i]->used_in_compute = true;
}
- uint32_t textures_to_storage_count = uniform_set->mutable_storage_textures.size();
Texture **textures_to_storage = uniform_set->mutable_storage_textures.ptrw();
for (uint32_t i = 0; i < textures_to_storage_count; i++) {
if (textures_to_storage[i]->layout != VK_IMAGE_LAYOUT_GENERAL) {
- VkImageMemoryBarrier image_memory_barrier;
+ uint32_t src_access_flags = 0;
+
+ if (textures_to_storage[i]->used_in_frame == frames_drawn) {
+ if (textures_to_storage[i]->used_in_compute) {
+ src_stage_flags |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ src_access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (textures_to_storage[i]->used_in_raster) {
+ src_stage_flags |= VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT;
+ src_access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (textures_to_storage[i]->used_in_transfer) {
+ src_stage_flags |= VK_PIPELINE_STAGE_TRANSFER_BIT;
+ src_access_flags |= VK_ACCESS_TRANSFER_WRITE_BIT | VK_ACCESS_TRANSFER_READ_BIT;
+ }
+
+ textures_to_storage[i]->used_in_compute = false;
+ textures_to_storage[i]->used_in_raster = false;
+ textures_to_storage[i]->used_in_compute = false;
+
+ } else {
+ src_access_flags = 0;
+ textures_to_storage[i]->used_in_compute = false;
+ textures_to_storage[i]->used_in_raster = false;
+ textures_to_storage[i]->used_in_compute = false;
+ textures_to_storage[i]->used_in_frame = frames_drawn;
+ }
+
+ VkImageMemoryBarrier &image_memory_barrier = texture_barriers[texture_barrier_count++];
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
image_memory_barrier.pNext = nullptr;
- image_memory_barrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ image_memory_barrier.srcAccessMask = src_access_flags;
image_memory_barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
image_memory_barrier.oldLayout = textures_to_storage[i]->layout;
image_memory_barrier.newLayout = VK_IMAGE_LAYOUT_GENERAL;
@@ -6698,14 +7039,20 @@ void RenderingDeviceVulkan::compute_list_bind_uniform_set(ComputeListID p_list,
image_memory_barrier.subresourceRange.baseArrayLayer = textures_to_storage[i]->base_layer;
image_memory_barrier.subresourceRange.layerCount = textures_to_storage[i]->layers;
- vkCmdPipelineBarrier(cl->command_buffer, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
-
textures_to_storage[i]->layout = VK_IMAGE_LAYOUT_GENERAL;
cl->state.textures_to_sampled_layout.insert(textures_to_storage[i]); //needs to go back to sampled layout afterwards
}
}
+ if (texture_barrier_count) {
+ if (src_stage_flags == 0) {
+ src_stage_flags = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
+ }
+
+ vkCmdPipelineBarrier(cl->command_buffer, src_stage_flags, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, texture_barrier_count, texture_barriers);
+ }
+
#if 0
{ //validate that textures bound are not attached as framebuffer bindings
uint32_t attachable_count = uniform_set->attachable_textures.size();
@@ -6799,6 +7146,27 @@ void RenderingDeviceVulkan::compute_list_dispatch(ComputeListID p_list, uint32_t
vkCmdDispatch(cl->command_buffer, p_x_groups, p_y_groups, p_z_groups);
}
+void RenderingDeviceVulkan::compute_list_dispatch_threads(ComputeListID p_list, uint32_t p_x_threads, uint32_t p_y_threads, uint32_t p_z_threads) {
+ ERR_FAIL_COND(p_list != ID_TYPE_COMPUTE_LIST);
+ ERR_FAIL_COND(!compute_list);
+
+ ComputeList *cl = compute_list;
+
+#ifdef DEBUG_ENABLED
+
+ ERR_FAIL_COND_MSG(!cl->validation.pipeline_active, "No compute pipeline was set before attempting to draw.");
+
+ if (cl->validation.pipeline_push_constant_size > 0) {
+ //using push constants, check that they were supplied
+ ERR_FAIL_COND_MSG(!cl->validation.pipeline_push_constant_supplied,
+ "The shader in this pipeline requires a push constant to be set before drawing, but it's not present.");
+ }
+
+#endif
+
+ compute_list_dispatch(p_list, (p_x_threads - 1) / cl->state.local_group_size[0] + 1, (p_y_threads - 1) / cl->state.local_group_size[1] + 1, (p_z_threads - 1) / cl->state.local_group_size[2] + 1);
+}
+
void RenderingDeviceVulkan::compute_list_dispatch_indirect(ComputeListID p_list, RID p_buffer, uint32_t p_offset) {
ERR_FAIL_COND(p_list != ID_TYPE_COMPUTE_LIST);
ERR_FAIL_COND(!compute_list);
@@ -6863,14 +7231,44 @@ void RenderingDeviceVulkan::compute_list_add_barrier(ComputeListID p_list) {
#endif
}
-void RenderingDeviceVulkan::compute_list_end() {
+void RenderingDeviceVulkan::compute_list_end(uint32_t p_post_barrier) {
ERR_FAIL_COND(!compute_list);
+
+ uint32_t barrier_flags = 0;
+ uint32_t access_flags = 0;
+ if (p_post_barrier & BARRIER_MASK_COMPUTE) {
+ barrier_flags |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_RASTER) {
+ barrier_flags |= VK_PIPELINE_STAGE_VERTEX_INPUT_BIT | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT;
+ access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_INDEX_READ_BIT | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT | VK_ACCESS_INDIRECT_COMMAND_READ_BIT;
+ }
+ if (p_post_barrier & BARRIER_MASK_TRANSFER) {
+ barrier_flags |= VK_PIPELINE_STAGE_TRANSFER_BIT;
+ access_flags |= VK_ACCESS_TRANSFER_WRITE_BIT | VK_ACCESS_TRANSFER_READ_BIT;
+ }
+
+ if (barrier_flags == 0) {
+ barrier_flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
+ }
+
+ VkImageMemoryBarrier *image_barriers = nullptr;
+
+ uint32_t image_barrier_count = compute_list->state.textures_to_sampled_layout.size();
+
+ if (image_barrier_count) {
+ image_barriers = (VkImageMemoryBarrier *)alloca(sizeof(VkImageMemoryBarrier) * image_barrier_count);
+ }
+
+ uint32_t barrier_idx = 0;
+
for (Set<Texture *>::Element *E = compute_list->state.textures_to_sampled_layout.front(); E; E = E->next()) {
- VkImageMemoryBarrier image_memory_barrier;
+ VkImageMemoryBarrier &image_memory_barrier = image_barriers[barrier_idx++];
image_memory_barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
image_memory_barrier.pNext = nullptr;
image_memory_barrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
- image_memory_barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_TRANSFER_READ_BIT;
+ image_memory_barrier.dstAccessMask = access_flags;
image_memory_barrier.oldLayout = E->get()->layout;
image_memory_barrier.newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
@@ -6883,19 +7281,75 @@ void RenderingDeviceVulkan::compute_list_end() {
image_memory_barrier.subresourceRange.baseArrayLayer = E->get()->base_layer;
image_memory_barrier.subresourceRange.layerCount = E->get()->layers;
- // TODO: Look at the usages in the compute list and determine tighter dst stage and access masks based on some "final" usage equivalent
- vkCmdPipelineBarrier(compute_list->command_buffer, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 1, &image_memory_barrier);
-
E->get()->layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
+
+ if (E->get()->used_in_frame != frames_drawn) {
+ E->get()->used_in_transfer = false;
+ E->get()->used_in_raster = false;
+ E->get()->used_in_compute = false;
+ E->get()->used_in_frame = frames_drawn;
+ }
}
- memdelete(compute_list);
- compute_list = nullptr;
#ifdef FORCE_FULL_BARRIER
_full_barrier(true);
#else
- _memory_barrier(VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | VK_PIPELINE_STAGE_VERTEX_INPUT_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_INDEX_READ_BIT | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT | VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_INDIRECT_COMMAND_READ_BIT, true);
+ VkMemoryBarrier mem_barrier;
+ mem_barrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER;
+ mem_barrier.pNext = nullptr;
+ mem_barrier.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
+ mem_barrier.dstAccessMask = access_flags;
+
+ if (image_barrier_count > 0 || p_post_barrier != BARRIER_MASK_NO_BARRIER) {
+ vkCmdPipelineBarrier(compute_list->command_buffer, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, barrier_flags, 0, 1, &mem_barrier, 0, nullptr, image_barrier_count, image_barriers);
+ }
+
#endif
+
+ memdelete(compute_list);
+ compute_list = nullptr;
+}
+
+void RenderingDeviceVulkan::barrier(uint32_t p_from, uint32_t p_to) {
+ uint32_t src_barrier_flags = 0;
+ uint32_t src_access_flags = 0;
+ if (p_from & BARRIER_MASK_COMPUTE) {
+ src_barrier_flags |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ src_access_flags |= VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_from & BARRIER_MASK_RASTER) {
+ src_barrier_flags |= VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
+ src_access_flags |= VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
+ }
+ if (p_from & BARRIER_MASK_TRANSFER) {
+ src_barrier_flags |= VK_PIPELINE_STAGE_TRANSFER_BIT;
+ src_access_flags |= VK_ACCESS_TRANSFER_WRITE_BIT;
+ }
+
+ if (p_from == 0) {
+ src_barrier_flags = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT;
+ }
+
+ uint32_t dst_barrier_flags = 0;
+ uint32_t dst_access_flags = 0;
+ if (p_to & BARRIER_MASK_COMPUTE) {
+ dst_barrier_flags |= VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
+ dst_access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
+ }
+ if (p_to & BARRIER_MASK_RASTER) {
+ dst_barrier_flags |= VK_PIPELINE_STAGE_VERTEX_INPUT_BIT | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT;
+ dst_access_flags |= VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_INDEX_READ_BIT | VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT | VK_ACCESS_INDIRECT_COMMAND_READ_BIT;
+ }
+ if (p_to & BARRIER_MASK_TRANSFER) {
+ dst_barrier_flags |= VK_PIPELINE_STAGE_TRANSFER_BIT;
+ dst_access_flags |= VK_ACCESS_TRANSFER_WRITE_BIT | VK_ACCESS_TRANSFER_READ_BIT;
+ }
+
+ if (p_to == 0) {
+ dst_barrier_flags = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
+ }
+
+ _memory_barrier(src_barrier_flags, dst_barrier_flags, src_access_flags, dst_access_flags, true);
}
void RenderingDeviceVulkan::full_barrier() {
@@ -7032,6 +7486,82 @@ void RenderingDeviceVulkan::free(RID p_id) {
_free_internal(p_id);
}
+// The full list of resources that can be named is in the VkObjectType enum
+// We just expose the resources that are owned and can be accessed easily.
+void RenderingDeviceVulkan::set_resource_name(RID p_id, const String p_name) {
+ if (texture_owner.owns(p_id)) {
+ Texture *texture = texture_owner.getornull(p_id);
+ if (texture->owner.is_null()) {
+ // Don't set the source texture's name when calling on a texture view
+ context->set_object_name(VK_OBJECT_TYPE_IMAGE, uint64_t(texture->image), p_name);
+ }
+ context->set_object_name(VK_OBJECT_TYPE_IMAGE_VIEW, uint64_t(texture->view), p_name + " View");
+ } else if (framebuffer_owner.owns(p_id)) {
+ //Framebuffer *framebuffer = framebuffer_owner.getornull(p_id);
+ // Not implemented for now as the relationship between Framebuffer and RenderPass is very complex
+ } else if (sampler_owner.owns(p_id)) {
+ VkSampler *sampler = sampler_owner.getornull(p_id);
+ context->set_object_name(VK_OBJECT_TYPE_SAMPLER, uint64_t(*sampler), p_name);
+ } else if (vertex_buffer_owner.owns(p_id)) {
+ Buffer *vertex_buffer = vertex_buffer_owner.getornull(p_id);
+ context->set_object_name(VK_OBJECT_TYPE_BUFFER, uint64_t(vertex_buffer->buffer), p_name);
+ } else if (index_buffer_owner.owns(p_id)) {
+ IndexBuffer *index_buffer = index_buffer_owner.getornull(p_id);
+ context->set_object_name(VK_OBJECT_TYPE_BUFFER, uint64_t(index_buffer->buffer), p_name);
+ } else if (shader_owner.owns(p_id)) {
+ Shader *shader = shader_owner.getornull(p_id);
+ context->set_object_name(VK_OBJECT_TYPE_PIPELINE_LAYOUT, uint64_t(shader->pipeline_layout), p_name + " Pipeline Layout");
+ for (int i = 0; i < shader->sets.size(); i++) {
+ context->set_object_name(VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT, uint64_t(shader->sets[i].descriptor_set_layout), p_name);
+ }
+ } else if (uniform_buffer_owner.owns(p_id)) {
+ Buffer *uniform_buffer = uniform_buffer_owner.getornull(p_id);
+ context->set_object_name(VK_OBJECT_TYPE_BUFFER, uint64_t(uniform_buffer->buffer), p_name);
+ } else if (texture_buffer_owner.owns(p_id)) {
+ TextureBuffer *texture_buffer = texture_buffer_owner.getornull(p_id);
+ context->set_object_name(VK_OBJECT_TYPE_BUFFER, uint64_t(texture_buffer->buffer.buffer), p_name);
+ context->set_object_name(VK_OBJECT_TYPE_BUFFER_VIEW, uint64_t(texture_buffer->view), p_name + " View");
+ } else if (storage_buffer_owner.owns(p_id)) {
+ Buffer *storage_buffer = storage_buffer_owner.getornull(p_id);
+ context->set_object_name(VK_OBJECT_TYPE_BUFFER, uint64_t(storage_buffer->buffer), p_name);
+ } else if (uniform_set_owner.owns(p_id)) {
+ UniformSet *uniform_set = uniform_set_owner.getornull(p_id);
+ context->set_object_name(VK_OBJECT_TYPE_DESCRIPTOR_SET, uint64_t(uniform_set->descriptor_set), p_name);
+ } else if (render_pipeline_owner.owns(p_id)) {
+ RenderPipeline *pipeline = render_pipeline_owner.getornull(p_id);
+ context->set_object_name(VK_OBJECT_TYPE_PIPELINE, uint64_t(pipeline->pipeline), p_name);
+ context->set_object_name(VK_OBJECT_TYPE_PIPELINE_LAYOUT, uint64_t(pipeline->pipeline_layout), p_name + " Layout");
+ } else if (compute_pipeline_owner.owns(p_id)) {
+ ComputePipeline *pipeline = compute_pipeline_owner.getornull(p_id);
+ context->set_object_name(VK_OBJECT_TYPE_PIPELINE, uint64_t(pipeline->pipeline), p_name);
+ context->set_object_name(VK_OBJECT_TYPE_PIPELINE_LAYOUT, uint64_t(pipeline->pipeline_layout), p_name + " Layout");
+ } else {
+ ERR_PRINT("Attempted to name invalid ID: " + itos(p_id.get_id()));
+ }
+}
+
+void RenderingDeviceVulkan::draw_command_begin_label(String p_label_name, const Color p_color) {
+ context->command_begin_label(frames[frame].draw_command_buffer, p_label_name, p_color);
+}
+
+void RenderingDeviceVulkan::draw_command_insert_label(String p_label_name, const Color p_color) {
+ context->command_insert_label(frames[frame].draw_command_buffer, p_label_name, p_color);
+}
+
+void RenderingDeviceVulkan::draw_command_end_label() {
+ context->command_end_label(frames[frame].draw_command_buffer);
+}
+
+String RenderingDeviceVulkan::get_device_vendor_name() const {
+ return context->get_device_vendor_name();
+}
+String RenderingDeviceVulkan::get_device_name() const {
+ return context->get_device_name();
+}
+String RenderingDeviceVulkan::get_device_pipeline_cache_uuid() const {
+ return context->get_device_pipeline_cache_uuid();
+}
+
void RenderingDeviceVulkan::_finalize_command_bufers() {
if (draw_list) {
ERR_PRINT("Found open draw list at the end of the frame, this should never happen (further drawing will likely not work).");
@@ -7084,6 +7614,7 @@ void RenderingDeviceVulkan::_begin_frame() {
if (frames[frame].timestamp_count) {
vkGetQueryPoolResults(device, frames[frame].timestamp_pool, 0, frames[frame].timestamp_count, sizeof(uint64_t) * max_timestamp_query_elements, frames[frame].timestamp_result_values, sizeof(uint64_t), VK_QUERY_RESULT_64_BIT);
+ vkCmdResetQueryPool(frames[frame].setup_command_buffer, frames[frame].timestamp_pool, 0, frames[frame].timestamp_count);
SWAP(frames[frame].timestamp_names, frames[frame].timestamp_result_names);
SWAP(frames[frame].timestamp_cpu_values, frames[frame].timestamp_cpu_result_values);
}
@@ -7450,9 +7981,10 @@ void RenderingDeviceVulkan::_free_rids(T &p_owner, const char *p_type) {
}
}
-void RenderingDeviceVulkan::capture_timestamp(const String &p_name, bool p_sync_to_draw) {
+void RenderingDeviceVulkan::capture_timestamp(const String &p_name) {
ERR_FAIL_COND(frames[frame].timestamp_count >= max_timestamp_query_elements);
+ //this should be optional for profiling, else it will slow things down
{
VkMemoryBarrier memoryBarrier;
@@ -7489,9 +8021,10 @@ void RenderingDeviceVulkan::capture_timestamp(const String &p_name, bool p_sync_
VK_ACCESS_HOST_READ_BIT |
VK_ACCESS_HOST_WRITE_BIT;
- vkCmdPipelineBarrier(p_sync_to_draw ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 1, &memoryBarrier, 0, nullptr, 0, nullptr);
+ vkCmdPipelineBarrier(frames[frame].draw_command_buffer, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 1, &memoryBarrier, 0, nullptr, 0, nullptr);
}
- vkCmdWriteTimestamp(p_sync_to_draw ? frames[frame].draw_command_buffer : frames[frame].setup_command_buffer, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, frames[frame].timestamp_pool, frames[frame].timestamp_count);
+
+ vkCmdWriteTimestamp(frames[frame].draw_command_buffer, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, frames[frame].timestamp_pool, frames[frame].timestamp_count);
frames[frame].timestamp_names[frames[frame].timestamp_count] = p_name;
frames[frame].timestamp_cpu_values[frames[frame].timestamp_count] = OS::get_singleton()->get_ticks_usec();
frames[frame].timestamp_count++;
diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h
index 5290c31884..a2527d5c33 100644
--- a/drivers/vulkan/rendering_device_vulkan.h
+++ b/drivers/vulkan/rendering_device_vulkan.h
@@ -141,6 +141,11 @@ class RenderingDeviceVulkan : public RenderingDevice {
VkImageLayout layout;
+ uint64_t used_in_frame = 0;
+ bool used_in_transfer = false;
+ bool used_in_raster = false;
+ bool used_in_compute = false;
+
uint32_t read_aspect_mask = 0;
uint32_t barrier_aspect_mask = 0;
bool bound = false; //bound to framebffer
@@ -528,6 +533,8 @@ class RenderingDeviceVulkan : public RenderingDevice {
PushConstant push_constant;
+ uint32_t compute_local_size[3] = { 0, 0, 0 };
+
bool is_compute = false;
int max_output = 0;
Vector<Set> sets;
@@ -686,6 +693,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
VkPipeline pipeline = VK_NULL_HANDLE;
uint32_t push_constant_size = 0;
uint32_t push_constant_stages = 0;
+ uint32_t local_group_size[3] = { 0, 0, 0 };
};
RID_Owner<ComputePipeline, true> compute_pipeline_owner;
@@ -785,7 +793,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
Error _draw_list_setup_framebuffer(Framebuffer *p_framebuffer, InitialAction p_initial_color_action, FinalAction p_final_color_action, InitialAction p_initial_depth_action, FinalAction p_final_depth_action, VkFramebuffer *r_framebuffer, VkRenderPass *r_render_pass);
Error _draw_list_render_pass_begin(Framebuffer *framebuffer, InitialAction p_initial_color_action, FinalAction p_final_color_action, InitialAction p_initial_depth_action, FinalAction p_final_depth_action, const Vector<Color> &p_clear_colors, float p_clear_depth, uint32_t p_clear_stencil, Point2i viewport_offset, Point2i viewport_size, VkFramebuffer vkframebuffer, VkRenderPass render_pass, VkCommandBuffer command_buffer, VkSubpassContents subpass_contents, const Vector<RID> &p_storage_textures);
_FORCE_INLINE_ DrawList *_get_draw_list_ptr(DrawListID p_id);
- Buffer *_get_buffer_from_owner(RID p_buffer, VkPipelineStageFlags &dst_stage_mask, VkAccessFlags &dst_access);
+ Buffer *_get_buffer_from_owner(RID p_buffer, VkPipelineStageFlags &dst_stage_mask, VkAccessFlags &dst_access, uint32_t p_post_barrier);
/**********************/
/**** COMPUTE LIST ****/
@@ -808,8 +816,10 @@ class RenderingDeviceVulkan : public RenderingDevice {
uint32_t set_count = 0;
RID pipeline;
RID pipeline_shader;
+ uint32_t local_group_size[3] = { 0, 0, 0 };
VkPipelineLayout pipeline_layout = VK_NULL_HANDLE;
uint32_t pipeline_push_constant_stages = 0;
+ bool allow_draw_overlap;
} state;
#ifdef DEBUG_ENABLED
@@ -913,16 +923,16 @@ public:
virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture);
virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D);
- virtual Error texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, bool p_sync_with_draw = false);
+ virtual Error texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, uint32_t p_post_barrier = BARRIER_MASK_ALL);
virtual Vector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer);
virtual bool texture_is_format_supported_for_usage(DataFormat p_format, uint32_t p_usage) const;
virtual bool texture_is_shared(RID p_texture);
virtual bool texture_is_valid(RID p_texture);
- virtual Error texture_copy(RID p_from_texture, RID p_to_texture, const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_size, uint32_t p_src_mipmap, uint32_t p_dst_mipmap, uint32_t p_src_layer, uint32_t p_dst_layer, bool p_sync_with_draw = false);
- virtual Error texture_clear(RID p_texture, const Color &p_color, uint32_t p_base_mipmap, uint32_t p_mipmaps, uint32_t p_base_layer, uint32_t p_layers, bool p_sync_with_draw = false);
- virtual Error texture_resolve_multisample(RID p_from_texture, RID p_to_texture, bool p_sync_with_draw = false);
+ virtual Error texture_copy(RID p_from_texture, RID p_to_texture, const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_size, uint32_t p_src_mipmap, uint32_t p_dst_mipmap, uint32_t p_src_layer, uint32_t p_dst_layer, uint32_t p_post_barrier = BARRIER_MASK_ALL);
+ virtual Error texture_clear(RID p_texture, const Color &p_color, uint32_t p_base_mipmap, uint32_t p_mipmaps, uint32_t p_base_layer, uint32_t p_layers, uint32_t p_post_barrier = BARRIER_MASK_ALL);
+ virtual Error texture_resolve_multisample(RID p_from_texture, RID p_to_texture, uint32_t p_post_barrier = BARRIER_MASK_ALL);
/*********************/
/**** FRAMEBUFFER ****/
@@ -975,8 +985,8 @@ public:
virtual RID uniform_set_create(const Vector<Uniform> &p_uniforms, RID p_shader, uint32_t p_shader_set);
virtual bool uniform_set_is_valid(RID p_uniform_set);
- virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, bool p_sync_with_draw = false); //works for any buffer
- virtual Error buffer_clear(RID p_buffer, uint32_t p_offset, uint32_t p_size, bool p_sync_with_draw = false);
+ virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, uint32_t p_post_barrier = BARRIER_MASK_ALL); //works for any buffer
+ virtual Error buffer_clear(RID p_buffer, uint32_t p_offset, uint32_t p_size, uint32_t p_post_barrier = BARRIER_MASK_ALL);
virtual Vector<uint8_t> buffer_get_data(RID p_buffer);
/*************************/
@@ -1022,22 +1032,24 @@ public:
virtual void draw_list_enable_scissor(DrawListID p_list, const Rect2 &p_rect);
virtual void draw_list_disable_scissor(DrawListID p_list);
- virtual void draw_list_end();
+ virtual void draw_list_end(uint32_t p_post_barrier = BARRIER_MASK_ALL);
/***********************/
/**** COMPUTE LISTS ****/
/***********************/
- virtual ComputeListID compute_list_begin();
+ virtual ComputeListID compute_list_begin(bool p_allow_draw_overlap = false);
virtual void compute_list_bind_compute_pipeline(ComputeListID p_list, RID p_compute_pipeline);
virtual void compute_list_bind_uniform_set(ComputeListID p_list, RID p_uniform_set, uint32_t p_index);
virtual void compute_list_set_push_constant(ComputeListID p_list, const void *p_data, uint32_t p_data_size);
virtual void compute_list_add_barrier(ComputeListID p_list);
virtual void compute_list_dispatch(ComputeListID p_list, uint32_t p_x_groups, uint32_t p_y_groups, uint32_t p_z_groups);
+ virtual void compute_list_dispatch_threads(ComputeListID p_list, uint32_t p_x_threads, uint32_t p_y_threads, uint32_t p_z_threads);
virtual void compute_list_dispatch_indirect(ComputeListID p_list, RID p_buffer, uint32_t p_offset);
- virtual void compute_list_end();
+ virtual void compute_list_end(uint32_t p_post_barrier = BARRIER_MASK_ALL);
+ virtual void barrier(uint32_t p_from = BARRIER_MASK_ALL, uint32_t p_to = BARRIER_MASK_ALL);
virtual void full_barrier();
/**************/
@@ -1050,7 +1062,7 @@ public:
/**** Timing ****/
/****************/
- virtual void capture_timestamp(const String &p_name, bool p_sync_to_draw);
+ virtual void capture_timestamp(const String &p_name);
virtual uint32_t get_captured_timestamps_count() const;
virtual uint64_t get_captured_timestamps_frame() const;
virtual uint64_t get_captured_timestamp_gpu_time(uint32_t p_index) const;
@@ -1078,6 +1090,16 @@ public:
virtual uint64_t get_memory_usage() const;
+ virtual void set_resource_name(RID p_id, const String p_name);
+
+ virtual void draw_command_begin_label(String p_label_name, const Color p_color = Color(1, 1, 1, 1));
+ virtual void draw_command_insert_label(String p_label_name, const Color p_color = Color(1, 1, 1, 1));
+ virtual void draw_command_end_label();
+
+ virtual String get_device_vendor_name() const;
+ virtual String get_device_name() const;
+ virtual String get_device_pipeline_cache_uuid() const;
+
RenderingDeviceVulkan();
~RenderingDeviceVulkan();
};
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index 4d2bc406e4..c564cee757 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -55,10 +55,29 @@ VKAPI_ATTR VkBool32 VKAPI_CALL VulkanContext::_debug_messenger_callback(
return VK_FALSE;
}
// This needs to be ignored because Validator is wrong here.
+ if (strstr(pCallbackData->pMessage, "Invalid SPIR-V binary version 1.3") != nullptr) {
+ return VK_FALSE;
+ }
+ // This needs to be ignored because Validator is wrong here.
+ if (strstr(pCallbackData->pMessage, "Shader requires flag") != nullptr) {
+ return VK_FALSE;
+ }
+
+ // This needs to be ignored because Validator is wrong here.
if (strstr(pCallbackData->pMessage, "SPIR-V module not valid: Pointer operand") != nullptr &&
strstr(pCallbackData->pMessage, "must be a memory object") != nullptr) {
return VK_FALSE;
}
+ /*
+ // This is a valid warning because its illegal in Vulkan, but in practice it should work according to VK_KHR_maintenance2
+ if (strstr(pCallbackData->pMessage, "VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT") != nullptr) {
+ return VK_FALSE;
+ }
+
+ if (strstr(pCallbackData->pMessage, "VK_FORMAT_R4G4B4A4_UNORM_PACK16 with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT") != nullptr) {
+ return VK_FALSE;
+ }
+*/
// Workaround for Vulkan-Loader usability bug: https://github.com/KhronosGroup/Vulkan-Loader/issues/262.
if (strstr(pCallbackData->pMessage, "wrong ELF class: ELFCLASS32") != nullptr) {
return VK_FALSE;
@@ -220,6 +239,7 @@ Error VulkanContext::_initialize_extensions() {
enabled_extension_count = 0;
enabled_layer_count = 0;
+ enabled_debug_utils = false;
/* Look for instance extensions */
VkBool32 surfaceExtFound = 0;
VkBool32 platformSurfaceExtFound = 0;
@@ -251,9 +271,8 @@ Error VulkanContext::_initialize_extensions() {
}
}
if (!strcmp(VK_EXT_DEBUG_UTILS_EXTENSION_NAME, instance_extensions[i].extensionName)) {
- if (use_validation_layers) {
- extension_names[enabled_extension_count++] = VK_EXT_DEBUG_UTILS_EXTENSION_NAME;
- }
+ extension_names[enabled_extension_count++] = VK_EXT_DEBUG_UTILS_EXTENSION_NAME;
+ enabled_debug_utils = true;
}
if (enabled_extension_count >= MAX_EXTENSIONS) {
free(instance_extensions);
@@ -312,7 +331,7 @@ Error VulkanContext::_create_physical_device() {
* function to register the final callback.
*/
VkDebugUtilsMessengerCreateInfoEXT dbg_messenger_create_info;
- if (use_validation_layers) {
+ if (enabled_debug_utils) {
// VK_EXT_debug_utils style
dbg_messenger_create_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT;
dbg_messenger_create_info.pNext = nullptr;
@@ -361,7 +380,8 @@ Error VulkanContext::_create_physical_device() {
ERR_FAIL_V(ERR_CANT_CREATE);
}
/* for now, just grab the first physical device */
- gpu = physical_devices[0];
+ uint32_t device_index = 0;
+ gpu = physical_devices[device_index];
free(physical_devices);
/* Look for device extensions */
@@ -370,6 +390,40 @@ Error VulkanContext::_create_physical_device() {
enabled_extension_count = 0;
memset(extension_names, 0, sizeof(extension_names));
+ /* Get identifier properties */
+ vkGetPhysicalDeviceProperties(gpu, &gpu_props);
+
+ static const struct {
+ uint32_t id;
+ const char *name;
+ } vendor_names[] = {
+ { 0x1002, "AMD" },
+ { 0x1010, "ImgTec" },
+ { 0x10DE, "NVIDIA" },
+ { 0x13B5, "ARM" },
+ { 0x5143, "Qualcomm" },
+ { 0x8086, "INTEL" },
+ { 0, nullptr },
+ };
+ device_name = gpu_props.deviceName;
+ pipeline_cache_id = String::hex_encode_buffer(gpu_props.pipelineCacheUUID, VK_UUID_SIZE);
+ pipeline_cache_id += "-driver-" + itos(gpu_props.driverVersion);
+ {
+ device_vendor = "Unknown";
+ uint32_t vendor_idx = 0;
+ while (vendor_names[vendor_idx].name != nullptr) {
+ if (gpu_props.vendorID == vendor_names[vendor_idx].id) {
+ device_vendor = vendor_names[vendor_idx].name;
+ break;
+ }
+ vendor_idx++;
+ }
+ }
+#ifdef DEBUG_ENABLED
+ print_line("Using Vulkan Device #" + itos(device_index) + ": " + device_vendor + " - " + device_name);
+#endif
+ device_api_version = gpu_props.apiVersion;
+
err = vkEnumerateDeviceExtensionProperties(gpu, nullptr, &device_extension_count, nullptr);
ERR_FAIL_COND_V(err, ERR_CANT_CREATE);
@@ -436,7 +490,7 @@ Error VulkanContext::_create_physical_device() {
" extension.\n\nDo you have a compatible Vulkan installable client driver (ICD) installed?\n"
"vkCreateInstance Failure");
- if (use_validation_layers) {
+ if (enabled_debug_utils) {
// Setup VK_EXT_debug_utils function pointers always (we use them for
// debug labels and names).
CreateDebugUtilsMessengerEXT =
@@ -479,7 +533,6 @@ Error VulkanContext::_create_physical_device() {
break;
}
}
- vkGetPhysicalDeviceProperties(gpu, &gpu_props);
/* Call with NULL data to get count */
vkGetPhysicalDeviceQueueFamilyProperties(gpu, &queue_family_count, nullptr);
@@ -546,6 +599,7 @@ Error VulkanContext::_create_device() {
}
err = vkCreateDevice(gpu, &sdevice, nullptr, &device);
ERR_FAIL_COND_V(err, ERR_CANT_CREATE);
+
return OK;
}
@@ -1567,6 +1621,70 @@ void VulkanContext::local_device_free(RID p_local_device) {
local_device_owner.free(p_local_device);
}
+void VulkanContext::command_begin_label(VkCommandBuffer p_command_buffer, String p_label_name, const Color p_color) {
+ if (!enabled_debug_utils) {
+ return;
+ }
+
+ CharString cs = p_label_name.utf8().get_data();
+ VkDebugUtilsLabelEXT label;
+ label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
+ label.pNext = nullptr;
+ label.pLabelName = cs.get_data();
+ label.color[0] = p_color[0];
+ label.color[1] = p_color[1];
+ label.color[2] = p_color[2];
+ label.color[3] = p_color[3];
+ CmdBeginDebugUtilsLabelEXT(p_command_buffer, &label);
+}
+
+void VulkanContext::command_insert_label(VkCommandBuffer p_command_buffer, String p_label_name, const Color p_color) {
+ if (!enabled_debug_utils) {
+ return;
+ }
+ CharString cs = p_label_name.utf8().get_data();
+ VkDebugUtilsLabelEXT label;
+ label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
+ label.pNext = nullptr;
+ label.pLabelName = cs.get_data();
+ label.color[0] = p_color[0];
+ label.color[1] = p_color[1];
+ label.color[2] = p_color[2];
+ label.color[3] = p_color[3];
+ CmdInsertDebugUtilsLabelEXT(p_command_buffer, &label);
+}
+
+void VulkanContext::command_end_label(VkCommandBuffer p_command_buffer) {
+ if (!enabled_debug_utils) {
+ return;
+ }
+ CmdEndDebugUtilsLabelEXT(p_command_buffer);
+}
+
+void VulkanContext::set_object_name(VkObjectType p_object_type, uint64_t p_object_handle, String p_object_name) {
+ if (!enabled_debug_utils) {
+ return;
+ }
+ CharString obj_data = p_object_name.utf8();
+ VkDebugUtilsObjectNameInfoEXT name_info;
+ name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
+ name_info.pNext = nullptr;
+ name_info.objectType = p_object_type;
+ name_info.objectHandle = p_object_handle;
+ name_info.pObjectName = obj_data.get_data();
+ SetDebugUtilsObjectNameEXT(device, &name_info);
+}
+
+String VulkanContext::get_device_vendor_name() const {
+ return device_vendor;
+}
+String VulkanContext::get_device_name() const {
+ return device_name;
+}
+String VulkanContext::get_device_pipeline_cache_uuid() const {
+ return pipeline_cache_id;
+}
+
VulkanContext::VulkanContext() {
use_validation_layers = Engine::get_singleton()->is_validation_layers_enabled();
diff --git a/drivers/vulkan/vulkan_context.h b/drivers/vulkan/vulkan_context.h
index 2be9903483..dc6b0410bc 100644
--- a/drivers/vulkan/vulkan_context.h
+++ b/drivers/vulkan/vulkan_context.h
@@ -57,6 +57,11 @@ class VulkanContext {
bool device_initialized = false;
bool inst_initialized = false;
+ String device_vendor;
+ String device_name;
+ String pipeline_cache_id;
+ uint32_t device_api_version = 0;
+
bool buffers_prepared = false;
// Present queue.
@@ -119,6 +124,7 @@ class VulkanContext {
bool VK_GOOGLE_display_timing_enabled = true;
uint32_t enabled_extension_count = 0;
const char *extension_names[MAX_EXTENSIONS];
+ bool enabled_debug_utils = false;
uint32_t enabled_layer_count = 0;
const char *enabled_layers[MAX_LAYERS];
@@ -209,6 +215,15 @@ public:
Error swap_buffers();
Error initialize();
+ void command_begin_label(VkCommandBuffer p_command_buffer, String p_label_name, const Color p_color);
+ void command_insert_label(VkCommandBuffer p_command_buffer, String p_label_name, const Color p_color);
+ void command_end_label(VkCommandBuffer p_command_buffer);
+ void set_object_name(VkObjectType p_object_type, uint64_t p_object_handle, String p_object_name);
+
+ String get_device_vendor_name() const;
+ String get_device_name() const;
+ String get_device_pipeline_cache_uuid() const;
+
VulkanContext();
virtual ~VulkanContext();
};
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index 7d5082d276..43c8722b06 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -387,7 +387,7 @@ Error AudioDriverWASAPI::finish_capture_device() {
}
Error AudioDriverWASAPI::init() {
- mix_rate = GLOBAL_GET("audio/mix_rate");
+ mix_rate = GLOBAL_GET("audio/driver/mix_rate");
Error err = init_render_device();
if (err != OK) {
@@ -397,7 +397,7 @@ Error AudioDriverWASAPI::init() {
exit_thread = false;
thread_exited = false;
- thread = Thread::create(thread_func, this);
+ thread.start(thread_func, this);
return OK;
}
@@ -767,13 +767,8 @@ void AudioDriverWASAPI::unlock() {
}
void AudioDriverWASAPI::finish() {
- if (thread) {
- exit_thread = true;
- Thread::wait_to_finish(thread);
-
- memdelete(thread);
- thread = nullptr;
- }
+ exit_thread = true;
+ thread.wait_to_finish();
finish_capture_device();
finish_render_device();
diff --git a/drivers/wasapi/audio_driver_wasapi.h b/drivers/wasapi/audio_driver_wasapi.h
index 2df07d16f7..b9b325f0fb 100644
--- a/drivers/wasapi/audio_driver_wasapi.h
+++ b/drivers/wasapi/audio_driver_wasapi.h
@@ -64,7 +64,7 @@ class AudioDriverWASAPI : public AudioDriver {
AudioDeviceWASAPI audio_output;
Mutex mutex;
- Thread *thread = nullptr;
+ Thread thread;
Vector<int32_t> samples_in;
diff --git a/drivers/windows/rw_lock_windows.cpp b/drivers/windows/rw_lock_windows.cpp
deleted file mode 100644
index 6f59e072bb..0000000000
--- a/drivers/windows/rw_lock_windows.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*************************************************************************/
-/* rw_lock_windows.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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. */
-/*************************************************************************/
-
-#if defined(WINDOWS_ENABLED)
-
-#include "rw_lock_windows.h"
-
-#include "core/error/error_macros.h"
-#include "core/os/memory.h"
-
-#include <stdio.h>
-
-void RWLockWindows::read_lock() {
- AcquireSRWLockShared(&lock);
-}
-
-void RWLockWindows::read_unlock() {
- ReleaseSRWLockShared(&lock);
-}
-
-Error RWLockWindows::read_try_lock() {
- if (TryAcquireSRWLockShared(&lock) == 0) {
- return ERR_BUSY;
- } else {
- return OK;
- }
-}
-
-void RWLockWindows::write_lock() {
- AcquireSRWLockExclusive(&lock);
-}
-
-void RWLockWindows::write_unlock() {
- ReleaseSRWLockExclusive(&lock);
-}
-
-Error RWLockWindows::write_try_lock() {
- if (TryAcquireSRWLockExclusive(&lock) == 0) {
- return ERR_BUSY;
- } else {
- return OK;
- }
-}
-
-RWLock *RWLockWindows::create_func_windows() {
- return memnew(RWLockWindows);
-}
-
-void RWLockWindows::make_default() {
- create_func = create_func_windows;
-}
-
-RWLockWindows::RWLockWindows() {
- InitializeSRWLock(&lock);
-}
-
-RWLockWindows::~RWLockWindows() {
-}
-
-#endif
diff --git a/drivers/windows/rw_lock_windows.h b/drivers/windows/rw_lock_windows.h
deleted file mode 100644
index a9d55bdef9..0000000000
--- a/drivers/windows/rw_lock_windows.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*************************************************************************/
-/* rw_lock_windows.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 RWLOCKWINDOWS_H
-#define RWLOCKWINDOWS_H
-
-#if defined(WINDOWS_ENABLED)
-
-#include "core/os/rw_lock.h"
-
-#include <windows.h>
-
-class RWLockWindows : public RWLock {
- SRWLOCK lock;
-
- static RWLock *create_func_windows();
-
-public:
- virtual void read_lock();
- virtual void read_unlock();
- virtual Error read_try_lock();
-
- virtual void write_lock();
- virtual void write_unlock();
- virtual Error write_try_lock();
-
- static void make_default();
-
- RWLockWindows();
-
- ~RWLockWindows();
-};
-
-#endif
-
-#endif // RWLOCKWINDOWS_H
diff --git a/drivers/windows/thread_windows.cpp b/drivers/windows/thread_windows.cpp
deleted file mode 100644
index ec95c9523d..0000000000
--- a/drivers/windows/thread_windows.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*************************************************************************/
-/* thread_windows.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "thread_windows.h"
-
-#if defined(WINDOWS_ENABLED) && !defined(UWP_ENABLED)
-
-#include "core/os/memory.h"
-
-Thread::ID ThreadWindows::get_id() const {
- return id;
-}
-
-Thread *ThreadWindows::create_thread_windows() {
- return memnew(ThreadWindows);
-}
-
-DWORD ThreadWindows::thread_callback(LPVOID userdata) {
- ThreadWindows *t = reinterpret_cast<ThreadWindows *>(userdata);
-
- ScriptServer::thread_enter(); //scripts may need to attach a stack
-
- t->id = (ID)GetCurrentThreadId(); // must implement
- t->callback(t->user);
- SetEvent(t->handle);
-
- ScriptServer::thread_exit();
-
- return 0;
-}
-
-Thread *ThreadWindows::create_func_windows(ThreadCreateCallback p_callback, void *p_user, const Settings &) {
- ThreadWindows *tr = memnew(ThreadWindows);
- tr->callback = p_callback;
- tr->user = p_user;
- tr->handle = CreateEvent(nullptr, TRUE, FALSE, nullptr);
-
- QueueUserWorkItem(thread_callback, tr, WT_EXECUTELONGFUNCTION);
-
- return tr;
-}
-
-Thread::ID ThreadWindows::get_thread_id_func_windows() {
- return (ID)GetCurrentThreadId(); //must implement
-}
-
-void ThreadWindows::wait_to_finish_func_windows(Thread *p_thread) {
- ThreadWindows *tp = static_cast<ThreadWindows *>(p_thread);
- ERR_FAIL_COND(!tp);
- WaitForSingleObject(tp->handle, INFINITE);
- CloseHandle(tp->handle);
- //`memdelete(tp);
-}
-
-void ThreadWindows::make_default() {
- create_func = create_func_windows;
- get_thread_id_func = get_thread_id_func_windows;
- wait_to_finish_func = wait_to_finish_func_windows;
-}
-
-#endif
diff --git a/drivers/windows/thread_windows.h b/drivers/windows/thread_windows.h
deleted file mode 100644
index 3801bddc2c..0000000000
--- a/drivers/windows/thread_windows.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*************************************************************************/
-/* thread_windows.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 THREAD_WINDOWS_H
-#define THREAD_WINDOWS_H
-
-#ifdef WINDOWS_ENABLED
-
-#include "core/object/script_language.h"
-#include "core/os/thread.h"
-
-#include <windows.h>
-
-class ThreadWindows : public Thread {
- ThreadCreateCallback callback;
- void *user;
- ID id;
- HANDLE handle = nullptr;
-
- static Thread *create_thread_windows();
-
- static DWORD WINAPI thread_callback(LPVOID userdata);
-
- static Thread *create_func_windows(ThreadCreateCallback p_callback, void *, const Settings &);
- static ID get_thread_id_func_windows();
- static void wait_to_finish_func_windows(Thread *p_thread);
-
- ThreadWindows() {}
-
-public:
- virtual ID get_id() const;
-
- static void make_default();
-
- ~ThreadWindows() {}
-};
-
-#endif
-
-#endif
diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp
index 3b3c3481b6..1c7bf5d6c6 100644
--- a/drivers/xaudio2/audio_driver_xaudio2.cpp
+++ b/drivers/xaudio2/audio_driver_xaudio2.cpp
@@ -44,12 +44,12 @@ Error AudioDriverXAudio2::init() {
pcm_open = false;
samples_in = nullptr;
- mix_rate = GLOBAL_GET("audio/mix_rate");
+ mix_rate = GLOBAL_GET("audio/driver/mix_rate");
// FIXME: speaker_mode seems unused in the Xaudio2 driver so far
speaker_mode = SPEAKER_MODE_STEREO;
channels = 2;
- int latency = GLOBAL_GET("audio/output_latency");
+ int latency = GLOBAL_GET("audio/driver/output_latency");
buffer_size = closest_power_of_2(latency * mix_rate / 1000);
samples_in = memnew_arr(int32_t, buffer_size * channels);
@@ -78,7 +78,7 @@ Error AudioDriverXAudio2::init() {
hr = xaudio->CreateSourceVoice(&source_voice, &wave_format, 0, XAUDIO2_MAX_FREQ_RATIO, &voice_callback);
ERR_FAIL_COND_V_MSG(hr != S_OK, ERR_UNAVAILABLE, "Error creating XAudio2 source voice. Error code: " + itos(hr) + ".");
- thread = Thread::create(AudioDriverXAudio2::thread_func, this);
+ thread.start(AudioDriverXAudio2::thread_func, this);
return OK;
}
@@ -146,23 +146,16 @@ float AudioDriverXAudio2::get_latency() {
}
void AudioDriverXAudio2::lock() {
- if (!thread)
- return;
mutex.lock();
}
void AudioDriverXAudio2::unlock() {
- if (!thread)
- return;
mutex.unlock();
}
void AudioDriverXAudio2::finish() {
- if (!thread)
- return;
-
exit_thread = true;
- Thread::wait_to_finish(thread);
+ thread.wait_to_finish();
if (source_voice) {
source_voice->Stop(0);
@@ -179,9 +172,6 @@ void AudioDriverXAudio2::finish() {
}
mastering_voice->DestroyVoice();
-
- memdelete(thread);
- thread = nullptr;
}
AudioDriverXAudio2::AudioDriverXAudio2() {
diff --git a/drivers/xaudio2/audio_driver_xaudio2.h b/drivers/xaudio2/audio_driver_xaudio2.h
index e3c2d3a326..d3938a19d0 100644
--- a/drivers/xaudio2/audio_driver_xaudio2.h
+++ b/drivers/xaudio2/audio_driver_xaudio2.h
@@ -62,7 +62,7 @@ class AudioDriverXAudio2 : public AudioDriver {
void STDMETHODCALLTYPE OnVoiceError(void *pBufferContext, HRESULT Error) {}
};
- Thread *thread = nullptr;
+ Thread thread;
Mutex mutex;
int32_t *samples_in = nullptr;
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 5d49290612..934c6b95a4 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -634,7 +634,7 @@ public:
bool use_fps = false;
void notify_change() {
- _change_notify();
+ notify_property_list_changed();
}
Node *get_root_path() {
@@ -643,7 +643,7 @@ public:
void set_use_fps(bool p_enable) {
use_fps = p_enable;
- _change_notify();
+ notify_property_list_changed();
}
};
@@ -1276,7 +1276,7 @@ public:
UndoRedo *undo_redo = nullptr;
void notify_change() {
- _change_notify();
+ notify_property_list_changed();
}
Node *get_root_path() {
@@ -1285,7 +1285,7 @@ public:
void set_use_fps(bool p_enable) {
use_fps = p_enable;
- _change_notify();
+ notify_property_list_changed();
}
};
@@ -4283,7 +4283,6 @@ void AnimationTrackEditor::_animation_update() {
_update_step_spinbox();
emit_signal("animation_step_changed", animation->get_step());
emit_signal("animation_len_changed", animation->get_length());
- EditorNode::get_singleton()->get_inspector()->refresh();
animation_changing_awaiting_update = false;
}
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp
index 3daee4587c..09defac354 100644
--- a/editor/array_property_edit.cpp
+++ b/editor/array_property_edit.cpp
@@ -49,11 +49,7 @@ Variant ArrayPropertyEdit::get_array() const {
}
void ArrayPropertyEdit::_notif_change() {
- _change_notify();
-}
-
-void ArrayPropertyEdit::_notif_changev(const String &p_v) {
- _change_notify(p_v.utf8().get_data());
+ notify_property_list_changed();
}
void ArrayPropertyEdit::_set_size(int p_size) {
@@ -120,7 +116,7 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
}
if (pn == "array/page") {
page = p_value;
- _change_notify();
+ notify_property_list_changed();
return true;
}
@@ -159,8 +155,6 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
ur->create_action(TTR("Change Array Value"));
ur->add_do_method(this, "_set_value", idx, p_value);
ur->add_undo_method(this, "_set_value", idx, value);
- ur->add_do_method(this, "_notif_changev", p_name);
- ur->add_undo_method(this, "_notif_changev", p_name);
ur->commit_action();
return true;
}
@@ -288,7 +282,6 @@ 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);
}
diff --git a/editor/array_property_edit.h b/editor/array_property_edit.h
index dd495b57f4..fa3dcbe038 100644
--- a/editor/array_property_edit.h
+++ b/editor/array_property_edit.h
@@ -47,7 +47,6 @@ class ArrayPropertyEdit : public Reference {
Variant::Type default_type;
void _notif_change();
- void _notif_changev(const String &p_v);
void _set_size(int p_size);
void _set_value(int p_idx, const Variant &p_value);
diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp
index 2e0c3491f7..539657afd7 100644
--- a/editor/audio_stream_preview.cpp
+++ b/editor/audio_stream_preview.cpp
@@ -155,7 +155,7 @@ void AudioStreamPreviewGenerator::_preview_thread(void *p_preview) {
preview->playback->stop();
- preview->generating = false;
+ preview->generating.clear();
}
Ref<AudioStreamPreview> AudioStreamPreviewGenerator::generate_preview(const Ref<AudioStream> &p_stream) {
@@ -172,7 +172,7 @@ Ref<AudioStreamPreview> AudioStreamPreviewGenerator::generate_preview(const Ref<
Preview *preview = &previews[p_stream->get_instance_id()];
preview->base_stream = p_stream;
preview->playback = preview->base_stream->instance_playback();
- preview->generating = true;
+ preview->generating.set();
preview->id = p_stream->get_instance_id();
float len_s = preview->base_stream->get_length();
@@ -197,7 +197,8 @@ Ref<AudioStreamPreview> AudioStreamPreviewGenerator::generate_preview(const Ref<
preview->preview->length = len_s;
if (preview->playback.is_valid()) {
- preview->thread = Thread::create(_preview_thread, preview);
+ preview->thread = memnew(Thread);
+ preview->thread->start(_preview_thread, preview);
}
return preview->preview;
@@ -216,9 +217,10 @@ void AudioStreamPreviewGenerator::_notification(int p_what) {
if (p_what == NOTIFICATION_PROCESS) {
List<ObjectID> to_erase;
for (Map<ObjectID, Preview>::Element *E = previews.front(); E; E = E->next()) {
- if (!E->get().generating) {
+ if (!E->get().generating.is_set()) {
if (E->get().thread) {
- Thread::wait_to_finish(E->get().thread);
+ E->get().thread->wait_to_finish();
+ memdelete(E->get().thread);
E->get().thread = nullptr;
}
if (!ObjectDB::get_instance(E->key())) { //no longer in use, get rid of preview
diff --git a/editor/audio_stream_preview.h b/editor/audio_stream_preview.h
index 21c9ea203e..accc7275c0 100644
--- a/editor/audio_stream_preview.h
+++ b/editor/audio_stream_preview.h
@@ -32,6 +32,7 @@
#define AUDIO_STREAM_PREVIEW_H
#include "core/os/thread.h"
+#include "core/templates/safe_refcount.h"
#include "scene/main/node.h"
#include "servers/audio/audio_stream.h"
@@ -60,9 +61,20 @@ class AudioStreamPreviewGenerator : public Node {
Ref<AudioStreamPreview> preview;
Ref<AudioStream> base_stream;
Ref<AudioStreamPlayback> playback;
- volatile bool generating = false;
+ SafeFlag generating;
ObjectID id;
Thread *thread = nullptr;
+
+ // Needed for the bookkeeping of the Map
+ Preview &operator=(const Preview &p_rhs) {
+ preview = p_rhs.preview;
+ base_stream = p_rhs.base_stream;
+ playback = p_rhs.playback;
+ generating.set_to(generating.is_set());
+ id = p_rhs.id;
+ thread = p_rhs.thread;
+ return *this;
+ }
};
Map<ObjectID, Preview> previews;
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 01fa094d38..0c1fb6fe4d 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -98,7 +98,7 @@ public:
}
void notify_changed() {
- _change_notify();
+ notify_property_list_changed();
}
ConnectDialogBinds() {
diff --git a/editor/debugger/editor_debugger_inspector.h b/editor/debugger/editor_debugger_inspector.h
index cf2d81cbf1..6648c99c03 100644
--- a/editor/debugger/editor_debugger_inspector.h
+++ b/editor/debugger/editor_debugger_inspector.h
@@ -58,7 +58,7 @@ public:
prop_values.clear();
}
- void update() { _change_notify(); }
+ void update() { notify_property_list_changed(); }
EditorDebuggerRemoteObject() {}
};
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp
index 6db3b94aee..ec92edc795 100644
--- a/editor/debugger/editor_debugger_tree.cpp
+++ b/editor/debugger/editor_debugger_tree.cpp
@@ -129,6 +129,8 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
updating_scene_tree = true;
const String last_path = get_selected_path();
const String filter = EditorNode::get_singleton()->get_scene_tree_dock()->get_filter();
+ bool filter_changed = filter != last_filter;
+ TreeItem *scroll_item = nullptr;
// Nodes are in a flatten list, depth first. Use a stack of parents, avoid recursion.
List<Pair<TreeItem *, int>> parents;
@@ -162,11 +164,17 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
if (debugger_id == p_debugger) { // Can use remote id.
if (node.id == inspected_object_id) {
item->select(0);
+ if (filter_changed) {
+ scroll_item = item;
+ }
}
} else { // Must use path
if (last_path == _get_path(item)) {
updating_scene_tree = false; // Force emission of new selection
item->select(0);
+ if (filter_changed) {
+ scroll_item = item;
+ }
updating_scene_tree = true;
}
}
@@ -183,6 +191,9 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
}
parent->remove_child(item);
memdelete(item);
+ if (scroll_item == item) {
+ scroll_item = nullptr;
+ }
if (had_siblings) {
break; // Parent must survive.
}
@@ -199,6 +210,10 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
}
}
debugger_id = p_debugger; // Needed by hook, could be avoided if every debugger had its own tree
+ if (scroll_item) {
+ call_deferred("scroll_to_item", scroll_item);
+ }
+ last_filter = filter;
updating_scene_tree = false;
}
diff --git a/editor/debugger/editor_debugger_tree.h b/editor/debugger/editor_debugger_tree.h
index 8c966dffd5..13193344f1 100644
--- a/editor/debugger/editor_debugger_tree.h
+++ b/editor/debugger/editor_debugger_tree.h
@@ -51,6 +51,7 @@ private:
Set<ObjectID> unfold_cache;
PopupMenu *item_menu = nullptr;
EditorFileDialog *file_dialog = nullptr;
+ String last_filter;
String _get_path(TreeItem *p_item);
void _scene_tree_folded(Object *p_obj);
diff --git a/editor/debugger/editor_network_profiler.cpp b/editor/debugger/editor_network_profiler.cpp
index d541fdd249..2d57dff69d 100644
--- a/editor/debugger/editor_network_profiler.cpp
+++ b/editor/debugger/editor_network_profiler.cpp
@@ -46,8 +46,8 @@ void EditorNetworkProfiler::_notification(int p_what) {
outgoing_bandwidth_text->set_right_icon(get_theme_icon("ArrowUp", "EditorIcons"));
// This needs to be done here to set the faded color when the profiler is first opened
- incoming_bandwidth_text->add_theme_color_override("font_color_uneditable", get_theme_color("font_color", "Editor") * Color(1, 1, 1, 0.5));
- outgoing_bandwidth_text->add_theme_color_override("font_color_uneditable", get_theme_color("font_color", "Editor") * Color(1, 1, 1, 0.5));
+ incoming_bandwidth_text->add_theme_color_override("font_uneditable_color", get_theme_color("font_color", "Editor") * Color(1, 1, 1, 0.5));
+ outgoing_bandwidth_text->add_theme_color_override("font_uneditable_color", get_theme_color("font_color", "Editor") * Color(1, 1, 1, 0.5));
}
}
@@ -113,10 +113,10 @@ void EditorNetworkProfiler::set_bandwidth(int p_incoming, int p_outgoing) {
// Make labels more prominent when the bandwidth is greater than 0 to attract user attention
incoming_bandwidth_text->add_theme_color_override(
- "font_color_uneditable",
+ "font_uneditable_color",
get_theme_color("font_color", "Editor") * Color(1, 1, 1, p_incoming > 0 ? 1 : 0.5));
outgoing_bandwidth_text->add_theme_color_override(
- "font_color_uneditable",
+ "font_uneditable_color",
get_theme_color("font_color", "Editor") * Color(1, 1, 1, p_outgoing > 0 ? 1 : 0.5));
}
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 2780b74469..25e155aafe 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -480,8 +480,8 @@ void DependencyRemoveDialog::ok_pressed() {
if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("application/boot_splash/image"))) {
ProjectSettings::get_singleton()->set("application/boot_splash/image", "");
}
- if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("rendering/environment/default_environment"))) {
- ProjectSettings::get_singleton()->set("rendering/environment/default_environment", "");
+ if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("rendering/environment/defaults/default_environment"))) {
+ ProjectSettings::get_singleton()->set("rendering/environment/defaults/default_environment", "");
}
if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image"))) {
ProjectSettings::get_singleton()->set("display/mouse_cursor/custom_image", "");
@@ -492,8 +492,8 @@ void DependencyRemoveDialog::ok_pressed() {
if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("gui/theme/custom_font"))) {
ProjectSettings::get_singleton()->set("gui/theme/custom_font", "");
}
- if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("audio/default_bus_layout"))) {
- ProjectSettings::get_singleton()->set("audio/default_bus_layout", "");
+ if (files_to_delete[i] == String(ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout"))) {
+ ProjectSettings::get_singleton()->set("audio/buses/default_bus_layout", "");
}
String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/");
diff --git a/editor/dictionary_property_edit.cpp b/editor/dictionary_property_edit.cpp
index 9683003d89..408177e523 100644
--- a/editor/dictionary_property_edit.cpp
+++ b/editor/dictionary_property_edit.cpp
@@ -32,11 +32,7 @@
#include "editor_node.h"
void DictionaryPropertyEdit::_notif_change() {
- _change_notify();
-}
-
-void DictionaryPropertyEdit::_notif_changev(const String &p_v) {
- _change_notify(p_v.utf8().get_data());
+ notify_property_list_changed();
}
void DictionaryPropertyEdit::_set_key(const Variant &p_old_key, const Variant &p_new_key) {
@@ -107,7 +103,6 @@ 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);
}
@@ -128,8 +123,6 @@ bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_val
ur->create_action(TTR("Change Dictionary Key"));
ur->add_do_method(this, "_set_key", key, p_value);
ur->add_undo_method(this, "_set_key", p_value, key);
- ur->add_do_method(this, "_notif_changev", p_name);
- ur->add_undo_method(this, "_notif_changev", p_name);
ur->commit_action();
return true;
@@ -142,8 +135,6 @@ bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_val
ur->create_action(TTR("Change Dictionary Value"));
ur->add_do_method(this, "_set_value", key, p_value);
ur->add_undo_method(this, "_set_value", key, value);
- ur->add_do_method(this, "_notif_changev", p_name);
- ur->add_undo_method(this, "_notif_changev", p_name);
ur->commit_action();
return true;
diff --git a/editor/dictionary_property_edit.h b/editor/dictionary_property_edit.h
index 564bbf205b..e0fd945491 100644
--- a/editor/dictionary_property_edit.h
+++ b/editor/dictionary_property_edit.h
@@ -40,7 +40,6 @@ class DictionaryPropertyEdit : public Reference {
StringName property;
void _notif_change();
- void _notif_changev(const String &p_v);
void _set_key(const Variant &p_old_key, const Variant &p_new_key);
void _set_value(const Variant &p_key, const Variant &p_value);
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 7569800a7e..9a826ab106 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -78,11 +78,11 @@ void EditorAudioBus::_notification(int p_what) {
Color bypass_color = EditorSettings::get_singleton()->is_dark_theme() ? Color(0.13, 0.8, 1.0) : Color(0.44, 0.87, 1.0);
solo->set_icon(get_theme_icon("AudioBusSolo", "EditorIcons"));
- solo->add_theme_color_override("icon_color_pressed", solo_color);
+ solo->add_theme_color_override("icon_pressed_color", solo_color);
mute->set_icon(get_theme_icon("AudioBusMute", "EditorIcons"));
- mute->add_theme_color_override("icon_color_pressed", mute_color);
+ mute->add_theme_color_override("icon_pressed_color", mute_color);
bypass->set_icon(get_theme_icon("AudioBusBypass", "EditorIcons"));
- bypass->add_theme_color_override("icon_color_pressed", bypass_color);
+ bypass->add_theme_color_override("icon_pressed_color", bypass_color);
bus_options->set_icon(get_theme_icon("GuiTabMenuHl", "EditorIcons"));
@@ -1191,9 +1191,9 @@ void EditorAudioBuses::_load_layout() {
}
void EditorAudioBuses::_load_default_layout() {
- String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout");
+ String layout_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout");
- Ref<AudioBusLayout> state = ResourceLoader::load(layout_path, "", true);
+ Ref<AudioBusLayout> state = ResourceLoader::load(layout_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE);
if (state.is_null()) {
EditorNode::get_singleton()->show_warning(vformat(TTR("There is no '%s' file."), layout_path));
return;
@@ -1209,7 +1209,7 @@ void EditorAudioBuses::_load_default_layout() {
void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
if (file_dialog->get_file_mode() == EditorFileDialog::FILE_MODE_OPEN_FILE) {
- Ref<AudioBusLayout> state = ResourceLoader::load(p_string, "", true);
+ Ref<AudioBusLayout> state = ResourceLoader::load(p_string, "", ResourceFormatLoader::CACHE_MODE_IGNORE);
if (state.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout."));
return;
@@ -1257,7 +1257,7 @@ EditorAudioBuses::EditorAudioBuses() {
add_child(top_hb);
file = memnew(Label);
- String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout");
+ String layout_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout");
file->set_text(String(TTR("Layout")) + ": " + layout_path.get_file());
file->set_clip_text(true);
file->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1313,7 +1313,7 @@ EditorAudioBuses::EditorAudioBuses() {
set_v_size_flags(SIZE_EXPAND_FILL);
- edited_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout");
+ edited_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout");
file_dialog = memnew(EditorFileDialog);
List<String> ext;
@@ -1330,7 +1330,7 @@ EditorAudioBuses::EditorAudioBuses() {
void EditorAudioBuses::open_layout(const String &p_path) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
- Ref<AudioBusLayout> state = ResourceLoader::load(p_path, "", true);
+ Ref<AudioBusLayout> state = ResourceLoader::load(p_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE);
if (state.is_null()) {
EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout."));
return;
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 1d3bd55ed3..213c3f5631 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -273,16 +273,6 @@ EditorPlugin *EditorData::get_editor(Object *p_object) {
return nullptr;
}
-EditorPlugin *EditorData::get_subeditor(Object *p_object) {
- for (int i = editor_plugins.size() - 1; i > -1; i--) {
- if (!editor_plugins[i]->has_main_screen() && editor_plugins[i]->handles(p_object)) {
- return editor_plugins[i];
- }
- }
-
- return nullptr;
-}
-
Vector<EditorPlugin *> EditorData::get_subeditors(Object *p_object) {
Vector<EditorPlugin *> sub_plugins;
for (int i = editor_plugins.size() - 1; i > -1; i--) {
@@ -510,6 +500,7 @@ int EditorData::add_edited_scene(int p_at_pos) {
EditedScene es;
es.root = nullptr;
es.path = String();
+ es.file_modified_time = 0;
es.history_current = -1;
es.version = 0;
es.live_edit_root = NodePath(String("/root"));
@@ -666,6 +657,10 @@ void EditorData::set_edited_scene_root(Node *p_root) {
p_root->set_filename(edited_scene[current_edited_scene].path);
}
}
+
+ if (edited_scene[current_edited_scene].path != "") {
+ edited_scene.write[current_edited_scene].file_modified_time = FileAccess::get_modified_time(edited_scene[current_edited_scene].path);
+ }
}
int EditorData::get_edited_scene_count() const {
@@ -697,6 +692,21 @@ uint64_t EditorData::get_scene_version(int p_idx) const {
return edited_scene[p_idx].version;
}
+void EditorData::set_scene_modified_time(int p_idx, uint64_t p_time) {
+ if (p_idx == -1) {
+ p_idx = current_edited_scene;
+ }
+
+ ERR_FAIL_INDEX(p_idx, edited_scene.size());
+
+ edited_scene.write[p_idx].file_modified_time = p_time;
+}
+
+uint64_t EditorData::get_scene_modified_time(int p_idx) const {
+ ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), 0);
+ return edited_scene[p_idx].file_modified_time;
+}
+
String EditorData::get_scene_type(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), String());
if (!edited_scene[p_idx].root) {
@@ -932,6 +942,14 @@ void EditorData::script_class_save_icon_paths() {
}
}
+ Dictionary old;
+ if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
+ old = ProjectSettings::get_singleton()->get("_global_script_class_icons");
+ }
+ if ((!old.is_empty() || d.is_empty()) && d.hash() == old.hash()) {
+ return;
+ }
+
if (d.is_empty()) {
if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
ProjectSettings::get_singleton()->clear("_global_script_class_icons");
diff --git a/editor/editor_data.h b/editor/editor_data.h
index d5c8c2a713..18b4137162 100644
--- a/editor/editor_data.h
+++ b/editor/editor_data.h
@@ -111,6 +111,7 @@ public:
struct EditedScene {
Node *root = nullptr;
String path;
+ uint64_t file_modified_time = 0;
Dictionary editor_states;
List<Node *> selection;
Vector<EditorHistory::History> history_stored;
@@ -144,7 +145,6 @@ private:
public:
EditorPlugin *get_editor(Object *p_object);
- EditorPlugin *get_subeditor(Object *p_object);
Vector<EditorPlugin *> get_subeditors(Object *p_object);
EditorPlugin *get_editor(String p_name);
@@ -191,6 +191,8 @@ public:
Ref<Script> get_scene_root_script(int p_idx) const;
void set_edited_scene_version(uint64_t version, int p_scene_idx = -1);
uint64_t get_scene_version(int p_idx) const;
+ void set_scene_modified_time(int p_idx, uint64_t p_time);
+ uint64_t get_scene_modified_time(int p_idx) const;
void clear_edited_scenes();
void set_edited_scene_live_edit_root(const NodePath &p_root);
NodePath get_edited_scene_live_edit_root();
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index dd3e81c8c0..949306de42 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1028,6 +1028,10 @@ Error EditorExportPlatform::_add_shared_object(void *p_userdata, const SharedObj
Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, const String &p_path, Vector<SharedObject> *p_so_files, bool p_embed, int64_t *r_embedded_start, int64_t *r_embedded_size) {
EditorProgress ep("savepack", TTR("Packing"), 102, true);
+ // Create the temporary export directory if it doesn't exist.
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ da->make_dir_recursive(EditorSettings::get_singleton()->get_cache_dir());
+
String tmppath = EditorSettings::get_singleton()->get_cache_dir().plus_file("packtmp");
FileAccess *ftmp = FileAccess::open(tmppath, FileAccess::WRITE);
ERR_FAIL_COND_V_MSG(!ftmp, ERR_CANT_CREATE, "Cannot create file '" + tmppath + "'.");
@@ -1399,9 +1403,9 @@ void EditorExport::add_export_preset(const Ref<EditorExportPreset> &p_preset, in
}
String EditorExportPlatform::test_etc2() const {
- String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
- bool etc_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc");
- bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2");
+ String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
+ bool etc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc");
+ bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/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.");
@@ -1413,9 +1417,9 @@ String EditorExportPlatform::test_etc2() const {
}
String EditorExportPlatform::test_etc2_or_pvrtc() const {
- String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
- bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2");
- bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc");
+ String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
+ bool etc2_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2");
+ bool pvrtc_supported = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc");
if (driver == "GLES2" && !pvrtc_supported) {
return TTR("Target platform requires 'PVRTC' texture compression for GLES2. Enable 'Import Pvrtc' in Project Settings.");
@@ -1898,7 +1902,7 @@ void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, con
return;
}
- bool convert = GLOBAL_GET("editor/convert_text_resources_to_binary_on_export");
+ bool convert = GLOBAL_GET("editor/export/convert_text_resources_to_binary");
if (!convert) {
return;
}
@@ -1918,5 +1922,5 @@ void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, con
}
EditorExportTextSceneToBinaryPlugin::EditorExportTextSceneToBinaryPlugin() {
- GLOBAL_DEF("editor/convert_text_resources_to_binary_on_export", false);
+ GLOBAL_DEF("editor/export/convert_text_resources_to_binary", false);
}
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index af02fcaf3c..bd00d86ec8 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -277,11 +277,7 @@ void EditorFeatureProfile::_bind_methods() {
BIND_ENUM_CONSTANT(FEATURE_MAX);
}
-EditorFeatureProfile::EditorFeatureProfile() {
- for (int i = 0; i < FEATURE_MAX; i++) {
- features_disabled[i] = false;
- }
-}
+EditorFeatureProfile::EditorFeatureProfile() {}
//////////////////////////
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 76814ea378..3c6649a66a 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -595,7 +595,7 @@ void EditorFileSystem::scan() {
return;
}
- if (scanning || scanning_changes || thread) {
+ if (scanning || scanning_changes || thread.is_started()) {
return;
}
@@ -619,13 +619,13 @@ void EditorFileSystem::scan() {
_queue_update_script_classes();
first_scan = false;
} else {
- ERR_FAIL_COND(thread);
+ ERR_FAIL_COND(thread.is_started());
set_process(true);
Thread::Settings s;
scanning = true;
scan_total = 0;
s.priority = Thread::PRIORITY_LOW;
- thread = Thread::create(_thread_func, this, s);
+ thread.start(_thread_func, this, s);
//tree->hide();
//progress->show();
}
@@ -1046,7 +1046,7 @@ void EditorFileSystem::_thread_func_sources(void *_userdata) {
void EditorFileSystem::scan_changes() {
if (first_scan || // Prevent a premature changes scan from inhibiting the first full scan
- scanning || scanning_changes || thread) {
+ scanning || scanning_changes || thread.is_started()) {
scan_changes_pending = true;
set_process(true);
return;
@@ -1076,12 +1076,12 @@ void EditorFileSystem::scan_changes() {
scanning_changes_done = true;
emit_signal("sources_changed", sources_changed.size() > 0);
} else {
- ERR_FAIL_COND(thread_sources);
+ ERR_FAIL_COND(thread_sources.is_started());
set_process(true);
scan_total = 0;
Thread::Settings s;
s.priority = Thread::PRIORITY_LOW;
- thread_sources = Thread::create(_thread_func_sources, this, s);
+ thread_sources.start(_thread_func_sources, this, s);
}
}
@@ -1092,17 +1092,14 @@ void EditorFileSystem::_notification(int p_what) {
} break;
case NOTIFICATION_EXIT_TREE: {
- Thread *active_thread = thread ? thread : thread_sources;
- if (use_threads && active_thread) {
+ Thread &active_thread = thread.is_started() ? thread : thread_sources;
+ if (use_threads && active_thread.is_started()) {
//abort thread if in progress
abort_scan = true;
while (scanning) {
OS::get_singleton()->delay_usec(1000);
}
- Thread::wait_to_finish(active_thread);
- memdelete(active_thread);
- thread = nullptr;
- thread_sources = nullptr;
+ active_thread.wait_to_finish();
WARN_PRINT("Scan thread aborted...");
set_process(false);
}
@@ -1125,9 +1122,7 @@ void EditorFileSystem::_notification(int p_what) {
set_process(false);
- Thread::wait_to_finish(thread_sources);
- memdelete(thread_sources);
- thread_sources = nullptr;
+ thread_sources.wait_to_finish();
if (_update_scan_actions()) {
emit_signal("filesystem_changed");
}
@@ -1135,7 +1130,7 @@ void EditorFileSystem::_notification(int p_what) {
_queue_update_script_classes();
first_scan = false;
}
- } else if (!scanning && thread) {
+ } else if (!scanning && thread.is_started()) {
set_process(false);
if (filesystem) {
@@ -1143,9 +1138,7 @@ void EditorFileSystem::_notification(int p_what) {
}
filesystem = new_filesystem;
new_filesystem = nullptr;
- Thread::wait_to_finish(thread);
- memdelete(thread);
- thread = nullptr;
+ thread.wait_to_finish();
_update_scan_actions();
emit_signal("filesystem_changed");
emit_signal("sources_changed", sources_changed.size() > 0);
@@ -1420,11 +1413,11 @@ void EditorFileSystem::_scan_script_classes(EditorFileSystemDirectory *p_dir) {
}
void EditorFileSystem::update_script_classes() {
- if (!update_script_classes_queued) {
+ if (!update_script_classes_queued.is_set()) {
return;
}
- update_script_classes_queued = false;
+ update_script_classes_queued.clear();
ScriptServer::global_classes_clear();
if (get_filesystem()) {
_scan_script_classes(get_filesystem());
@@ -1443,11 +1436,11 @@ void EditorFileSystem::update_script_classes() {
}
void EditorFileSystem::_queue_update_script_classes() {
- if (update_script_classes_queued) {
+ if (update_script_classes_queued.is_set()) {
return;
}
- update_script_classes_queued = true;
+ update_script_classes_queued.set();
call_deferred("update_script_classes");
}
@@ -2074,17 +2067,15 @@ void EditorFileSystem::_update_extensions() {
EditorFileSystem::EditorFileSystem() {
ResourceLoader::import = _resource_import;
- reimport_on_missing_imported_files = GLOBAL_DEF("editor/reimport_missing_imported_files", true);
+ reimport_on_missing_imported_files = GLOBAL_DEF("editor/import/reimport_missing_imported_files", true);
singleton = this;
filesystem = memnew(EditorFileSystemDirectory); //like, empty
filesystem->parent = nullptr;
- thread = nullptr;
scanning = false;
importing = false;
use_threads = true;
- thread_sources = nullptr;
new_filesystem = nullptr;
abort_scan = false;
@@ -2100,7 +2091,7 @@ EditorFileSystem::EditorFileSystem() {
memdelete(da);
scan_total = 0;
- update_script_classes_queued = false;
+ update_script_classes_queued.clear();
first_scan = true;
scan_changes_pending = false;
revalidate_import_files = false;
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index c0e11a0402..dec2330256 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -34,6 +34,7 @@
#include "core/os/dir_access.h"
#include "core/os/thread.h"
#include "core/os/thread_safe.h"
+#include "core/templates/safe_refcount.h"
#include "core/templates/set.h"
#include "scene/main/node.h"
class FileAccess;
@@ -127,7 +128,7 @@ class EditorFileSystem : public Node {
};
bool use_threads;
- Thread *thread;
+ Thread thread;
static void _thread_func(void *_userdata);
EditorFileSystemDirectory *new_filesystem;
@@ -189,7 +190,7 @@ class EditorFileSystem : public Node {
void _scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess *da, const ScanProgress &p_progress);
- Thread *thread_sources;
+ Thread thread_sources;
bool scanning_changes;
bool scanning_changes_done;
@@ -220,7 +221,7 @@ class EditorFileSystem : public Node {
};
void _scan_script_classes(EditorFileSystemDirectory *p_dir);
- volatile bool update_script_classes_queued;
+ SafeFlag update_script_classes_queued;
void _queue_update_script_classes();
String _get_global_script_class(const String &p_type, const String &p_path, String *r_extends, String *r_icon_path) const;
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp
index 9f98795e16..97a2c67c26 100644
--- a/editor/editor_folding.cpp
+++ b/editor/editor_folding.cpp
@@ -259,13 +259,17 @@ void EditorFolding::_do_object_unfolds(Object *p_object, Set<RES> &resources) {
}
}
}
- }
- if (E->get().type == Variant::OBJECT) {
- RES res = p_object->get(E->get().name);
- if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) {
- resources.insert(res);
- _do_object_unfolds(res.ptr(), resources);
+ if (E->get().type == Variant::OBJECT) {
+ RES res = p_object->get(E->get().name);
+ print_line("res: " + String(E->get().name) + " valid " + itos(res.is_valid()));
+ if (res.is_valid()) {
+ print_line("path " + res->get_path());
+ }
+ if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) {
+ resources.insert(res);
+ _do_object_unfolds(res.ptr(), resources);
+ }
}
}
}
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 135c40a851..283713cd3c 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1331,11 +1331,11 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
Ref<Font> doc_code_font = p_rt->get_theme_font("doc_source", "EditorFonts");
Ref<Font> doc_kbd_font = p_rt->get_theme_font("doc_keyboard", "EditorFonts");
- Color font_color_hl = p_rt->get_theme_color("headline_color", "EditorHelp");
+ Color headline_color = p_rt->get_theme_color("headline_color", "EditorHelp");
Color accent_color = p_rt->get_theme_color("accent_color", "Editor");
Color property_color = p_rt->get_theme_color("property_color", "Editor");
- Color link_color = accent_color.lerp(font_color_hl, 0.8);
- Color code_color = accent_color.lerp(font_color_hl, 0.6);
+ Color link_color = accent_color.lerp(headline_color, 0.8);
+ Color code_color = accent_color.lerp(headline_color, 0.6);
Color kbd_color = accent_color.lerp(property_color, 0.6);
String bbcode = p_bbcode.dedent().replace("\t", "").replace("\r", "").strip_edges();
@@ -1481,7 +1481,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
tag_stack.push_front(tag);
} else if (tag == "i") {
//use italics font
- p_rt->push_color(font_color_hl);
+ p_rt->push_color(headline_color);
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag == "code" || tag == "codeblock") {
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index df330d8685..60071f6263 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -81,7 +81,7 @@ Size2 EditorProperty::get_minimum_size() const {
}
if (bottom_editor != nullptr && bottom_editor->is_visible()) {
- ms.height += get_theme_constant("vseparation", "Tree");
+ ms.height += get_theme_constant("vseparation");
Size2 bems = bottom_editor->get_combined_minimum_size();
//bems.width += get_constant("item_margin", "Tree");
ms.height += bems.height;
@@ -95,6 +95,7 @@ void EditorProperty::emit_changed(const StringName &p_property, const Variant &p
Variant args[4] = { p_property, p_value, p_field, p_changing };
const Variant *argptrs[4] = { &args[0], &args[1], &args[2], &args[3] };
+ cache[p_property] = p_value;
emit_signal("property_changed", (const Variant **)argptrs, 4);
}
@@ -148,7 +149,7 @@ void EditorProperty::_notification(int p_what) {
if (bottom_editor) {
int m = 0; //get_constant("item_margin", "Tree");
- bottom_rect = Rect2(m, rect.size.height + get_theme_constant("vseparation", "Tree"), size.width - m, bottom_editor->get_combined_minimum_size().height);
+ bottom_rect = Rect2(m, rect.size.height + get_theme_constant("vseparation"), size.width - m, bottom_editor->get_combined_minimum_size().height);
}
if (keying) {
@@ -225,11 +226,15 @@ void EditorProperty::_notification(int p_what) {
size.height = label_reference->get_size().height;
}
+ Ref<StyleBox> sb;
if (selected) {
- Ref<StyleBox> sb = get_theme_stylebox("selected", "Tree");
- draw_style_box(sb, Rect2(Vector2(), size));
+ sb = get_theme_stylebox("bg_selected");
+ } else {
+ sb = get_theme_stylebox("bg");
}
+ draw_style_box(sb, Rect2(Vector2(), size));
+
if (draw_top_bg && right_child_rect != Rect2()) {
draw_rect(right_child_rect, dark_color);
}
@@ -239,15 +244,15 @@ void EditorProperty::_notification(int p_what) {
Color color;
if (draw_red) {
- color = get_theme_color("error_color", "Editor");
+ color = get_theme_color("error_color");
} else {
- color = get_theme_color("property_color", "Editor");
+ color = get_theme_color("property_color");
}
if (label.find(".") != -1) {
color.a = 0.5; //this should be un-hacked honestly, as it's used for editor overrides
}
- int ofs = 0;
+ int ofs = get_theme_constant("font_offset");
int text_limit = text_size;
if (checkable) {
@@ -805,6 +810,28 @@ void EditorProperty::set_bottom_editor(Control *p_control) {
bottom_editor = p_control;
}
+bool EditorProperty::is_cache_valid() const {
+ if (object) {
+ for (Map<StringName, Variant>::Element *E = cache.front(); E; E = E->next()) {
+ bool valid;
+ Variant value = object->get(E->key(), &valid);
+ if (!valid || value != E->get()) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+void EditorProperty::update_cache() {
+ cache.clear();
+ if (object && property != StringName()) {
+ bool valid;
+ Variant value = object->get(property, &valid);
+ if (valid) {
+ cache[property] = value;
+ }
+ }
+}
Variant EditorProperty::get_drag_data(const Point2 &p_point) {
if (property == StringName()) {
return Variant();
@@ -1524,6 +1551,7 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit
ep->update_property();
ep->update_reload_status();
ep->set_deletable(deletable_properties);
+ ep->update_cache();
}
}
ped->added_editors.clear();
@@ -1661,7 +1689,7 @@ void EditorInspector::update_tree() {
bool valid = true;
//if no properties in category, skip
while (N) {
- if (N->get().usage & PROPERTY_USAGE_EDITOR) {
+ if (N->get().usage & PROPERTY_USAGE_EDITOR && (!restrict_to_basic || (N->get().usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) {
break;
}
if (N->get().usage & PROPERTY_USAGE_CATEGORY) {
@@ -1729,7 +1757,7 @@ void EditorInspector::update_tree() {
continue;
- } else if (!(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name)) {
+ } else if (!(p.usage & PROPERTY_USAGE_EDITOR) || _is_property_disabled_by_feature_profile(p.name) || (restrict_to_basic && !(p.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) {
continue;
}
@@ -1982,6 +2010,7 @@ void EditorInspector::update_tree() {
}
ep->update_property();
ep->update_reload_status();
+ ep->update_cache();
if (current_selected && ep->property == current_selected) {
ep->select(current_focusable);
@@ -2012,6 +2041,7 @@ void EditorInspector::update_property(const String &p_prop) {
for (List<EditorProperty *>::Element *E = editor_property_map[p_prop].front(); E; E = E->next()) {
E->get()->update_property();
E->get()->update_reload_status();
+ E->get()->update_cache();
}
}
@@ -2027,13 +2057,6 @@ void EditorInspector::_clear() {
restart_request_props.clear();
}
-void EditorInspector::refresh() {
- if (refresh_countdown > 0 || changing) {
- return;
- }
- refresh_countdown = EditorSettings::get_singleton()->get("docks/property_editor/auto_refresh_interval");
-}
-
Object *EditorInspector::get_edited_object() {
return object;
}
@@ -2044,7 +2067,7 @@ void EditorInspector::edit(Object *p_object) {
}
if (object) {
_clear();
- object->remove_change_receptor(this);
+ object->disconnect("property_list_changed", callable_mp(this, &EditorInspector::_changed_callback));
}
object = p_object;
@@ -2054,7 +2077,7 @@ void EditorInspector::edit(Object *p_object) {
if (scroll_cache.has(object->get_instance_id())) { //if exists, set something else
update_scroll_request = scroll_cache[object->get_instance_id()]; //done this way because wait until full size is accommodated
}
- object->add_change_receptor(this);
+ object->connect("property_list_changed", callable_mp(this, &EditorInspector::_changed_callback));
update_tree();
}
}
@@ -2161,17 +2184,30 @@ void EditorInspector::set_use_wide_editors(bool p_enable) {
wide_editors = p_enable;
}
+void EditorInspector::_update_inspector_bg() {
+ if (sub_inspector) {
+ int count_subinspectors = 0;
+ Node *n = get_parent();
+ while (n) {
+ EditorInspector *ei = Object::cast_to<EditorInspector>(n);
+ if (ei && ei->sub_inspector) {
+ count_subinspectors++;
+ }
+ n = n->get_parent();
+ }
+ count_subinspectors = MIN(15, count_subinspectors);
+ add_theme_style_override("bg", get_theme_stylebox("sub_inspector_bg" + itos(count_subinspectors), "Editor"));
+ } else {
+ add_theme_style_override("bg", get_theme_stylebox("bg", "Tree"));
+ }
+}
void EditorInspector::set_sub_inspector(bool p_enable) {
sub_inspector = p_enable;
if (!is_inside_tree()) {
return;
}
- if (sub_inspector) {
- add_theme_style_override("bg", get_theme_stylebox("sub_inspector_bg", "Editor"));
- } else {
- add_theme_style_override("bg", get_theme_stylebox("bg", "Tree"));
- }
+ _update_inspector_bg();
}
void EditorInspector::set_use_deletable_properties(bool p_enabled) {
@@ -2351,6 +2387,7 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) {
for (List<EditorProperty *>::Element *E = editor_property_map[p_path].front(); E; E = E->next()) {
E->get()->update_property();
E->get()->update_reload_status();
+ E->get()->update_cache();
}
}
@@ -2394,13 +2431,12 @@ void EditorInspector::_node_removed(Node *p_node) {
void EditorInspector::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
EditorFeatureProfileManager::get_singleton()->connect("current_feature_profile_changed", callable_mp(this, &EditorInspector::_feature_profile_changed));
+ set_process(is_visible_in_tree());
}
if (p_what == NOTIFICATION_ENTER_TREE) {
- if (sub_inspector) {
- add_theme_style_override("bg", get_theme_stylebox("sub_inspector_bg", "Editor"));
- } else {
- add_theme_style_override("bg", get_theme_stylebox("bg", "Tree"));
+ _update_inspector_bg();
+ if (!sub_inspector) {
get_tree()->connect("node_removed", callable_mp(this, &EditorInspector::_node_removed));
}
}
@@ -2414,6 +2450,10 @@ void EditorInspector::_notification(int p_what) {
edit(nullptr);
}
+ if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+ set_process(is_visible_in_tree());
+ }
+
if (p_what == NOTIFICATION_PROCESS) {
if (update_scroll_request >= 0) {
get_v_scrollbar()->call_deferred("set_value", update_scroll_request);
@@ -2424,10 +2464,14 @@ void EditorInspector::_notification(int p_what) {
if (refresh_countdown <= 0) {
for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) {
for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) {
- E->get()->update_property();
- E->get()->update_reload_status();
+ if (!E->get()->is_cache_valid()) {
+ E->get()->update_property();
+ E->get()->update_reload_status();
+ E->get()->update_cache();
+ }
}
}
+ refresh_countdown = float(EditorSettings::get_singleton()->get("docks/property_editor/auto_refresh_interval"));
}
}
@@ -2445,6 +2489,7 @@ void EditorInspector::_notification(int p_what) {
for (List<EditorProperty *>::Element *E = editor_property_map[prop].front(); E; E = E->next()) {
E->get()->update_property();
E->get()->update_reload_status();
+ E->get()->update_cache();
}
}
pending.erase(pending.front());
@@ -2455,19 +2500,17 @@ void EditorInspector::_notification(int p_what) {
}
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
- if (sub_inspector) {
- add_theme_style_override("bg", get_theme_stylebox("sub_inspector_bg", "Editor"));
- } else if (is_inside_tree()) {
- add_theme_style_override("bg", get_theme_stylebox("bg", "Tree"));
- }
+ _update_inspector_bg();
update_tree();
}
}
-void EditorInspector::_changed_callback(Object *p_changed, const char *p_prop) {
- //this is called when property change is notified via _change_notify()
- _edit_request_change(p_changed, p_prop);
+void EditorInspector::_changed_callback() {
+ //this is called when property change is notified via notify_property_list_changed()
+ if (object != nullptr) {
+ _edit_request_change(object, String());
+ }
}
void EditorInspector::_vscroll_changed(double p_offset) {
@@ -2506,22 +2549,11 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li
return;
}
- List<StringName> classes;
- Map<StringName, String> paths;
+ List<Ref<Script>> classes;
// NodeC -> NodeB -> NodeA
while (script.is_valid()) {
- String n = EditorNode::get_editor_data().script_class_get_name(script->get_path());
- if (n.length()) {
- classes.push_front(n);
- } else if (script->get_path() != String() && script->get_path().find("::") == -1) {
- n = script->get_path().get_file();
- classes.push_front(n);
- } else {
- n = TTR("Built-in script");
- classes.push_front(n);
- }
- paths[n] = script->get_path();
+ classes.push_front(script);
script = script->get_base_script();
}
@@ -2545,17 +2577,18 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li
}
Set<StringName> added;
- for (List<StringName>::Element *E = classes.front(); E; E = E->next()) {
- StringName name = E->get();
- String path = paths[name];
- Ref<Script> s;
- if (path == String()) {
- // Built-in script. It can't be inherited, so must be the script attached to the object.
- s = p_object.get_script();
- } else {
- s = ResourceLoader::load(path, "Script");
+ for (List<Ref<Script>>::Element *E = classes.front(); E; E = E->next()) {
+ Ref<Script> s = E->get();
+ String path = s->get_path();
+ String name = EditorNode::get_editor_data().script_class_get_name(path);
+ if (name.is_empty()) {
+ if (!path.is_empty() && path.find("::") == -1) {
+ name = path.get_file();
+ } else {
+ name = TTR("Built-in script");
+ }
}
- ERR_FAIL_COND(!s->is_valid());
+
List<PropertyInfo> props;
s->get_script_property_list(&props);
@@ -2587,11 +2620,14 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li
r_list.erase(bottom);
}
+void EditorInspector::set_restrict_to_basic_settings(bool p_restrict) {
+ restrict_to_basic = p_restrict;
+ update_tree();
+}
+
void EditorInspector::_bind_methods() {
ClassDB::bind_method("_edit_request_change", &EditorInspector::_edit_request_change);
- ClassDB::bind_method("refresh", &EditorInspector::refresh);
-
ADD_SIGNAL(MethodInfo("property_selected", PropertyInfo(Variant::STRING, "property")));
ADD_SIGNAL(MethodInfo("property_keyed", PropertyInfo(Variant::STRING, "property")));
ADD_SIGNAL(MethodInfo("property_deleted", PropertyInfo(Variant::STRING, "property")));
@@ -2623,16 +2659,21 @@ EditorInspector::EditorInspector() {
use_folding = false;
update_all_pending = false;
update_tree_pending = false;
- refresh_countdown = 0;
read_only = false;
search_box = nullptr;
keying = false;
_prop_edited = "property_edited";
- set_process(true);
+ set_process(false);
property_focusable = -1;
sub_inspector = false;
deletable_properties = false;
get_v_scrollbar()->connect("value_changed", callable_mp(this, &EditorInspector::_vscroll_changed));
update_scroll_request = -1;
+ if (EditorSettings::get_singleton()) {
+ refresh_countdown = float(EditorSettings::get_singleton()->get("docks/property_editor/auto_refresh_interval"));
+ } else {
+ //used when class is created by the docgen to dump default values of everything bindable, editorsettings may not be created
+ refresh_countdown = 0.33;
+ }
}
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index 81a22d4ff1..18250780be 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -98,6 +98,8 @@ private:
mutable String tooltip_text;
+ Map<StringName, Variant> cache;
+
protected:
void _notification(int p_what);
static void _bind_methods();
@@ -152,6 +154,8 @@ public:
virtual void collapse_all_folding();
virtual Variant get_drag_data(const Point2 &p_point) override;
+ virtual void update_cache();
+ virtual bool is_cache_valid() const;
void set_selectable(bool p_selectable);
bool is_selectable() const;
@@ -309,6 +313,8 @@ class EditorInspector : public ScrollContainer {
String property_prefix; //used for sectioned inspector
String object_class;
+ bool restrict_to_basic = false;
+
void _edit_set(const String &p_name, const Variant &p_value, bool p_refresh_all, const String &p_changed_field);
void _property_changed(const String &p_path, const Variant &p_value, const String &p_name = "", bool p_changing = false);
@@ -326,7 +332,7 @@ class EditorInspector : public ScrollContainer {
void _node_removed(Node *p_node);
- void _changed_callback(Object *p_changed, const char *p_prop) override;
+ void _changed_callback();
void _edit_request_change(Object *p_object, const String &p_prop);
void _filter_changed(const String &p_text);
@@ -339,6 +345,8 @@ class EditorInspector : public ScrollContainer {
bool _is_property_disabled_by_feature_profile(const StringName &p_property);
+ void _update_inspector_bg();
+
protected:
static void _bind_methods();
void _notification(int p_what);
@@ -356,9 +364,6 @@ public:
void update_tree();
void update_property(const String &p_prop);
-
- void refresh();
-
void edit(Object *p_object);
Object *get_edited_object();
@@ -393,9 +398,12 @@ public:
void set_use_wide_editors(bool p_enable);
void set_sub_inspector(bool p_enable);
+ bool is_sub_inspector() const { return sub_inspector; }
void set_use_deletable_properties(bool p_enabled);
+ void set_restrict_to_basic_settings(bool p_restrict);
+
EditorInspector();
};
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index f5260f773d..ec8430e645 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -430,6 +430,74 @@ void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) {
}
}
+void EditorNode::_update_from_settings() {
+ int current_filter = GLOBAL_GET("rendering/textures/canvas_textures/default_texture_filter");
+ if (current_filter != scene_root->get_default_canvas_item_texture_filter()) {
+ Viewport::DefaultCanvasItemTextureFilter tf = (Viewport::DefaultCanvasItemTextureFilter)current_filter;
+ scene_root->set_default_canvas_item_texture_filter(tf);
+ }
+ int current_repeat = GLOBAL_GET("rendering/textures/canvas_textures/default_texture_repeat");
+ if (current_repeat != scene_root->get_default_canvas_item_texture_repeat()) {
+ Viewport::DefaultCanvasItemTextureRepeat tr = (Viewport::DefaultCanvasItemTextureRepeat)current_repeat;
+ scene_root->set_default_canvas_item_texture_repeat(tr);
+ }
+
+ RS::DOFBokehShape dof_shape = RS::DOFBokehShape(int(GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_bokeh_shape")));
+ RS::get_singleton()->camera_effects_set_dof_blur_bokeh_shape(dof_shape);
+ RS::DOFBlurQuality dof_quality = RS::DOFBlurQuality(int(GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_bokeh_quality")));
+ bool dof_jitter = GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_use_jitter");
+ RS::get_singleton()->camera_effects_set_dof_blur_quality(dof_quality, dof_jitter);
+ RS::get_singleton()->environment_set_ssao_quality(RS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/environment/ssao/quality"))), GLOBAL_GET("rendering/environment/ssao/half_size"), GLOBAL_GET("rendering/environment/ssao/adaptive_target"), GLOBAL_GET("rendering/environment/ssao/blur_passes"), GLOBAL_GET("rendering/environment/ssao/fadeout_from"), GLOBAL_GET("rendering/environment/ssao/fadeout_to"));
+ RS::get_singleton()->screen_space_roughness_limiter_set_active(GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/enabled"), GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/amount"), GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/limit"));
+ bool glow_bicubic = int(GLOBAL_GET("rendering/environment/glow/upscale_mode")) > 0;
+ RS::get_singleton()->environment_glow_set_use_bicubic_upscale(glow_bicubic);
+ bool glow_high_quality = GLOBAL_GET("rendering/environment/glow/use_high_quality");
+ RS::get_singleton()->environment_glow_set_use_high_quality(glow_high_quality);
+ RS::EnvironmentSSRRoughnessQuality ssr_roughness_quality = RS::EnvironmentSSRRoughnessQuality(int(GLOBAL_GET("rendering/environment/screen_space_reflection/roughness_quality")));
+ RS::get_singleton()->environment_set_ssr_roughness_quality(ssr_roughness_quality);
+ RS::SubSurfaceScatteringQuality sss_quality = RS::SubSurfaceScatteringQuality(int(GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_quality")));
+ RS::get_singleton()->sub_surface_scattering_set_quality(sss_quality);
+ float sss_scale = GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_scale");
+ float sss_depth_scale = GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale");
+ RS::get_singleton()->sub_surface_scattering_set_scale(sss_scale, sss_depth_scale);
+
+ uint32_t directional_shadow_size = GLOBAL_GET("rendering/shadows/directional_shadow/size");
+ uint32_t directional_shadow_16_bits = GLOBAL_GET("rendering/shadows/directional_shadow/16_bits");
+ RS::get_singleton()->directional_shadow_atlas_set_size(directional_shadow_size, directional_shadow_16_bits);
+
+ RS::ShadowQuality shadows_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/shadows/soft_shadow_quality")));
+ RS::get_singleton()->shadows_quality_set(shadows_quality);
+ RS::ShadowQuality directional_shadow_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/directional_shadow/soft_shadow_quality")));
+ RS::get_singleton()->directional_shadow_quality_set(directional_shadow_quality);
+ float probe_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed");
+ RS::get_singleton()->lightmap_set_probe_capture_update_speed(probe_update_speed);
+ RS::EnvironmentSDFGIFramesToConverge frames_to_converge = RS::EnvironmentSDFGIFramesToConverge(int(GLOBAL_GET("rendering/global_illumination/sdfgi/frames_to_converge")));
+ RS::get_singleton()->environment_set_sdfgi_frames_to_converge(frames_to_converge);
+ RS::EnvironmentSDFGIRayCount ray_count = RS::EnvironmentSDFGIRayCount(int(GLOBAL_GET("rendering/global_illumination/sdfgi/probe_ray_count")));
+ RS::get_singleton()->environment_set_sdfgi_ray_count(ray_count);
+ RS::GIProbeQuality gi_probe_quality = RS::GIProbeQuality(int(GLOBAL_GET("rendering/global_illumination/gi_probes/quality")));
+ RS::get_singleton()->gi_probe_set_quality(gi_probe_quality);
+ RS::get_singleton()->environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/environment/volumetric_fog/volume_size"), GLOBAL_GET("rendering/environment/volumetric_fog/volume_depth"));
+ RS::get_singleton()->environment_set_volumetric_fog_filter_active(bool(GLOBAL_GET("rendering/environment/volumetric_fog/use_filter")));
+ RS::get_singleton()->canvas_set_shadow_texture_size(GLOBAL_GET("rendering/2d/shadow_atlas/size"));
+
+ bool use_half_res_gi = GLOBAL_DEF("rendering/global_illumination/gi/use_half_resolution", false);
+ RS::get_singleton()->gi_set_use_half_resolution(use_half_res_gi);
+
+ bool snap_2d_transforms = GLOBAL_GET("rendering/2d/snap/snap_2d_transforms_to_pixel");
+ scene_root->set_snap_2d_transforms_to_pixel(snap_2d_transforms);
+ bool snap_2d_vertices = GLOBAL_GET("rendering/2d/snap/snap_2d_vertices_to_pixel");
+ scene_root->set_snap_2d_vertices_to_pixel(snap_2d_vertices);
+
+ Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_GET("rendering/2d/sdf/oversize")));
+ scene_root->set_sdf_oversize(sdf_oversize);
+ Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_GET("rendering/2d/sdf/scale")));
+ scene_root->set_sdf_scale(sdf_scale);
+
+ float lod_threshold = GLOBAL_GET("rendering/mesh_lod/lod_change/threshold_pixels");
+ scene_root->set_lod_threshold(lod_threshold);
+}
+
void EditorNode::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_PROCESS: {
@@ -468,69 +536,13 @@ void EditorNode::_notification(int p_what) {
editor_selection->update();
- { //TODO should only happen on settings changed
- int current_filter = GLOBAL_GET("rendering/canvas_textures/default_texture_filter");
- if (current_filter != scene_root->get_default_canvas_item_texture_filter()) {
- Viewport::DefaultCanvasItemTextureFilter tf = (Viewport::DefaultCanvasItemTextureFilter)current_filter;
- scene_root->set_default_canvas_item_texture_filter(tf);
- }
- int current_repeat = GLOBAL_GET("rendering/canvas_textures/default_texture_repeat");
- if (current_repeat != scene_root->get_default_canvas_item_texture_repeat()) {
- Viewport::DefaultCanvasItemTextureRepeat tr = (Viewport::DefaultCanvasItemTextureRepeat)current_repeat;
- scene_root->set_default_canvas_item_texture_repeat(tr);
- }
+ ResourceImporterTexture::get_singleton()->update_imports();
- RS::DOFBokehShape dof_shape = RS::DOFBokehShape(int(GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_bokeh_shape")));
- RS::get_singleton()->camera_effects_set_dof_blur_bokeh_shape(dof_shape);
- RS::DOFBlurQuality dof_quality = RS::DOFBlurQuality(int(GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_bokeh_quality")));
- bool dof_jitter = GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_use_jitter");
- RS::get_singleton()->camera_effects_set_dof_blur_quality(dof_quality, dof_jitter);
- RS::get_singleton()->environment_set_ssao_quality(RS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/quality/ssao/quality"))), GLOBAL_GET("rendering/quality/ssao/half_size"), GLOBAL_GET("rendering/quality/ssao/adaptive_target"), GLOBAL_GET("rendering/quality/ssao/blur_passes"), GLOBAL_GET("rendering/quality/ssao/fadeout_from"), GLOBAL_GET("rendering/quality/ssao/fadeout_to"));
- RS::get_singleton()->screen_space_roughness_limiter_set_active(GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_enabled"), GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_amount"), GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_limit"));
- bool glow_bicubic = int(GLOBAL_GET("rendering/quality/glow/upscale_mode")) > 0;
- RS::get_singleton()->environment_glow_set_use_bicubic_upscale(glow_bicubic);
- bool glow_high_quality = GLOBAL_GET("rendering/quality/glow/use_high_quality");
- RS::get_singleton()->environment_glow_set_use_high_quality(glow_high_quality);
- RS::EnvironmentSSRRoughnessQuality ssr_roughness_quality = RS::EnvironmentSSRRoughnessQuality(int(GLOBAL_GET("rendering/quality/screen_space_reflection/roughness_quality")));
- RS::get_singleton()->environment_set_ssr_roughness_quality(ssr_roughness_quality);
- RS::SubSurfaceScatteringQuality sss_quality = RS::SubSurfaceScatteringQuality(int(GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_quality")));
- RS::get_singleton()->sub_surface_scattering_set_quality(sss_quality);
- float sss_scale = GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_scale");
- float sss_depth_scale = GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale");
- RS::get_singleton()->sub_surface_scattering_set_scale(sss_scale, sss_depth_scale);
- RS::ShadowQuality shadows_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/quality/shadows/soft_shadow_quality")));
- RS::get_singleton()->shadows_quality_set(shadows_quality);
- RS::ShadowQuality directional_shadow_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/quality/directional_shadow/soft_shadow_quality")));
- RS::get_singleton()->directional_shadow_quality_set(directional_shadow_quality);
- float probe_update_speed = GLOBAL_GET("rendering/lightmapper/probe_capture_update_speed");
- RS::get_singleton()->lightmap_set_probe_capture_update_speed(probe_update_speed);
- RS::EnvironmentSDFGIFramesToConverge frames_to_converge = RS::EnvironmentSDFGIFramesToConverge(int(GLOBAL_GET("rendering/sdfgi/frames_to_converge")));
- RS::get_singleton()->environment_set_sdfgi_frames_to_converge(frames_to_converge);
- RS::EnvironmentSDFGIRayCount ray_count = RS::EnvironmentSDFGIRayCount(int(GLOBAL_GET("rendering/sdfgi/probe_ray_count")));
- RS::get_singleton()->environment_set_sdfgi_ray_count(ray_count);
- RS::GIProbeQuality gi_probe_quality = RS::GIProbeQuality(int(GLOBAL_GET("rendering/quality/gi_probes/quality")));
- RS::get_singleton()->gi_probe_set_quality(gi_probe_quality);
- RS::get_singleton()->environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/volumetric_fog/volume_size"), GLOBAL_GET("rendering/volumetric_fog/volume_depth"));
- RS::get_singleton()->environment_set_volumetric_fog_filter_active(bool(GLOBAL_GET("rendering/volumetric_fog/use_filter")));
- RS::get_singleton()->environment_set_volumetric_fog_directional_shadow_shrink_size(GLOBAL_GET("rendering/volumetric_fog/directional_shadow_shrink"));
- RS::get_singleton()->environment_set_volumetric_fog_positional_shadow_shrink_size(GLOBAL_GET("rendering/volumetric_fog/positional_shadow_shrink"));
- RS::get_singleton()->canvas_set_shadow_texture_size(GLOBAL_GET("rendering/quality/2d_shadow_atlas/size"));
-
- bool snap_2d_transforms = GLOBAL_GET("rendering/quality/2d/snap_2d_transforms_to_pixel");
- scene_root->set_snap_2d_transforms_to_pixel(snap_2d_transforms);
- bool snap_2d_vertices = GLOBAL_GET("rendering/quality/2d/snap_2d_vertices_to_pixel");
- scene_root->set_snap_2d_vertices_to_pixel(snap_2d_vertices);
-
- Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_GET("rendering/quality/2d_sdf/oversize")));
- scene_root->set_sdf_oversize(sdf_oversize);
- Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_GET("rendering/quality/2d_sdf/scale")));
- scene_root->set_sdf_scale(sdf_scale);
-
- float lod_threshold = GLOBAL_GET("rendering/quality/mesh_lod/threshold_pixels");
- scene_root->set_lod_threshold(lod_threshold);
+ if (settings_changed) {
+ _update_from_settings();
+ settings_changed = false;
+ emit_signal("project_settings_changed");
}
-
- ResourceImporterTexture::get_singleton()->update_imports();
} break;
case NOTIFICATION_ENTER_TREE: {
@@ -588,6 +600,7 @@ void EditorNode::_notification(int p_what) {
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/low_processor_mode_sleep_usec")));
EditorFileSystem::get_singleton()->scan_changes();
+ _scan_external_changes();
} break;
case NOTIFICATION_APPLICATION_FOCUS_OUT: {
@@ -613,8 +626,8 @@ void EditorNode::_notification(int p_what) {
gui_base->add_theme_style_override("panel", gui_base->get_theme_stylebox("Background", "EditorStyles"));
scene_root_parent->add_theme_style_override("panel", gui_base->get_theme_stylebox("Content", "EditorStyles"));
bottom_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox("panel", "TabContainer"));
- scene_tabs->add_theme_style_override("tab_fg", gui_base->get_theme_stylebox("SceneTabFG", "EditorStyles"));
- scene_tabs->add_theme_style_override("tab_bg", gui_base->get_theme_stylebox("SceneTabBG", "EditorStyles"));
+ scene_tabs->add_theme_style_override("tab_selected", gui_base->get_theme_stylebox("SceneTabFG", "EditorStyles"));
+ scene_tabs->add_theme_style_override("tab_unselected", gui_base->get_theme_stylebox("SceneTabBG", "EditorStyles"));
file_menu->add_theme_style_override("hover", gui_base->get_theme_stylebox("MenuHover", "EditorStyles"));
project_menu->add_theme_style_override("hover", gui_base->get_theme_stylebox("MenuHover", "EditorStyles"));
@@ -880,6 +893,82 @@ void EditorNode::_sources_changed(bool p_exist) {
}
}
+void EditorNode::_scan_external_changes() {
+ disk_changed_list->clear();
+ TreeItem *r = disk_changed_list->create_item();
+ disk_changed_list->set_hide_root(true);
+ bool need_reload = false;
+
+ // Check if any edited scene has changed.
+
+ for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
+ if (editor_data.get_scene_path(i) == "") {
+ continue;
+ }
+
+ uint64_t last_date = editor_data.get_scene_modified_time(i);
+ uint64_t date = FileAccess::get_modified_time(editor_data.get_scene_path(i));
+
+ if (date > last_date) {
+ TreeItem *ti = disk_changed_list->create_item(r);
+ ti->set_text(0, editor_data.get_scene_path(i).get_file());
+ need_reload = true;
+ }
+ }
+
+ String project_settings_path = ProjectSettings::get_singleton()->get_resource_path().plus_file("project.godot");
+ if (FileAccess::get_modified_time(project_settings_path) > ProjectSettings::get_singleton()->get_last_saved_time()) {
+ TreeItem *ti = disk_changed_list->create_item(r);
+ ti->set_text(0, "project.godot");
+ need_reload = true;
+ }
+
+ if (need_reload) {
+ disk_changed->call_deferred("popup_centered_ratio", 0.5);
+ }
+}
+
+void EditorNode::_resave_scenes(String p_str) {
+ save_all_scenes();
+ ProjectSettings::get_singleton()->save();
+ disk_changed->hide();
+}
+
+void EditorNode::_reload_modified_scenes() {
+ int current_idx = editor_data.get_edited_scene();
+
+ for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
+ if (editor_data.get_scene_path(i) == "") {
+ continue;
+ }
+
+ uint64_t last_date = editor_data.get_scene_modified_time(i);
+ uint64_t date = FileAccess::get_modified_time(editor_data.get_scene_path(i));
+
+ if (date > last_date) {
+ String filename = editor_data.get_scene_path(i);
+ editor_data.set_edited_scene(i);
+ _remove_edited_scene(false);
+
+ Error err = load_scene(filename, false, false, true, false, true);
+ if (err != OK) {
+ ERR_PRINT(vformat("Failed to load scene: %s", filename));
+ }
+ editor_data.move_edited_scene_to_index(i);
+ }
+ }
+
+ get_undo_redo()->clear_history(false);
+ set_current_scene(current_idx);
+ _update_scene_tabs();
+ disk_changed->hide();
+}
+
+void EditorNode::_reload_project_settings() {
+ ProjectSettings::get_singleton()->setup(ProjectSettings::get_singleton()->get_resource_path(), String(), true);
+ settings_changed = true;
+}
+
void EditorNode::_vp_resized() {
}
@@ -921,7 +1010,7 @@ Error EditorNode::load_resource(const String &p_resource, bool p_ignore_broken_d
dependency_errors.clear();
Error err;
- RES res = ResourceLoader::load(p_resource, "", false, &err);
+ RES res = ResourceLoader::load(p_resource, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err);
ERR_FAIL_COND_V(!res.is_valid(), ERR_CANT_OPEN);
if (!p_ignore_broken_deps && dependency_errors.has(p_resource)) {
@@ -1505,6 +1594,7 @@ void EditorNode::_save_scene(String p_file, int idx) {
} else {
editor_data.set_edited_scene_version(0, idx);
}
+ editor_data.set_scene_modified_time(idx, FileAccess::get_modified_time(p_file));
editor_folding.save_scene_folding(scene, p_file);
@@ -1708,7 +1798,7 @@ void EditorNode::_dialog_action(String p_file) {
ObjectID current = editor_history.get_current();
Object *current_obj = current.is_valid() ? ObjectDB::get_instance(current) : nullptr;
ERR_FAIL_COND(!current_obj);
- current_obj->_change_notify();
+ current_obj->notify_property_list_changed();
} break;
case SETTINGS_LAYOUT_SAVE: {
if (p_file.is_empty()) {
@@ -1850,6 +1940,7 @@ void EditorNode::push_item(Object *p_object, const String &p_property, bool p_in
node_dock->set_node(nullptr);
scene_tree_dock->set_selected(nullptr);
inspector_dock->update(nullptr);
+ _display_top_editors(false);
return;
}
@@ -2169,7 +2260,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
List<String> breakpoints;
editor_data.get_editor_breakpoints(&breakpoints);
- args = ProjectSettings::get_singleton()->get("editor/main_run_args");
+ args = ProjectSettings::get_singleton()->get("editor/run/main_run_args");
skip_breakpoints = EditorDebuggerNode::get_singleton()->is_skip_breakpoints();
EditorDebuggerNode::get_singleton()->start();
@@ -2292,6 +2383,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
case FILE_CLOSE: {
if (!p_confirmed) {
tab_closing = p_option == FILE_CLOSE ? editor_data.get_edited_scene() : _next_unsaved_scene(false);
+ _scene_tab_changed(tab_closing);
if (unsaved_cache || p_option == FILE_CLOSE_ALL_AND_QUIT || p_option == FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER) {
String scene_filename = editor_data.get_edited_scene_root(tab_closing)->get_filename();
@@ -2428,16 +2520,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
- case FILE_IMPORT_SUBSCENE: {
- if (!editor_data.get_edited_scene_root()) {
- show_accept(TTR("This operation can't be done without a selected node."), TTR("OK"));
- break;
- }
-
- scene_tree_dock->import_subscene();
-
- } break;
-
case FILE_EXTERNAL_OPEN_SCENE: {
if (unsaved_cache && !p_confirmed) {
confirmation->get_ok_button()->set_text(TTR("Open"));
@@ -2707,7 +2789,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case SET_VIDEO_DRIVER_SAVE_AND_RESTART: {
- ProjectSettings::get_singleton()->set("rendering/quality/driver/driver_name", video_driver_request);
+ ProjectSettings::get_singleton()->set("rendering/driver/driver_name", video_driver_request);
ProjectSettings::get_singleton()->save();
save_all_scenes();
@@ -2813,6 +2895,10 @@ void EditorNode::_discard_changes(const String &p_str) {
_update_scene_tabs();
if (current_option == FILE_CLOSE_ALL_AND_QUIT || current_option == FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER) {
+ // If restore tabs is enabled, reopen the scene that has just been closed, so it's remembered properly.
+ if (bool(EDITOR_GET("interface/scene_tabs/restore_scenes_on_load"))) {
+ _menu_option_confirm(FILE_OPEN_PREV, true);
+ }
if (_next_unsaved_scene(false) == -1) {
current_option = current_option == FILE_CLOSE_ALL_AND_QUIT ? FILE_QUIT : RUN_PROJECT_MANAGER;
_discard_changes();
@@ -3026,8 +3112,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
Ref<ConfigFile> cf;
cf.instance();
- String addon_path = String("res://addons").plus_file(p_addon).plus_file("plugin.cfg");
- if (!DirAccess::exists(addon_path.get_base_dir())) {
+ if (!DirAccess::exists(p_addon.get_base_dir())) {
ProjectSettings *ps = ProjectSettings::get_singleton();
PackedStringArray enabled_plugins = ps->get("editor_plugins/enabled");
for (int i = 0; i < enabled_plugins.size(); ++i) {
@@ -3041,14 +3126,14 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
WARN_PRINT("Addon '" + p_addon + "' failed to load. No directory found. Removing from enabled plugins.");
return;
}
- Error err = cf->load(addon_path);
+ Error err = cf->load(p_addon);
if (err != OK) {
- show_warning(vformat(TTR("Unable to enable addon plugin at: '%s' parsing of config failed."), addon_path));
+ show_warning(vformat(TTR("Unable to enable addon plugin at: '%s' parsing of config failed."), p_addon));
return;
}
if (!cf->has_section_key("plugin", "script")) {
- show_warning(vformat(TTR("Unable to find script field for addon plugin at: 'res://addons/%s'."), p_addon));
+ show_warning(vformat(TTR("Unable to find script field for addon plugin at: '%s'."), p_addon));
return;
}
@@ -3057,7 +3142,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled,
// Only try to load the script if it has a name. Else, the plugin has no init script.
if (script_path.length() > 0) {
- script_path = String("res://addons").plus_file(p_addon).plus_file(script_path);
+ script_path = p_addon.get_base_dir().plus_file(script_path);
script = ResourceLoader::load(script_path);
if (script.is_null()) {
@@ -3315,7 +3400,7 @@ int EditorNode::new_scene() {
return idx;
}
-Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, bool p_set_inherited, bool p_clear_errors, bool p_force_open_imported) {
+Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, bool p_set_inherited, bool p_clear_errors, bool p_force_open_imported, bool p_silent_change_tab) {
if (!is_inside_tree()) {
defer_load_scene = p_scene;
return OK;
@@ -3355,14 +3440,16 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
if (!editor_data.get_edited_scene_root() && editor_data.get_edited_scene_count() == 2) {
_remove_edited_scene();
- } else {
+ } else if (!p_silent_change_tab) {
_scene_tab_changed(idx);
+ } else {
+ set_current_scene(idx);
}
dependency_errors.clear();
Error err;
- Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", true, &err);
+ Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", ResourceFormatLoader::CACHE_MODE_REPLACE, &err);
if (!sdata.is_valid()) {
_dialog_display_load_error(lpath, err);
opening_prev = false;
@@ -5184,6 +5271,8 @@ void EditorNode::_file_access_close_error_notify(const String &p_str) {
}
void EditorNode::reload_scene(const String &p_path) {
+ /*
+ * No longer necesary since scenes now reset and reload their internal resource if needed.
//first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk
List<Ref<Resource>> cached;
@@ -5201,6 +5290,8 @@ void EditorNode::reload_scene(const String &p_path) {
to_clear.pop_front();
}
+ */
+
int scene_idx = -1;
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
if (editor_data.get_scene_path(i) == p_path) {
@@ -5444,6 +5535,7 @@ void EditorNode::_bind_methods() {
ADD_SIGNAL(MethodInfo("request_help_search"));
ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::PACKED_STRING_ARRAY, "args")));
ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "obj")));
+ ADD_SIGNAL(MethodInfo("project_settings_changed"));
}
static Node *_resource_get_edited_scene() {
@@ -5463,7 +5555,8 @@ static void _execute_thread(void *p_ud) {
eta->exitcode = err;
}
- eta->done = true;
+ eta->done.set();
+ ;
}
int EditorNode::execute_and_show_output(const String &p_title, const String &p_path, const List<String> &p_arguments, bool p_close_on_ok, bool p_close_on_errors) {
@@ -5477,15 +5570,12 @@ int EditorNode::execute_and_show_output(const String &p_title, const String &p_p
eta.path = p_path;
eta.args = p_arguments;
eta.exitcode = 255;
- eta.done = false;
int prev_len = 0;
- eta.execute_output_thread = Thread::create(_execute_thread, &eta);
+ eta.execute_output_thread.start(_execute_thread, &eta);
- ERR_FAIL_COND_V(!eta.execute_output_thread, 0);
-
- while (!eta.done) {
+ while (!eta.done.is_set()) {
{
MutexLock lock(eta.execute_output_mutex);
if (prev_len != eta.output.length()) {
@@ -5498,8 +5588,7 @@ int EditorNode::execute_and_show_output(const String &p_title, const String &p_p
OS::get_singleton()->delay_usec(1000);
}
- Thread::wait_to_finish(eta.execute_output_thread);
- memdelete(eta.execute_output_thread);
+ eta.execute_output_thread.wait_to_finish();
execute_outputs->add_text("\nExit Code: " + itos(eta.exitcode));
if (p_close_on_errors && eta.exitcode != 0) {
@@ -5514,6 +5603,10 @@ int EditorNode::execute_and_show_output(const String &p_title, const String &p_p
return eta.exitcode;
}
+void EditorNode::notify_settings_changed() {
+ settings_changed = true;
+}
+
EditorNode::EditorNode() {
Input::get_singleton()->set_use_accumulated_input(true);
Resource::_get_local_scene_func = _resource_get_edited_scene;
@@ -5584,6 +5677,10 @@ EditorNode::EditorNode() {
if (DisplayServer::get_singleton()->screen_get_dpi(screen) >= 192 && DisplayServer::get_singleton()->screen_get_size(screen).y >= 1400) {
// hiDPI display.
scale = 2.0;
+ } else if (DisplayServer::get_singleton()->screen_get_size(screen).y >= 1700) {
+ // Likely a hiDPI display, but we aren't certain due to the returned DPI.
+ // Use an intermediate scale to handle this situation.
+ scale = 1.5;
} else if (DisplayServer::get_singleton()->screen_get_size(screen).y <= 800) {
// Small loDPI display. Use a smaller display scale so that editor elements fit more easily.
// Icons won't look great, but this is better than having editor elements overflow from its window.
@@ -5742,7 +5839,7 @@ EditorNode::EditorNode() {
register_exporters();
- GLOBAL_DEF("editor/main_run_args", "");
+ GLOBAL_DEF("editor/run/main_run_args", "");
ClassDB::set_class_enabled("RootMotionView", true);
@@ -5767,7 +5864,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_to_open_in_new_inspector", "StandardMaterial3D,ORMMaterial3D,Script,MeshLibrary,TileSet");
+ EDITOR_DEF("interface/inspector/resources_to_open_in_new_inspector", "Script,MeshLibrary,TileSet");
EDITOR_DEF("interface/inspector/default_color_picker_mode", 0);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/inspector/default_color_picker_mode", PROPERTY_HINT_ENUM, "RGB,HSV,RAW", PROPERTY_USAGE_DEFAULT));
EDITOR_DEF("run/auto_save/save_before_running", true);
@@ -5963,8 +6060,8 @@ EditorNode::EditorNode() {
tab_preview_panel->add_child(tab_preview);
scene_tabs = memnew(Tabs);
- scene_tabs->add_theme_style_override("tab_fg", gui_base->get_theme_stylebox("SceneTabFG", "EditorStyles"));
- scene_tabs->add_theme_style_override("tab_bg", gui_base->get_theme_stylebox("SceneTabBG", "EditorStyles"));
+ scene_tabs->add_theme_style_override("tab_selected", gui_base->get_theme_stylebox("SceneTabFG", "EditorStyles"));
+ scene_tabs->add_theme_style_override("tab_unselected", gui_base->get_theme_stylebox("SceneTabBG", "EditorStyles"));
scene_tabs->set_select_with_rmb(true);
scene_tabs->add_tab("unsaved");
scene_tabs->set_tab_align(Tabs::ALIGN_LEFT);
@@ -6007,7 +6104,7 @@ EditorNode::EditorNode() {
tabbar_container->add_child(distraction_free);
scene_tab_add->set_tooltip(TTR("Add a new scene."));
scene_tab_add->set_icon(gui_base->get_theme_icon("Add", "EditorIcons"));
- scene_tab_add->add_theme_color_override("icon_color_normal", Color(0.6f, 0.6f, 0.6f, 0.8f));
+ scene_tab_add->add_theme_color_override("icon_normal_color", Color(0.6f, 0.6f, 0.6f, 0.8f));
scene_tab_add->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(FILE_NEW_SCENE));
scene_root_parent = memnew(PanelContainer);
@@ -6118,8 +6215,8 @@ EditorNode::EditorNode() {
pm_export->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
p->add_separator();
- p->add_shortcut(ED_SHORTCUT("editor/undo", TTR("Undo"), KEY_MASK_CMD + KEY_Z), EDIT_UNDO, true);
- p->add_shortcut(ED_SHORTCUT("editor/redo", TTR("Redo"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_Z), EDIT_REDO, true);
+ p->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO, true);
+ p->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO, true);
p->add_separator();
p->add_shortcut(ED_SHORTCUT("editor/reload_saved_scene", TTR("Reload Saved Scene")), EDIT_RELOAD_SAVED_SCENE);
@@ -6255,7 +6352,7 @@ EditorNode::EditorNode() {
p = help_menu->get_popup();
p->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
- p->add_icon_shortcut(gui_base->get_theme_icon("HelpSearch", "EditorIcons"), ED_SHORTCUT("editor/editor_help", TTR("Search"), KEY_MASK_SHIFT | KEY_F1), HELP_SEARCH);
+ p->add_icon_shortcut(gui_base->get_theme_icon("HelpSearch", "EditorIcons"), ED_SHORTCUT("editor/editor_help", TTR("Search")), HELP_SEARCH);
p->add_separator();
p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/online_docs", TTR("Online Docs")), HELP_DOCS);
p->add_icon_shortcut(gui_base->get_theme_icon("Instance", "EditorIcons"), ED_SHORTCUT("editor/q&a", TTR("Q&A")), HELP_QA);
@@ -6360,7 +6457,7 @@ EditorNode::EditorNode() {
#warning needs to be reimplemented
#endif
#if 0
- String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/quality/driver/driver_name"].hint_string;
+ String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/driver/driver_name"].hint_string;
String current_video_driver = OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver());
video_driver_current = 0;
for (int i = 0; i < video_drivers.get_slice_count(","); i++) {
@@ -6593,6 +6690,30 @@ EditorNode::EditorNode() {
//plugin stuff
add_editor_plugin(memnew(DebuggerEditorPlugin(this, debug_menu)));
+
+ disk_changed = memnew(ConfirmationDialog);
+ {
+ VBoxContainer *vbc = memnew(VBoxContainer);
+ disk_changed->add_child(vbc);
+
+ Label *dl = memnew(Label);
+ dl->set_text(TTR("The following files are newer on disk.\nWhat action should be taken?"));
+ vbc->add_child(dl);
+
+ disk_changed_list = memnew(Tree);
+ vbc->add_child(disk_changed_list);
+ disk_changed_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+
+ disk_changed->connect("confirmed", callable_mp(this, &EditorNode::_reload_modified_scenes));
+ disk_changed->connect("confirmed", callable_mp(this, &EditorNode::_reload_project_settings));
+ disk_changed->get_ok_button()->set_text(TTR("Reload"));
+
+ disk_changed->add_button(TTR("Resave"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");
+ disk_changed->connect("custom_action", callable_mp(this, &EditorNode::_resave_scenes));
+ }
+
+ gui_base->add_child(disk_changed);
+
add_editor_plugin(memnew(AnimationPlayerEditorPlugin(this)));
add_editor_plugin(memnew(CanvasItemEditorPlugin(this)));
add_editor_plugin(memnew(Node3DEditorPlugin(this)));
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 1da162dc9c..91d873d16f 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -31,6 +31,7 @@
#ifndef EDITOR_NODE_H
#define EDITOR_NODE_H
+#include "core/templates/safe_refcount.h"
#include "editor/editor_data.h"
#include "editor/editor_export.h"
#include "editor/editor_folding.h"
@@ -108,10 +109,10 @@ public:
String path;
List<String> args;
String output;
- Thread *execute_output_thread = nullptr;
+ Thread execute_output_thread;
Mutex execute_output_mutex;
int exitcode = 0;
- volatile bool done = false;
+ SafeFlag done;
};
private:
@@ -128,7 +129,6 @@ private:
FILE_SAVE_ALL_SCENES,
FILE_SAVE_AND_RUN,
FILE_SHOW_IN_FILESYSTEM,
- FILE_IMPORT_SUBSCENE,
FILE_EXPORT_PROJECT,
FILE_EXPORT_MESH_LIBRARY,
FILE_INSTALL_ANDROID_SOURCE,
@@ -312,6 +312,9 @@ private:
EditorSettingsDialog *settings_config_dialog;
ProjectSettingsEditor *project_settings;
+ bool settings_changed = true; //make it update settings on first frame
+ void _update_from_settings();
+
PopupMenu *vcs_actions_menu;
EditorFileDialog *file;
ExportTemplateManager *export_template_manager;
@@ -422,6 +425,9 @@ private:
Label *version_label;
Button *bottom_panel_raise;
+ Tree *disk_changed_list;
+ ConfirmationDialog *disk_changed;
+
void _bottom_panel_raise_toggled(bool);
EditorInterface *editor_interface;
@@ -641,6 +647,10 @@ private:
static void _resource_loaded(RES p_resource, const String &p_path);
void _resources_changed(const Vector<String> &p_resources);
+ void _scan_external_changes();
+ void _reload_modified_scenes();
+ void _reload_project_settings();
+ void _resave_scenes(String p_str);
void _feature_profile_changed();
bool _is_class_editor_disabled_by_feature_profile(const StringName &p_class);
@@ -709,8 +719,6 @@ public:
void save_resource(const Ref<Resource> &p_resource);
void save_resource_as(const Ref<Resource> &p_resource, const String &p_at_path = String());
- void merge_from_scene() { _menu_option_confirm(FILE_IMPORT_SUBSCENE, false); }
-
void show_about() { _menu_option_confirm(HELP_ABOUT, false); }
static bool has_unsaved_changes() { return singleton->unsaved_cache; }
@@ -741,7 +749,7 @@ public:
void fix_dependencies(const String &p_for_file);
void clear_scene() { _cleanup_scene(); }
int new_scene();
- Error load_scene(const String &p_scene, bool p_ignore_broken_deps = false, bool p_set_inherited = false, bool p_clear_errors = true, bool p_force_open_imported = false);
+ Error load_scene(const String &p_scene, bool p_ignore_broken_deps = false, bool p_set_inherited = false, bool p_clear_errors = true, bool p_force_open_imported = false, bool p_silent_change_tab = false);
Error load_resource(const String &p_resource, bool p_ignore_broken_deps = false);
bool is_scene_open(const String &p_path);
@@ -840,6 +848,8 @@ public:
void save_scene_list(Vector<String> p_scene_filenames);
void restart_editor();
+ void notify_settings_changed();
+
void dim_editor(bool p_dimming, bool p_force_dim = false);
bool is_editor_dimmed() const;
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 840bae35bf..c0cecbc651 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -756,7 +756,6 @@ int find(const PackedStringArray &a, const String &v) {
void EditorPlugin::enable_plugin() {
// Called when the plugin gets enabled in project settings, after it's added to the tree.
// You can implement it to register autoloads.
-
if (get_script_instance() && get_script_instance()->has_method("enable_plugin")) {
get_script_instance()->call("enable_plugin");
}
@@ -819,6 +818,18 @@ void EditorPlugin::remove_debugger_plugin(const Ref<Script> &p_script) {
EditorDebuggerNode::get_singleton()->remove_debugger_plugin(p_script);
}
+void EditorPlugin::_editor_project_settings_changed() {
+ emit_signal("project_settings_changed");
+}
+void EditorPlugin::_notification(int p_what) {
+ if (p_what == NOTIFICATION_ENTER_TREE) {
+ EditorNode::get_singleton()->connect("project_settings_changed", callable_mp(this, &EditorPlugin::_editor_project_settings_changed));
+ }
+ if (p_what == NOTIFICATION_EXIT_TREE) {
+ EditorNode::get_singleton()->disconnect("project_settings_changed", callable_mp(this, &EditorPlugin::_editor_project_settings_changed));
+ }
+}
+
void EditorPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_control_to_container", "container", "control"), &EditorPlugin::add_control_to_container);
ClassDB::bind_method(D_METHOD("add_control_to_bottom_panel", "control", "title"), &EditorPlugin::add_control_to_bottom_panel);
@@ -890,6 +901,7 @@ void EditorPlugin::_bind_methods() {
ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath")));
ADD_SIGNAL(MethodInfo("main_screen_changed", PropertyInfo(Variant::STRING, "screen_name")));
ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
+ ADD_SIGNAL(MethodInfo("project_settings_changed"));
BIND_ENUM_CONSTANT(CONTAINER_TOOLBAR);
BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_MENU);
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index 3b741a2f22..ae9fcfb28a 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -130,7 +130,11 @@ class EditorPlugin : public Node {
String last_main_screen_name;
+ void _editor_project_settings_changed();
+
protected:
+ void _notification(int p_what);
+
static void _bind_methods();
UndoRedo &get_undo_redo() { return *undo_redo; }
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index aa3b75097e..e5b62513ff 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -49,44 +49,16 @@ void EditorPluginSettings::_notification(int p_what) {
void EditorPluginSettings::update_plugins() {
plugin_list->clear();
-
- DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
- Error err = da->change_dir("res://addons");
- if (err != OK) {
- memdelete(da);
- return;
- }
-
updating = true;
-
TreeItem *root = plugin_list->create_item();
- da->list_dir_begin();
-
- String d = da->get_next();
-
- Vector<String> plugins;
-
- while (d != String()) {
- bool dir = da->current_is_dir();
- String path = "res://addons/" + d + "/plugin.cfg";
-
- if (dir && FileAccess::exists(path)) {
- plugins.push_back(d);
- }
-
- d = da->get_next();
- }
-
- da->list_dir_end();
- memdelete(da);
-
+ Vector<String> plugins = _get_plugins("res://addons");
plugins.sort();
for (int i = 0; i < plugins.size(); i++) {
Ref<ConfigFile> cf;
cf.instance();
- String path = "res://addons/" + plugins[i] + "/plugin.cfg";
+ const String path = plugins[i];
Error err2 = cf->load(path);
@@ -117,7 +89,6 @@ void EditorPluginSettings::update_plugins() {
}
if (!key_missing) {
- 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");
@@ -127,14 +98,14 @@ void EditorPluginSettings::update_plugins() {
TreeItem *item = plugin_list->create_item(root);
item->set_text(0, name);
item->set_tooltip(0, TTR("Name:") + " " + name + "\n" + TTR("Path:") + " " + path + "\n" + TTR("Main Script:") + " " + script + "\n" + TTR("Description:") + " " + description);
- item->set_metadata(0, d2);
+ item->set_metadata(0, path);
item->set_text(1, version);
item->set_metadata(1, script);
item->set_text(2, author);
item->set_metadata(2, description);
item->set_cell_mode(3, TreeItem::CELL_MODE_CHECK);
item->set_text(3, TTR("Enable"));
- bool is_active = EditorNode::get_singleton()->is_addon_plugin_enabled(d2);
+ bool is_active = EditorNode::get_singleton()->is_addon_plugin_enabled(path);
item->set_checked(3, is_active);
item->set_editable(3, true);
item->add_button(4, get_theme_icon("Edit", "EditorIcons"), BUTTON_PLUGIN_EDIT, false, TTR("Edit Plugin"));
@@ -179,12 +150,39 @@ void EditorPluginSettings::_cell_button_pressed(Object *p_item, int p_column, in
if (p_id == BUTTON_PLUGIN_EDIT) {
if (p_column == 4) {
String dir = item->get_metadata(0);
- plugin_config_dialog->config("res://addons/" + dir + "/plugin.cfg");
+ plugin_config_dialog->config(dir);
plugin_config_dialog->popup_centered();
}
}
}
+Vector<String> EditorPluginSettings::_get_plugins(const String &p_dir) {
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ Error err = da->change_dir(p_dir);
+ if (err != OK) {
+ return Vector<String>();
+ }
+
+ Vector<String> plugins;
+ da->list_dir_begin();
+ for (String path = da->get_next(); path != String(); path = da->get_next()) {
+ if (path[0] == '.' || !da->current_is_dir()) {
+ continue;
+ }
+
+ const String full_path = p_dir.plus_file(path);
+ const String plugin_config = full_path.plus_file("plugin.cfg");
+ if (FileAccess::exists(plugin_config)) {
+ plugins.push_back(plugin_config);
+ } else {
+ plugins.append_array(_get_plugins(full_path));
+ }
+ }
+
+ da->list_dir_end();
+ return plugins;
+}
+
void EditorPluginSettings::_bind_methods() {
}
diff --git a/editor/editor_plugin_settings.h b/editor/editor_plugin_settings.h
index 4f2b5293ec..34b26de90e 100644
--- a/editor/editor_plugin_settings.h
+++ b/editor/editor_plugin_settings.h
@@ -54,6 +54,8 @@ class EditorPluginSettings : public VBoxContainer {
void _create_clicked();
void _cell_button_pressed(Object *p_item, int p_column, int p_id);
+ static Vector<String> _get_plugins(const String &p_dir);
+
protected:
void _notification(int p_what);
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 4d8a4f46b2..6bfc16ccd7 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -1267,16 +1267,20 @@ void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool
EditorPropertyRect2::EditorPropertyRect2(bool p_force_wide) {
bool horizontal = p_force_wide || bool(EDITOR_GET("interface/inspector/horizontal_vector_types_editing"));
-
+ bool grid = false;
BoxContainer *bc;
if (p_force_wide) {
bc = memnew(HBoxContainer);
add_child(bc);
} else if (horizontal) {
- bc = memnew(HBoxContainer);
+ bc = memnew(VBoxContainer);
add_child(bc);
set_bottom_editor(bc);
+
+ bc->add_child(memnew(HBoxContainer));
+ bc->add_child(memnew(HBoxContainer));
+ grid = true;
} else {
bc = memnew(VBoxContainer);
add_child(bc);
@@ -1287,7 +1291,13 @@ EditorPropertyRect2::EditorPropertyRect2(bool p_force_wide) {
spin[i] = memnew(EditorSpinSlider);
spin[i]->set_label(desc[i]);
spin[i]->set_flat(true);
- bc->add_child(spin[i]);
+
+ if (grid) {
+ bc->get_child(i / 2)->add_child(spin[i]);
+ } else {
+ bc->add_child(spin[i]);
+ }
+
add_focusable(spin[i]);
spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyRect2::_value_changed), varray(desc[i]));
if (horizontal) {
@@ -1530,16 +1540,20 @@ void EditorPropertyRect2i::setup(int p_min, int p_max, bool p_no_slider) {
EditorPropertyRect2i::EditorPropertyRect2i(bool p_force_wide) {
bool horizontal = p_force_wide || bool(EDITOR_GET("interface/inspector/horizontal_vector_types_editing"));
-
+ bool grid = false;
BoxContainer *bc;
if (p_force_wide) {
bc = memnew(HBoxContainer);
add_child(bc);
} else if (horizontal) {
- bc = memnew(HBoxContainer);
+ bc = memnew(VBoxContainer);
add_child(bc);
set_bottom_editor(bc);
+
+ bc->add_child(memnew(HBoxContainer));
+ bc->add_child(memnew(HBoxContainer));
+ grid = true;
} else {
bc = memnew(VBoxContainer);
add_child(bc);
@@ -1550,7 +1564,13 @@ EditorPropertyRect2i::EditorPropertyRect2i(bool p_force_wide) {
spin[i] = memnew(EditorSpinSlider);
spin[i]->set_label(desc[i]);
spin[i]->set_flat(true);
- bc->add_child(spin[i]);
+
+ if (grid) {
+ bc->get_child(i / 2)->add_child(spin[i]);
+ } else {
+ bc->add_child(spin[i]);
+ }
+
add_focusable(spin[i]);
spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyRect2i::_value_changed), varray(desc[i]));
if (horizontal) {
@@ -2839,6 +2859,41 @@ void EditorPropertyResource::_fold_other_editors(Object *p_self) {
}
}
+void EditorPropertyResource::_update_property_bg() {
+ if (!is_inside_tree()) {
+ return;
+ }
+
+ updating_theme = true;
+ if (sub_inspector != nullptr) {
+ int count_subinspectors = 0;
+ Node *n = get_parent();
+ while (n) {
+ EditorInspector *ei = Object::cast_to<EditorInspector>(n);
+ if (ei && ei->is_sub_inspector()) {
+ count_subinspectors++;
+ }
+ n = n->get_parent();
+ }
+ count_subinspectors = MIN(15, count_subinspectors);
+
+ add_theme_color_override("property_color", get_theme_color("sub_inspector_property_color", "Editor"));
+ add_theme_style_override("bg_selected", get_theme_stylebox("sub_inspector_property_bg_selected" + itos(count_subinspectors), "Editor"));
+ add_theme_style_override("bg", get_theme_stylebox("sub_inspector_property_bg" + itos(count_subinspectors), "Editor"));
+
+ add_theme_constant_override("font_offset", get_theme_constant("sub_inspector_font_offset", "Editor"));
+ add_theme_constant_override("vseparation", 0);
+ } else {
+ add_theme_color_override("property_color", get_theme_color("property_color", "EditorProperty"));
+ add_theme_style_override("bg_selected", get_theme_stylebox("bg_selected", "EditorProperty"));
+ add_theme_style_override("bg", get_theme_stylebox("bg", "EditorProperty"));
+ add_theme_constant_override("vseparation", get_theme_constant("vseparation", "EditorProperty"));
+ add_theme_constant_override("font_offset", get_theme_constant("font_offset", "EditorProperty"));
+ }
+
+ updating_theme = false;
+ update();
+}
void EditorPropertyResource::update_property() {
RES res = get_edited_object()->get(get_edited_property());
@@ -2887,13 +2942,14 @@ void EditorPropertyResource::update_property() {
}
opened_editor = true;
}
+
+ _update_property_bg();
}
if (res.ptr() != sub_inspector->get_edited_object()) {
sub_inspector->edit(res.ptr());
}
- sub_inspector->refresh();
} else {
if (sub_inspector) {
set_bottom_editor(nullptr);
@@ -2904,6 +2960,7 @@ void EditorPropertyResource::update_property() {
EditorNode::get_singleton()->hide_top_editors();
opened_editor = false;
}
+ _update_property_bg();
}
}
}
@@ -2957,8 +3014,12 @@ void EditorPropertyResource::setup(const String &p_base_type) {
void EditorPropertyResource::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
+ if (updating_theme) {
+ return;
+ }
Ref<Texture2D> t = get_theme_icon("select_arrow", "Tree");
edit->set_icon(t);
+ _update_property_bg();
}
if (p_what == NOTIFICATION_DRAG_BEGIN) {
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index 4775259111..6f097fb5df 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -654,6 +654,9 @@ class EditorPropertyResource : public EditorProperty {
bool opened_editor;
+ bool updating_theme = false;
+ void _update_property_bg();
+
protected:
static void _bind_methods();
void _notification(int p_what);
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 29a929d179..77288be614 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -206,8 +206,8 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
}
void EditorResourcePreview::_thread() {
- exited = false;
- while (!exit) {
+ exited.clear();
+ while (!exit.is_set()) {
preview_sem.wait();
preview_mutex.lock();
@@ -326,7 +326,7 @@ void EditorResourcePreview::_thread() {
preview_mutex.unlock();
}
}
- exited = true;
+ exited.set();
}
void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource> &p_res, Object *p_receiver, const StringName &p_receiver_func, const Variant &p_userdata) {
@@ -424,30 +424,25 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) {
}
void EditorResourcePreview::start() {
- ERR_FAIL_COND_MSG(thread, "Thread already started.");
- thread = Thread::create(_thread_func, this);
+ ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started.");
+ thread.start(_thread_func, this);
}
void EditorResourcePreview::stop() {
- if (thread) {
- exit = true;
+ if (thread.is_started()) {
+ exit.set();
preview_sem.post();
- while (!exited) {
+ while (!exited.is_set()) {
OS::get_singleton()->delay_usec(10000);
RenderingServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on visual server
}
- Thread::wait_to_finish(thread);
- memdelete(thread);
- thread = nullptr;
+ thread.wait_to_finish();
}
}
EditorResourcePreview::EditorResourcePreview() {
- thread = nullptr;
singleton = this;
order = 0;
- exit = false;
- exited = false;
}
EditorResourcePreview::~EditorResourcePreview() {
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h
index c119ccd99f..c4e796dcf1 100644
--- a/editor/editor_resource_preview.h
+++ b/editor/editor_resource_preview.h
@@ -33,6 +33,7 @@
#include "core/os/semaphore.h"
#include "core/os/thread.h"
+#include "core/templates/safe_refcount.h"
#include "scene/main/node.h"
#include "scene/resources/texture.h"
@@ -70,9 +71,9 @@ class EditorResourcePreview : public Node {
Mutex preview_mutex;
Semaphore preview_sem;
- Thread *thread;
- volatile bool exit;
- volatile bool exited;
+ Thread thread;
+ SafeFlag exit;
+ SafeFlag exited;
struct Item {
Ref<Texture2D> preview;
diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp
index a2627f51ac..f81c87be9e 100644
--- a/editor/editor_sectioned_inspector.cpp
+++ b/editor/editor_sectioned_inspector.cpp
@@ -116,12 +116,12 @@ public:
void set_section(const String &p_section, bool p_allow_sub) {
section = p_section;
allow_sub = p_allow_sub;
- _change_notify();
+ notify_property_list_changed();
}
void set_edited(Object *p_edited) {
edited = p_edited;
- _change_notify();
+ notify_property_list_changed();
}
};
@@ -226,7 +226,7 @@ void SectionedInspector::update_category_list() {
if (pi.usage & PROPERTY_USAGE_CATEGORY) {
continue;
- } else if (!(pi.usage & PROPERTY_USAGE_EDITOR)) {
+ } else if (!(pi.usage & PROPERTY_USAGE_EDITOR) || (restrict_to_basic && !(pi.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) {
continue;
}
@@ -294,6 +294,12 @@ EditorInspector *SectionedInspector::get_inspector() {
return inspector;
}
+void SectionedInspector::set_restrict_to_basic_settings(bool p_restrict) {
+ restrict_to_basic = p_restrict;
+ update_category_list();
+ inspector->set_restrict_to_basic_settings(p_restrict);
+}
+
SectionedInspector::SectionedInspector() :
sections(memnew(Tree)),
filter(memnew(SectionedInspectorFilter)),
diff --git a/editor/editor_sectioned_inspector.h b/editor/editor_sectioned_inspector.h
index 55fb94fecc..1068a4f932 100644
--- a/editor/editor_sectioned_inspector.h
+++ b/editor/editor_sectioned_inspector.h
@@ -51,6 +51,8 @@ class SectionedInspector : public HSplitContainer {
String selected_category;
+ bool restrict_to_basic = false;
+
static void _bind_methods();
void _section_selected();
@@ -65,6 +67,7 @@ public:
void set_current_section(const String &p_section);
String get_current_section() const;
+ void set_restrict_to_basic_settings(bool p_restrict);
void update_category_list();
SectionedInspector();
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 3eee7b2bfb..40647497af 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -31,6 +31,7 @@
#include "editor_settings.h"
#include "core/config/project_settings.h"
+#include "core/input/input_map.h"
#include "core/io/certs_compressed.gen.h"
#include "core/io/compression.h"
#include "core/io/config_file.h"
@@ -70,7 +71,7 @@ bool EditorSettings::_set(const StringName &p_name, const Variant &p_value) {
bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value) {
_THREAD_SAFE_METHOD_
- if (p_name.operator String() == "shortcuts") {
+ if (p_name == "shortcuts") {
Array arr = p_value;
ERR_FAIL_COND_V(arr.size() && arr.size() & 1, true);
for (int i = 0; i < arr.size(); i += 2) {
@@ -84,6 +85,24 @@ bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value)
}
return false;
+ } else if (p_name == "builtin_action_overrides") {
+ Array actions_arr = p_value;
+ for (int i = 0; i < actions_arr.size(); i++) {
+ Dictionary action_dict = actions_arr[i];
+
+ String name = action_dict["name"];
+ Array events = action_dict["events"];
+
+ InputMap *im = InputMap::get_singleton();
+ im->action_erase_events(name);
+
+ builtin_action_overrides[name].clear();
+ for (int ev_idx = 0; ev_idx < events.size(); ev_idx++) {
+ im->action_add_event(name, events[ev_idx]);
+ builtin_action_overrides[name].push_back(events[ev_idx]);
+ }
+ }
+ return false;
}
bool changed = false;
@@ -118,11 +137,16 @@ bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value)
bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
_THREAD_SAFE_METHOD_
- if (p_name.operator String() == "shortcuts") {
+ if (p_name == "shortcuts") {
Array arr;
for (const Map<String, Ref<Shortcut>>::Element *E = shortcuts.front(); E; E = E->next()) {
Ref<Shortcut> sc = E->get();
+ if (builtin_action_overrides.has(E->key())) {
+ // This shortcut was auto-generated from built in actions: don't save.
+ continue;
+ }
+
if (optimize_save) {
if (!sc->has_meta("original")) {
continue; //this came from settings but is not any longer used
@@ -139,6 +163,27 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
}
r_ret = arr;
return true;
+ } else if (p_name == "builtin_action_overrides") {
+ Array actions_arr;
+ for (Map<String, List<Ref<InputEvent>>>::Element *E = builtin_action_overrides.front(); E; E = E->next()) {
+ List<Ref<InputEvent>> events = E->get();
+
+ // TODO: skip actions which are the same as the builtin.
+ Dictionary action_dict;
+ action_dict["name"] = E->key();
+
+ Array events_arr;
+ for (List<Ref<InputEvent>>::Element *I = events.front(); I; I = I->next()) {
+ events_arr.push_back(I->get());
+ }
+
+ action_dict["events"] = events_arr;
+
+ actions_arr.push_back(action_dict);
+ }
+
+ r_ret = actions_arr;
+ return true;
}
const VariantContainer *v = props.getptr(p_name);
@@ -220,6 +265,7 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const {
}
p_list->push_back(PropertyInfo(Variant::ARRAY, "shortcuts", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); //do not edit
+ p_list->push_back(PropertyInfo(Variant::ARRAY, "builtin_action_overrides", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
}
void EditorSettings::_add_property_info_bind(const Dictionary &p_info) {
@@ -337,6 +383,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
if (DisplayServer::get_singleton()->screen_get_dpi(screen) >= 192 && DisplayServer::get_singleton()->screen_get_size(screen).y >= 1400) {
// hiDPI display.
scale = 2.0;
+ } else if (DisplayServer::get_singleton()->screen_get_size(screen).y >= 1700) {
+ // Likely a hiDPI display, but we aren't certain due to the returned DPI.
+ // Use an intermediate scale to handle this situation.
+ scale = 1.5;
} else if (DisplayServer::get_singleton()->screen_get_size(screen).y <= 800) {
// Small loDPI display. Use a smaller display scale so that editor elements fit more easily.
// Icons won't look great, but this is better than having editor elements overflow from its window.
@@ -392,6 +442,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["interface/theme/accent_color"] = PropertyInfo(Variant::COLOR, "interface/theme/accent_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/contrast", 0.25);
hints["interface/theme/contrast"] = PropertyInfo(Variant::FLOAT, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01");
+ _initial_set("interface/theme/icon_saturation", 1.0);
+ hints["interface/theme/icon_saturation"] = PropertyInfo(Variant::FLOAT, "interface/theme/icon_saturation", PROPERTY_HINT_RANGE, "0,2,0.01", PROPERTY_USAGE_DEFAULT);
_initial_set("interface/theme/relationship_line_opacity", 0.1);
hints["interface/theme/relationship_line_opacity"] = PropertyInfo(Variant::FLOAT, "interface/theme/relationship_line_opacity", PROPERTY_HINT_RANGE, "0.00, 1, 0.01");
_initial_set("interface/theme/highlight_tabs", false);
@@ -441,7 +493,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("docks/filesystem/always_show_folders", true);
// Property editor
- _initial_set("docks/property_editor/auto_refresh_interval", 0.3);
+ _initial_set("docks/property_editor/auto_refresh_interval", 0.2); //update 5 times per second by default
+ _initial_set("docks/property_editor/subresource_hue_tint", 0.75);
+ hints["docks/property_editor/subresource_hue_tint"] = PropertyInfo(Variant::FLOAT, "docks/property_editor/subresource_hue_tint", PROPERTY_HINT_RANGE, "0,1,0.01", PROPERTY_USAGE_DEFAULT);
/* Text editor */
@@ -659,6 +713,10 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("editors/animation/onion_layers_past_color", Color(1, 0, 0));
_initial_set("editors/animation/onion_layers_future_color", Color(0, 1, 0));
+ // Visual editors
+ _initial_set("editors/visual_editors/minimap_opacity", 0.85);
+ hints["editors/visual_editors/minimap_opacity"] = PropertyInfo(Variant::FLOAT, "editors/visual_editors/minimap_opacity", PROPERTY_HINT_RANGE, "0.0,1.0,0.01", PROPERTY_USAGE_DEFAULT);
+
/* Run */
// Window placement
@@ -955,27 +1013,16 @@ void EditorSettings::create() {
_create_script_templates(dir->get_current_dir().plus_file("script_templates"));
- if (dir->change_dir("projects") != OK) {
- dir->make_dir("projects");
- } else {
- dir->change_dir("..");
- }
-
- // Validate/create project-specific config dir
-
- dir->change_dir("projects");
- String project_config_dir = ProjectSettings::get_singleton()->get_resource_path();
- if (project_config_dir.ends_with("/")) {
- project_config_dir = config_path.substr(0, project_config_dir.size() - 1);
- }
- project_config_dir = project_config_dir.get_file() + "-" + project_config_dir.md5_text();
-
- if (dir->change_dir(project_config_dir) != OK) {
- dir->make_dir(project_config_dir);
- } else {
- dir->change_dir("..");
+ {
+ // Validate/create project-specific editor settings dir.
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ if (da->change_dir(EditorSettings::PROJECT_EDITOR_SETTINGS_PATH) != OK) {
+ Error err = da->make_dir_recursive(EditorSettings::PROJECT_EDITOR_SETTINGS_PATH);
+ if (err || da->change_dir(EditorSettings::PROJECT_EDITOR_SETTINGS_PATH) != OK) {
+ ERR_FAIL_MSG("Failed to create '" + EditorSettings::PROJECT_EDITOR_SETTINGS_PATH + "' folder.");
+ }
+ }
}
- dir->change_dir("..");
// Validate editor config file
@@ -997,7 +1044,6 @@ void EditorSettings::create() {
singleton->save_changed_setting = true;
singleton->config_file_path = config_file_path;
- singleton->project_config_dir = project_config_dir;
singleton->settings_dir = config_dir;
singleton->data_dir = data_dir;
singleton->cache_dir = cache_dir;
@@ -1273,7 +1319,7 @@ String EditorSettings::get_settings_dir() const {
}
String EditorSettings::get_project_settings_dir() const {
- return get_settings_dir().plus_file("projects").plus_file(project_config_dir);
+ return EditorSettings::PROJECT_EDITOR_SETTINGS_PATH;
}
String EditorSettings::get_text_editor_themes_dir() const {
@@ -1285,7 +1331,7 @@ String EditorSettings::get_script_templates_dir() const {
}
String EditorSettings::get_project_script_templates_dir() const {
- return ProjectSettings::get_singleton()->get("editor/script_templates_search_path");
+ return ProjectSettings::get_singleton()->get("editor/script/templates_search_path");
}
// Cache directory
@@ -1539,12 +1585,39 @@ bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_
}
Ref<Shortcut> EditorSettings::get_shortcut(const String &p_name) const {
- const Map<String, Ref<Shortcut>>::Element *E = shortcuts.find(p_name);
- if (!E) {
- return Ref<Shortcut>();
+ const Map<String, Ref<Shortcut>>::Element *SC = shortcuts.find(p_name);
+ if (SC) {
+ return SC->get();
+ }
+
+ // If no shortcut with the provided name is found in the list, check the built-in shortcuts.
+ // Use the first item in the action list for the shortcut event, since a shortcut can only have 1 linked event.
+
+ Ref<Shortcut> sc;
+ const Map<String, List<Ref<InputEvent>>>::Element *builtin_override = builtin_action_overrides.find(p_name);
+ if (builtin_override) {
+ sc.instance();
+ sc->set_shortcut(builtin_override->get().front()->get());
+ sc->set_name(InputMap::get_singleton()->get_builtin_display_name(p_name));
+ }
+
+ // If there was no override, check the default builtins to see if it has an InputEvent for the provided name.
+ if (sc.is_null()) {
+ const OrderedHashMap<String, List<Ref<InputEvent>>>::ConstElement builtin_default = InputMap::get_singleton()->get_builtins().find(p_name);
+ if (builtin_default) {
+ sc.instance();
+ sc->set_shortcut(builtin_default.get().front()->get());
+ sc->set_name(InputMap::get_singleton()->get_builtin_display_name(p_name));
+ }
+ }
+
+ if (sc.is_valid()) {
+ // Add the shortcut to the list.
+ shortcuts[p_name] = sc;
+ return sc;
}
- return E->get();
+ return Ref<Shortcut>();
}
void EditorSettings::get_shortcut_list(List<String> *r_shortcuts) {
@@ -1610,6 +1683,66 @@ Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p
return sc;
}
+void EditorSettings::set_builtin_action_override(const String &p_name, const Array &p_events) {
+ List<Ref<InputEvent>> event_list;
+
+ // Override the whole list, since events may have their order changed or be added, removed or edited.
+ InputMap::get_singleton()->action_erase_events(p_name);
+ for (int i = 0; i < p_events.size(); i++) {
+ event_list.push_back(p_events[i]);
+ InputMap::get_singleton()->action_add_event(p_name, p_events[i]);
+ }
+
+ // Check if the provided event array is same as built-in. If it is, it does not need to be added to the overrides.
+ // Note that event order must also be the same.
+ bool same_as_builtin = true;
+ OrderedHashMap<String, List<Ref<InputEvent>>>::ConstElement builtin_default = InputMap::get_singleton()->get_builtins().find(p_name);
+ if (builtin_default) {
+ List<Ref<InputEvent>> builtin_events = builtin_default.get();
+
+ if (p_events.size() == builtin_events.size()) {
+ int event_idx = 0;
+
+ // Check equality of each event.
+ for (List<Ref<InputEvent>>::Element *E = builtin_events.front(); E; E = E->next()) {
+ if (!E->get()->shortcut_match(p_events[event_idx])) {
+ same_as_builtin = false;
+ break;
+ }
+ event_idx++;
+ }
+ } else {
+ same_as_builtin = false;
+ }
+ }
+
+ if (same_as_builtin && builtin_action_overrides.has(p_name)) {
+ builtin_action_overrides.erase(p_name);
+ } else {
+ builtin_action_overrides[p_name] = event_list;
+ }
+
+ // Update the shortcut (if it is used somewhere in the editor) to be the first event of the new list.
+ if (shortcuts.has(p_name)) {
+ shortcuts[p_name]->set_shortcut(event_list.front()->get());
+ }
+}
+
+const Array EditorSettings::get_builtin_action_overrides(const String &p_name) const {
+ const Map<String, List<Ref<InputEvent>>>::Element *AO = builtin_action_overrides.find(p_name);
+ if (AO) {
+ Array event_array;
+
+ List<Ref<InputEvent>> events_list = AO->get();
+ for (List<Ref<InputEvent>>::Element *E = events_list.front(); E; E = E->next()) {
+ event_array.push_back(E->get());
+ }
+ return event_array;
+ }
+
+ return Array();
+}
+
void EditorSettings::notify_changes() {
_THREAD_SAFE_METHOD_
@@ -1648,6 +1781,8 @@ void EditorSettings::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_recent_dirs", "dirs"), &EditorSettings::set_recent_dirs);
ClassDB::bind_method(D_METHOD("get_recent_dirs"), &EditorSettings::get_recent_dirs);
+ ClassDB::bind_method(D_METHOD("set_builtin_action_override", "name", "actions_list"), &EditorSettings::set_builtin_action_override);
+
ADD_SIGNAL(MethodInfo("settings_changed"));
BIND_CONSTANT(NOTIFICATION_EDITOR_SETTINGS_CHANGED);
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 61ec8546aa..e5f8527faf 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -46,6 +46,7 @@ class EditorSettings : public Resource {
_THREAD_SAFE_CLASS_
public:
+ inline static const String PROJECT_EDITOR_SETTINGS_PATH = "res://.godot/editor";
struct Plugin {
EditorPlugin *instance = nullptr;
String path;
@@ -83,7 +84,8 @@ private:
int last_order;
Ref<Resource> clipboard;
- Map<String, Ref<Shortcut>> shortcuts;
+ mutable Map<String, Ref<Shortcut>> shortcuts;
+ Map<String, List<Ref<InputEvent>>> builtin_action_overrides;
String resource_path;
String settings_dir;
@@ -185,6 +187,9 @@ public:
Ref<Shortcut> get_shortcut(const String &p_name) const;
void get_shortcut_list(List<String> *r_shortcuts);
+ void set_builtin_action_override(const String &p_name, const Array &p_events);
+ const Array get_builtin_action_overrides(const String &p_name) const;
+
void notify_changes();
EditorSettings();
diff --git a/editor/editor_sub_scene.cpp b/editor/editor_sub_scene.cpp
deleted file mode 100644
index e319fbff52..0000000000
--- a/editor/editor_sub_scene.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-/*************************************************************************/
-/* editor_sub_scene.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "editor_sub_scene.h"
-
-#include "editor/editor_node.h"
-#include "scene/gui/margin_container.h"
-#include "scene/resources/packed_scene.h"
-
-void EditorSubScene::_path_selected(const String &p_path) {
- path->set_text(p_path);
- _path_changed(p_path);
-}
-
-void EditorSubScene::_path_changed(const String &p_path) {
- tree->clear();
-
- if (scene) {
- memdelete(scene);
- scene = nullptr;
- }
-
- if (p_path == "") {
- return;
- }
-
- Ref<PackedScene> ps = ResourceLoader::load(p_path, "PackedScene");
-
- if (ps.is_null()) {
- return;
- }
-
- scene = ps->instance();
- if (!scene) {
- return;
- }
-
- _fill_tree(scene, nullptr);
-}
-
-void EditorSubScene::_path_browse() {
- file_dialog->popup_file_dialog();
-}
-
-void EditorSubScene::_notification(int p_what) {
- if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
- if (is_visible() && scene == nullptr) {
- _path_browse();
- }
- }
-}
-
-void EditorSubScene::_fill_tree(Node *p_node, TreeItem *p_parent) {
- TreeItem *it = tree->create_item(p_parent);
- it->set_metadata(0, p_node);
- it->set_text(0, p_node->get_name());
- it->set_editable(0, false);
- it->set_selectable(0, true);
- it->set_icon(0, EditorNode::get_singleton()->get_object_icon(p_node, "Node"));
-
- for (int i = 0; i < p_node->get_child_count(); i++) {
- Node *c = p_node->get_child(i);
- if (c->get_owner() != scene) {
- continue;
- }
- _fill_tree(c, it);
- }
-}
-
-void EditorSubScene::_selected_changed() {
- TreeItem *item = tree->get_selected();
- ERR_FAIL_COND(!item);
- Node *n = item->get_metadata(0);
-
- if (!n || !selection.find(n)) {
- selection.clear();
- is_root = false;
- }
-}
-
-void EditorSubScene::_item_multi_selected(Object *p_object, int p_cell, bool p_selected) {
- if (!is_root) {
- TreeItem *item = Object::cast_to<TreeItem>(p_object);
- ERR_FAIL_COND(!item);
-
- Node *n = item->get_metadata(0);
-
- if (!n) {
- return;
- }
- if (p_selected) {
- if (n == scene) {
- is_root = true;
- selection.clear();
- }
- selection.push_back(n);
- } else {
- List<Node *>::Element *E = selection.find(n);
-
- if (E) {
- selection.erase(E);
- }
- }
- }
-}
-
-void EditorSubScene::_item_activated() {
- _ok_pressed(); // From AcceptDialog.
-}
-
-void EditorSubScene::_remove_selection_child(Node *p_node) {
- if (p_node->get_child_count() > 0) {
- for (int i = 0; i < p_node->get_child_count(); i++) {
- Node *c = p_node->get_child(i);
- List<Node *>::Element *E = selection.find(c);
- if (E) {
- selection.move_to_back(E);
- selection.pop_back();
- }
- if (c->get_child_count() > 0) {
- _remove_selection_child(c);
- }
- }
- }
-}
-
-void EditorSubScene::ok_pressed() {
- if (selection.size() <= 0) {
- return;
- }
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Node *c = E->get();
- _remove_selection_child(c);
- }
- emit_signal("subscene_selected");
- hide();
- clear();
-}
-
-void EditorSubScene::_reown(Node *p_node, List<Node *> *p_to_reown) {
- if (p_node == scene) {
- scene->set_filename("");
- p_to_reown->push_back(p_node);
- } else if (p_node->get_owner() == scene) {
- p_to_reown->push_back(p_node);
- }
-
- for (int i = 0; i < p_node->get_child_count(); i++) {
- Node *c = p_node->get_child(i);
- _reown(c, p_to_reown);
- }
-}
-
-void EditorSubScene::move(Node *p_new_parent, Node *p_new_owner) {
- if (!scene) {
- return;
- }
-
- if (selection.size() <= 0) {
- return;
- }
-
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Node *selnode = E->get();
- if (!selnode) {
- return;
- }
- List<Node *> to_reown;
- _reown(selnode, &to_reown);
- if (selnode != scene) {
- selnode->get_parent()->remove_child(selnode);
- }
-
- p_new_parent->add_child(selnode);
- for (List<Node *>::Element *F = to_reown.front(); F; F = F->next()) {
- F->get()->set_owner(p_new_owner);
- }
- }
- if (!is_root) {
- memdelete(scene);
- }
- scene = nullptr;
- //return selnode;
-}
-
-void EditorSubScene::clear() {
- path->set_text("");
- _path_changed("");
-}
-
-void EditorSubScene::_bind_methods() {
- ADD_SIGNAL(MethodInfo("subscene_selected"));
-}
-
-EditorSubScene::EditorSubScene() {
- scene = nullptr;
- is_root = false;
-
- set_title(TTR("Select Node(s) to Import"));
- set_hide_on_ok(false);
-
- VBoxContainer *vb = memnew(VBoxContainer);
- add_child(vb);
- //set_child_rect(vb);
-
- HBoxContainer *hb = memnew(HBoxContainer);
- path = memnew(LineEdit);
- path->connect("text_entered", callable_mp(this, &EditorSubScene::_path_changed));
- hb->add_child(path);
- path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- Button *b = memnew(Button);
- b->set_text(TTR("Browse"));
- hb->add_child(b);
- b->connect("pressed", callable_mp(this, &EditorSubScene::_path_browse));
- vb->add_margin_child(TTR("Scene Path:"), hb);
-
- tree = memnew(Tree);
- tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
- vb->add_margin_child(TTR("Import From Node:"), tree, true);
- tree->set_select_mode(Tree::SELECT_MULTI);
- tree->connect("multi_selected", callable_mp(this, &EditorSubScene::_item_multi_selected));
- //tree->connect("nothing_selected", this, "_deselect_items");
- tree->connect("cell_selected", callable_mp(this, &EditorSubScene::_selected_changed));
-
- tree->connect("item_activated", callable_mp(this, &EditorSubScene::_item_activated), make_binds(), CONNECT_DEFERRED);
-
- file_dialog = memnew(EditorFileDialog);
- List<String> extensions;
- ResourceLoader::get_recognized_extensions_for_type("PackedScene", &extensions);
-
- for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
- file_dialog->add_filter("*." + E->get());
- }
-
- file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
- add_child(file_dialog);
- file_dialog->connect("file_selected", callable_mp(this, &EditorSubScene::_path_selected));
-}
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 054ada1e8d..3d40c145f2 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -92,6 +92,7 @@ static Ref<Texture2D> flip_icon(Ref<Texture2D> p_texture, bool p_flip_y = false,
Ref<ImageTexture> texture(memnew(ImageTexture));
Ref<Image> img = p_texture->get_data();
+ img = img->duplicate();
if (p_flip_y) {
img->flip_y();
@@ -105,7 +106,7 @@ static Ref<Texture2D> flip_icon(Ref<Texture2D> p_texture, bool p_flip_y = false,
}
#ifdef MODULE_SVG_ENABLED
-static Ref<ImageTexture> editor_generate_icon(int p_index, bool p_convert_color, float p_scale = EDSCALE, bool p_force_filter = false) {
+static Ref<ImageTexture> editor_generate_icon(int p_index, bool p_convert_color, float p_scale = EDSCALE, float p_saturation = 1.0) {
Ref<ImageTexture> icon = memnew(ImageTexture);
Ref<Image> img = memnew(Image);
@@ -115,6 +116,9 @@ static Ref<ImageTexture> editor_generate_icon(int p_index, bool p_convert_color,
const bool upsample = !Math::is_equal_approx(Math::round(p_scale), p_scale);
ImageLoaderSVG::create_image_from_string(img, editor_icons_sources[p_index], p_scale, upsample, p_convert_color);
+ if (p_saturation != 1.0) {
+ img->adjust_bcs(1.0, 1.0, p_saturation);
+ }
icon->create_from_image(img); // in this case filter really helps
return icon;
@@ -125,7 +129,7 @@ static Ref<ImageTexture> editor_generate_icon(int p_index, bool p_convert_color,
#define ADD_CONVERT_COLOR(dictionary, old_color, new_color) dictionary[Color::html(old_color)] = Color::html(new_color)
#endif
-void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = true, int p_thumb_size = 32, bool p_only_thumbs = false) {
+void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = true, int p_thumb_size = 32, bool p_only_thumbs = false, float p_icon_saturation = 1.0) {
#ifdef MODULE_SVG_ENABLED
// The default icon theme is designed to be used for a dark theme.
// This dictionary stores color codes to convert to other colors
@@ -238,14 +242,19 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
if (!p_only_thumbs) {
for (int i = 0; i < editor_icons_count; i++) {
float icon_scale = EDSCALE;
+ float saturation = p_icon_saturation;
// Always keep the DefaultProjectIcon at the default size
if (strcmp(editor_icons_names[i], "DefaultProjectIcon") == 0) {
icon_scale = 1.0f;
}
+ if (strcmp(editor_icons_names[i], "DefaultProjectIcon") == 0 || strcmp(editor_icons_names[i], "Godot") == 0 || strcmp(editor_icons_names[i], "Logo") == 0) {
+ saturation = 1.0;
+ }
+
const int is_exception = exceptions.has(editor_icons_names[i]);
- const Ref<ImageTexture> icon = editor_generate_icon(i, !is_exception, icon_scale);
+ const Ref<ImageTexture> icon = editor_generate_icon(i, !is_exception, icon_scale, saturation);
p_theme->set_icon(editor_icons_names[i], "EditorIcons", icon);
}
@@ -289,6 +298,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
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 icon_saturation = EDITOR_GET("interface/theme/icon_saturation");
float relationship_line_opacity = EDITOR_GET("interface/theme/relationship_line_opacity");
String preset = EDITOR_GET("interface/theme/preset");
@@ -375,23 +385,26 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color contrast_color_2 = base_color.lerp(mono_color, MAX(contrast * 1.5, default_contrast * 1.5));
const Color font_color = mono_color.lerp(base_color, 0.25);
- const Color font_color_hl = mono_color.lerp(base_color, 0.15);
- const Color font_color_disabled = Color(mono_color.r, mono_color.g, mono_color.b, 0.3);
- const Color font_color_selection = accent_color * Color(1, 1, 1, 0.4);
- const Color color_disabled = mono_color.inverted().lerp(base_color, 0.7);
- const Color color_disabled_bg = mono_color.inverted().lerp(base_color, 0.9);
-
- Color icon_color_hover = Color(1, 1, 1) * (dark_theme ? 1.15 : 1.45);
- icon_color_hover.a = 1.0;
+ const Color font_hover_color = mono_color.lerp(base_color, 0.15);
+ const Color font_disabled_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.3);
+ const Color selection_color = accent_color * Color(1, 1, 1, 0.4);
+ const Color disabled_color = mono_color.inverted().lerp(base_color, 0.7);
+ const Color disabled_bg_color = mono_color.inverted().lerp(base_color, 0.9);
+
+ Color icon_hover_color = Color(1, 1, 1) * (dark_theme ? 1.15 : 1.45);
+ icon_hover_color.a = 1.0;
// Make the pressed icon color overbright because icons are not completely white on a dark theme.
// On a light theme, icons are dark, so we need to modulate them with an even brighter color.
- Color icon_color_pressed = accent_color * (dark_theme ? 1.15 : 3.5);
- icon_color_pressed.a = 1.0;
+ Color icon_pressed_color = accent_color * (dark_theme ? 1.15 : 3.5);
+ icon_pressed_color.a = 1.0;
const Color separator_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.1);
const Color highlight_color = Color(mono_color.r, mono_color.g, mono_color.b, 0.2);
+ float prev_icon_saturation = theme->has_color("icon_saturation", "Editor") ? theme->get_color("icon_saturation", "Editor").r : 1.0;
+
+ theme->set_color("icon_saturation", "Editor", Color(icon_saturation, icon_saturation, icon_saturation)); //can't save single float in theme, so using color
theme->set_color("accent_color", "Editor", accent_color);
theme->set_color("highlight_color", "Editor", highlight_color);
theme->set_color("base_color", "Editor", base_color);
@@ -408,8 +421,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("axis_z_color", "Editor", Color(0.16, 0.55, 0.96));
theme->set_color("font_color", "Editor", font_color);
- theme->set_color("highlighted_font_color", "Editor", font_color_hl);
- theme->set_color("disabled_font_color", "Editor", font_color_disabled);
+ theme->set_color("highlighted_font_color", "Editor", font_hover_color);
+ theme->set_color("disabled_font_color", "Editor", font_disabled_color);
theme->set_color("mono_color", "Editor", mono_color);
@@ -443,13 +456,13 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
//Register icons + font
// the resolution and the icon color (dark_theme bool) has not changed, so we do not regenerate the icons
- if (p_theme != nullptr && fabs(p_theme->get_constant("scale", "Editor") - EDSCALE) < 0.00001 && (bool)p_theme->get_constant("dark_theme", "Editor") == dark_theme) {
+ if (p_theme != nullptr && fabs(p_theme->get_constant("scale", "Editor") - EDSCALE) < 0.00001 && (bool)p_theme->get_constant("dark_theme", "Editor") == dark_theme && prev_icon_saturation == icon_saturation) {
// register already generated icons
for (int i = 0; i < editor_icons_count; i++) {
theme->set_icon(editor_icons_names[i], "EditorIcons", p_theme->get_icon(editor_icons_names[i], "EditorIcons"));
}
} else {
- editor_register_and_generate_icons(theme, dark_theme, thumb_size);
+ editor_register_and_generate_icons(theme, dark_theme, thumb_size, false, icon_saturation);
}
// thumbnail size has changed, so we regenerate the medium sizes
if (p_theme != nullptr && fabs((double)p_theme->get_constant("thumb_size", "Editor") - thumb_size) > 0.00001) {
@@ -485,8 +498,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_widget->set_border_color(dark_color_2);
Ref<StyleBoxFlat> style_widget_disabled = style_widget->duplicate();
- style_widget_disabled->set_border_color(color_disabled);
- style_widget_disabled->set_bg_color(color_disabled_bg);
+ style_widget_disabled->set_border_color(disabled_color);
+ style_widget_disabled->set_bg_color(disabled_bg_color);
Ref<StyleBoxFlat> style_widget_focus = style_widget->duplicate();
style_widget_focus->set_border_color(accent_color);
@@ -550,8 +563,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_tab_unselected->set_border_color(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(color_disabled);
+ style_tab_disabled->set_bg_color(disabled_bg_color);
+ style_tab_disabled->set_border_color(disabled_color);
// Editor background
theme->set_stylebox("Background", "EditorStyles", make_flat_stylebox(background_color, default_margin_size, default_margin_size, default_margin_size, default_margin_size));
@@ -600,7 +613,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("disabled", "PopupMenu", style_menu);
theme->set_color("font_color", "MenuButton", font_color);
- theme->set_color("font_color_hover", "MenuButton", font_color_hl);
+ theme->set_color("font_hover_color", "MenuButton", font_hover_color);
theme->set_stylebox("MenuHover", "EditorStyles", style_menu_hover_border);
@@ -612,11 +625,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("disabled", "Button", style_widget_disabled);
theme->set_color("font_color", "Button", font_color);
- theme->set_color("font_color_hover", "Button", font_color_hl);
- theme->set_color("font_color_pressed", "Button", accent_color);
- theme->set_color("font_color_disabled", "Button", font_color_disabled);
- theme->set_color("icon_color_hover", "Button", icon_color_hover);
- theme->set_color("icon_color_pressed", "Button", icon_color_pressed);
+ theme->set_color("font_hover_color", "Button", font_hover_color);
+ theme->set_color("font_pressed_color", "Button", accent_color);
+ theme->set_color("font_disabled_color", "Button", font_disabled_color);
+ theme->set_color("icon_hover_color", "Button", icon_hover_color);
+ theme->set_color("icon_pressed_color", "Button", icon_pressed_color);
// OptionButton
theme->set_stylebox("focus", "OptionButton", style_widget_focus);
@@ -632,10 +645,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("disabled_mirrored", "OptionButton", style_widget_disabled);
theme->set_color("font_color", "OptionButton", font_color);
- theme->set_color("font_color_hover", "OptionButton", font_color_hl);
- theme->set_color("font_color_pressed", "OptionButton", accent_color);
- theme->set_color("font_color_disabled", "OptionButton", font_color_disabled);
- theme->set_color("icon_color_hover", "OptionButton", icon_color_hover);
+ theme->set_color("font_hover_color", "OptionButton", font_hover_color);
+ theme->set_color("font_pressed_color", "OptionButton", accent_color);
+ theme->set_color("font_disabled_color", "OptionButton", font_disabled_color);
+ theme->set_color("icon_hover_color", "OptionButton", icon_hover_color);
theme->set_icon("arrow", "OptionButton", theme->get_icon("GuiOptionArrow", "EditorIcons"));
theme->set_constant("arrow_margin", "OptionButton", default_margin_size * EDSCALE);
theme->set_constant("modulate_arrow", "OptionButton", true);
@@ -658,10 +671,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("off_disabled_mirrored", "CheckButton", theme->get_icon("GuiToggleOffDisabledMirrored", "EditorIcons"));
theme->set_color("font_color", "CheckButton", font_color);
- theme->set_color("font_color_hover", "CheckButton", font_color_hl);
- theme->set_color("font_color_pressed", "CheckButton", accent_color);
- theme->set_color("font_color_disabled", "CheckButton", font_color_disabled);
- theme->set_color("icon_color_hover", "CheckButton", icon_color_hover);
+ theme->set_color("font_hover_color", "CheckButton", font_hover_color);
+ theme->set_color("font_pressed_color", "CheckButton", accent_color);
+ theme->set_color("font_disabled_color", "CheckButton", font_disabled_color);
+ theme->set_color("icon_hover_color", "CheckButton", icon_hover_color);
theme->set_constant("hseparation", "CheckButton", 4 * EDSCALE);
theme->set_constant("check_vadjust", "CheckButton", 0 * EDSCALE);
@@ -683,10 +696,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("radio_unchecked", "CheckBox", theme->get_icon("GuiRadioUnchecked", "EditorIcons"));
theme->set_color("font_color", "CheckBox", font_color);
- theme->set_color("font_color_hover", "CheckBox", font_color_hl);
- theme->set_color("font_color_pressed", "CheckBox", accent_color);
- theme->set_color("font_color_disabled", "CheckBox", font_color_disabled);
- theme->set_color("icon_color_hover", "CheckBox", icon_color_hover);
+ theme->set_color("font_hover_color", "CheckBox", font_hover_color);
+ theme->set_color("font_pressed_color", "CheckBox", accent_color);
+ theme->set_color("font_disabled_color", "CheckBox", font_disabled_color);
+ theme->set_color("icon_hover_color", "CheckBox", icon_hover_color);
theme->set_constant("hseparation", "CheckBox", 4 * EDSCALE);
theme->set_constant("check_vadjust", "CheckBox", 0 * EDSCALE);
@@ -697,9 +710,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// PopupMenu
const int popup_menu_margin_size = default_margin_size * 1.5 * EDSCALE;
Ref<StyleBoxFlat> style_popup_menu = style_popup->duplicate();
- style_popup_menu->set_default_margin(SIDE_LEFT, popup_menu_margin_size);
+ // Use 1 pixel for the sides, since if 0 is used, the highlight of hovered items is drawn
+ // on top of the popup border. This causes a 'gap' in the panel border when an item is highlighted,
+ // and it looks weird. 1px solves this.
+ style_popup_menu->set_default_margin(SIDE_LEFT, 1 * EDSCALE);
style_popup_menu->set_default_margin(SIDE_TOP, popup_menu_margin_size);
- style_popup_menu->set_default_margin(SIDE_RIGHT, popup_menu_margin_size);
+ style_popup_menu->set_default_margin(SIDE_RIGHT, 1 * EDSCALE);
style_popup_menu->set_default_margin(SIDE_BOTTOM, popup_menu_margin_size);
theme->set_stylebox("panel", "PopupMenu", style_popup_menu);
@@ -708,10 +724,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("labeled_separator_right", "PopupMenu", style_popup_labeled_separator_right);
theme->set_color("font_color", "PopupMenu", font_color);
- theme->set_color("font_color_hover", "PopupMenu", font_color_hl);
- theme->set_color("font_color_accel", "PopupMenu", font_color_disabled);
- theme->set_color("font_color_disabled", "PopupMenu", font_color_disabled);
- theme->set_color("font_color_separator", "PopupMenu", font_color_disabled);
+ theme->set_color("font_hover_color", "PopupMenu", font_hover_color);
+ theme->set_color("font_accelerator_color", "PopupMenu", font_disabled_color);
+ theme->set_color("font_disabled_color", "PopupMenu", font_disabled_color);
+ theme->set_color("font_separator_color", "PopupMenu", font_disabled_color);
theme->set_icon("checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons"));
theme->set_icon("unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
theme->set_icon("radio_checked", "PopupMenu", theme->get_icon("GuiRadioChecked", "EditorIcons"));
@@ -721,16 +737,63 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("visibility_hidden", "PopupMenu", theme->get_icon("GuiVisibilityHidden", "EditorIcons"));
theme->set_icon("visibility_visible", "PopupMenu", theme->get_icon("GuiVisibilityVisible", "EditorIcons"));
theme->set_icon("visibility_xray", "PopupMenu", theme->get_icon("GuiVisibilityXray", "EditorIcons"));
+
theme->set_constant("vseparation", "PopupMenu", (extra_spacing + default_margin_size + 1) * EDSCALE);
+ theme->set_constant("item_start_padding", "PopupMenu", popup_menu_margin_size * EDSCALE);
+ theme->set_constant("item_end_padding", "PopupMenu", popup_menu_margin_size * EDSCALE);
+
+ for (int i = 0; i < 16; i++) {
+ Color si_base_color = accent_color;
+
+ float hue_rotate = (i * 2 % 16) / 16.0;
+ si_base_color.set_hsv(Math::fmod(float(si_base_color.get_h() + hue_rotate), float(1.0)), si_base_color.get_s(), si_base_color.get_v());
+ si_base_color = accent_color.lerp(si_base_color, float(EDITOR_GET("docks/property_editor/subresource_hue_tint")));
+
+ Ref<StyleBoxFlat> sub_inspector_bg;
+
+ sub_inspector_bg = make_flat_stylebox(dark_color_1.lerp(si_base_color, 0.08), 2, 0, 2, 2);
+
+ sub_inspector_bg->set_border_width(SIDE_LEFT, 2);
+ sub_inspector_bg->set_border_width(SIDE_RIGHT, 2);
+ sub_inspector_bg->set_border_width(SIDE_BOTTOM, 2);
+ sub_inspector_bg->set_border_width(SIDE_TOP, 2);
+ sub_inspector_bg->set_default_margin(SIDE_LEFT, 3);
+ sub_inspector_bg->set_default_margin(SIDE_RIGHT, 3);
+ sub_inspector_bg->set_default_margin(SIDE_BOTTOM, 10);
+ sub_inspector_bg->set_default_margin(SIDE_TOP, 5);
+ sub_inspector_bg->set_border_color(si_base_color * Color(0.7, 0.7, 0.7, 0.8));
+ sub_inspector_bg->set_draw_center(true);
+
+ theme->set_stylebox("sub_inspector_bg" + itos(i), "Editor", sub_inspector_bg);
- Ref<StyleBoxFlat> sub_inspector_bg = make_flat_stylebox(dark_color_1.lerp(accent_color, 0.08), 2, 0, 2, 2);
- sub_inspector_bg->set_border_width(SIDE_LEFT, 2);
- sub_inspector_bg->set_border_width(SIDE_RIGHT, 2);
- sub_inspector_bg->set_border_width(SIDE_BOTTOM, 2);
- sub_inspector_bg->set_border_color(accent_color * Color(1, 1, 1, 0.3));
- sub_inspector_bg->set_draw_center(true);
+ Ref<StyleBoxFlat> bg_color;
+ bg_color.instance();
+ bg_color->set_bg_color(si_base_color * Color(0.7, 0.7, 0.7, 0.8));
+ bg_color->set_border_width_all(0);
+
+ Ref<StyleBoxFlat> bg_color_selected;
+ bg_color_selected.instance();
+ bg_color_selected->set_border_width_all(0);
+ bg_color_selected->set_bg_color(si_base_color * Color(0.8, 0.8, 0.8, 0.8));
+
+ theme->set_stylebox("sub_inspector_property_bg" + itos(i), "Editor", bg_color);
+ theme->set_stylebox("sub_inspector_property_bg_selected" + itos(i), "Editor", bg_color_selected);
+ }
+
+ theme->set_color("sub_inspector_property_color", "Editor", dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1));
+ theme->set_constant("sub_inspector_font_offset", "Editor", 4 * EDSCALE);
+
+ Ref<StyleBoxFlat> style_property_bg = style_default->duplicate();
+ style_property_bg->set_bg_color(highlight_color);
+ style_property_bg->set_border_width_all(0);
+
+ theme->set_constant("font_offset", "EditorProperty", 1 * EDSCALE);
+ theme->set_stylebox("bg_selected", "EditorProperty", style_property_bg);
+ theme->set_stylebox("bg", "EditorProperty", Ref<StyleBoxEmpty>(memnew(StyleBoxEmpty)));
+ theme->set_constant("vseparation", "EditorProperty", (extra_spacing + default_margin_size) * EDSCALE);
+ theme->set_color("error_color", "EditorProperty", error_color);
+ theme->set_color("property_color", "EditorProperty", property_color);
- theme->set_stylebox("sub_inspector_bg", "Editor", sub_inspector_bg);
theme->set_constant("inspector_margin", "Editor", 8 * EDSCALE);
// Tree & ItemList background
@@ -753,9 +816,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("custom_button", "Tree", make_empty_stylebox());
theme->set_stylebox("custom_button_pressed", "Tree", make_empty_stylebox());
theme->set_stylebox("custom_button_hover", "Tree", style_widget);
- theme->set_color("custom_button_font_highlight", "Tree", font_color_hl);
+ theme->set_color("custom_button_font_highlight", "Tree", font_hover_color);
theme->set_color("font_color", "Tree", font_color);
- theme->set_color("font_color_selected", "Tree", mono_color);
+ theme->set_color("font_selected_color", "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);
@@ -826,7 +889,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("bg_focus", "ItemList", style_focus);
theme->set_stylebox("bg", "ItemList", style_itemlist_bg);
theme->set_color("font_color", "ItemList", font_color);
- theme->set_color("font_color_selected", "ItemList", mono_color);
+ theme->set_color("font_selected_color", "ItemList", mono_color);
theme->set_color("guide_color", "ItemList", guide_color);
theme->set_constant("vseparation", "ItemList", 3 * EDSCALE);
theme->set_constant("hseparation", "ItemList", 3 * EDSCALE);
@@ -834,16 +897,16 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_constant("line_separation", "ItemList", 3 * EDSCALE);
// Tabs & TabContainer
- theme->set_stylebox("tab_fg", "TabContainer", style_tab_selected);
- theme->set_stylebox("tab_bg", "TabContainer", style_tab_unselected);
+ theme->set_stylebox("tab_selected", "TabContainer", style_tab_selected);
+ theme->set_stylebox("tab_unselected", "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_selected", "Tabs", style_tab_selected);
+ theme->set_stylebox("tab_unselected", "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);
- theme->set_color("font_color_bg", "Tabs", font_color_disabled);
+ theme->set_color("font_selected_color", "TabContainer", font_color);
+ theme->set_color("font_unselected_color", "TabContainer", font_disabled_color);
+ theme->set_color("font_selected_color", "Tabs", font_color);
+ theme->set_color("font_unselected_color", "Tabs", font_disabled_color);
theme->set_icon("menu", "TabContainer", theme->get_icon("GuiTabMenu", "EditorIcons"));
theme->set_icon("menu_highlight", "TabContainer", theme->get_icon("GuiTabMenuHl", "EditorIcons"));
theme->set_stylebox("SceneTabFG", "EditorStyles", style_tab_selected);
@@ -891,7 +954,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("DebuggerPanel", "EditorStyles", style_panel_debugger);
Ref<StyleBoxFlat> style_panel_invisible_top = style_content_panel->duplicate();
- int stylebox_offset = theme->get_font("tab_fg", "TabContainer")->get_height(theme->get_font_size("tab_fg", "TabContainer")) + theme->get_stylebox("tab_fg", "TabContainer")->get_minimum_size().height + theme->get_stylebox("panel", "TabContainer")->get_default_margin(SIDE_TOP);
+ int stylebox_offset = theme->get_font("tab_selected", "TabContainer")->get_height(theme->get_font_size("tab_selected", "TabContainer")) + theme->get_stylebox("tab_selected", "TabContainer")->get_minimum_size().height + theme->get_stylebox("panel", "TabContainer")->get_default_margin(SIDE_TOP);
style_panel_invisible_top->set_expand_margin_size(SIDE_TOP, -stylebox_offset);
style_panel_invisible_top->set_default_margin(SIDE_TOP, 0);
theme->set_stylebox("BottomPanelDebuggerOverride", "EditorStyles", style_panel_invisible_top);
@@ -901,11 +964,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("focus", "LineEdit", style_widget_focus);
theme->set_stylebox("read_only", "LineEdit", style_widget_disabled);
theme->set_icon("clear", "LineEdit", theme->get_icon("GuiClose", "EditorIcons"));
- theme->set_color("read_only", "LineEdit", font_color_disabled);
+ theme->set_color("read_only", "LineEdit", font_disabled_color);
theme->set_color("font_color", "LineEdit", font_color);
- theme->set_color("font_color_selected", "LineEdit", mono_color);
+ theme->set_color("font_selected_color", "LineEdit", mono_color);
theme->set_color("cursor_color", "LineEdit", font_color);
- theme->set_color("selection_color", "LineEdit", font_color_selection);
+ theme->set_color("selection_color", "LineEdit", selection_color);
theme->set_color("clear_button_color", "LineEdit", font_color);
theme->set_color("clear_button_color_pressed", "LineEdit", accent_color);
@@ -918,7 +981,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("space", "TextEdit", theme->get_icon("GuiSpace", "EditorIcons"));
theme->set_color("font_color", "TextEdit", font_color);
theme->set_color("caret_color", "TextEdit", font_color);
- theme->set_color("selection_color", "TextEdit", font_color_selection);
+ theme->set_color("selection_color", "TextEdit", selection_color);
// CodeEdit
theme->set_stylebox("normal", "CodeEdit", style_widget);
@@ -932,7 +995,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("executing_line", "CodeEdit", theme->get_icon("MainPlay", "EditorIcons"));
theme->set_color("font_color", "CodeEdit", font_color);
theme->set_color("caret_color", "CodeEdit", font_color);
- theme->set_color("selection_color", "CodeEdit", font_color_selection);
+ theme->set_color("selection_color", "CodeEdit", selection_color);
// H/VSplitContainer
theme->set_stylebox("bg", "VSplitContainer", make_stylebox(theme->get_icon("GuiVsplitBg", "EditorIcons"), 1, 1, 1, 1));
@@ -1023,7 +1086,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
//RichTextLabel
theme->set_color("default_color", "RichTextLabel", font_color);
- theme->set_color("font_color_shadow", "RichTextLabel", Color(0, 0, 0, 0));
+ theme->set_color("font_shadow_color", "RichTextLabel", Color(0, 0, 0, 0));
theme->set_constant("shadow_offset_x", "RichTextLabel", 1 * EDSCALE);
theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * EDSCALE);
theme->set_constant("shadow_as_outline", "RichTextLabel", 0 * EDSCALE);
@@ -1039,7 +1102,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Label
theme->set_stylebox("normal", "Label", style_empty);
theme->set_color("font_color", "Label", font_color);
- theme->set_color("font_color_shadow", "Label", Color(0, 0, 0, 0));
+ theme->set_color("font_shadow_color", "Label", Color(0, 0, 0, 0));
theme->set_constant("shadow_offset_x", "Label", 1 * EDSCALE);
theme->set_constant("shadow_offset_y", "Label", 1 * EDSCALE);
theme->set_constant("shadow_as_outline", "Label", 0 * EDSCALE);
@@ -1048,9 +1111,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// LinkButton
theme->set_stylebox("focus", "LinkButton", style_empty);
theme->set_color("font_color", "LinkButton", font_color);
- theme->set_color("font_color_hover", "LinkButton", font_color_hl);
- theme->set_color("font_color_pressed", "LinkButton", accent_color);
- theme->set_color("font_color_disabled", "LinkButton", font_color_disabled);
+ theme->set_color("font_hover_color", "LinkButton", font_hover_color);
+ theme->set_color("font_pressed_color", "LinkButton", accent_color);
+ theme->set_color("font_disabled_color", "LinkButton", font_disabled_color);
// TooltipPanel
Ref<StyleBoxFlat> style_tooltip = style_popup->duplicate();
@@ -1063,7 +1126,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_tooltip->set_border_width_all(border_width);
style_tooltip->set_border_color(mono_color);
theme->set_color("font_color", "TooltipLabel", font_color.inverted());
- theme->set_color("font_color_shadow", "TooltipLabel", mono_color.inverted() * Color(1, 1, 1, 0.1));
+ theme->set_color("font_shadow_color", "TooltipLabel", mono_color.inverted() * Color(1, 1, 1, 0.1));
theme->set_stylebox("panel", "TooltipPanel", style_tooltip);
// PopupPanel
@@ -1098,7 +1161,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_constant("bezier_len_neg", "GraphEdit", 160 * EDSCALE);
// GraphEditMinimap
- theme->set_stylebox("bg", "GraphEditMinimap", make_flat_stylebox(dark_color_1, 0, 0, 0, 0));
+ Ref<StyleBoxFlat> style_minimap_bg = make_flat_stylebox(dark_color_1, 0, 0, 0, 0);
+ style_minimap_bg->set_border_color(dark_color_3);
+ style_minimap_bg->set_border_width_all(1);
+ theme->set_stylebox("bg", "GraphEditMinimap", style_minimap_bg);
+
Ref<StyleBoxFlat> style_minimap_camera;
Ref<StyleBoxFlat> style_minimap_node;
if (dark_theme) {
@@ -1115,9 +1182,15 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("camera", "GraphEditMinimap", style_minimap_camera);
theme->set_stylebox("node", "GraphEditMinimap", style_minimap_node);
- Ref<Texture2D> resizer_icon = theme->get_icon("GuiResizer", "EditorIcons");
- theme->set_icon("resizer", "GraphEditMinimap", flip_icon(resizer_icon, true, true));
- theme->set_color("resizer_color", "GraphEditMinimap", Color(1, 1, 1, 0.65));
+ Ref<Texture2D> minimap_resizer_icon = theme->get_icon("GuiResizer", "EditorIcons");
+ Color minimap_resizer_color;
+ if (dark_theme) {
+ minimap_resizer_color = Color(1, 1, 1, 0.65);
+ } else {
+ minimap_resizer_color = Color(0, 0, 0, 0.65);
+ }
+ theme->set_icon("resizer", "GraphEditMinimap", flip_icon(minimap_resizer_icon, true, true));
+ theme->set_color("resizer_color", "GraphEditMinimap", minimap_resizer_color);
// GraphNode
const float mv = dark_theme ? 0.0 : 1.0;
@@ -1198,7 +1271,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// Use a different color for folder icons to make them easier to distinguish from files.
// On a light theme, the icon will be dark, so we need to lighten it before blending it with the accent color.
theme->set_color("folder_icon_modulate", "FileDialog", (dark_theme ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25)).lerp(accent_color, 0.7));
- theme->set_color("files_disabled", "FileDialog", font_color_disabled);
+ theme->set_color("files_disabled", "FileDialog", font_disabled_color);
// color picker
theme->set_constant("margin", "ColorPicker", popup_margin_size);
@@ -1251,7 +1324,6 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color caret_color = mono_color;
const Color caret_background_color = mono_color.inverted();
const Color text_selected_color = dark_color_3;
- const Color selection_color = accent_color * Color(1, 1, 1, 0.35);
const Color brace_mismatch_color = error_color;
const Color current_line_color = alpha1;
const Color line_length_guideline_color = dark_theme ? base_color : background_color;
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp
index 02bbeb57c7..07edae833d 100644
--- a/editor/fileserver/editor_file_server.cpp
+++ b/editor/fileserver/editor_file_server.cpp
@@ -43,7 +43,7 @@ void EditorFileServer::_close_client(ClientData *cd) {
cd->connection->disconnect_from_host();
{
MutexLock lock(cd->efs->wait_mutex);
- cd->efs->to_wait.insert(cd->thread);
+ cd->efs->to_wait.insert(&cd->thread);
}
while (cd->files.size()) {
memdelete(cd->files.front()->get());
@@ -278,7 +278,7 @@ void EditorFileServer::_thread_start(void *s) {
cd->connection = self->server->take_connection();
cd->efs = self;
cd->quit = false;
- cd->thread = Thread::create(_subthread_start, cd);
+ cd->thread.start(_subthread_start, cd);
}
}
@@ -287,8 +287,7 @@ void EditorFileServer::_thread_start(void *s) {
Thread *w = self->to_wait.front()->get();
self->to_wait.erase(w);
self->wait_mutex.unlock();
- Thread::wait_to_finish(w);
- memdelete(w);
+ w->wait_to_finish();
self->wait_mutex.lock();
}
self->wait_mutex.unlock();
@@ -317,7 +316,7 @@ EditorFileServer::EditorFileServer() {
quit = false;
active = false;
cmd = CMD_NONE;
- thread = Thread::create(_thread_start, this);
+ thread.start(_thread_start, this);
EDITOR_DEF("filesystem/file_server/port", 6010);
EDITOR_DEF("filesystem/file_server/password", "");
@@ -325,6 +324,5 @@ EditorFileServer::EditorFileServer() {
EditorFileServer::~EditorFileServer() {
quit = true;
- Thread::wait_to_finish(thread);
- memdelete(thread);
+ thread.wait_to_finish();
}
diff --git a/editor/fileserver/editor_file_server.h b/editor/fileserver/editor_file_server.h
index 267b129bda..e4c8327d76 100644
--- a/editor/fileserver/editor_file_server.h
+++ b/editor/fileserver/editor_file_server.h
@@ -47,7 +47,7 @@ class EditorFileServer : public Object {
};
struct ClientData {
- Thread *thread = nullptr;
+ Thread thread;
Ref<StreamPeerTCP> connection;
Map<int, FileAccess *> files;
EditorFileServer *efs = nullptr;
@@ -61,7 +61,7 @@ class EditorFileServer : public Object {
static void _subthread_start(void *s);
Mutex wait_mutex;
- Thread *thread;
+ Thread thread;
static void _thread_start(void *);
bool quit;
Command cmd;
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index e8cf081320..ab5fd30998 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -76,6 +76,9 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
subdirectory_item->set_metadata(0, lpath);
if (!p_select_in_favorites && (path == lpath || ((display_mode == DISPLAY_MODE_SPLIT) && path.get_base_dir() == lpath))) {
subdirectory_item->select(0);
+ // Keep select an item when re-created a tree
+ // To prevent crashing when nothing is selected.
+ subdirectory_item->set_as_cursor(0);
}
if (p_unfold_path && path.begins_with(lpath) && path != lpath) {
@@ -1407,10 +1410,28 @@ void FileSystemDock::_make_scene_confirm() {
void FileSystemDock::_file_removed(String p_file) {
emit_signal("file_removed", p_file);
+
+ // Find the closest parent directory available, in case multiple items were deleted along the same path.
+ path = p_file.get_base_dir();
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ while (!da->dir_exists(path)) {
+ path = path.get_base_dir();
+ }
+
+ current_path->set_text(path);
}
void FileSystemDock::_folder_removed(String p_folder) {
emit_signal("folder_removed", p_folder);
+
+ // Find the closest parent directory available, in case multiple items were deleted along the same path.
+ path = p_folder.get_base_dir();
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ while (!da->dir_exists(path)) {
+ path = path.get_base_dir();
+ }
+
+ current_path->set_text(path);
}
void FileSystemDock::_rename_operation_confirm() {
@@ -1465,6 +1486,9 @@ void FileSystemDock::_rename_operation_confirm() {
print_verbose("FileSystem: saving moved scenes.");
_save_scenes_after_move(file_renames);
+
+ path = new_path;
+ current_path->set_text(path);
}
void FileSystemDock::_duplicate_operation_confirm() {
@@ -1573,6 +1597,9 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool p_ove
print_verbose("FileSystem: saving moved scenes.");
_save_scenes_after_move(file_renames);
+
+ path = p_to_path;
+ current_path->set_text(path);
}
}
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index c2f2254023..47079a92b7 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -463,7 +463,7 @@ void FindInFilesDialog::_notification(int p_what) {
for (int i = 0; i < _filters_container->get_child_count(); i++) {
_filters_container->get_child(i)->queue_delete();
}
- Array exts = ProjectSettings::get_singleton()->get("editor/search_in_file_extensions");
+ Array exts = ProjectSettings::get_singleton()->get("editor/script/search_in_file_extensions");
for (int i = 0; i < exts.size(); ++i) {
CheckBox *cb = memnew(CheckBox);
cb->set_text(exts[i]);
@@ -687,6 +687,9 @@ void FindInFilesPanel::stop_search() {
void FindInFilesPanel::_notification(int p_what) {
if (p_what == NOTIFICATION_PROCESS) {
_progress_bar->set_as_ratio(_finder->get_progress());
+ } else if (p_what == NOTIFICATION_THEME_CHANGED) {
+ _search_text_label->add_theme_font_override("font", get_theme_font("source", "EditorFonts"));
+ _results_display->add_theme_font_override("font", get_theme_font("source", "EditorFonts"));
}
}
diff --git a/editor/icons/GPUParticlesAttractorBox.svg b/editor/icons/GPUParticlesAttractorBox.svg
new file mode 100644
index 0000000000..3c27b2d3cb
--- /dev/null
+++ b/editor/icons/GPUParticlesAttractorBox.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" fill="#fc9c9c" fill-opacity=".996078" r="1"/><g fill="none" stroke="#fc9c9c" stroke-opacity=".996078"><ellipse cx="8" cy="-8" rx="2.339226" ry="4.949748" transform="rotate(90)"/><ellipse cx="8" cy="8" rx="2.339226" ry="4.949748"/><path d="m1.498906 1.498906h13.002189v13.002188h-13.002189z" stroke-width=".997813"/></g></svg>
diff --git a/editor/icons/GPUParticlesAttractorSphere.svg b/editor/icons/GPUParticlesAttractorSphere.svg
new file mode 100644
index 0000000000..5473a23854
--- /dev/null
+++ b/editor/icons/GPUParticlesAttractorSphere.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><ellipse cx="-8" cy="-7.999999" fill="none" rx="6.499003" ry="6.499001" stroke="#fc9c9c" stroke-opacity=".996078" stroke-width="1.002" transform="scale(-1)"/><circle cx="8" cy="8" fill="#fc9c9c" fill-opacity=".996078" r="1"/><g fill="none" stroke="#fc9c9c" stroke-opacity=".996078"><ellipse cx="11.313708" rx="2.339226" ry="4.949748" transform="matrix(.70710678 .70710678 -.70710678 .70710678 0 0)"/><ellipse cy="11.313708" rx="2.339226" ry="4.949748" transform="matrix(.70710678 -.70710678 .70710678 .70710678 0 0)"/></g></svg>
diff --git a/editor/icons/GPUParticlesAttractorVectorField.svg b/editor/icons/GPUParticlesAttractorVectorField.svg
new file mode 100644
index 0000000000..93a29789e3
--- /dev/null
+++ b/editor/icons/GPUParticlesAttractorVectorField.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><ellipse cx="6.663637" cy="9.245457" fill="#fc9c9c" fill-opacity=".996078" rx="1.030661" ry=".998146"/><ellipse cx="-6.672815" cy="-9.387111" fill="none" rx="2.408711" ry="5.096776" stroke="#fc9c9c" stroke-opacity=".996078" stroke-width="1.0297" transform="matrix(-.99999945 .00104887 .00104887 -.99999945 0 0)"/><ellipse cx="9.387111" cy="-6.672815" fill="none" rx="2.408711" ry="5.096776" stroke="#fc9c9c" stroke-opacity=".996078" stroke-width="1.0297" transform="matrix(-.00104887 .99999945 -.99999945 .00104887 0 0)"/><g fill="#fc9c9c" fill-opacity=".996078"><path d="m11.8 15 2.4-2.4.8.8v-2.4h-2.4l.8.8-2.4 2.4z"/><path d="m11 6 3-3 1 1v-3h-3l1 1-3 3z"/><path d="m1.8 5 2.4-2.4.8.8v-2.4h-2.4l.8.8-2.4 2.4z"/></g></svg>
diff --git a/editor/icons/GPUParticlesCollisionBox.svg b/editor/icons/GPUParticlesCollisionBox.svg
new file mode 100644
index 0000000000..f7296b34c3
--- /dev/null
+++ b/editor/icons/GPUParticlesCollisionBox.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 14.999999 14.999999" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc9c9c" fill-opacity=".996078"><path d="m7.5 2.8124998-5.5883107 2.7941554v5.7660988l5.5883107 2.794155 5.588311-2.794155v-5.7660988zm0 1.6886278 3.145021 1.5732692-3.145021 1.5717523-3.1450214-1.5717523zm-3.9916505 2.8362274 3.1933204 1.5966602v3.1465378l-3.1933204-1.598256zm7.9833015 0v3.145021l-3.1933209 1.598257v-3.146538z" stroke-width=".851579"/><circle cx="1.875" cy="3.75" r=".9375"/><circle cx="13.124999" cy="3.75" r=".9375"/><circle cx="9.374999" cy="1.875" r=".9375"/><circle cx="5.625" cy="1.875" r=".9375"/></g></svg>
diff --git a/editor/icons/GPUParticlesCollisionHeightField.svg b/editor/icons/GPUParticlesCollisionHeightField.svg
new file mode 100644
index 0000000000..b483f299e9
--- /dev/null
+++ b/editor/icons/GPUParticlesCollisionHeightField.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc9c9c"><path d="m1 10c1-1 3-2 3-4s2-4 4-4 4 2 4 4 2 3 3 4l-7 5z"/><circle cx="2" cy="6" r="1"/><circle cx="14" cy="6" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="4" cy="2" r="1"/></g></svg>
diff --git a/editor/icons/GPUParticlesCollisionSDF.svg b/editor/icons/GPUParticlesCollisionSDF.svg
new file mode 100644
index 0000000000..6279990f3a
--- /dev/null
+++ b/editor/icons/GPUParticlesCollisionSDF.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m14 14h-12v-9s3 4 5.9999999 3.9999999c3.0000001-.0000001 6.0000001-3.9999999 6.0000001-3.9999999z" fill="none" stroke="#fc9c9c" stroke-linejoin="round" stroke-opacity=".996078" stroke-width="2"/><g fill="#fc9c9c" fill-opacity=".996078"><circle cx="2" cy="2" r="1"/><circle cx="14" cy="2" r="1"/><circle cx="10" cy="5" r="1"/><circle cx="6" cy="5" r="1"/></g></svg>
diff --git a/editor/icons/GPUParticlesCollisionSphere.svg b/editor/icons/GPUParticlesCollisionSphere.svg
new file mode 100644
index 0000000000..fc7715445c
--- /dev/null
+++ b/editor/icons/GPUParticlesCollisionSphere.svg
@@ -0,0 +1 @@
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#fc9c9c" fill-opacity=".996078"><path d="m8 3.0532484c-3.2888554 0-5.9733758 2.6845204-5.9733758 5.9733758 0 3.2889408 2.6845204 5.9733758 5.9733758 5.9733758 3.288855 0 5.973376-2.684435 5.973376-5.9733758 0-3.2888554-2.684521-5.9733758-5.973376-5.9733758zm-.8533394 1.79005v4.1567016c-1.1034532-.0608789-2.2238878-.2544573-3.3650586-.5900074.256693-1.7901354 1.6087154-3.2141029 3.3650586-3.5667027zm1.7066788 0c1.7535276.3520281 3.1035956 1.77213 3.3633516 3.55834-1.113266.3129793-2.2321649.5142138-3.3633516.5866709zm3.2300606 5.3599956c-.434043 1.51792-1.663927 2.690664-3.2300606 3.005035v-2.518376c1.0915918-.0617 2.1691036-.227875 3.2300606-.486668zm-8.161765.015c1.0865571.272147 2.162106.428504 3.2250256.480003v2.510013c-1.5608431-.313338-2.7870065-1.479605-3.2250256-2.990016z" stroke-width=".853339"/><circle cx="2" cy="5" r="1"/><circle cx="14" cy="5" r="1"/><circle cx="10" cy="2" r="1"/><circle cx="6" cy="2" r="1"/></g></svg>
diff --git a/editor/icons/Logo.svg b/editor/icons/Logo.svg
index d7aef39cc9..a4ad488396 100644
--- a/editor/icons/Logo.svg
+++ b/editor/icons/Logo.svg
@@ -1 +1 @@
-<svg height="69" viewBox="0 0 187 69" width="187" xmlns="http://www.w3.org/2000/svg"><path d="m91.912 19.51c-3.5233 0-6.278 1.1097-8.2676 3.3281-1.9911 2.2193-2.9844 5.1004-2.9844 8.6465 0 4.1636 1.0165 7.3207 3.0508 9.4707 2.0379 2.1497 4.7123 3.2227 8.0293 3.2227 1.7838 0 3.3686-.15384 4.752-.46289 1.3848-.30784 2.3038-.62367 2.7617-.94336l.13867-10.736c0-.62388-1.6471-.90785-3.4941-.93945-1.847-.02857-3.9609.35742-3.9609.35742v3.6055h2.125l-.023438 1.6055c0 .59532-.59062.89453-1.7676.89453-1.1785 0-2.2182-.4989-3.1211-1.4941-.90498-.99645-1.3555-2.4517-1.3555-4.3711 0-1.9233.43964-3.3428 1.3203-4.2578.87885-.9141 2.0322-1.3711 3.4492-1.3711.59532 0 1.2107.095008 1.8516.29102.64121.19418 1.0686.37639 1.2871.54688.21667.17534.42435.25781.61914.25781.19388 0 .50715-.22698.94141-.68555.43487-.45735.82427-1.1501 1.168-2.0742.34218-.92899.51367-1.6414.51367-2.1465 0-.50111-.011023-.84501-.033203-1.0273-.48045-.52573-1.3668-.94394-2.6602-1.2539-1.2909-.30906-2.7387-.46289-4.3398-.46289zm21.049 0c-3.2367 0-5.8788 1.0413-7.9258 3.1211-2.0464 2.0826-3.0703 5.1404-3.0703 9.1797 0 4.0369 1.0128 7.1085 3.0352 9.2129 2.0251 2.1026 4.6444 3.1543 7.8574 3.1543 3.2145 0 5.8383-1.0111 7.875-3.0332 2.0367-2.0263 3.0527-5.1142 3.0527-9.2656 0-4.1484-.99433-7.2508-2.9863-9.2969-1.9884-2.05-4.6018-3.0723-7.8379-3.0723zm45.504 0c-3.2379 0-5.8792 1.0413-7.9277 3.1211-2.0461 2.0826-3.0684 5.1404-3.0684 9.1797 0 4.0369 1.0104 7.1085 3.0352 9.2129 2.0233 2.1026 4.6432 3.1543 7.8574 3.1543 3.213 0 5.8373-1.0111 7.873-3.0332 2.0364-2.0263 3.0547-5.1142 3.0547-9.2656 0-4.1484-.9939-7.2508-2.9844-9.2969-1.9908-2.05-4.6031-3.0723-7.8398-3.0723zm-30.105.30859c-.45888 0-.82988.16637-1.1152.49609-.28717.33489-.42969.78715-.42969 1.3594v20.584c0 1.053.58624 1.5781 1.752 1.5781h5.8652c7.1824-.000001 10.773-4.2092 10.773-12.627 0-3.9348-.94335-6.8151-2.832-8.6445-1.8853-1.83-4.6472-2.7461-8.2832-2.7461h-5.7305zm42.807 0c-.38928 0-.66468.52801-.82422 1.5801-.0687.50294-.10157 1.0191-.10157 1.543 0 .52694.03287 1.0409.10157 1.543.15954 1.0548.43494 1.5801.82422 1.5801h4.1152v17.225c0 .45462 1.1351.68555 3.3984.68555 2.2655 0 3.3965-.23093 3.3965-.68555v-17.225h4.0137c.38868 0 .66225-.52528.82422-1.5801.0672-.50202.10156-1.016.10156-1.543.00001-.52391-.03436-1.04-.10156-1.543-.16197-1.0521-.43554-1.5801-.82422-1.5801h-14.924zm-58.291 6.2793c1.0989 0 2.0193.49244 2.7617 1.4746.74331.98339 1.1152 2.3913 1.1152 4.2207 0 1.8309-.35955 3.2363-1.0801 4.2188-.72053.98612-1.6597 1.4785-2.8145 1.4785-1.1554 0-2.0859-.48441-2.7949-1.459-.71019-.97154-1.0644-2.3663-1.0644-4.1875 0-1.8173.37148-3.2302 1.1133-4.2363.74574-1.0053 1.6663-1.5098 2.7637-1.5098zm45.504 0c1.0989 0 2.0181.49244 2.7617 1.4746.74331.98339 1.1152 2.3913 1.1152 4.2207 0 1.8309-.3612 3.2363-1.082 4.2188-.71961.98612-1.6574 1.4785-2.8125 1.4785-1.1554 0-2.0888-.48441-2.7969-1.459-.70806-.97154-1.0625-2.3663-1.0625-4.1875 0-1.8173.37179-3.2302 1.1133-4.2363.74453-1.0053 1.666-1.5098 2.7637-1.5098zm-24.977.23828h.34375c1.4638 0 2.5334.33466 3.209.99805.6722.66157 1.0098 2.0859 1.0098 4.2715 0 2.1847-.32289 3.7447-.97656 4.6816-.65214.9378-1.6059 1.4082-2.8652 1.4082-.34218 0-.54909-.063339-.61719-.18945-.06873-.12672-.10352-.42897-.10352-.9082v-10.262z" fill="#fff"/><path d="m137.91 48.551v1.2109h.85938v-1.2109zm-52.396.58984c-.99736 0-1.7963.32424-2.3926.96484-.59745.64576-.89453 1.5712-.89453 2.7773v3.0742c0 1.2329.31639 2.1765.94727 2.832.6333.66066 1.467.98828 2.5039.98828.78586 0 1.4321-.16147 1.9414-.48633.50993-.32273.8592-.67938 1.0488-1.0684v-3.6875h-3.0059v.74805h2.1465v2.6934c-.13766.30115-.38143.55386-.73242.76172-.34978.2109-.8171.31445-1.3984.31445-.79619 0-1.4265-.2632-1.8945-.78711-.46799-.52786-.70312-1.2936-.70312-2.2988v-3.0918c0-.96941.21778-1.7078.65234-2.2168.43578-.51023 1.0297-.76367 1.7812-.76367.74271 0 1.3056.19019 1.6836.56641.38017.37925.58276.91542.61133 1.6113h.79492l.013672-.041016c-.024311-.90802-.30456-1.6179-.83789-2.127-.53484-.50719-1.2907-.76367-2.2656-.76367zm7.6133 2.6641c-.719 0-1.3111.22524-1.7715.67773-.46222.45371-.68069.96571-.6582 1.5449l.013672.041015.79688.007813c0-.42696.14768-.78487.44336-1.0781.2966-.29508.67455-.44141 1.1328-.44141.4926 0 .87459.15388 1.1523.45898.27198.30906.41016.73655.41016 1.2793v.94531h-1.3418c-.85666 0-1.5379.21084-2.0391.63477-.50142.42392-.75195.99502-.75195 1.707 0 .67372.17358 1.2075.51758 1.6035.34613.39445.83497.5918 1.4707.5918.45462 0 .86723-.12355 1.2383-.37305.37166-.24767.67317-.56424.90625-.94531 0 .17413.01089.34527.03125.51758.02097.16927.053163.38614.095703.65234h.88867c-.062302-.24767-.10234-.49621-.12695-.75391-.02401-.25436-.037109-.52051-.037109-.79492v-3.7676c0-.80622-.21809-1.4265-.65234-1.8613-.43669-.43061-1.0083-.64648-1.7188-.64648zm7.1152 0c-.45462 0-.85109.11505-1.1875.3457-.33519.23369-.60486.56357-.80664.99023l-.074219-1.1934h-.75195v7.6816h.85352v-5.5293c.11791-.47346.31244-.84655.58594-1.1191.27168-.27107.63379-.4082 1.082-.4082.4689 0 .83314.19466 1.0957.58789.26378.39323.39258 1.0508.39258 1.9707v4.498h.85351v-4.6211-.19922c.0623-.64455.23396-1.1785.51172-1.6055.27927-.42696.66855-.63672 1.166-.63672.47285 0 .83879.19223 1.0938.57422.25345.38138.38281 1.0443.38281 1.9863v4.502h.85742v-4.4863c0-1.1332-.18468-1.9728-.55664-2.5195-.37044-.54548-.89268-.81836-1.5664-.81836-.48897 0-.91182.1465-1.2598.43945-.34796.29234-.61537.69589-.80469 1.207-.148-.55369-.38151-.966-.69726-1.2383-.31543-.2732-.70589-.4082-1.1699-.4082zm10.316 0c-.74423-.000001-1.3797.32125-1.9082.96094-.52725.64273-.78906 1.4505-.78906 2.4199v1.2754c0 .96758.26259 1.762.7871 2.3828.52604.62206 1.2032.93359 2.0312.93359.5157 0 .95833-.090281 1.3242-.26562.36679-.17626.66658-.41287.89844-.70703l-.34961-.60547c-.21728.27441-.4784.4836-.7832.63281-.3048.14586-.66987.2207-1.0898.2207-.60443 0-1.0864-.24489-1.4414-.74023-.35433-.49412-.53321-1.1138-.53321-1.8574v-.63867h4.3965v-.84375c0-.96667-.22381-1.7371-.66992-2.3105-.44519-.57253-1.0684-.85742-1.873-.85742zm9.4727 0c-.74423-.000001-1.3782.32125-1.9082.96094-.52603.64273-.79101 1.4505-.79101 2.4199v1.2754c0 .96758.26241 1.762.78906 2.3828.52512.62206 1.2028.93359 2.0312.93359.51601 0 .95639-.090281 1.3223-.26562.36741-.17626.66822-.41287.90039-.70703l-.34766-.60547c-.21972.27441-.4811.4836-.78711.63281-.30389.14586-.66639.2207-1.0879.2207-.60656 0-1.0883-.24489-1.4414-.74023-.35646-.49412-.5332-1.1138-.5332-1.8574v-.63867h4.3945v-.84375c0-.96667-.22338-1.7371-.66797-2.3105-.44398-.57253-1.0699-.85742-1.873-.85742zm6.8672 0c-.45614 0-.85274.12451-1.1894.36914-.33975.24342-.60962.5923-.81445 1.043l-.07031-1.2695h-.76172v7.6816h.85351v-5.4824c.14617-.47923.36569-.85918.66016-1.1445.29325-.28809.65767-.42969 1.0938-.42969.48622 0 .85922.17765 1.1133.5332.25557.35555.38477.96807.38477 1.8457v4.6777h.85937v-4.6855c0-1.0736-.18381-1.866-.55273-2.375-.36497-.50993-.89-.76367-1.5762-.76367zm6.2539 0c-.77674 0-1.386.32888-1.8242.98437-.44186.65883-.66211 1.5326-.66211 2.6211l.00196 1.0508c0 1.0031.21834 1.8072.65625 2.4102.43699.60413 1.0429.90625 1.8144.90625.41602 0 .78387-.091234 1.0996-.27539.31695-.18324.58484-.4491.80273-.79492v.92969c0 .75881-.14785 1.3303-.4414 1.7266-.29235.39111-.74301.58789-1.3535.58789-.30359 0-.59763-.04082-.88086-.125-.28565-.081443-.54279-.19619-.77344-.3457l-.23632.74805c.27047.15164.57916.27315.92773.36523.34795.092075.67388.13867.97656.13867.84208 0 1.494-.27297 1.9531-.81055.45857-.53971.68554-1.3009.68554-2.2852v-7.6895h-.72265l-.08399 1.0684c-.21485-.38533-.48269-.68758-.80664-.89453-.32334-.2109-.70159-.31641-1.1328-.31641zm10.467 0c-.45401 0-.85062.12451-1.1895.36914-.33914.24342-.60902.5923-.81445 1.043l-.07031-1.2695h-.75977v7.6816h.85352v-5.4824c.14556-.47923.3663-.85918.66016-1.1445.29295-.28809.65797-.42969 1.0937-.42969.48775 0 .85711.17765 1.1133.5332.25496.35555.38476.96807.38476 1.8457v4.6777h.85742v-4.6855c0-1.0736-.18081-1.866-.54882-2.375-.36588-.50993-.8939-.76367-1.5801-.76367zm6.4043 0c-.74271-.000001-1.3778.32125-1.9062.96094-.52724.64273-.79101 1.4505-.79101 2.4199v1.2754c0 .96758.26334 1.762.78906 2.3828.52361.62206 1.2007.93359 2.0312.93359.5154 0 .9567-.090281 1.3223-.26562.3668-.17626.6667-.41287.90039-.70703l-.34961-.60547c-.2194.27441-.47958.4836-.78711.63281-.30359.14586-.66597.2207-1.0859.2207-.60717 0-1.089-.24489-1.4434-.74023-.35464-.49412-.5332-1.1138-.5332-1.8574v-.63867h4.3965v-.84375c0-.96667-.22369-1.7371-.66797-2.3105-.44551-.57253-1.0709-.85742-1.875-.85742zm-12.113.14258v7.6816h.85938v-7.6816zm-27.352.60938c.53029 0 .9445.20789 1.2441.62695.29781.41876.44531.94616.44531 1.5801v.33008h-3.543c.01429-.71688.19281-1.3186.53711-1.8066.34401-.48622.78217-.73047 1.3164-.73047zm9.4727 0c.52998 0 .94406.20789 1.2422.62695.29963.41876.44727.94616.44727 1.5801v.33008h-3.543c.0155-.71688.19298-1.3186.53516-1.8066.3437-.48622.7826-.73047 1.3184-.73047zm29.992 0c.53089 0 .94602.20789 1.2441.62695.29902.41876.44532.94616.44532 1.5801v.33008h-3.543c.01519-.71688.19402-1.3186.53711-1.8066.34218-.48622.78064-.73047 1.3164-.73047zm-16.686.015625c.42119 0 .77033.1246 1.0469.375.27684.25466.4967.58706.65625.99609v3.8047c-.16593.39718-.39.70872-.67383.93359-.28475.22488-.63089.33594-1.043.33594-.6014 0-1.0536-.22975-1.3496-.69531-.29964-.4613-.44727-1.0819-.44727-1.8613v-1.0508c0-.84177.15149-1.527.45508-2.0527.30146-.52482.75528-.78516 1.3555-.78516zm-40.057 3.3281h1.3652v1.6621c-.15286.42089-.40964.76752-.77734 1.041-.3671.27228-.78783.40625-1.2598.40625-.39262 0-.69782-.12824-.91602-.38867-.2185-.25952-.32617-.59591-.32617-1.0059 0-.48531.17262-.89402.52148-1.2207.34795-.32881.81215-.49414 1.3926-.49414z" fill="#e0e0e0"/><path d="m27 3c-3.0948.68801-6.1571 1.6452-9.0273 3.0898.06564 2.5344.23035 4.963.5625 7.4297-1.1147.71414-2.287 1.3281-3.3281 2.1641-1.0578.81382-2.1378 1.5912-3.0957 2.543-1.9136-1.2657-3.9389-2.454-6.0254-3.5039-2.2491 2.4205-4.3524 5.0317-6.0703 7.9551 1.2924 2.0908 2.6428 4.0523 4.0996 5.9121h.041016v14.438 1.834 1.6699c.03282.000304.06514.000806.097656.003906l11 1.0605c.57617.05561 1.0282.52027 1.0684 1.0977l.33789 4.8555 9.5957.68359.66016-4.4805c.0857-.58104.58415-1.0117 1.1719-1.0117h11.605c.58742 0 1.0862.43068 1.1719 1.0117l.66016 4.4805 9.5957-.68359.33789-4.8555c.04042-.57739.49219-1.0417 1.0684-1.0977l10.996-1.0605c.032519-.003.064836-.003606.097656-.003906v-1.4316l.003906-.001953v-16.508h.041016c1.4571-1.8598 2.8066-3.8214 4.0996-5.9121-1.7173-2.9234-3.8232-5.5346-6.0723-7.9551-2.0859 1.0499-4.1118 2.2382-6.0254 3.5039-.95756-.95178-2.0363-1.7292-3.0957-2.543-1.0408-.836-2.2136-1.4499-3.3262-2.1641.33124-2.4667.49656-4.8952.5625-7.4297-2.8706-1.4447-5.933-2.4018-9.0293-3.0898-1.2362 2.0777-2.367 4.3278-3.3516 6.5273-1.1675-.1951-2.3391-.26727-3.5137-.28125v-.0019532c-.0082 0-.016447.0019531-.023437.0019532-.0073 0-.014194-.0019532-.021484-.0019532v.0019532c-1.1767.013979-2.3497.086153-3.5176.28125-.98399-2.1996-2.1135-4.4497-3.3516-6.5273zm-22.863 45.904c.0045599 1.063.019531 2.2271.019531 2.459 0 10.446 13.251 15.468 29.715 15.525h.019531.019531c16.464-.05774 29.711-5.0795 29.711-15.525 0-.23612.014661-1.3954.019531-2.459l-9.8867.95312-.3418 4.8809c-.04102.58833-.50933 1.0574-1.0977 1.0996l-11.717.83594c-.02857.0021-.055724.003906-.083984.003906-.58225 0-1.0859-.42704-1.1719-1.0117l-.67188-4.5566h-9.5586l-.67188 4.5566c-.09025.61325-.63836 1.0531-1.2559 1.0078l-11.717-.83594c-.58833-.04224-1.0566-.51128-1.0977-1.0996l-.3418-4.8809-9.8906-.95312z" fill="#478cbf"/><path d="m18.299 29.246c-3.6594 0-6.6289 2.9669-6.6289 6.627 0 3.6625 2.9695 6.6289 6.6289 6.6289 3.6613 0 6.627-2.9664 6.627-6.6289 0-3.66-2.9657-6.627-6.627-6.627zm31.186 0c-3.6619 0-6.6289 2.9669-6.6289 6.627 0 3.6625 2.967 6.6289 6.6289 6.6289 3.6591 0 6.627-2.9664 6.627-6.6289 0-3.66-2.9678-6.627-6.627-6.627zm-15.594 3.8789c-1.1785 0-2.1348.86781-2.1348 1.9375v6.1035c0 1.0706.95628 1.9395 2.1348 1.9395s2.1348-.86885 2.1348-1.9395v-6.1035c0-1.0697-.95628-1.9375-2.1348-1.9375z" fill="#f6f6f6"/><path d="m18.932 31.865c-2.4299 0-4.4004 1.9711-4.4004 4.4004s1.9705 4.3984 4.4004 4.3984c2.4311 0 4.4004-1.9691 4.4004-4.3984s-1.9693-4.4004-4.4004-4.4004zm29.916 0c-2.4293 0-4.3984 1.9711-4.3984 4.4004s1.9691 4.3984 4.3984 4.3984c2.4317 0 4.4004-1.9691 4.4004-4.3984s-1.9687-4.4004-4.4004-4.4004z" fill="#414042"/></svg>
+<svg height="69" viewBox="0 0 187 69" width="187" xmlns="http://www.w3.org/2000/svg"><path d="m91.912 19.51c-3.5233 0-6.278 1.1097-8.2676 3.3281-1.9911 2.2193-2.9844 5.1004-2.9844 8.6465 0 4.1636 1.0165 7.3207 3.0508 9.4707 2.0379 2.1497 4.7123 3.2227 8.0293 3.2227 1.7838 0 3.3686-.15384 4.752-.46289 1.3848-.30784 2.3038-.62367 2.7617-.94336l.13867-10.736c0-.62388-1.6471-.90785-3.4941-.93945-1.847-.02857-3.9609.35742-3.9609.35742v3.6055h2.125l-.023438 1.6055c0 .59532-.59062.89453-1.7676.89453-1.1785 0-2.2182-.4989-3.1211-1.4941-.90498-.99645-1.3555-2.4517-1.3555-4.3711 0-1.9233.43964-3.3428 1.3203-4.2578.87885-.9141 2.0322-1.3711 3.4492-1.3711.59532 0 1.2107.095008 1.8516.29102.64121.19418 1.0686.37639 1.2871.54688.21667.17534.42435.25781.61914.25781.19388 0 .50715-.22698.94141-.68555.43487-.45735.82427-1.1501 1.168-2.0742.34218-.92899.51367-1.6414.51367-2.1465 0-.50111-.011023-.84501-.033203-1.0273-.48045-.52573-1.3668-.94394-2.6602-1.2539-1.2909-.30906-2.7387-.46289-4.3398-.46289zm21.049 0c-3.2367 0-5.8788 1.0413-7.9258 3.1211-2.0464 2.0826-3.0703 5.1404-3.0703 9.1797 0 4.0369 1.0128 7.1085 3.0352 9.2129 2.0251 2.1026 4.6444 3.1543 7.8574 3.1543 3.2145 0 5.8383-1.0111 7.875-3.0332 2.0367-2.0263 3.0527-5.1142 3.0527-9.2656 0-4.1484-.99433-7.2508-2.9863-9.2969-1.9884-2.05-4.6018-3.0723-7.8379-3.0723zm45.504 0c-3.2379 0-5.8792 1.0413-7.9277 3.1211-2.0461 2.0826-3.0684 5.1404-3.0684 9.1797 0 4.0369 1.0104 7.1085 3.0352 9.2129 2.0233 2.1026 4.6432 3.1543 7.8574 3.1543 3.213 0 5.8373-1.0111 7.873-3.0332 2.0364-2.0263 3.0547-5.1142 3.0547-9.2656 0-4.1484-.9939-7.2508-2.9844-9.2969-1.9908-2.05-4.6031-3.0723-7.8398-3.0723zm-30.105.30859c-.45888 0-.82988.16637-1.1152.49609-.28717.33489-.42969.78715-.42969 1.3594v20.584c0 1.053.58624 1.5781 1.752 1.5781h5.8652c7.1824-.000001 10.773-4.2092 10.773-12.627 0-3.9348-.94335-6.8151-2.832-8.6445-1.8853-1.83-4.6472-2.7461-8.2832-2.7461h-5.7305zm42.807 0c-.38928 0-.66468.52801-.82422 1.5801-.0687.50294-.10157 1.0191-.10157 1.543 0 .52694.03287 1.0409.10157 1.543.15954 1.0548.43494 1.5801.82422 1.5801h4.1152v17.225c0 .45462 1.1351.68555 3.3984.68555 2.2655 0 3.3965-.23093 3.3965-.68555v-17.225h4.0137c.38868 0 .66225-.52528.82422-1.5801.0672-.50202.10156-1.016.10156-1.543.00001-.52391-.03436-1.04-.10156-1.543-.16197-1.0521-.43554-1.5801-.82422-1.5801h-14.924zm-58.291 6.2793c1.0989 0 2.0193.49244 2.7617 1.4746.74331.98339 1.1152 2.3913 1.1152 4.2207 0 1.8309-.35955 3.2363-1.0801 4.2188-.72053.98612-1.6597 1.4785-2.8145 1.4785-1.1554 0-2.0859-.48441-2.7949-1.459-.71019-.97154-1.0644-2.3663-1.0644-4.1875 0-1.8173.37148-3.2302 1.1133-4.2363.74574-1.0053 1.6663-1.5098 2.7637-1.5098zm45.504 0c1.0989 0 2.0181.49244 2.7617 1.4746.74331.98339 1.1152 2.3913 1.1152 4.2207 0 1.8309-.3612 3.2363-1.082 4.2188-.71961.98612-1.6574 1.4785-2.8125 1.4785-1.1554 0-2.0888-.48441-2.7969-1.459-.70806-.97154-1.0625-2.3663-1.0625-4.1875 0-1.8173.37179-3.2302 1.1133-4.2363.74453-1.0053 1.666-1.5098 2.7637-1.5098zm-24.977.23828h.34375c1.4638 0 2.5334.33466 3.209.99805.6722.66157 1.0098 2.0859 1.0098 4.2715 0 2.1847-.32289 3.7447-.97656 4.6816-.65214.9378-1.6059 1.4082-2.8652 1.4082-.34218 0-.54909-.063339-.61719-.18945-.06873-.12672-.10352-.42897-.10352-.9082v-10.262z" fill="#fff"/><path d="m137.91 48.551v1.2109h.85938v-1.2109zm-52.396.58984c-.99736 0-1.7963.32424-2.3926.96484-.59745.64576-.89453 1.5712-.89453 2.7773v3.0742c0 1.2329.31639 2.1765.94727 2.832.6333.66066 1.467.98828 2.5039.98828.78586 0 1.4321-.16147 1.9414-.48633.50993-.32273.8592-.67938 1.0488-1.0684v-3.6875h-3.0059v.74805h2.1465v2.6934c-.13766.30115-.38143.55386-.73242.76172-.34978.2109-.8171.31445-1.3984.31445-.79619 0-1.4265-.2632-1.8945-.78711-.46799-.52786-.70312-1.2936-.70312-2.2988v-3.0918c0-.96941.21778-1.7078.65234-2.2168.43578-.51023 1.0297-.76367 1.7812-.76367.74271 0 1.3056.19019 1.6836.56641.38017.37925.58276.91542.61133 1.6113h.79492l.013672-.041016c-.024311-.90802-.30456-1.6179-.83789-2.127-.53484-.50719-1.2907-.76367-2.2656-.76367zm7.6133 2.6641c-.719 0-1.3111.22524-1.7715.67773-.46222.45371-.68069.96571-.6582 1.5449l.013672.041015.79688.007813c0-.42696.14768-.78487.44336-1.0781.2966-.29508.67455-.44141 1.1328-.44141.4926 0 .87459.15388 1.1523.45898.27198.30906.41016.73655.41016 1.2793v.94531h-1.3418c-.85666 0-1.5379.21084-2.0391.63477-.50142.42392-.75195.99502-.75195 1.707 0 .67372.17358 1.2075.51758 1.6035.34613.39445.83497.5918 1.4707.5918.45462 0 .86723-.12355 1.2383-.37305.37166-.24767.67317-.56424.90625-.94531 0 .17413.01089.34527.03125.51758.02097.16927.053163.38614.095703.65234h.88867c-.062302-.24767-.10234-.49621-.12695-.75391-.02401-.25436-.037109-.52051-.037109-.79492v-3.7676c0-.80622-.21809-1.4265-.65234-1.8613-.43669-.43061-1.0083-.64648-1.7188-.64648zm7.1152 0c-.45462 0-.85109.11505-1.1875.3457-.33519.23369-.60486.56357-.80664.99023l-.074219-1.1934h-.75195v7.6816h.85352v-5.5293c.11791-.47346.31244-.84655.58594-1.1191.27168-.27107.63379-.4082 1.082-.4082.4689 0 .83314.19466 1.0957.58789.26378.39323.39258 1.0508.39258 1.9707v4.498h.85351v-4.6211-.19922c.0623-.64455.23396-1.1785.51172-1.6055.27927-.42696.66855-.63672 1.166-.63672.47285 0 .83879.19223 1.0938.57422.25345.38138.38281 1.0443.38281 1.9863v4.502h.85742v-4.4863c0-1.1332-.18468-1.9728-.55664-2.5195-.37044-.54548-.89268-.81836-1.5664-.81836-.48897 0-.91182.1465-1.2598.43945-.34796.29234-.61537.69589-.80469 1.207-.148-.55369-.38151-.966-.69726-1.2383-.31543-.2732-.70589-.4082-1.1699-.4082zm10.316 0c-.74423-.000001-1.3797.32125-1.9082.96094-.52725.64273-.78906 1.4505-.78906 2.4199v1.2754c0 .96758.26259 1.762.7871 2.3828.52604.62206 1.2032.93359 2.0312.93359.5157 0 .95833-.090281 1.3242-.26562.36679-.17626.66658-.41287.89844-.70703l-.34961-.60547c-.21728.27441-.4784.4836-.7832.63281-.3048.14586-.66987.2207-1.0898.2207-.60443 0-1.0864-.24489-1.4414-.74023-.35433-.49412-.53321-1.1138-.53321-1.8574v-.63867h4.3965v-.84375c0-.96667-.22381-1.7371-.66992-2.3105-.44519-.57253-1.0684-.85742-1.873-.85742zm9.4727 0c-.74423-.000001-1.3782.32125-1.9082.96094-.52603.64273-.79101 1.4505-.79101 2.4199v1.2754c0 .96758.26241 1.762.78906 2.3828.52512.62206 1.2028.93359 2.0312.93359.51601 0 .95639-.090281 1.3223-.26562.36741-.17626.66822-.41287.90039-.70703l-.34766-.60547c-.21972.27441-.4811.4836-.78711.63281-.30389.14586-.66639.2207-1.0879.2207-.60656 0-1.0883-.24489-1.4414-.74023-.35646-.49412-.5332-1.1138-.5332-1.8574v-.63867h4.3945v-.84375c0-.96667-.22338-1.7371-.66797-2.3105-.44398-.57253-1.0699-.85742-1.873-.85742zm6.8672 0c-.45614 0-.85274.12451-1.1894.36914-.33975.24342-.60962.5923-.81445 1.043l-.07031-1.2695h-.76172v7.6816h.85351v-5.4824c.14617-.47923.36569-.85918.66016-1.1445.29325-.28809.65767-.42969 1.0938-.42969.48622 0 .85922.17765 1.1133.5332.25557.35555.38477.96807.38477 1.8457v4.6777h.85937v-4.6855c0-1.0736-.18381-1.866-.55273-2.375-.36497-.50993-.89-.76367-1.5762-.76367zm6.2539 0c-.77674 0-1.386.32888-1.8242.98437-.44186.65883-.66211 1.5326-.66211 2.6211l.00196 1.0508c0 1.0031.21834 1.8072.65625 2.4102.43699.60413 1.0429.90625 1.8144.90625.41602 0 .78387-.091234 1.0996-.27539.31695-.18324.58484-.4491.80273-.79492v.92969c0 .75881-.14785 1.3303-.4414 1.7266-.29235.39111-.74301.58789-1.3535.58789-.30359 0-.59763-.04082-.88086-.125-.28565-.081443-.54279-.19619-.77344-.3457l-.23632.74805c.27047.15164.57916.27315.92773.36523.34795.092075.67388.13867.97656.13867.84208 0 1.494-.27297 1.9531-.81055.45857-.53971.68554-1.3009.68554-2.2852v-7.6895h-.72265l-.08399 1.0684c-.21485-.38533-.48269-.68758-.80664-.89453-.32334-.2109-.70159-.31641-1.1328-.31641zm10.467 0c-.45401 0-.85062.12451-1.1895.36914-.33914.24342-.60902.5923-.81445 1.043l-.07031-1.2695h-.75977v7.6816h.85352v-5.4824c.14556-.47923.3663-.85918.66016-1.1445.29295-.28809.65797-.42969 1.0937-.42969.48775 0 .85711.17765 1.1133.5332.25496.35555.38476.96807.38476 1.8457v4.6777h.85742v-4.6855c0-1.0736-.18081-1.866-.54882-2.375-.36588-.50993-.8939-.76367-1.5801-.76367zm6.4043 0c-.74271-.000001-1.3778.32125-1.9062.96094-.52724.64273-.79101 1.4505-.79101 2.4199v1.2754c0 .96758.26334 1.762.78906 2.3828.52361.62206 1.2007.93359 2.0312.93359.5154 0 .9567-.090281 1.3223-.26562.3668-.17626.6667-.41287.90039-.70703l-.34961-.60547c-.2194.27441-.47958.4836-.78711.63281-.30359.14586-.66597.2207-1.0859.2207-.60717 0-1.089-.24489-1.4434-.74023-.35464-.49412-.5332-1.1138-.5332-1.8574v-.63867h4.3965v-.84375c0-.96667-.22369-1.7371-.66797-2.3105-.44551-.57253-1.0709-.85742-1.875-.85742zm-12.113.14258v7.6816h.85938v-7.6816zm-27.352.60938c.53029 0 .9445.20789 1.2441.62695.29781.41876.44531.94616.44531 1.5801v.33008h-3.543c.01429-.71688.19281-1.3186.53711-1.8066.34401-.48622.78217-.73047 1.3164-.73047zm9.4727 0c.52998 0 .94406.20789 1.2422.62695.29963.41876.44727.94616.44727 1.5801v.33008h-3.543c.0155-.71688.19298-1.3186.53516-1.8066.3437-.48622.7826-.73047 1.3184-.73047zm29.992 0c.53089 0 .94602.20789 1.2441.62695.29902.41876.44532.94616.44532 1.5801v.33008h-3.543c.01519-.71688.19402-1.3186.53711-1.8066.34218-.48622.78064-.73047 1.3164-.73047zm-16.686.015625c.42119 0 .77033.1246 1.0469.375.27684.25466.4967.58706.65625.99609v3.8047c-.16593.39718-.39.70872-.67383.93359-.28475.22488-.63089.33594-1.043.33594-.6014 0-1.0536-.22975-1.3496-.69531-.29964-.4613-.44727-1.0819-.44727-1.8613v-1.0508c0-.84177.15149-1.527.45508-2.0527.30146-.52482.75528-.78516 1.3555-.78516zm-40.057 3.3281h1.3652v1.6621c-.15286.42089-.40964.76752-.77734 1.041-.3671.27228-.78783.40625-1.2598.40625-.39262 0-.69782-.12824-.91602-.38867-.2185-.25952-.32617-.59591-.32617-1.0059 0-.48531.17262-.89402.52148-1.2207.34795-.32881.81215-.49414 1.3926-.49414z" fill="#e0e0e0"/><path d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff" transform="matrix(.30389749 0 0 -.30389749 63.620953 46.532114)"/><path d="m0 0v-47.514-6.035-5.492c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325c5.09692 6.4164715 9.92323 13.494208 13.621 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.4426579-6.973692 9.2079702-13.9828876 13.621-19.449z" fill="#478cbf" transform="matrix(.30389749 0 0 -.30389749 4.154146 28.589689)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.066.067c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(.30389749 0 0 -.30389749 53.752732 49.859089)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(.30389749 0 0 -.30389749 24.925648 35.87311)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(.30389749 0 0 -.30389749 23.330605 36.266305)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(.30389749 0 0 -.30389749 33.889273 43.105751)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(.30389749 0 0 -.30389749 42.854008 35.87311)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(.30389749 0 0 -.30389749 44.449454 36.266305)"/></svg>
diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp
index 63b614e436..e38034dd8c 100644
--- a/editor/import/collada.cpp
+++ b/editor/import/collada.cpp
@@ -289,7 +289,7 @@ void Collada::_parse_image(XMLParser &parser) {
String path = parser.get_attribute_value("source").strip_edges();
if (path.find("://") == -1 && path.is_rel_path()) {
// path is relative to file being loaded, so convert to a resource path
- image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path.percent_decode()));
+ image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path.uri_decode()));
}
} else {
while (parser.read() == OK) {
@@ -298,7 +298,7 @@ void Collada::_parse_image(XMLParser &parser) {
if (name == "init_from") {
parser.read();
- String path = parser.get_node_data().strip_edges().percent_decode();
+ String path = parser.get_node_data().strip_edges().uri_decode();
if (path.find("://") == -1 && path.is_rel_path()) {
// path is relative to file being loaded, so convert to a resource path
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp
index 3139ef5146..6d2215c379 100644
--- a/editor/import/resource_importer_layered_texture.cpp
+++ b/editor/import/resource_importer_layered_texture.cpp
@@ -391,8 +391,8 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
bool ok_on_pc = false;
bool is_hdr = (image->get_format() >= Image::FORMAT_RF && image->get_format() <= Image::FORMAT_RGBE9995);
bool is_ldr = (image->get_format() >= Image::FORMAT_L8 && image->get_format() <= Image::FORMAT_RGB565);
- bool can_bptc = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_bptc");
- bool can_s3tc = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_s3tc");
+ bool can_bptc = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_bptc");
+ bool can_s3tc = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_s3tc");
if (can_bptc) {
formats_imported.push_back("bptc"); //needs to be aded anyway
@@ -447,13 +447,13 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
ok_on_pc = true;
}
- if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2")) {
+ if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2")) {
_save_tex(slices, p_save_path + ".etc2." + extension, compress_mode, lossy, Image::COMPRESS_ETC2, csource, used_channels, mipmaps, true);
r_platform_variants->push_back("etc2");
formats_imported.push_back("etc2");
}
- if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc")) {
+ if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc")) {
_save_tex(slices, p_save_path + ".etc2." + extension, compress_mode, lossy, Image::COMPRESS_ETC2, csource, used_channels, mipmaps, true);
r_platform_variants->push_back("pvrtc");
formats_imported.push_back("pvrtc");
@@ -492,7 +492,7 @@ String ResourceImporterLayeredTexture::get_import_settings_string() const {
int index = 0;
while (compression_formats[index]) {
- String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]);
+ String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]);
bool test = ProjectSettings::get_singleton()->get(setting_path);
if (test) {
s += String(compression_formats[index]);
@@ -524,7 +524,7 @@ bool ResourceImporterLayeredTexture::are_import_settings_valid(const String &p_p
int index = 0;
bool valid = true;
while (compression_formats[index]) {
- String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]);
+ String setting_path = "rendering/textures/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) {
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index ead1f7c3e9..d0e5798045 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -964,7 +964,7 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
if (FileAccess::exists(ext_name) && p_keep_animations) {
// Copy custom animation tracks from previously imported files.
- Ref<Animation> old_anim = ResourceLoader::load(ext_name, "Animation", true);
+ Ref<Animation> old_anim = ResourceLoader::load(ext_name, "Animation", ResourceFormatLoader::CACHE_MODE_IGNORE);
if (old_anim.is_valid()) {
for (int i = 0; i < old_anim->get_track_count(); i++) {
if (!old_anim->track_is_imported(i)) {
@@ -1004,7 +1004,7 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
p_materials[mat] = ResourceLoader::load(ext_name);
} else {
ResourceSaver::save(ext_name, mat, ResourceSaver::FLAG_CHANGE_PATH);
- p_materials[mat] = ResourceLoader::load(ext_name, "", true); // disable loading from the cache.
+ p_materials[mat] = ResourceLoader::load(ext_name, "", ResourceFormatLoader::CACHE_MODE_IGNORE); // disable loading from the cache.
}
}
@@ -1061,7 +1061,7 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
p_materials[mat] = ResourceLoader::load(ext_name);
} else {
ResourceSaver::save(ext_name, mat, ResourceSaver::FLAG_CHANGE_PATH);
- p_materials[mat] = ResourceLoader::load(ext_name, "", true); // disable loading from the cache.
+ p_materials[mat] = ResourceLoader::load(ext_name, "", ResourceFormatLoader::CACHE_MODE_IGNORE); // disable loading from the cache.
}
}
@@ -1129,6 +1129,7 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/ensure_tangents"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/storage", PROPERTY_HINT_ENUM, "Built-In,Files (.mesh),Files (.tres)"), meshes_out ? 1 : 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/generate_lods"), true));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/create_shadow_meshes"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/light_baking", PROPERTY_HINT_ENUM, "Disabled,Enable,Gen Lightmaps", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "skins/use_named_skins"), true));
@@ -1221,7 +1222,7 @@ Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(Edito
return importer->import_animation(p_path, p_flags, p_bake_fps);
}
-void ResourceImporterScene::_generate_meshes(Node *p_node, bool p_generate_lods) {
+void ResourceImporterScene::_generate_meshes(Node *p_node, bool p_generate_lods, bool p_create_shadow_meshes) {
EditorSceneImporterMeshNode3D *src_mesh_node = Object::cast_to<EditorSceneImporterMeshNode3D>(p_node);
if (src_mesh_node) {
//is mesh
@@ -1237,8 +1238,12 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, bool p_generate_lods)
if (p_generate_lods) {
src_mesh_node->get_mesh()->generate_lods();
}
+ if (p_create_shadow_meshes) {
+ src_mesh_node->get_mesh()->create_shadow_mesh();
+ }
}
mesh = src_mesh_node->get_mesh()->get_mesh();
+
if (mesh.is_valid()) {
mesh_node->set_mesh(mesh);
for (int i = 0; i < mesh->get_surface_count(); i++) {
@@ -1252,7 +1257,7 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, bool p_generate_lods)
}
for (int i = 0; i < p_node->get_child_count(); i++) {
- _generate_meshes(p_node->get_child(i), p_generate_lods);
+ _generate_meshes(p_node->get_child(i), p_generate_lods, p_create_shadow_meshes);
}
}
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) {
@@ -1348,8 +1353,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
}
bool gen_lods = bool(p_options["meshes/generate_lods"]);
+ bool create_shadow_meshes = bool(p_options["meshes/create_shadow_meshes"]);
- _generate_meshes(scene, gen_lods);
+ _generate_meshes(scene, gen_lods, create_shadow_meshes);
err = OK;
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 66c317f858..aced0226ff 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -121,7 +121,7 @@ class ResourceImporterScene : public ResourceImporter {
};
void _replace_owner(Node *p_node, Node *p_scene, Node *p_new_owner);
- void _generate_meshes(Node *p_node, bool p_generate_lods);
+ void _generate_meshes(Node *p_node, bool p_generate_lods, bool p_create_shadow_meshes);
public:
static ResourceImporterScene *get_singleton() { return singleton; }
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index eb16e873e6..de8031af35 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -172,7 +172,7 @@ bool ResourceImporterTexture::get_option_visibility(const String &p_option, cons
if (compress_mode < COMPRESS_VRAM_COMPRESSED) {
return false;
}
- if (!ProjectSettings::get_singleton()->get("rendering/vram_compression/import_bptc")) {
+ if (!ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_bptc")) {
return false;
}
}
@@ -473,8 +473,8 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
bool ok_on_pc = false;
bool is_hdr = (image->get_format() >= Image::FORMAT_RF && image->get_format() <= Image::FORMAT_RGBE9995);
bool is_ldr = (image->get_format() >= Image::FORMAT_L8 && image->get_format() <= Image::FORMAT_RGB565);
- bool can_bptc = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_bptc");
- bool can_s3tc = ProjectSettings::get_singleton()->get("rendering/vram_compression/import_s3tc");
+ bool can_bptc = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_bptc");
+ bool can_s3tc = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_s3tc");
if (can_bptc) {
//add to the list anyway
@@ -524,19 +524,19 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
ok_on_pc = true;
}
- if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc2")) {
+ if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc2")) {
_save_stex(image, p_save_path + ".etc2.stex", compress_mode, lossy, Image::COMPRESS_ETC2, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel);
r_platform_variants->push_back("etc2");
formats_imported.push_back("etc2");
}
- if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_etc")) {
+ if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_etc")) {
_save_stex(image, p_save_path + ".etc.stex", compress_mode, lossy, Image::COMPRESS_ETC, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel);
r_platform_variants->push_back("etc");
formats_imported.push_back("etc");
}
- if (ProjectSettings::get_singleton()->get("rendering/vram_compression/import_pvrtc")) {
+ if (ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_pvrtc")) {
_save_stex(image, p_save_path + ".pvrtc.stex", compress_mode, lossy, Image::COMPRESS_PVRTC1_4, mipmaps, stream, detect_3d, detect_roughness, detect_normal, force_normal, srgb_friendly_pack, true, mipmap_limit, normal_image, roughness_channel);
r_platform_variants->push_back("pvrtc");
formats_imported.push_back("pvrtc");
@@ -574,7 +574,7 @@ String ResourceImporterTexture::get_import_settings_string() const {
int index = 0;
while (compression_formats[index]) {
- String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]);
+ String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]);
bool test = ProjectSettings::get_singleton()->get(setting_path);
if (test) {
s += String(compression_formats[index]);
@@ -606,7 +606,7 @@ bool ResourceImporterTexture::are_import_settings_valid(const String &p_path) co
int index = 0;
bool valid = true;
while (compression_formats[index]) {
- String setting_path = "rendering/vram_compression/import_" + String(compression_formats[index]);
+ String setting_path = "rendering/textures/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) {
diff --git a/editor/import/scene_importer_mesh.cpp b/editor/import/scene_importer_mesh.cpp
index 620437af0e..46eb4e4fdc 100644
--- a/editor/import/scene_importer_mesh.cpp
+++ b/editor/import/scene_importer_mesh.cpp
@@ -250,6 +250,11 @@ Ref<ArrayMesh> EditorSceneImporterMesh::get_mesh() {
mesh->surface_set_name(mesh->get_surface_count() - 1, surfaces[i].name);
}
}
+
+ if (shadow_mesh.is_valid()) {
+ Ref<ArrayMesh> shadow = shadow_mesh->get_mesh();
+ mesh->set_shadow_mesh(shadow);
+ }
}
return mesh;
@@ -261,6 +266,103 @@ void EditorSceneImporterMesh::clear() {
mesh.unref();
}
+void EditorSceneImporterMesh::create_shadow_mesh() {
+ if (shadow_mesh.is_valid()) {
+ shadow_mesh.unref();
+ }
+
+ //no shadow mesh for blendshapes
+ if (blend_shapes.size() > 0) {
+ return;
+ }
+ //no shadow mesh for skeletons
+ for (int i = 0; i < surfaces.size(); i++) {
+ if (surfaces[i].arrays[RS::ARRAY_BONES].get_type() != Variant::NIL) {
+ return;
+ }
+ if (surfaces[i].arrays[RS::ARRAY_WEIGHTS].get_type() != Variant::NIL) {
+ return;
+ }
+ }
+
+ shadow_mesh.instance();
+
+ for (int i = 0; i < surfaces.size(); i++) {
+ LocalVector<int> vertex_remap;
+ Vector<Vector3> new_vertices;
+ Vector<Vector3> vertices = surfaces[i].arrays[RS::ARRAY_VERTEX];
+ int vertex_count = vertices.size();
+ {
+ Map<Vector3, int> unique_vertices;
+ const Vector3 *vptr = vertices.ptr();
+ for (int j = 0; j < vertex_count; j++) {
+ Vector3 v = vptr[j];
+
+ Map<Vector3, int>::Element *E = unique_vertices.find(v);
+
+ if (E) {
+ vertex_remap.push_back(E->get());
+ } else {
+ int vcount = unique_vertices.size();
+ unique_vertices[v] = vcount;
+ vertex_remap.push_back(vcount);
+ new_vertices.push_back(v);
+ }
+ }
+ }
+
+ Array new_surface;
+ new_surface.resize(RS::ARRAY_MAX);
+ Dictionary lods;
+
+ // print_line("original vertex count: " + itos(vertices.size()) + " new vertex count: " + itos(new_vertices.size()));
+
+ new_surface[RS::ARRAY_VERTEX] = new_vertices;
+
+ Vector<int> indices = surfaces[i].arrays[RS::ARRAY_INDEX];
+ if (indices.size()) {
+ int index_count = indices.size();
+ const int *index_rptr = indices.ptr();
+ Vector<int> new_indices;
+ new_indices.resize(indices.size());
+ int *index_wptr = new_indices.ptrw();
+
+ for (int j = 0; j < index_count; j++) {
+ int index = index_rptr[j];
+ ERR_FAIL_INDEX(index, vertex_count);
+ index_wptr[j] = vertex_remap[index];
+ }
+
+ new_surface[RS::ARRAY_INDEX] = new_indices;
+
+ // Make sure the same LODs as the full version are used.
+ // This makes it more coherent between rendered model and its shadows.
+ for (int j = 0; j < surfaces[i].lods.size(); j++) {
+ indices = surfaces[i].lods[j].indices;
+
+ index_count = indices.size();
+ index_rptr = indices.ptr();
+ new_indices.resize(indices.size());
+ index_wptr = new_indices.ptrw();
+
+ for (int k = 0; k < index_count; k++) {
+ int index = index_rptr[j];
+ ERR_FAIL_INDEX(index, vertex_count);
+ index_wptr[j] = vertex_remap[index];
+ }
+
+ lods[surfaces[i].lods[j].distance] = new_indices;
+ }
+ }
+
+ shadow_mesh->add_surface(surfaces[i].primitive, new_surface, Array(), lods, Ref<Material>(), surfaces[i].name);
+ }
+}
+
+Ref<EditorSceneImporterMesh> EditorSceneImporterMesh::get_shadow_mesh() const {
+ return shadow_mesh;
+}
+
void EditorSceneImporterMesh::_set_data(const Dictionary &p_data) {
clear();
if (p_data.has("blend_shape_names")) {
@@ -342,7 +444,7 @@ void EditorSceneImporterMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_blend_shape_mode", "mode"), &EditorSceneImporterMesh::set_blend_shape_mode);
ClassDB::bind_method(D_METHOD("get_blend_shape_mode"), &EditorSceneImporterMesh::get_blend_shape_mode);
- ClassDB::bind_method(D_METHOD("add_surface", "primitive", "arrays", "blend_shapes", "lods", "material"), &EditorSceneImporterMesh::add_surface, DEFVAL(Array()), DEFVAL(Dictionary()), DEFVAL(Ref<Material>()), DEFVAL(String()));
+ ClassDB::bind_method(D_METHOD("add_surface", "primitive", "arrays", "blend_shapes", "lods", "material", "name"), &EditorSceneImporterMesh::add_surface, DEFVAL(Array()), DEFVAL(Dictionary()), DEFVAL(Ref<Material>()), DEFVAL(String()));
ClassDB::bind_method(D_METHOD("get_surface_count"), &EditorSceneImporterMesh::get_surface_count);
ClassDB::bind_method(D_METHOD("get_surface_primitive_type", "surface_idx"), &EditorSceneImporterMesh::get_surface_primitive_type);
diff --git a/editor/import/scene_importer_mesh.h b/editor/import/scene_importer_mesh.h
index 2adeb76b6c..42507cbe8c 100644
--- a/editor/import/scene_importer_mesh.h
+++ b/editor/import/scene_importer_mesh.h
@@ -61,6 +61,8 @@ class EditorSceneImporterMesh : public Resource {
Ref<ArrayMesh> mesh;
+ Ref<EditorSceneImporterMesh> shadow_mesh;
+
protected:
void _set_data(const Dictionary &p_data);
Dictionary _get_data() const;
@@ -89,6 +91,9 @@ public:
void generate_lods();
+ void create_shadow_mesh();
+ Ref<EditorSceneImporterMesh> get_shadow_mesh() const;
+
bool has_mesh() const;
Ref<ArrayMesh> get_mesh();
void clear();
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 103e5e81cb..97a04e6557 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -48,7 +48,7 @@ public:
values[p_name] = p_value;
if (checking) {
checked.insert(p_name);
- _change_notify();
+ notify_property_list_changed();
}
return true;
}
@@ -81,7 +81,7 @@ public:
}
void update() {
- _change_notify();
+ notify_property_list_changed();
}
ImportDockParameters() {
diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp
index 60553143d5..0e68af06f0 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -84,7 +84,7 @@ void LocalizationEditor::add_translation(const String &p_translation) {
}
void LocalizationEditor::_translation_add(const PackedStringArray &p_paths) {
- PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
+ PackedStringArray translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
for (int i = 0; i < p_paths.size(); i++) {
if (!translations.has(p_paths[i])) {
// Don't add duplicate translation paths.
@@ -93,8 +93,8 @@ void LocalizationEditor::_translation_add(const PackedStringArray &p_paths) {
}
undo_redo->create_action(vformat(TTR("Add %d Translations"), p_paths.size()));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translations", translations);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translations", ProjectSettings::get_singleton()->get("locale/translations"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", translations);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", ProjectSettings::get_singleton()->get("internationalization/locale/translations"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -112,15 +112,15 @@ void LocalizationEditor::_translation_delete(Object *p_item, int p_column, int p
int idx = ti->get_metadata(0);
- PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
+ PackedStringArray translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
ERR_FAIL_INDEX(idx, translations.size());
translations.remove(idx);
undo_redo->create_action(TTR("Remove Translation"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translations", translations);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translations", ProjectSettings::get_singleton()->get("locale/translations"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", translations);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", ProjectSettings::get_singleton()->get("internationalization/locale/translations"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -136,8 +136,8 @@ void LocalizationEditor::_translation_res_add(const PackedStringArray &p_paths)
Variant prev;
Dictionary remaps;
- if (ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
- remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
+ remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
prev = remaps;
}
@@ -149,8 +149,8 @@ void LocalizationEditor::_translation_res_add(const PackedStringArray &p_paths)
}
undo_redo->create_action(vformat(TTR("Translation Resource Remap: Add %d Path(s)"), p_paths.size()));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", prev);
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", prev);
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -163,9 +163,9 @@ void LocalizationEditor::_translation_res_option_file_open() {
}
void LocalizationEditor::_translation_res_option_add(const PackedStringArray &p_paths) {
- ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"));
+ ERR_FAIL_COND(!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps"));
- Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
+ Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
TreeItem *k = translation_remap->get_selected();
ERR_FAIL_COND(!k);
@@ -180,8 +180,8 @@ void LocalizationEditor::_translation_res_option_add(const PackedStringArray &p_
remaps[key] = r;
undo_redo->create_action(vformat(TTR("Translation Resource Remap: Add %d Remap(s)"), p_paths.size()));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", ProjectSettings::get_singleton()->get("locale/translation_remaps"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -202,11 +202,11 @@ void LocalizationEditor::_translation_res_option_changed() {
return;
}
- if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
+ if (!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
return;
}
- Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
+ Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
TreeItem *k = translation_remap->get_selected();
ERR_FAIL_COND(!k);
@@ -234,8 +234,8 @@ void LocalizationEditor::_translation_res_option_changed() {
updating_translations = true;
undo_redo->create_action(TTR("Change Resource Remap Language"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", ProjectSettings::get_singleton()->get("locale/translation_remaps"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -249,11 +249,11 @@ void LocalizationEditor::_translation_res_delete(Object *p_item, int p_column, i
return;
}
- if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
+ if (!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
return;
}
- Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
+ Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
TreeItem *k = Object::cast_to<TreeItem>(p_item);
@@ -263,8 +263,8 @@ void LocalizationEditor::_translation_res_delete(Object *p_item, int p_column, i
remaps.erase(key);
undo_redo->create_action(TTR("Remove Resource Remap"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", ProjectSettings::get_singleton()->get("locale/translation_remaps"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -277,11 +277,11 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co
return;
}
- if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
+ if (!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
return;
}
- Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
+ Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
TreeItem *k = translation_remap->get_selected();
ERR_FAIL_COND(!k);
@@ -298,8 +298,8 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co
remaps[key] = r;
undo_redo->create_action(TTR("Remove Resource Remap Option"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translation_remaps", remaps);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translation_remaps", ProjectSettings::get_singleton()->get("locale/translation_remaps"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", remaps);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translation_remaps", ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -316,8 +316,8 @@ void LocalizationEditor::_translation_filter_option_changed() {
Variant prev;
Array f_locales_all;
- if (ProjectSettings::get_singleton()->has_setting("locale/locale_filter")) {
- f_locales_all = ProjectSettings::get_singleton()->get("locale/locale_filter");
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter")) {
+ f_locales_all = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter");
prev = f_locales_all;
if (f_locales_all.size() != 2) {
@@ -346,8 +346,8 @@ void LocalizationEditor::_translation_filter_option_changed() {
f_locales.sort();
undo_redo->create_action(TTR("Changed Locale Filter"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/locale_filter", f_locales_all);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/locale_filter", prev);
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", f_locales_all);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", prev);
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -361,8 +361,8 @@ void LocalizationEditor::_translation_filter_mode_changed(int p_mode) {
Variant prev;
Array f_locales_all;
- if (ProjectSettings::get_singleton()->has_setting("locale/locale_filter")) {
- f_locales_all = ProjectSettings::get_singleton()->get("locale/locale_filter");
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter")) {
+ f_locales_all = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter");
prev = f_locales_all;
if (f_locales_all.size() != 2) {
@@ -378,8 +378,8 @@ void LocalizationEditor::_translation_filter_mode_changed(int p_mode) {
}
undo_redo->create_action(TTR("Changed Locale Filter Mode"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/locale_filter", f_locales_all);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/locale_filter", prev);
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", f_locales_all);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter", prev);
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -388,7 +388,7 @@ void LocalizationEditor::_translation_filter_mode_changed(int p_mode) {
}
void LocalizationEditor::_pot_add(const PackedStringArray &p_paths) {
- PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("locale/translations_pot_files");
+ PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
for (int i = 0; i < p_paths.size(); i++) {
for (int j = 0; j < pot_translations.size(); j++) {
@@ -401,8 +401,8 @@ void LocalizationEditor::_pot_add(const PackedStringArray &p_paths) {
}
undo_redo->create_action(vformat(TTR("Add %d file(s) for POT generation"), p_paths.size()));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translations_pot_files", pot_translations);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translations_pot_files", ProjectSettings::get_singleton()->get("locale/translations_pot_files"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", pot_translations);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -416,15 +416,15 @@ void LocalizationEditor::_pot_delete(Object *p_item, int p_column, int p_button)
int idx = ti->get_metadata(0);
- PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("locale/translations_pot_files");
+ PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
ERR_FAIL_INDEX(idx, pot_translations.size());
pot_translations.remove(idx);
undo_redo->create_action(TTR("Remove file from POT generation"));
- undo_redo->add_do_property(ProjectSettings::get_singleton(), "locale/translations_pot_files", pot_translations);
- undo_redo->add_undo_property(ProjectSettings::get_singleton(), "locale/translations_pot_files", ProjectSettings::get_singleton()->get("locale/translations_pot_files"));
+ undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", pot_translations);
+ undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files"));
undo_redo->add_do_method(this, "update_translations");
undo_redo->add_undo_method(this, "update_translations");
undo_redo->add_do_method(this, "emit_signal", localization_changed);
@@ -463,8 +463,8 @@ void LocalizationEditor::update_translations() {
translation_list->clear();
TreeItem *root = translation_list->create_item(nullptr);
translation_list->set_hide_root(true);
- if (ProjectSettings::get_singleton()->has_setting("locale/translations")) {
- PackedStringArray translations = ProjectSettings::get_singleton()->get("locale/translations");
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translations")) {
+ PackedStringArray translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
for (int i = 0; i < translations.size(); i++) {
TreeItem *t = translation_list->create_item(root);
t->set_editable(0, false);
@@ -482,8 +482,8 @@ void LocalizationEditor::update_translations() {
Array l_filter_all;
bool is_arr_empty = true;
- if (ProjectSettings::get_singleton()->has_setting("locale/locale_filter")) {
- l_filter_all = ProjectSettings::get_singleton()->get("locale/locale_filter");
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/locale_filter")) {
+ l_filter_all = ProjectSettings::get_singleton()->get("internationalization/locale/locale_filter");
if (l_filter_all.size() == 2) {
translation_locale_filter_mode->select(l_filter_all[0]);
@@ -573,8 +573,8 @@ void LocalizationEditor::update_translations() {
}
}
- if (ProjectSettings::get_singleton()->has_setting("locale/translation_remaps")) {
- Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translation_remaps")) {
+ Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
List<Variant> rk;
remaps.get_key_list(&rk);
Vector<String> keys;
@@ -631,8 +631,8 @@ void LocalizationEditor::update_translations() {
translation_pot_list->clear();
root = translation_pot_list->create_item(nullptr);
translation_pot_list->set_hide_root(true);
- if (ProjectSettings::get_singleton()->has_setting("locale/translations_pot_files")) {
- PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("locale/translations_pot_files");
+ if (ProjectSettings::get_singleton()->has_setting("internationalization/locale/translations_pot_files")) {
+ PackedStringArray pot_translations = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
for (int i = 0; i < pot_translations.size(); i++) {
TreeItem *t = translation_pot_list->create_item(root);
t->set_editable(0, false);
diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp
index 96ebb131ad..9e2fb01bb8 100644
--- a/editor/node_3d_editor_gizmos.cpp
+++ b/editor/node_3d_editor_gizmos.cpp
@@ -557,7 +557,7 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
Transform t = spatial_node->get_global_transform();
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));
+ t.set_look_at(t.origin, camera_position);
}
float scale = t.origin.distance_to(p_camera->get_camera_transform().origin);
@@ -574,7 +574,7 @@ bool EditorNode3DGizmo::intersect_ray(Camera3D *p_camera, const Point2 &p_point,
if (orig_camera_transform.origin.distance_squared_to(t.origin) > 0.01 &&
ABS(orig_camera_transform.basis.get_axis(Vector3::AXIS_Z).dot(Vector3(0, 1, 0))) < 0.99) {
- p_camera->look_at(t.origin, Vector3(0, 1, 0));
+ p_camera->look_at(t.origin);
}
Vector3 c0 = t.xform(Vector3(selectable_icon_size, selectable_icon_size, 0) * scale);
@@ -844,7 +844,7 @@ static float _find_closest_angle_to_half_pi_arc(const Vector3 &p_from, const Vec
//min_p = p_arc_xform.affine_inverse().xform(min_p);
float a = (Math_PI * 0.5) - Vector2(min_p.x, -min_p.z).angle();
- return a * 180.0 / Math_PI;
+ return Math::rad2deg(a);
}
void Light3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) {
@@ -1033,12 +1033,9 @@ void Light3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_lines(points_primary, material_primary, false, color);
p_gizmo->add_lines(points_secondary, material_secondary, false, color);
- const float ra = 16 * Math_PI * 2.0 / 64.0;
- const Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * w;
-
Vector<Vector3> handles;
handles.push_back(Vector3(0, 0, -r));
- handles.push_back(Vector3(a.x, a.y, -d));
+ handles.push_back(Vector3(w, 0, -d));
p_gizmo->add_handles(handles, get_material("handles"));
p_gizmo->add_unscaled_billboard(icon, 0.05, color);
@@ -1095,8 +1092,8 @@ void AudioStreamPlayer3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int
float closest_angle = 1e20;
for (int i = 0; i < 180; i++) {
- float a = i * Math_PI / 180.0;
- float an = (i + 1) * Math_PI / 180.0;
+ float a = Math::deg2rad((float)i);
+ float an = Math::deg2rad((float)(i + 1));
Vector3 from(Math::sin(a), 0, -Math::cos(a));
Vector3 to(Math::sin(an), 0, -Math::cos(an));
@@ -1145,9 +1142,10 @@ void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> points_primary;
points_primary.resize(200);
+ real_t step = Math_TAU / 100.0;
for (int i = 0; i < 100; i++) {
- const float a = i * 2.0 * Math_PI / 100.0;
- const float an = (i + 1) * 2.0 * Math_PI / 100.0;
+ const float a = i * step;
+ const float an = (i + 1) * step;
const Vector3 from(Math::sin(a) * radius, Math::cos(a) * radius, ofs);
const Vector3 to(Math::sin(an) * radius, Math::cos(an) * radius, ofs);
@@ -1163,7 +1161,7 @@ void AudioStreamPlayer3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
points_secondary.resize(16);
for (int i = 0; i < 8; i++) {
- const float a = i * 2.0 * Math_PI / 8.0;
+ const float a = i * (Math_TAU / 8.0);
const Vector3 from(Math::sin(a) * radius, Math::cos(a) * radius, ofs);
points_secondary.write[i * 2 + 0] = from;
@@ -2616,8 +2614,8 @@ void GPUParticlesCollision3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> collision_segments;
for (int i = 0; i < 64; i++) {
- float ra = i * Math_PI * 2.0 / 64.0;
- float rb = (i + 1) * Math_PI * 2.0 / 64.0;
+ float ra = i * (Math_TAU / 64.0);
+ float rb = (i + 1) * (Math_TAU / 64.0);
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * r;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * r;
@@ -3317,7 +3315,7 @@ void BakedLightmapGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
int stack_count = 8;
int sector_count = 16;
- float sector_step = 2 * Math_PI / sector_count;
+ float sector_step = (Math_PI * 2.0) / sector_count;
float stack_step = Math_PI / stack_count;
Vector<Vector3> vertices;
@@ -3454,7 +3452,7 @@ void LightmapProbeGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
int stack_count = 8;
int sector_count = 16;
- float sector_step = 2 * Math_PI / sector_count;
+ float sector_step = (Math_PI * 2.0) / sector_count;
float stack_step = Math_PI / stack_count;
Vector<Vector3> vertices;
@@ -3854,8 +3852,8 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> collision_segments;
for (int i = 0; i < 64; i++) {
- float ra = i * Math_PI * 2.0 / 64.0;
- float rb = (i + 1) * Math_PI * 2.0 / 64.0;
+ float ra = i * (Math_TAU / 64.0);
+ float rb = (i + 1) * (Math_TAU / 64.0);
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * r;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * r;
@@ -3939,8 +3937,8 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> collision_segments;
for (int i = 0; i < 64; i++) {
- float ra = i * Math_PI * 2.0 / 64.0;
- float rb = (i + 1) * Math_PI * 2.0 / 64.0;
+ float ra = i * (Math_TAU / 64.0);
+ float rb = (i + 1) * (Math_TAU / 64.0);
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius;
@@ -4002,8 +4000,8 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Vector<Vector3> collision_segments;
for (int i = 0; i < 64; i++) {
- float ra = i * Math_PI * 2.0 / 64.0;
- float rb = (i + 1) * Math_PI * 2.0 / 64.0;
+ float ra = i * (Math_TAU / 64.0);
+ float rb = (i + 1) * (Math_TAU / 64.0);
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * radius;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * radius;
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index fbfcac3d22..e7e069e8b6 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -255,6 +255,9 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
graph->connect_node(from, 0, to, to_idx);
}
+
+ float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
+ graph->set_minimap_opacity(graph_minimap_opacity);
}
void AnimationNodeBlendTreeEditor::_file_opened(const String &p_file) {
@@ -888,6 +891,8 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
graph->connect("scroll_offset_changed", callable_mp(this, &AnimationNodeBlendTreeEditor::_scroll_changed));
graph->connect("delete_nodes_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_nodes_request));
graph->connect("popup_request", callable_mp(this, &AnimationNodeBlendTreeEditor::_popup_request));
+ float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
+ graph->set_minimap_opacity(graph_minimap_opacity);
VSeparator *vs = memnew(VSeparator);
graph->get_zoom_hbox()->add_child(vs);
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 56d82acd2f..7c623505b5 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -78,7 +78,6 @@ void AnimationPlayerEditor::_notification(int p_what) {
}
frame->set_value(player->get_current_animation_position());
track_editor->set_anim_pos(player->get_current_animation_position());
- EditorNode::get_singleton()->get_inspector()->refresh();
} else if (!player->is_valid()) {
// Reset timeline when the player has been stopped externally
@@ -1072,8 +1071,6 @@ void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos, bool p_drag)
frame->set_value(Math::snapped(p_pos, _get_editor_step()));
updating = false;
_seek_value_changed(p_pos, !p_drag);
-
- EditorNode::get_singleton()->get_inspector()->refresh();
}
void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
@@ -1400,7 +1397,7 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
// Render every past/future step with the capture shader.
RS::get_singleton()->canvas_item_set_material(onion.capture.canvas_item, onion.capture.material->get_rid());
- onion.capture.material->set_shader_param("bkg_color", GLOBAL_GET("rendering/environment/default_clear_color"));
+ onion.capture.material->set_shader_param("bkg_color", GLOBAL_GET("rendering/environment/defaults/default_clear_color"));
onion.capture.material->set_shader_param("differences_only", onion.differences_only);
onion.capture.material->set_shader_param("present", onion.differences_only ? RS::get_singleton()->viewport_get_texture(present_rid) : RID());
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index b2d143c416..4d9c5625a3 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -350,7 +350,7 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int
if (sha256 != download_sha256) {
error_text = TTR("Bad download hash, assuming file has been tampered with.") + "\n";
error_text += TTR("Expected:") + " " + sha256 + "\n" + TTR("Got:") + " " + download_sha256;
- status->set_text(TTR("Failed sha256 hash check"));
+ status->set_text(TTR("Failed SHA-256 hash check"));
}
}
} break;
@@ -359,6 +359,8 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int
if (error_text != String()) {
download_error->set_text(TTR("Asset Download Error:") + "\n" + error_text);
download_error->popup_centered();
+ // Let the user retry the download.
+ retry->show();
return;
}
@@ -459,6 +461,9 @@ void EditorAssetLibraryItemDownload::_install() {
}
void EditorAssetLibraryItemDownload::_make_request() {
+ // Hide the Retry button if we've just pressed it.
+ retry->hide();
+
download->cancel_request();
download->set_download_file(EditorSettings::get_singleton()->get_cache_dir().plus_file("tmp_asset_" + itos(asset_id)) + ".zip");
@@ -516,6 +521,8 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
retry = memnew(Button);
retry->set_text(TTR("Retry"));
retry->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_make_request));
+ // Only show the Retry button in case of a failure.
+ retry->hide();
hb2->add_child(retry);
hb2->add_child(install);
@@ -900,7 +907,7 @@ void EditorAssetLibrary::_search(int p_page) {
}
if (filter->get_text() != String()) {
- args += "&filter=" + filter->get_text().http_escape();
+ args += "&filter=" + filter->get_text().uri_encode();
}
if (p_page > 0) {
@@ -1364,10 +1371,18 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
search_hb2->add_child(memnew(Label(TTR("Site:") + " ")));
repository = memnew(OptionButton);
- repository->add_item("godotengine.org");
- repository->set_item_metadata(0, "https://godotengine.org/asset-library/api");
- repository->add_item("localhost");
- repository->set_item_metadata(1, "http://127.0.0.1/asset-library/api");
+ {
+ Dictionary default_urls;
+ default_urls["godotengine.org"] = "https://godotengine.org/asset-library/api";
+ default_urls["localhost"] = "http://127.0.0.1/asset-library/api";
+ Dictionary available_urls = _EDITOR_DEF("asset_library/available_urls", default_urls, true);
+ Array keys = available_urls.keys();
+ for (int i = 0; i < available_urls.size(); i++) {
+ String key = keys[i];
+ repository->add_item(key);
+ repository->set_item_metadata(i, available_urls[key]);
+ }
+ }
repository->connect("item_selected", callable_mp(this, &EditorAssetLibrary::_repository_changed));
diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp
index 1765c99572..5963092860 100644
--- a/editor/plugins/audio_stream_editor_plugin.cpp
+++ b/editor/plugins/audio_stream_editor_plugin.cpp
@@ -96,7 +96,7 @@ void AudioStreamEditor::_preview_changed(ObjectID p_which) {
}
}
-void AudioStreamEditor::_changed_callback(Object *p_changed, const char *p_prop) {
+void AudioStreamEditor::_audio_changed() {
if (!is_visible()) {
return;
}
@@ -172,7 +172,7 @@ void AudioStreamEditor::_seek_to(real_t p_x) {
void AudioStreamEditor::edit(Ref<AudioStream> p_stream) {
if (!stream.is_null()) {
- stream->remove_change_receptor(this);
+ stream->disconnect("changed", callable_mp(this, &AudioStreamEditor::_audio_changed));
}
stream = p_stream;
@@ -182,7 +182,7 @@ void AudioStreamEditor::edit(Ref<AudioStream> p_stream) {
_duration_label->set_text(text);
if (!stream.is_null()) {
- stream->add_change_receptor(this);
+ stream->connect("changed", callable_mp(this, &AudioStreamEditor::_audio_changed));
update();
} else {
hide();
diff --git a/editor/plugins/audio_stream_editor_plugin.h b/editor/plugins/audio_stream_editor_plugin.h
index f27add7229..aa906a6a05 100644
--- a/editor/plugins/audio_stream_editor_plugin.h
+++ b/editor/plugins/audio_stream_editor_plugin.h
@@ -53,6 +53,8 @@ class AudioStreamEditor : public ColorRect {
float _current;
bool _dragging;
+ void _audio_changed();
+
protected:
void _notification(int p_what);
void _preview_changed(ObjectID p_which);
@@ -63,7 +65,6 @@ protected:
void _draw_indicator();
void _on_input_indicator(Ref<InputEvent> p_event);
void _seek_to(real_t p_x);
- void _changed_callback(Object *p_changed, const char *p_prop) override;
static void _bind_methods();
public:
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 49af478307..d92837b68d 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -216,8 +216,8 @@ public:
grid_step_x->set_value(p_grid_step.x);
grid_step_y->set_value(p_grid_step.y);
primary_grid_steps->set_value(p_primary_grid_steps);
- rotation_offset->set_value(p_rotation_offset * (180 / Math_PI));
- rotation_step->set_value(p_rotation_step * (180 / Math_PI));
+ rotation_offset->set_value(Math::rad2deg(p_rotation_offset));
+ rotation_step->set_value(Math::rad2deg(p_rotation_step));
scale_step->set_value(p_scale_step);
}
@@ -225,8 +225,8 @@ public:
p_grid_offset = Point2(grid_offset_x->get_value(), grid_offset_y->get_value());
p_grid_step = Point2(grid_step_x->get_value(), grid_step_y->get_value());
p_primary_grid_steps = int(primary_grid_steps->get_value());
- p_rotation_offset = rotation_offset->get_value() / (180 / Math_PI);
- p_rotation_step = rotation_step->get_value() / (180 / Math_PI);
+ p_rotation_offset = Math::deg2rad(rotation_offset->get_value());
+ p_rotation_step = Math::deg2rad(rotation_step->get_value());
p_scale_step = scale_step->get_value();
}
};
@@ -4163,7 +4163,7 @@ void CanvasItemEditor::_notification(int p_what) {
// the icon will be dark, so we need to lighten it before blending it
// with the red color.
const Color key_auto_color = EditorSettings::get_singleton()->is_dark_theme() ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25);
- key_auto_insert_button->add_theme_color_override("icon_color_pressed", key_auto_color.lerp(Color(1, 0, 0), 0.55));
+ key_auto_insert_button->add_theme_color_override("icon_pressed_color", key_auto_color.lerp(Color(1, 0, 0), 0.55));
animation_menu->set_icon(get_theme_icon("GuiTabMenuHl", "EditorIcons"));
zoom_minus->set_icon(get_theme_icon("ZoomLess", "EditorIcons"));
@@ -5638,7 +5638,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
primary_grid_steps = 8; // A power-of-two value works better as a default
grid_step_multiplier = 0;
snap_rotation_offset = 0;
- snap_rotation_step = 15 / (180 / Math_PI);
+ snap_rotation_step = Math::deg2rad(15.0);
snap_scale_step = 0.1f;
smart_snap_active = false;
grid_snap_active = false;
@@ -5779,7 +5779,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
zoom_reset->set_flat(true);
zoom_hb->add_child(zoom_reset);
zoom_reset->add_theme_constant_override("outline_size", 1);
- zoom_reset->add_theme_color_override("font_outline_modulate", Color(0, 0, 0));
+ zoom_reset->add_theme_color_override("font_outline_color", Color(0, 0, 0));
zoom_reset->add_theme_color_override("font_color", Color(1, 1, 1));
zoom_reset->connect("pressed", callable_mp(this, &CanvasItemEditor::_button_zoom_reset));
zoom_reset->set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_reset", TTR("Zoom Reset"), KEY_MASK_CMD | KEY_0));
@@ -6613,7 +6613,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
}
label = memnew(Label);
- label->add_theme_color_override("font_color_shadow", Color(0, 0, 0, 1));
+ label->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 1));
label->add_theme_constant_override("shadow_as_outline", 1 * EDSCALE);
label->hide();
canvas_item_editor->get_controls_container()->add_child(label);
@@ -6621,7 +6621,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
label_desc = memnew(Label);
label_desc->set_text(TTR("Drag & drop + Shift : Add node as sibling\nDrag & drop + Alt : Change node type"));
label_desc->add_theme_color_override("font_color", Color(0.6f, 0.6f, 0.6f, 1));
- label_desc->add_theme_color_override("font_color_shadow", Color(0.2f, 0.2f, 0.2f, 1));
+ label_desc->add_theme_color_override("font_shadow_color", Color(0.2f, 0.2f, 0.2f, 1));
label_desc->add_theme_constant_override("shadow_as_outline", 1 * EDSCALE);
label_desc->add_theme_constant_override("line_spacing", 0);
label_desc->hide();
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index a1e7d3d6e0..141ee35cdb 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -207,7 +207,7 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) {
} break;
}
- node->get_shape()->_change_notify();
+ node->get_shape()->notify_property_list_changed();
}
void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index bdf88b82e4..eb3c06fba1 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -301,7 +301,7 @@ EditorPackedScenePreviewPlugin::EditorPackedScenePreviewPlugin() {
//////////////////////////////////////////////////////////////////
void EditorMaterialPreviewPlugin::_preview_done(const Variant &p_udata) {
- preview_done = true;
+ preview_done.set();
}
void EditorMaterialPreviewPlugin::_bind_methods() {
@@ -325,10 +325,10 @@ Ref<Texture2D> EditorMaterialPreviewPlugin::generate(const RES &p_from, const Si
RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture
- preview_done = false;
+ preview_done.clear();
RS::get_singleton()->request_frame_drawn_callback(const_cast<EditorMaterialPreviewPlugin *>(this), "_preview_done", Variant());
- while (!preview_done) {
+ while (!preview_done.is_set()) {
OS::get_singleton()->delay_usec(10);
}
@@ -382,7 +382,9 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() {
int lats = 32;
int lons = 32;
- float radius = 1.0;
+ const double lat_step = Math_TAU / lats;
+ const double lon_step = Math_TAU / lons;
+ real_t radius = 1.0;
Vector<Vector3> vertices;
Vector<Vector3> normals;
@@ -391,20 +393,20 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() {
Basis tt = Basis(Vector3(0, 1, 0), Math_PI * 0.5);
for (int i = 1; i <= lats; i++) {
- double lat0 = Math_PI * (-0.5 + (double)(i - 1) / lats);
+ double lat0 = lat_step * (i - 1) - Math_TAU / 4;
double z0 = Math::sin(lat0);
double zr0 = Math::cos(lat0);
- double lat1 = Math_PI * (-0.5 + (double)i / lats);
+ double lat1 = lat_step * i - Math_TAU / 4;
double z1 = Math::sin(lat1);
double zr1 = Math::cos(lat1);
for (int j = lons; j >= 1; j--) {
- double lng0 = 2 * Math_PI * (double)(j - 1) / lons;
+ double lng0 = lon_step * (j - 1);
double x0 = Math::cos(lng0);
double y0 = Math::sin(lng0);
- double lng1 = 2 * Math_PI * (double)(j) / lons;
+ double lng1 = lon_step * j;
double x1 = Math::cos(lng1);
double y1 = Math::sin(lng1);
@@ -675,7 +677,7 @@ EditorAudioStreamPreviewPlugin::EditorAudioStreamPreviewPlugin() {
///////////////////////////////////////////////////////////////////////////
void EditorMeshPreviewPlugin::_preview_done(const Variant &p_udata) {
- preview_done = true;
+ preview_done.set();
}
void EditorMeshPreviewPlugin::_bind_methods() {
@@ -712,10 +714,10 @@ Ref<Texture2D> EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2
RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture
- preview_done = false;
+ preview_done.clear();
RS::get_singleton()->request_frame_drawn_callback(const_cast<EditorMeshPreviewPlugin *>(this), "_preview_done", Variant());
- while (!preview_done) {
+ while (!preview_done.is_set()) {
OS::get_singleton()->delay_usec(10);
}
@@ -790,7 +792,7 @@ EditorMeshPreviewPlugin::~EditorMeshPreviewPlugin() {
///////////////////////////////////////////////////////////////////////////
void EditorFontPreviewPlugin::_preview_done(const Variant &p_udata) {
- preview_done = true;
+ preview_done.set();
}
void EditorFontPreviewPlugin::_bind_methods() {
@@ -881,11 +883,11 @@ Ref<Texture2D> EditorFontPreviewPlugin::generate_from_path(const String &p_path,
font->draw_string(canvas_item, pos, sample, HALIGN_LEFT, -1.f, 50, Color(1, 1, 1));
- preview_done = false;
+ preview_done.clear();
RS::get_singleton()->viewport_set_update_mode(viewport, RS::VIEWPORT_UPDATE_ONCE); //once used for capture
RS::get_singleton()->request_frame_drawn_callback(const_cast<EditorFontPreviewPlugin *>(this), "_preview_done", Variant());
- while (!preview_done) {
+ while (!preview_done.is_set()) {
OS::get_singleton()->delay_usec(10);
}
diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h
index 57e2911c89..6e8b9a34cf 100644
--- a/editor/plugins/editor_preview_plugins.h
+++ b/editor/plugins/editor_preview_plugins.h
@@ -33,6 +33,8 @@
#include "editor/editor_resource_preview.h"
+#include "core/templates/safe_refcount.h"
+
void post_process_preview(Ref<Image> p_image);
class EditorTexturePreviewPlugin : public EditorResourcePreviewGenerator {
@@ -90,7 +92,7 @@ class EditorMaterialPreviewPlugin : public EditorResourcePreviewGenerator {
RID light2;
RID light_instance2;
RID camera;
- mutable volatile bool preview_done = false;
+ mutable SafeFlag preview_done;
void _preview_done(const Variant &p_udata);
@@ -134,7 +136,7 @@ class EditorMeshPreviewPlugin : public EditorResourcePreviewGenerator {
RID light2;
RID light_instance2;
RID camera;
- mutable volatile bool preview_done = false;
+ mutable SafeFlag preview_done;
void _preview_done(const Variant &p_udata);
@@ -156,7 +158,7 @@ class EditorFontPreviewPlugin : public EditorResourcePreviewGenerator {
RID viewport_texture;
RID canvas;
RID canvas_item;
- mutable volatile bool preview_done = false;
+ mutable SafeFlag preview_done;
void _preview_done(const Variant &p_udata);
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index c0f690bb6a..1ea6630622 100644
--- a/editor/plugins/item_list_editor_plugin.cpp
+++ b/editor/plugins/item_list_editor_plugin.cpp
@@ -145,7 +145,7 @@ int ItemListOptionButtonPlugin::get_flags() const {
void ItemListOptionButtonPlugin::add_item() {
ob->add_item(vformat(TTR("Item %d"), ob->get_item_count()));
- _change_notify();
+ notify_property_list_changed();
}
int ItemListOptionButtonPlugin::get_item_count() const {
@@ -154,7 +154,7 @@ int ItemListOptionButtonPlugin::get_item_count() const {
void ItemListOptionButtonPlugin::erase(int p_idx) {
ob->remove_item(p_idx);
- _change_notify();
+ notify_property_list_changed();
}
ItemListOptionButtonPlugin::ItemListOptionButtonPlugin() {
@@ -181,7 +181,7 @@ int ItemListPopupMenuPlugin::get_flags() const {
void ItemListPopupMenuPlugin::add_item() {
pp->add_item(vformat(TTR("Item %d"), pp->get_item_count()));
- _change_notify();
+ notify_property_list_changed();
}
int ItemListPopupMenuPlugin::get_item_count() const {
@@ -190,7 +190,7 @@ int ItemListPopupMenuPlugin::get_item_count() const {
void ItemListPopupMenuPlugin::erase(int p_idx) {
pp->remove_item(p_idx);
- _change_notify();
+ notify_property_list_changed();
}
ItemListPopupMenuPlugin::ItemListPopupMenuPlugin() {
@@ -213,7 +213,7 @@ int ItemListItemListPlugin::get_flags() const {
void ItemListItemListPlugin::add_item() {
pp->add_item(vformat(TTR("Item %d"), pp->get_item_count()));
- _change_notify();
+ notify_property_list_changed();
}
int ItemListItemListPlugin::get_item_count() const {
@@ -222,7 +222,7 @@ int ItemListItemListPlugin::get_item_count() const {
void ItemListItemListPlugin::erase(int p_idx) {
pp->remove_item(p_idx);
- _change_notify();
+ notify_property_list_changed();
}
ItemListItemListPlugin::ItemListItemListPlugin() {
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 7717a9a27e..610ef0c601 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -2335,7 +2335,43 @@ void Node3DEditorPlugin::edited_scene_changed() {
}
}
+void Node3DEditorViewport::_project_settings_changed() {
+ //update shadow atlas if changed
+ int shadowmap_size = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/size");
+ bool shadowmap_16_bits = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/16_bits");
+ int atlas_q0 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_0_subdiv");
+ int atlas_q1 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_1_subdiv");
+ int atlas_q2 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_2_subdiv");
+ int atlas_q3 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_3_subdiv");
+
+ viewport->set_shadow_atlas_size(shadowmap_size);
+ viewport->set_shadow_atlas_16_bits(shadowmap_16_bits);
+ viewport->set_shadow_atlas_quadrant_subdiv(0, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q0));
+ viewport->set_shadow_atlas_quadrant_subdiv(1, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q1));
+ viewport->set_shadow_atlas_quadrant_subdiv(2, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q2));
+ viewport->set_shadow_atlas_quadrant_subdiv(3, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q3));
+
+ bool shrink = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_HALF_RESOLUTION));
+
+ if (shrink != (subviewport_container->get_stretch_shrink() > 1)) {
+ subviewport_container->set_stretch_shrink(shrink ? 2 : 1);
+ }
+
+ // Update MSAA, screen-space AA and debanding if changed
+
+ const int msaa_mode = ProjectSettings::get_singleton()->get("rendering/anti_aliasing/quality/msaa");
+ viewport->set_msaa(Viewport::MSAA(msaa_mode));
+ const int ssaa_mode = GLOBAL_GET("rendering/anti_aliasing/quality/screen_space_aa");
+ viewport->set_screen_space_aa(Viewport::ScreenSpaceAA(ssaa_mode));
+ const bool use_debanding = GLOBAL_GET("rendering/anti_aliasing/quality/use_debanding");
+ viewport->set_use_debanding(use_debanding);
+}
+
void Node3DEditorViewport::_notification(int p_what) {
+ if (p_what == NOTIFICATION_READY) {
+ EditorNode::get_singleton()->connect("project_settings_changed", callable_mp(this, &Node3DEditorViewport::_project_settings_changed));
+ }
+
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
bool visible = is_visible_in_tree();
@@ -2442,35 +2478,6 @@ void Node3DEditorViewport::_notification(int p_what) {
}
}
- //update shadow atlas if changed
-
- int shadowmap_size = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/size");
- int atlas_q0 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_0_subdiv");
- int atlas_q1 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_1_subdiv");
- int atlas_q2 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_2_subdiv");
- int atlas_q3 = ProjectSettings::get_singleton()->get("rendering/quality/shadow_atlas/quadrant_3_subdiv");
-
- viewport->set_shadow_atlas_size(shadowmap_size);
- viewport->set_shadow_atlas_quadrant_subdiv(0, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q0));
- viewport->set_shadow_atlas_quadrant_subdiv(1, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q1));
- viewport->set_shadow_atlas_quadrant_subdiv(2, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q2));
- viewport->set_shadow_atlas_quadrant_subdiv(3, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q3));
-
- bool shrink = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_HALF_RESOLUTION));
-
- if (shrink != (subviewport_container->get_stretch_shrink() > 1)) {
- subviewport_container->set_stretch_shrink(shrink ? 2 : 1);
- }
-
- // Update MSAA, screen-space AA and debanding if changed
-
- const int msaa_mode = ProjectSettings::get_singleton()->get("rendering/quality/screen_filters/msaa");
- viewport->set_msaa(Viewport::MSAA(msaa_mode));
- const int ssaa_mode = GLOBAL_GET("rendering/quality/screen_filters/screen_space_aa");
- viewport->set_screen_space_aa(Viewport::ScreenSpaceAA(ssaa_mode));
- const bool use_debanding = GLOBAL_GET("rendering/quality/screen_filters/use_debanding");
- viewport->set_use_debanding(use_debanding);
-
bool show_info = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_INFORMATION));
if (show_info != info_label->is_visible()) {
info_label->set_visible(show_info);
@@ -2491,6 +2498,13 @@ void Node3DEditorViewport::_notification(int p_what) {
text += "Z: " + rtos(current_camera->get_translation().z).pad_decimals(1) + "\n";
text += TTR("Pitch") + ": " + itos(Math::round(current_camera->get_rotation_degrees().x)) + "\n";
text += TTR("Yaw") + ": " + itos(Math::round(current_camera->get_rotation_degrees().y)) + "\n\n";
+
+ text += TTR("Size") +
+ vformat(
+ ": %dx%d (%.1fMP)\n",
+ viewport->get_size().x,
+ viewport->get_size().y,
+ viewport->get_size().x * viewport->get_size().y * 0.000'001);
text += TTR("Objects Drawn") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_OBJECTS_IN_FRAME)) + "\n";
text += TTR("Material Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_MATERIAL_CHANGES_IN_FRAME)) + "\n";
text += TTR("Shader Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_SHADER_CHANGES_IN_FRAME)) + "\n";
@@ -2822,7 +2836,7 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_FRONT: {
cursor.x_rot = 0;
- cursor.y_rot = 0;
+ cursor.y_rot = Math_PI;
set_message(TTR("Front View."), 2);
name = TTR("Front");
_set_auto_orthogonal();
@@ -2831,7 +2845,7 @@ void Node3DEditorViewport::_menu_option(int p_option) {
} break;
case VIEW_REAR: {
cursor.x_rot = 0;
- cursor.y_rot = Math_PI;
+ cursor.y_rot = 0;
set_message(TTR("Rear View."), 2);
name = TTR("Rear");
_set_auto_orthogonal();
@@ -3319,6 +3333,21 @@ void Node3DEditorViewport::update_transform_gizmo_view() {
xform.basis.scale(scale);
+ // if the determinant is zero, we should disable the gizmo from being rendered
+ // this prevents supplying bad values to the renderer and then having to filter it out again
+ if (xform.basis.determinant() == 0) {
+ for (int i = 0; i < 3; i++) {
+ RenderingServer::get_singleton()->instance_set_visible(move_gizmo_instance[i], false);
+ RenderingServer::get_singleton()->instance_set_visible(move_plane_gizmo_instance[i], false);
+ RenderingServer::get_singleton()->instance_set_visible(rotate_gizmo_instance[i], false);
+ RenderingServer::get_singleton()->instance_set_visible(scale_gizmo_instance[i], false);
+ RenderingServer::get_singleton()->instance_set_visible(scale_plane_gizmo_instance[i], false);
+ }
+ // Rotation white outline
+ RenderingServer::get_singleton()->instance_set_visible(rotate_gizmo_instance[3], false);
+ return;
+ }
+
for (int i = 0; i < 3; i++) {
RenderingServer::get_singleton()->instance_set_transform(move_gizmo_instance[i], xform);
RenderingServer::get_singleton()->instance_set_visible(move_gizmo_instance[i], spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_MOVE));
@@ -5242,6 +5271,42 @@ void Node3DEditor::_init_indicators() {
origin_points.push_back(axis * -1048576);
}
+ Ref<Shader> grid_shader = memnew(Shader);
+ grid_shader->set_code(
+ "\n"
+ "shader_type spatial; \n"
+ "render_mode unshaded; \n"
+ "uniform bool orthogonal; \n"
+ "uniform float grid_size; \n"
+ "\n"
+ "void vertex() { \n"
+ " // From FLAG_SRGB_VERTEX_COLOR \n"
+ " if (!OUTPUT_IS_SRGB) { \n"
+ " COLOR.rgb = mix(pow((COLOR.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), COLOR.rgb * (1.0 / 12.92), lessThan(COLOR.rgb, vec3(0.04045))); \n"
+ " } \n"
+ "} \n"
+ "\n"
+ "void fragment() { \n"
+ " ALBEDO = COLOR.rgb; \n"
+ " vec3 dir = orthogonal ? -vec3(0, 0, 1) : VIEW; \n"
+ " float angle_fade = abs(dot(dir, NORMAL)); \n"
+ " angle_fade = smoothstep(0.05, 0.2, angle_fade); \n"
+ " \n"
+ " vec3 world_pos = (CAMERA_MATRIX * vec4(VERTEX, 1.0)).xyz; \n"
+ " vec3 world_normal = (CAMERA_MATRIX * vec4(NORMAL, 0.0)).xyz; \n"
+ " vec3 camera_world_pos = CAMERA_MATRIX[3].xyz; \n"
+ " vec3 camera_world_pos_on_plane = camera_world_pos * (1.0 - world_normal); \n"
+ " float dist_fade = 1.0 - (distance(world_pos, camera_world_pos_on_plane) / grid_size); \n"
+ " dist_fade = smoothstep(0.02, 0.3, dist_fade); \n"
+ " \n"
+ " ALPHA = COLOR.a * dist_fade * angle_fade; \n"
+ "}");
+
+ for (int i = 0; i < 3; i++) {
+ grid_mat[i].instance();
+ grid_mat[i]->set_shader(grid_shader);
+ }
+
grid_enable[0] = EditorSettings::get_singleton()->get("editors/3d/grid_xy_plane");
grid_enable[1] = EditorSettings::get_singleton()->get("editors/3d/grid_yz_plane");
grid_enable[2] = EditorSettings::get_singleton()->get("editors/3d/grid_xz_plane");
@@ -5334,9 +5399,10 @@ void Node3DEditor::_init_indicators() {
int arrow_sides = 16;
+ const real_t arrow_sides_step = Math_TAU / arrow_sides;
for (int k = 0; k < arrow_sides; k++) {
- Basis ma(ivec, Math_PI * 2 * float(k) / arrow_sides);
- Basis mb(ivec, Math_PI * 2 * float(k + 1) / arrow_sides);
+ Basis ma(ivec, k * arrow_sides_step);
+ Basis mb(ivec, (k + 1) * arrow_sides_step);
for (int j = 0; j < arrow_points - 1; j++) {
Vector3 points[4] = {
@@ -5411,13 +5477,14 @@ void Node3DEditor::_init_indicators() {
int n = 128; // number of circle segments
int m = 6; // number of thickness segments
+ real_t step = Math_TAU / n;
for (int j = 0; j < n; ++j) {
- Basis basis = Basis(ivec, (Math_PI * 2.0f * j) / n);
+ Basis basis = Basis(ivec, j * step);
Vector3 vertex = basis.xform(ivec2 * GIZMO_CIRCLE_SIZE);
for (int k = 0; k < m; ++k) {
- Vector2 ofs = Vector2(Math::cos((Math_PI * 2.0 * k) / m), Math::sin((Math_PI * 2.0 * k) / m));
+ Vector2 ofs = Vector2(Math::cos((Math_TAU * k) / m), Math::sin((Math_TAU * k) / m));
Vector3 normal = ivec * ofs.x + ivec2 * ofs.y;
surftool->set_normal(basis.xform(normal));
@@ -5444,32 +5511,33 @@ void Node3DEditor::_init_indicators() {
Ref<Shader> rotate_shader = memnew(Shader);
- rotate_shader->set_code("\n"
- "shader_type spatial; \n"
- "render_mode unshaded, depth_test_disabled; \n"
- "uniform vec4 albedo; \n"
- "\n"
- "mat3 orthonormalize(mat3 m) { \n"
- " vec3 x = normalize(m[0]); \n"
- " vec3 y = normalize(m[1] - x * dot(x, m[1])); \n"
- " vec3 z = m[2] - x * dot(x, m[2]); \n"
- " z = normalize(z - y * (dot(y,m[2]))); \n"
- " return mat3(x,y,z); \n"
- "} \n"
- "\n"
- "void vertex() { \n"
- " mat3 mv = orthonormalize(mat3(MODELVIEW_MATRIX)); \n"
- " vec3 n = mv * VERTEX; \n"
- " float orientation = dot(vec3(0,0,-1),n); \n"
- " if (orientation <= 0.005) { \n"
- " VERTEX += NORMAL*0.02; \n"
- " } \n"
- "} \n"
- "\n"
- "void fragment() { \n"
- " ALBEDO = albedo.rgb; \n"
- " ALPHA = albedo.a; \n"
- "}");
+ rotate_shader->set_code(
+ "\n"
+ "shader_type spatial; \n"
+ "render_mode unshaded, depth_test_disabled; \n"
+ "uniform vec4 albedo; \n"
+ "\n"
+ "mat3 orthonormalize(mat3 m) { \n"
+ " vec3 x = normalize(m[0]); \n"
+ " vec3 y = normalize(m[1] - x * dot(x, m[1])); \n"
+ " vec3 z = m[2] - x * dot(x, m[2]); \n"
+ " z = normalize(z - y * (dot(y,m[2]))); \n"
+ " return mat3(x,y,z); \n"
+ "} \n"
+ "\n"
+ "void vertex() { \n"
+ " mat3 mv = orthonormalize(mat3(MODELVIEW_MATRIX)); \n"
+ " vec3 n = mv * VERTEX; \n"
+ " float orientation = dot(vec3(0,0,-1),n); \n"
+ " if (orientation <= 0.005) { \n"
+ " VERTEX += NORMAL*0.02; \n"
+ " } \n"
+ "} \n"
+ "\n"
+ "void fragment() { \n"
+ " ALBEDO = albedo.rgb; \n"
+ " ALPHA = albedo.a; \n"
+ "}");
Ref<ShaderMaterial> rotate_mat = memnew(ShaderMaterial);
rotate_mat->set_render_priority(Material::RENDER_PRIORITY_MAX);
@@ -5489,33 +5557,34 @@ void Node3DEditor::_init_indicators() {
Ref<ShaderMaterial> border_mat = rotate_mat->duplicate();
Ref<Shader> border_shader = memnew(Shader);
- border_shader->set_code("\n"
- "shader_type spatial; \n"
- "render_mode unshaded, depth_test_disabled; \n"
- "uniform vec4 albedo; \n"
- "\n"
- "mat3 orthonormalize(mat3 m) { \n"
- " vec3 x = normalize(m[0]); \n"
- " vec3 y = normalize(m[1] - x * dot(x, m[1])); \n"
- " vec3 z = m[2] - x * dot(x, m[2]); \n"
- " z = normalize(z - y * (dot(y,m[2]))); \n"
- " return mat3(x,y,z); \n"
- "} \n"
- "\n"
- "void vertex() { \n"
- " mat3 mv = orthonormalize(mat3(MODELVIEW_MATRIX)); \n"
- " mv = inverse(mv); \n"
- " VERTEX += NORMAL*0.008; \n"
- " vec3 camera_dir_local = mv * vec3(0,0,1); \n"
- " vec3 camera_up_local = mv * vec3(0,1,0); \n"
- " mat3 rotation_matrix = mat3(cross(camera_dir_local, camera_up_local), camera_up_local, camera_dir_local); \n"
- " VERTEX = rotation_matrix * VERTEX; \n"
- "} \n"
- "\n"
- "void fragment() { \n"
- " ALBEDO = albedo.rgb; \n"
- " ALPHA = albedo.a; \n"
- "}");
+ border_shader->set_code(
+ "\n"
+ "shader_type spatial; \n"
+ "render_mode unshaded, depth_test_disabled; \n"
+ "uniform vec4 albedo; \n"
+ "\n"
+ "mat3 orthonormalize(mat3 m) { \n"
+ " vec3 x = normalize(m[0]); \n"
+ " vec3 y = normalize(m[1] - x * dot(x, m[1])); \n"
+ " vec3 z = m[2] - x * dot(x, m[2]); \n"
+ " z = normalize(z - y * (dot(y,m[2]))); \n"
+ " return mat3(x,y,z); \n"
+ "} \n"
+ "\n"
+ "void vertex() { \n"
+ " mat3 mv = orthonormalize(mat3(MODELVIEW_MATRIX)); \n"
+ " mv = inverse(mv); \n"
+ " VERTEX += NORMAL*0.008; \n"
+ " vec3 camera_dir_local = mv * vec3(0,0,1); \n"
+ " vec3 camera_up_local = mv * vec3(0,1,0); \n"
+ " mat3 rotation_matrix = mat3(cross(camera_dir_local, camera_up_local), camera_up_local, camera_dir_local); \n"
+ " VERTEX = rotation_matrix * VERTEX; \n"
+ "} \n"
+ "\n"
+ "void fragment() { \n"
+ " ALBEDO = albedo.rgb; \n"
+ " ALPHA = albedo.a; \n"
+ "}");
border_mat->set_shader(border_shader);
border_mat->set_shader_param("albedo", Color(0.75, 0.75, 0.75, col.a / 3.0));
@@ -5544,9 +5613,10 @@ void Node3DEditor::_init_indicators() {
int arrow_sides = 4;
+ const real_t arrow_sides_step = Math_TAU / arrow_sides;
for (int k = 0; k < 4; k++) {
- Basis ma(ivec, Math_PI * 2 * float(k) / arrow_sides);
- Basis mb(ivec, Math_PI * 2 * float(k + 1) / arrow_sides);
+ Basis ma(ivec, k * arrow_sides_step);
+ Basis mb(ivec, (k + 1) * arrow_sides_step);
for (int j = 0; j < arrow_points - 1; j++) {
Vector3 points[4] = {
@@ -5677,8 +5747,11 @@ void Node3DEditor::_init_grid() {
return; // Camera3D is invalid, don't draw the grid.
}
+ bool orthogonal = camera->get_projection() == Camera3D::PROJECTION_ORTHOGONAL;
+
Vector<Color> grid_colors[3];
Vector<Vector3> grid_points[3];
+ Vector<Vector3> grid_normals[3];
Color primary_grid_color = EditorSettings::get_singleton()->get("editors/3d/primary_grid_color");
Color secondary_grid_color = EditorSettings::get_singleton()->get("editors/3d/secondary_grid_color");
@@ -5714,10 +5787,26 @@ void Node3DEditor::_init_grid() {
int b = (a + 1) % 3;
int c = (a + 2) % 3;
- real_t division_level = Math::log(Math::abs(camera_position[c])) / Math::log((double)primary_grid_steps) + division_level_bias;
- division_level = CLAMP(division_level, division_level_min, division_level_max);
- real_t division_level_floored = Math::floor(division_level);
- real_t division_level_decimals = division_level - division_level_floored;
+ Vector3 normal;
+ normal[c] = 1.0;
+
+ real_t camera_distance = Math::abs(camera_position[c]);
+
+ if (orthogonal) {
+ camera_distance = camera->get_size() / 2.0;
+ Vector3 camera_direction = -camera->get_global_transform().get_basis().get_axis(2);
+ Plane grid_plane = Plane(Vector3(), normal);
+ Vector3 intersection;
+ if (grid_plane.intersects_ray(camera_position, camera_direction, &intersection)) {
+ camera_position = intersection;
+ }
+ }
+
+ real_t division_level = Math::log(Math::abs(camera_distance)) / Math::log((double)primary_grid_steps) + division_level_bias;
+
+ real_t clamped_division_level = CLAMP(division_level, division_level_min, division_level_max);
+ real_t division_level_floored = Math::floor(clamped_division_level);
+ real_t division_level_decimals = clamped_division_level - division_level_floored;
real_t small_step_size = Math::pow(primary_grid_steps, division_level_floored);
real_t large_step_size = small_step_size * primary_grid_steps;
@@ -5729,6 +5818,15 @@ void Node3DEditor::_init_grid() {
real_t bgn_b = center_b - grid_size * small_step_size;
real_t end_b = center_b + grid_size * small_step_size;
+ real_t fade_size = Math::pow(primary_grid_steps, division_level - 1.0);
+ real_t min_fade_size = Math::pow(primary_grid_steps, float(division_level_min));
+ real_t max_fade_size = Math::pow(primary_grid_steps, float(division_level_max));
+ fade_size = CLAMP(fade_size, min_fade_size, max_fade_size);
+
+ real_t grid_fade_size = (grid_size - primary_grid_steps) * fade_size;
+ grid_mat[c]->set_shader_param("grid_size", grid_fade_size);
+ grid_mat[c]->set_shader_param("orthogonal", orthogonal);
+
// In each iteration of this loop, draw one line in each direction (so two lines per loop, in each if statement).
for (int i = -grid_size; i <= grid_size; i++) {
Color line_color;
@@ -5739,11 +5837,6 @@ void Node3DEditor::_init_grid() {
line_color = secondary_grid_color;
line_color.a = line_color.a * (1 - division_level_decimals);
}
- // Makes lines farther from the center fade out.
- // Due to limitations of lines, any that come near the camera have full opacity always.
- // This should eventually be replaced by some kind of "distance fade" system, outside of this function.
- // But the effect is still somewhat convincing...
- line_color.a *= 1 - (1 - division_level_decimals * 0.9) * (Math::abs(i / (float)grid_size));
real_t position_a = center_a + i * small_step_size;
real_t position_b = center_b + i * small_step_size;
@@ -5760,6 +5853,8 @@ void Node3DEditor::_init_grid() {
grid_points[c].push_back(line_end);
grid_colors[c].push_back(line_color);
grid_colors[c].push_back(line_color);
+ grid_normals[c].push_back(normal);
+ grid_normals[c].push_back(normal);
}
if (!(origin_enabled && Math::is_zero_approx(position_b))) {
@@ -5773,6 +5868,8 @@ void Node3DEditor::_init_grid() {
grid_points[c].push_back(line_end);
grid_colors[c].push_back(line_color);
grid_colors[c].push_back(line_color);
+ grid_normals[c].push_back(normal);
+ grid_normals[c].push_back(normal);
}
}
@@ -5782,8 +5879,9 @@ void Node3DEditor::_init_grid() {
d.resize(RS::ARRAY_MAX);
d[RenderingServer::ARRAY_VERTEX] = grid_points[c];
d[RenderingServer::ARRAY_COLOR] = grid_colors[c];
+ d[RenderingServer::ARRAY_NORMAL] = grid_normals[c];
RenderingServer::get_singleton()->mesh_add_surface_from_arrays(grid[c], RenderingServer::PRIMITIVE_LINES, d);
- RenderingServer::get_singleton()->mesh_surface_set_material(grid[c], 0, indicator_mat->get_rid());
+ RenderingServer::get_singleton()->mesh_surface_set_material(grid[c], 0, grid_mat[c]->get_rid());
grid_instance[c] = RenderingServer::get_singleton()->instance_create2(grid[c], get_tree()->get_root()->get_world_3d()->get_scenario());
// Yes, the end of this line is supposed to be a.
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index d7a47fa4fa..bf478f850e 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -463,6 +463,8 @@ private:
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
+ void _project_settings_changed();
+
protected:
void _notification(int p_what);
static void _bind_methods();
@@ -590,7 +592,6 @@ private:
/////
ToolMode tool_mode;
- bool orthogonal;
RenderingServer::ScenarioDebugMode scenario_debug;
@@ -623,6 +624,7 @@ private:
RID cursor_mesh;
RID cursor_instance;
Ref<StandardMaterial3D> indicator_mat;
+ Ref<ShaderMaterial> grid_mat[3];
Ref<StandardMaterial3D> cursor_material;
// Scene drag and drop support
diff --git a/editor/plugins/packed_scene_translation_parser_plugin.cpp b/editor/plugins/packed_scene_translation_parser_plugin.cpp
index 1f20a87565..0a949c8610 100644
--- a/editor/plugins/packed_scene_translation_parser_plugin.cpp
+++ b/editor/plugins/packed_scene_translation_parser_plugin.cpp
@@ -42,7 +42,7 @@ Error PackedSceneEditorTranslationParserPlugin::parse_file(const String &p_path,
// These properties are translated with the tr() function in the C++ code when being set or updated.
Error err;
- RES loaded_res = ResourceLoader::load(p_path, "PackedScene", false, &err);
+ RES loaded_res = ResourceLoader::load(p_path, "PackedScene", ResourceFormatLoader::CACHE_MODE_REUSE, &err);
if (err) {
ERR_PRINT("Failed to load " + p_path);
return err;
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 216c0c3bef..a6afd45686 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -894,7 +894,7 @@ void ScriptEditor::_reload_scripts() {
Ref<Script> script = edited_res;
if (script != nullptr) {
- Ref<Script> rel_script = ResourceLoader::load(script->get_path(), script->get_class(), true);
+ Ref<Script> rel_script = ResourceLoader::load(script->get_path(), script->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
ERR_CONTINUE(!rel_script.is_valid());
script->set_source_code(rel_script->get_source_code());
script->set_last_modified_time(rel_script->get_last_modified_time());
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 1b0e9ec781..b6df66b8af 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -214,7 +214,7 @@ void ScriptTextEditor::_load_theme_settings() {
text_edit->add_theme_color_override("line_number_color", line_number_color);
text_edit->add_theme_color_override("caret_color", caret_color);
text_edit->add_theme_color_override("caret_background_color", caret_background_color);
- text_edit->add_theme_color_override("font_color_selected", text_selected_color);
+ text_edit->add_theme_color_override("font_selected_color", text_selected_color);
text_edit->add_theme_color_override("selection_color", selection_color);
text_edit->add_theme_color_override("brace_mismatch_color", brace_mismatch_color);
text_edit->add_theme_color_override("current_line_color", current_line_color);
@@ -688,7 +688,7 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo
uint64_t date = FileAccess::get_modified_time(script->get_path());
if (last_date != date) {
- Ref<Script> rel_script = ResourceLoader::load(script->get_path(), script->get_class(), true);
+ Ref<Script> rel_script = ResourceLoader::load(script->get_path(), script->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
ERR_CONTINUE(!rel_script.is_valid());
script->set_source_code(rel_script->get_source_code());
script->set_last_modified_time(rel_script->get_last_modified_time());
@@ -1066,7 +1066,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
return;
}
- tx->indent_left();
+ tx->indent_selected_lines_left();
} break;
case EDIT_INDENT_RIGHT: {
Ref<Script> scr = script;
@@ -1074,7 +1074,7 @@ void ScriptTextEditor::_edit_option(int p_op) {
return;
}
- tx->indent_right();
+ tx->indent_selected_lines_right();
} break;
case EDIT_DELETE_LINE: {
code_editor->delete_lines();
@@ -1632,16 +1632,16 @@ void ScriptTextEditor::_color_changed(const Color &p_color) {
void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color, bool p_foldable, bool p_open_docs, bool p_goto_definition, Vector2 p_pos) {
context_menu->clear();
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
context_menu->add_separator();
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"), EDIT_COPY);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"), EDIT_PASTE);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
context_menu->add_separator();
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
context_menu->add_separator();
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
@@ -1743,14 +1743,14 @@ void ScriptTextEditor::_enable_code_editor() {
search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
edit_hb->add_child(edit_menu);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"), EDIT_COPY);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"), EDIT_PASTE);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_up"), EDIT_MOVE_LINE_UP);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_down"), EDIT_MOVE_LINE_DOWN);
@@ -1763,7 +1763,7 @@ void ScriptTextEditor::_enable_code_editor() {
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/clone_down"), EDIT_CLONE_DOWN);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/complete_symbol"), EDIT_COMPLETE);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_completion_query"), EDIT_COMPLETE);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/evaluate_selection"), EDIT_EVALUATE);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/trim_trailing_whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
@@ -1915,12 +1915,6 @@ static ScriptEditorBase *create_editor(const RES &p_resource) {
}
void ScriptTextEditor::register_editor() {
- ED_SHORTCUT("script_text_editor/undo", TTR("Undo"), KEY_MASK_CMD | KEY_Z);
- ED_SHORTCUT("script_text_editor/redo", TTR("Redo"), KEY_MASK_CMD | KEY_Y);
- ED_SHORTCUT("script_text_editor/cut", TTR("Cut"), KEY_MASK_CMD | KEY_X);
- ED_SHORTCUT("script_text_editor/copy", TTR("Copy"), KEY_MASK_CMD | KEY_C);
- ED_SHORTCUT("script_text_editor/paste", TTR("Paste"), KEY_MASK_CMD | KEY_V);
- ED_SHORTCUT("script_text_editor/select_all", TTR("Select All"), KEY_MASK_CMD | KEY_A);
ED_SHORTCUT("script_text_editor/move_up", TTR("Move Up"), KEY_MASK_ALT | KEY_UP);
ED_SHORTCUT("script_text_editor/move_down", TTR("Move Down"), KEY_MASK_ALT | KEY_DOWN);
ED_SHORTCUT("script_text_editor/delete_line", TTR("Delete Line"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_K);
@@ -1936,10 +1930,8 @@ void ScriptTextEditor::register_editor() {
ED_SHORTCUT("script_text_editor/unfold_all_lines", TTR("Unfold All Lines"), 0);
#ifdef OSX_ENABLED
ED_SHORTCUT("script_text_editor/clone_down", TTR("Clone Down"), KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_C);
- ED_SHORTCUT("script_text_editor/complete_symbol", TTR("Complete Symbol"), KEY_MASK_CTRL | KEY_SPACE);
#else
ED_SHORTCUT("script_text_editor/clone_down", TTR("Clone Down"), KEY_MASK_CMD | KEY_D);
- ED_SHORTCUT("script_text_editor/complete_symbol", TTR("Complete Symbol"), KEY_MASK_CMD | KEY_SPACE);
#endif
ED_SHORTCUT("script_text_editor/evaluate_selection", TTR("Evaluate Selection"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_E);
ED_SHORTCUT("script_text_editor/trim_trailing_whitespace", TTR("Trim Trailing Whitespace"), KEY_MASK_CMD | KEY_MASK_ALT | KEY_T);
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index d6a816f606..c8a46715ad 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -117,7 +117,7 @@ void ShaderTextEditor::_load_theme_settings() {
get_text_editor()->add_theme_color_override("line_number_color", line_number_color);
get_text_editor()->add_theme_color_override("caret_color", caret_color);
get_text_editor()->add_theme_color_override("caret_background_color", caret_background_color);
- get_text_editor()->add_theme_color_override("font_color_selected", text_selected_color);
+ get_text_editor()->add_theme_color_override("font_selected_color", text_selected_color);
get_text_editor()->add_theme_color_override("selection_color", selection_color);
get_text_editor()->add_theme_color_override("brace_mismatch_color", brace_mismatch_color);
get_text_editor()->add_theme_color_override("current_line_color", current_line_color);
@@ -282,7 +282,7 @@ void ShaderEditor::_menu_option(int p_option) {
}
CodeEdit *tx = shader_editor->get_text_editor();
- tx->indent_left();
+ tx->indent_selected_lines_left();
} break;
case EDIT_INDENT_RIGHT: {
@@ -291,7 +291,7 @@ void ShaderEditor::_menu_option(int p_option) {
}
CodeEdit *tx = shader_editor->get_text_editor();
- tx->indent_right();
+ tx->indent_selected_lines_right();
} break;
case EDIT_DELETE_LINE: {
@@ -405,7 +405,7 @@ void ShaderEditor::_check_for_external_edit() {
}
void ShaderEditor::_reload_shader_from_disk() {
- Ref<Shader> rel_shader = ResourceLoader::load(shader->get_path(), shader->get_class(), true);
+ Ref<Shader> rel_shader = ResourceLoader::load(shader->get_path(), shader->get_class(), ResourceFormatLoader::CACHE_MODE_IGNORE);
ERR_FAIL_COND(!rel_shader.is_valid());
shader->set_code(rel_shader->get_code());
@@ -533,15 +533,15 @@ void ShaderEditor::_bookmark_item_pressed(int p_idx) {
void ShaderEditor::_make_context_menu(bool p_selection, Vector2 p_position) {
context_menu->clear();
if (p_selection) {
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"), EDIT_COPY);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
}
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"), EDIT_PASTE);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
context_menu->add_separator();
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
context_menu->add_separator();
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
@@ -585,14 +585,14 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
edit_menu->set_text(TTR("Edit"));
edit_menu->set_switch_on_hover(true);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"), EDIT_COPY);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"), EDIT_PASTE);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_up"), EDIT_MOVE_LINE_UP);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_down"), EDIT_MOVE_LINE_DOWN);
@@ -602,7 +602,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/clone_down"), EDIT_CLONE_DOWN);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/complete_symbol"), EDIT_COMPLETE);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_completion_query"), EDIT_COMPLETE);
edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditor::_menu_option));
search_menu = memnew(MenuButton);
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index ea58a4535b..121ccfa417 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -383,8 +383,12 @@ PhysicalBone3D *Skeleton3DEditor::create_physical_bone(int bone_id, int bone_chi
CollisionShape3D *bone_shape = memnew(CollisionShape3D);
bone_shape->set_shape(bone_shape_capsule);
+ Transform capsule_transform;
+ capsule_transform.basis = Basis(Vector3(1, 0, 0), Vector3(0, 0, 1), Vector3(0, -1, 0));
+ bone_shape->set_transform(capsule_transform);
+
Transform body_transform;
- body_transform.set_look_at(Vector3(0, 0, 0), child_rest.origin, Vector3(0, 1, 0));
+ body_transform.set_look_at(Vector3(0, 0, 0), child_rest.origin);
body_transform.origin = body_transform.basis.xform(Vector3(0, 0, -half_height));
Transform joint_transform;
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index 03ddaa2c74..4949d2b9b7 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -173,6 +173,11 @@ void Sprite2DEditor::_update_mesh_data() {
Ref<Image> image = texture->get_data();
ERR_FAIL_COND(image.is_null());
+
+ if (image->is_compressed()) {
+ image->decompress();
+ }
+
Rect2 rect;
if (node->is_region()) {
rect = node->get_region_rect();
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index 3628a2e4d1..b88f1c91e6 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -96,7 +96,7 @@ void TextEditor::_load_theme_settings() {
text_edit->add_theme_color_override("line_number_color", line_number_color);
text_edit->add_theme_color_override("caret_color", caret_color);
text_edit->add_theme_color_override("caret_background_color", caret_background_color);
- text_edit->add_theme_color_override("font_color_selected", text_selected_color);
+ text_edit->add_theme_color_override("font_selected_color", text_selected_color);
text_edit->add_theme_color_override("selection_color", selection_color);
text_edit->add_theme_color_override("brace_mismatch_color", brace_mismatch_color);
text_edit->add_theme_color_override("current_line_color", current_line_color);
@@ -363,10 +363,10 @@ void TextEditor::_edit_option(int p_op) {
code_editor->move_lines_down();
} break;
case EDIT_INDENT_LEFT: {
- tx->indent_left();
+ tx->indent_selected_lines_left();
} break;
case EDIT_INDENT_RIGHT: {
- tx->indent_right();
+ tx->indent_selected_lines_right();
} break;
case EDIT_DELETE_LINE: {
code_editor->delete_lines();
@@ -514,15 +514,15 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
void TextEditor::_make_context_menu(bool p_selection, bool p_can_fold, bool p_is_folded, Vector2 p_position) {
context_menu->clear();
if (p_selection) {
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"), EDIT_COPY);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
}
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"), EDIT_PASTE);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
context_menu->add_separator();
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
context_menu->add_separator();
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
@@ -584,14 +584,14 @@ TextEditor::TextEditor() {
edit_menu->set_switch_on_hover(true);
edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("un_redo"), EDIT_REDO);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"), EDIT_COPY);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"), EDIT_PASTE);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_select_all"), EDIT_SELECT_ALL);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_up"), EDIT_MOVE_LINE_UP);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_down"), EDIT_MOVE_LINE_DOWN);
diff --git a/editor/plugins/texture_3d_editor_plugin.cpp b/editor/plugins/texture_3d_editor_plugin.cpp
index 099257daa1..36297c8a4a 100644
--- a/editor/plugins/texture_3d_editor_plugin.cpp
+++ b/editor/plugins/texture_3d_editor_plugin.cpp
@@ -57,7 +57,7 @@ void Texture3DEditor::_notification(int p_what) {
}
}
-void Texture3DEditor::_changed_callback(Object *p_changed, const char *p_prop) {
+void Texture3DEditor::_texture_changed() {
if (!is_visible()) {
return;
}
@@ -118,7 +118,7 @@ void Texture3DEditor::_texture_rect_update_area() {
void Texture3DEditor::edit(Ref<Texture3D> p_texture) {
if (!texture.is_null()) {
- texture->remove_change_receptor(this);
+ texture->disconnect("changed", callable_mp(this, &Texture3DEditor::_texture_changed));
}
texture = p_texture;
@@ -128,7 +128,7 @@ void Texture3DEditor::edit(Ref<Texture3D> p_texture) {
_make_shaders();
}
- texture->add_change_receptor(this);
+ texture->connect("changed", callable_mp(this, &Texture3DEditor::_texture_changed));
update();
texture_rect->set_material(material);
setting = true;
@@ -173,8 +173,7 @@ Texture3DEditor::Texture3DEditor() {
info->set_h_grow_direction(GROW_DIRECTION_BEGIN);
info->set_v_grow_direction(GROW_DIRECTION_BEGIN);
info->add_theme_color_override("font_color", Color(1, 1, 1, 1));
- info->add_theme_color_override("font_color_shadow", Color(0, 0, 0, 0.5));
- info->add_theme_color_override("font_color_shadow", Color(0, 0, 0, 0.5));
+ info->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 0.5));
info->add_theme_constant_override("shadow_as_outline", 1);
info->add_theme_constant_override("shadow_offset_x", 2);
info->add_theme_constant_override("shadow_offset_y", 2);
@@ -185,7 +184,7 @@ Texture3DEditor::Texture3DEditor() {
Texture3DEditor::~Texture3DEditor() {
if (!texture.is_null()) {
- texture->remove_change_receptor(this);
+ texture->disconnect("changed", callable_mp(this, &Texture3DEditor::_texture_changed));
}
}
diff --git a/editor/plugins/texture_3d_editor_plugin.h b/editor/plugins/texture_3d_editor_plugin.h
index 944abf16d9..9d90d3653f 100644
--- a/editor/plugins/texture_3d_editor_plugin.h
+++ b/editor/plugins/texture_3d_editor_plugin.h
@@ -61,10 +61,12 @@ class Texture3DEditor : public Control {
void _texture_rect_update_area();
void _texture_rect_draw();
+ void _texture_changed();
+
protected:
void _notification(int p_what);
void _gui_input(Ref<InputEvent> p_event);
- void _changed_callback(Object *p_changed, const char *p_prop) override;
+
static void _bind_methods();
public:
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 1d3fd668c6..253f8878d2 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -104,7 +104,7 @@ void TextureEditor::_notification(int p_what) {
}
}
-void TextureEditor::_changed_callback(Object *p_changed, const char *p_prop) {
+void TextureEditor::_texture_changed() {
if (!is_visible()) {
return;
}
@@ -113,13 +113,13 @@ void TextureEditor::_changed_callback(Object *p_changed, const char *p_prop) {
void TextureEditor::edit(Ref<Texture2D> p_texture) {
if (!texture.is_null()) {
- texture->remove_change_receptor(this);
+ texture->disconnect("changed", callable_mp(this, &TextureEditor::_texture_changed));
}
texture = p_texture;
if (!texture.is_null()) {
- texture->add_change_receptor(this);
+ texture->connect("changed", callable_mp(this, &TextureEditor::_texture_changed));
update();
} else {
hide();
@@ -137,7 +137,7 @@ TextureEditor::TextureEditor() {
TextureEditor::~TextureEditor() {
if (!texture.is_null()) {
- texture->remove_change_receptor(this);
+ texture->disconnect("changed", callable_mp(this, &TextureEditor::_texture_changed));
}
}
diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index 621d737028..ebe8882194 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -43,7 +43,7 @@ class TextureEditor : public Control {
protected:
void _notification(int p_what);
void _gui_input(Ref<InputEvent> p_event);
- void _changed_callback(Object *p_changed, const char *p_prop) override;
+ void _texture_changed();
static void _bind_methods();
public:
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index 3b95ed813f..254ad3d56e 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -63,7 +63,7 @@ void TextureLayeredEditor::_notification(int p_what) {
}
}
-void TextureLayeredEditor::_changed_callback(Object *p_changed, const char *p_prop) {
+void TextureLayeredEditor::_texture_changed() {
if (!is_visible()) {
return;
}
@@ -173,7 +173,7 @@ void TextureLayeredEditor::_texture_rect_update_area() {
void TextureLayeredEditor::edit(Ref<TextureLayered> p_texture) {
if (!texture.is_null()) {
- texture->remove_change_receptor(this);
+ texture->disconnect("changed", callable_mp(this, &TextureLayeredEditor::_texture_changed));
}
texture = p_texture;
@@ -183,7 +183,7 @@ void TextureLayeredEditor::edit(Ref<TextureLayered> p_texture) {
_make_shaders();
}
- texture->add_change_receptor(this);
+ texture->connect("changed", callable_mp(this, &TextureLayeredEditor::_texture_changed));
update();
texture_rect->set_material(materials[texture->get_layered_type()]);
setting = true;
@@ -238,8 +238,7 @@ TextureLayeredEditor::TextureLayeredEditor() {
info->set_h_grow_direction(GROW_DIRECTION_BEGIN);
info->set_v_grow_direction(GROW_DIRECTION_BEGIN);
info->add_theme_color_override("font_color", Color(1, 1, 1, 1));
- info->add_theme_color_override("font_color_shadow", Color(0, 0, 0, 0.5));
- info->add_theme_color_override("font_color_shadow", Color(0, 0, 0, 0.5));
+ info->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 0.5));
info->add_theme_constant_override("shadow_as_outline", 1);
info->add_theme_constant_override("shadow_offset_x", 2);
info->add_theme_constant_override("shadow_offset_y", 2);
@@ -249,9 +248,6 @@ TextureLayeredEditor::TextureLayeredEditor() {
}
TextureLayeredEditor::~TextureLayeredEditor() {
- if (!texture.is_null()) {
- texture->remove_change_receptor(this);
- }
}
//
diff --git a/editor/plugins/texture_layered_editor_plugin.h b/editor/plugins/texture_layered_editor_plugin.h
index 4bcc8fa1f1..c4ced62fb9 100644
--- a/editor/plugins/texture_layered_editor_plugin.h
+++ b/editor/plugins/texture_layered_editor_plugin.h
@@ -63,10 +63,11 @@ class TextureLayeredEditor : public Control {
void _texture_rect_update_area();
void _texture_rect_draw();
+ void _texture_changed();
+
protected:
void _notification(int p_what);
void _gui_input(Ref<InputEvent> p_event);
- void _changed_callback(Object *p_changed, const char *p_prop) override;
static void _bind_methods();
public:
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 61e0cc281d..63255e6547 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -480,20 +480,41 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
Vector2 dragged(mm->get_relative().x / draw_zoom, mm->get_relative().y / draw_zoom);
hscroll->set_value(hscroll->get_value() - dragged.x);
vscroll->set_value(vscroll->get_value() - dragged.y);
-
} else if (drag) {
if (edited_margin >= 0) {
float new_margin = 0;
- if (edited_margin == 0) {
- new_margin = prev_margin + (mm->get_position().y - drag_from.y) / draw_zoom;
- } else if (edited_margin == 1) {
- new_margin = prev_margin - (mm->get_position().y - drag_from.y) / draw_zoom;
- } else if (edited_margin == 2) {
- new_margin = prev_margin + (mm->get_position().x - drag_from.x) / draw_zoom;
- } else if (edited_margin == 3) {
- new_margin = prev_margin - (mm->get_position().x - drag_from.x) / draw_zoom;
+
+ if (snap_mode != SNAP_GRID) {
+ if (edited_margin == 0) {
+ new_margin = prev_margin + (mm->get_position().y - drag_from.y) / draw_zoom;
+ } else if (edited_margin == 1) {
+ new_margin = prev_margin - (mm->get_position().y - drag_from.y) / draw_zoom;
+ } else if (edited_margin == 2) {
+ new_margin = prev_margin + (mm->get_position().x - drag_from.x) / draw_zoom;
+ } else if (edited_margin == 3) {
+ new_margin = prev_margin - (mm->get_position().x - drag_from.x) / draw_zoom;
+ } else {
+ ERR_PRINT("Unexpected edited_margin");
+ }
+
+ if (snap_mode == SNAP_PIXEL) {
+ new_margin = Math::round(new_margin);
+ }
} else {
- ERR_PRINT("Unexpected edited_margin");
+ Vector2 pos_snapped = snap_point(mtx.affine_inverse().xform(mm->get_position()));
+ Rect2 rect_rounded = Rect2(rect.position.round(), rect.size.round());
+
+ if (edited_margin == 0) {
+ new_margin = pos_snapped.y - rect_rounded.position.y;
+ } else if (edited_margin == 1) {
+ new_margin = rect_rounded.size.y + rect_rounded.position.y - pos_snapped.y;
+ } else if (edited_margin == 2) {
+ new_margin = pos_snapped.x - rect_rounded.position.x;
+ } else if (edited_margin == 3) {
+ new_margin = rect_rounded.size.x + rect_rounded.position.x - pos_snapped.x;
+ } else {
+ ERR_PRINT("Unexpected edited_margin");
+ }
}
if (new_margin < 0) {
@@ -842,19 +863,19 @@ Sprite2D *TextureRegionEditor::get_sprite() {
void TextureRegionEditor::edit(Object *p_obj) {
if (node_sprite) {
- node_sprite->remove_change_receptor(this);
+ node_sprite->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
}
if (node_sprite_3d) {
- node_sprite_3d->remove_change_receptor(this);
+ node_sprite_3d->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
}
if (node_ninepatch) {
- node_ninepatch->remove_change_receptor(this);
+ node_ninepatch->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
}
if (obj_styleBox.is_valid()) {
- obj_styleBox->remove_change_receptor(this);
+ obj_styleBox->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
}
if (atlas_tex.is_valid()) {
- atlas_tex->remove_change_receptor(this);
+ atlas_tex->disconnect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
}
if (p_obj) {
node_sprite = Object::cast_to<Sprite2D>(p_obj);
@@ -866,7 +887,7 @@ void TextureRegionEditor::edit(Object *p_obj) {
if (Object::cast_to<AtlasTexture>(p_obj)) {
atlas_tex = Ref<AtlasTexture>(Object::cast_to<AtlasTexture>(p_obj));
}
- p_obj->add_change_receptor(this);
+ p_obj->connect("changed", callable_mp(this, &TextureRegionEditor::_texture_changed));
_edit_region();
} else {
node_sprite = nullptr;
@@ -884,14 +905,11 @@ void TextureRegionEditor::edit(Object *p_obj) {
}
}
-void TextureRegionEditor::_changed_callback(Object *p_changed, const char *p_prop) {
+void TextureRegionEditor::_texture_changed() {
if (!is_visible()) {
return;
}
- String prop = p_prop;
- if (prop == "atlas" || prop == "texture" || prop == "region") {
- _edit_region();
- }
+ _edit_region();
}
void TextureRegionEditor::_edit_region() {
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index 56ccefb025..d3db0a08a9 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -117,6 +117,8 @@ class TextureRegionEditor : public VBoxContainer {
void _update_rect();
void _update_autoslice();
+ void _texture_changed();
+
protected:
void _notification(int p_what);
void _node_removed(Object *p_obj);
@@ -124,8 +126,6 @@ protected:
Vector2 snap_point(Vector2 p_target) const;
- virtual void _changed_callback(Object *p_changed, const char *p_prop) override;
-
public:
void _edit_region();
void _region_draw();
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index deeab2fbc7..c628fe8367 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -39,7 +39,6 @@
void TileSetEditor::edit(const Ref<TileSet> &p_tileset) {
tileset = p_tileset;
- tileset->add_change_receptor(this);
texture_list->clear();
texture_map.clear();
@@ -1859,7 +1858,7 @@ void TileSetEditor::_on_tool_clicked(int p_tool) {
_update_toggle_shape_button();
workspace->update();
workspace_container->update();
- helper->_change_notify("");
+ helper->notify_property_list_changed();
}
} else if (p_tool == SELECT_NEXT) {
_select_next_shape();
@@ -2173,7 +2172,7 @@ Array TileSetEditor::_get_tiles_in_current_texture(bool sorted) {
}
}
if (sorted) {
- a.sort_custom(this, "_sort_tiles");
+ a.sort_custom(callable_mp(this, &TileSetEditor::_sort_tiles));
}
return a;
}
@@ -2287,7 +2286,7 @@ void TileSetEditor::_select_next_shape() {
}
workspace->update();
workspace_container->update();
- helper->_change_notify("");
+ helper->notify_property_list_changed();
}
}
@@ -2349,7 +2348,7 @@ void TileSetEditor::_select_previous_shape() {
}
workspace->update();
workspace_container->update();
- helper->_change_notify("");
+ helper->notify_property_list_changed();
}
}
@@ -3012,7 +3011,7 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
undo_redo->add_undo_method(this, "_select_edited_shape_coord");
undo_redo->commit_action();
}
- tileset->_change_notify("");
+ tileset->notify_property_list_changed();
}
void TileSetEditor::select_coord(const Vector2 &coord) {
@@ -3115,7 +3114,7 @@ void TileSetEditor::select_coord(const Vector2 &coord) {
}
workspace->update();
workspace_container->update();
- helper->_change_notify("");
+ helper->notify_property_list_changed();
}
Vector2 TileSetEditor::snap_point(const Vector2 &point) {
@@ -3225,7 +3224,7 @@ void TileSetEditor::update_texture_list() {
workspace_overlay->update();
}
update_texture_list_icon();
- helper->_change_notify("");
+ helper->notify_property_list_changed();
}
void TileSetEditor::update_texture_list_icon() {
@@ -3389,7 +3388,7 @@ int TileSetEditor::get_current_tile() const {
void TileSetEditor::set_current_tile(int p_id) {
if (current_tile != p_id) {
current_tile = p_id;
- helper->_change_notify("");
+ helper->notify_property_list_changed();
select_coord(Vector2(0, 0));
update_workspace_tile_mode();
if (p_id == -1) {
@@ -3414,7 +3413,7 @@ void TilesetEditorContext::set_tileset(const Ref<TileSet> &p_tileset) {
void TilesetEditorContext::set_snap_options_visible(bool p_visible) {
snap_options_visible = p_visible;
- _change_notify("");
+ notify_property_list_changed();
}
bool TilesetEditorContext::_set(const StringName &p_name, const Variant &p_value) {
@@ -3450,7 +3449,7 @@ bool TilesetEditorContext::_set(const StringName &p_name, const Variant &p_value
tileset->set(String::num(tileset_editor->get_current_tile(), 0) + "/" + name2, p_value, &v);
}
if (v) {
- tileset->_change_notify("");
+ tileset->notify_property_list_changed();
tileset_editor->workspace->update();
tileset_editor->workspace_overlay->update();
}
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 443e867a9f..a63e641c2b 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -619,7 +619,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
if (vsnode->get_input_port_default_hint(i) != "" && !port_left_used) {
Label *hint_label = memnew(Label);
hint_label->set_text("[" + vsnode->get_input_port_default_hint(i) + "]");
- hint_label->add_theme_color_override("font_color", VisualShaderEditor::get_singleton()->get_theme_color("font_color_readonly", "TextEdit"));
+ hint_label->add_theme_color_override("font_color", VisualShaderEditor::get_singleton()->get_theme_color("font_readonly_color", "TextEdit"));
hint_label->add_theme_style_override("normal", label_style);
hb->add_child(hint_label);
}
@@ -1023,7 +1023,7 @@ void VisualShaderEditor::_update_options_menu() {
Color unsupported_color = get_theme_color("error_color", "Editor");
Color supported_color = get_theme_color("warning_color", "Editor");
- static bool low_driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name") == "GLES2";
+ static bool low_driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "GLES2";
Map<String, TreeItem *> folders;
@@ -1282,6 +1282,9 @@ void VisualShaderEditor::_update_graph() {
graph->connect_node(itos(from), from_idx, itos(to), to_idx);
}
+
+ float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
+ graph->set_minimap_opacity(graph_minimap_opacity);
}
VisualShader::Type VisualShaderEditor::get_current_shader_type() const {
@@ -1734,114 +1737,220 @@ void VisualShaderEditor::_add_curve_node(const String &p_path) {
curve->set_texture(ResourceLoader::load(p_path));
}
-VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
- ERR_FAIL_INDEX_V(p_idx, add_options.size(), nullptr);
+void VisualShaderEditor::_setup_node(VisualShaderNode *p_node, int p_op_idx) {
+ // FLOAT_OP
+ {
+ VisualShaderNodeFloatOp *floatOp = Object::cast_to<VisualShaderNodeFloatOp>(p_node);
- Ref<VisualShaderNode> vsnode;
+ if (floatOp) {
+ floatOp->set_operator((VisualShaderNodeFloatOp::Operator)p_op_idx);
+ return;
+ }
+ }
- bool is_custom = add_options[p_idx].is_custom;
+ // FLOAT_FUNC
+ {
+ VisualShaderNodeFloatFunc *floatFunc = Object::cast_to<VisualShaderNodeFloatFunc>(p_node);
- if (!is_custom && add_options[p_idx].type != String()) {
- VisualShaderNode *vsn = Object::cast_to<VisualShaderNode>(ClassDB::instance(add_options[p_idx].type));
- ERR_FAIL_COND_V(!vsn, nullptr);
+ if (floatFunc) {
+ floatFunc->set_function((VisualShaderNodeFloatFunc::Function)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeFloatConstant *constant = Object::cast_to<VisualShaderNodeFloatConstant>(vsn);
+ // VECTOR_OP
+ {
+ VisualShaderNodeVectorOp *vecOp = Object::cast_to<VisualShaderNodeVectorOp>(p_node);
- if (constant) {
- if ((int)add_options[p_idx].value != -1) {
- constant->set_constant(add_options[p_idx].value);
- }
+ if (vecOp) {
+ vecOp->set_operator((VisualShaderNodeVectorOp::Operator)p_op_idx);
+ return;
}
+ }
- if (p_op_idx != -1) {
- VisualShaderNodeInput *input = Object::cast_to<VisualShaderNodeInput>(vsn);
+ // VECTOR_FUNC
+ {
+ VisualShaderNodeVectorFunc *vecFunc = Object::cast_to<VisualShaderNodeVectorFunc>(p_node);
- if (input) {
- input->set_input_name(add_options[p_idx].sub_func_str);
- }
+ if (vecFunc) {
+ vecFunc->set_function((VisualShaderNodeVectorFunc::Function)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeIs *is = Object::cast_to<VisualShaderNodeIs>(vsn);
+ // COLOR_OP
+ {
+ VisualShaderNodeColorOp *colorOp = Object::cast_to<VisualShaderNodeColorOp>(p_node);
- if (is) {
- is->set_function((VisualShaderNodeIs::Function)p_op_idx);
- }
+ if (colorOp) {
+ colorOp->set_operator((VisualShaderNodeColorOp::Operator)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeCompare *cmp = Object::cast_to<VisualShaderNodeCompare>(vsn);
+ // COLOR_FUNC
+ {
+ VisualShaderNodeColorFunc *colorFunc = Object::cast_to<VisualShaderNodeColorFunc>(p_node);
- if (cmp) {
- cmp->set_function((VisualShaderNodeCompare::Function)p_op_idx);
- }
+ if (colorFunc) {
+ colorFunc->set_function((VisualShaderNodeColorFunc::Function)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeColorOp *colorOp = Object::cast_to<VisualShaderNodeColorOp>(vsn);
+ // INT_OP
+ {
+ VisualShaderNodeIntOp *intOp = Object::cast_to<VisualShaderNodeIntOp>(p_node);
- if (colorOp) {
- colorOp->set_operator((VisualShaderNodeColorOp::Operator)p_op_idx);
- }
+ if (intOp) {
+ intOp->set_operator((VisualShaderNodeIntOp::Operator)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeColorFunc *colorFunc = Object::cast_to<VisualShaderNodeColorFunc>(vsn);
+ // INT_FUNC
+ {
+ VisualShaderNodeIntFunc *intFunc = Object::cast_to<VisualShaderNodeIntFunc>(p_node);
- if (colorFunc) {
- colorFunc->set_function((VisualShaderNodeColorFunc::Function)p_op_idx);
- }
+ if (intFunc) {
+ intFunc->set_function((VisualShaderNodeIntFunc::Function)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeFloatOp *floatOp = Object::cast_to<VisualShaderNodeFloatOp>(vsn);
+ // TRANSFORM_FUNC
+ {
+ VisualShaderNodeTransformFunc *matFunc = Object::cast_to<VisualShaderNodeTransformFunc>(p_node);
- if (floatOp) {
- floatOp->set_operator((VisualShaderNodeFloatOp::Operator)p_op_idx);
- }
+ if (matFunc) {
+ matFunc->set_function((VisualShaderNodeTransformFunc::Function)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeIntOp *intOp = Object::cast_to<VisualShaderNodeIntOp>(vsn);
+ // IS
+ {
+ VisualShaderNodeIs *is = Object::cast_to<VisualShaderNodeIs>(p_node);
- if (intOp) {
- intOp->set_operator((VisualShaderNodeIntOp::Operator)p_op_idx);
- }
+ if (is) {
+ is->set_function((VisualShaderNodeIs::Function)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeFloatFunc *floatFunc = Object::cast_to<VisualShaderNodeFloatFunc>(vsn);
+ // COMPARE
+ {
+ VisualShaderNodeCompare *cmp = Object::cast_to<VisualShaderNodeCompare>(p_node);
- if (floatFunc) {
- floatFunc->set_function((VisualShaderNodeFloatFunc::Function)p_op_idx);
- }
+ if (cmp) {
+ cmp->set_function((VisualShaderNodeCompare::Function)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeIntFunc *intFunc = Object::cast_to<VisualShaderNodeIntFunc>(vsn);
+ // DERIVATIVE
+ {
+ VisualShaderNodeScalarDerivativeFunc *sderFunc = Object::cast_to<VisualShaderNodeScalarDerivativeFunc>(p_node);
- if (intFunc) {
- intFunc->set_function((VisualShaderNodeIntFunc::Function)p_op_idx);
- }
+ if (sderFunc) {
+ sderFunc->set_function((VisualShaderNodeScalarDerivativeFunc::Function)p_op_idx);
+ return;
+ }
- VisualShaderNodeVectorOp *vecOp = Object::cast_to<VisualShaderNodeVectorOp>(vsn);
+ VisualShaderNodeVectorDerivativeFunc *vderFunc = Object::cast_to<VisualShaderNodeVectorDerivativeFunc>(p_node);
- if (vecOp) {
- vecOp->set_operator((VisualShaderNodeVectorOp::Operator)p_op_idx);
- }
+ if (vderFunc) {
+ vderFunc->set_function((VisualShaderNodeVectorDerivativeFunc::Function)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeVectorFunc *vecFunc = Object::cast_to<VisualShaderNodeVectorFunc>(vsn);
+ // MIX
+ {
+ VisualShaderNodeMix *mix = Object::cast_to<VisualShaderNodeMix>(p_node);
- if (vecFunc) {
- vecFunc->set_function((VisualShaderNodeVectorFunc::Function)p_op_idx);
- }
+ if (mix) {
+ mix->set_op_type((VisualShaderNodeMix::OpType)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeTransformFunc *matFunc = Object::cast_to<VisualShaderNodeTransformFunc>(vsn);
+ // CLAMP
+ {
+ VisualShaderNodeClamp *clampFunc = Object::cast_to<VisualShaderNodeClamp>(p_node);
- if (matFunc) {
- matFunc->set_function((VisualShaderNodeTransformFunc::Function)p_op_idx);
- }
+ if (clampFunc) {
+ clampFunc->set_op_type((VisualShaderNodeClamp::OpType)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeScalarDerivativeFunc *sderFunc = Object::cast_to<VisualShaderNodeScalarDerivativeFunc>(vsn);
+ // SWITCH
+ {
+ VisualShaderNodeSwitch *switchFunc = Object::cast_to<VisualShaderNodeSwitch>(p_node);
- if (sderFunc) {
- sderFunc->set_function((VisualShaderNodeScalarDerivativeFunc::Function)p_op_idx);
- }
+ if (switchFunc) {
+ switchFunc->set_op_type((VisualShaderNodeSwitch::OpType)p_op_idx);
+ return;
+ }
+ }
- VisualShaderNodeVectorDerivativeFunc *vderFunc = Object::cast_to<VisualShaderNodeVectorDerivativeFunc>(vsn);
+ // SMOOTHSTEP
+ {
+ VisualShaderNodeSmoothStep *smoothStepFunc = Object::cast_to<VisualShaderNodeSmoothStep>(p_node);
- if (vderFunc) {
- vderFunc->set_function((VisualShaderNodeVectorDerivativeFunc::Function)p_op_idx);
- }
+ if (smoothStepFunc) {
+ smoothStepFunc->set_op_type((VisualShaderNodeSmoothStep::OpType)p_op_idx);
+ return;
+ }
+ }
+
+ // STEP
+ {
+ VisualShaderNodeStep *stepFunc = Object::cast_to<VisualShaderNodeStep>(p_node);
+
+ if (stepFunc) {
+ stepFunc->set_op_type((VisualShaderNodeStep::OpType)p_op_idx);
+ return;
+ }
+ }
+
+ // MULTIPLY_ADD
+ {
+ VisualShaderNodeMultiplyAdd *fmaFunc = Object::cast_to<VisualShaderNodeMultiplyAdd>(p_node);
+
+ if (fmaFunc) {
+ fmaFunc->set_op_type((VisualShaderNodeMultiplyAdd::OpType)p_op_idx);
+ }
+ }
+}
- VisualShaderNodeMultiplyAdd *fmaFunc = Object::cast_to<VisualShaderNodeMultiplyAdd>(vsn);
+VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
+ ERR_FAIL_INDEX_V(p_idx, add_options.size(), nullptr);
+
+ Ref<VisualShaderNode> vsnode;
- if (fmaFunc) {
- fmaFunc->set_op_type((VisualShaderNodeMultiplyAdd::OpType)p_op_idx);
+ bool is_custom = add_options[p_idx].is_custom;
+
+ if (!is_custom && add_options[p_idx].type != String()) {
+ VisualShaderNode *vsn = Object::cast_to<VisualShaderNode>(ClassDB::instance(add_options[p_idx].type));
+ ERR_FAIL_COND_V(!vsn, nullptr);
+
+ VisualShaderNodeFloatConstant *constant = Object::cast_to<VisualShaderNodeFloatConstant>(vsn);
+
+ if (constant) {
+ if ((int)add_options[p_idx].value != -1) {
+ constant->set_constant(add_options[p_idx].value);
+ }
+ } else {
+ if (p_op_idx != -1) {
+ VisualShaderNodeInput *input = Object::cast_to<VisualShaderNodeInput>(vsn);
+
+ if (input) {
+ input->set_input_name(add_options[p_idx].sub_func_str);
+ } else {
+ _setup_node(vsn, p_op_idx);
+ }
}
}
@@ -1880,28 +1989,95 @@ VisualShaderNode *VisualShaderEditor::_add_node(int p_idx, int p_op_idx) {
undo_redo->add_do_method(expr, "set_size", Size2(250 * EDSCALE, 150 * EDSCALE));
}
+ bool created_expression_port = false;
+
if (to_node != -1 && to_slot != -1) {
- if (vsnode->get_output_port_count() > 0) {
+ VisualShaderNode::PortType input_port_type = visual_shader->get_node(type, to_node)->get_input_port_type(to_slot);
+
+ if (expr && expr->is_editable() && input_port_type != VisualShaderNode::PORT_TYPE_SAMPLER) {
+ undo_redo->add_do_method(expr, "add_output_port", 0, input_port_type, "output0");
+ undo_redo->add_undo_method(expr, "remove_output_port", 0);
+
+ String initial_expression_code;
+
+ switch (input_port_type) {
+ case VisualShaderNode::PORT_TYPE_SCALAR:
+ initial_expression_code = "output0 = 1.0;";
+ break;
+ case VisualShaderNode::PORT_TYPE_SCALAR_INT:
+ initial_expression_code = "output0 = 1;";
+ break;
+ case VisualShaderNode::PORT_TYPE_VECTOR:
+ initial_expression_code = "output0 = vec3(1.0, 1.0, 1.0);";
+ break;
+ case VisualShaderNode::PORT_TYPE_BOOLEAN:
+ initial_expression_code = "output0 = true;";
+ break;
+ case VisualShaderNode::PORT_TYPE_TRANSFORM:
+ initial_expression_code = "output0 = mat4(1.0);";
+ break;
+ default:
+ break;
+ }
+
+ undo_redo->add_do_method(expr, "set_expression", initial_expression_code);
+ undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, id_to_use);
+
+ created_expression_port = true;
+ }
+ if (vsnode->get_output_port_count() > 0 || created_expression_port) {
int _from_node = id_to_use;
int _from_slot = 0;
- if (visual_shader->is_port_types_compatible(vsnode->get_output_port_type(_from_slot), visual_shader->get_node(type, to_node)->get_input_port_type(to_slot))) {
+ if (created_expression_port) {
undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes", type, _from_node, _from_slot, to_node, to_slot);
undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, _from_node, _from_slot, to_node, to_slot);
undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, _from_node, _from_slot, to_node, to_slot);
undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, _from_node, _from_slot, to_node, to_slot);
+ } else {
+ // Attempting to connect to the first correct port.
+ for (int i = 0; i < vsnode->get_output_port_count(); i++) {
+ if (visual_shader->is_port_types_compatible(vsnode->get_output_port_type(i), input_port_type)) {
+ undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes", type, _from_node, i, to_node, to_slot);
+ undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, _from_node, i, to_node, to_slot);
+ undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, _from_node, i, to_node, to_slot);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, _from_node, i, to_node, to_slot);
+ break;
+ }
+ }
}
}
} else if (from_node != -1 && from_slot != -1) {
- if (vsnode->get_input_port_count() > 0) {
+ VisualShaderNode::PortType output_port_type = visual_shader->get_node(type, from_node)->get_output_port_type(from_slot);
+
+ if (expr && expr->is_editable()) {
+ undo_redo->add_do_method(expr, "add_input_port", 0, output_port_type, "input0");
+ undo_redo->add_undo_method(expr, "remove_input_port", 0);
+ undo_redo->add_do_method(graph_plugin.ptr(), "update_node", type, id_to_use);
+
+ created_expression_port = true;
+ }
+
+ if (vsnode->get_input_port_count() > 0 || created_expression_port) {
int _to_node = id_to_use;
int _to_slot = 0;
- if (visual_shader->is_port_types_compatible(visual_shader->get_node(type, from_node)->get_output_port_type(from_slot), vsnode->get_input_port_type(_to_slot))) {
+ if (created_expression_port) {
undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_slot, _to_node, _to_slot);
undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes", type, from_node, from_slot, _to_node, _to_slot);
undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_slot, _to_node, _to_slot);
undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_slot, _to_node, _to_slot);
+ } else {
+ // Attempting to connect to the first correct port.
+ for (int i = 0; i < vsnode->get_input_port_count(); i++) {
+ if (visual_shader->is_port_types_compatible(output_port_type, vsnode->get_input_port_type(i))) {
+ undo_redo->add_undo_method(visual_shader.ptr(), "disconnect_nodes", type, from_node, from_slot, _to_node, i);
+ undo_redo->add_do_method(visual_shader.ptr(), "connect_nodes", type, from_node, from_slot, _to_node, i);
+ undo_redo->add_undo_method(graph_plugin.ptr(), "disconnect_nodes", type, from_node, from_slot, _to_node, i);
+ undo_redo->add_do_method(graph_plugin.ptr(), "connect_nodes", type, from_node, from_slot, _to_node, i);
+ break;
+ }
+ }
}
}
}
@@ -3161,6 +3337,8 @@ VisualShaderEditor::VisualShaderEditor() {
graph->set_h_size_flags(SIZE_EXPAND_FILL);
add_child(graph);
graph->set_drag_forwarding(this);
+ float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
+ graph->set_minimap_opacity(graph_minimap_opacity);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_SCALAR_INT);
graph->add_valid_right_disconnect_type(VisualShaderNode::PORT_TYPE_BOOLEAN);
@@ -3396,8 +3574,11 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("LessThan", "Conditional", "Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Less Than (<)")), VisualShaderNodeCompare::FUNC_LESS_THAN, VisualShaderNode::PORT_TYPE_BOOLEAN));
add_options.push_back(AddOption("LessThanEqual", "Conditional", "Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Less Than or Equal (<=)")), VisualShaderNodeCompare::FUNC_LESS_THAN_EQUAL, VisualShaderNode::PORT_TYPE_BOOLEAN));
add_options.push_back(AddOption("NotEqual", "Conditional", "Functions", "VisualShaderNodeCompare", vformat(compare_func_desc, TTR("Not Equal (!=)")), VisualShaderNodeCompare::FUNC_NOT_EQUAL, VisualShaderNode::PORT_TYPE_BOOLEAN));
- add_options.push_back(AddOption("Switch", "Conditional", "Functions", "VisualShaderNodeSwitch", TTR("Returns an associated vector if the provided boolean value is true or false."), -1, VisualShaderNode::PORT_TYPE_VECTOR));
- add_options.push_back(AddOption("SwitchS", "Conditional", "Functions", "VisualShaderNodeScalarSwitch", TTR("Returns an associated scalar if the provided boolean value is true or false."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Switch", "Conditional", "Functions", "VisualShaderNodeSwitch", TTR("Returns an associated vector if the provided boolean value is true or false."), VisualShaderNodeSwitch::OP_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR));
+ add_options.push_back(AddOption("SwitchBool", "Conditional", "Functions", "VisualShaderNodeSwitch", TTR("Returns an associated boolean if the provided boolean value is true or false."), VisualShaderNodeSwitch::OP_TYPE_BOOLEAN, VisualShaderNode::PORT_TYPE_BOOLEAN));
+ add_options.push_back(AddOption("SwitchFloat", "Conditional", "Functions", "VisualShaderNodeSwitch", TTR("Returns an associated floating-point scalar if the provided boolean value is true or false."), VisualShaderNodeSwitch::OP_TYPE_FLOAT, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("SwitchInt", "Conditional", "Functions", "VisualShaderNodeSwitch", TTR("Returns an associated integer scalar if the provided boolean value is true or false."), VisualShaderNodeSwitch::OP_TYPE_INT, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("SwitchTransform", "Conditional", "Functions", "VisualShaderNodeSwitch", TTR("Returns an associated transform if the provided boolean value is true or false."), VisualShaderNodeSwitch::OP_TYPE_TRANSFORM, VisualShaderNode::PORT_TYPE_TRANSFORM));
add_options.push_back(AddOption("Compare", "Conditional", "Common", "VisualShaderNodeCompare", TTR("Returns the boolean result of the comparison between two parameters."), -1, VisualShaderNode::PORT_TYPE_BOOLEAN));
add_options.push_back(AddOption("Is", "Conditional", "Common", "VisualShaderNodeIs", TTR("Returns the boolean result of the comparison between INF (or NaN) and a scalar parameter."), -1, VisualShaderNode::PORT_TYPE_BOOLEAN));
@@ -3620,8 +3801,8 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("ATan2", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the arc-tangent of the parameters."), VisualShaderNodeFloatOp::OP_ATAN2, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("ATanH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_ATANH, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Ceil", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), VisualShaderNodeFloatFunc::FUNC_CEIL, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Clamp", "Scalar", "Functions", "VisualShaderNodeScalarClamp", TTR("Constrains a value to lie between two further values."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Clamp", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Constrains a value to lie between two further values."), VisualShaderNodeIntFunc::FUNC_CLAMP, VisualShaderNode::PORT_TYPE_SCALAR_INT));
+ add_options.push_back(AddOption("Clamp", "Scalar", "Functions", "VisualShaderNodeClamp", TTR("Constrains a value to lie between two further values."), VisualShaderNodeClamp::OP_TYPE_FLOAT, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Clamp", "Scalar", "Functions", "VisualShaderNodeClamp", TTR("Constrains a value to lie between two further values."), VisualShaderNodeClamp::OP_TYPE_INT, VisualShaderNode::PORT_TYPE_SCALAR_INT));
add_options.push_back(AddOption("Cos", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_COS, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("CosH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic cosine of the parameter."), VisualShaderNodeFloatFunc::FUNC_COSH, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Degrees", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Converts a quantity in radians to degrees."), VisualShaderNodeFloatFunc::FUNC_DEGREES, VisualShaderNode::PORT_TYPE_SCALAR));
@@ -3634,7 +3815,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Log2", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Base-2 logarithm."), VisualShaderNodeFloatFunc::FUNC_LOG2, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Max", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the greater of two values."), VisualShaderNodeFloatOp::OP_MAX, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Min", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Returns the lesser of two values."), VisualShaderNodeFloatOp::OP_MIN, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Mix", "Scalar", "Functions", "VisualShaderNodeScalarInterp", TTR("Linear interpolation between two scalars."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Mix", "Scalar", "Functions", "VisualShaderNodeMix", TTR("Linear interpolation between two scalars."), VisualShaderNodeMix::OP_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("MultiplyAdd", "Scalar", "Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on scalars."), VisualShaderNodeMultiplyAdd::OP_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeFloatFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Negate", "Scalar", "Functions", "VisualShaderNodeIntFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeIntFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_SCALAR_INT));
@@ -3650,8 +3831,8 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Sin", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_SIN, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("SinH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic sine of the parameter."), VisualShaderNodeFloatFunc::FUNC_SINH, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Sqrt", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the square root of the parameter."), VisualShaderNodeFloatFunc::FUNC_SQRT, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("SmoothStep", "Scalar", "Functions", "VisualShaderNodeScalarSmoothStep", TTR("SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge0' and 1.0 if x is larger than 'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials."), -1, VisualShaderNode::PORT_TYPE_SCALAR));
- add_options.push_back(AddOption("Step", "Scalar", "Functions", "VisualShaderNodeFloatOp", TTR("Step function( scalar(edge), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeFloatOp::OP_STEP, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("SmoothStep", "Scalar", "Functions", "VisualShaderNodeSmoothStep", TTR("SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge0' and 1.0 if x is larger than 'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials."), VisualShaderNodeSmoothStep::OP_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR));
+ add_options.push_back(AddOption("Step", "Scalar", "Functions", "VisualShaderNodeStep", TTR("Step function( scalar(edge), scalar(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeStep::OP_TYPE_SCALAR, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Tan", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_TAN, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("TanH", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Returns the hyperbolic tangent of the parameter."), VisualShaderNodeFloatFunc::FUNC_TANH, VisualShaderNode::PORT_TYPE_SCALAR));
add_options.push_back(AddOption("Trunc", "Scalar", "Functions", "VisualShaderNodeFloatFunc", TTR("Finds the truncated value of the parameter."), VisualShaderNodeFloatFunc::FUNC_TRUNC, VisualShaderNode::PORT_TYPE_SCALAR));
@@ -3735,7 +3916,7 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("ATan2", "Vector", "Functions", "VisualShaderNodeVectorOp", TTR("Returns the arc-tangent of the parameters."), VisualShaderNodeVectorOp::OP_ATAN2, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("ATanH", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), VisualShaderNodeVectorFunc::FUNC_ATANH, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("Ceil", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), VisualShaderNodeVectorFunc::FUNC_CEIL, VisualShaderNode::PORT_TYPE_VECTOR));
- add_options.push_back(AddOption("Clamp", "Vector", "Functions", "VisualShaderNodeVectorClamp", TTR("Constrains a value to lie between two further values."), -1, VisualShaderNode::PORT_TYPE_VECTOR));
+ add_options.push_back(AddOption("Clamp", "Vector", "Functions", "VisualShaderNodeClamp", TTR("Constrains a value to lie between two further values."), VisualShaderNodeClamp::OP_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("Cos", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the cosine of the parameter."), VisualShaderNodeVectorFunc::FUNC_COS, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("CosH", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the hyperbolic cosine of the parameter."), VisualShaderNodeVectorFunc::FUNC_COSH, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("Cross", "Vector", "Functions", "VisualShaderNodeVectorOp", TTR("Calculates the cross product of two vectors."), VisualShaderNodeVectorOp::OP_CROSS, VisualShaderNode::PORT_TYPE_VECTOR));
@@ -3753,8 +3934,8 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Log2", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Base-2 logarithm."), VisualShaderNodeVectorFunc::FUNC_LOG2, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("Max", "Vector", "Functions", "VisualShaderNodeVectorOp", TTR("Returns the greater of two values."), VisualShaderNodeVectorOp::OP_MAX, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("Min", "Vector", "Functions", "VisualShaderNodeVectorOp", TTR("Returns the lesser of two values."), VisualShaderNodeVectorOp::OP_MIN, VisualShaderNode::PORT_TYPE_VECTOR));
- add_options.push_back(AddOption("Mix", "Vector", "Functions", "VisualShaderNodeVectorInterp", TTR("Linear interpolation between two vectors."), -1, VisualShaderNode::PORT_TYPE_VECTOR));
- add_options.push_back(AddOption("MixS", "Vector", "Functions", "VisualShaderNodeVectorScalarMix", TTR("Linear interpolation between two vectors using scalar."), -1, VisualShaderNode::PORT_TYPE_VECTOR));
+ add_options.push_back(AddOption("Mix", "Vector", "Functions", "VisualShaderNodeMix", TTR("Linear interpolation between two vectors."), VisualShaderNodeMix::OP_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR));
+ add_options.push_back(AddOption("MixS", "Vector", "Functions", "VisualShaderNodeMix", TTR("Linear interpolation between two vectors using scalar."), VisualShaderNodeMix::OP_TYPE_VECTOR_SCALAR, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("MultiplyAdd", "Vector", "Functions", "VisualShaderNodeMultiplyAdd", TTR("Performs a fused multiply-add operation (a * b + c) on vectors."), VisualShaderNodeMultiplyAdd::OP_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("Negate", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the opposite value of the parameter."), VisualShaderNodeVectorFunc::FUNC_NEGATE, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("Normalize", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Calculates the normalize product of vector."), VisualShaderNodeVectorFunc::FUNC_NORMALIZE, VisualShaderNode::PORT_TYPE_VECTOR));
@@ -3771,10 +3952,10 @@ VisualShaderEditor::VisualShaderEditor() {
add_options.push_back(AddOption("Sin", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the sine of the parameter."), VisualShaderNodeVectorFunc::FUNC_SIN, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("SinH", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the hyperbolic sine of the parameter."), VisualShaderNodeVectorFunc::FUNC_SINH, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("Sqrt", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the square root of the parameter."), VisualShaderNodeVectorFunc::FUNC_SQRT, VisualShaderNode::PORT_TYPE_VECTOR));
- add_options.push_back(AddOption("SmoothStep", "Vector", "Functions", "VisualShaderNodeVectorSmoothStep", TTR("SmoothStep function( vector(edge0), vector(edge1), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge0' and 1.0 if 'x' is larger than 'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials."), -1, VisualShaderNode::PORT_TYPE_VECTOR));
- add_options.push_back(AddOption("SmoothStepS", "Vector", "Functions", "VisualShaderNodeVectorScalarSmoothStep", TTR("SmoothStep function( scalar(edge0), scalar(edge1), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge0' and 1.0 if 'x' is larger than 'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials."), -1, VisualShaderNode::PORT_TYPE_VECTOR));
- add_options.push_back(AddOption("Step", "Vector", "Functions", "VisualShaderNodeVectorOp", TTR("Step function( vector(edge), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeVectorOp::OP_STEP, VisualShaderNode::PORT_TYPE_VECTOR));
- add_options.push_back(AddOption("StepS", "Vector", "Functions", "VisualShaderNodeVectorScalarStep", TTR("Step function( scalar(edge), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), -1, VisualShaderNode::PORT_TYPE_VECTOR));
+ add_options.push_back(AddOption("SmoothStep", "Vector", "Functions", "VisualShaderNodeSmoothStep", TTR("SmoothStep function( vector(edge0), vector(edge1), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge0' and 1.0 if 'x' is larger than 'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials."), VisualShaderNodeSmoothStep::OP_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR));
+ add_options.push_back(AddOption("SmoothStepS", "Vector", "Functions", "VisualShaderNodeSmoothStep", TTR("SmoothStep function( scalar(edge0), scalar(edge1), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge0' and 1.0 if 'x' is larger than 'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 using Hermite polynomials."), VisualShaderNodeSmoothStep::OP_TYPE_VECTOR_SCALAR, VisualShaderNode::PORT_TYPE_VECTOR));
+ add_options.push_back(AddOption("Step", "Vector", "Functions", "VisualShaderNodeStep", TTR("Step function( vector(edge), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeStep::OP_TYPE_VECTOR, VisualShaderNode::PORT_TYPE_VECTOR));
+ add_options.push_back(AddOption("StepS", "Vector", "Functions", "VisualShaderNodeStep", TTR("Step function( scalar(edge), vector(x) ).\n\nReturns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."), VisualShaderNodeStep::OP_TYPE_VECTOR_SCALAR, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("Tan", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the tangent of the parameter."), VisualShaderNodeVectorFunc::FUNC_TAN, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("TanH", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Returns the hyperbolic tangent of the parameter."), VisualShaderNodeVectorFunc::FUNC_TANH, VisualShaderNode::PORT_TYPE_VECTOR));
add_options.push_back(AddOption("Trunc", "Vector", "Functions", "VisualShaderNodeVectorFunc", TTR("Finds the truncated value of the parameter."), VisualShaderNodeVectorFunc::FUNC_TRUNC, VisualShaderNode::PORT_TYPE_VECTOR));
@@ -4292,10 +4473,17 @@ void VisualShaderNodePortPreview::_shader_changed() {
for (int i = EditorNode::get_singleton()->get_editor_history()->get_path_size() - 1; i >= 0; i--) {
Object *object = ObjectDB::get_instance(EditorNode::get_singleton()->get_editor_history()->get_path_object(i));
+ ShaderMaterial *src_mat;
if (!object) {
continue;
}
- ShaderMaterial *src_mat = Object::cast_to<ShaderMaterial>(object);
+ if (object->has_method("get_material_override")) { // trying getting material from MeshInstance
+ src_mat = Object::cast_to<ShaderMaterial>(object->call("get_material_override"));
+ } else if (object->has_method("get_material")) { // from CanvasItem/Node2D
+ src_mat = Object::cast_to<ShaderMaterial>(object->call("get_material"));
+ } else {
+ src_mat = Object::cast_to<ShaderMaterial>(object);
+ }
if (src_mat && src_mat->get_shader().is_valid()) {
List<PropertyInfo> params;
src_mat->get_shader()->get_param_list(&params);
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index 72ed46b35c..182bed6ba6 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -276,6 +276,7 @@ class VisualShaderEditor : public VBoxContainer {
void _add_texture3d_node(const String &p_path);
void _add_curve_node(const String &p_path);
+ void _setup_node(VisualShaderNode *p_node, int p_op_idx);
VisualShaderNode *_add_node(int p_idx, int p_op_idx = -1);
void _update_options_menu();
void _set_mode(int p_which);
diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp
index 2d65c00a89..497cc0cbdc 100644
--- a/editor/pot_generator.cpp
+++ b/editor/pot_generator.cpp
@@ -55,7 +55,7 @@ void POTGenerator::_print_all_translation_strings() {
#endif
void POTGenerator::generate_pot(const String &p_file) {
- if (!ProjectSettings::get_singleton()->has_setting("locale/translations_pot_files")) {
+ if (!ProjectSettings::get_singleton()->has_setting("internationalization/locale/translations_pot_files")) {
WARN_PRINT("No files selected for POT generation.");
return;
}
@@ -63,7 +63,7 @@ void POTGenerator::generate_pot(const String &p_file) {
// Clear all_translation_strings of the previous round.
all_translation_strings.clear();
- Vector<String> files = ProjectSettings::get_singleton()->get("locale/translations_pot_files");
+ Vector<String> files = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
// Collect all translatable strings according to files order in "POT Generation" setting.
for (int i = 0; i < files.size(); i++) {
@@ -100,7 +100,7 @@ void POTGenerator::_write_to_pot(const String &p_file) {
}
String project_name = ProjectSettings::get_singleton()->get("application/config/name");
- Vector<String> files = ProjectSettings::get_singleton()->get("locale/translations_pot_files");
+ Vector<String> files = ProjectSettings::get_singleton()->get("internationalization/locale/translations_pot_files");
String extracted_files = "";
for (int i = 0; i < files.size(); i++) {
extracted_files += "# " + files[i] + "\n";
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index 4a8990daa9..4bcb616fbd 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -830,6 +830,12 @@ void ProjectExportDialog::_refresh_parent_checks(TreeItem *p_item) {
}
void ProjectExportDialog::_export_pck_zip() {
+ Ref<EditorExportPreset> current = get_current_preset();
+ ERR_FAIL_COND(current.is_null());
+
+ String dir = current->get_export_path().get_base_dir();
+ export_pck_zip->set_current_dir(dir);
+
export_pck_zip->popup_file_dialog();
}
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index e46b2711c1..7d421bdf81 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -474,15 +474,15 @@ private:
}
ProjectSettings::CustomMap initial_settings;
if (rasterizer_button_group->get_pressed_button()->get_meta("driver_name") == "Vulkan") {
- initial_settings["rendering/quality/driver/driver_name"] = "Vulkan";
+ initial_settings["rendering/driver/driver_name"] = "Vulkan";
} else {
- initial_settings["rendering/quality/driver/driver_name"] = "GLES2";
- initial_settings["rendering/vram_compression/import_etc2"] = false;
- initial_settings["rendering/vram_compression/import_etc"] = true;
+ initial_settings["rendering/driver/driver_name"] = "GLES2";
+ initial_settings["rendering/textures/vram_compression/import_etc2"] = false;
+ initial_settings["rendering/textures/vram_compression/import_etc"] = true;
}
initial_settings["application/config/name"] = project_name->get_text();
initial_settings["application/config/icon"] = "res://icon.png";
- initial_settings["rendering/environment/default_environment"] = "res://default_env.tres";
+ initial_settings["rendering/environment/defaults/default_environment"] = "res://default_env.tres";
if (ProjectSettings::get_singleton()->save_custom(dir.plus_file("project.godot"), initial_settings, Vector<String>(), false) != OK) {
set_message(TTR("Couldn't create project.godot in project path."), MESSAGE_ERROR);
@@ -1375,11 +1375,10 @@ void ProjectList::create_project_item_control(int p_index) {
vb->add_child(path_hb);
Button *show = memnew(Button);
- // Display a folder icon if the project directory can be opened, or a "broken file" icon if it can't
+ // Display a folder icon if the project directory can be opened, or a "broken file" icon if it can't.
show->set_icon(get_theme_icon(!item.missing ? "Load" : "FileBroken", "EditorIcons"));
- show->set_flat(true);
if (!item.grayed) {
- // Don't make the icon less prominent if the parent is already grayed out
+ // Don't make the icon less prominent if the parent is already grayed out.
show->set_modulate(Color(1, 1, 1, 0.5));
}
path_hb->add_child(show);
@@ -2016,6 +2015,10 @@ void ProjectManager::_confirm_update_settings() {
}
void ProjectManager::_open_selected_projects() {
+ // Show loading text to tell the user that the project manager is busy loading.
+ // This is especially important for the HTML5 project manager.
+ loading_label->set_modulate(Color(1, 1, 1));
+
const Set<String> &selected_list = _project_list->get_selected_project_keys();
for (const Set<String>::Element *E = selected_list.front(); E; E = E->next()) {
@@ -2158,8 +2161,9 @@ void ProjectManager::_run_project() {
}
void ProjectManager::_scan_dir(const String &path, List<String> *r_projects) {
- DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- da->change_dir(path);
+ DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ Error error = da->change_dir(path);
+ ERR_FAIL_COND_MSG(error != OK, "Could not scan directory at: " + path);
da->list_dir_begin();
String n = da->get_next();
while (n != String()) {
@@ -2171,7 +2175,6 @@ void ProjectManager::_scan_dir(const String &path, List<String> *r_projects) {
n = da->get_next();
}
da->list_dir_end();
- memdelete(da);
}
void ProjectManager::_scan_begin(const String &p_base) {
@@ -2269,11 +2272,6 @@ void ProjectManager::_restart_confirm() {
get_tree()->quit();
}
-void ProjectManager::_exit_dialog() {
- _dim_window();
- get_tree()->quit();
-}
-
void ProjectManager::_install_project(const String &p_zip_path, const String &p_title) {
npdialog->set_mode(ProjectDialog::MODE_INSTALL);
npdialog->set_zip_path(p_zip_path);
@@ -2282,6 +2280,11 @@ void ProjectManager::_install_project(const String &p_zip_path, const String &p_
}
void ProjectManager::_files_dropped(PackedStringArray p_files, int p_screen) {
+ if (p_files.size() == 1 && p_files[0].ends_with(".zip")) {
+ const String file = p_files[0].get_file();
+ _install_project(p_files[0], file.substr(0, file.length() - 4).capitalize());
+ return;
+ }
Set<String> folders_set;
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
for (int i = 0; i < p_files.size(); i++) {
@@ -2347,7 +2350,6 @@ void ProjectManager::_on_search_term_changed(const String &p_term) {
}
void ProjectManager::_bind_methods() {
- ClassDB::bind_method("_exit_dialog", &ProjectManager::_exit_dialog);
ClassDB::bind_method("_unhandled_key_input", &ProjectManager::_unhandled_key_input);
ClassDB::bind_method("_update_project_buttons", &ProjectManager::_update_project_buttons);
}
@@ -2381,6 +2383,10 @@ ProjectManager::ProjectManager() {
if (DisplayServer::get_singleton()->screen_get_dpi(screen) >= 192 && DisplayServer::get_singleton()->screen_get_size(screen).y >= 1400) {
// hiDPI display.
scale = 2.0;
+ } else if (DisplayServer::get_singleton()->screen_get_size(screen).y >= 1700) {
+ // Likely a hiDPI display, but we aren't certain due to the returned DPI.
+ // Use an intermediate scale to handle this situation.
+ scale = 1.5;
} else if (DisplayServer::get_singleton()->screen_get_size(screen).y <= 800) {
// Small loDPI display. Use a smaller display scale so that editor elements fit more easily.
// Icons won't look great, but this is better than having editor elements overflow from its window.
@@ -2477,7 +2483,12 @@ ProjectManager::ProjectManager() {
search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hb->add_child(search_box);
- hb->add_spacer();
+ loading_label = memnew(Label(TTR("Loading, please wait...")));
+ loading_label->add_theme_font_override("font", get_theme_font("bold", "EditorFonts"));
+ loading_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ hb->add_child(loading_label);
+ // Hide the label but make it still take up space. This prevents reflows when showing the label.
+ loading_label->set_modulate(Color(0, 0, 0, 0));
Label *sort_label = memnew(Label);
sort_label->set_text(TTR("Sort:"));
@@ -2684,8 +2695,26 @@ ProjectManager::ProjectManager() {
_load_recent_projects();
- if (EditorSettings::get_singleton()->get("filesystem/directories/autoscan_project_path")) {
- _scan_begin(EditorSettings::get_singleton()->get("filesystem/directories/autoscan_project_path"));
+ DirAccessRef dir_access = DirAccess::create(DirAccess::AccessType::ACCESS_FILESYSTEM);
+
+ String default_project_path = EditorSettings::get_singleton()->get("filesystem/directories/default_project_path");
+ if (!dir_access->dir_exists(default_project_path)) {
+ Error error = dir_access->make_dir_recursive(default_project_path);
+ if (error != OK) {
+ ERR_PRINT("Could not create default project directory at: " + default_project_path);
+ }
+ }
+
+ String autoscan_path = EditorSettings::get_singleton()->get("filesystem/directories/autoscan_project_path");
+ if (autoscan_path != "") {
+ if (dir_access->dir_exists(autoscan_path)) {
+ _scan_begin(autoscan_path);
+ } else {
+ Error error = dir_access->make_dir_recursive(autoscan_path);
+ if (error != OK) {
+ ERR_PRINT("Could not create project autoscan directory at: " + autoscan_path);
+ }
+ }
}
SceneTree::get_singleton()->get_root()->connect("files_dropped", callable_mp(this, &ProjectManager::_files_dropped));
diff --git a/editor/project_manager.h b/editor/project_manager.h
index db8cb8410c..6dc0e67cba 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -54,6 +54,7 @@ class ProjectManager : public Control {
ProjectList *_project_list;
LineEdit *search_box;
+ Label *loading_label;
OptionButton *filter_option;
Button *run_btn;
@@ -98,7 +99,6 @@ class ProjectManager : public Control {
void _update_project_buttons();
void _language_selected(int p_id);
void _restart_confirm();
- void _exit_dialog();
void _confirm_update_settings();
void _nonempty_confirmation_ok_pressed();
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 4516180fa5..4aadb4295f 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -55,6 +55,7 @@ void ProjectSettingsEditor::popup_project_settings() {
}
void ProjectSettingsEditor::queue_save() {
+ EditorNode::get_singleton()->notify_settings_changed();
timer->start();
}
@@ -74,8 +75,12 @@ void ProjectSettingsEditor::_advanced_pressed() {
if (advanced->is_pressed()) {
_update_advanced_bar();
advanced_bar->show();
+ EditorSettings::get_singleton()->set_project_metadata("project_settings", "advanced_mode", true);
+ inspector->set_restrict_to_basic_settings(false);
} else {
advanced_bar->hide();
+ EditorSettings::get_singleton()->set_project_metadata("project_settings", "advanced_mode", false);
+ inspector->set_restrict_to_basic_settings(true);
}
}
@@ -190,9 +195,6 @@ void ProjectSettingsEditor::_update_advanced_bar() {
add_button->set_disabled(disable_add);
del_button->set_disabled(disable_del);
-
- error_label->set_text(error_msg);
- error_label->set_visible(error_msg != "");
}
String ProjectSettingsEditor::_get_setting_name() const {
@@ -272,16 +274,11 @@ void ProjectSettingsEditor::_notification(int p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
if (!is_visible()) {
EditorSettings::get_singleton()->set_project_metadata("dialog_bounds", "project_settings", Rect2(get_position(), get_size()));
- if (advanced->is_pressed()) {
- advanced->set_pressed(false);
- advanced_bar->hide();
- }
}
} break;
case NOTIFICATION_ENTER_TREE: {
inspector->edit(ps);
- error_label->add_theme_color_override("font_color", error_label->get_theme_color("error_color", "Editor"));
add_button->set_icon(get_theme_icon("Add", "EditorIcons"));
del_button->set_icon(get_theme_icon("Remove", "EditorIcons"));
@@ -339,23 +336,19 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
search_bar->add_child(search_box);
advanced = memnew(CheckButton);
- advanced->set_text(TTR("Advanced"));
+ advanced->set_text(TTR("Advanced Settings"));
advanced->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_advanced_pressed));
search_bar->add_child(advanced);
}
{
// Advanced bar.
- advanced_bar = memnew(VBoxContainer);
- advanced_bar->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ advanced_bar = memnew(HBoxContainer);
advanced_bar->hide();
header->add_child(advanced_bar);
- advanced_bar->add_child(memnew(HSeparator));
-
- HBoxContainer *hbc = memnew(HBoxContainer);
+ HBoxContainer *hbc = advanced_bar;
hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- advanced_bar->add_margin_child(TTR("Add or Remove Custom Project Settings:"), hbc, true);
category_box = memnew(LineEdit);
category_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -364,7 +357,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
hbc->add_child(category_box);
Label *l = memnew(Label);
- l->set_text("/");
+ l->set_text(" / ");
hbc->add_child(l);
property_box = memnew(LineEdit);
@@ -407,9 +400,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
del_button->set_flat(true);
del_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_delete_setting), varray(false));
hbc->add_child(del_button);
-
- error_label = memnew(Label);
- advanced_bar->add_child(error_label);
}
inspector = memnew(SectionedInspector);
@@ -483,4 +473,13 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
get_ok_button()->set_text(TTR("Close"));
set_hide_on_ok(true);
+
+ bool use_advanced = EditorSettings::get_singleton()->get_project_metadata("project_settings", "advanced_mode", false);
+
+ if (use_advanced) {
+ advanced->set_pressed(true);
+ advanced_bar->show();
+ }
+
+ inspector->set_restrict_to_basic_settings(!use_advanced);
}
diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h
index 88c96540ff..a43adecc4e 100644
--- a/editor/project_settings_editor.h
+++ b/editor/project_settings_editor.h
@@ -68,14 +68,13 @@ class ProjectSettingsEditor : public AcceptDialog {
LineEdit *search_box;
CheckButton *advanced;
- VBoxContainer *advanced_bar;
+ HBoxContainer *advanced_bar;
LineEdit *category_box;
LineEdit *property_box;
Button *add_button;
Button *del_button;
OptionButton *type;
OptionButton *feature_override;
- Label *error_label;
ConfirmationDialog *del_confirmation;
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index ac1beb1c37..48c4d33184 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -87,6 +87,12 @@ void SceneTreeDock::_unhandled_key_input(Ref<InputEvent> p_event) {
_tool_selected(TOOL_INSTANCE);
} else if (ED_IS_SHORTCUT("scene_tree/expand_collapse_all", p_event)) {
_tool_selected(TOOL_EXPAND_COLLAPSE);
+ } else if (ED_IS_SHORTCUT("scene_tree/cut_node", p_event)) {
+ _tool_selected(TOOL_CUT);
+ } else if (ED_IS_SHORTCUT("scene_tree/copy_node", p_event)) {
+ _tool_selected(TOOL_COPY);
+ } else if (ED_IS_SHORTCUT("scene_tree/paste_node", p_event)) {
+ _tool_selected(TOOL_PASTE);
} else if (ED_IS_SHORTCUT("scene_tree/change_node_type", p_event)) {
_tool_selected(TOOL_REPLACE);
} else if (ED_IS_SHORTCUT("scene_tree/duplicate", p_event)) {
@@ -101,8 +107,6 @@ void SceneTreeDock::_unhandled_key_input(Ref<InputEvent> p_event) {
_tool_selected(TOOL_MOVE_DOWN);
} else if (ED_IS_SHORTCUT("scene_tree/reparent", p_event)) {
_tool_selected(TOOL_REPARENT);
- } else if (ED_IS_SHORTCUT("scene_tree/merge_from_scene", p_event)) {
- _tool_selected(TOOL_MERGE_FROM_SCENE);
} else if (ED_IS_SHORTCUT("scene_tree/save_branch_as_scene", p_event)) {
_tool_selected(TOOL_NEW_SCENE_FROM);
} else if (ED_IS_SHORTCUT("scene_tree/delete_no_confirm", p_event)) {
@@ -397,6 +401,114 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
tree->ensure_cursor_is_visible();
} break;
+ case TOOL_CUT:
+ case TOOL_COPY: {
+ if (!edited_scene || !_validate_no_foreign()) {
+ break;
+ }
+
+ List<Node *> selection = editor_selection->get_selected_node_list();
+ if (selection.size() == 0) {
+ break;
+ }
+
+ if (!node_clipboard.is_empty()) {
+ _clear_clipboard();
+ }
+ clipboard_source_scene = editor->get_edited_scene()->get_filename();
+
+ selection.sort_custom<Node::Comparator>();
+
+ for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
+ Node *node = E->get();
+ Map<const Node *, Node *> duplimap;
+ Node *dup = node->duplicate_from_editor(duplimap);
+
+ ERR_CONTINUE(!dup);
+
+ node_clipboard.push_back(dup);
+ }
+
+ if (p_tool == TOOL_CUT) {
+ _delete_confirm(true);
+ }
+ } break;
+ case TOOL_PASTE: {
+ if (node_clipboard.is_empty() || !edited_scene) {
+ break;
+ }
+
+ bool has_cycle = false;
+ if (edited_scene->get_filename() != String()) {
+ for (List<Node *>::Element *E = node_clipboard.front(); E; E = E->next()) {
+ if (edited_scene->get_filename() == E->get()->get_filename()) {
+ has_cycle = true;
+ break;
+ }
+ }
+ }
+
+ if (has_cycle) {
+ current_option = -1;
+ accept->set_text(TTR("Can't paste root node into the same scene."));
+ accept->popup_centered();
+ break;
+ }
+
+ Node *paste_parent = edited_scene;
+ List<Node *> selection = editor_selection->get_selected_node_list();
+ if (selection.size() > 0) {
+ paste_parent = selection.back()->get();
+ }
+
+ Node *owner = paste_parent->get_owner();
+ if (!owner) {
+ owner = paste_parent;
+ }
+
+ editor_data->get_undo_redo().create_action(TTR("Paste Node(s)"));
+ editor_data->get_undo_redo().add_do_method(editor_selection, "clear");
+
+ Map<RES, RES> resource_remap;
+ String target_scene = editor->get_edited_scene()->get_filename();
+ if (target_scene != clipboard_source_scene) {
+ if (!clipboard_resource_remap.has(target_scene)) {
+ Map<RES, RES> remap;
+ for (List<Node *>::Element *E = node_clipboard.front(); E; E = E->next()) {
+ _create_remap_for_node(E->get(), remap);
+ }
+ clipboard_resource_remap[target_scene] = remap;
+ }
+ resource_remap = clipboard_resource_remap[target_scene];
+ }
+
+ for (List<Node *>::Element *E = node_clipboard.front(); E; E = E->next()) {
+ Node *node = E->get();
+ Map<const Node *, Node *> duplimap;
+
+ Node *dup = node->duplicate_from_editor(duplimap, resource_remap);
+
+ ERR_CONTINUE(!dup);
+
+ editor_data->get_undo_redo().add_do_method(paste_parent, "add_child", dup);
+
+ for (Map<const Node *, Node *>::Element *E2 = duplimap.front(); E2; E2 = E2->next()) {
+ Node *d = E2->value();
+ editor_data->get_undo_redo().add_do_method(d, "set_owner", owner);
+ }
+
+ editor_data->get_undo_redo().add_do_method(dup, "set_owner", owner);
+ editor_data->get_undo_redo().add_do_method(editor_selection, "add_node", dup);
+ editor_data->get_undo_redo().add_undo_method(paste_parent, "remove_child", dup);
+ editor_data->get_undo_redo().add_do_reference(dup);
+
+ if (node_clipboard.size() == 1) {
+ editor_data->get_undo_redo().add_do_method(editor, "push_item", dup);
+ }
+ }
+
+ editor_data->get_undo_redo().commit_action();
+ } break;
case TOOL_REPLACE: {
if (!profile_allow_editing) {
break;
@@ -766,13 +878,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
} break;
- case TOOL_MERGE_FROM_SCENE: {
- if (!profile_allow_editing) {
- break;
- }
-
- EditorNode::get_singleton()->merge_from_scene();
- } break;
case TOOL_NEW_SCENE_FROM: {
if (!profile_allow_editing) {
break;
@@ -1795,7 +1900,7 @@ void SceneTreeDock::_toggle_editable_children(Node *p_node) {
}
}
-void SceneTreeDock::_delete_confirm() {
+void SceneTreeDock::_delete_confirm(bool p_cut) {
List<Node *> remove_list = editor_selection->get_selected_node_list();
if (remove_list.is_empty()) {
@@ -1804,7 +1909,11 @@ void SceneTreeDock::_delete_confirm() {
editor->get_editor_plugins_over()->make_visible(false);
- editor_data->get_undo_redo().create_action(TTR("Remove Node(s)"));
+ if (p_cut) {
+ editor_data->get_undo_redo().create_action(TTR("Cut Node(s)"));
+ } else {
+ editor_data->get_undo_redo().create_action(TTR("Remove Node(s)"));
+ }
bool entire_scene = false;
@@ -2173,21 +2282,6 @@ void SceneTreeDock::set_selected(Node *p_node, bool p_emit_selected) {
scene_tree->set_selected(p_node, p_emit_selected);
}
-void SceneTreeDock::import_subscene() {
- import_subscene_dialog->popup_centered_clamped(Size2(500, 800) * EDSCALE, 0.8);
-}
-
-void SceneTreeDock::_import_subscene() {
- Node *parent = scene_tree->get_selected();
- if (!parent) {
- parent = editor_data->get_edited_scene_root();
- ERR_FAIL_COND(!parent);
- }
-
- import_subscene_dialog->move(parent, edited_scene);
- editor_data->get_undo_redo().clear_history(); //no undo for now..
-}
-
void SceneTreeDock::_new_scene_from(String p_file) {
List<Node *> selection = editor_selection->get_selected_node_list();
@@ -2444,6 +2538,13 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
if (profile_allow_script_editing) {
+ menu->add_shortcut(ED_GET_SHORTCUT("scene_tree/cut_node"), TOOL_CUT);
+ menu->add_shortcut(ED_GET_SHORTCUT("scene_tree/copy_node"), TOOL_COPY);
+ if (selection.size() == 1 && !node_clipboard.is_empty()) {
+ menu->add_shortcut(ED_GET_SHORTCUT("scene_tree/paste_node"), TOOL_PASTE);
+ }
+ menu->add_separator();
+
bool add_separator = false;
if (full_selection.size() == 1) {
@@ -2497,7 +2598,6 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
if (selection.size() == 1) {
if (profile_allow_editing) {
menu->add_separator();
- menu->add_icon_shortcut(get_theme_icon("Blend", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/merge_from_scene"), TOOL_MERGE_FROM_SCENE);
menu->add_icon_shortcut(get_theme_icon("CreateNewSceneFrom", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/save_branch_as_scene"), TOOL_NEW_SCENE_FROM);
}
if (full_selection.size() == 1) {
@@ -2775,6 +2875,62 @@ void SceneTreeDock::_feature_profile_changed() {
_update_script_button();
}
+void SceneTreeDock::_clear_clipboard() {
+ for (List<Node *>::Element *E = node_clipboard.front(); E; E = E->next()) {
+ memdelete(E->get());
+ }
+ node_clipboard.clear();
+ clipboard_resource_remap.clear();
+}
+
+void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap) {
+ List<PropertyInfo> props;
+ p_node->get_property_list(&props);
+
+ for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
+ if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) {
+ continue;
+ }
+
+ Variant v = p_node->get(E->get().name);
+ if (v.is_ref()) {
+ RES res = v;
+ if (res.is_valid()) {
+ if ((res->get_path() == "" || res->get_path().find("::") > -1) && !r_remap.has(res)) {
+ _create_remap_for_resource(res, r_remap);
+ }
+ }
+ }
+ }
+
+ for (int i = 0; i < p_node->get_child_count(); i++) {
+ _create_remap_for_node(p_node->get_child(i), r_remap);
+ }
+}
+
+void SceneTreeDock::_create_remap_for_resource(RES p_resource, Map<RES, RES> &r_remap) {
+ r_remap[p_resource] = p_resource->duplicate();
+
+ List<PropertyInfo> props;
+ p_resource->get_property_list(&props);
+
+ for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
+ if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) {
+ continue;
+ }
+
+ Variant v = p_resource->get(E->get().name);
+ if (v.is_ref()) {
+ RES res = v;
+ if (res.is_valid()) {
+ if ((res->get_path() == "" || res->get_path().find("::") > -1) && !r_remap.has(res)) {
+ _create_remap_for_resource(res, r_remap);
+ }
+ }
+ }
+ }
+}
+
void SceneTreeDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_owners"), &SceneTreeDock::_set_owners);
ClassDB::bind_method(D_METHOD("_unhandled_key_input"), &SceneTreeDock::_unhandled_key_input);
@@ -2806,6 +2962,9 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
ED_SHORTCUT("scene_tree/add_child_node", TTR("Add Child Node"), KEY_MASK_CMD | KEY_A);
ED_SHORTCUT("scene_tree/instance_scene", TTR("Instance Child Scene"));
ED_SHORTCUT("scene_tree/expand_collapse_all", TTR("Expand/Collapse All"));
+ ED_SHORTCUT("scene_tree/cut_node", TTR("Cut"), KEY_MASK_CMD | KEY_X);
+ ED_SHORTCUT("scene_tree/copy_node", TTR("Copy"), KEY_MASK_CMD | KEY_C);
+ ED_SHORTCUT("scene_tree/paste_node", TTR("Paste"), KEY_MASK_CMD | KEY_V);
ED_SHORTCUT("scene_tree/change_node_type", TTR("Change Type"));
ED_SHORTCUT("scene_tree/attach_script", TTR("Attach Script"));
ED_SHORTCUT("scene_tree/extend_script", TTR("Extend Script"));
@@ -2816,9 +2975,8 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
ED_SHORTCUT("scene_tree/reparent", TTR("Reparent"));
ED_SHORTCUT("scene_tree/reparent_to_new_node", TTR("Reparent to New Node"));
ED_SHORTCUT("scene_tree/make_root", TTR("Make Scene Root"));
- ED_SHORTCUT("scene_tree/merge_from_scene", TTR("Merge From Scene"));
ED_SHORTCUT("scene_tree/save_branch_as_scene", TTR("Save Branch as Scene"));
- ED_SHORTCUT("scene_tree/copy_node_path", TTR("Copy Node Path"), KEY_MASK_CMD | KEY_C);
+ ED_SHORTCUT("scene_tree/copy_node_path", TTR("Copy Node Path"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_C);
ED_SHORTCUT("scene_tree/delete_no_confirm", TTR("Delete (No Confirm)"), KEY_MASK_SHIFT | KEY_DELETE);
ED_SHORTCUT("scene_tree/delete", TTR("Delete"), KEY_DELETE);
@@ -2841,7 +2999,7 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
filter->set_h_size_flags(SIZE_EXPAND_FILL);
filter->set_placeholder(TTR("Filter nodes"));
filter_hbc->add_child(filter);
- filter->add_theme_constant_override("minimum_spaces", 0);
+ filter->add_theme_constant_override("minimum_character_width", 0);
filter->connect("text_changed", callable_mp(this, &SceneTreeDock::_filter_changed));
button_create_script = memnew(Button);
@@ -2936,7 +3094,7 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog);
- delete_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_delete_confirm));
+ delete_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_delete_confirm), varray(false));
editable_instance_remove_dialog = memnew(ConfirmationDialog);
add_child(editable_instance_remove_dialog);
@@ -2946,10 +3104,6 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
add_child(placeholder_editable_instance_remove_dialog);
placeholder_editable_instance_remove_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_toggle_placeholder_from_selection));
- import_subscene_dialog = memnew(EditorSubScene);
- add_child(import_subscene_dialog);
- import_subscene_dialog->connect("subscene_selected", callable_mp(this, &SceneTreeDock::_import_subscene));
-
new_scene_from_dialog = memnew(EditorFileDialog);
new_scene_from_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
add_child(new_scene_from_dialog);
@@ -2981,3 +3135,9 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
EDITOR_DEF("interface/editors/derive_script_globals_by_name", true);
EDITOR_DEF("_use_favorites_root_selection", false);
}
+
+SceneTreeDock::~SceneTreeDock() {
+ if (!node_clipboard.is_empty()) {
+ _clear_clipboard();
+ }
+}
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index 4f8d85f07c..9bc281c7fb 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -34,7 +34,6 @@
#include "editor/connections_dialog.h"
#include "editor/create_dialog.h"
#include "editor/editor_data.h"
-#include "editor/editor_sub_scene.h"
#include "editor/groups_editor.h"
#include "editor/quick_open.h"
#include "editor/rename_dialog.h"
@@ -58,6 +57,9 @@ class SceneTreeDock : public VBoxContainer {
TOOL_NEW,
TOOL_INSTANCE,
TOOL_EXPAND_COLLAPSE,
+ TOOL_CUT,
+ TOOL_COPY,
+ TOOL_PASTE,
TOOL_RENAME,
TOOL_BATCH_RENAME,
TOOL_REPLACE,
@@ -71,7 +73,6 @@ class SceneTreeDock : public VBoxContainer {
TOOL_REPARENT_TO_NEW_NODE,
TOOL_MAKE_ROOT,
TOOL_NEW_SCENE_FROM,
- TOOL_MERGE_FROM_SCENE,
TOOL_MULTI_EDIT,
TOOL_ERASE,
TOOL_COPY_NODE_PATH,
@@ -126,6 +127,10 @@ class SceneTreeDock : public VBoxContainer {
EditorData *editor_data;
EditorSelection *editor_selection;
+ List<Node *> node_clipboard;
+ String clipboard_source_scene;
+ HashMap<String, Map<RES, RES>> clipboard_resource_remap;
+
ScriptCreateDialog *script_create_dialog;
AcceptDialog *accept;
ConfirmationDialog *delete_dialog;
@@ -134,7 +139,6 @@ class SceneTreeDock : public VBoxContainer {
ReparentDialog *reparent_dialog;
EditorQuickOpen *quick_open;
- EditorSubScene *import_subscene_dialog;
EditorFileDialog *new_scene_from_dialog;
LineEdit *filter;
@@ -183,7 +187,7 @@ class SceneTreeDock : public VBoxContainer {
void _script_created(Ref<Script> p_script);
void _script_creation_closed();
- void _delete_confirm();
+ void _delete_confirm(bool p_cut = false);
void _toggle_editable_children_from_selection();
void _toggle_editable_children(Node *p_node);
@@ -230,6 +234,10 @@ class SceneTreeDock : public VBoxContainer {
void _feature_profile_changed();
+ void _clear_clipboard();
+ void _create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap);
+ void _create_remap_for_resource(RES p_resource, Map<RES, RES> &r_remap);
+
bool profile_allow_editing;
bool profile_allow_script_editing;
@@ -267,6 +275,7 @@ public:
ScriptCreateDialog *get_script_create_dialog() { return script_create_dialog; }
SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSelection *p_editor_selection, EditorData &p_editor_data);
+ ~SceneTreeDock();
};
#endif // SCENE_TREE_DOCK_H
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index b8475656ee..b9a3e2a801 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -156,7 +156,7 @@ void SceneTreeEditor::_toggle_visible(Node *p_node) {
}
}
-bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
+bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll_to_selected) {
if (!p_node) {
return false;
}
@@ -391,15 +391,19 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
}
}
+ bool scroll = false;
+
if (editor_selection) {
if (editor_selection->is_selected(p_node)) {
item->select(0);
+ scroll = p_scroll_to_selected;
}
}
if (selected == p_node) {
if (!editor_selection) {
item->select(0);
+ scroll = p_scroll_to_selected;
}
item->set_as_cursor(0);
}
@@ -407,7 +411,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
bool keep = (filter.is_subsequence_ofi(String(p_node->get_name())));
for (int i = 0; i < p_node->get_child_count(); i++) {
- bool child_keep = _add_nodes(p_node->get_child(i), item);
+ bool child_keep = _add_nodes(p_node->get_child(i), item, p_scroll_to_selected);
keep = keep || child_keep;
}
@@ -438,6 +442,9 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
memdelete(item);
return false;
} else {
+ if (scroll) {
+ tree->scroll_to_item(item);
+ }
return true;
}
}
@@ -525,7 +532,7 @@ void SceneTreeEditor::_node_renamed(Node *p_node) {
}
}
-void SceneTreeEditor::_update_tree() {
+void SceneTreeEditor::_update_tree(bool p_scroll_to_selected) {
if (!is_inside_tree()) {
tree_dirty = false;
return;
@@ -534,7 +541,7 @@ void SceneTreeEditor::_update_tree() {
updating_tree = true;
tree->clear();
if (get_scene_node()) {
- _add_nodes(get_scene_node(), nullptr);
+ _add_nodes(get_scene_node(), nullptr, p_scroll_to_selected);
last_hash = hash_djb2_one_64(0);
_compute_hash(get_scene_node(), last_hash);
}
@@ -817,7 +824,7 @@ void SceneTreeEditor::set_marked(Node *p_marked, bool p_selectable, bool p_child
void SceneTreeEditor::set_filter(const String &p_filter) {
filter = p_filter;
- _update_tree();
+ _update_tree(true);
}
String SceneTreeEditor::get_filter() const {
@@ -1103,7 +1110,7 @@ void SceneTreeEditor::set_connecting_signal(bool p_enable) {
}
void SceneTreeEditor::_bind_methods() {
- ClassDB::bind_method("_update_tree", &SceneTreeEditor::_update_tree); // Still used by some connect_compat.
+ ClassDB::bind_method(D_METHOD("_update_tree", "scroll_to_selected"), &SceneTreeEditor::_update_tree, DEFVAL(false)); // Still used by some connect_compat.
ClassDB::bind_method("_rename_node", &SceneTreeEditor::_rename_node);
ClassDB::bind_method("_test_update_tree", &SceneTreeEditor::_test_update_tree);
@@ -1253,7 +1260,7 @@ SceneTreeDialog::SceneTreeDialog() {
filter = memnew(LineEdit);
filter->set_h_size_flags(Control::SIZE_EXPAND_FILL);
filter->set_placeholder(TTR("Filter nodes"));
- filter->add_theme_constant_override("minimum_spaces", 0);
+ filter->add_theme_constant_override("minimum_character_width", 0);
filter->connect("text_changed", callable_mp(this, &SceneTreeDialog::_filter_changed));
vbc->add_child(filter);
diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h
index 831723a27c..7d3419516d 100644
--- a/editor/scene_tree_editor.h
+++ b/editor/scene_tree_editor.h
@@ -71,9 +71,9 @@ class SceneTreeEditor : public Control {
void _compute_hash(Node *p_node, uint64_t &hash);
- bool _add_nodes(Node *p_node, TreeItem *p_parent);
+ bool _add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll_to_selected = false);
void _test_update_tree();
- void _update_tree();
+ void _update_tree(bool p_scroll_to_selected = false);
void _tree_changed();
void _node_removed(Node *p_node);
void _node_renamed(Node *p_node);
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index 1dad3c091d..ffd5716364 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -143,7 +143,7 @@ void EditorSettingsDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
if (k.is_valid() && k->is_pressed()) {
bool handled = false;
- if (ED_IS_SHORTCUT("editor/undo", p_event)) {
+ if (ED_IS_SHORTCUT("ui_undo", p_event)) {
String action = undo_redo->get_current_action_name();
if (action != "") {
EditorNode::get_log()->add_message("Undo: " + action, EditorLog::MSG_TYPE_EDITOR);
@@ -152,7 +152,7 @@ void EditorSettingsDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
handled = true;
}
- if (ED_IS_SHORTCUT("editor/redo", p_event)) {
+ if (ED_IS_SHORTCUT("ui_redo", p_event)) {
undo_redo->redo();
String action = undo_redo->get_current_action_name();
if (action != "") {
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index 14d305e34f..a61b4aa3b9 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -427,7 +427,7 @@ void ShaderGlobalsEditor::_variable_deleted(const String &p_variable) {
void ShaderGlobalsEditor::_changed() {
emit_signal("globals_changed");
if (!interface->block_update) {
- interface->_change_notify();
+ interface->notify_property_list_changed();
}
}
diff --git a/editor/translations/af.po b/editor/translations/af.po
index 5caef149fa..9c2cb8bdee 100644
--- a/editor/translations/af.po
+++ b/editor/translations/af.po
@@ -3143,6 +3143,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -7058,16 +7074,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7402,6 +7408,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -10017,6 +10027,11 @@ msgid "Projects"
msgstr "Projek Stigters"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Laai"
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index 2cfe1ac76c..82edf48cf2 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -3154,6 +3154,25 @@ msgid "Open & Run a Script"
msgstr "ÙØªØ­ Ùˆ تشغيل كود"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Ø§Ù„Ù…Ù„ÙØ§Øª التالية أحدث على القرص.\n"
+"ما الإجراء الذي ينبغي اتخاذه؟:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "إعادة تحميل"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "إعادة Ø­ÙØ¸"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "موروث جديد"
@@ -7008,16 +7027,6 @@ msgstr ""
"Ø§Ù„Ù…Ù„ÙØ§Øª التالية أحدث على القرص.\n"
"ما الإجراء الذي ينبغي اتخاذه؟:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "إعادة تحميل"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "إعادة Ø­ÙØ¸"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Ù…Ùنقح الأخطاء"
@@ -7335,6 +7344,11 @@ msgid "Yaw"
msgstr "الإنحرا٠Yaw"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "الحجم: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "كائنات مرسومة"
@@ -10023,6 +10037,11 @@ msgid "Projects"
msgstr "المشاريع"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "يستقبل المرايا، من ÙØ¶Ù„Ùƒ إنتظر..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "آخر ما تم تعديله"
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index db594a8500..886a8c8e6a 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -17,7 +17,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-01-15 15:38+0000\n"
+"PO-Revision-Date: 2021-02-15 10:51+0000\n"
"Last-Translator: Любомир ВаÑилев <lyubomirv@gmx.com>\n"
"Language-Team: Bulgarian <https://hosted.weblate.org/projects/godot-engine/"
"godot/bg/>\n"
@@ -681,13 +681,12 @@ msgid "Line Number:"
msgstr "Ðомер на реда:"
#: editor/code_editor.cpp
-#, fuzzy
msgid "%d replaced."
-msgstr "ЗамÑна..."
+msgstr "%d заменени."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d match."
-msgstr ""
+msgstr "%d Ñъвпадение."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d matches."
@@ -695,7 +694,7 @@ msgstr "%d ÑъвпадениÑ."
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Match Case"
-msgstr ""
+msgstr "Различаване на малки и главни букви"
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Whole Words"
@@ -2233,11 +2232,11 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
-msgstr ""
+msgstr "Ðе може да Ñе зареди библиотеката Ñ Ð¿Ð¾Ð»Ð¸Ð³Ð¾Ð½Ð½Ð¸ мрежи за Ñливане!"
#: editor/editor_node.cpp
msgid "Error saving MeshLibrary!"
-msgstr ""
+msgstr "Грешка при запазването на библиотеката Ñ Ð¿Ð¾Ð»Ð¸Ð³Ð¾Ð½Ð½Ð¸ мрежи!"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
@@ -2360,7 +2359,7 @@ msgstr "ОперациÑта не може да Ñе извърши без ÑцÐ
#: editor/editor_node.cpp
msgid "Export Mesh Library"
-msgstr ""
+msgstr "ИзнаÑÑне на библиотека Ñ Ð¿Ð¾Ð»Ð¸Ð³Ð¾Ð½Ð½Ð¸ мрежи"
#: editor/editor_node.cpp
msgid "This operation can't be done without a root node."
@@ -2642,7 +2641,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "MeshLibrary..."
-msgstr ""
+msgstr "Библиотека Ñ Ð¿Ð¾Ð»Ð¸Ð³Ð¾Ð½Ð½Ð¸ мрежи…"
#: editor/editor_node.cpp
msgid "TileSet..."
@@ -2759,6 +2758,8 @@ msgid ""
"When this option is enabled, navigation meshes and polygons will be visible "
"in the running project."
msgstr ""
+"Ðко тази наÑтройка е включено, навигационните полигони и мрежи ще бъдат "
+"видими в изпълнÑÐ²Ð°Ñ‰Ð¸Ñ Ñе проект."
#: editor/editor_node.cpp
msgid "Synchronize Scene Changes"
@@ -2999,6 +3000,25 @@ msgstr ""
#: editor/editor_node.cpp
#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Следните файлове Ñа по-нови на диÑка.\n"
+"Кое дейÑтвие трÑбва да Ñе предприеме?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Презареждане"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "ПрезапиÑване"
+
+#: editor/editor_node.cpp
+#, fuzzy
msgid "New Inherited"
msgstr "Ðов Ñкрипт"
@@ -3737,19 +3757,16 @@ msgid "Searching..."
msgstr "ТърÑене..."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d match in %d file."
-msgstr "%d ÑъвпадениÑ."
+msgstr "%d Ñъвпадение в %d файл."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d matches in %d file."
-msgstr "%d ÑъвпадениÑ."
+msgstr "%d ÑÑŠÐ²Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ Ð² %d файл."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d matches in %d files."
-msgstr "%d ÑъвпадениÑ."
+msgstr "%d ÑÑŠÐ²Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ Ð² %d файла."
#: editor/groups_editor.cpp
msgid "Add to Group"
@@ -3859,7 +3876,7 @@ msgstr ""
#: editor/import/resource_importer_scene.cpp
msgid "Generating for Mesh: "
-msgstr ""
+msgstr "Създаване за полигонна мрежа: "
#: editor/import/resource_importer_scene.cpp
msgid "Running Custom Script..."
@@ -4343,7 +4360,7 @@ msgstr "Ðово име на анимациÑта:"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "New Anim"
-msgstr ""
+msgstr "Ðова анимациÑ"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Change Animation Name:"
@@ -4357,20 +4374,20 @@ msgstr "Изтриване на анимациÑта?"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Remove Animation"
-msgstr ""
+msgstr "Премахване на анимациÑта"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Invalid animation name!"
-msgstr ""
+msgstr "Ðеправилно име на анимациÑта!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation name already exists!"
-msgstr ""
+msgstr "Вече ÑъщеÑтвува Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ñ Ñ‚Ð¾Ð²Ð° име!"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Rename Animation"
-msgstr ""
+msgstr "Преименуване на анимациÑта"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Blend Next Changed"
@@ -4378,19 +4395,19 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Change Blend Time"
-msgstr ""
+msgstr "ПромÑна на времето на ÑмеÑване"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Load Animation"
-msgstr ""
+msgstr "Зареждане на анимациÑ"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Duplicate Animation"
-msgstr ""
+msgstr "Дублиране на анимациÑта"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "No animation to copy!"
-msgstr ""
+msgstr "ÐÑма Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° копиране!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "No animation resource on clipboard!"
@@ -4398,11 +4415,11 @@ msgstr "ÐÑма реÑурÑâ€“Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð² буфера за обмен
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Pasted Animation"
-msgstr ""
+msgstr "ПоÑтавена анимациÑ"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Paste Animation"
-msgstr ""
+msgstr "ПоÑтавÑне на анимациÑ"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "No animation to edit!"
@@ -4411,30 +4428,32 @@ msgstr "ÐÑма Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° редактиране!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation backwards from current pos. (A)"
msgstr ""
+"Възпроизвеждане на избраната Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð½Ð°Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð¾ от текущата позициÑ. (A)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation backwards from end. (Shift+A)"
-msgstr ""
+msgstr "Възпроизвеждане на избраната Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð½Ð°Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð¾ от краÑ. (Shift+A)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Stop animation playback. (S)"
-msgstr ""
+msgstr "Спиране на възпроизвеждането на анимациÑта. (S)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation from start. (Shift+D)"
-msgstr ""
+msgstr "Възпроизвеждане на избраната Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð¾Ñ‚ началото. (Shift+D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation from current pos. (D)"
-msgstr ""
+msgstr "Възпроизвеждане на избраната Ð°Ð½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð¾Ñ‚ текущата позициÑ. (D)"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation position (in seconds)."
-msgstr ""
+msgstr "ÐŸÐ¾Ð·Ð¸Ñ†Ð¸Ñ Ð² анимациÑта (в Ñекунди)."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Scale animation playback globally for the node."
msgstr ""
+"Скалиране на ÑкороÑтта на възпроизвеждане на анимациÑта глобално за възела."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Tools"
@@ -4442,7 +4461,7 @@ msgstr "ИнÑтрументи за анимациите"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation"
-msgstr ""
+msgstr "ÐнимациÑ"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Edit Transitions..."
@@ -4450,7 +4469,7 @@ msgstr "Редактиране на преходите..."
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Open in Inspector"
-msgstr ""
+msgstr "ОтварÑне в инÑпектора"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Display list of animations in player."
@@ -4458,52 +4477,51 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Autoplay on Load"
-msgstr ""
+msgstr "Ðвт. възпроизвеждане при зареждане"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Enable Onion Skinning"
-msgstr ""
+msgstr "Показване на избледнÑващи кадри"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Onion Skinning Options"
-msgstr ""
+msgstr "ÐаÑтройки на режима Ñ Ð¸Ð·Ð±Ð»ÐµÐ´Ð½Ñващи кадри"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Directions"
msgstr "ÐаправлениÑ"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Past"
-msgstr "ПоÑтавÑне"
+msgstr "Минало"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Future"
-msgstr ""
+msgstr "Бъдеще"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Depth"
-msgstr ""
+msgstr "Дълбочина"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "1 step"
-msgstr ""
+msgstr "1 Ñтъпка"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "2 steps"
-msgstr ""
+msgstr "2 Ñтъпки"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "3 steps"
-msgstr ""
+msgstr "3 Ñтъпки"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Differences Only"
-msgstr ""
+msgstr "Само разликите"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Force White Modulate"
-msgstr ""
+msgstr "Принудително модулиране на бÑлото"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Include Gizmos (3D)"
@@ -4515,11 +4533,11 @@ msgstr "Закачане на AnimationPlayer"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Create New Animation"
-msgstr ""
+msgstr "Създаване на нова анимациÑ"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Name:"
-msgstr ""
+msgstr "Име на анимациÑта:"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
@@ -4530,15 +4548,15 @@ msgstr "Грешка!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Blend Times:"
-msgstr ""
+msgstr "Времена на ÑмеÑване:"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Next (Auto Queue):"
-msgstr ""
+msgstr "Следваща (авт. опашка):"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Cross-Animation Blend Times"
-msgstr ""
+msgstr "Времена на ÑмеÑване между анимациите"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Move Node"
@@ -4555,23 +4573,23 @@ msgstr "ДобавÑне на преход"
#: editor/plugins/animation_state_machine_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Node"
-msgstr ""
+msgstr "ДобавÑне на възел"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "End"
-msgstr ""
+msgstr "Край"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Immediate"
-msgstr ""
+msgstr "Ðезабавно"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Sync"
-msgstr ""
+msgstr "Синхронизиране"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "At End"
-msgstr ""
+msgstr "Ðа краÑ"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Travel"
@@ -4799,17 +4817,15 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, return code:"
-msgstr "ЗаÑвката Ñе провали. Код:"
+msgstr "ЗаÑвката беше неуÑпешна. Код:"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed."
-msgstr "Запитване..."
+msgstr "ЗаÑвката беше неуÑпешна."
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Cannot save response to:"
-msgstr "Ðе може да Ñе премахне:"
+msgstr "Отговорът не може да бъде запазен в:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Write error."
@@ -4904,14 +4920,12 @@ msgid "Name (Z-A)"
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "License (A-Z)"
-msgstr "Лиценз"
+msgstr "Лиценз (Ð-Я)"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "License (Z-A)"
-msgstr "Лиценз"
+msgstr "Лиценз (Я-Ð)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "First"
@@ -4971,9 +4985,8 @@ msgid "Testing"
msgstr "ТеÑтово"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Loading..."
-msgstr "Зареди..."
+msgstr "Зареждане…"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
@@ -4984,40 +4997,52 @@ msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
+"Ðе може да Ñе уÑтанови пътÑÑ‚ за запазване на Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ ÐºÐ°Ñ€Ñ‚Ð¸ на "
+"оÑветеноÑÑ‚.\n"
+"Запазете Ñцената и опитайте отново."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake "
"Light' flag is on."
msgstr ""
+"ÐÑма полигонни мрежи за изпичане. Уверете Ñе, че те Ñъдържат канал UV2 и че "
+"флагът „Изпичане на Ñветлината“ е включен."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed creating lightmap images, make sure path is writable."
msgstr ""
+"Грешка при Ñъздаването на Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ñ ÐºÐ°Ñ€Ñ‚Ð¸ на оÑветеноÑÑ‚. Уверете Ñе, че "
+"пътÑÑ‚ е доÑтъпен за запиÑ."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Ðе може да Ñе определи размерът на картата на оÑветеноÑÑ‚. Твърде малък ли е "
+"макÑималниÑÑ‚ размер?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Има неподходÑща полигонна мрежа. Уверете Ñе, че ÑтойноÑтите в канала UV2 Ñе "
+"принадлежат на квадратната облаÑÑ‚ [0.0,1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Редакторът на Godot е бил компилиран без поддръжка за траÑиране на лъчи. Ðе "
+"могат да Ñе изпичат карти на оÑветеноÑÑ‚."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
-msgstr ""
+msgstr "Изпичане на карти на оÑветеноÑÑ‚"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Избор на шаблонен файл"
+msgstr "Изберете файл за изпичане на карта на оÑветеноÑÑ‚:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5026,71 +5051,63 @@ msgstr "Преглед"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Configure Snap"
-msgstr ""
+msgstr "ÐаÑтройване на прилепването"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Offset:"
-msgstr ""
+msgstr "ОтмеÑтване на мрежата:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Grid Step:"
-msgstr ""
+msgstr "Стъпка на мрежата:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Primary Line Every:"
-msgstr ""
+msgstr "ОÑновна Ð»Ð¸Ð½Ð¸Ñ Ð½Ð° вÑеки:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "steps"
-msgstr ""
+msgstr "Ñтъпки"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Offset:"
-msgstr "ИзмеÑтване на въртенето:"
+msgstr "ОтмеÑтване при завъртане:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Step:"
msgstr "Стъпка при завъртане:"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Scale Step:"
-msgstr "Мащаб:"
+msgstr "Стъпка на мащабиране:"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Move Vertical Guide"
-msgstr "ПемеÑти вертикална помощна линиÑ"
+msgstr "ПремеÑтване на Ð²ÐµÑ€Ñ‚Ð¸ÐºÐ°Ð»Ð½Ð¸Ñ Ð²Ð¾Ð´Ð°Ñ‡"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Vertical Guide"
-msgstr "Създай нова вертикална помощна линиÑ"
+msgstr "Създаване на нов вертикален водач"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Remove Vertical Guide"
-msgstr "Премахни вертикална помощна линиÑ"
+msgstr "Премахване на Ð²ÐµÑ€Ñ‚Ð¸ÐºÐ°Ð»Ð½Ð¸Ñ Ð²Ð¾Ð´Ð°Ñ‡"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Move Horizontal Guide"
-msgstr "ПремеÑти хоризонтална помощна линиÑ"
+msgstr "ПремеÑтване на Ñ…Ð¾Ñ€Ð¸Ð·Ð¾Ð½Ñ‚Ð°Ð»Ð½Ð¸Ñ Ð²Ð¾Ð´Ð°Ñ‡"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Horizontal Guide"
-msgstr "Създай нова хоризонтална помощна линиÑ"
+msgstr "Създаване на нов хоризонтален водач"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Remove Horizontal Guide"
-msgstr "Премахни хоризонтална помощна линиÑ"
+msgstr "Премахване на Ñ…Ð¾Ñ€Ð¸Ð·Ð¾Ð½Ñ‚Ð°Ð»Ð½Ð¸Ñ Ð²Ð¾Ð´Ð°Ñ‡"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Horizontal and Vertical Guides"
-msgstr "Създай нова хоризонтална и вертикална помощна линиÑ"
+msgstr "Създаване на нов хоризонтален и вертикален водач"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Set CanvasItem \"%s\" Pivot Offset to (%d, %d)"
@@ -5149,44 +5166,36 @@ msgid ""
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Top Left"
-msgstr "Режим на Завъртане"
+msgstr "Горе влÑво"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Top Right"
-msgstr "Завъртане на Полигон"
+msgstr "Горе вдÑÑно"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Bottom Right"
-msgstr "Завъртане на Полигон"
+msgstr "Долу вдÑÑно"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Bottom Left"
-msgstr "Режим на Завъртане"
+msgstr "Долу влÑво"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Center Left"
-msgstr "Центрирай върху СелекциÑта"
+msgstr "По Ñредата влÑво"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Center Top"
-msgstr "Центрирай върху СелекциÑта"
+msgstr "По Ñредата горе"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Center Right"
-msgstr "Завъртане на Полигон"
+msgstr "По Ñредата вдÑÑно"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Center Bottom"
-msgstr "Центрирай върху СелекциÑта"
+msgstr "По Ñредата долу"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Center"
@@ -5252,9 +5261,8 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Lock Selected"
-msgstr "Изберете метод"
+msgstr "Заключване на избраното"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5263,29 +5271,25 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Group Selected"
-msgstr "Ðова Ñцена"
+msgstr "Групиране на избраното"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Ungroup Selected"
-msgstr "Ðова Ñцена"
+msgstr "Разгрупиране на избраното"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Paste Pose"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Clear Guides"
-msgstr "Възпроизвеждане на Ñцена по избор"
+msgstr "ИзчиÑтване на водачите"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Create Custom Bone(s) from Node(s)"
-msgstr "Възпроизвеждане на Ñцена по избор"
+msgstr "Създаване на перÑонализирана(и) коÑÑ‚(и) от възела(възлите)"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Clear Bones"
@@ -5480,7 +5484,7 @@ msgstr "Преглед"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Always Show Grid"
-msgstr ""
+msgstr "Винаги да Ñе показва решетката"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Helpers"
@@ -5488,11 +5492,11 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Rulers"
-msgstr ""
+msgstr "Показване на линиите"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Guides"
-msgstr ""
+msgstr "Показване на водачите"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Show Origin"
@@ -5687,12 +5691,12 @@ msgstr ""
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emission Points From Mesh"
-msgstr ""
+msgstr "Създаване на излъчващи точки от полигонната мрежа"
#: editor/plugins/cpu_particles_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emission Points From Node"
-msgstr ""
+msgstr "Създаване на излъчващи точки от възела"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Flat 0"
@@ -5789,7 +5793,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh is empty!"
-msgstr ""
+msgstr "Полигонната мрежа е празна!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
#, fuzzy
@@ -5834,19 +5838,21 @@ msgstr "Създаване на нÑколко изпъкнали форми"
#: 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."
-msgstr ""
+msgstr "Съдържащата Ñе полигонна мрежа не е от тип ArrayMesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "UV Unwrap failed, mesh may not be manifold?"
msgstr ""
+"Разгъването на UV беше неуÑпешно. Възможно ли е полигонната мрежа да Ñе "
+"ÑÑŠÑтои от повече от една форма?"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "No mesh to debug."
-msgstr ""
+msgstr "ÐÑма полигонна мрежа за дебъгване."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Model has no UV in this layer"
@@ -5854,15 +5860,15 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "MeshInstance lacks a Mesh!"
-msgstr ""
+msgstr "Ð’ MeshInstance нÑма полигонна мрежа!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh has not surface to create outlines from!"
-msgstr ""
+msgstr "Полигонната мрежа нÑма повърхноÑÑ‚, от коÑто да Ñе Ñъздадат контури!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!"
-msgstr ""
+msgstr "ПримитивниÑÑ‚ тип на полигонната мрежа не е PRIMITIVE_TRIANGLES!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Could not create outline!"
@@ -5874,7 +5880,7 @@ msgstr "Създаване на контур"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh"
-msgstr ""
+msgstr "Полигонна мрежа"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Body"
@@ -5921,7 +5927,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh..."
-msgstr ""
+msgstr "Създаване на контурна полигонна мрежа…"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -5930,6 +5936,10 @@ msgid ""
"This can be used instead of the SpatialMaterial Grow property when using "
"that property isn't possible."
msgstr ""
+"Създава Ñтатична полигонна мрежа за контура. Ðормалите на контурната "
+"полигонна мрежа ще бъдат автоматично обърнати.\n"
+"Това може да Ñе използва вмеÑто ÑвойÑтвото Grow на SpatialMaterial, когато "
+"това ÑвойÑтво не може да Ñе променÑ."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "View UV1"
@@ -5945,7 +5955,7 @@ msgstr ""
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh"
-msgstr ""
+msgstr "Създаване на контурна полигонна мрежа"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Outline Size:"
@@ -5968,9 +5978,8 @@ msgstr ""
"%s"
#: editor/plugins/mesh_library_editor_plugin.cpp
-#, fuzzy
msgid "Mesh Library"
-msgstr "ИзнаÑÑне на библиотеката"
+msgstr "Библиотека Ñ Ð¿Ð¾Ð»Ð¸Ð³Ð¾Ð½Ð½Ð¸ мрежи"
#: editor/plugins/mesh_library_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -5992,22 +6001,27 @@ msgstr "ОбновÑване от Ñцена"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
msgstr ""
+"ÐÑма поÑочен източник за полигонна мрежа (и във възела нÑма MultiMesh)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and MultiMesh contains no Mesh)."
msgstr ""
+"ÐÑма поÑочен източник за полигонна мрежа (и MultiMesh не Ñъдържа полигонна "
+"мрежа)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (invalid path)."
-msgstr ""
+msgstr "Източникът за полигонна мрежа е неправилен (грешен път)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (not a MeshInstance)."
-msgstr ""
+msgstr "Източникът за полигонна мрежа е неправилен (не е MeshInstance)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (contains no Mesh resource)."
msgstr ""
+"Източникът за полигонна мрежа е неправилен (не Ñъдържа реÑурÑ, който е "
+"полигонна мрежа)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No surface source specified."
@@ -6027,7 +6041,7 @@ msgstr ""
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Source Mesh:"
-msgstr ""
+msgstr "Изберете източник за полигонна мрежа:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Target Surface:"
@@ -6047,7 +6061,7 @@ msgstr ""
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Source Mesh:"
-msgstr ""
+msgstr "Източник за полигонна мрежа:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "X-Axis"
@@ -6063,7 +6077,7 @@ msgstr ""
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh Up Axis:"
-msgstr ""
+msgstr "ÐžÑ Ñочеща нагоре за полигонната мрежа:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Rotation:"
@@ -6104,9 +6118,8 @@ msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Превръщане в Polygon2D"
+msgstr "Преобразуване в CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -6118,9 +6131,8 @@ msgid "The geometry's faces don't contain any area."
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "The geometry doesn't contain any faces."
-msgstr "Възелът не Ñъдържа Ð³ÐµÐ¾Ð¼ÐµÑ‚Ñ€Ð¸Ñ (лица)."
+msgstr "ГеометриÑта не Ñъдържа Ñтрани."
#: editor/plugins/particles_editor_plugin.cpp
msgid "\"%s\" doesn't inherit from Spatial."
@@ -6131,9 +6143,8 @@ msgid "\"%s\" doesn't contain geometry."
msgstr "„%s“ не Ñъдържа геометриÑ."
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "\"%s\" doesn't contain face geometry."
-msgstr "Възелът не Ñъдържа геометриÑ."
+msgstr "„%s“ не Ñъдържа Ð³ÐµÐ¾Ð¼ÐµÑ‚Ñ€Ð¸Ñ ÑÑŠÑ Ñтрани."
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emitter"
@@ -6141,15 +6152,15 @@ msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Points:"
-msgstr ""
+msgstr "Излъчващи точки:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points"
-msgstr ""
+msgstr "Точки на повърхноÑтта"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points+Normal (Directed)"
-msgstr ""
+msgstr "Точки на повърхноÑтта + нормали (наÑочени)"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Volume"
@@ -6157,7 +6168,7 @@ msgstr "Обем"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Source: "
-msgstr ""
+msgstr "Източник на излъчването: "
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
@@ -6805,16 +6816,6 @@ msgstr ""
"Следните файлове Ñа по-нови на диÑка.\n"
"Кое дейÑтвие трÑбва да Ñе предприеме?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Презареждане"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "ПрезапиÑване"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Дебъгер"
@@ -7131,6 +7132,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -7303,9 +7308,8 @@ msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Freelook Slow Modifier"
-msgstr "Свободен Изглед Отпред"
+msgstr "Модификатор за забавÑне на ÑÐ²Ð¾Ð±Ð¾Ð´Ð½Ð¸Ñ Ð¸Ð·Ð³Ð»ÐµÐ´"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
@@ -7557,15 +7561,15 @@ msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't replace by mesh."
-msgstr ""
+msgstr "Ðеправилна геометриÑ. Ðе може да Ñе замени Ñ Ð¿Ð¾Ð»Ð¸Ð³Ð¾Ð½Ð½Ð° мрежа."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Convert to Mesh2D"
-msgstr ""
+msgstr "Преобразуване в Mesh2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create polygon."
-msgstr ""
+msgstr "Ðеправилна геометриÑ, не може да Ñе Ñъздаде полигон."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Convert to Polygon2D"
@@ -7573,7 +7577,7 @@ msgstr "Превръщане в Polygon2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create collision polygon."
-msgstr ""
+msgstr "Ðеправилна геометриÑ, не може да Ñе Ñъздаде полигон за колизии."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create CollisionPolygon2D Sibling"
@@ -7585,7 +7589,7 @@ msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create LightOccluder2D Sibling"
-msgstr ""
+msgstr "Създаване на ÑÑŠÑеден LightOccluder2D"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Sprite"
@@ -7593,15 +7597,15 @@ msgstr ""
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Simplification: "
-msgstr ""
+msgstr "ОпроÑÑ‚Ñване: "
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Shrink (Pixels): "
-msgstr ""
+msgstr "СмалÑване (пикÑели): "
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Grow (Pixels): "
-msgstr ""
+msgstr "УголемÑване (пикÑели): "
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Update Preview"
@@ -7617,11 +7621,11 @@ msgstr "ÐÑма избрани кадри"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add %d Frame(s)"
-msgstr ""
+msgstr "ДобавÑне на %d кадър/кадри"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Frame"
-msgstr ""
+msgstr "ДобавÑне на кадър"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Unable to load images"
@@ -7629,27 +7633,27 @@ 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 "Resource clipboard is empty or not a texture!"
-msgstr ""
+msgstr "Буферът за обмен на реÑурÑи е празен или не Ñъдържа текÑтура!"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Paste Frame"
-msgstr ""
+msgstr "ПоÑтавÑне на кадър"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Empty"
-msgstr ""
+msgstr "ДобавÑне на празен"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
-msgstr ""
+msgstr "ПромÑна на ÑкороÑтта (кадри/Ñек) на анимациÑта"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "(empty)"
-msgstr ""
+msgstr "(празно)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Move Frame"
@@ -7669,7 +7673,7 @@ msgstr "СкороÑÑ‚:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Loop"
-msgstr ""
+msgstr "ПовтарÑне"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Animation Frames:"
@@ -7685,11 +7689,11 @@ msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
-msgstr ""
+msgstr "Вмъкване на празен (преди)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (After)"
-msgstr ""
+msgstr "Вмъкване на празен (Ñлед)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Move (Before)"
@@ -7697,7 +7701,7 @@ msgstr "ПремеÑтване (преди)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Move (After)"
-msgstr ""
+msgstr "ПремеÑтване (Ñлед)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Select Frames"
@@ -7705,11 +7709,11 @@ msgstr "Избиране на кадри"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Horizontal:"
-msgstr ""
+msgstr "Хоризонтала:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Vertical:"
-msgstr ""
+msgstr "Вертикала:"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Select/Clear All Frames"
@@ -7729,57 +7733,56 @@ msgstr ""
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Set Margin"
-msgstr ""
+msgstr "Задаване на отÑтъп"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
-msgstr ""
+msgstr "Режим на прилепване:"
#: editor/plugins/texture_region_editor_plugin.cpp
#: scene/resources/visual_shader.cpp
msgid "None"
-msgstr ""
+msgstr "ÐÑма"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Pixel Snap"
-msgstr ""
+msgstr "Прилепване към пикÑелите"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Grid Snap"
-msgstr ""
+msgstr "Прилепване към решетката"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Auto Slice"
-msgstr ""
+msgstr "Ðвтоматично отрÑзване"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Offset:"
-msgstr ""
+msgstr "ОтмеÑтване:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Step:"
-msgstr ""
+msgstr "Стъпка:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Sep.:"
-msgstr ""
+msgstr "Разделител:"
#: editor/plugins/texture_region_editor_plugin.cpp
-#, fuzzy
msgid "TextureRegion"
-msgstr "Двуизмерна текÑтура"
+msgstr "ТекÑтурна облаÑÑ‚"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add All Items"
-msgstr ""
+msgstr "ДобавÑне на вÑички елементи"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add All"
-msgstr ""
+msgstr "ДобавÑне на вÑичко"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
-msgstr ""
+msgstr "Премахване на вÑички елементи"
#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
msgid "Remove All"
@@ -7791,7 +7794,7 @@ msgstr "Редактиране на темата"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme editing menu."
-msgstr ""
+msgstr "Меню за редактиране на темата."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -7823,7 +7826,7 @@ msgstr "Заключен бутон"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Item"
-msgstr ""
+msgstr "Елемент"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Disabled Item"
@@ -7831,11 +7834,11 @@ msgstr "Заключен елемент"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Check Item"
-msgstr ""
+msgstr "Елемент за отметка"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Checked Item"
-msgstr ""
+msgstr "Отметнат елемент"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Radio Item"
@@ -7847,27 +7850,27 @@ msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Named Sep."
-msgstr ""
+msgstr "Именуван разд."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Submenu"
-msgstr ""
+msgstr "Подменю"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Subitem 1"
-msgstr ""
+msgstr "Поделемент 1"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Subitem 2"
-msgstr ""
+msgstr "Поделемент 2"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Has"
-msgstr ""
+msgstr "Има"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Many"
-msgstr ""
+msgstr "Много"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Disabled LineEdit"
@@ -7875,15 +7878,15 @@ msgstr "Заключено текÑтово поле"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Tab 1"
-msgstr ""
+msgstr "Раздел 1"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Tab 2"
-msgstr ""
+msgstr "Раздел 2"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Tab 3"
-msgstr ""
+msgstr "Раздел 3"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Editable Item"
@@ -7891,32 +7894,32 @@ msgstr "Редактируем елемент"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Subtree"
-msgstr ""
+msgstr "Поддърво"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Has,Many,Options"
-msgstr ""
+msgstr "Има,Много,Опции"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Data Type:"
-msgstr ""
+msgstr "Тип на данните:"
#: editor/plugins/theme_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Icon"
-msgstr ""
+msgstr "Иконка"
#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp
msgid "Style"
-msgstr ""
+msgstr "Стил"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Font"
-msgstr ""
+msgstr "Шрифт"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Color"
-msgstr ""
+msgstr "Цват"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme File"
@@ -7924,11 +7927,11 @@ msgstr "Файл Ñ Ñ‚ÐµÐ¼Ð°"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase Selection"
-msgstr ""
+msgstr "Изтриване на избраното"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Fix Invalid Tiles"
-msgstr ""
+msgstr "Поправка на неправилните плочки"
#: editor/plugins/tile_map_editor_plugin.cpp
#: modules/gridmap/grid_map_editor_plugin.cpp
@@ -8024,9 +8027,8 @@ msgid "Add Texture(s) to TileSet."
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"
@@ -8041,9 +8043,8 @@ msgid "New Single Tile"
msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "New Autotile"
-msgstr "Ðов TextFile"
+msgstr "Ðова авт. плочка"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "New Atlas"
@@ -8278,9 +8279,8 @@ 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
msgid "Edit Navigation Polygon"
@@ -8311,9 +8311,8 @@ 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
msgid "Remove Navigation Polygon"
@@ -9671,6 +9670,11 @@ msgid "Projects"
msgstr "Проекти"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Зареждане…"
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
@@ -10649,9 +10653,8 @@ msgid "Open Script / Choose Location"
msgstr ""
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Open Script"
-msgstr "Ðова Ñцена"
+msgstr "ОтварÑне на Ñкрипта"
#: editor/script_create_dialog.cpp
msgid "File exists, it will be reused."
@@ -10662,9 +10665,8 @@ msgid "Invalid path."
msgstr "Ðеправилен път."
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid class name."
-msgstr "невалидно име на Група."
+msgstr "Ðеправилно име на клаÑ."
#: editor/script_create_dialog.cpp
msgid "Invalid inherited parent name or path."
@@ -10691,9 +10693,8 @@ msgid "Will load an existing script file."
msgstr ""
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script file already exists."
-msgstr "Група Ñ Ñ‚Ð¾Ð²Ð° име вече ÑъщеÑтвува."
+msgstr "СкриптовиÑÑ‚ файл вече ÑъщеÑтвува."
#: editor/script_create_dialog.cpp
msgid ""
@@ -10702,9 +10703,8 @@ msgid ""
msgstr ""
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Class Name:"
-msgstr "КлаÑ:"
+msgstr "Име на клаÑа:"
#: editor/script_create_dialog.cpp
msgid "Template:"
@@ -10715,9 +10715,8 @@ msgid "Built-in Script:"
msgstr "Вграден Ñкрипт:"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Attach Node Script"
-msgstr "Ðова Ñцена"
+msgstr "Закачане на Ñкрипт"
#: editor/script_editor_debugger.cpp
msgid "Remote "
@@ -10796,9 +10795,8 @@ msgid "Profiler"
msgstr ""
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Network Profiler"
-msgstr "ИзнаÑÑне на проекта"
+msgstr "Профилиране на мрежата"
#: editor/script_editor_debugger.cpp
msgid "Monitor"
@@ -10825,9 +10823,8 @@ msgid "Total:"
msgstr ""
#: editor/script_editor_debugger.cpp
-#, fuzzy
msgid "Export list to a CSV file"
-msgstr "ИзнаÑÑне на профила"
+msgstr "ИзнаÑÑне на ÑпиÑъка като файл CSV"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
@@ -10998,9 +10995,8 @@ 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 "Enabled GDNative Singleton"
@@ -11032,66 +11028,59 @@ msgid "Not a script with an instance"
msgstr "Скриптът нÑма инÑтанциÑ"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Not based on a script"
-msgstr "Обектът не е базиран на Ñкрипт"
+msgstr "Ðе Ñе базира на Ñкрипт"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Not based on a resource file"
-msgstr "Обектът не е базиран на реÑурÑен файл"
+msgstr "Ðе Ñе базира на реÑурÑен файл"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Invalid instance dictionary format (missing @path)"
-msgstr "Ðевалиден формат на инÑтанциÑта в речника (липÑва @path)"
+msgstr "Ðеправилен формат в речника на инÑтанциите (липÑва @path)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (can't load script at @path)"
msgstr ""
-"Ðеправилен формат на инÑтанциÑта в речника (Ñкриптът в @path не може да бъде "
+"Ðеправилен формат в речника на инÑтанциите (Ñкриптът в @path не може да бъде "
"зареден)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (invalid script at @path)"
msgstr ""
-"Ðеправилен формат на инÑтанциÑта в речника (Ñкриптът в @path е невалиден)"
+"Ðеправилен формат в речника на инÑтанциите (Ñкриптът в @path е невалиден)"
#: modules/gdscript/gdscript_functions.cpp
-#, fuzzy
msgid "Invalid instance dictionary (invalid subclasses)"
-msgstr "Ðевалиден формат на инÑтанциÑта в речника (невалиден подклаÑ)"
+msgstr "Ðеправилен формат в речника на инÑтанциите (невалиден подклаÑ)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Object can't provide a length."
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Next Plane"
-msgstr "Следващ подпрозорец"
+msgstr "Следваща равнина"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Plane"
-msgstr "Предишен подпрозорец"
+msgstr "Предходна равнина"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Plane:"
-msgstr ""
+msgstr "Равнина:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Next Floor"
-msgstr ""
+msgstr "Следващ под"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Previous Floor"
-msgstr "Предишен подпрозорец"
+msgstr "Предходен под"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Floor:"
-msgstr ""
+msgstr "Под:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "GridMap Delete Selection"
@@ -11174,37 +11163,34 @@ msgid "Cursor Clear Rotation"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Paste Selects"
-msgstr "ÐаÑтройки"
+msgstr "ПоÑтавÑне на избраното"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Clear Selection"
-msgstr "Ðова Ñцена"
+msgstr "ИзчиÑтване на избраното"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Fill Selection"
-msgstr "Ðова Ñцена"
+msgstr "Запълване на избраното"
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "GridMap Settings"
-msgstr "ÐаÑтройки"
+msgstr "ÐаÑтройки на GridMap"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Pick Distance:"
msgstr ""
#: modules/gridmap/grid_map_editor_plugin.cpp
-#, fuzzy
msgid "Filter meshes"
-msgstr "ПоÑтавÑне на възелите"
+msgstr "Филтриране на полигонните мрежи"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
msgstr ""
+"Задайте реÑÑƒÑ€Ñ Ð¾Ñ‚ тип MeshLibrary в този GridMap, за да можете да използвате "
+"полигонните му мрежи."
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
@@ -11219,9 +11205,8 @@ msgid "Generate buffers"
msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "ÐаправлениÑ"
+msgstr "Директно оÑветÑване"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Indirect lighting"
@@ -11246,11 +11231,11 @@ msgstr ""
#: modules/recast/navigation_mesh_editor_plugin.cpp
msgid "Bake NavMesh"
-msgstr ""
+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..."
@@ -11286,15 +11271,15 @@ msgstr ""
#: modules/recast/navigation_mesh_generator.cpp
msgid "Creating polymesh..."
-msgstr ""
+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..."
@@ -11367,86 +11352,80 @@ msgid "Override an existing built-in function."
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create a new function."
-msgstr "Създай нови възли."
+msgstr "Създаване на нова функциÑ."
#: modules/visual_script/visual_script_editor.cpp
msgid "Variables:"
-msgstr ""
+msgstr "Променливи:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create a new variable."
-msgstr "Създай нови възли."
+msgstr "Създаване на нова променлива."
#: modules/visual_script/visual_script_editor.cpp
msgid "Signals:"
-msgstr ""
+msgstr "Сигнали:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create a new signal."
-msgstr "Създай нов полигон от нулата."
+msgstr "Създаване на нов Ñигнал."
#: modules/visual_script/visual_script_editor.cpp
msgid "Name is not a valid identifier:"
-msgstr ""
+msgstr "Името не е правилен идентификатор:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Name already in use by another func/var/signal:"
-msgstr ""
+msgstr "Името вече е заето от друга функциÑ/променлива/Ñигнал:"
#: modules/visual_script/visual_script_editor.cpp
msgid "Rename Function"
-msgstr ""
+msgstr "Преименуване на функциÑта"
#: modules/visual_script/visual_script_editor.cpp
msgid "Rename Variable"
-msgstr ""
+msgstr "Преименуване на променливата"
#: modules/visual_script/visual_script_editor.cpp
msgid "Rename Signal"
-msgstr ""
+msgstr "Преименуване на Ñигнала"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Function"
-msgstr ""
+msgstr "ДобавÑне на функциÑ"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Delete input port"
-msgstr "ЗатварÑне на вÑичко"
+msgstr "Изтриване на входÑÑ‰Ð¸Ñ Ð¿Ð¾Ñ€Ñ‚"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Variable"
-msgstr ""
+msgstr "ДобавÑне на променлива"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Signal"
-msgstr ""
+msgstr "ДобавÑне на Ñигнал"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Remove Input Port"
-msgstr "ЗатварÑне на вÑичко"
+msgstr "Премахване на входÑÑ‰Ð¸Ñ Ð¿Ð¾Ñ€Ñ‚"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Remove Output Port"
-msgstr "ВнаÑÑне на текÑтури"
+msgstr "Премахване на изходÑÑ‰Ð¸Ñ Ð¿Ð¾Ñ€Ñ‚"
#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
-msgstr ""
+msgstr "ПромÑна на израза"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Nodes"
-msgstr ""
+msgstr "Премахване на възлите Ñ VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Duplicate VisualScript Nodes"
-msgstr ""
+msgstr "Дублиране на възлите Ñ VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature."
@@ -11499,23 +11478,20 @@ msgid "Change Base Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Move Node(s)"
-msgstr "ПоÑтавÑне на възелите"
+msgstr "ПремеÑтване на възела(възлите)"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove VisualScript Node"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Connect Nodes"
-msgstr "ИзрÑзване на възелите"
+msgstr "Свързване на възлите"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Disconnect Nodes"
-msgstr "ИзрÑзване на възелите"
+msgstr "Разкачане на възлите"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -11536,9 +11512,8 @@ msgid "Change Input Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Resize Comment"
-msgstr "Вкарай Коментар"
+msgstr "ПреоразмерÑване на коментара"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't copy the function node."
@@ -11549,9 +11524,8 @@ msgid "Clipboard is empty!"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Paste VisualScript Nodes"
-msgstr "ПоÑтавÑне на възелите"
+msgstr "ПоÑтавÑне на възлите Ñ VisualScript"
#: modules/visual_script/visual_script_editor.cpp
msgid "Can't create function with a function node."
@@ -11570,9 +11544,8 @@ msgid "Try to only have one sequence input in selection."
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Create Function"
-msgstr "Създай Очертание"
+msgstr "Създаване на функциÑ"
#: modules/visual_script/visual_script_editor.cpp
msgid "Remove Function"
@@ -11607,9 +11580,8 @@ msgid "Change Base Type:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Add Nodes..."
-msgstr "Добави Възел..."
+msgstr "ДобавÑне на възли…"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Function..."
@@ -11640,9 +11612,8 @@ msgid "Cut Nodes"
msgstr "ИзрÑзване на възлите"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Make Function"
-msgstr "Отиди на Ред"
+msgstr "Преобразуване във функциÑ"
#: modules/visual_script/visual_script_editor.cpp
msgid "Refresh Graph"
@@ -11707,9 +11678,8 @@ msgid ""
msgstr ""
#: modules/visual_script/visual_script_property_selector.cpp
-#, fuzzy
msgid "Search VisualScript"
-msgstr "ПоÑтавÑне на възелите"
+msgstr "ТърÑене във VisualScript"
#: modules/visual_script/visual_script_property_selector.cpp
msgid "Get %s"
@@ -11930,9 +11900,8 @@ msgid "Could not read boot splash image file:"
msgstr "Ðе може да Ñе прочете файл Ñ Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ðµ при Ñтартиране:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Using default boot splash image."
-msgstr "ÐеуÑпешно Ñъздаване на папка."
+msgstr "Използва Ñе Ñтандартното изображение при Ñтартиране."
#: platform/uwp/export/export.cpp
msgid "Invalid package short name."
@@ -11948,16 +11917,15 @@ msgstr "Ðеправилно име за показване на издателÑ
#: platform/uwp/export/export.cpp
msgid "Invalid product GUID."
-msgstr "Ðевалиден продуктов GUID."
+msgstr "Ðеправилен продуктов GUID."
#: platform/uwp/export/export.cpp
msgid "Invalid publisher GUID."
-msgstr ""
+msgstr "Ðеправилен GUID на издател."
#: platform/uwp/export/export.cpp
-#, fuzzy
msgid "Invalid background color."
-msgstr "невалидно име на Група."
+msgstr "Ðеправилен фонов цвÑÑ‚."
#: platform/uwp/export/export.cpp
msgid "Invalid Store Logo image dimensions (should be 50x50)."
@@ -11988,22 +11956,21 @@ msgid "Invalid splash screen image dimensions (should be 620x300)."
msgstr ""
#: scene/2d/animated_sprite.cpp
-#, fuzzy
msgid ""
"A SpriteFrames resource must be created or set in the \"Frames\" property in "
"order for AnimatedSprite to display frames."
msgstr ""
-"За да може AnimatedSprite да показва кадри, първо трÑбва да му Ñе даде "
-"SpriteFrames реÑÑƒÑ€Ñ Ð² парамертъра 'Frames'."
+"За да може AnimatedSprite да показва кадри, първо трÑбва Ñе Ñъздаде или "
+"зададе реÑÑƒÑ€Ñ Ð¾Ñ‚ тип SpriteFrames в ÑвойÑтвото „Frames“."
#: scene/2d/canvas_modulate.cpp
-#, fuzzy
msgid ""
"Only one visible CanvasModulate is allowed per scene (or set of instanced "
"scenes). The first created one will work, while the rest will be ignored."
msgstr ""
-"Може да има Ñамо един видим CanvasModulate на Ñцене (или нÑколко "
-"инÑтанцирани Ñцени). Само първиÑÑ‚ ще работи, а вÑички оÑтанали - игнорирани."
+"Може да има Ñамо един видим CanvasModulate на Ñцена (или нÑколко "
+"инÑтанцирани Ñцени). Само първиÑÑ‚ ще работи, а вÑички оÑтанали ще бъдат "
+"пренебрегнати."
#: scene/2d/collision_object_2d.cpp
msgid ""
@@ -12079,13 +12046,12 @@ msgid "Node A and Node B must be different PhysicsBody2Ds"
msgstr ""
#: scene/2d/light_2d.cpp
-#, fuzzy
msgid ""
"A texture with the shape of the light must be supplied to the \"Texture\" "
"property."
msgstr ""
-"ТеÑктура Ñ Ð½ÑƒÐ¶Ð½Ð°Ñ‚Ð° форма на Ñветлината трÑбва да бъде дадена в параметъра "
-"'texture'."
+"Ð’ ÑвойÑтвото „Texture“ трÑбва да бъде зададена текÑтура Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð° на "
+"Ñветлината."
#: scene/2d/light_occluder_2d.cpp
msgid ""
@@ -12095,9 +12061,10 @@ msgstr ""
"работи прикриването."
#: scene/2d/light_occluder_2d.cpp
-#, fuzzy
msgid "The occluder polygon for this occluder is empty. Please draw a polygon."
-msgstr "ЗатъмнÑващиÑÑ‚ многоъгълник е празен. МолÑ, нариÑувайте един."
+msgstr ""
+"ПрикриващиÑÑ‚ полигон за този прикриващ обект е празен. МолÑ, нариÑувайте "
+"полигон."
#: scene/2d/navigation_polygon.cpp
msgid ""
@@ -12169,15 +12136,15 @@ msgid ""
msgstr ""
#: scene/2d/tile_map.cpp
-#, fuzzy
msgid ""
"TileMap with Use Parent on needs a parent CollisionObject2D to give shapes "
"to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, "
"KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionShape2D Ñлужи Ñамо за да даде форма за колизии на "
-"CollisionObject2D. МолÑ, използвайте го Ñамо като наÑледник на Area2D, "
-"StaticBody2D, RigidBody2D, KinematicBody2D, и т.н. за да им дадете форма."
+"Възел от типа TileMap Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¾ ÑвойÑтво „Use Parent“ трÑбва да има "
+"родителÑки елемент от тип CollisionShape2D, на който да придаде форма. МолÑ, "
+"използвайте го Ñамо като дъщерен елемент на Area2D, StaticBody2D, "
+"RigidBody2D, KinematicBody2D и т.н., за да им придадете форма."
#: scene/2d/visibility_notifier_2d.cpp
msgid ""
@@ -12215,7 +12182,7 @@ msgstr ""
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "ТърÑене на полигонни мрежи и Ñветлини"
#: scene/3d/baked_lightmap.cpp
msgid "Preparing geometry (%d/%d)"
@@ -12234,9 +12201,8 @@ msgid "Saving lightmaps"
msgstr ""
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Done"
-msgstr "Готово!"
+msgstr "Готово"
#: scene/3d/collision_object.cpp
msgid ""
@@ -12264,13 +12230,12 @@ msgid ""
msgstr ""
#: scene/3d/collision_shape.cpp
-#, fuzzy
msgid ""
"A shape must be provided for CollisionShape to function. Please create a "
"shape resource for it."
msgstr ""
"За да работи CollisionShape2D, е нужно да му Ñе даде форма. МолÑ, Ñъздайте "
-"му Shape2D реÑурÑ."
+"му реÑурÑ-форма."
#: scene/3d/collision_shape.cpp
msgid ""
@@ -12285,7 +12250,7 @@ msgstr ""
#: scene/3d/cpu_particles.cpp
msgid "Nothing is visible because no mesh has been assigned."
-msgstr ""
+msgstr "Ðе Ñе вижда нищо, той като нÑма зададена полигонна мрежа."
#: scene/3d/cpu_particles.cpp
msgid ""
@@ -12295,7 +12260,7 @@ msgstr ""
#: scene/3d/gi_probe.cpp
msgid "Plotting Meshes"
-msgstr ""
+msgstr "ПоÑтроÑване на полигонните мрежи"
#: scene/3d/gi_probe.cpp
msgid "Finishing Plot"
@@ -12319,12 +12284,16 @@ msgstr ""
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
+"ТрÑбва да Ñе зададе или Ñъздаде реÑÑƒÑ€Ñ Ð¾Ñ‚ тип NavigationMesh, за може да "
+"работи този възел."
#: scene/3d/navigation_mesh.cpp
msgid ""
"NavigationMeshInstance must be a child or grandchild to a Navigation node. "
"It only provides navigation data."
msgstr ""
+"NavigationMeshInstance трÑбва да бъде дъщерен или под-дъщерен на възел от "
+"тип Navigation. Той Ñамо предоÑÑ‚Ð°Ð²Ñ Ð´Ð°Ð½Ð½Ð¸Ñ‚Ðµ за навигирането."
#: scene/3d/particles.cpp
msgid ""
@@ -12337,6 +12306,8 @@ msgstr ""
msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
+"Ðе Ñе вижда нищо, тъй като полигонните мрежи не Ñа били Ñвързани към Ñтъпки "
+"на изчертаване."
#: scene/3d/particles.cpp
msgid ""
@@ -12345,9 +12316,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 ""
@@ -12383,17 +12353,16 @@ msgid "Node A and Node B must be different PhysicsBodies"
msgstr ""
#: scene/3d/remote_transform.cpp
-#, fuzzy
msgid ""
"The \"Remote Path\" property must point to a valid Spatial or Spatial-"
"derived node to work."
msgstr ""
-"Параметърът 'Path' трÑбва да Ñочи към дейÑтвителен възел Particles2D, за да "
-"работи."
+"СвойÑтвото „Remote Path“ трÑбва да Ñочи към дейÑтвителен възел от тип "
+"Spatial или негов наÑледник, за да работи."
#: scene/3d/soft_body.cpp
msgid "This body will be ignored until you set a mesh."
-msgstr ""
+msgstr "Това Ñ‚Ñло ще бъде игнорирано, докато не зададете полигонна мрежа."
#: scene/3d/soft_body.cpp
msgid ""
@@ -12403,13 +12372,12 @@ msgid ""
msgstr ""
#: scene/3d/sprite_3d.cpp
-#, fuzzy
msgid ""
"A SpriteFrames resource must be created or set in the \"Frames\" property in "
"order for AnimatedSprite3D to display frames."
msgstr ""
-"За да може AnimatedSprite да показва кадри, първо трÑбва да му Ñе даде "
-"SpriteFrames реÑÑƒÑ€Ñ Ð² парамертъра 'Frames'."
+"За да може AnimatedSprite3D да показва кадри, първо трÑбва Ñе Ñъздаде или "
+"зададе реÑÑƒÑ€Ñ Ð¾Ñ‚ тип SpriteFrames в ÑвойÑтвото „Frames“."
#: scene/3d/vehicle_body.cpp
msgid ""
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index 4482328985..03e3d0388a 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -8,14 +8,14 @@
# Tawhid H. <Tawhidk757@yahoo.com>, 2019.
# Hasibul Hasan <hasibeng78@gmail.com>, 2019.
# Oymate <dhruboadittya96@gmail.com>, 2020.
-# Mokarrom Hossain <mhb2016.bzs@gmail.com>, 2020.
+# Mokarrom Hossain <mhb2016.bzs@gmail.com>, 2020, 2021.
# Sagen Soren <sagensoren03@gmail.com>, 2020.
# Hasibul Hasan <d1hasib@yahoo.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-27 02:25+0000\n"
+"PO-Revision-Date: 2021-02-15 10:51+0000\n"
"Last-Translator: Mokarrom Hossain <mhb2016.bzs@gmail.com>\n"
"Language-Team: Bengali <https://hosted.weblate.org/projects/godot-engine/"
"godot/bn/>\n"
@@ -24,7 +24,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -268,7 +268,6 @@ msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
msgstr "লà§à¦ª Wrap মোড (লà§à¦ª দিয়ে শà§à¦°à§ দিয়ে ইনà§à¦Ÿà¦¾à¦°à¦ªà§‹à¦²à§‡à¦Ÿ শেষ)"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Remove this track."
msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ টà§à¦°à§à¦¯à¦¾à¦•/পথ অপসারণ করà§à¦¨à¥¤"
@@ -440,28 +439,24 @@ 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 "রà§à¦ªà¦¾à¦¨à§à¦¤à¦°à§‡à¦° ধরণ"
+msgstr "টà§à¦°à¦¾à¦¨à§à¦¸à¦«à¦°à§à¦® টà§à¦°à§à¦¯à¦¾à¦• কী যà§à¦•à§à¦¤ করà§à¦¨"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Track Key"
-msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ (Anim) টà§à¦°à§à¦¯à¦¾à¦• যোগ করà§à¦¨"
+msgstr "টà§à¦°à§à¦¯à¦¾à¦• কী যà§à¦•à§à¦¤ করà§à¦¨"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a method key."
-msgstr ""
+msgstr "টà§à¦°à§à¦¯à¦¾à¦• পাথটি অবৈধ, সà§à¦¤à¦°à¦¾à¦‚ কোনও পদà§à¦§à¦¤à¦¿ key যà§à¦•à§à¦¤ করতে পারে না।"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Add Method Track Key"
-msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡ (Anim) টà§à¦°à§à¦¯à¦¾à¦•/পথ à¦à¦¬à¦‚ চাবি যোগ করà§à¦¨"
+msgstr "Method Track Key যà§à¦•à§à¦¤ করà§à¦¨"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Method not found in object: "
-msgstr "সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿà§‡ চলক-পà§à¦°à¦¾à¦ªà¦• (VariableGet) পাওয়া যায়নি: "
+msgstr "Object ঠMethod পাওয়া যায় নি: "
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
@@ -472,7 +467,6 @@ msgid "Clipboard is empty"
msgstr "কà§à¦²à§€à¦ªà¦¬à§‹à¦°à§à¦¡ খালি"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Paste Tracks"
msgstr "মানসমূহ পà§à¦°à¦¤à¦¿à¦²à§‡à¦ªà¦¨/পেসà§à¦Ÿ করà§à¦¨"
@@ -484,6 +478,7 @@ msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à§‡à¦° (Anim) চাবিসমূহেà
msgid ""
"This option does not work for Bezier editing, as it's only a single track."
msgstr ""
+"à¦à¦‡ বিকলà§à¦ªà¦Ÿà¦¿ বেজিয়ার সমà§à¦ªà¦¾à¦¦à¦¨à¦¾à¦° জনà§à¦¯ কাজ করে না, কারণ à¦à¦Ÿà¦¿ কেবলমাতà§à¦° Single টà§à¦°à§à¦¯à¦¾à¦•।"
#: editor/animation_track_editor.cpp
msgid ""
@@ -497,24 +492,31 @@ msgid ""
"Alternatively, use an import preset that imports animations to separate "
"files."
msgstr ""
+"à¦à¦‡ অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à¦Ÿà¦¿ আমদানি করা দৃশà§à¦¯à§‡à¦° সাথে সমà§à¦ªà¦°à§à¦•িত, তাই আমদানি করা টà§à¦°à§à¦¯à¦¾à¦•গà§à¦²à¦¿à¦¤à§‡ "
+"পরিবরà§à¦¤à¦¨à¦—à§à¦²à¦¿ সংরকà§à¦·à¦£ করা হবে না।\n"
+"\n"
+"কাসà§à¦Ÿà¦® টà§à¦°à§à¦¯à¦¾à¦• যà§à¦•à§à¦¤ করার কà§à¦·à¦®à¦¤à¦¾ সকà§à¦·à¦® করতে, দৃশà§à¦¯à§‡à¦° আমদানি সেটিংসে নেভিগেট করà§à¦¨ à¦à¦¬à¦‚ "
+"সেট করà§à¦¨\n"
+"\"ফাইলগà§à¦²à¦¿\" ঠ\"অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨> সঞà§à¦šà¦¯à¦¼à¦¸à§à¦¥à¦¾à¦¨\", \"অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨> কাসà§à¦Ÿà¦® টà§à¦°à§à¦¯à¦¾à¦• রাখà§à¦¨\" সকà§à¦·à¦® "
+"করà§à¦¨, তারপরে পà§à¦¨à¦°à¦¾à¦¯à¦¼ আমদানি করà§à¦¨à¥¤\n"
+"বিকলà§à¦ªà¦­à¦¾à¦¬à§‡, à¦à¦•টি আমদানি পà§à¦°à¦¿à¦¸à§‡à¦Ÿ বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨ যা পৃথক ফাইলগà§à¦²à¦¿à¦¤à§‡ অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à¦—à§à¦²à¦¿ "
+"আমদানি করে।"
#: editor/animation_track_editor.cpp
msgid "Warning: Editing imported animation"
-msgstr ""
+msgstr "সতরà§à¦•তা: Imported অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ সমà§à¦ªà¦¾à¦¦à¦¨à¦¾ করা হচà§à¦›à§‡"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Select an AnimationPlayer node to create and edit animations."
-msgstr ""
-"অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à¦¸à¦®à§‚হ সমà§à¦ªà¦¾à¦¦à¦¨ করতে দৃশà§à¦¯à§‡à¦° তালিকা থেকে à¦à¦•টি AnimationPlayer নিরà§à¦¬à¦¾à¦šà¦¨ করà§à¦¨à¥¤"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ তৈরি à¦à¦¬à¦‚ সমà§à¦ªà¦¾à¦¦à¦¨à¦¾ করতে à¦à¦•টি অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à¦ªà§à¦²à§‡à¦¯à¦¼à¦¾à¦° নোড নিরà§à¦¬à¦¾à¦šà¦¨ করà§à¦¨à¥¤"
#: editor/animation_track_editor.cpp
msgid "Only show tracks from nodes selected in tree."
-msgstr ""
+msgstr "Tree মধà§à¦¯à§‡ নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ নোডগà§à¦²à¦¿ থেকে কেবল টà§à¦°à§à¦¯à¦¾à¦•গà§à¦²à¦¿ দেখান।"
#: editor/animation_track_editor.cpp
msgid "Group tracks by node or display them as plain list."
-msgstr ""
+msgstr "নোড দà§à¦¬à¦¾à¦°à¦¾ গà§à¦°à§à¦ª টà§à¦°à§à¦¯à¦¾à¦• করà§à¦¨ বা তাদের সরল তালিকা হিসাবে পà§à¦°à¦¦à¦°à§à¦¶à¦¨ করà§à¦¨à¥¤"
#: editor/animation_track_editor.cpp
msgid "Snap:"
@@ -548,9 +550,8 @@ msgid "Animation properties."
msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ বৈশিষà§à¦Ÿà§à¦¯à¥¤"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Copy Tracks"
-msgstr "মানসমূহ পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿/কপি করà§à¦¨"
+msgstr "টà§à¦°à§à¦¯à¦¾à¦•গà§à¦²à¦¿ অনà§à¦²à¦¿à¦ªà¦¿ করà§à¦¨"
#: editor/animation_track_editor.cpp
msgid "Scale Selection"
@@ -569,9 +570,8 @@ msgid "Duplicate Transposed"
msgstr "পকà§à¦·à¦¾à¦¨à§à¦¤à¦°à¦¿à¦¤ (Transposed) সমূহ অনà§à¦²à¦¿à¦ªà¦¿ করà§à¦¨"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Delete Selection"
-msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অপসারণ করà§à¦¨"
+msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ Delete করà§à¦¨"
#: editor/animation_track_editor.cpp
msgid "Go to Next Step"
@@ -595,7 +595,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Use Bezier Curves"
-msgstr ""
+msgstr "বেজিয়ার কারà§à¦­ বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -642,9 +642,8 @@ msgid "Scale Ratio:"
msgstr "সà§à¦•েল/মাপের অনà§à¦ªà¦¾à¦¤:"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Select Tracks to Copy"
-msgstr "গà§à¦£à¦¾à¦—à§à¦£/বৈশিষà§à¦Ÿà§à¦¯ বাছাই করà§à¦¨"
+msgstr "গà§à¦£à¦¾à¦—à§à¦£/বৈশিষà§à¦Ÿà§à¦¯ copy করà§à¦¨"
#: editor/animation_track_editor.cpp editor/editor_log.cpp
#: editor/editor_properties.cpp
@@ -1487,14 +1486,12 @@ msgstr ""
"পারবে না।"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing built-in type name."
msgstr ""
"অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ নাম। নামটি অবশà§à¦¯à¦‡ বিদà§à¦¯à¦®à¦¾à¦¨ পূরà§à¦¬à¦¨à¦¿à¦°à§à¦®à¦¿à¦¤ ধরণের নামের সাথে পরমà§à¦ªà¦°à¦¬à¦¿à¦°à§‡à¦¾à¦§à§€ "
"হতে পারবে না।"
#: editor/editor_autoload_settings.cpp
-#, fuzzy
msgid "Must not collide with an existing global constant name."
msgstr ""
"অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ নাম। নামটি অবশà§à¦¯à¦‡ বিদà§à¦¯à¦®à¦¾à¦¨ সারà§à¦¬à¦œà¦¨à§€à¦¨ ধà§à¦°à§à¦¬à¦•ের নামের সাথে পরমà§à¦ªà¦°à¦¬à¦¿à¦°à§‡à¦¾à¦§à§€ "
@@ -1774,14 +1771,12 @@ msgid "Enabled Properties:"
msgstr "পà§à¦°à§‹à¦ªà¦¾à¦°à§à¦Ÿà¦¿-সমূহ:"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Enabled Features:"
-msgstr "গঠনবিনà§à¦¯à¦¾à¦¸"
+msgstr "গঠনবিনà§à¦¯à¦¾à¦¸ :"
#: editor/editor_feature_profile.cpp
-#, fuzzy
msgid "Enabled Classes:"
-msgstr "কà§à¦²à¦¾à¦¸à§‡à¦° অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨"
+msgstr "Enabled কà§à¦²à¦¾à¦¸:"
#: editor/editor_feature_profile.cpp
msgid "File '%s' format is invalid, import aborted."
@@ -3284,6 +3279,25 @@ msgstr "à¦à¦•টি সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ খà§à¦²à§à¦¨ à¦à¦¬à¦‚ চà¦
#: editor/editor_node.cpp
#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"নিমà§à¦¨à§‹à¦•à§à¦¤ ফাইলসমূহ ডিসà§à¦•ে নতà§à¦¨à¦¤à¦°à¥¤\n"
+"কোন সিধানà§à¦¤à¦Ÿà¦¿ নেয়া উচিত হবে?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "রিলোড"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "পà§à¦¨à¦ƒà¦¸à¦‚রকà§à¦·à¦£"
+
+#: editor/editor_node.cpp
+#, fuzzy
msgid "New Inherited"
msgstr "নতà§à¦¨ উতà§à¦¤à¦°à¦¾à¦§à¦¿à¦•ারী দৃশà§à¦¯..."
@@ -7464,16 +7478,6 @@ msgstr ""
"নিমà§à¦¨à§‹à¦•à§à¦¤ ফাইলসমূহ ডিসà§à¦•ে নতà§à¦¨à¦¤à¦°à¥¤\n"
"কোন সিধানà§à¦¤à¦Ÿà¦¿ নেয়া উচিত হবে?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "রিলোড"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "পà§à¦¨à¦ƒà¦¸à¦‚রকà§à¦·à¦£"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "ডিবাগার"
@@ -7823,6 +7827,11 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "সেল (Cell)-à¦à¦° আকার:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "অবজেকà§à¦Ÿ আà¦à¦•া হয়েছে"
@@ -10611,6 +10620,11 @@ msgid "Projects"
msgstr "নতà§à¦¨ পà§à¦°à¦•লà§à¦ª"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "মিরর রিটà§à¦°à¦¾à¦‡à¦­ করা হচà§à¦›à§‡, দযা করে অপেকà§à¦·à¦¾ করà§à¦¨..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/br.po b/editor/translations/br.po
index a20210c2bc..0b056dd9ed 100644
--- a/editor/translations/br.po
+++ b/editor/translations/br.po
@@ -2998,6 +2998,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6750,16 +6766,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7074,6 +7080,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9594,6 +9604,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index ed171e7934..568e373a6a 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -3166,6 +3166,25 @@ msgid "Open & Run a Script"
msgstr "Obre i Executa un Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"El disc conté versions més recents dels fitxer següents. \n"
+"Quina acció voleu seguir?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Torna a Carregar"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Torna a Desar"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Nou Heretat"
@@ -7124,16 +7143,6 @@ msgstr ""
"El disc conté versions més recents dels fitxer següents. \n"
"Quina acció voleu seguir?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Torna a Carregar"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Torna a Desar"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Depurador"
@@ -7466,6 +7475,11 @@ msgid "Yaw"
msgstr "Guinyada"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Mida: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Objectes Dibuixats"
@@ -10292,6 +10306,11 @@ msgstr "Projecte"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Loading, please wait..."
+msgstr "S'estan buscant rèpliques..."
+
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Last Modified"
msgstr "Última modificació"
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index b41675f0fc..04eb87654d 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -23,13 +23,13 @@
# Daniel Kříž <Daniel.kriz@protonmail.com>, 2020.
# VladimirBlazek <vblazek042@gmail.com>, 2020.
# kubajz22 <til.jakubesko@seznam.cz>, 2020.
-# Václav Blažej <vaclavblazej@seznam.cz>, 2020.
+# Václav Blažej <vaclavblazej@seznam.cz>, 2020, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-01-12 13:32+0000\n"
-"Last-Translator: Vojtěch Šamla <auzkok@seznam.cz>\n"
+"PO-Revision-Date: 2021-01-22 10:21+0000\n"
+"Last-Translator: Václav Blažej <vaclavblazej@seznam.cz>\n"
"Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/"
"cs/>\n"
"Language: cs\n"
@@ -37,7 +37,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: Weblate 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2394,7 +2394,7 @@ msgstr "Neexistuje žádná scéna pro spuštění."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Uložit scénu před spuštěním..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3139,6 +3139,25 @@ msgid "Open & Run a Script"
msgstr "Otevřít a spustit skript"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Následující soubory mají novější verzi na disku.\n"
+"Jaká akce se má vykonat?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Znovu naÄíst"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Znovu uložit"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Nové zděděné"
@@ -5173,26 +5192,29 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Nebylo možné urÄit velikost svÄ›telné mapy. Maximální velikost je příliÅ¡ malá?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Některé sítě jsou neplatné. Ujistěte se, že hodnoty kanálu UV2 jsou ve "
+"Ätvercové oblasti [0.0, 1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Godot byl sestaven bez podpory ray tracingu, světelné mapy nelze zapéct."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Zapéct lightmapy"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Vybrat soubor šablony"
+msgstr "Vybrat soubor pro zapeÄení svÄ›telných map:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6991,16 +7013,6 @@ msgstr ""
"Následující soubory mají novější verzi na disku.\n"
"Jaká akce se má vykonat?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Znovu naÄíst"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Znovu uložit"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Ladicí program"
@@ -7317,6 +7329,11 @@ msgid "Yaw"
msgstr "Náklon"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Velikost: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Objekty vykreslené"
@@ -9987,6 +10004,11 @@ msgid "Projects"
msgstr "Projekty"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Získávání zrcadel, prosím Äekejte..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Datum modifikace"
diff --git a/editor/translations/da.po b/editor/translations/da.po
index 148e31a2cc..8569251e55 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -15,14 +15,15 @@
# Mads K. Bredager <mbredager@gmail.com>, 2019.
# Kristoffer Andersen <kjaa@google.com>, 2019.
# Joe Osborne <reachjoe.o@gmail.com>, 2020.
-# Autowinto <happymansi@hotmail.com>, 2020.
-# Mikkel Mouridsen <mikkelmouridsen@me.com>, 2020.
+# Autowinto <happymansi@hotmail.com>, 2020, 2021.
+# Mikkel Mouridsen <mikkelmouridsen@me.com>, 2020, 2021.
+# snakatk <snaqii@live.dk>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-06-22 06:40+0000\n"
-"Last-Translator: Mikkel Mouridsen <mikkelmouridsen@me.com>\n"
+"PO-Revision-Date: 2021-02-05 09:20+0000\n"
+"Last-Translator: snakatk <snaqii@live.dk>\n"
"Language-Team: Danish <https://hosted.weblate.org/projects/godot-engine/"
"godot/da/>\n"
"Language: da\n"
@@ -30,7 +31,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 4.2-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -141,7 +142,7 @@ msgstr "Tilføj Bezier-punkt"
#: editor/animation_bezier_editor.cpp
msgid "Move Bezier Points"
-msgstr "Flyt punkt"
+msgstr "Flyt Bezier-punkter"
#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
msgid "Anim Duplicate Keys"
@@ -197,9 +198,8 @@ msgid "Anim Multi Change Call"
msgstr "Anim Skift Call"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Length"
-msgstr "Ændre Animation Navn:"
+msgstr "Ændre Animationslængde"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -334,7 +334,7 @@ msgstr "Vikle Løkke Interpolation"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Key"
-msgstr "Indsæt nøgle"
+msgstr "Indsæt Nøgle"
#: editor/animation_track_editor.cpp
msgid "Duplicate Key(s)"
@@ -762,8 +762,9 @@ msgid "Standard"
msgstr "Standard"
#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Toggle Scripts Panel"
-msgstr ""
+msgstr "Slå til/fra Scripts Panel"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
@@ -825,7 +826,7 @@ msgstr "Fra signal:"
#: editor/connections_dialog.cpp
msgid "Scene does not contain any script."
-msgstr ""
+msgstr "Scenen indeholder ikke noget script."
#: editor/connections_dialog.cpp editor/editor_autoload_settings.cpp
#: editor/groups_editor.cpp editor/plugins/item_list_editor_plugin.cpp
@@ -867,22 +868,23 @@ msgid "Deferred"
msgstr "Udskudt"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid ""
"Defers the signal, storing it in a queue and only firing it at idle time."
-msgstr ""
+msgstr "Udskyder signalet, gemmer det i en kø og anvender det ved spildtid."
#: editor/connections_dialog.cpp
msgid "Oneshot"
msgstr "OneShot"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Disconnects the signal after its first emission."
-msgstr ""
+msgstr "Frakobler signalet efter dets første aktivering."
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Cannot connect signal"
-msgstr "Forbind Signal: "
+msgstr "Kan ikke forbinde signal"
#: editor/connections_dialog.cpp editor/dependency_editor.cpp
#: editor/export_template_manager.cpp editor/groups_editor.cpp
@@ -1429,12 +1431,14 @@ msgid "Open Audio Bus Layout"
msgstr "Ã…ben Audio Bus Layout"
#: editor/editor_audio_buses.cpp
+#, fuzzy
msgid "There is no '%s' file."
-msgstr ""
+msgstr "Der er ingen '%s' fil."
#: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Layout"
-msgstr ""
+msgstr "Layout"
#: editor/editor_audio_buses.cpp
msgid "Invalid file, not an audio bus layout."
@@ -1513,8 +1517,9 @@ msgstr ""
"Ugyldigt navn. Må ikke være i konflikt med eksisterende global constant navn."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Keyword cannot be used as an autoload name."
-msgstr ""
+msgstr "Nøgleord kan ikke bruges som autoload navn."
#: editor/editor_autoload_settings.cpp
msgid "Autoload '%s' already exists!"
@@ -1545,8 +1550,9 @@ msgid "Rearrange Autoloads"
msgstr "Flytte om på Autoloads"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Can't add autoload:"
-msgstr ""
+msgstr "Kan ikke tilføje autoload:"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
@@ -1633,8 +1639,9 @@ msgid "Storing File:"
msgstr "Lagrings Fil:"
#: editor/editor_export.cpp
+#, fuzzy
msgid "No export template found at the expected path:"
-msgstr ""
+msgstr "Ingen eksporterings-skabelon fundet ved den forventede sti:"
#: editor/editor_export.cpp
msgid "Packing"
@@ -3233,6 +3240,23 @@ msgid "Open & Run a Script"
msgstr "Åben & Kør et Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr "De følgende filer kunne ikke trækkes ud af pakken:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Ny Arved"
@@ -4776,17 +4800,18 @@ msgid "Scale animation playback globally for the node."
msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Animation Tools"
-msgstr ""
+msgstr "Animation Værktøjer"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation"
-msgstr ""
+msgstr "Animation"
#: editor/plugins/animation_player_editor_plugin.cpp
#, fuzzy
msgid "Edit Transitions..."
-msgstr "Overgange"
+msgstr "Rediger Overgange..."
#: editor/plugins/animation_player_editor_plugin.cpp
#, fuzzy
@@ -4824,20 +4849,21 @@ msgid "Future"
msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Depth"
-msgstr ""
+msgstr "Dybde"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "1 step"
-msgstr ""
+msgstr "1 trin"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "2 steps"
-msgstr ""
+msgstr "2 trin"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "3 steps"
-msgstr ""
+msgstr "3 trin"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Differences Only"
@@ -4854,30 +4880,31 @@ msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
#, fuzzy
msgid "Pin AnimationPlayer"
-msgstr "Ændre Animation Navn:"
+msgstr "Fastgør AnimationPlayer"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Create New Animation"
-msgstr ""
+msgstr "Opret Ny Animation"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Name:"
-msgstr ""
+msgstr "Animation Navn:"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
msgid "Error!"
-msgstr ""
+msgstr "Fejl!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Blend Times:"
msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Next (Auto Queue):"
-msgstr ""
+msgstr "Næste (Auto Kø):"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Cross-Animation Blend Times"
@@ -4889,14 +4916,12 @@ msgid "Move Node"
msgstr "Flyt Node(s)"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition exists!"
-msgstr "Overgang"
+msgstr "Overgang eksisterer!"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Add Transition"
-msgstr "Overgang"
+msgstr "Tilføj Overgang"
#: editor/plugins/animation_state_machine_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
@@ -4933,14 +4958,12 @@ 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"
+msgstr "Node Fjernet"
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition Removed"
-msgstr "Overgang"
+msgstr "Overgang Fjernet"
#: editor/plugins/animation_state_machine_editor.cpp
msgid "Set Start Node (Autoplay)"
@@ -4977,9 +5000,8 @@ msgid "Set the end animation. This is useful for sub-transitions."
msgstr ""
#: editor/plugins/animation_state_machine_editor.cpp
-#, fuzzy
msgid "Transition: "
-msgstr "Overgang"
+msgstr "Overgang: "
#: editor/plugins/animation_state_machine_editor.cpp
#, fuzzy
@@ -4994,7 +5016,7 @@ msgstr "Animation Zoom."
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "New name:"
-msgstr ""
+msgstr "Nyt navn:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
@@ -5018,8 +5040,9 @@ msgid "Mix"
msgstr ""
#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#, fuzzy
msgid "Auto Restart:"
-msgstr ""
+msgstr "Auto Genstart:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Restart (s):"
@@ -5035,8 +5058,9 @@ msgstr ""
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Amount:"
-msgstr ""
+msgstr "Mængde:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Blend 0:"
@@ -5052,13 +5076,14 @@ msgstr ""
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Current:"
-msgstr ""
+msgstr "Nuværende:"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
#: editor/plugins/visual_shader_editor_plugin.cpp
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Add Input"
-msgstr ""
+msgstr "Tilføj Input"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Clear Auto-Advance"
@@ -5069,8 +5094,9 @@ msgid "Set Auto-Advance"
msgstr ""
#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#, fuzzy
msgid "Delete Input"
-msgstr ""
+msgstr "Fjern Input"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
msgid "Animation tree is valid."
@@ -5117,16 +5143,19 @@ msgid "Transition Node"
msgstr ""
#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#, fuzzy
msgid "Import Animations..."
-msgstr ""
+msgstr "Importer Animationer..."
#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#, fuzzy
msgid "Edit Node Filters"
-msgstr ""
+msgstr "Rediger Node Filtre"
#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#, fuzzy
msgid "Filters..."
-msgstr ""
+msgstr "Filtre..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Contents:"
@@ -5137,8 +5166,9 @@ msgid "View Files"
msgstr "Vis filer"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Connection error, please try again."
-msgstr ""
+msgstr "Forbindelsesfejl, prøv venligst igen."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't connect to host:"
@@ -5146,15 +5176,16 @@ msgstr "Kan ikke forbinde til host:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "Ingen respons fra host:"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Request failed, return code:"
-msgstr ""
+msgstr "Forespørgsel mislykkedes, returkode:"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
@@ -5164,11 +5195,12 @@ msgstr "Forespørgsel mislykkedes."
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Cannot save response to:"
-msgstr "Kan ikke fjerne:"
+msgstr "Kan ikke gemme respons i:"
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Write error."
-msgstr ""
+msgstr "Skrivefejl."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
@@ -5182,12 +5214,12 @@ msgstr "Omdiriger Løkke."
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Request failed, timeout"
-msgstr "Forespørgsel mislykkedes."
+msgstr "Forespørgsel mislykkedes, tiden udløb."
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Timeout."
-msgstr "Tid"
+msgstr "Tiden udløb."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
@@ -5210,14 +5242,12 @@ msgid "Asset Download Error:"
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Downloading (%s / %s)..."
-msgstr "Indlæser"
+msgstr "Downloader (%s / %s)..."
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Downloading..."
-msgstr "Indlæser"
+msgstr "Downloader..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Resolving..."
@@ -5234,11 +5264,12 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Install..."
-msgstr "Installér"
+msgstr "Installér..."
#: editor/plugins/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Retry"
-msgstr ""
+msgstr "Prøv igen"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Download Error"
@@ -5258,25 +5289,23 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Name (A-Z)"
-msgstr ""
+msgstr "Navn (A-Z)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Name (Z-A)"
-msgstr ""
+msgstr "Navn (Z-A)"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "License (A-Z)"
-msgstr "Licens"
+msgstr "Licens (A-Z)"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "License (Z-A)"
-msgstr "Licens"
+msgstr "Licens (Z-A)"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "First"
-msgstr ""
+msgstr "Første"
#: editor/plugins/asset_library_editor_plugin.cpp
#, fuzzy
@@ -5289,7 +5318,7 @@ msgstr "Næste"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Last"
-msgstr ""
+msgstr "Sidste"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "All"
@@ -5300,9 +5329,8 @@ msgid "No results for \"%s\"."
msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Import..."
-msgstr "Importer"
+msgstr "Importer..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Plugins..."
@@ -5322,9 +5350,8 @@ msgid "Site:"
msgstr "Websted:"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Support"
-msgstr "Støtte..."
+msgstr "Support"
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Official"
@@ -5335,9 +5362,8 @@ msgid "Testing"
msgstr "Tester"
#: editor/plugins/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Loading..."
-msgstr "Indlæs"
+msgstr "Indlæser..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
@@ -5406,7 +5432,7 @@ msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "steps"
-msgstr ""
+msgstr "trin"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Offset:"
@@ -7224,16 +7250,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7574,6 +7590,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -10240,6 +10260,11 @@ msgid "Projects"
msgstr "Projekt"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Henter spejle, vent venligst ..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/de.po b/editor/translations/de.po
index b7f5d21f20..abb61ade0d 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -23,7 +23,7 @@
# Peter Friedland <peter_friedland@gmx.de>, 2016.
# No need for a name <endoplasmatik@gmx.net>, 2016.
# Sönke <me@eknoes.de>, 2018.
-# So Wieso <sowieso@dukun.de>, 2016-2018, 2019, 2020.
+# So Wieso <sowieso@dukun.de>, 2016-2018, 2019, 2020, 2021.
# Tim Schellenberg <smwleod@gmail.com>, 2017.
# Timo Schwarzer <account@timoschwarzer.com>, 2016-2018.
# viernullvier <hannes.breul+github@gmail.com>, 2016.
@@ -62,12 +62,13 @@
# Patric Wust <patric.wust@gmx.de>, 2020.
# Jonathan Hassel <jonathan.hassel@icloud.com>, 2020.
# Artur Schönfeld <schoenfeld.artur@ymail.com>, 2020.
+# kidinashell <kidinashell@protonmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-01-12 13:32+0000\n"
-"Last-Translator: Martin <martinreininger@gmx.net>\n"
+"PO-Revision-Date: 2021-02-07 05:50+0000\n"
+"Last-Translator: So Wieso <sowieso@dukun.de>\n"
"Language-Team: German <https://hosted.weblate.org/projects/godot-engine/"
"godot/de/>\n"
"Language: de\n"
@@ -75,7 +76,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2452,7 +2453,7 @@ msgstr "Es ist keine abzuspielende Szene definiert."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Szene vor dem Abspielen speichern..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3215,6 +3216,25 @@ msgid "Open & Run a Script"
msgstr "Skript öffnen und ausführen"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Die folgenden Dateien wurden im Dateisystem verändert.\n"
+"Wie soll weiter vorgegangen werden?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Neu laden"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Erneut speichern"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Neu Geerbte"
@@ -5235,14 +5255,12 @@ msgid "Assets ZIP File"
msgstr "Nutzerinhalte als ZIP-Datei"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
-"Der Speicherpfad für Lightmap-Bilder kann nicht bestimmt werden.\n"
-"Speichern Sie die Szene (Bilder werden im gleichen Ordner gespeichert) oder "
-"legen Sie den Speicherpfad in den BakedLightmap-Eigenschaften fest."
+"Ein Speicherpfad für Lightmap-Bilder kann nicht bestimmt werden.\n"
+"Ein Speichern der Szene sollte dieses Problem beheben."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5262,26 +5280,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Die Größe des Lightmaps kann nicht bestimmt werden. Möglicherweise ist die "
+"maximale Lightmap-Größe zu klein."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Ein Mesh ist ungültig. Es muss sichergestellt sein dass alle Werte das UV2-"
+"Kanals im Bereich von 0.0 bis 1.0 liegen."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Diese Godot-Version wurde ohne Raytracing-Unterstützung erstellt, Lightmaps "
+"können damit nicht gebacken werden."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Lightmaps vorrendern"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Vorlagendatei auswählen"
+msgstr "Lightmap-Bake-Datei auswählen:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6384,9 +6407,8 @@ msgstr ""
"werden"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Zu CPU-Partikeln konvertieren"
+msgstr "Zu CPUParticles2D konvertieren"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -7093,16 +7115,6 @@ msgstr ""
"Die folgenden Dateien wurden im Dateisystem verändert.\n"
"Wie soll weiter vorgegangen werden?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Neu laden"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Erneut speichern"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Debugger"
@@ -7424,6 +7436,10 @@ msgid "Yaw"
msgstr "Gieren"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "Größe"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Gezeichnete Objekte"
@@ -10121,6 +10137,11 @@ msgid "Projects"
msgstr "Projekte"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Mirrors werden geladen, bitte warten..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Zuletzt bearbeitet"
@@ -11680,36 +11701,31 @@ msgstr "GridMap zu MeshLibrary hinzufügen um ihre Meshes benutzen zu können."
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Backen beginnen"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Datenstrukturen werden vorbereitet"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Erzeuge AABB"
+msgstr "Puffer generieren"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Richtungen"
+msgstr "Direct-Lighting"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Nach rechts einrücken"
+msgstr "Indirect-Lighting"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
msgstr "Nachbearbeitung"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Plotte Lichter:"
+msgstr "Lightmaps auftragen"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12229,9 +12245,8 @@ msgid "Select device from the list"
msgstr "Gerät aus Liste auswählen"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Unable to find the 'apksigner' tool."
-msgstr "Das zipalign Hilfswerkzeug konnte nicht gefunden werden."
+msgstr "Das ‚apksigner‘-Hilfswerkzeug konnte nicht gefunden werden."
#: platform/android/export/export.cpp
msgid ""
@@ -12253,16 +12268,13 @@ msgstr ""
"Release-Keystore wurde nicht korrekt konfiguriert in den Exporteinstellungen."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-"Ungültiger Android-SDK-Pfad für eigene Builds in den Editoreinstellungen."
+"Es wird ein gültiger Android-SDK-Pfad in den Editoreinstellungen benötigt."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
-"Ungültiger Android-SDK-Pfad für eigene Builds in den Editoreinstellungen."
+msgstr "Ungültiger Android-SDK-Pfad in den Editoreinstellungen."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12271,12 +12283,13 @@ msgstr "‚platform-tools‘-Verzeichnis fehlt!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
+"‚adb‘-Anwendung der Android-SDK-Platform-Tools konnte nicht gefunden werden."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-"Ungültiger Android-SDK-Pfad für eigene Builds in den Editoreinstellungen."
+"Schauen Sie im Android-SDK-Verzeichnis das in den Editoreinstellungen "
+"angegeben wurde nach."
#: platform/android/export/export.cpp
msgid "Missing 'build-tools' directory!"
@@ -12285,6 +12298,8 @@ msgstr "‚build-tools‘-Verzeichnis fehlt!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
+"‚apksigner‘-Anwendung der Android-SDK-Build-Tools konnte nicht gefunden "
+"werden."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12768,27 +12783,23 @@ msgstr "ARVROrigin benötigt ein ARVRCamera-Unterobjekt."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Am Suchen nach Meshes und Lichtern"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "Parse Geometrie…"
+msgstr "Am Vorbereiten der Geometrie (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Umgebung anzeigen"
+msgstr "Am Vorbereiten der Umgebung"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Generiere Lightmaps"
+msgstr "Am Generieren eines Schnappschusses"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "Generiere Lightmaps"
+msgstr "Am Speichern der Lightmaps"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13212,6 +13223,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"Der Sampler-Port ist verbunden wird aber nicht benutzt. Die Quelle sollte "
+"möglicherweise auf ‚SamplerPort‘ gestellt werden."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index b9cf1e9087..bda182e494 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -2976,6 +2976,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6728,16 +6744,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7052,6 +7058,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9572,6 +9582,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/el.po b/editor/translations/el.po
index fee8490872..5fb433a3cb 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -10,12 +10,13 @@
# pandektis <pandektis@gmail.com>, 2020.
# KostasMSC <kargyris@athtech.gr>, 2020.
# lawfulRobot <czavantias@gmail.com>, 2020.
+# Michalis <michalisntovas@yahoo.gr>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-09-30 12:32+0000\n"
-"Last-Translator: lawfulRobot <czavantias@gmail.com>\n"
+"PO-Revision-Date: 2021-02-15 10:51+0000\n"
+"Last-Translator: Michalis <michalisntovas@yahoo.gr>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/"
"el/>\n"
"Language: el\n"
@@ -23,7 +24,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 4.3-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -1878,7 +1879,7 @@ msgstr "Αποθήκευση αÏχείου"
#: editor/editor_file_dialog.cpp
msgid "Go Back"
-msgstr "Πήγαινε πίσω"
+msgstr "ΕπιστÏοφή"
#: editor/editor_file_dialog.cpp
msgid "Go Forward"
@@ -3158,6 +3159,25 @@ msgid "Open & Run a Script"
msgstr "Άνοιξε & ΤÏέξε μία δέσμη ενεÏγειών"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Τα ακόλουθα αÏχεία είναι νεότεÏα στον δίσκο.\n"
+"Τι δÏάση να ληφθεί;:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "ΕπαναφόÏτωση"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Επαναποθήκευση"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Îέα κληÏονομημένη"
@@ -3905,7 +3925,7 @@ msgstr "Αντικατάσταση..."
#: editor/find_in_files.cpp editor/progress_dialog.cpp scene/gui/dialogs.cpp
msgid "Cancel"
-msgstr "ΑκÏÏωση"
+msgstr "ΆκυÏο"
#: editor/find_in_files.cpp
msgid "Find: "
@@ -7015,7 +7035,7 @@ msgstr "Διακοπή"
#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
#: editor/script_editor_debugger.cpp
msgid "Continue"
-msgstr "Συνέχιση"
+msgstr "Συνέχεια"
#: editor/plugins/script_editor_plugin.cpp
msgid "Keep Debugger Open"
@@ -7053,16 +7073,6 @@ msgstr ""
"Τα ακόλουθα αÏχεία είναι νεότεÏα στον δίσκο.\n"
"Τι δÏάση να ληφθεί;:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "ΕπαναφόÏτωση"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Επαναποθήκευση"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Αποσφαλματωτής"
@@ -7385,6 +7395,11 @@ msgid "Yaw"
msgstr "ΠαÏέκκλιση"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Μέγεθος: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "ΖωγÏαφισμένα αντικείμενα"
@@ -10081,6 +10096,11 @@ msgid "Projects"
msgstr "ΈÏγα"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Ανάκτηση δεδοένων κατοπτÏισμοÏ, παÏακαλώ πεÏιμένετε..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Τελευταία ΤÏοποποιημένα"
diff --git a/editor/translations/eo.po b/editor/translations/eo.po
index bd5d35cf43..a485cca645 100644
--- a/editor/translations/eo.po
+++ b/editor/translations/eo.po
@@ -3075,6 +3075,22 @@ msgid "Open & Run a Script"
msgstr "Malfermi & ruli skripto"
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6858,16 +6874,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7183,6 +7189,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9727,6 +9737,10 @@ msgid "Projects"
msgstr "Projektoj"
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
#, fuzzy
msgid "Last Modified"
msgstr "Modifita"
diff --git a/editor/translations/es.po b/editor/translations/es.po
index 6ecd5e05a6..e9617793bb 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -14,11 +14,11 @@
# Diego López <diegodario21@gmail.com>, 2017.
# eon-s <emanuel.segretin@gmail.com>, 2018, 2019, 2020.
# Gustavo Leon <gleondiaz@gmail.com>, 2017-2018.
-# Javier Ocampos <xavier.ocampos@gmail.com>, 2018, 2019, 2020.
+# Javier Ocampos <xavier.ocampos@gmail.com>, 2018, 2019, 2020, 2021.
# Jose Maria Martinez <josemar1992@hotmail.com>, 2018.
# Juan Quiroga <juanquiroga9@gmail.com>, 2017.
# Kiji Pixel <raccoon.fella@gmail.com>, 2017.
-# Lisandro Lorea <lisandrolorea@gmail.com>, 2016-2017, 2019, 2020.
+# Lisandro Lorea <lisandrolorea@gmail.com>, 2016-2017, 2019, 2020, 2021.
# Lonsfor <lotharw@protonmail.com>, 2017-2018.
# Mario Nachbaur <manachbaur@gmail.com>, 2018.
# Oscar Carballal <oscar.carballal@protonmail.com>, 2017-2018.
@@ -58,12 +58,13 @@
# Ricardo Pérez <ricpelo@gmail.com>, 2021.
# A <kaieltroll@gmail.com>, 2021.
# Lucasdelpiero <lucasdelpiero98@gmail.com>, 2021.
+# SteamGoblin <SteamGoblin860@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-01-12 13:32+0000\n"
-"Last-Translator: Lucasdelpiero <lucasdelpiero98@gmail.com>\n"
+"PO-Revision-Date: 2021-02-15 10:51+0000\n"
+"Last-Translator: SteamGoblin <SteamGoblin860@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
"Language: es\n"
@@ -71,7 +72,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2451,7 +2452,7 @@ msgstr "No hay escena definida para ejecutar."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Guarda escena antes de ejecutar..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3214,6 +3215,25 @@ msgid "Open & Run a Script"
msgstr "Abrir y Ejecutar un Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Los siguientes archivos son nuevos en disco.\n"
+"¿Qué es lo que quieres hacer?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Recargar"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Volver a Guardar"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Nueva Escena Heredada"
@@ -5239,14 +5259,13 @@ msgid "Assets ZIP File"
msgstr "Archivo ZIP de elementos"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
-"No se puede encontrar una ruta válida para las imágenes \"lightmap\".\n"
-"Guarda la escena (para que las imágenes se guarden en el mismo directorio), "
-"o selecciona otra ruta desde las propiedades del \"BackedLightmap\"."
+"No se puede determinar una ruta de guardado para las imágenes de los "
+"lightmaps.\n"
+"Guarda tu escena e inténtalo de nuevo."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5265,26 +5284,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Falló al determinar el tamaño del lightmap ¿El tamaño máximo del lightmap es "
+"demasiado pequeño?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Alguna malla es inválida. Asegúrate de que los valores del canal de UV2 "
+"están contenidos dentro de la región cuadrangular [0,0,1,0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"El editor de Godot se construyó sin soporte de trazado de rayos, los "
+"lightmaps no pueden ser bakeados."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Bake Lightmaps"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Selecciona un Archivo de Plantilla"
+msgstr "Selecciona un archivo lightmap bakeado:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6388,9 +6412,8 @@ msgstr ""
"Solo se puede asignar un punto a un material de procesado ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Convertir a CPUParticles"
+msgstr "Convertir a CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -7097,16 +7120,6 @@ msgstr ""
"Los siguientes archivos son nuevos en disco.\n"
"¿Qué es lo que quieres hacer?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Recargar"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Volver a Guardar"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Depurador"
@@ -7423,7 +7436,11 @@ msgstr "Altura"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Yaw"
-msgstr "Yaw"
+msgstr "Guiñada"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "Tamaño"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
@@ -10118,6 +10135,11 @@ msgid "Projects"
msgstr "Proyectos"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Obteniendo mirrors, por favor espera..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Ultima Modificación"
@@ -11678,36 +11700,31 @@ msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Empezar a Bakear"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Preparar estructuras de datos"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Generar AABB"
+msgstr "Generar buffers"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Direcciones"
+msgstr "Iluminación directa"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Indentar a la Derecha"
+msgstr "Iluminación indirecta"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
-msgstr "Post-Procesado"
+msgstr "Post procesado"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Trazando Iluminación:"
+msgstr "Trazar lightmaps"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12227,9 +12244,8 @@ msgid "Select device from the list"
msgstr "Seleccionar dispositivo de la lista"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Unable to find the 'apksigner' tool."
-msgstr "No se pudo encontrar la herramienta zipalign."
+msgstr "No se pudo encontrar la herramienta 'apksigner'."
#: platform/android/export/export.cpp
msgid ""
@@ -12251,18 +12267,14 @@ msgstr ""
"exportación."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-"Ruta del SDK de Android inválida para la compilación personalizada en "
-"Configuración del Editor."
+"Se requiere una ruta válida del SDK de Android en la Configuración del "
+"Editor."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
-"Ruta del SDK de Android inválida para la compilación personalizada en "
-"Configuración del Editor."
+msgstr "Ruta del SDK de Android inválida en la Configuración del Editor."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12271,12 +12283,13 @@ msgstr "¡No se encontró el directorio 'platform-tools'!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
+"No se pudo encontrar el comando adb de las herramientas de la plataforma SDK "
+"de Android."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-"Ruta del SDK de Android inválida para la compilación personalizada en "
+"Por favor, comprueba el directorio del SDK de Android especificado en la "
"Configuración del Editor."
#: platform/android/export/export.cpp
@@ -12286,6 +12299,8 @@ msgstr "¡No se encontró el directorio 'build-tools'!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
+"No se pudo encontrar el comando apksigner de las herramientas de "
+"construcción del SDK de Android."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12771,27 +12786,23 @@ msgstr "ARVROrigin requiere un nodo hijo ARVRCamera."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Encontrando mallas y luces"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "Analizando geometría..."
+msgstr "Preparando geometría (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Ver Entorno"
+msgstr "Preparar entorno"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Generando Lightmaps"
+msgstr "Generar captura"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "Generando Lightmaps"
+msgstr "Guardar lightmaps"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13205,6 +13216,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"El puerto de muestreo está conectado, pero no se utiliza. Considera la "
+"posibilidad de cambiar la fuente a \"SamplerPort\"."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index 4a3624c026..89a9b0778e 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -3,7 +3,7 @@
# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
# Diego López <diegodario21@gmail.com>, 2017.
-# Lisandro Lorea <lisandrolorea@gmail.com>, 2016-2018, 2019, 2020.
+# Lisandro Lorea <lisandrolorea@gmail.com>, 2016-2018, 2019, 2020, 2021.
# Roger Blanco Ribera <roger.blancoribera@gmail.com>, 2016-2018.
# Sebastian Silva <sebastian@sugarlabs.org>, 2016.
# Jose Luis Bossio <joseluisbossio@gmail.com>, 2018.
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-29 21:52+0000\n"
+"PO-Revision-Date: 2021-02-05 23:44+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"
@@ -30,7 +30,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2408,7 +2408,7 @@ msgstr "No hay escena definida para ejecutar."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Guardar escena antes de ejecutar..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3169,6 +3169,25 @@ msgid "Open & Run a Script"
msgstr "Abrir y Correr un Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Los siguientes archivos son nuevos en disco.\n"
+"¿Qué acción se debería tomar?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Volver a Cargar"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Volver a Guardar"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Nuevo Heredado"
@@ -5193,14 +5212,13 @@ msgid "Assets ZIP File"
msgstr "Archivo ZIP de Assets"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
-"No se pudo determinar una ruta de guardado para las imagenes de lightmap.\n"
-"Guardá tu escena (para imagenes a ser guardadas en el mismo directorio), o "
-"elegí una ruta de guardado desde las propiedades de BakedLightmap."
+"No se puede determinar una ruta de guardado para las imágenes de los "
+"lightmaps.\n"
+"Guardá tu escena e inténtalo de nuevo."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5219,26 +5237,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Falló al determinar el tamaño del lightmap ¿El tamaño máximo de lightmap es "
+"demasiado pequeño?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Alguna malla es inválida. Asegurate de que los valores del canal UV2 estén "
+"contenidos dentro de la región cuadrada [0,0,1,0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"El editor de Godot se compiló sin soporte de ray tracing, los lightmaps no "
+"pueden ser bakeados."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Bake Lightmaps"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Elegir Archivo de Plantilla"
+msgstr "Selecciona un archivo de lightmap bakeado:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6336,9 +6359,8 @@ msgstr ""
"Solo se puede setear un punto en un material de proceso ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Convertir A CPUParticles"
+msgstr "Convertir a CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -7045,16 +7067,6 @@ msgstr ""
"Los siguientes archivos son nuevos en disco.\n"
"¿Qué acción se debería tomar?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Volver a Cargar"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Volver a Guardar"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Depurador"
@@ -7374,6 +7386,10 @@ msgid "Yaw"
msgstr "Yaw"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "Tamaño"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Objetos Dibujados"
@@ -10065,6 +10081,11 @@ msgid "Projects"
msgstr "Proyectos"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Recuperando mirrors, esperá, por favor..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Ultima Modificación"
@@ -11624,36 +11645,31 @@ msgstr "Asignar un recurso MeshLibrary a este GridMap para usar sus meshes."
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Iniciar Bake"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Preparando estructuras de datos"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Generar AABB"
+msgstr "Generar buffers"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Direcciones"
+msgstr "Iluminación directa"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Indentar a la Der"
+msgstr "Iluminación indirecta"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
-msgstr "Post-Procesado"
+msgstr "Post procesado"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Trazando Luces:"
+msgstr "Trazando lightmatps"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12173,7 +12189,7 @@ msgstr "Seleccionar dispositivo de la lista"
#: platform/android/export/export.cpp
msgid "Unable to find the 'apksigner' tool."
-msgstr ""
+msgstr "No se pudo encontrar la herramienta 'apksigner'."
#: platform/android/export/export.cpp
msgid ""
@@ -12195,18 +12211,13 @@ msgstr ""
"exportación."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-"Ruta del SDK de Android inválida para la compilación personalizada en "
-"Configuración del Editor."
+"Se requiere una ruta válida al SDK de Android en la Configuración del Editor."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
-"Ruta del SDK de Android inválida para la compilación personalizada en "
-"Configuración del Editor."
+msgstr "Ruta del SDK de Android inválida en la Configuración del Editor."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12214,23 +12225,22 @@ msgstr "¡No se encontró el directorio 'platform-tools'!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
-msgstr ""
+msgstr "No se pudo encontrar el comando adb en las Android SDK platform-tools."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-"Ruta del SDK de Android inválida para la compilación personalizada en "
+"Por favor, comprueba el directorio del SDK de Android especificado en la "
"Configuración del Editor."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Missing 'build-tools' directory!"
-msgstr "¡No se encontró el directorio 'platform-tools'!"
+msgstr "¡No se encontró el directorio 'build-tools'!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
+"No se pudo encontrar el comando apksigner en las Android SDK build-tools."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12713,27 +12723,23 @@ msgstr "ARVROrigin requiere un nodo hijo ARVRCamera."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Encontrar mallas y luces"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "Parseando Geometría..."
+msgstr "Preparando geometría (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Ver Entorno"
+msgstr "Preparando entorno"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Generando Lightmaps"
+msgstr "Generando capturas"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "Generando Lightmaps"
+msgstr "Guardando lightmaps"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13142,6 +13148,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"El puerto de muestreo está conectado, pero no se utiliza. Considerá la "
+"posibilidad de cambiar la fuente a \"SamplerPort\"."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/et.po b/editor/translations/et.po
index 2707b415e2..3babd690d9 100644
--- a/editor/translations/et.po
+++ b/editor/translations/et.po
@@ -10,7 +10,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2021-01-14 22:48+0000\n"
+"PO-Revision-Date: 2021-02-05 09:20+0000\n"
"Last-Translator: Kritzmensch <streef.gtx@gmail.com>\n"
"Language-Team: Estonian <https://hosted.weblate.org/projects/godot-engine/"
"godot/et/>\n"
@@ -1127,14 +1127,12 @@ msgid "Gold Sponsors"
msgstr "Kuldsponsorid"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Silver Sponsors"
-msgstr "Hõbennetajad"
+msgstr "Hõbesponsorid"
#: editor/editor_about.cpp
-#, fuzzy
msgid "Bronze Sponsors"
-msgstr "Pronksannetajad"
+msgstr "Pronkssponsorid"
#: editor/editor_about.cpp
msgid "Mini Sponsors"
@@ -1279,11 +1277,11 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Solo"
-msgstr ""
+msgstr "Soolo"
#: editor/editor_audio_buses.cpp
msgid "Mute"
-msgstr ""
+msgstr "Vaigista"
#: editor/editor_audio_buses.cpp
msgid "Bypass"
@@ -1300,7 +1298,7 @@ msgstr "Duplikeeri"
#: editor/editor_audio_buses.cpp
msgid "Reset Volume"
-msgstr ""
+msgstr "Lähtesta valjus"
#: editor/editor_audio_buses.cpp
msgid "Delete Effect"
@@ -1328,7 +1326,7 @@ msgstr ""
#: editor/editor_audio_buses.cpp
msgid "Reset Bus Volume"
-msgstr ""
+msgstr "Lähtesta siini valjus"
#: editor/editor_audio_buses.cpp
msgid "Move Audio Bus"
@@ -1634,7 +1632,7 @@ msgstr "Skriptiredaktor"
#: editor/editor_feature_profile.cpp
msgid "Asset Library"
-msgstr ""
+msgstr "Vadade kogum"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
@@ -1809,7 +1807,7 @@ msgstr "Värskenda"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Recognized"
-msgstr ""
+msgstr "Kõik tuvastatud"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Files (*)"
@@ -1896,11 +1894,11 @@ msgstr "Värskenda faile."
#: editor/editor_file_dialog.cpp
msgid "(Un)favorite current folder."
-msgstr ""
+msgstr "Lisa praegune kaust lemmikute sekka."
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Toggle the visibility of hidden files."
-msgstr ""
+msgstr "Näita peidetud faile."
#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
msgid "View items as a grid of thumbnails."
@@ -2387,7 +2385,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Export Mesh Library"
-msgstr ""
+msgstr "Ekspordi võrgu kogum"
#: editor/editor_node.cpp
msgid "This operation can't be done without a root node."
@@ -3025,13 +3023,29 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Merge With Existing"
-msgstr ""
+msgstr "Liida olemasolevaga"
#: editor/editor_node.cpp
msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -3316,7 +3330,7 @@ msgstr ""
#: editor/editor_sub_scene.cpp
msgid "Scene Path:"
-msgstr ""
+msgstr "Stseeni tee:"
#: editor/editor_sub_scene.cpp
msgid "Import From Node:"
@@ -4955,7 +4969,7 @@ msgstr ""
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Import..."
-msgstr ""
+msgstr "Impordi..."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Plugins..."
@@ -6735,11 +6749,11 @@ msgstr "Käivita"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Into"
-msgstr ""
+msgstr "Trepi sissepoole"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Over"
-msgstr ""
+msgstr "Trepi üle"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Break"
@@ -6784,16 +6798,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Siluja"
@@ -6879,7 +6883,7 @@ msgstr ""
#: editor/plugins/script_text_editor.cpp
msgid "Breakpoints"
-msgstr ""
+msgstr "Katkepunktid"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
@@ -6987,19 +6991,19 @@ msgstr ""
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Toggle Breakpoint"
-msgstr ""
+msgstr "Lülita katkepunkt sisse/välja"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Breakpoints"
-msgstr ""
+msgstr "Eemalda kõik katkepunktid"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Next Breakpoint"
-msgstr ""
+msgstr "Liigu järgmise katkepunkti juurde"
#: editor/plugins/script_text_editor.cpp
msgid "Go to Previous Breakpoint"
-msgstr ""
+msgstr "Naase eelmise katkepunkti juurde"
#: editor/plugins/shader_editor_plugin.cpp
msgid ""
@@ -7108,6 +7112,10 @@ msgid "Yaw"
msgstr "Sagitaal"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Objekte kuvatud"
@@ -7197,7 +7205,7 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Lock View Rotation"
-msgstr ""
+msgstr "Lukusta vaateakna pöördenurk"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Normal"
@@ -7285,7 +7293,7 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Rotation Locked"
-msgstr ""
+msgstr "Vaateakna pöördenurk on lukustatud"
#: editor/plugins/spatial_editor_plugin.cpp
msgid ""
@@ -9581,12 +9589,17 @@ msgid ""
"Please edit the project and set the main scene in the Project Settings under "
"the \"Application\" category."
msgstr ""
+"Projekti ei saa käivitada: peastseeni ei ole määratud.\n"
+"Redigeerige project.godot faili ja määrake projekti peastseen \"application"
+"\" alajaotuses."
#: 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 ""
+"Projekti ei saa käivitada: varad tuleb importida.\n"
+"Redigeerige projekti käivitama algset importimise protsessi."
#: editor/project_manager.cpp
msgid "Are you sure to run %d projects at once?"
@@ -9632,6 +9645,10 @@ msgid "Projects"
msgstr "Projektid"
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
@@ -9649,7 +9666,7 @@ msgstr "Uus projekt"
#: editor/project_manager.cpp
msgid "Remove Missing"
-msgstr ""
+msgstr "Eemalda puuduvad"
#: editor/project_manager.cpp
msgid "Templates"
@@ -9661,7 +9678,7 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Can't run project"
-msgstr ""
+msgstr "Projekti ei saa käivitada"
#: editor/project_manager.cpp
msgid ""
@@ -10734,7 +10751,7 @@ msgstr "Videomälu"
#: editor/script_editor_debugger.cpp
msgid "Skip Breakpoints"
-msgstr ""
+msgstr "Jäta katkepunktid vahele"
#: editor/script_editor_debugger.cpp
msgid "Inspect Previous Instance"
@@ -10750,11 +10767,11 @@ msgstr "Virnakaadrid"
#: editor/script_editor_debugger.cpp
msgid "Profiler"
-msgstr ""
+msgstr "Profileerija"
#: editor/script_editor_debugger.cpp
msgid "Network Profiler"
-msgstr ""
+msgstr "Võrgu profileerija"
#: editor/script_editor_debugger.cpp
msgid "Monitor"
@@ -10790,7 +10807,7 @@ msgstr "Ressursi tee"
#: editor/script_editor_debugger.cpp
msgid "Type"
-msgstr ""
+msgstr "Tüüp"
#: editor/script_editor_debugger.cpp
msgid "Format"
@@ -10823,7 +10840,7 @@ msgstr ""
#: editor/script_editor_debugger.cpp
#, fuzzy
msgid "Export measures as CSV"
-msgstr "Ekspordi mõõtmed/meetmed CSV-vormingus"
+msgstr "Ekspordi mõõtmed CSV-vormingus"
#: editor/settings_config_dialog.cpp
msgid "Erase Shortcut"
diff --git a/editor/translations/eu.po b/editor/translations/eu.po
index cb8cac87ea..3cd7a78f25 100644
--- a/editor/translations/eu.po
+++ b/editor/translations/eu.po
@@ -2991,6 +2991,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6750,16 +6766,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7074,6 +7080,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9598,6 +9608,13 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr ""
+"Fitxategiak arakatzen,\n"
+"Itxaron mesedez..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index 39983dc201..a6b5b83312 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -3046,6 +3046,23 @@ msgid "Open & Run a Script"
msgstr "گشودن و اجرای یک اسکریپت"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr "استخراج پرونده های زیر از بسته بندی انجام نشد:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "وارث جدید"
@@ -7028,16 +7045,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7379,6 +7386,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -10059,6 +10070,11 @@ msgid "Projects"
msgstr "طرح ها"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "بارگیری"
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index 61a2c5324e..2768e46e1b 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -8,14 +8,14 @@
# Jarmo Riikonen <amatrelan@gmail.com>, 2017.
# Nuutti Varvikko <nvarvikko@gmail.com>, 2018.
# Sami Lehtilä <sami.lehtila@gmail.com>, 2018.
-# Tapani Niemi <tapani.niemi@kapsi.fi>, 2018, 2019, 2020.
+# Tapani Niemi <tapani.niemi@kapsi.fi>, 2018, 2019, 2020, 2021.
# Tuomas Lähteenmäki <lahtis@gmail.com>, 2019.
# Matti Niskanen <matti.t.niskanen@gmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-29 21:52+0000\n"
+"PO-Revision-Date: 2021-02-05 23:44+0000\n"
"Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/"
"godot/fi/>\n"
@@ -24,7 +24,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2384,7 +2384,7 @@ msgstr "Suoritettavaa skeneä ei ole määritetty."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Tallenna skene ennen ajamista..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3129,6 +3129,25 @@ msgid "Open & Run a Script"
msgstr "Avaa ja suorita skripti"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Seuraavat tiedostot ovat uudempia levyllä.\n"
+"Mikä toimenpide tulisi suorittaa?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Lataa uudelleen"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Tallenna uudelleen"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Uusi peritty skene"
@@ -5147,14 +5166,12 @@ msgid "Assets ZIP File"
msgstr "Assettien zip-tiedosto"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
"Lightmap-kuvien tallennuspolun määrittäminen ei onnistu.\n"
-"Tallenna skenesi (jotta kuvat tallentuisivat samaan hakemistoon), tai "
-"valitse tallennuspolku BakedLightmapin asetuksista."
+"Tallenna skenesi ja yritä uudelleen."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5173,26 +5190,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Lightmapin koon määrittäminen epäonnistui. Suurin lightmapin koko liian "
+"pieni?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Jokin mesh on virheellinen. Varmista, että UV2-kanavan arvot ovat [0.0, 1.0] "
+"välisen neliön alueella."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Godot-editori on käännetty ilman ray tracing -tukea, joten lightmappeja ei "
+"voi kehittää."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Kehitä Lightmapit"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Valitse mallitiedosto"
+msgstr "Valitse lightmapin kehitystiedosto:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6288,9 +6310,8 @@ msgstr ""
"Piste voidaan asettaa ainoastaan ParticlesMaterial käsittelyn materiaaliin"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Muunna CPUPartikkeleiksi"
+msgstr "Muunna CPUParticles2D solmuksi"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -6997,16 +7018,6 @@ msgstr ""
"Seuraavat tiedostot ovat uudempia levyllä.\n"
"Mikä toimenpide tulisi suorittaa?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Lataa uudelleen"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Tallenna uudelleen"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Debuggeri"
@@ -7325,6 +7336,10 @@ msgid "Yaw"
msgstr "Käännös (yaw)"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "Koko"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Objekteja piirretty"
@@ -10007,6 +10022,11 @@ msgid "Projects"
msgstr "Projektit"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Noudetaan peilipalvelimia, hetkinen..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Viimeksi muutettu"
@@ -11566,36 +11586,31 @@ msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Aloita kehitys"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Valmistellaan tietorakenteita"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Luo AABB"
+msgstr "Luo puskurit"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Suunnat"
+msgstr "Suora valaistus"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Sisennä oikealle"
+msgstr "Epäsuora valaistus"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
msgstr "Jälkikäsittely"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Piirretään valoja:"
+msgstr "Piirretään lightmappeja"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12109,9 +12124,8 @@ msgid "Select device from the list"
msgstr "Valitse laite listasta"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Unable to find the 'apksigner' tool."
-msgstr "zipalign työkalua ei löydy."
+msgstr "'apksigner' työkalua ei löydy."
#: platform/android/export/export.cpp
msgid ""
@@ -12131,18 +12145,12 @@ msgid "Release keystore incorrectly configured in the export preset."
msgstr "Release keystore on konfiguroitu väärin viennin esiasetuksissa."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
-msgstr ""
-"Virheellinen Android SDK -polku mukautettu käännöstä varten editorin "
-"asetuksissa."
+msgstr "Editorin asetuksiin tarvitaan kelvollinen Android SDK -polku."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
-"Virheellinen Android SDK -polku mukautettu käännöstä varten editorin "
-"asetuksissa."
+msgstr "Editorin asetuksissa on virheellinen Android SDK -polku."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12150,14 +12158,12 @@ msgstr "'platform-tools' hakemisto puuttuu!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
-msgstr ""
+msgstr "Android SDK platform-tools adb-komentoa ei löydy."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-"Virheellinen Android SDK -polku mukautettu käännöstä varten editorin "
-"asetuksissa."
+"Ole hyvä ja tarkista editorin asetuksissa määritelty Android SDK -hakemisto."
#: platform/android/export/export.cpp
msgid "Missing 'build-tools' directory!"
@@ -12165,7 +12171,7 @@ msgstr "'build-tools' hakemisto puuttuu!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
-msgstr ""
+msgstr "Android SDK build-tools apksigner-komentoa ei löydy."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12639,27 +12645,23 @@ msgstr "ARVROrigin solmu tarvitsee ARVRCamera alisolmun."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Etsitään meshejä ja valoja"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "Jäsentää geometriaa…"
+msgstr "Valmistellaan geometriaa (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Näytä ympäristö"
+msgstr "Valmistellaan ympäristöä"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Luodaan Lightmappeja"
+msgstr "Luodaan kaappausta"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "Luodaan Lightmappeja"
+msgstr "Tallennetaan lightmappeja"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13067,6 +13069,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"Näytteistysportti on yhdistetty mutta ei käytössä. Harkitse lähteen "
+"vaihtamista 'SamplerPort' asetukseen."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/fil.po b/editor/translations/fil.po
index 575e1370b3..40dc021b75 100644
--- a/editor/translations/fil.po
+++ b/editor/translations/fil.po
@@ -2992,6 +2992,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6750,16 +6766,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7074,6 +7080,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9598,6 +9608,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index d5acf9fca8..a0ac83396b 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -69,7 +69,7 @@
# Sofiane <Sofiane-77@caramail.fr>, 2019.
# Camille Mohr-Daurat <pouleyketchoup@gmail.com>, 2019.
# Pierre Stempin <pierre.stempin@gmail.com>, 2019.
-# Pierre Caye <pierrecaye@laposte.net>, 2020.
+# Pierre Caye <pierrecaye@laposte.net>, 2020, 2021.
# Kevin Bouancheau <kevin.bouancheau@gmail.com>, 2020.
# LaurentOngaro <laurent@gameamea.com>, 2020.
# Julien Humbert <julroy67@gmail.com>, 2020.
@@ -82,8 +82,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-01-01 10:30+0000\n"
-"Last-Translator: TechnoPorg <jonah.janzen@gmail.com>\n"
+"PO-Revision-Date: 2021-01-22 10:21+0000\n"
+"Last-Translator: Pierre Caye <pierrecaye@laposte.net>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot/fr/>\n"
"Language: fr\n"
@@ -91,7 +91,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2473,7 +2473,7 @@ msgstr "Il n'y a pas de scène définie pour être lancée."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Enregistrer la scène avant de l'exécuter..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3239,6 +3239,24 @@ msgid "Open & Run a Script"
msgstr "Ouvrir et exécuter un script"
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Les fichiers suivants sont plus récents sur le disque.\n"
+"Quelle action doit être prise ?"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Recharger"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Ré-enregistrer"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Nouveau hérité"
@@ -5267,15 +5285,12 @@ msgid "Assets ZIP File"
msgstr "Fichier ZIP de données"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
-"Ne peut pas déterminer un chemin de sauvegarde pour les images lightmap.\n"
-"Sauvegarder votre scène (pour que les images soient sauvegardées dans le "
-"même répertoire), ou choisissez un répertoire de sauvegarde à partir des "
-"propriétés BakedLightmap."
+"Impossible de déterminer un chemin de sauvegarde pour les images lightmap.\n"
+"Enregistrez votre scène et réessayez."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5294,26 +5309,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Échec de la détermination de la taille de la lightmap. Taille maximale de "
+"lightmap trop petite ?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Un maillage n'est pas valide. Assurez-vous que les valeurs du canal UV2 sont "
+"contenues dans la région carrée [0.0,1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"L'éditeur Godot a été compilé sans support du ray tracing, les lightmaps ne "
+"peuvent pas être pré-calculées."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Précalculer les lightmaps"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Sélectionner le fichier de modèle"
+msgstr "Sélectionnez le fichier de pré-calcul de lightmap :"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -7131,16 +7151,6 @@ msgstr ""
"Les fichiers suivants sont plus récents sur le disque.\n"
"Quelle action doit être prise ? :"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Recharger"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Ré-enregistrer"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Débogueur"
@@ -7461,6 +7471,10 @@ msgid "Yaw"
msgstr "Lacet (hauteur)"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "Taille"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Objets dessinés"
@@ -10164,6 +10178,10 @@ msgid "Projects"
msgstr "Projets"
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr "Chargement en cours, veuillez patienter..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Dernière modification"
@@ -11723,36 +11741,31 @@ msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Commencer le pré-calcul"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Préparation des structures de données"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Générer AABB"
+msgstr "Générer des tampons"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Directions"
+msgstr "Éclairage direct"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Indenter vers la droite"
+msgstr "Éclairage indirect"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
msgstr "Post-traitement"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Tracer les lumières :"
+msgstr "Tracer des lightmaps"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12299,11 +12312,10 @@ msgstr ""
"d'exportation."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-"Un chemin d'accès valide au SDK Android doit être défini dans les paramètres "
-"de l'éditeur."
+"Un chemin d'accès valide au SDK Android est requis dans les paramètres de "
+"l'éditeur."
#: platform/android/export/export.cpp
msgid "Invalid Android SDK path in Editor Settings."
@@ -12316,14 +12328,13 @@ msgstr "Dossier « platform-tools » manquant !"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
-msgstr ""
+msgstr "Impossible de trouver la commande adb du SDK Android platform-tools."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-"Chemin d'accès invalide au SDK Android pour le build custom dans les "
-"paramètres de l'éditeur."
+"Veuillez vérifier le répertoire du SDK Android spécifié dans les paramètres "
+"de l'éditeur."
#: platform/android/export/export.cpp
msgid "Missing 'build-tools' directory!"
@@ -12332,6 +12343,7 @@ msgstr "Dossier « build-tools » manquant !"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
+"Impossible de trouver la commande apksigner du SDK Android build-tools."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12826,27 +12838,23 @@ msgstr "ARVROrigin requiert un nœud enfant ARVRCamera."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Recherche de maillages et de lumières"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "Analyse de la géométrie..."
+msgstr "Préparation de la géométrie (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Voir environnement"
+msgstr "Préparation de l'environnement"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Génération des lightmaps"
+msgstr "Génération de capture"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "Génération des lightmaps"
+msgstr "Enregistrement des lightmaps"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13263,6 +13271,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"Le port de l'échantillonneur est connecté mais n'est pas utilisé. Pensez à "
+"changer la source en 'SamplerPort'."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/ga.po b/editor/translations/ga.po
index 6036193c24..2e97bc49ee 100644
--- a/editor/translations/ga.po
+++ b/editor/translations/ga.po
@@ -2986,6 +2986,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6744,16 +6760,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7068,6 +7074,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9593,6 +9603,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/gl.po b/editor/translations/gl.po
new file mode 100644
index 0000000000..8a4250e00e
--- /dev/null
+++ b/editor/translations/gl.po
@@ -0,0 +1,12824 @@
+# Galician translation of the Godot Engine editor.
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
+# This file is distributed under the same license as the Godot source code.
+#
+# Andy Barcia <andybarcia4@gmail.com>, 2021.
+# PokeGalaico <abloodyfreaks@gmail.com>, 2021.
+msgid ""
+msgstr ""
+"Project-Id-Version: Godot Engine editor\n"
+"PO-Revision-Date: 2021-02-15 10:51+0000\n"
+"Last-Translator: Andy Barcia <andybarcia4@gmail.com>\n"
+"Language-Team: Galician <https://hosted.weblate.org/projects/godot-engine/"
+"godot/gl/>\n"
+"Language: gl\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 4.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 "Tipo de argumento inválido para convert(), utiliza constantes TYPE_*."
+
+#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
+msgid "Expected a string of length 1 (a character)."
+msgstr "Esperábase un string de lonxitude 1 (un carácter)."
+
+#: 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 ""
+"Non hai insuficientes \"bytes\" para descodificar, ou o formato é inválido."
+
+#: core/math/expression.cpp
+msgid "Invalid input %i (not passed) in expression"
+msgstr "Entrada inválida %i (non recibida) na expresión"
+
+#: core/math/expression.cpp
+msgid "self can't be used because instance is null (not passed)"
+msgstr "Non se pode usar \"self\" porque a instancia é nula (non recibida)"
+
+#: core/math/expression.cpp
+msgid "Invalid operands to operator %s, %s and %s."
+msgstr "Operandos inválidos para o operador %s, %s e %s."
+
+#: core/math/expression.cpp
+msgid "Invalid index of type %s for base type %s"
+msgstr "Ãndice de tipo %s inválido para tipo base %s"
+
+#: core/math/expression.cpp
+msgid "Invalid named index '%s' for base type %s"
+msgstr "O índice do nome '%s' non é válido para o tipo de base %s"
+
+#: core/math/expression.cpp
+msgid "Invalid arguments to construct '%s'"
+msgstr "Argumentos inválidos para construir '%s'"
+
+#: core/math/expression.cpp
+msgid "On call to '%s':"
+msgstr "En chamada a '%s':"
+
+#: core/ustring.cpp
+msgid "B"
+msgstr "B"
+
+#: core/ustring.cpp
+msgid "KiB"
+msgstr "KiB"
+
+#: core/ustring.cpp
+msgid "MiB"
+msgstr "MiB"
+
+#: core/ustring.cpp
+msgid "GiB"
+msgstr "GiB"
+
+#: core/ustring.cpp
+msgid "TiB"
+msgstr "TiB"
+
+#: core/ustring.cpp
+msgid "PiB"
+msgstr "PiB"
+
+#: core/ustring.cpp
+msgid "EiB"
+msgstr "EiB"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Free"
+msgstr "Libre"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Balanced"
+msgstr "Balanceado"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Mirror"
+msgstr "Espello"
+
+#: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp
+msgid "Time:"
+msgstr "Tempo:"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Value:"
+msgstr "Valor:"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Insert Key Here"
+msgstr "Introducir Clave Aquí"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Duplicate Selected Key(s)"
+msgstr "Duplicar Clave(s) Seleccionadas(s)"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Delete Selected Key(s)"
+msgstr "Eliminar Clave(s) Seleccionada(s)"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Add Bezier Point"
+msgstr "Engadir Punto Bezier"
+
+#: editor/animation_bezier_editor.cpp
+msgid "Move Bezier Points"
+msgstr "Mover Punto Bezier"
+
+#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
+msgid "Anim Duplicate Keys"
+msgstr "Duplicar Claves de Animación"
+
+#: editor/animation_bezier_editor.cpp editor/animation_track_editor.cpp
+msgid "Anim Delete Keys"
+msgstr "Eliminar Claves de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Change Keyframe Time"
+msgstr "Cambiar Tempo do Fotograma Clave"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Change Transition"
+msgstr "Cambiar Transición de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Change Transform"
+msgstr "Cambiar Transformación da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Change Keyframe Value"
+msgstr "Cambiar Valor do Fotograma Clave da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Change Call"
+msgstr "Cambiar Chamada da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Multi Change Keyframe Time"
+msgstr "Cambiar Tempo de Múltiples Fotogramas Claves de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Multi Change Transition"
+msgstr "Cambiar Múltiples Transicións da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Multi Change Transform"
+msgstr "Cambiar Múltiples Transformacións da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Multi Change Keyframe Value"
+msgstr "Cambiar Múltiples Valores do Fotograma Clave da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Multi Change Call"
+msgstr "Cambiar Múltiples Chamadas da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Length"
+msgstr "Cambiar Lonxitude da Animación"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation Loop"
+msgstr "Cambiar Ciclo da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Property Track"
+msgstr "Pista de Propiedades"
+
+#: editor/animation_track_editor.cpp
+msgid "3D Transform Track"
+msgstr "Pista de Transformación 3D"
+
+#: editor/animation_track_editor.cpp
+msgid "Call Method Track"
+msgstr "Pista de Chamadas de Métodos"
+
+#: editor/animation_track_editor.cpp
+msgid "Bezier Curve Track"
+msgstr "Pista de Curva Bezier"
+
+#: editor/animation_track_editor.cpp
+msgid "Audio Playback Track"
+msgstr "Pista de Reprodución de Audio"
+
+#: editor/animation_track_editor.cpp
+msgid "Animation Playback Track"
+msgstr "Pista de Reprodución de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Animation length (frames)"
+msgstr "Lonxitude da Animacion (en fotogramas)"
+
+#: editor/animation_track_editor.cpp
+msgid "Animation length (seconds)"
+msgstr "Lonxitude da Animación (en segundos)"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track"
+msgstr "Engadir Pista"
+
+#: editor/animation_track_editor.cpp
+msgid "Animation Looping"
+msgstr "Animación en Bucle"
+
+#: editor/animation_track_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Functions:"
+msgstr "Funciones:"
+
+#: editor/animation_track_editor.cpp
+msgid "Audio Clips:"
+msgstr "Clips de Audio:"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Clips:"
+msgstr "Clips de Animación:"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Track Path"
+msgstr "Cambiar Ruta da Pista"
+
+#: editor/animation_track_editor.cpp
+msgid "Toggle this track on/off."
+msgstr "Act./Desact. esta pista."
+
+#: editor/animation_track_editor.cpp
+msgid "Update Mode (How this property is set)"
+msgstr "Modo de Actualización (cómo se establece esta propiedade)"
+
+#: editor/animation_track_editor.cpp
+msgid "Interpolation Mode"
+msgstr "Modo de Interpolación"
+
+#: editor/animation_track_editor.cpp
+msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
+msgstr "Modo de Bucle Envolvente (interpola o final co comezo do bucle)"
+
+#: editor/animation_track_editor.cpp
+msgid "Remove this track."
+msgstr "Eliminar esta pista."
+
+#: editor/animation_track_editor.cpp
+msgid "Time (s): "
+msgstr "Tempo (s): "
+
+#: editor/animation_track_editor.cpp
+msgid "Toggle Track Enabled"
+msgstr "Act./Desact. Pista"
+
+#: editor/animation_track_editor.cpp
+msgid "Continuous"
+msgstr "Continuo"
+
+#: editor/animation_track_editor.cpp
+msgid "Discrete"
+msgstr "Discreto"
+
+#: editor/animation_track_editor.cpp
+msgid "Trigger"
+msgstr "Detonante (Trigger)"
+
+#: editor/animation_track_editor.cpp
+msgid "Capture"
+msgstr "Captura"
+
+#: editor/animation_track_editor.cpp
+msgid "Nearest"
+msgstr "Máis Cercano"
+
+#: editor/animation_track_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
+msgid "Linear"
+msgstr "Lineal"
+
+#: editor/animation_track_editor.cpp
+msgid "Cubic"
+msgstr "Cúbica"
+
+#: editor/animation_track_editor.cpp
+msgid "Clamp Loop Interp"
+msgstr "Interpolación de Bucle Recortado"
+
+#: editor/animation_track_editor.cpp
+msgid "Wrap Loop Interp"
+msgstr "Interpolación de Bucle Envolvente"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Insert Key"
+msgstr "Engadir Chave"
+
+#: editor/animation_track_editor.cpp
+msgid "Duplicate Key(s)"
+msgstr "Duplicar Chave(s)"
+
+#: editor/animation_track_editor.cpp
+msgid "Delete Key(s)"
+msgstr "Eliminar Chave(s)"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Update Mode"
+msgstr "Cambiar Modo de Actualización da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Interpolation Mode"
+msgstr "Cambiar Modo de Interpolación da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Loop Mode"
+msgstr "Cambiar Modo de Bucle da Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Remove Anim Track"
+msgstr "Eliminar Pista de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Create NEW track for %s and insert key?"
+msgstr "Crear nova pista para %s e engadir chave?"
+
+#: editor/animation_track_editor.cpp
+msgid "Create %d NEW tracks and insert keys?"
+msgstr "Crear %d novas pistas e engadir chaves?"
+
+#: editor/animation_track_editor.cpp editor/create_dialog.cpp
+#: editor/editor_audio_buses.cpp editor/editor_feature_profile.cpp
+#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#: editor/script_create_dialog.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Create"
+msgstr "Crear"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Insert"
+msgstr "Engadir Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "AnimationPlayer can't animate itself, only other players."
+msgstr "Un AnimationPlayer non pode animarse a si mesmo, só a outros players."
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Create & Insert"
+msgstr "Crear e Engadir Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Insert Track & Key"
+msgstr "Engadir Pista e Chave de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Insert Key"
+msgstr "Engadir Chave de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Change Animation Step"
+msgstr "Cambiar Paso 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 "As pistas de transformación só aplícanse a nodos basados en Spatial."
+
+#: editor/animation_track_editor.cpp
+msgid ""
+"Audio tracks can only point to nodes of type:\n"
+"-AudioStreamPlayer\n"
+"-AudioStreamPlayer2D\n"
+"-AudioStreamPlayer3D"
+msgstr ""
+"As pistas de audio só poden apuntar a nodos de tipo:\n"
+"-AudioStreamPlayer\n"
+"-AudioStreamPlayer2D\n"
+"-AudioStreamPlayer3D"
+
+#: editor/animation_track_editor.cpp
+msgid "Animation tracks can only point to AnimationPlayer nodes."
+msgstr "As pistas de animación só poden apuntar a nodos AnimationPlayer."
+
+#: editor/animation_track_editor.cpp
+msgid "An animation player can't animate itself, only other players."
+msgstr ""
+"Un reproductor de animacións non pode animarse a si mesmo, só a outros "
+"reproductores."
+
+#: editor/animation_track_editor.cpp
+msgid "Not possible to add a new track without a root"
+msgstr "Non é posible engadir unha nova pista sen unha raíz"
+
+#: editor/animation_track_editor.cpp
+msgid "Invalid track for Bezier (no suitable sub-properties)"
+msgstr "Pista inválida para Bezier (non hai sub-propiedades axeitadas)"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Bezier Track"
+msgstr "Engadir Pista Bezier"
+
+#: editor/animation_track_editor.cpp
+msgid "Track path is invalid, so can't add a key."
+msgstr "A ruta á pista é inválida, polo que non se poden engadir chaves."
+
+#: editor/animation_track_editor.cpp
+msgid "Track is not of type Spatial, can't insert key"
+msgstr "A pista non é de tipo Spatial, e non se pode engadir chave"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Transform Track Key"
+msgstr "Engadir Chave de Pista de Transformación"
+
+#: editor/animation_track_editor.cpp
+msgid "Add Track Key"
+msgstr "Engadir Chave de Pista"
+
+#: editor/animation_track_editor.cpp
+msgid "Track path is invalid, so can't add a method key."
+msgstr ""
+"A ruta á pista é inválida, polo que non se pode engadir unha clave de método."
+
+#: editor/animation_track_editor.cpp
+msgid "Add Method Track Key"
+msgstr "Engadir Chave de Pista de Método"
+
+#: editor/animation_track_editor.cpp
+msgid "Method not found in object: "
+msgstr "Método non encontrado no obxecto: "
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Move Keys"
+msgstr "Mover Claves de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Clipboard is empty"
+msgstr "O portapapeis está baleiro"
+
+#: editor/animation_track_editor.cpp
+msgid "Paste Tracks"
+msgstr "Pegar Pistas"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim Scale Keys"
+msgstr "Escalar Chaves de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid ""
+"This option does not work for Bezier editing, as it's only a single track."
+msgstr ""
+"Esta opción non funciona con edición Bezier, xa que é unha única pista."
+
+#: editor/animation_track_editor.cpp
+msgid ""
+"This animation belongs to an imported scene, so changes to imported tracks "
+"will not be saved.\n"
+"\n"
+"To enable the ability to add custom tracks, navigate to the scene's import "
+"settings and set\n"
+"\"Animation > Storage\" to \"Files\", enable \"Animation > Keep Custom Tracks"
+"\", then re-import.\n"
+"Alternatively, use an import preset that imports animations to separate "
+"files."
+msgstr ""
+"Esta animación pertence a unha escena importada, polo que os cambios nas "
+"pistas importadas non quedaran gardados.\n"
+"\n"
+"Para habilitar a capacidade de engadir pistas personalizadas, vai á "
+"configuración de importación da escena e establece\n"
+"\"Animación > Almacenamento\" a \"Arquivos\", activa \"Animación > Manter "
+"Pistas Personalizadas\", e logo reimportaa.\n"
+"Tamén poder usar un preset de importación que importa animacións para "
+"separar arquivos."
+
+#: editor/animation_track_editor.cpp
+msgid "Warning: Editing imported animation"
+msgstr "Advertencia: Estase editando unha animación importada"
+
+#: editor/animation_track_editor.cpp
+msgid "Select an AnimationPlayer node to create and edit animations."
+msgstr "Selecciona un nodo AnimationPlayer para crear e editar animacións."
+
+#: editor/animation_track_editor.cpp
+msgid "Only show tracks from nodes selected in tree."
+msgstr "Só mostrar pistas de nodos seleccionados na árbore."
+
+#: editor/animation_track_editor.cpp
+msgid "Group tracks by node or display them as plain list."
+msgstr "Agrupar pistas por nodo ou mostralas coma unha simple lista."
+
+#: editor/animation_track_editor.cpp
+msgid "Snap:"
+msgstr "Axuste de Cuadrícula:"
+
+#: editor/animation_track_editor.cpp
+msgid "Animation step value."
+msgstr "Valor de paso de animación."
+
+#: editor/animation_track_editor.cpp
+msgid "Seconds"
+msgstr "Segundos"
+
+#: editor/animation_track_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "FPS"
+msgstr "FPS"
+
+#: editor/animation_track_editor.cpp editor/editor_properties.cpp
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
+#: editor/plugins/tile_set_editor_plugin.cpp editor/project_manager.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Edit"
+msgstr "Editar"
+
+#: editor/animation_track_editor.cpp
+msgid "Animation properties."
+msgstr "Propiedades de Animación."
+
+#: editor/animation_track_editor.cpp
+msgid "Copy Tracks"
+msgstr "Copiar Pistas"
+
+#: editor/animation_track_editor.cpp
+msgid "Scale Selection"
+msgstr "Escalar Selección"
+
+#: editor/animation_track_editor.cpp
+msgid "Scale From Cursor"
+msgstr "Escalar desde o Cursor"
+
+#: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Duplicate Selection"
+msgstr "Duplicar Selección"
+
+#: editor/animation_track_editor.cpp
+msgid "Duplicate Transposed"
+msgstr "Duplicar Transposto"
+
+#: editor/animation_track_editor.cpp
+msgid "Delete Selection"
+msgstr "Eliminar Selección"
+
+#: editor/animation_track_editor.cpp
+msgid "Go to Next Step"
+msgstr "Ir ao Seguinte Paso"
+
+#: editor/animation_track_editor.cpp
+msgid "Go to Previous Step"
+msgstr "Ir ao Anterior Paso"
+
+#: editor/animation_track_editor.cpp
+msgid "Optimize Animation"
+msgstr "Optimizar Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Clean-Up Animation"
+msgstr "Limpiar Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Pick the node that will be animated:"
+msgstr "Elixe o nodo que será animado:"
+
+#: editor/animation_track_editor.cpp
+msgid "Use Bezier Curves"
+msgstr "Usar Curvas Bezier"
+
+#: editor/animation_track_editor.cpp
+msgid "Anim. Optimizer"
+msgstr "Optimizador de Animación"
+
+#: editor/animation_track_editor.cpp
+msgid "Max. Linear Error:"
+msgstr "Erro Lineal Máximo:"
+
+#: editor/animation_track_editor.cpp
+msgid "Max. Angular Error:"
+msgstr "Erro Angular Máximo:"
+
+#: editor/animation_track_editor.cpp
+msgid "Max Optimizable Angle:"
+msgstr "Ãngulo Optimizable Máximo:"
+
+#: editor/animation_track_editor.cpp
+msgid "Optimize"
+msgstr "Optimizar"
+
+#: editor/animation_track_editor.cpp
+msgid "Remove invalid keys"
+msgstr "Eliminar chaves inválidas"
+
+#: editor/animation_track_editor.cpp
+msgid "Remove unresolved and empty tracks"
+msgstr "Eliminar pistas baleiras e sen resolver"
+
+#: editor/animation_track_editor.cpp
+msgid "Clean-up all animations"
+msgstr "Limpiar tódolas animacións"
+
+#: editor/animation_track_editor.cpp
+msgid "Clean-Up Animation(s) (NO UNDO!)"
+msgstr "Limpiar Animación(s) (NON HAI VOLTA ATRÃS!)"
+
+#: editor/animation_track_editor.cpp
+msgid "Clean-Up"
+msgstr "Limpiar"
+
+#: editor/animation_track_editor.cpp
+msgid "Scale Ratio:"
+msgstr "Relación de Escalado:"
+
+#: editor/animation_track_editor.cpp
+msgid "Select Tracks to Copy"
+msgstr "Selecciona as Pistas a Copiar"
+
+#: editor/animation_track_editor.cpp editor/editor_log.cpp
+#: editor/editor_properties.cpp
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
+#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
+msgid "Copy"
+msgstr "Copiar"
+
+#: editor/animation_track_editor.cpp
+msgid "Select All/None"
+msgstr "Seleccionar Todas/Ningunha"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Add Audio Track Clip"
+msgstr "Engadir Clip de Pista de Audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip Start Offset"
+msgstr "Cambiar Inicio do Clip na Pista de Audio"
+
+#: editor/animation_track_editor_plugins.cpp
+msgid "Change Audio Track Clip End Offset"
+msgstr "Cambiar Final do Clip na Pista de Audio"
+
+#: editor/array_property_edit.cpp
+msgid "Resize Array"
+msgstr "Redimensionar Array"
+
+#: editor/array_property_edit.cpp
+msgid "Change Array Value Type"
+msgstr "Cambiar Tipo do Valor do Array"
+
+#: editor/array_property_edit.cpp
+msgid "Change Array Value"
+msgstr "Cambiar Valor do Array"
+
+#: editor/code_editor.cpp
+msgid "Go to Line"
+msgstr "Ir a Liña"
+
+#: editor/code_editor.cpp
+msgid "Line Number:"
+msgstr "Número de Liña:"
+
+#: editor/code_editor.cpp
+msgid "%d replaced."
+msgstr "%d substituído."
+
+#: editor/code_editor.cpp editor/editor_help.cpp
+msgid "%d match."
+msgstr "%d coincidencia."
+
+#: editor/code_editor.cpp editor/editor_help.cpp
+msgid "%d matches."
+msgstr "%d coincidencias."
+
+#: editor/code_editor.cpp editor/find_in_files.cpp
+msgid "Match Case"
+msgstr "Coincidir Maiús./Minús."
+
+#: editor/code_editor.cpp editor/find_in_files.cpp
+msgid "Whole Words"
+msgstr "Palabras Completas"
+
+#: editor/code_editor.cpp
+msgid "Replace"
+msgstr "Substituír"
+
+#: editor/code_editor.cpp
+msgid "Replace All"
+msgstr "Substituír Todo"
+
+#: editor/code_editor.cpp
+msgid "Selection Only"
+msgstr "Só a Selección"
+
+#: editor/code_editor.cpp editor/plugins/script_text_editor.cpp
+#: editor/plugins/text_editor.cpp
+msgid "Standard"
+msgstr "Estándar"
+
+#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Toggle Scripts Panel"
+msgstr "Act./Desact. Panel de Scripts"
+
+#: editor/code_editor.cpp 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
+msgid "Zoom In"
+msgstr "Aumentar Zoom"
+
+#: editor/code_editor.cpp 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
+msgid "Zoom Out"
+msgstr "Diminuír Zoom"
+
+#: editor/code_editor.cpp
+msgid "Reset Zoom"
+msgstr "Reiniciar Zoom"
+
+#: editor/code_editor.cpp
+msgid "Warnings"
+msgstr "Avisos"
+
+#: editor/code_editor.cpp
+msgid "Line and column numbers."
+msgstr "Números de liña e columna."
+
+#: editor/connections_dialog.cpp
+msgid "Method in target node must be specified."
+msgstr "Debe especificarse o método no nodo receptor."
+
+#: editor/connections_dialog.cpp
+msgid "Method name must be a valid identifier."
+msgstr "O nome do método debe ser un identificador válido."
+
+#: editor/connections_dialog.cpp
+msgid ""
+"Target method not found. Specify a valid method or attach a script to the "
+"target node."
+msgstr ""
+"Non se encontrou o método receptor. Especifique un método válido ou engada "
+"un script ao nodo receptor."
+
+#: editor/connections_dialog.cpp
+msgid "Connect to Node:"
+msgstr "Conectar ao Nodo:"
+
+#: editor/connections_dialog.cpp
+msgid "Connect to Script:"
+msgstr "Conectar ao Script:"
+
+#: editor/connections_dialog.cpp
+msgid "From Signal:"
+msgstr "Desde a Sinal:"
+
+#: editor/connections_dialog.cpp
+msgid "Scene does not contain any script."
+msgstr "A escena non conteñe ningún script."
+
+#: 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 "Engadir"
+
+#: editor/connections_dialog.cpp editor/dependency_editor.cpp
+#: editor/editor_feature_profile.cpp editor/groups_editor.cpp
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/theme_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp
+#: editor/project_settings_editor.cpp
+msgid "Remove"
+msgstr "Eliminar"
+
+#: editor/connections_dialog.cpp
+msgid "Add Extra Call Argument:"
+msgstr "Engadir Argumento Extra á Chamada:"
+
+#: editor/connections_dialog.cpp
+msgid "Extra Call Arguments:"
+msgstr "Argumentos Extra da Chamada:"
+
+#: editor/connections_dialog.cpp
+msgid "Receiver Method:"
+msgstr "Método Receptor:"
+
+#: editor/connections_dialog.cpp
+msgid "Advanced"
+msgstr "Avanzado"
+
+#: editor/connections_dialog.cpp
+msgid "Deferred"
+msgstr "Diferido"
+
+#: editor/connections_dialog.cpp
+msgid ""
+"Defers the signal, storing it in a queue and only firing it at idle time."
+msgstr ""
+"Difire a sinal, almacenándoa nunha cola é só executándoa en tempo de "
+"inactividade."
+
+#: editor/connections_dialog.cpp
+msgid "Oneshot"
+msgstr "Execución Única (Oneshot)"
+
+#: editor/connections_dialog.cpp
+msgid "Disconnects the signal after its first emission."
+msgstr "Desconecta a sinal unha vez foi emitida por primeira vez."
+
+#: editor/connections_dialog.cpp
+msgid "Cannot connect signal"
+msgstr "No se pode conectar a sinal"
+
+#: editor/connections_dialog.cpp editor/dependency_editor.cpp
+#: editor/export_template_manager.cpp editor/groups_editor.cpp
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#: editor/plugins/version_control_editor_plugin.cpp editor/project_export.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
+#: editor/run_settings_dialog.cpp editor/settings_config_dialog.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Close"
+msgstr "Pechar"
+
+#: editor/connections_dialog.cpp
+msgid "Connect"
+msgstr "Conectar"
+
+#: editor/connections_dialog.cpp
+msgid "Signal:"
+msgstr "Sinal:"
+
+#: editor/connections_dialog.cpp
+msgid "Connect '%s' to '%s'"
+msgstr "Conectar '%s' con '%s'"
+
+#: editor/connections_dialog.cpp
+msgid "Disconnect '%s' from '%s'"
+msgstr "Desconectar '%s' de '%s'"
+
+#: editor/connections_dialog.cpp
+msgid "Disconnect all from signal: '%s'"
+msgstr "Desconectar todo da sinal: '%s'"
+
+#: editor/connections_dialog.cpp
+msgid "Connect..."
+msgstr "Conectar..."
+
+#: editor/connections_dialog.cpp
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Disconnect"
+msgstr "Desconectar"
+
+#: editor/connections_dialog.cpp
+msgid "Connect a Signal to a Method"
+msgstr "Conectar unha Sinal a un Método"
+
+#: editor/connections_dialog.cpp
+msgid "Edit Connection:"
+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 de que quere eliminar tódalas conexións da sinal '%s'?"
+
+#: editor/connections_dialog.cpp editor/editor_help.cpp editor/node_dock.cpp
+msgid "Signals"
+msgstr "Sinais"
+
+#: editor/connections_dialog.cpp
+msgid "Filter signals"
+msgstr "Filtrar sinais"
+
+#: editor/connections_dialog.cpp
+msgid "Are you sure you want to remove all connections from this signal?"
+msgstr "Está seguro de que quere eliminar tódalas conexións desta sinal?"
+
+#: editor/connections_dialog.cpp
+msgid "Disconnect All"
+msgstr "Desconectar Todas"
+
+#: editor/connections_dialog.cpp
+msgid "Edit..."
+msgstr "Editar..."
+
+#: editor/connections_dialog.cpp
+msgid "Go To Method"
+msgstr "Ir ao Método"
+
+#: editor/create_dialog.cpp
+msgid "Change %s Type"
+msgstr "Cambiar o Tipo de %s"
+
+#: editor/create_dialog.cpp editor/project_settings_editor.cpp
+msgid "Change"
+msgstr "Cambiar"
+
+#: editor/create_dialog.cpp
+msgid "Create New %s"
+msgstr "Crear Novo %s"
+
+#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
+#: editor/filesystem_dock.cpp
+msgid "Favorites:"
+msgstr "Favoritos:"
+
+#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
+msgid "Recent:"
+msgstr "Recente:"
+
+#: editor/create_dialog.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp editor/rename_dialog.cpp
+#: modules/visual_script/visual_script_property_selector.cpp
+msgid "Search:"
+msgstr "Buscar:"
+
+#: 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 "Coincidencias:"
+
+#: editor/create_dialog.cpp editor/editor_plugin_settings.cpp
+#: editor/plugin_config_dialog.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp editor/property_selector.cpp
+#: modules/visual_script/visual_script_property_selector.cpp
+msgid "Description:"
+msgstr "Descrición:"
+
+#: editor/dependency_editor.cpp
+msgid "Search Replacement For:"
+msgstr "Buscar Substitución Para:"
+
+#: editor/dependency_editor.cpp
+msgid "Dependencies For:"
+msgstr "Dependencias De:"
+
+#: editor/dependency_editor.cpp
+msgid ""
+"Scene '%s' is currently being edited.\n"
+"Changes will only take effect when reloaded."
+msgstr ""
+"A escena '%s' agora mesmo está sendo editada.\n"
+"Os cambios só terán efecto cando sexa recargada."
+
+#: editor/dependency_editor.cpp
+msgid ""
+"Resource '%s' is in use.\n"
+"Changes will only take effect when reloaded."
+msgstr ""
+"O recurso '%s' agora mesmo está sendo usado.\n"
+"Os cambios só terán efecto cando sexa recargado."
+
+#: editor/dependency_editor.cpp
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Dependencies"
+msgstr "Dependencias"
+
+#: editor/dependency_editor.cpp
+msgid "Resource"
+msgstr "Recurso"
+
+#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
+msgid "Path"
+msgstr "Ruta"
+
+#: editor/dependency_editor.cpp
+msgid "Dependencies:"
+msgstr "Dependencias:"
+
+#: editor/dependency_editor.cpp
+msgid "Fix Broken"
+msgstr "Corrixir Erros"
+
+#: editor/dependency_editor.cpp
+msgid "Dependency Editor"
+msgstr "Editor de Dependencias"
+
+#: editor/dependency_editor.cpp
+msgid "Search Replacement Resource:"
+msgstr "Buscar Recurso de Substitución:"
+
+#: editor/dependency_editor.cpp editor/editor_file_dialog.cpp
+#: editor/editor_help_search.cpp editor/editor_node.cpp
+#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/script_create_dialog.cpp
+#: modules/visual_script/visual_script_property_selector.cpp
+#: scene/gui/file_dialog.cpp
+msgid "Open"
+msgstr "Abrir"
+
+#: editor/dependency_editor.cpp
+msgid "Owners Of:"
+msgstr "Dono De:"
+
+#: editor/dependency_editor.cpp
+msgid ""
+"Remove selected files from the project? (no undo)\n"
+"You can find the removed files in the system trash to restore them."
+msgstr ""
+"Eliminar do proxecto os arquivos seleccionados? (non se pode reverter)\n"
+"Podes encontrar os arquivos eliminados na papeleira de reciclaxe do sistema "
+"para restaurarlos."
+
+#: editor/dependency_editor.cpp
+msgid ""
+"The files being removed are required by other resources in order for them to "
+"work.\n"
+"Remove them anyway? (no undo)\n"
+"You can find the removed files in the system trash to restore them."
+msgstr ""
+"Os arquivos sendo eliminados están requeridos por outros recursos para poder "
+"funcionar.\n"
+"Eliminalos de todas formas? (non se pode reverter)\n"
+"Podes encontrar os arquivos eliminados na papeleira de reciclaxe do sistema "
+"para restaurarlos."
+
+#: editor/dependency_editor.cpp
+msgid "Cannot remove:"
+msgstr "Non se pode eliminar:"
+
+#: editor/dependency_editor.cpp
+msgid "Error loading:"
+msgstr "Erro cargando:"
+
+#: editor/dependency_editor.cpp
+msgid "Load failed due to missing dependencies:"
+msgstr "Fallou a carga debido a dependencias ausentes:"
+
+#: editor/dependency_editor.cpp editor/editor_node.cpp
+msgid "Open Anyway"
+msgstr "Abrir de Todos Modos"
+
+#: editor/dependency_editor.cpp
+msgid "Which action should be taken?"
+msgstr "Que acción debería de tomarse?"
+
+#: editor/dependency_editor.cpp
+msgid "Fix Dependencies"
+msgstr "Corrixir Dependencias"
+
+#: editor/dependency_editor.cpp
+msgid "Errors loading!"
+msgstr "Erros na carga!"
+
+#: editor/dependency_editor.cpp
+msgid "Permanently delete %d item(s)? (No undo!)"
+msgstr "Eliminar permanentemente %d obxectos? (Non se pode reverter!)"
+
+#: editor/dependency_editor.cpp
+msgid "Show Dependencies"
+msgstr "Amosar Dependencias"
+
+#: editor/dependency_editor.cpp
+msgid "Orphan Resource Explorer"
+msgstr "Explorador de Recursos Orfos"
+
+#: editor/dependency_editor.cpp editor/editor_audio_buses.cpp
+#: editor/editor_file_dialog.cpp editor/editor_node.cpp
+#: editor/plugins/item_list_editor_plugin.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"
+
+#: editor/dependency_editor.cpp
+msgid "Owns"
+msgstr "É Dono de"
+
+#: editor/dependency_editor.cpp
+msgid "Resources Without Explicit Ownership:"
+msgstr "Recursos Sen Dono Explícito:"
+
+#: editor/dictionary_property_edit.cpp
+msgid "Change Dictionary Key"
+msgstr "Cambiar Chave do Dicionario"
+
+#: editor/dictionary_property_edit.cpp
+msgid "Change Dictionary Value"
+msgstr "Cambiar Valor do Dicionario"
+
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "Moitas grazas de parte da comunidade de Godot!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "Colaboradores de Godot Engine"
+
+#: editor/editor_about.cpp
+msgid "Project Founders"
+msgstr "Fundadores do Proxecto"
+
+#: editor/editor_about.cpp
+msgid "Lead Developer"
+msgstr "Desenvolvedor Líder"
+
+#. TRANSLATORS: This refers to a job title.
+#. The trailing space is used to distinguish with the project list application,
+#. you do not have to keep it in your translation.
+#: editor/editor_about.cpp
+msgid "Project Manager "
+msgstr "Xestor do Proxecto "
+
+#: editor/editor_about.cpp
+msgid "Developers"
+msgstr "Desenvolvedores"
+
+#: editor/editor_about.cpp
+msgid "Authors"
+msgstr "Autores"
+
+#: editor/editor_about.cpp
+msgid "Platinum Sponsors"
+msgstr "Patrocinadores Platino"
+
+#: editor/editor_about.cpp
+msgid "Gold Sponsors"
+msgstr "Patrocinadores Ouro"
+
+#: editor/editor_about.cpp
+msgid "Silver Sponsors"
+msgstr "Patrocinadores Prata"
+
+#: editor/editor_about.cpp
+msgid "Bronze Sponsors"
+msgstr "Patrocinadores Bronce"
+
+#: editor/editor_about.cpp
+msgid "Mini Sponsors"
+msgstr "Patrocinadores Mini"
+
+#: editor/editor_about.cpp
+msgid "Gold Donors"
+msgstr "Doadores Ouro"
+
+#: editor/editor_about.cpp
+msgid "Silver Donors"
+msgstr "Doadores Prata"
+
+#: editor/editor_about.cpp
+msgid "Bronze Donors"
+msgstr "Doadores Bronce"
+
+#: editor/editor_about.cpp
+msgid "Donors"
+msgstr "Doadores"
+
+#: editor/editor_about.cpp
+msgid "License"
+msgstr "Licenza"
+
+#: editor/editor_about.cpp
+msgid "Third-party Licenses"
+msgstr "Licenzas de Terceiros"
+
+#: editor/editor_about.cpp
+msgid ""
+"Godot Engine relies on a number of third-party free and open source "
+"libraries, all compatible with the terms of its MIT license. The following "
+"is an exhaustive list of all such third-party components with their "
+"respective copyright statements and license terms."
+msgstr ""
+"Godot Engine depende dun número de bibliotecas de terceiros, gratis e open "
+"source; todas compatibles cos termos da licenza MIT. A seguinte e unha lista "
+"exhaustiva dos devanditos compoñentes de terceiros, coas suas respectivas "
+"declaracións de copyright e termos de licenza."
+
+#: editor/editor_about.cpp
+msgid "All Components"
+msgstr "Todos os Compoñentes"
+
+#: editor/editor_about.cpp
+msgid "Components"
+msgstr "Compoñentes"
+
+#: editor/editor_about.cpp
+msgid "Licenses"
+msgstr "Licenzas"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Error opening package file, not in ZIP format."
+msgstr "Erro ao abrir o arquivo comprimido, non está en formato ZIP."
+
+#: editor/editor_asset_installer.cpp
+msgid "%s (Already Exists)"
+msgstr "%s (Xa Existe)"
+
+#: editor/editor_asset_installer.cpp
+msgid "Uncompressing Assets"
+msgstr "Descomprimindo Assets"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "The following files failed extraction from package:"
+msgstr "Os seguintes arquivos non se poideron extraer do paquete:"
+
+#: editor/editor_asset_installer.cpp
+msgid "And %s more files."
+msgstr "E %s arquivos máis."
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package installed successfully!"
+msgstr "Paquete instalado correctamente!"
+
+#: editor/editor_asset_installer.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Success!"
+msgstr "Éxito!"
+
+#: editor/editor_asset_installer.cpp
+msgid "Package Contents:"
+msgstr "Contenido do Paquete:"
+
+#: editor/editor_asset_installer.cpp editor/editor_node.cpp
+msgid "Install"
+msgstr "Instalar"
+
+#: editor/editor_asset_installer.cpp
+msgid "Package Installer"
+msgstr "Instalador de Paquetes"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr "Altofalantes"
+
+#: editor/editor_audio_buses.cpp
+msgid "Add Effect"
+msgstr "Engadir Efecto"
+
+#: editor/editor_audio_buses.cpp
+msgid "Rename Audio Bus"
+msgstr "Renomear Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Change Audio Bus Volume"
+msgstr "Cambiar Volume do Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Toggle Audio Bus Solo"
+msgstr "Act./Desact. Solo do Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Toggle Audio Bus Mute"
+msgstr "Act./Desact. Silencio do Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Toggle Audio Bus Bypass Effects"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Select Audio Bus Send"
+msgstr "Seleccionar Envío do Bus de Audio"
+
+#: editor/editor_audio_buses.cpp
+msgid "Add Audio Bus Effect"
+msgstr "Engadir Efecto ao Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Move Bus Effect"
+msgstr "Mover Efecto do Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Delete Bus Effect"
+msgstr "Eliminar Efecto do Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Drag & drop to rearrange."
+msgstr "Arrastrar e soltar para reordenar."
+
+#: editor/editor_audio_buses.cpp
+msgid "Solo"
+msgstr "Solo"
+
+#: editor/editor_audio_buses.cpp
+msgid "Mute"
+msgstr "Silenciar"
+
+#: editor/editor_audio_buses.cpp
+msgid "Bypass"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bus options"
+msgstr "Opcións de Bus"
+
+#: editor/editor_audio_buses.cpp editor/filesystem_dock.cpp
+#: editor/plugins/animation_player_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Duplicar"
+
+#: editor/editor_audio_buses.cpp
+msgid "Reset Volume"
+msgstr "Restablecer Volume"
+
+#: editor/editor_audio_buses.cpp
+msgid "Delete Effect"
+msgstr "Eliminar Efecto"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio"
+msgstr "Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Add Audio Bus"
+msgstr "Engadir Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr "Non se pode eliminar o Bus mestre!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Delete Audio Bus"
+msgstr "Eliminar Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Duplicate Audio Bus"
+msgstr "Duplicar Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Reset Bus Volume"
+msgstr "Restablecer Volume do Bus"
+
+#: editor/editor_audio_buses.cpp
+msgid "Move Audio Bus"
+msgstr "Mover Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "Save Audio Bus Layout As..."
+msgstr "Gardar Disposición do Bus de Son Como..."
+
+#: editor/editor_audio_buses.cpp
+msgid "Location for New Layout..."
+msgstr "Localización para a Nova Disposición..."
+
+#: editor/editor_audio_buses.cpp
+msgid "Open Audio Bus Layout"
+msgstr "Abrir Disposición do Bus de Son"
+
+#: editor/editor_audio_buses.cpp
+msgid "There is no '%s' file."
+msgstr "Non hai ningún arquivo '%s'."
+
+#: editor/editor_audio_buses.cpp editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Layout"
+msgstr "Disposición"
+
+#: editor/editor_audio_buses.cpp
+msgid "Invalid file, not an audio bus layout."
+msgstr "Arquivo invalido; non é unha disposición dun Bus de son."
+
+#: editor/editor_audio_buses.cpp
+msgid "Error saving file: %s"
+msgstr "Erro gardando o arquivo: %s"
+
+#: editor/editor_audio_buses.cpp
+msgid "Add Bus"
+msgstr "Engadir Bus"
+
+#: editor/editor_audio_buses.cpp
+msgid "Add a new Audio Bus to this layout."
+msgstr "Engadir un novo Bus de Son a esta disposición."
+
+#: 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 "Cargar"
+
+#: editor/editor_audio_buses.cpp
+msgid "Load an existing Bus Layout."
+msgstr "Cargar unha disposición de Bus xa existente."
+
+#: editor/editor_audio_buses.cpp
+msgid "Save As"
+msgstr "Gardar Como"
+
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr "Gardar esta disposición de Bus a un arquivo."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+msgid "Load Default"
+msgstr "Cargar Valores por Defecto"
+
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr "Cargar a disposición de Bus por defecto."
+
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr "Crear unha nova Disposición de Bus."
+
+#: editor/editor_autoload_settings.cpp
+msgid "Invalid name."
+msgstr "Nome inválido."
+
+#: editor/editor_autoload_settings.cpp
+msgid "Valid characters:"
+msgstr "Caracteres válidos:"
+
+#: editor/editor_autoload_settings.cpp
+msgid "Must not collide with an existing engine class name."
+msgstr "Non debe coincidir co nome dunha clase xa existente no engine."
+
+#: editor/editor_autoload_settings.cpp
+msgid "Must not collide with an existing built-in type name."
+msgstr "Non debe coincidir co nome dun tipo xa existente no engine."
+
+#: editor/editor_autoload_settings.cpp
+msgid "Must not collide with an existing global constant name."
+msgstr "Non debe coincidir co nome dunha constante global xa existente."
+
+#: editor/editor_autoload_settings.cpp
+msgid "Keyword cannot be used as an autoload name."
+msgstr "Unha palabra clave non pode usarse como nome dun AutoCargador."
+
+#: editor/editor_autoload_settings.cpp
+msgid "Autoload '%s' already exists!"
+msgstr "Xa existe un AutoCargador nomeado '%s'!"
+
+#: editor/editor_autoload_settings.cpp
+msgid "Rename Autoload"
+msgstr "Renomear AutoCargador"
+
+#: editor/editor_autoload_settings.cpp
+msgid "Toggle AutoLoad Globals"
+msgstr ""
+
+#: editor/editor_autoload_settings.cpp
+msgid "Move Autoload"
+msgstr "Mover AutoCargador"
+
+#: editor/editor_autoload_settings.cpp
+msgid "Remove Autoload"
+msgstr "Eliminar AutoCargador"
+
+#: editor/editor_autoload_settings.cpp editor/editor_plugin_settings.cpp
+msgid "Enable"
+msgstr "Activar"
+
+#: editor/editor_autoload_settings.cpp
+msgid "Rearrange Autoloads"
+msgstr "Reordenar AutoCargadores"
+
+#: editor/editor_autoload_settings.cpp
+msgid "Can't add autoload:"
+msgstr "Non se puido engadir AutoCargador:"
+
+#: editor/editor_autoload_settings.cpp
+msgid "Add AutoLoad"
+msgstr "Engadir AutoCargador"
+
+#: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp
+#: editor/editor_plugin_settings.cpp
+#: editor/plugins/animation_tree_editor_plugin.cpp
+#: editor/script_create_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Path:"
+msgstr "Ruta:"
+
+#: editor/editor_autoload_settings.cpp
+msgid "Node Name:"
+msgstr "Nome do Nodo:"
+
+#: editor/editor_autoload_settings.cpp editor/editor_help_search.cpp
+#: editor/editor_profiler.cpp editor/project_manager.cpp
+#: editor/settings_config_dialog.cpp
+msgid "Name"
+msgstr "Nome"
+
+#: editor/editor_autoload_settings.cpp
+msgid "Singleton"
+msgstr ""
+
+#: editor/editor_data.cpp editor/inspector_dock.cpp
+msgid "Paste Params"
+msgstr "Pegar Parámetros"
+
+#: editor/editor_data.cpp
+msgid "Updating Scene"
+msgstr "Actualizando Escena"
+
+#: editor/editor_data.cpp
+msgid "Storing local changes..."
+msgstr "Gardando cambios locales..."
+
+#: editor/editor_data.cpp
+msgid "Updating scene..."
+msgstr "Actualizando escena..."
+
+#: editor/editor_data.cpp editor/editor_properties.cpp
+msgid "[empty]"
+msgstr "[baleiro]"
+
+#: editor/editor_data.cpp
+msgid "[unsaved]"
+msgstr "[non gardado]"
+
+#: editor/editor_dir_dialog.cpp
+msgid "Please select a base directory first."
+msgstr "Por favor, seleccione primeiro un directorio base."
+
+#: editor/editor_dir_dialog.cpp
+msgid "Choose a Directory"
+msgstr "Elixir un Directorio"
+
+#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
+#: editor/filesystem_dock.cpp editor/project_manager.cpp
+#: scene/gui/file_dialog.cpp
+msgid "Create Folder"
+msgstr "Crear Cartafol"
+
+#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
+#: editor/editor_plugin_settings.cpp editor/filesystem_dock.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_export.cpp
+#: modules/visual_script/visual_script_editor.cpp scene/gui/file_dialog.cpp
+msgid "Name:"
+msgstr "Nome:"
+
+#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
+#: editor/filesystem_dock.cpp scene/gui/file_dialog.cpp
+msgid "Could not create folder."
+msgstr "Non se puido crear cartafol."
+
+#: editor/editor_dir_dialog.cpp
+msgid "Choose"
+msgstr "Elixir"
+
+#: editor/editor_export.cpp
+msgid "Storing File:"
+msgstr "Gardando Arquivo:"
+
+#: editor/editor_export.cpp
+msgid "No export template found at the expected path:"
+msgstr "Non se encontrou ningún modelo de exportación na ruta esperada:"
+
+#: editor/editor_export.cpp
+msgid "Packing"
+msgstr "Empaquetando"
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC' texture compression for GLES2. Enable 'Import "
+"Etc' in Project Settings."
+msgstr ""
+"A plataforma actual require compresión de texturas 'ETC' para GLES2. Active "
+"'Importar Etc' na 'Configuración do Proxecto'."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' texture compression for GLES3. Enable "
+"'Import Etc 2' in Project Settings."
+msgstr ""
+"A plataforma actual require compresión de texturas 'ETC2' para GLES3. Active "
+"'Importar Etc 2' na 'Configuración do Proxecto'."
+
+#: 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 ""
+"A plataforma actual require unha compresión de texturas 'ETC' para o "
+"controlador de respaldo a GLES2.\n"
+"Active 'Importar Etc' na 'Configuración do Proxecto' ou desactive "
+"'Controlador de Respaldo Activado'."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'PVRTC' texture compression for GLES2. Enable "
+"'Import Pvrtc' in Project Settings."
+msgstr ""
+"A plataforma actual require compresión de texturas 'PVRTC' para GLES2. "
+"Active 'Importar Pvrtc' na 'Configuración do Proxecto'."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'ETC2' or 'PVRTC' texture compression for GLES3. "
+"Enable 'Import Etc 2' or 'Import Pvrtc' in Project Settings."
+msgstr ""
+"A plataforma actual require compresión de texturas 'ETC2' ou 'PVRTC' para "
+"GLES3. Active 'Importar Etc 2' ou 'Importar Pvrtc' na 'Configuración do "
+"Proxecto'."
+
+#: editor/editor_export.cpp
+msgid ""
+"Target platform requires 'PVRTC' texture compression for the driver fallback "
+"to GLES2.\n"
+"Enable 'Import Pvrtc' in Project Settings, or disable 'Driver Fallback "
+"Enabled'."
+msgstr ""
+"A plataforma actual require unha compresión de texturas 'PVRTC' para o "
+"controlador de respaldo a GLES2.\n"
+"Active 'Importar Pvrtc' na 'Configuración do Proxecto' ou desactive "
+"'Controlador de Respaldo Activado'."
+
+#: 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 debug template not found."
+msgstr "Non se encontrou un modelo de depuración personalizado."
+
+#: 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 ""
+
+#: editor/editor_export.cpp platform/javascript/export/export.cpp
+msgid "Template file not found:"
+msgstr "Non se encontrou o arquivo do modelo:"
+
+#: editor/editor_export.cpp
+msgid "On 32-bit exports the embedded PCK cannot be bigger than 4 GiB."
+msgstr "Na exportación de 32 bits o PCK integrado non pode ser maior de 4 GiB."
+
+#: editor/editor_feature_profile.cpp
+msgid "3D Editor"
+msgstr "Editor 3D"
+
+#: editor/editor_feature_profile.cpp
+msgid "Script Editor"
+msgstr "Editor de Scripts"
+
+#: editor/editor_feature_profile.cpp
+msgid "Asset Library"
+msgstr "Biblioteca de Assets"
+
+#: editor/editor_feature_profile.cpp
+msgid "Scene Tree Editing"
+msgstr "Edición de Ãrbore de Escenas"
+
+#: editor/editor_feature_profile.cpp
+msgid "Node Dock"
+msgstr "Panel de Nodos"
+
+#: editor/editor_feature_profile.cpp
+msgid "FileSystem Dock"
+msgstr "Panel de Sistema de Arquivos"
+
+#: editor/editor_feature_profile.cpp
+msgid "Import Dock"
+msgstr "Panel de Importación"
+
+#: editor/editor_feature_profile.cpp
+msgid "Erase profile '%s'? (no undo)"
+msgstr "Eliminar perfil '%s'? (non se pode deshacer)"
+
+#: editor/editor_feature_profile.cpp
+msgid "Profile must be a valid filename and must not contain '.'"
+msgstr "Un perfil debe ter un nome de arquivo válido, e non pode conter '.'"
+
+#: editor/editor_feature_profile.cpp
+msgid "Profile with this name already exists."
+msgstr "Un perfil con este nome xa existe."
+
+#: editor/editor_feature_profile.cpp
+msgid "(Editor Disabled, Properties Disabled)"
+msgstr "(Editor Desactivado, Propiedades Desactivadas)"
+
+#: editor/editor_feature_profile.cpp
+msgid "(Properties Disabled)"
+msgstr "(Propiedades Desactivadas)"
+
+#: editor/editor_feature_profile.cpp
+msgid "(Editor Disabled)"
+msgstr "(Editor Desactivado)"
+
+#: editor/editor_feature_profile.cpp
+msgid "Class Options:"
+msgstr "Opcións de Clase:"
+
+#: editor/editor_feature_profile.cpp
+msgid "Enable Contextual Editor"
+msgstr "Activar o Editor Contextual"
+
+#: editor/editor_feature_profile.cpp
+msgid "Enabled Properties:"
+msgstr "Propiedades Activadas:"
+
+#: editor/editor_feature_profile.cpp
+msgid "Enabled Features:"
+msgstr "Características Activadas:"
+
+#: editor/editor_feature_profile.cpp
+msgid "Enabled Classes:"
+msgstr "Clases Activadas:"
+
+#: editor/editor_feature_profile.cpp
+msgid "File '%s' format is invalid, import aborted."
+msgstr "O formato '%s' do arquivo non é válido, a importación foi cancelada."
+
+#: editor/editor_feature_profile.cpp
+msgid ""
+"Profile '%s' already exists. Remove it first before importing, import "
+"aborted."
+msgstr ""
+"O perfil '%s' xa existe. Elimínao antes de importar; importación abortada."
+
+#: editor/editor_feature_profile.cpp
+msgid "Error saving profile to path: '%s'."
+msgstr "Erro gardando o perfil á ruta: '%s'."
+
+#: editor/editor_feature_profile.cpp
+msgid "Unset"
+msgstr ""
+
+#: editor/editor_feature_profile.cpp
+msgid "Current Profile:"
+msgstr "Perfil Actual:"
+
+#: editor/editor_feature_profile.cpp
+msgid "Make Current"
+msgstr "Convertelo no Actual"
+
+#: editor/editor_feature_profile.cpp
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "New"
+msgstr "Novo"
+
+#: editor/editor_feature_profile.cpp editor/editor_node.cpp
+#: editor/project_manager.cpp
+msgid "Import"
+msgstr "Importación"
+
+#: editor/editor_feature_profile.cpp editor/project_export.cpp
+msgid "Export"
+msgstr "Exportación"
+
+#: editor/editor_feature_profile.cpp
+msgid "Available Profiles:"
+msgstr "Perfils Dispoñibles:"
+
+#: editor/editor_feature_profile.cpp
+msgid "Class Options"
+msgstr "Opcións de Clase"
+
+#: editor/editor_feature_profile.cpp
+msgid "New profile name:"
+msgstr "Nome do novo perfil:"
+
+#: editor/editor_feature_profile.cpp
+msgid "Erase Profile"
+msgstr "Eliminar Perfil"
+
+#: editor/editor_feature_profile.cpp
+msgid "Godot Feature Profile"
+msgstr "Perfil de Características de Godot"
+
+#: editor/editor_feature_profile.cpp
+msgid "Import Profile(s)"
+msgstr "Importar Perfil(s)"
+
+#: editor/editor_feature_profile.cpp
+msgid "Export Profile"
+msgstr "Exportar Perfil"
+
+#: editor/editor_feature_profile.cpp
+msgid "Manage Editor Feature Profiles"
+msgstr "Administrar Perfils de Características de Godot"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Select Current Folder"
+msgstr "Seleccionar Cartafol Actual"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "File Exists, Overwrite?"
+msgstr "O arquivo xa existe ¿Queres sobreescribilo?"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Select This Folder"
+msgstr "Seleccionar Este Cartafol"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "Copy Path"
+msgstr "Copiar Ruta"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "Open in File Manager"
+msgstr "Abrir no Explorador de Arquivos"
+
+#: editor/editor_file_dialog.cpp editor/editor_node.cpp
+#: editor/filesystem_dock.cpp editor/project_manager.cpp
+msgid "Show in File Manager"
+msgstr "Amosar no Explorador de Arquivos"
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "New Folder..."
+msgstr "Novo Cartafol..."
+
+#: editor/editor_file_dialog.cpp editor/find_in_files.cpp
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Refresh"
+msgstr "Actualizar"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "All Recognized"
+msgstr "Todos Recoñecidos"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "All Files (*)"
+msgstr "Todos os Arquivos (*)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Abrir un Arquivo"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Abrir Arquivo(s)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Abrir un Directorio"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Abrir un Arquivo ou Directorio"
+
+#: editor/editor_file_dialog.cpp editor/editor_node.cpp
+#: editor/editor_properties.cpp editor/inspector_dock.cpp
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/script_editor_plugin.cpp scene/gui/file_dialog.cpp
+msgid "Save"
+msgstr "Gardar"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Save a File"
+msgstr "Gardar un Arquivo"
+
+#: editor/editor_file_dialog.cpp
+msgid "Go Back"
+msgstr "Retroceder"
+
+#: editor/editor_file_dialog.cpp
+msgid "Go Forward"
+msgstr "Avanzar"
+
+#: editor/editor_file_dialog.cpp
+msgid "Go Up"
+msgstr "Subir"
+
+#: editor/editor_file_dialog.cpp
+#, fuzzy
+msgid "Toggle Hidden Files"
+msgstr "Amosar/Ocultar Arquivos Ocultos"
+
+#: editor/editor_file_dialog.cpp
+msgid "Toggle Favorite"
+msgstr "Act./Desact. Favorito"
+
+#: editor/editor_file_dialog.cpp
+msgid "Toggle Mode"
+msgstr "Act./Desact. Modo"
+
+#: editor/editor_file_dialog.cpp
+msgid "Focus Path"
+msgstr ""
+
+#: editor/editor_file_dialog.cpp
+msgid "Move Favorite Up"
+msgstr "Subir Favorito"
+
+#: editor/editor_file_dialog.cpp
+msgid "Move Favorite Down"
+msgstr "Baixar Favorito"
+
+#: editor/editor_file_dialog.cpp
+msgid "Go to previous folder."
+msgstr "Ir ao cartafol anterior."
+
+#: editor/editor_file_dialog.cpp
+msgid "Go to next folder."
+msgstr "Ir ao cartafol seguinte."
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Go to parent folder."
+msgstr "Ir ao cartafol padre."
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Refresh files."
+msgstr "Actualizar Arquivos."
+
+#: editor/editor_file_dialog.cpp
+msgid "(Un)favorite current folder."
+msgstr "Quitar cartafol actual de favoritos."
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Toggle the visibility of hidden files."
+msgstr "Amosar/Ocultar arquivos ocultos."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a grid of thumbnails."
+msgstr "Ver elementos coma unha cuadrícula de miniaturas."
+
+#: editor/editor_file_dialog.cpp editor/filesystem_dock.cpp
+msgid "View items as a list."
+msgstr "Ver elementos coma unha lista."
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Directories & Files:"
+msgstr "Directorios e Arquivos:"
+
+#: editor/editor_file_dialog.cpp editor/plugins/sprite_editor_plugin.cpp
+#: editor/plugins/style_box_editor_plugin.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp
+msgid "Preview:"
+msgstr "Vista Previa:"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "File:"
+msgstr "Arquivo:"
+
+#: editor/editor_file_system.cpp
+msgid "ScanSources"
+msgstr "Escanear Fontes"
+
+#: editor/editor_file_system.cpp
+msgid ""
+"There are multiple importers for different types pointing to file %s, import "
+"aborted"
+msgstr ""
+
+#: editor/editor_file_system.cpp
+msgid "(Re)Importing Assets"
+msgstr "(Re)Importando Assets"
+
+#: editor/editor_help.cpp editor/plugins/spatial_editor_plugin.cpp
+msgid "Top"
+msgstr "Superior"
+
+#: editor/editor_help.cpp
+msgid "Class:"
+msgstr "Clase:"
+
+#: editor/editor_help.cpp editor/scene_tree_editor.cpp
+#: editor/script_create_dialog.cpp
+msgid "Inherits:"
+msgstr "Herda de:"
+
+#: editor/editor_help.cpp
+msgid "Inherited by:"
+msgstr "Herdado de:"
+
+#: editor/editor_help.cpp
+msgid "Description"
+msgstr "Descrición"
+
+#: editor/editor_help.cpp
+msgid "Online Tutorials"
+msgstr "Tutoriales en liña"
+
+#: editor/editor_help.cpp
+msgid "Properties"
+msgstr "Propiedades"
+
+#: editor/editor_help.cpp
+msgid "override:"
+msgstr "sobrescribir:"
+
+#: editor/editor_help.cpp
+msgid "default:"
+msgstr "por defecto:"
+
+#: editor/editor_help.cpp
+msgid "Methods"
+msgstr "Métodos"
+
+#: editor/editor_help.cpp
+#, fuzzy
+msgid "Theme Properties"
+msgstr "Propiedades do Tema"
+
+#: editor/editor_help.cpp
+msgid "Enumerations"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "Constants"
+msgstr "Constantes"
+
+#: editor/editor_help.cpp
+msgid "Property Descriptions"
+msgstr "Descrición de Propiedades"
+
+#: editor/editor_help.cpp
+msgid "(value)"
+msgstr "(valor)"
+
+#: editor/editor_help.cpp
+msgid ""
+"There is currently no description for this property. Please help us by "
+"[color=$color][url=$url]contributing one[/url][/color]!"
+msgstr ""
+"Actualmente non hai unha descripción desta propiedade. Axúdanos [color="
+"$color][url=$url]contribuíndo cunha descripción[/url][/color]!"
+
+#: editor/editor_help.cpp
+msgid "Method Descriptions"
+msgstr "Descrición de Métodos"
+
+#: editor/editor_help.cpp
+msgid ""
+"There is currently no description for this method. Please help us by [color="
+"$color][url=$url]contributing one[/url][/color]!"
+msgstr ""
+"Actualmente non hai unha descripción deste método. Axúdanos [color=$color]"
+"[url=$url]contribuíndo cunha descripción[/url][/color]!"
+
+#: editor/editor_help_search.cpp editor/editor_node.cpp
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Search Help"
+msgstr "Buscar na Axuda"
+
+#: editor/editor_help_search.cpp
+msgid "Case Sensitive"
+msgstr "Distinguir Maíusculas e Minúsculas"
+
+#: editor/editor_help_search.cpp
+msgid "Show Hierarchy"
+msgstr "Amosar Xerarquía"
+
+#: editor/editor_help_search.cpp
+msgid "Display All"
+msgstr "Amosar Todo"
+
+#: editor/editor_help_search.cpp
+msgid "Classes Only"
+msgstr "Só Clases"
+
+#: editor/editor_help_search.cpp
+msgid "Methods Only"
+msgstr "Só Métodos"
+
+#: editor/editor_help_search.cpp
+msgid "Signals Only"
+msgstr "Só Sinais"
+
+#: editor/editor_help_search.cpp
+msgid "Constants Only"
+msgstr "Só Constantes"
+
+#: editor/editor_help_search.cpp
+msgid "Properties Only"
+msgstr "Só Propiedades"
+
+#: editor/editor_help_search.cpp
+msgid "Theme Properties Only"
+msgstr "Só Propiedades de Temas"
+
+#: editor/editor_help_search.cpp
+msgid "Member Type"
+msgstr "Tipo do Membro"
+
+#: editor/editor_help_search.cpp
+msgid "Class"
+msgstr "Clase"
+
+#: editor/editor_help_search.cpp
+msgid "Method"
+msgstr "Método"
+
+#: editor/editor_help_search.cpp editor/plugins/script_text_editor.cpp
+msgid "Signal"
+msgstr "Sinal"
+
+#: editor/editor_help_search.cpp editor/plugins/theme_editor_plugin.cpp
+msgid "Constant"
+msgstr "Constante"
+
+#: editor/editor_help_search.cpp
+msgid "Property"
+msgstr "Propiedade"
+
+#: editor/editor_help_search.cpp
+msgid "Theme Property"
+msgstr "Propiedade de Temas"
+
+#: editor/editor_inspector.cpp editor/project_settings_editor.cpp
+msgid "Property:"
+msgstr "Propiedade:"
+
+#: editor/editor_inspector.cpp
+msgid "Set"
+msgstr "Establecer"
+
+#: editor/editor_inspector.cpp
+msgid "Set Multiple:"
+msgstr "Establecer Varios:"
+
+#: editor/editor_log.cpp
+msgid "Output:"
+msgstr "Saída:"
+
+#: editor/editor_log.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Copy Selection"
+msgstr "Copiar Selección"
+
+#: editor/editor_log.cpp editor/editor_network_profiler.cpp
+#: editor/editor_profiler.cpp editor/editor_properties.cpp
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#: editor/property_editor.cpp editor/scene_tree_dock.cpp
+#: editor/script_editor_debugger.cpp
+#: modules/gdnative/gdnative_library_editor_plugin.cpp scene/gui/line_edit.cpp
+#: scene/gui/text_edit.cpp
+msgid "Clear"
+msgstr "Limpar"
+
+#: editor/editor_log.cpp
+msgid "Clear Output"
+msgstr "Limpar Saída"
+
+#: editor/editor_network_profiler.cpp editor/editor_node.cpp
+#: editor/editor_profiler.cpp
+msgid "Stop"
+msgstr "Deter"
+
+#: editor/editor_network_profiler.cpp editor/editor_profiler.cpp
+#: editor/plugins/animation_state_machine_editor.cpp editor/rename_dialog.cpp
+msgid "Start"
+msgstr "Iniciar"
+
+#: editor/editor_network_profiler.cpp
+msgid "%s/s"
+msgstr "%s/s"
+
+#: editor/editor_network_profiler.cpp
+msgid "Down"
+msgstr "Baixada"
+
+#: editor/editor_network_profiler.cpp
+msgid "Up"
+msgstr "Subida"
+
+#: editor/editor_network_profiler.cpp editor/editor_node.cpp
+msgid "Node"
+msgstr "Nodo"
+
+#: editor/editor_network_profiler.cpp
+msgid "Incoming RPC"
+msgstr "RPC Entrante"
+
+#: editor/editor_network_profiler.cpp
+msgid "Incoming RSET"
+msgstr "RSET Entrante"
+
+#: editor/editor_network_profiler.cpp
+msgid "Outgoing RPC"
+msgstr "RPC Saínte"
+
+#: editor/editor_network_profiler.cpp
+msgid "Outgoing RSET"
+msgstr "RSET Saínte"
+
+#: editor/editor_node.cpp editor/project_manager.cpp
+msgid "New Window"
+msgstr "Nova Xanela"
+
+#: editor/editor_node.cpp
+msgid "Imported resources can't be saved."
+msgstr "Os recursos importados non se poden gardar."
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "Vale"
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Error saving resource!"
+msgstr "Erro gardando o 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 ""
+"Este recurso non pode gardarse porque non pertence á escena actual. Primero "
+"fágao único."
+
+#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Save Resource As..."
+msgstr "Gardar Recurso Como..."
+
+#: editor/editor_node.cpp
+msgid "Can't open file for writing:"
+msgstr "Non se puido abrir o arquivo para escritura:"
+
+#: editor/editor_node.cpp
+msgid "Requested file format unknown:"
+msgstr "O formato do arquivo solicitado é descoñecido:"
+
+#: editor/editor_node.cpp
+msgid "Error while saving."
+msgstr "Erro ao gardar."
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Can't open '%s'. The file could have been moved or deleted."
+msgstr ""
+"Non se puido abrir '%s'. Pode ser que o arquivo fose movido ou eliminado."
+
+#: editor/editor_node.cpp
+msgid "Error while parsing '%s'."
+msgstr "Erro ao analizar sintacticamente '%s'."
+
+#: editor/editor_node.cpp
+msgid "Unexpected end of file '%s'."
+msgstr "Fin de arquivo inesperado en '%s'."
+
+#: editor/editor_node.cpp
+msgid "Missing '%s' or its dependencies."
+msgstr "Non se encontrou '%s' ou as súas dependencias."
+
+#: editor/editor_node.cpp
+msgid "Error while loading '%s'."
+msgstr "Erro ao cargar '%s'."
+
+#: editor/editor_node.cpp
+msgid "Saving Scene"
+msgstr "Gardando Escena"
+
+#: editor/editor_node.cpp
+msgid "Analyzing"
+msgstr "Analizando"
+
+#: editor/editor_node.cpp
+msgid "Creating Thumbnail"
+msgstr "Creando Miniatura"
+
+#: editor/editor_node.cpp
+msgid "This operation can't be done without a tree root."
+msgstr "Esta operación non pode realizarse sen un nodo raíz."
+
+#: editor/editor_node.cpp
+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 ""
+"Esta escena non pode gardarse porque hai unha relación de instanciación "
+"cíclica con outra escena.\n"
+"Por favor, solucione o problema e inténteo de novo."
+
+#: editor/editor_node.cpp
+msgid ""
+"Couldn't save scene. Likely dependencies (instances or inheritance) couldn't "
+"be satisfied."
+msgstr ""
+"Non se puido gardar a escena. Posiblemente as dependencias (instancias ou "
+"herenzas) non puideron satisfacerse."
+
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "Can't overwrite scene that is still open!"
+msgstr "Non se pode sobreescribir escena que sigue aberta!"
+
+#: editor/editor_node.cpp
+msgid "Can't load MeshLibrary for merging!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Error saving MeshLibrary!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Can't load TileSet for merging!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Error saving TileSet!"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"An error occurred while trying to save the editor layout.\n"
+"Make sure the editor's user data path is writable."
+msgstr ""
+"Produciuse un erro mentres se trataba de gardar a disposición das ventás do "
+"editor.\n"
+"Asegúrese de que o cartafol do editor ten dereitos de escritura."
+
+#: editor/editor_node.cpp
+msgid ""
+"Default editor layout overridden.\n"
+"To restore the Default layout to its base settings, use the Delete Layout "
+"option and delete the Default layout."
+msgstr ""
+"A disposición por defecto do editor foi sobreescrita.\n"
+"Para devolver a disposición por defecto a súa configuración orixinal, usa a "
+"opción 'Eliminar Disposición' e elimina a Disposición por defecto."
+
+#: editor/editor_node.cpp
+msgid "Layout name not found!"
+msgstr "Nome de disposición non encontrada!"
+
+#: editor/editor_node.cpp
+msgid "Restored the Default layout to its base settings."
+msgstr "Restableceuse a disposición por defecto aos seus valores orixinais."
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource belongs to a scene that was imported, so it's not editable.\n"
+"Please read the documentation relevant to importing scenes to better "
+"understand this workflow."
+msgstr ""
+"Este recurso pertence a unha escena importada, polo que non é editable.\n"
+"Por favor; lea a documentación referente a importación de escenas para "
+"entender o fluxo de traballo."
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource belongs to a scene that was instanced or inherited.\n"
+"Changes to it won't be kept when saving the current scene."
+msgstr ""
+"Este recurso pertence a unha escena instanciada ou herdada.\n"
+"Os cambios que lle faga non se gardarán cando garde a escena actual."
+
+#: editor/editor_node.cpp
+msgid ""
+"This resource was imported, so it's not editable. Change its settings in the "
+"import panel and then re-import."
+msgstr ""
+"Este recurso foi importado, polo que non é editable. Cambia a súa "
+"configuración no panel de importación, e reimportao."
+
+#: editor/editor_node.cpp
+msgid ""
+"This scene was imported, so changes to it won't be kept.\n"
+"Instancing it or inheriting will allow making changes to it.\n"
+"Please read the documentation relevant to importing scenes to better "
+"understand this workflow."
+msgstr ""
+"Esta escena foi importada, polo que cambios na escena non serán gardados.\n"
+"Instanciala ou herdala permitirá facerlle cambios permanentes.\n"
+"Por favor, lea a documentación referente a importación de escenas para "
+"entender o fluxo de traballo."
+
+#: editor/editor_node.cpp
+msgid ""
+"This is a remote object, so changes to it won't be kept.\n"
+"Please read the documentation relevant to debugging to better understand "
+"this workflow."
+msgstr ""
+"Este é un obxecto remoto, polo que os cambios que lle faga non serán "
+"permanentes.\n"
+"Por favor; lea a documentación referente a depuración para entender o fluxo "
+"de traballo."
+
+#: editor/editor_node.cpp
+msgid "There is no defined scene to run."
+msgstr "Non hai unha escena definida para executar."
+
+#: editor/editor_node.cpp
+msgid "Save scene before running..."
+msgstr "Garda a escena antes de executala..."
+
+#: editor/editor_node.cpp
+msgid "Could not start subprocess!"
+msgstr "Non se puido iniciar subproceso!"
+
+#: editor/editor_node.cpp editor/filesystem_dock.cpp
+msgid "Open Scene"
+msgstr "Abrir Escena"
+
+#: editor/editor_node.cpp
+msgid "Open Base Scene"
+msgstr "Abrir Escena Base"
+
+#: editor/editor_node.cpp
+msgid "Quick Open..."
+msgstr "Apertura Rápida..."
+
+#: editor/editor_node.cpp
+msgid "Quick Open Scene..."
+msgstr "Apertura Rápida de Escena..."
+
+#: editor/editor_node.cpp
+msgid "Quick Open Script..."
+msgstr "Apertura Rápida de Script..."
+
+#: editor/editor_node.cpp
+msgid "Save & Close"
+msgstr "Gardar e Pechar"
+
+#: editor/editor_node.cpp
+msgid "Save changes to '%s' before closing?"
+msgstr "Gardar os cambios de '%s' antes de pechar?"
+
+#: editor/editor_node.cpp
+msgid "Saved %s modified resource(s)."
+msgstr "Gardado(s) %s recurso(s) modificado(s)."
+
+#: editor/editor_node.cpp
+msgid "A root node is required to save the scene."
+msgstr "Necesítase un nodo raíz para gardar a escena."
+
+#: editor/editor_node.cpp
+msgid "Save Scene As..."
+msgstr "Gardar Escena Como..."
+
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr "Esta operación non pode realizarse se unha escena."
+
+#: editor/editor_node.cpp
+msgid "Export Mesh Library"
+msgstr "Exportar Biblioteca de Mallas"
+
+#: editor/editor_node.cpp
+msgid "This operation can't be done without a root node."
+msgstr "Esta operación non pode realizarse sen un nodo raíz."
+
+#: editor/editor_node.cpp
+msgid "Export Tile Set"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "This operation can't be done without a selected node."
+msgstr "Esta operación non pode realizarse sen un nodo seleccionado."
+
+#: editor/editor_node.cpp
+msgid "Current scene not saved. Open anyway?"
+msgstr "Escena actual non gardada ¿Abrir de todos os modos?"
+
+#: editor/editor_node.cpp
+msgid "Can't reload a scene that was never saved."
+msgstr "Non se pode volver a cargar unha escena que nunca foi gardada."
+
+#: editor/editor_node.cpp
+msgid "Reload Saved Scene"
+msgstr "Recargar Escena Gardada"
+
+#: editor/editor_node.cpp
+msgid ""
+"The current scene has unsaved changes.\n"
+"Reload the saved scene anyway? This action cannot be undone."
+msgstr ""
+"A escena actual ten cambios non gardados.\n"
+"Quere volver a cargar a escena cargada de todos os modos? Esta acción non se "
+"pode deshacer."
+
+#: editor/editor_node.cpp
+msgid "Quick Run Scene..."
+msgstr "Execución Rápida de Escena..."
+
+#: editor/editor_node.cpp
+msgid "Quit"
+msgstr "Saír"
+
+#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Si"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Saír do editor?"
+
+#: editor/editor_node.cpp
+msgid "Open Project Manager?"
+msgstr "Abrir o Administrador de Proxectos?"
+
+#: editor/editor_node.cpp
+msgid "Save & Quit"
+msgstr "Gardar e Saír"
+
+#: editor/editor_node.cpp
+msgid "Save changes to the following scene(s) before quitting?"
+msgstr "Gardar os cambios nas seguintes escenas antes de saír?"
+
+#: editor/editor_node.cpp
+msgid "Save changes the following scene(s) before opening Project Manager?"
+msgstr ""
+"Gardar os cambios nas seguintes escenas antes de abrir o Administrador de "
+"Proxectos?"
+
+#: editor/editor_node.cpp
+msgid ""
+"This option is deprecated. Situations where refresh must be forced are now "
+"considered a bug. Please report."
+msgstr ""
+"Esta opción está anticuada. As situacións nas que a actualización debe ser "
+"forzada agora considéranse un erro. Por favor, repórtao."
+
+#: editor/editor_node.cpp
+msgid "Pick a Main Scene"
+msgstr "Elexir unha Escena Principal"
+
+#: editor/editor_node.cpp
+msgid "Close Scene"
+msgstr "Pechar Escena"
+
+#: editor/editor_node.cpp
+msgid "Reopen Closed Scene"
+msgstr "Reabrir Escena Pechada"
+
+#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '%s' parsing of config failed."
+msgstr ""
+"Non se puido activar a característica adicional (Plugin): Fallou a análise "
+"sintáctica da configuración de '%s'."
+
+#: editor/editor_node.cpp
+msgid "Unable to find script field for addon plugin at: 'res://addons/%s'."
+msgstr ""
+"Non se puido encontrar o campo do Script na característica adicional "
+"(Plugin) en 'res://addons/%s'."
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s'."
+msgstr ""
+"Non se puido cargar Script de característica adicional (Addon) na ruta: '%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 ""
+"Non se puido cargar Script de característica adicional (Addon) na ruta: "
+"'%s'. Parece que hai un erro no código; por favor, comproba a sintaxe."
+
+#: editor/editor_node.cpp
+msgid ""
+"Unable to load addon script from path: '%s' Base type is not EditorPlugin."
+msgstr ""
+"Non se puido cargar o Script da característica adicional (Plugin): O tipo "
+"base de %s non é EditorPlugin."
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '%s' Script is not in tool mode."
+msgstr ""
+"Non se puido cargar Script de característica adicional (Addon) na ruta: "
+"'%s'. O script non está en modo ferramenta (tool)."
+
+#: 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 ""
+"A escena '%s' foi automáticamente importada, polo que non pode modificarse.\n"
+"Para facerlle cambios pódese crear unha nova escena herdada."
+
+#: 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 ""
+"Erro cargando a escena: debe estar dentro da ruta do proxecto. Usa \"Importar"
+"\" para abrir a escena, e despois gardala dentro da ruta do proxecto."
+
+#: editor/editor_node.cpp
+msgid "Scene '%s' has broken dependencies:"
+msgstr "A escena '%s' ten dependencias rotas:"
+
+#: editor/editor_node.cpp
+msgid "Clear Recent Scenes"
+msgstr "Limpar Escenas Recentes"
+
+#: editor/editor_node.cpp
+msgid ""
+"No main scene has ever been defined, select one?\n"
+"You can change it later in \"Project Settings\" under the 'application' "
+"category."
+msgstr ""
+"Nunca se definiu unha escena principal. Seleccionar unha?\n"
+"Podes cambialo despois na \"Configuración do Proxecto\", na categoría "
+"\"Aplicación\"."
+
+#: editor/editor_node.cpp
+msgid ""
+"Selected scene '%s' does not exist, select a valid one?\n"
+"You can change it later in \"Project Settings\" under the 'application' "
+"category."
+msgstr ""
+"A escena seleccionada '%s' non existe. Seleccionar unha válida?\n"
+"Podes cambiala despois en \"Configuración do Proxecto\" na categoría "
+"\"aplicación\"."
+
+#: editor/editor_node.cpp
+msgid ""
+"Selected scene '%s' is not a scene file, select a valid one?\n"
+"You can change it later in \"Project Settings\" under the 'application' "
+"category."
+msgstr ""
+"A escena seleccionada '%s' non é un arquivo de escenas. Seleccionar un "
+"arquivo válido?\n"
+"Podes cambialo despois en \"Configuración do Proxecto\" na categoría "
+"\"aplicación\"."
+
+#: editor/editor_node.cpp
+msgid "Save Layout"
+msgstr "Gardar Disposición"
+
+#: editor/editor_node.cpp
+msgid "Delete Layout"
+msgstr "Eliminar Dispoción"
+
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Por Defecto"
+
+#: editor/editor_node.cpp editor/editor_properties.cpp
+#: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp
+msgid "Show in FileSystem"
+msgstr "Amosar no Sistema de Arquivos"
+
+#: editor/editor_node.cpp
+msgid "Play This Scene"
+msgstr "Reproducir Esta Escena"
+
+#: editor/editor_node.cpp
+msgid "Close Tab"
+msgstr "Pechar Pestana"
+
+#: editor/editor_node.cpp
+msgid "Undo Close Tab"
+msgstr "Desfacer Pechar Pestana"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Close Other Tabs"
+msgstr "Pechar Outras Pestanas"
+
+#: editor/editor_node.cpp
+msgid "Close Tabs to the Right"
+msgstr "Pechar Pestanas á Dereita"
+
+#: editor/editor_node.cpp
+msgid "Close All Tabs"
+msgstr "Pechar Todas as Pestanas"
+
+#: editor/editor_node.cpp
+msgid "Switch Scene Tab"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "%d more files or folders"
+msgstr "%d arquivos ou cartafois máis"
+
+#: editor/editor_node.cpp
+msgid "%d more folders"
+msgstr "%d cartafois máis"
+
+#: editor/editor_node.cpp
+msgid "%d more files"
+msgstr "%d arquivos máis"
+
+#: editor/editor_node.cpp
+msgid "Dock Position"
+msgstr "Posición do Panel"
+
+#: editor/editor_node.cpp
+msgid "Distraction Free Mode"
+msgstr "Modo Sen Distraccións"
+
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr "Act./Desact. modo sen distraccións."
+
+#: editor/editor_node.cpp
+msgid "Add a new scene."
+msgstr "Engadir unha nova escena."
+
+#: editor/editor_node.cpp
+msgid "Scene"
+msgstr "Escena"
+
+#: editor/editor_node.cpp
+msgid "Go to previously opened scene."
+msgstr "Ir á escena aberta previamente."
+
+#: editor/editor_node.cpp
+msgid "Copy Text"
+msgstr "Copiar Texto"
+
+#: editor/editor_node.cpp
+msgid "Next tab"
+msgstr "Seguinte pestana"
+
+#: editor/editor_node.cpp
+msgid "Previous tab"
+msgstr "Anterior Pestana"
+
+#: editor/editor_node.cpp
+msgid "Filter Files..."
+msgstr "Filtrar Arquivos..."
+
+#: editor/editor_node.cpp
+msgid "Operations with scene files."
+msgstr "Operacións con arquivos de escenas."
+
+#: editor/editor_node.cpp
+msgid "New Scene"
+msgstr "Nova Escena"
+
+#: editor/editor_node.cpp
+msgid "New Inherited Scene..."
+msgstr "Nova Escena Herdada..."
+
+#: editor/editor_node.cpp
+msgid "Open Scene..."
+msgstr "Abrir Escena..."
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Open Recent"
+msgstr "Abrir Recente"
+
+#: editor/editor_node.cpp
+msgid "Save Scene"
+msgstr "Gardar Escena"
+
+#: editor/editor_node.cpp
+msgid "Save All Scenes"
+msgstr "Gardar Todas as Escenas"
+
+#: editor/editor_node.cpp
+msgid "Convert To..."
+msgstr "Converter a..."
+
+#: editor/editor_node.cpp
+msgid "MeshLibrary..."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "TileSet..."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
+#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
+msgid "Undo"
+msgstr "Desfacer"
+
+#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
+#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
+msgid "Redo"
+msgstr "Refacer"
+
+#: editor/editor_node.cpp
+msgid "Miscellaneous project or scene-wide tools."
+msgstr "Ferramentas varias do proxecto ou escena."
+
+#: editor/editor_node.cpp editor/project_manager.cpp
+#: editor/script_create_dialog.cpp
+msgid "Project"
+msgstr "Proxecto"
+
+#: editor/editor_node.cpp
+msgid "Project Settings..."
+msgstr "Axustes do Proxecto..."
+
+#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
+msgid "Version Control"
+msgstr "Control de Versións"
+
+#: editor/editor_node.cpp editor/plugins/version_control_editor_plugin.cpp
+msgid "Set Up Version Control"
+msgstr "Configurar Control de Versións"
+
+#: editor/editor_node.cpp
+msgid "Shut Down Version Control"
+msgstr "Desactivar Control de Versións"
+
+#: editor/editor_node.cpp
+msgid "Export..."
+msgstr "Exportar..."
+
+#: editor/editor_node.cpp
+msgid "Install Android Build Template..."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Open Project Data Folder"
+msgstr "Abrir Cartafol de Datos do Proxecto"
+
+#: editor/editor_node.cpp editor/plugins/tile_set_editor_plugin.cpp
+msgid "Tools"
+msgstr "Ferramentas"
+
+#: editor/editor_node.cpp
+msgid "Orphan Resource Explorer..."
+msgstr "Explorador de Recursos Orfos..."
+
+#: editor/editor_node.cpp
+msgid "Quit to Project List"
+msgstr "Saír á Lista de Proxectos"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/project_export.cpp
+msgid "Debug"
+msgstr "Depuración"
+
+#: editor/editor_node.cpp
+msgid "Deploy with Remote Debug"
+msgstr "Exportar con Depuración Remota"
+
+#: editor/editor_node.cpp
+msgid ""
+"When this option is enabled, using one-click deploy will make the executable "
+"attempt to connect to this computer's IP so the running project can be "
+"debugged.\n"
+"This option is intended to be used for remote debugging (typically with a "
+"mobile device).\n"
+"You don't need to enable it to use the GDScript debugger locally."
+msgstr ""
+"Cando esta opción está activada, usar o despregue dun só clic fará que o "
+"executable intente conectarse a IP deste computador, para poder depurar o "
+"proxecto mentres este está executandose no dispositivo.\n"
+"Esta opción está pensada para ser utilizada coa depuración remota "
+"(normalmente nun dispositivo móbil).\n"
+"Non necesita activar esta opción para utilizar o depurador de GDScript de "
+"forma local."
+
+#: editor/editor_node.cpp
+msgid "Small Deploy with Network Filesystem"
+msgstr "Exportación Reducida co Sistema de Arquivos en Rede"
+
+#: editor/editor_node.cpp
+msgid ""
+"When this option is enabled, using one-click deploy for Android will only "
+"export an executable without the project data.\n"
+"The filesystem will be provided from the project by the editor over the "
+"network.\n"
+"On Android, deploying will use the USB cable for faster performance. This "
+"option speeds up testing for projects with large assets."
+msgstr ""
+"Cando esta opción está activada, usar o despregue don só clic para Android "
+"exportará só o executable, sen os datos do proxecto.\n"
+"O sistema de arquivos proporcionarase por o editor na rede.\n"
+"En Android ao despregar a aplicación usarase o USB para obter maior "
+"rendemento. Esta opción acelera o proceso de proba en proxectos con gran "
+"cantidade de Assets."
+
+#: editor/editor_node.cpp
+msgid "Visible Collision Shapes"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"When this option is enabled, collision shapes and raycast nodes (for 2D and "
+"3D) will be visible in the running project."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Visible Navigation"
+msgstr "Navegación Visible"
+
+#: editor/editor_node.cpp
+msgid ""
+"When this option is enabled, navigation meshes and polygons will be visible "
+"in the running project."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Synchronize Scene Changes"
+msgstr "Sincronizar Cambios na Escena"
+
+#: editor/editor_node.cpp
+msgid ""
+"When this option is enabled, any changes made to the scene in the editor "
+"will be replicated in the running project.\n"
+"When used remotely on a device, this is more efficient when the network "
+"filesystem option is enabled."
+msgstr ""
+"Cando esta opción está activada, calquera cambio na escena no editor verase "
+"reflectido no proxecto en execución.\n"
+"Cando é usado remotamente nun dispositivo, é máis eficiente cando o sistema "
+"de arquivos en rede está activado."
+
+#: editor/editor_node.cpp
+msgid "Synchronize Script Changes"
+msgstr "Sincronizar Cambios nos Scripts"
+
+#: editor/editor_node.cpp
+msgid ""
+"When this option is enabled, any script that is saved will be reloaded in "
+"the running project.\n"
+"When used remotely on a device, this is more efficient when the network "
+"filesystem option is enabled."
+msgstr ""
+"Cando esta opción está activada, calquera script gardada será recargada no "
+"proxecto mentras este está en execución.\n"
+"Cando é usado remotamente nun dispositivo, é máis eficiente cando o sistema "
+"de arquivos en rede está activado."
+
+#: editor/editor_node.cpp editor/script_create_dialog.cpp
+msgid "Editor"
+msgstr "Editor"
+
+#: editor/editor_node.cpp
+msgid "Editor Settings..."
+msgstr "Configuración do Editor..."
+
+#: editor/editor_node.cpp
+msgid "Editor Layout"
+msgstr "Disposición das Ventás do Editor"
+
+#: editor/editor_node.cpp
+msgid "Take Screenshot"
+msgstr "Captura de Pantalla"
+
+#: editor/editor_node.cpp
+msgid "Screenshots are stored in the Editor Data/Settings Folder."
+msgstr ""
+"As capturas de pantalla gárdanse no cartafol de Datos/Configuración do "
+"Editor."
+
+#: editor/editor_node.cpp
+msgid "Toggle Fullscreen"
+msgstr "Act./Desact. Pantalla Completa"
+
+#: editor/editor_node.cpp
+msgid "Toggle System Console"
+msgstr "Act./Desact. Consola do Sistema"
+
+#: editor/editor_node.cpp
+msgid "Open Editor Data/Settings Folder"
+msgstr "Abrir Cartafol de Datos/Configuración do Editor"
+
+#: editor/editor_node.cpp
+msgid "Open Editor Data Folder"
+msgstr "Abrir Cartafol de Datos do Editor"
+
+#: editor/editor_node.cpp
+msgid "Open Editor Settings Folder"
+msgstr "Abrir Cartafol de Configuración do Editor"
+
+#: editor/editor_node.cpp
+msgid "Manage Editor Features..."
+msgstr "Administrar Características do Editor..."
+
+#: editor/editor_node.cpp
+msgid "Manage Export Templates..."
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/shader_editor_plugin.cpp
+msgid "Help"
+msgstr "Axuda"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp editor/project_manager.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+msgid "Search"
+msgstr "Buscar"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Online Docs"
+msgstr "Documentación En Liña"
+
+#: editor/editor_node.cpp
+msgid "Q&A"
+msgstr "Preguntas e Respostas"
+
+#: editor/editor_node.cpp
+msgid "Report a Bug"
+msgstr "Reportar un Erro"
+
+#: editor/editor_node.cpp
+msgid "Send Docs Feedback"
+msgstr "Reportar Problema ca Documentación"
+
+#: editor/editor_node.cpp editor/plugins/asset_library_editor_plugin.cpp
+msgid "Community"
+msgstr "Comunidade"
+
+#: editor/editor_node.cpp
+msgid "About"
+msgstr "Acerca De"
+
+#: editor/editor_node.cpp
+msgid "Play the project."
+msgstr "Reproduce o proxecto."
+
+#: editor/editor_node.cpp
+msgid "Play"
+msgstr "Executar"
+
+#: editor/editor_node.cpp
+msgid "Pause the scene execution for debugging."
+msgstr "Pausa a execución da escena para a depuración."
+
+#: editor/editor_node.cpp
+msgid "Pause Scene"
+msgstr "Pausar Escena"
+
+#: editor/editor_node.cpp
+msgid "Stop the scene."
+msgstr "Detén a escena."
+
+#: editor/editor_node.cpp
+msgid "Play the edited scene."
+msgstr "Reproduce a escena actual."
+
+#: editor/editor_node.cpp
+msgid "Play Scene"
+msgstr "Executar Escena"
+
+#: editor/editor_node.cpp
+msgid "Play custom scene"
+msgstr "Executar escena a elixir"
+
+#: editor/editor_node.cpp
+msgid "Play Custom Scene"
+msgstr "Executar Escena a Elixir"
+
+#: editor/editor_node.cpp
+msgid "Changing the video driver requires restarting the editor."
+msgstr "Cambiar o controlador de vídeo require reiniciar o editor."
+
+#: editor/editor_node.cpp editor/project_settings_editor.cpp
+#: editor/settings_config_dialog.cpp
+msgid "Save & Restart"
+msgstr "Gardar e Reinicar"
+
+#: editor/editor_node.cpp
+msgid "Spins when the editor window redraws."
+msgstr "Xira cando o editor actualiza a pantalla."
+
+#: editor/editor_node.cpp
+msgid "Update Continuously"
+msgstr "Actualizar de Maneira Continua"
+
+#: editor/editor_node.cpp
+msgid "Update When Changed"
+msgstr "Actualizar Cando Sexa Necesario"
+
+#: editor/editor_node.cpp
+msgid "Hide Update Spinner"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "FileSystem"
+msgstr "Sistema de Arquivos"
+
+#: editor/editor_node.cpp
+msgid "Inspector"
+msgstr "Inspector"
+
+#: editor/editor_node.cpp
+msgid "Expand Bottom Panel"
+msgstr "Estender Panel Inferior"
+
+#: editor/editor_node.cpp
+msgid "Output"
+msgstr "Saída"
+
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr "Non Gardar"
+
+#: editor/editor_node.cpp
+msgid "Android build template is missing, please install relevant templates."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Manage Templates"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"This will set up your project for custom Android builds by installing the "
+"source template to \"res://android/build\".\n"
+"You can then apply modifications and build your own custom APK on export "
+"(adding modules, changing the AndroidManifest.xml, etc.).\n"
+"Note that in order to make custom builds instead of using pre-built APKs, "
+"the \"Use Custom Build\" option should be enabled in the Android export "
+"preset."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid ""
+"The Android build template is already installed in this project and it won't "
+"be overwritten.\n"
+"Remove the \"res://android/build\" directory manually before attempting this "
+"operation again."
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Import Templates From ZIP File"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Template Package"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Export Library"
+msgstr "Biblioteca de Exportación"
+
+#: editor/editor_node.cpp
+msgid "Merge With Existing"
+msgstr "Combinar Con Existentes"
+
+#: editor/editor_node.cpp
+msgid "Open & Run a Script"
+msgstr "Abrir e Executar un Script"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Este shader foi modificado en disco.\n"
+"Que acción deberían de tomarse?"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Recargar"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Volver a Gardar"
+
+#: editor/editor_node.cpp
+msgid "New Inherited"
+msgstr "Nova Escena Herdada"
+
+#: editor/editor_node.cpp
+msgid "Load Errors"
+msgstr "Erros durante a Carga"
+
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr "Elixir"
+
+#: editor/editor_node.cpp
+msgid "Open 2D Editor"
+msgstr "Abrir Editor 2D"
+
+#: editor/editor_node.cpp
+msgid "Open 3D Editor"
+msgstr "Abrir Editor 3D"
+
+#: editor/editor_node.cpp
+msgid "Open Script Editor"
+msgstr "Abrir Editor de Scripts"
+
+#: editor/editor_node.cpp editor/project_manager.cpp
+msgid "Open Asset Library"
+msgstr "Abrir Biblioteca de Assets"
+
+#: editor/editor_node.cpp
+msgid "Open the next Editor"
+msgstr "Abrir o seguinte editor"
+
+#: editor/editor_node.cpp
+msgid "Open the previous Editor"
+msgstr "Abrir o anterior editor"
+
+#: editor/editor_node.h
+msgid "Warning!"
+msgstr "Aviso!"
+
+#: editor/editor_path.cpp
+msgid "No sub-resources found."
+msgstr "Non se atopou ningún sub-recurso."
+
+#: editor/editor_plugin.cpp
+msgid "Creating Mesh Previews"
+msgstr "Creando Previsualización de Mallas"
+
+#: editor/editor_plugin.cpp
+msgid "Thumbnail..."
+msgstr "Miniatura..."
+
+#: editor/editor_plugin_settings.cpp
+msgid "Main Script:"
+msgstr "Script Principal:"
+
+#: editor/editor_plugin_settings.cpp
+msgid "Edit Plugin"
+msgstr "Editar Característica Adicional (Plugin)"
+
+#: editor/editor_plugin_settings.cpp
+msgid "Installed Plugins:"
+msgstr "Características Adicionais (Plugins) Instalados:"
+
+#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
+msgid "Update"
+msgstr "Actualizar"
+
+#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Version:"
+msgstr "Versión:"
+
+#: editor/editor_plugin_settings.cpp editor/plugin_config_dialog.cpp
+msgid "Author:"
+msgstr "Autor:"
+
+#: editor/editor_plugin_settings.cpp
+msgid "Status:"
+msgstr "Estado:"
+
+#: editor/editor_plugin_settings.cpp
+msgid "Edit:"
+msgstr "Editar:"
+
+#: editor/editor_profiler.cpp
+msgid "Measure:"
+msgstr "Medida:"
+
+#: editor/editor_profiler.cpp
+msgid "Frame Time (sec)"
+msgstr "Duración de Fotograma (seg)"
+
+#: editor/editor_profiler.cpp
+msgid "Average Time (sec)"
+msgstr "Tempo Medio (seg)"
+
+#: editor/editor_profiler.cpp
+msgid "Frame %"
+msgstr "Fotograma %"
+
+#: editor/editor_profiler.cpp
+msgid "Physics Frame %"
+msgstr "Fotograma de Física %"
+
+#: editor/editor_profiler.cpp
+msgid "Inclusive"
+msgstr "Inclusivo"
+
+#: editor/editor_profiler.cpp
+msgid "Self"
+msgstr "Propio"
+
+#: editor/editor_profiler.cpp
+msgid "Frame #:"
+msgstr "Fotograma #:"
+
+#: editor/editor_profiler.cpp
+msgid "Time"
+msgstr "Tempo"
+
+#: editor/editor_profiler.cpp
+msgid "Calls"
+msgstr "Chamadas"
+
+#: editor/editor_properties.cpp
+msgid "Edit Text:"
+msgstr "Editar Texto:"
+
+#: editor/editor_properties.cpp editor/script_create_dialog.cpp
+msgid "On"
+msgstr "Activado"
+
+#: editor/editor_properties.cpp
+msgid "Layer"
+msgstr "Capa"
+
+#: editor/editor_properties.cpp
+msgid "Bit %d, value %d"
+msgstr "Bit %d, valor %d"
+
+#: editor/editor_properties.cpp
+msgid "[Empty]"
+msgstr "[Baleiro]"
+
+#: editor/editor_properties.cpp editor/plugins/root_motion_editor_plugin.cpp
+msgid "Assign..."
+msgstr "Asignar..."
+
+#: editor/editor_properties.cpp
+msgid "Invalid RID"
+msgstr "Identificador de Recurso (RID) inválido"
+
+#: editor/editor_properties.cpp
+msgid ""
+"The selected resource (%s) does not match any type expected for this "
+"property (%s)."
+msgstr ""
+"O recurso seleccionado (%s) non coincide con ningún tipo esperado para esta "
+"propiedade (%s)."
+
+#: editor/editor_properties.cpp
+msgid ""
+"Can't create a ViewportTexture on resources saved as a file.\n"
+"Resource needs to belong to a scene."
+msgstr ""
+"Non se pode crear un ViewportTexture nun recurso gardado coma un arquivo.\n"
+"O recurso ten que pertencer a unha escena."
+
+#: editor/editor_properties.cpp
+msgid ""
+"Can't create a ViewportTexture on this resource because it's not set as "
+"local to scene.\n"
+"Please switch on the 'local to scene' property on it (and all resources "
+"containing it up to a node)."
+msgstr ""
+
+#: editor/editor_properties.cpp editor/property_editor.cpp
+msgid "Pick a Viewport"
+msgstr "Selecciona unha Mini-Ventá (Viewport)"
+
+#: editor/editor_properties.cpp editor/property_editor.cpp
+msgid "New Script"
+msgstr "Novo Script"
+
+#: editor/editor_properties.cpp editor/scene_tree_dock.cpp
+msgid "Extend Script"
+msgstr "Estender Script"
+
+#: editor/editor_properties.cpp editor/property_editor.cpp
+msgid "New %s"
+msgstr "Novo %s"
+
+#: editor/editor_properties.cpp editor/property_editor.cpp
+msgid "Make Unique"
+msgstr "Facer Único"
+
+#: editor/editor_properties.cpp
+#: 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_player_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+#: editor/plugins/tile_map_editor_plugin.cpp editor/property_editor.cpp
+#: scene/gui/line_edit.cpp scene/gui/text_edit.cpp
+msgid "Paste"
+msgstr "Pegar"
+
+#: editor/editor_properties.cpp editor/property_editor.cpp
+msgid "Convert To %s"
+msgstr "Converter a %s"
+
+#: editor/editor_properties.cpp editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr "O nodo seleccionado non é unha Mini-Ventá (Viewport)!"
+
+#: editor/editor_properties_array_dict.cpp
+msgid "Size: "
+msgstr "Tamaño: "
+
+#: editor/editor_properties_array_dict.cpp
+msgid "Page: "
+msgstr "Páxina: "
+
+#: editor/editor_properties_array_dict.cpp
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Remove Item"
+msgstr "Eliminar Elemento"
+
+#: editor/editor_properties_array_dict.cpp
+msgid "New Key:"
+msgstr "Nova Chave:"
+
+#: editor/editor_properties_array_dict.cpp
+msgid "New Value:"
+msgstr "Novo Valor:"
+
+#: editor/editor_properties_array_dict.cpp
+msgid "Add Key/Value Pair"
+msgstr "Engadir Parella Chave/Valor"
+
+#: editor/editor_run_native.cpp
+msgid ""
+"No runnable export preset found for this platform.\n"
+"Please add a runnable preset in the Export menu or define an existing preset "
+"as runnable."
+msgstr ""
+"Non se encontraron axustes de exportación executables para esta plataforma.\n"
+"Engade uns axustes de exportación executables, ou define algún xa existente "
+"como executable."
+
+#: editor/editor_run_script.cpp
+msgid "Write your logic in the _run() method."
+msgstr "Escribe a túa lóxica no método '_run()'."
+
+#: editor/editor_run_script.cpp
+msgid "There is an edited scene already."
+msgstr "Xa hai unha escena editada."
+
+#: editor/editor_run_script.cpp
+msgid "Couldn't instance script:"
+msgstr "Non se puido instanciar o script:"
+
+#: editor/editor_run_script.cpp
+msgid "Did you forget the 'tool' keyword?"
+msgstr "Olvidaches a palabra clave 'tool'?"
+
+#: editor/editor_run_script.cpp
+msgid "Couldn't run script:"
+msgstr "Non se puido executar o script:"
+
+#: editor/editor_run_script.cpp
+msgid "Did you forget the '_run' method?"
+msgstr "Olvidaches o método '_run'?"
+
+#: editor/editor_spin_slider.cpp
+msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
+msgstr ""
+"Mantén pulsado Ctrl para redondear a enteiros. Mantén pulsado Shift para "
+"cambios máis precisos."
+
+#: editor/editor_sub_scene.cpp
+msgid "Select Node(s) to Import"
+msgstr "Selecciona o(s) Nodo(s) a Importar"
+
+#: editor/editor_sub_scene.cpp editor/project_manager.cpp
+msgid "Browse"
+msgstr "Examinar"
+
+#: editor/editor_sub_scene.cpp
+msgid "Scene Path:"
+msgstr "Ruta da Escena:"
+
+#: editor/editor_sub_scene.cpp
+msgid "Import From Node:"
+msgstr "Importar Desde Nodo:"
+
+#: editor/export_template_manager.cpp
+msgid "Redownload"
+msgstr "Volver a Descargar"
+
+#: editor/export_template_manager.cpp
+msgid "Uninstall"
+msgstr "Desinstalar"
+
+#: editor/export_template_manager.cpp
+msgid "(Installed)"
+msgstr "(Instalado)"
+
+#: editor/export_template_manager.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Download"
+msgstr "Descargar"
+
+#: editor/export_template_manager.cpp
+msgid "Official export templates aren't available for development builds."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "(Missing)"
+msgstr "(Non encontrado)"
+
+#: editor/export_template_manager.cpp
+msgid "(Current)"
+msgstr "(Actual)"
+
+#: editor/export_template_manager.cpp
+msgid "Retrieving mirrors, please wait..."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Remove template version '%s'?"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Can't open export templates zip."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Invalid version.txt format inside templates: %s."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "No version.txt found inside templates."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Error creating path for templates:"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Extracting Export Templates"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Importing:"
+msgstr "Importando:"
+
+#: editor/export_template_manager.cpp
+msgid "Error getting the list of mirrors."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Error parsing JSON of mirror list. Please report this issue!"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid ""
+"No download links found for this version. Direct download is only available "
+"for official releases."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Can't resolve."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Can't connect."
+msgstr "Non se pode conectar."
+
+#: editor/export_template_manager.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "No response."
+msgstr "Sen resposta."
+
+#: editor/export_template_manager.cpp
+msgid "Request Failed."
+msgstr "A Petición Fracasou."
+
+#: editor/export_template_manager.cpp
+msgid "Redirect Loop."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Failed:"
+msgstr "Fracasado:"
+
+#: editor/export_template_manager.cpp
+msgid "Download Complete."
+msgstr "Descarga Completa."
+
+#: editor/export_template_manager.cpp
+msgid "Cannot remove temporary file:"
+msgstr "Non se pode eliminar o arquivo temporal:"
+
+#: editor/export_template_manager.cpp
+msgid ""
+"Templates installation failed.\n"
+"The problematic templates archives can be found at '%s'."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Error requesting URL:"
+msgstr "Erro ao solicitar a URL:"
+
+#: editor/export_template_manager.cpp
+msgid "Connecting to Mirror..."
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Disconnected"
+msgstr "Desconectado"
+
+#: editor/export_template_manager.cpp
+msgid "Resolving"
+msgstr "Resolvendo"
+
+#: editor/export_template_manager.cpp
+msgid "Can't Resolve"
+msgstr "Non se puido Resolver"
+
+#: editor/export_template_manager.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Connecting..."
+msgstr "Conectando..."
+
+#: editor/export_template_manager.cpp
+msgid "Can't Connect"
+msgstr "Non se Pode Conectar"
+
+#: editor/export_template_manager.cpp
+msgid "Connected"
+msgstr "Conectado"
+
+#: editor/export_template_manager.cpp
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Requesting..."
+msgstr "Solicitando..."
+
+#: editor/export_template_manager.cpp
+msgid "Downloading"
+msgstr "Descargando"
+
+#: editor/export_template_manager.cpp
+msgid "Connection Error"
+msgstr "Erro de Conexión"
+
+#: editor/export_template_manager.cpp
+msgid "SSL Handshake Error"
+msgstr "Erro SSL Handshake"
+
+#: editor/export_template_manager.cpp
+msgid "Uncompressing Android Build Sources"
+msgstr "Descomprimindo Recursos de Compilación de Android"
+
+#: editor/export_template_manager.cpp
+msgid "Current Version:"
+msgstr "Versión Actual:"
+
+#: editor/export_template_manager.cpp
+msgid "Installed Versions:"
+msgstr "Versións Instaladas:"
+
+#: editor/export_template_manager.cpp
+msgid "Install From File"
+msgstr "Instalar Dende Arquivo"
+
+#: editor/export_template_manager.cpp
+msgid "Remove Template"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Select Template File"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Godot Export Templates"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Export Template Manager"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Download Templates"
+msgstr ""
+
+#: editor/export_template_manager.cpp
+msgid "Select mirror from list: (Shift+Click: Open in Browser)"
+msgstr "Seleccione un mirror da lista: (Shift+Clic: Abrir no Navegador)"
+
+#: editor/filesystem_dock.cpp
+msgid "Favorites"
+msgstr "Favoritos"
+
+#: editor/filesystem_dock.cpp
+msgid "Status: Import of file failed. Please fix file and reimport manually."
+msgstr ""
+"Estado: Fallou a importación do arquivo. Por favor, amaña o arquivo e "
+"impórtao manualmente."
+
+#: editor/filesystem_dock.cpp
+msgid "Cannot move/rename resources root."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Cannot move a folder into itself."
+msgstr "Non se pode mover un cartafol dentro de sí mesmo."
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving:"
+msgstr "Erro ao mover:"
+
+#: editor/filesystem_dock.cpp
+msgid "Error duplicating:"
+msgstr "Erro ao duplicar:"
+
+#: editor/filesystem_dock.cpp
+msgid "Unable to update dependencies:"
+msgstr "Incapaz de actualizar dependencias:"
+
+#: editor/filesystem_dock.cpp editor/scene_tree_editor.cpp
+msgid "No name provided."
+msgstr "Nome non proporcionado."
+
+#: editor/filesystem_dock.cpp
+msgid "Provided name contains invalid characters."
+msgstr "O nome proporcionado contén caracteres inválidos."
+
+#: editor/filesystem_dock.cpp
+msgid "A file or folder with this name already exists."
+msgstr "Xa existe un arquivo ou cartafol con este nome."
+
+#: editor/filesystem_dock.cpp
+msgid "Name contains invalid characters."
+msgstr "O nome contén caracteres inválidos."
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"The following files or folders conflict with items in the target location "
+"'%s':\n"
+"\n"
+"%s\n"
+"\n"
+"Do you wish to overwrite them?"
+msgstr ""
+"Os seguintes arquivos ou cartafois entran en conflicto con elementos da "
+"ubicación de destino '%s':\n"
+"\n"
+"%s\n"
+"\n"
+"Queres sobreescribilos?"
+
+#: editor/filesystem_dock.cpp
+msgid "Renaming file:"
+msgstr "Renomeando Arquivo:"
+
+#: editor/filesystem_dock.cpp
+msgid "Renaming folder:"
+msgstr "Renomeando Cartafol:"
+
+#: editor/filesystem_dock.cpp
+msgid "Duplicating file:"
+msgstr "Duplicando Arquivo:"
+
+#: editor/filesystem_dock.cpp
+msgid "Duplicating folder:"
+msgstr "Duplicando Cartafol:"
+
+#: editor/filesystem_dock.cpp
+msgid "New Inherited Scene"
+msgstr "Nova Escena Herdada"
+
+#: editor/filesystem_dock.cpp
+msgid "Set As Main Scene"
+msgstr "Establecer coma Escena Principal"
+
+#: editor/filesystem_dock.cpp
+msgid "Open Scenes"
+msgstr "Abrir Escenas"
+
+#: editor/filesystem_dock.cpp
+msgid "Instance"
+msgstr "Instanciar"
+
+#: editor/filesystem_dock.cpp
+msgid "Add to Favorites"
+msgstr "Engadir a Favoritos"
+
+#: editor/filesystem_dock.cpp
+msgid "Remove from Favorites"
+msgstr "Eliminar de Favoritos"
+
+#: editor/filesystem_dock.cpp
+msgid "Edit Dependencies..."
+msgstr "Editar Dependencias..."
+
+#: editor/filesystem_dock.cpp
+msgid "View Owners..."
+msgstr "Ver Donos..."
+
+#: editor/filesystem_dock.cpp
+msgid "Move To..."
+msgstr "Mover a..."
+
+#: editor/filesystem_dock.cpp
+msgid "New Scene..."
+msgstr "Nova Escena..."
+
+#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
+msgid "New Script..."
+msgstr "Novo Script..."
+
+#: editor/filesystem_dock.cpp
+msgid "New Resource..."
+msgstr "Novo Recurso..."
+
+#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
+#: editor/script_editor_debugger.cpp
+msgid "Expand All"
+msgstr "Expandir Todo"
+
+#: editor/filesystem_dock.cpp editor/plugins/visual_shader_editor_plugin.cpp
+#: editor/script_editor_debugger.cpp
+msgid "Collapse All"
+msgstr "Colapsar Todo"
+
+#: editor/filesystem_dock.cpp
+msgid "Duplicate..."
+msgstr "Duplicar..."
+
+#: editor/filesystem_dock.cpp
+msgid "Move to Trash"
+msgstr "Mover á Papeleira"
+
+#: editor/filesystem_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
+msgid "Rename..."
+msgstr "Renomear..."
+
+#: editor/filesystem_dock.cpp
+msgid "Previous Folder/File"
+msgstr "Anterior Cartafol/Arquivo"
+
+#: editor/filesystem_dock.cpp
+msgid "Next Folder/File"
+msgstr "Seguinte Cartafol/Arquivo"
+
+#: editor/filesystem_dock.cpp
+msgid "Re-Scan Filesystem"
+msgstr "Reexaminar Sistema de Arquivos"
+
+#: editor/filesystem_dock.cpp
+msgid "Toggle Split Mode"
+msgstr "Act./Desact. Modo Dividido"
+
+#: editor/filesystem_dock.cpp
+msgid "Search files"
+msgstr "Buscar arquivos"
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait..."
+msgstr ""
+"Examinando arquivos,\n"
+"Por favor, espere..."
+
+#: editor/filesystem_dock.cpp
+msgid "Move"
+msgstr "Mover"
+
+#: editor/filesystem_dock.cpp
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#: editor/project_manager.cpp editor/rename_dialog.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Rename"
+msgstr "Renomear"
+
+#: editor/filesystem_dock.cpp
+msgid "Overwrite"
+msgstr "Sobreescribir"
+
+#: editor/filesystem_dock.cpp
+msgid "Create Scene"
+msgstr "Crear Escena"
+
+#: editor/filesystem_dock.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Create Script"
+msgstr "Crear Script"
+
+#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
+msgid "Find in Files"
+msgstr "Buscar en Arquivos"
+
+#: editor/find_in_files.cpp
+msgid "Find:"
+msgstr "Buscar:"
+
+#: editor/find_in_files.cpp
+msgid "Folder:"
+msgstr "Cartafol:"
+
+#: editor/find_in_files.cpp
+msgid "Filters:"
+msgstr "Filtros:"
+
+#: editor/find_in_files.cpp
+msgid ""
+"Include the files with the following extensions. Add or remove them in "
+"ProjectSettings."
+msgstr ""
+"Inclúe os arquivos coas seguintes extensións. Engádeos ou elimínaos na "
+"Configuración do proxecto."
+
+#: editor/find_in_files.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+msgid "Find..."
+msgstr "Buscar..."
+
+#: editor/find_in_files.cpp editor/plugins/script_text_editor.cpp
+msgid "Replace..."
+msgstr "Substituír..."
+
+#: editor/find_in_files.cpp editor/progress_dialog.cpp scene/gui/dialogs.cpp
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: editor/find_in_files.cpp
+msgid "Find: "
+msgstr "Buscar: "
+
+#: editor/find_in_files.cpp
+msgid "Replace: "
+msgstr "Substituír: "
+
+#: editor/find_in_files.cpp
+msgid "Replace all (no undo)"
+msgstr "Substituír todo (non se pode defacer)"
+
+#: editor/find_in_files.cpp
+msgid "Searching..."
+msgstr "Procurando..."
+
+#: editor/find_in_files.cpp
+msgid "%d match in %d file."
+msgstr "%d coincidencia en %d arquivo."
+
+#: editor/find_in_files.cpp
+msgid "%d matches in %d file."
+msgstr "%d coincidencias en %d arquivo."
+
+#: editor/find_in_files.cpp
+msgid "%d matches in %d files."
+msgstr "%d coincidencias en %d arquivos."
+
+#: editor/groups_editor.cpp
+msgid "Add to Group"
+msgstr "Engadir ao Grupo"
+
+#: editor/groups_editor.cpp
+msgid "Remove from Group"
+msgstr "Eliminar do Grupo"
+
+#: editor/groups_editor.cpp
+msgid "Group name already exists."
+msgstr "Este nome de grupo xa existe."
+
+#: editor/groups_editor.cpp
+msgid "Invalid group name."
+msgstr "Nome de grupo inválido."
+
+#: editor/groups_editor.cpp
+msgid "Rename Group"
+msgstr "Renomear Grupo"
+
+#: editor/groups_editor.cpp
+msgid "Delete Group"
+msgstr "Eliminar Grupo"
+
+#: editor/groups_editor.cpp editor/node_dock.cpp
+msgid "Groups"
+msgstr "Grupos"
+
+#: editor/groups_editor.cpp
+msgid "Nodes Not in Group"
+msgstr "Nodos Fora do Grupo"
+
+#: editor/groups_editor.cpp editor/scene_tree_dock.cpp
+#: editor/scene_tree_editor.cpp
+msgid "Filter nodes"
+msgstr "Filtrar nodos"
+
+#: editor/groups_editor.cpp
+msgid "Nodes in Group"
+msgstr "Nodos no Grupo"
+
+#: editor/groups_editor.cpp
+msgid "Empty groups will be automatically removed."
+msgstr "Os grupos baleiros serán automaticamente eliminados."
+
+#: editor/groups_editor.cpp
+msgid "Group Editor"
+msgstr "Editor de Grupos"
+
+#: editor/groups_editor.cpp
+msgid "Manage Groups"
+msgstr "Administrar Grupos"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Animations"
+msgstr "Importar con Animacións Separadas"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Materials"
+msgstr "Importar con Materiais Separados"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Objects"
+msgstr "Importar con Obxectos Separados"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Objects+Materials"
+msgstr "Importar con Obxectos e Materiais Separados"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Objects+Animations"
+msgstr "Importar con Obxectos e Animacións Separadas"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Materials+Animations"
+msgstr "Importar con Materiais e Animacións Separadas"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Objects+Materials+Animations"
+msgstr "Importar con Obxectos, Materiais, e Animacións Separados"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr "Importar como Escenas e Materiales Múltiples"
+
+#: editor/import/resource_importer_scene.cpp
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import Scene"
+msgstr "Importar Escena"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Importing Scene..."
+msgstr "Importando Escena..."
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Generating Lightmaps"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Generating for Mesh: "
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Running Custom Script..."
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Couldn't load post-import script:"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Invalid/broken script for post-import (check console):"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Error running post-import script:"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Did you return a Node-derived object in the `post_import()` method?"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Saving..."
+msgstr "Gardando..."
+
+#: editor/import_dock.cpp
+msgid "%d Files"
+msgstr "%d Arquivos"
+
+#: editor/import_dock.cpp
+msgid "Set as Default for '%s'"
+msgstr ""
+
+#: editor/import_dock.cpp
+msgid "Clear Default for '%s'"
+msgstr ""
+
+#: editor/import_dock.cpp
+msgid "Import As:"
+msgstr "Importar Como:"
+
+#: editor/import_dock.cpp
+msgid "Preset"
+msgstr "Axustes de Importación"
+
+#: editor/import_dock.cpp
+msgid "Reimport"
+msgstr "Reimportar"
+
+#: editor/import_dock.cpp
+msgid "Save Scenes, Re-Import, and Restart"
+msgstr ""
+
+#: editor/import_dock.cpp
+msgid "Changing the type of an imported file requires editor restart."
+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."
+msgstr "Fallou a carga do Recurso."
+
+#: editor/inspector_dock.cpp
+msgid "Expand All Properties"
+msgstr "Expandir Tódalas Propiedades"
+
+#: editor/inspector_dock.cpp
+msgid "Collapse All Properties"
+msgstr "Colapsar Tódalas Propiedades"
+
+#: editor/inspector_dock.cpp editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Save As..."
+msgstr "Gardar Como..."
+
+#: editor/inspector_dock.cpp
+msgid "Copy Params"
+msgstr "Copiar Parámetros"
+
+#: editor/inspector_dock.cpp
+msgid "Edit Resource Clipboard"
+msgstr ""
+
+#: editor/inspector_dock.cpp
+msgid "Copy Resource"
+msgstr "Copiar Recurso"
+
+#: editor/inspector_dock.cpp
+msgid "Make Built-In"
+msgstr ""
+
+#: editor/inspector_dock.cpp
+msgid "Make Sub-Resources Unique"
+msgstr ""
+
+#: editor/inspector_dock.cpp
+msgid "Open in Help"
+msgstr "Abrir na Axuda"
+
+#: editor/inspector_dock.cpp
+msgid "Create a new resource in memory and edit it."
+msgstr ""
+
+#: editor/inspector_dock.cpp
+msgid "Load an existing resource from disk and edit it."
+msgstr ""
+
+#: editor/inspector_dock.cpp
+msgid "Save the currently edited resource."
+msgstr ""
+
+#: editor/inspector_dock.cpp
+msgid "Go to the previous edited object in history."
+msgstr ""
+
+#: editor/inspector_dock.cpp
+msgid "Go to the next edited object in history."
+msgstr ""
+
+#: editor/inspector_dock.cpp
+msgid "History of recently edited objects."
+msgstr ""
+
+#: editor/inspector_dock.cpp
+msgid "Object properties."
+msgstr "Propiedade de Obxectos."
+
+#: editor/inspector_dock.cpp
+msgid "Filter properties"
+msgstr "Filtrar propiedades"
+
+#: editor/inspector_dock.cpp
+msgid "Changes may be lost!"
+msgstr "Os cambios poderían perderse!"
+
+#: editor/multi_node_edit.cpp
+msgid "MultiNode Set"
+msgstr ""
+
+#: editor/node_dock.cpp
+msgid "Select a single node to edit its signals and groups."
+msgstr "Seleccione un nodo para editar as súas sinais e grupos."
+
+#: editor/plugin_config_dialog.cpp
+msgid "Edit a Plugin"
+msgstr "Editar unha Característica Adicional (Plugin)"
+
+#: editor/plugin_config_dialog.cpp
+msgid "Create a Plugin"
+msgstr "Crear unha Característica Adicional (Plugin)"
+
+#: editor/plugin_config_dialog.cpp
+msgid "Plugin Name:"
+msgstr "Nome do Plugin:"
+
+#: editor/plugin_config_dialog.cpp
+msgid "Subfolder:"
+msgstr "Subcartafol:"
+
+#: editor/plugin_config_dialog.cpp editor/script_create_dialog.cpp
+msgid "Language:"
+msgstr "Linguaxe:"
+
+#: editor/plugin_config_dialog.cpp
+msgid "Script Name:"
+msgstr "Nome do Script:"
+
+#: editor/plugin_config_dialog.cpp
+msgid "Activate now?"
+msgstr "Activar agora?"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Create Polygon"
+msgstr "Crear Polígono"
+
+#: 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 "Crear puntos."
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid ""
+"Edit points.\n"
+"LMB: Move Point\n"
+"RMB: Erase Point"
+msgstr ""
+"Editar puntos.\n"
+"Clic Izq: Mover Punto\n"
+"Clic Der: Eliminar Punto"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+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 "Inserir Punto"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Edit Polygon (Remove Point)"
+msgstr "Editar Polígono (Eliminar Punto)"
+
+#: editor/plugins/abstract_polygon_2d_editor.cpp
+msgid "Remove Polygon And Point"
+msgstr "Eliminar Polígono 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
+#: editor/plugins/animation_state_machine_editor.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Add Animation"
+msgstr "Engadir Animación"
+
+#: 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 "Load..."
+msgstr "Cargar..."
+
+#: 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 "Non se pode usar este tipo de nodo. Só nodos raíz están permitidos."
+
+#: 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 ""
+"AnimationTree is inactive.\n"
+"Activate to enable playback, check node warnings if activation fails."
+msgstr ""
+"O AnimationTree está inactivo.\n"
+"Actívao para permitir a reprodución; e comproba os avisos do nodo se hai un "
+"erro na activación."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Set the blending position within the space"
+msgstr ""
+
+#: 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 ""
+
+#: 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 "Activar axuste de cuadrícula e amosar cuadrícula."
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Point"
+msgstr "Punto"
+
+#: editor/plugins/animation_blend_space_1d_editor.cpp
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Open Editor"
+msgstr "Abrir Editor"
+
+#: 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 "Open Animation Node"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Triangle already exists."
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Add Triangle"
+msgstr "Engadir Triángulo"
+
+#: 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 ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+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 ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Erase points and triangles."
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+msgid "Generate blend triangles automatically (instead of manually)"
+msgstr ""
+
+#: editor/plugins/animation_blend_space_2d_editor.cpp
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Blend:"
+msgstr "Mezcla:"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Parameter Changed"
+msgstr "Parámetro Cambiado"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Edit Filters"
+msgstr "Editar Flitros"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+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
+msgid "Node Moved"
+msgstr "Nodo Movido"
+
+#: editor/plugins/animation_blend_tree_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 "Nodos Conectado"
+
+#: 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
+#: editor/scene_tree_dock.cpp
+msgid "Delete Node(s)"
+msgstr "Eliminar Nodo(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 "Cambiar Filtro"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "No animation player set, so unable to retrieve track names."
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Player path set is invalid, so unable to retrieve track names."
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/root_motion_editor_plugin.cpp
+msgid ""
+"Animation player has no valid root node path, so unable to retrieve track "
+"names."
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Anim Clips"
+msgstr "Clips de Animación"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Audio Clips"
+msgstr "Clips de Audio"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Functions"
+msgstr "Funcións"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Node Renamed"
+msgstr "Nodo Renomeado"
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Node..."
+msgstr "Engadir Nodo..."
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+#: editor/plugins/root_motion_editor_plugin.cpp
+msgid "Edit Filtered Tracks:"
+msgstr ""
+
+#: editor/plugins/animation_blend_tree_editor_plugin.cpp
+msgid "Enable Filtering"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Toggle Autoplay"
+msgstr "Act./Desact. Auto-reproducción"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "New Animation Name:"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "New Anim"
+msgstr "Nova Animación"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Change Animation Name:"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Delete Animation?"
+msgstr "Eliminar Animación?"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Remove Animation"
+msgstr "Eliminar Animación"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Invalid animation name!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Animation name already exists!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Rename Animation"
+msgstr "Renomear Animación"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Blend Next Changed"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Change Blend Time"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Load Animation"
+msgstr "Cargar Animación"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Duplicate Animation"
+msgstr "Duplicar Animación"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "No animation to copy!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "No animation resource on clipboard!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Pasted Animation"
+msgstr "Animación Pegada"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Paste Animation"
+msgstr "Pegar Animación"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "No animation to edit!"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Play selected animation backwards from current pos. (A)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Play selected animation backwards from end. (Shift+A)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Stop animation playback. (S)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Play selected animation from start. (Shift+D)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Play selected animation from current pos. (D)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Animation position (in seconds)."
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Scale animation playback globally for the node."
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Animation Tools"
+msgstr "Ferramentas de Animación"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Animation"
+msgstr "Animación"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Edit Transitions..."
+msgstr "Editar Transicións..."
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Open in Inspector"
+msgstr "Abrir no Inspector"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Display list of animations in player."
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Autoplay on Load"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Enable Onion Skinning"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Onion Skinning Options"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Directions"
+msgstr "Direccións"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Past"
+msgstr "Pasado"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Future"
+msgstr "Futuro"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Depth"
+msgstr "Profundidad"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "1 step"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "2 steps"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "3 steps"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Differences Only"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Force White Modulate"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Include Gizmos (3D)"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Pin AnimationPlayer"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Create New Animation"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Animation Name:"
+msgstr "Nome da Animación:"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
+msgid "Error!"
+msgstr "Erro!"
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Blend Times:"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Next (Auto Queue):"
+msgstr ""
+
+#: editor/plugins/animation_player_editor_plugin.cpp
+msgid "Cross-Animation Blend Times"
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Move Node"
+msgstr "Mover Nodo"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition exists!"
+msgstr "Existe transición!"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Add Transition"
+msgstr "Engadir Transición"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node"
+msgstr "Engadir Nodo"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "End"
+msgstr "Fin"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Immediate"
+msgstr "Inmediata"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Sync"
+msgstr "Sincronizar"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "At End"
+msgstr "Ao Final"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Travel"
+msgstr "Viaxe"
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Start and end nodes are needed for a sub-transition."
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "No playback resource set at path: %s."
+msgstr ""
+
+#: 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 ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid ""
+"Select and move nodes.\n"
+"RMB to add new nodes.\n"
+"Shift+LMB to create connections."
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Create new nodes."
+msgstr "Crear novos nodos."
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Connect nodes."
+msgstr "Conectar nodos."
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Remove selected node or transition."
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Toggle autoplay this animation on start, restart or seek to zero."
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Set the end animation. This is useful for sub-transitions."
+msgstr ""
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Transition: "
+msgstr "Transición: "
+
+#: editor/plugins/animation_state_machine_editor.cpp
+msgid "Play Mode:"
+msgstr "Modo de Reprodución:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "AnimationTree"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "New name:"
+msgstr "Novo nome:"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Scale:"
+msgstr "Escala:"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Fade In (s):"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Fade Out (s):"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Blend"
+msgstr "Mezcla"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Mix"
+msgstr "Mezcla"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Auto Restart:"
+msgstr "Auto Reinicio:"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Restart (s):"
+msgstr "Reiniciar (s):"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Random Restart (s):"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Start!"
+msgstr "Comezar!"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Amount:"
+msgstr "Cantidade:"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Blend 0:"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Blend 1:"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "X-Fade Time (s):"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Current:"
+msgstr "Actual:"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Input"
+msgstr "Engadir Entrada"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Clear Auto-Advance"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Set Auto-Advance"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Delete Input"
+msgstr "Eliminar Entrada"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Animation tree is valid."
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Animation tree is invalid."
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Animation Node"
+msgstr "Nodo de Animación"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "OneShot Node"
+msgstr "Nodo de Execución Única (Oneshot)"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Mix Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Blend2 Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Blend3 Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Blend4 Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "TimeScale Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "TimeSeek Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Transition Node"
+msgstr ""
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Import Animations..."
+msgstr "Importar Animacións..."
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Edit Node Filters"
+msgstr "Editar Filtros do Nodo"
+
+#: editor/plugins/animation_tree_player_editor_plugin.cpp
+msgid "Filters..."
+msgstr "Filtros..."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Contents:"
+msgstr "Contidos:"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "View Files"
+msgstr "Ver Arquivos"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Connection error, please try again."
+msgstr "Houbo un erro na conexión; por favor, inténtao de novo."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Can't connect to host:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "No response from host:"
+msgstr "Non houbo respota por parte do host:"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Can't resolve hostname:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Request failed, return code:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Request failed."
+msgstr "A petición fallou."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Cannot save response to:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Write error."
+msgstr "Erro de escritura."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Request failed, too many redirects"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Redirect loop."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Request failed, timeout"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Timeout."
+msgstr "Timeout."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Bad download hash, assuming file has been tampered with."
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Expected:"
+msgstr "Esperado:"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Got:"
+msgstr "Recibido:"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Failed sha256 hash check"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Asset Download Error:"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Downloading (%s / %s)..."
+msgstr "Descargando (%s / %s)..."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Downloading..."
+msgstr "Descargando..."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Resolving..."
+msgstr "Resolvendo..."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Error making request"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Idle"
+msgstr "Ocioso"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Install..."
+msgstr "Instalar..."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Retry"
+msgstr "Reintentar"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Download Error"
+msgstr "Erro na Descarga"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Download for this asset is already in progress!"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Recently Updated"
+msgstr "Actualizado Recentemente"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Least Recently Updated"
+msgstr ""
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Name (A-Z)"
+msgstr "Nome (A-Z)"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Name (Z-A)"
+msgstr "Nome (Z-A)"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "License (A-Z)"
+msgstr "Licenza (A-Z)"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "License (Z-A)"
+msgstr "Licenza (Z-A)"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "First"
+msgstr "Primeiro"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Previous"
+msgstr "Anterior"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Next"
+msgstr "Seguinte"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Last"
+msgstr "Derradeiro"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "All"
+msgstr "Todos"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "No results for \"%s\"."
+msgstr "Non houbo resultado para \"%s\"."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Import..."
+msgstr "Importar..."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Plugins..."
+msgstr "Características Adicionais (Plugins)..."
+
+#: editor/plugins/asset_library_editor_plugin.cpp editor/project_manager.cpp
+msgid "Sort:"
+msgstr "Ordenar:"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+#: editor/project_settings_editor.cpp
+msgid "Category:"
+msgstr "Categoría:"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Site:"
+msgstr "Sitio:"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Support"
+msgstr "Soporte"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Official"
+msgstr "Oficial"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Testing"
+msgstr "Probas"
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Loading..."
+msgstr "Cargando..."
+
+#: editor/plugins/asset_library_editor_plugin.cpp
+msgid "Assets ZIP File"
+msgstr ""
+
+#: editor/plugins/baked_lightmap_editor_plugin.cpp
+msgid ""
+"Can't determine a save path for lightmap images.\n"
+"Save your scene and try again."
+msgstr ""
+
+#: editor/plugins/baked_lightmap_editor_plugin.cpp
+msgid ""
+"No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake "
+"Light' flag is on."
+msgstr ""
+
+#: editor/plugins/baked_lightmap_editor_plugin.cpp
+msgid "Failed creating lightmap images, make sure path is writable."
+msgstr ""
+
+#: editor/plugins/baked_lightmap_editor_plugin.cpp
+msgid "Failed determining lightmap size. Maximum lightmap size too small?"
+msgstr ""
+
+#: editor/plugins/baked_lightmap_editor_plugin.cpp
+msgid ""
+"Some mesh is invalid. Make sure the UV2 channel values are contained within "
+"the [0.0,1.0] square region."
+msgstr ""
+"Algunha malla é inválida. Asegúrese de que o os valores do canle UV2 están "
+"contidos dentro da rexión cadrada ([0.0,1.0], [0.0,1.0])."
+
+#: editor/plugins/baked_lightmap_editor_plugin.cpp
+msgid ""
+"Godot editor was built without ray tracing support, lightmaps can't be baked."
+msgstr ""
+
+#: editor/plugins/baked_lightmap_editor_plugin.cpp
+msgid "Bake Lightmaps"
+msgstr ""
+
+#: editor/plugins/baked_lightmap_editor_plugin.cpp
+msgid "Select lightmap bake file:"
+msgstr ""
+
+#: editor/plugins/camera_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Preview"
+msgstr "Vista Previa"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Configure Snap"
+msgstr "Configurar Axuste de Cuadrícula"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Grid Offset:"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Grid Step:"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Primary Line Every:"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "steps"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Rotation Offset:"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Rotation Step:"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Scale Step:"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Move Vertical Guide"
+msgstr "Mover Guía Vertical"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Create Vertical Guide"
+msgstr "Crear Guía Vertical"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Remove Vertical Guide"
+msgstr "Eliminar Guía Vertical"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Move Horizontal Guide"
+msgstr "Mover Guía Horizontal"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Create Horizontal Guide"
+msgstr "Crear Guía Horizontal"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Remove Horizontal Guide"
+msgstr "Eliminar Guía Horizontal"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Create Horizontal and Vertical Guides"
+msgstr "Crear Guías Horizontais e Verticais"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Set CanvasItem \"%s\" Pivot Offset to (%d, %d)"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Rotate %d CanvasItems"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Rotate CanvasItem \"%s\" to %d degrees"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Move CanvasItem \"%s\" Anchor"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Scale Node2D \"%s\" to (%s, %s)"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Resize Control \"%s\" to (%d, %d)"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Scale %d CanvasItems"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Scale CanvasItem \"%s\" to (%s, %s)"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Move %d CanvasItems"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Move CanvasItem \"%s\" to (%d, %d)"
+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 "Presets for the anchors and margins values of a Control node."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"When active, moving Control nodes changes their anchors instead of their "
+"margins."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Top Left"
+msgstr "Arriba á Esquerda"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Top Right"
+msgstr "Arriba á Dereita"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Bottom Right"
+msgstr "Abaixo á Dereita"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Bottom Left"
+msgstr "Abaixo á Esquerda"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Center Left"
+msgstr "Centro á Esquerda"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Center Top"
+msgstr "Centro Arriba"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Center Right"
+msgstr "Centro á Dereita"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Center Bottom"
+msgstr "Centro Abaixo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Center"
+msgstr "Centro"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Left Wide"
+msgstr "Esquerdo Alto"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Top Wide"
+msgstr "Arriba Ancho"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Right Wide"
+msgstr "Dereito Alto"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Bottom Wide"
+msgstr "Abaixo Ancho"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "VCenter Wide"
+msgstr "CentradoV Alto"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "HCenter Wide"
+msgstr "CentradoH Ancho"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Full Rect"
+msgstr "Recta Completa"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Keep Ratio"
+msgstr "Manter Relación de Aspecto"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Anchors only"
+msgstr "Só Ãncoras"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Change Anchors and Margins"
+msgstr "Cambiar Ãncoras e Marxes"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Change Anchors"
+msgstr "Cambiar Ãncoras"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Game Camera Override\n"
+"Overrides game camera with editor viewport camera."
+msgstr ""
+"Substituír a Cámara do Xogo\n"
+"Substitue a cámara do xogo pola cámara da Mini-ventá (Viewport) do editor."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Game Camera Override\n"
+"No game instance running."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Lock Selected"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Unlock Selected"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Group Selected"
+msgstr "Agrupar Selección"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Ungroup Selected"
+msgstr "Desagrupar Selección"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Paste Pose"
+msgstr "Pegar Pose"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Clear Guides"
+msgstr "Limpar Guías"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Create Custom Bone(s) from Node(s)"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Clear Bones"
+msgstr "Limpar Ósos"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Make IK Chain"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Clear IK Chain"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Warning: Children of a container get their position and size determined only "
+"by their parent."
+msgstr ""
+"Aviso: Os nodos fillos dun contedor (Container) teñen determinada a súa "
+"posición e tamaño unicamente polo seu padre."
+
+#: 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
+msgid "Zoom Reset"
+msgstr "Restablecer Zoom"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Select Mode"
+msgstr "Elixir Modo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Drag: Rotate"
+msgstr "Arrastrar: Rotar"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Alt+Drag: Move"
+msgstr "Alt+Arrastrar: Mover"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving)."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Alt+RMB: Depth list selection"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Move Mode"
+msgstr "Mover Modo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rotate Mode"
+msgstr "Modo Rotación"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Scale Mode"
+msgstr "Modo Escalado"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Show a list of all objects at the position clicked\n"
+"(same as Alt+RMB in select mode)."
+msgstr ""
+"Amosa unha lista de obxectos na posición na que se fixo clic\n"
+"(O mesmo que usar Alt+Clic Dereito en modo selección)."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Click to change object's rotation pivot."
+msgstr "Faga clic para cambiar o pivote de rotación do obxecto."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Pan Mode"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Ruler Mode"
+msgstr "Modo Regra"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Toggle smart snapping."
+msgstr "Act./Desact. axuste intelixente."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Use Smart Snap"
+msgstr "Usar Axuste Intelixente"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Toggle grid snapping."
+msgstr "Act./Desact. axuste de cuadrícula."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Use Grid Snap"
+msgstr "Usar Axuste de Cuadrícula"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snapping Options"
+msgstr "Opcións de Axuste de Cuadrícula"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Use Rotation Snap"
+msgstr "Empregar Axuste de Rotación"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Use Scale Snap"
+msgstr "Empregar Axuste de Escalado"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap Relative"
+msgstr "Axuste Relativo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Use Pixel Snap"
+msgstr "Empregar Axuste aos Píxeles"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Smart Snapping"
+msgstr "Axuste Intelixente"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Configure Snap..."
+msgstr "Configurar Axuste de Cuadrícula..."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to Parent"
+msgstr "Axustar ao Pai"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to Node Anchor"
+msgstr "Axustar á Ãncora do Nodo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to Node Sides"
+msgstr "Axustar aos Laterais do Nodo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to Node Center"
+msgstr "Axustar ao Centro do Nodo"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to Other Nodes"
+msgstr "Axustar a Outros Nodos"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Snap to Guides"
+msgstr "Axustar as Guías"
+
+#: 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 "Fixar o obxecto no sitio (non se poderá mover)."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Unlock the selected object (can be moved)."
+msgstr "Liberar o obxecto seleccionado (pode moverse)."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Makes sure the object's children are not selectable."
+msgstr "Asegúrase de que os fillos do obxecto non sexan seleccionables."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Restores the object's children's ability to be selected."
+msgstr "Volve a permitir seleccionar os fillos do obxecto."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Skeleton Options"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Show Bones"
+msgstr "Amosar Ósos"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Make Custom Bone(s) from Node(s)"
+msgstr "Crear Óso(s) Personalizados a partir de Nodo(s)"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Clear Custom Bones"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View"
+msgstr "Ver"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Always Show Grid"
+msgstr "Sempre Amosar a Cuadrícula"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Show Helpers"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Show Rulers"
+msgstr "Amosar Regras"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Show Guides"
+msgstr "Amosar Guías"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Show Origin"
+msgstr "Amosar Orixe"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Show Viewport"
+msgstr "Amosar Mini-Ventá (Viewport)"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Show Group And Lock Icons"
+msgstr "Amosar Grupo e Bloquear Iconas"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Center Selection"
+msgstr "Centrar Selección"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Frame Selection"
+msgstr "Encadrar Selección"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Preview Canvas Scale"
+msgstr "Vista Previa da Escala do Lenzo (Canvas)"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Translation mask for inserting keys."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Rotation mask for inserting keys."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Scale mask for inserting keys."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Insert keys (based on mask)."
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Auto insert keys when objects are translated, rotated or scaled (based on "
+"mask).\n"
+"Keys are only added to existing tracks, no new tracks will be created.\n"
+"Keys must be inserted manually for the first time."
+msgstr ""
+"Inserción automática de claves cando os obxectos son trasladados, rotados, "
+"ou escalados (depenendo da Máscara).\n"
+"As chaves só engádense a pistas xa existentes; nunca se crean novas pistas.\n"
+"As chaves teñen que insertarse manualmente cando se utiliza por primeira vez."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Auto Insert Key"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Animation Key and Pose Options"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Insert Key (Existing Tracks)"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Copy Pose"
+msgstr "Copiar Pose"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Clear Pose"
+msgstr "Restablecer Pose"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Multiply grid step by 2"
+msgstr "Multiplicar Dimensión da Cuadrícula por 2"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Divide grid step by 2"
+msgstr "Dividir Dimensión da Cuadrícula por 2"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Pan View"
+msgstr ""
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Add %s"
+msgstr "Engadir %s"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Adding %s..."
+msgstr "Engadindo %s..."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Cannot instantiate multiple nodes without root."
+msgstr "Non se pode instanciar varios nodos sen un nodo raíz."
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "Create Node"
+msgstr "Crear Nodo"
+
+#: 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 "Erro instanciado escena desde %s"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid "Change Default Type"
+msgstr "Cambiar Tipo por Defecto"
+
+#: editor/plugins/canvas_item_editor_plugin.cpp
+msgid ""
+"Drag & drop + Shift : Add node as sibling\n"
+"Drag & drop + Alt : Change node type"
+msgstr ""
+"Arrastrar e Soltar + Shift : Engade nodo como irmán\n"
+"Arrastrar e Soltar + Alt : Cambiar tipo de nodo"
+
+#: editor/plugins/collision_polygon_editor_plugin.cpp
+msgid "Create Polygon3D"
+msgstr ""
+
+#: editor/plugins/collision_polygon_editor_plugin.cpp
+msgid "Edit Poly"
+msgstr "Editar Polígono"
+
+#: editor/plugins/collision_polygon_editor_plugin.cpp
+msgid "Edit Poly (Remove Point)"
+msgstr "Editar Polígono (Eliminar Punto)"
+
+#: editor/plugins/collision_shape_2d_editor_plugin.cpp
+msgid "Set Handle"
+msgstr ""
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Load Emission Mask"
+msgstr ""
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/cpu_particles_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Restart"
+msgstr "Reiniciar"
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Clear Emission Mask"
+msgstr ""
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Particles"
+msgstr "Partículas"
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Generated Point Count:"
+msgstr "Número de Puntos Xerados:"
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Emission Mask"
+msgstr ""
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Solid Pixels"
+msgstr ""
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Border Pixels"
+msgstr ""
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Directed Border Pixels"
+msgstr ""
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Capture from Pixel"
+msgstr ""
+
+#: editor/plugins/cpu_particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Emission Colors"
+msgstr ""
+
+#: editor/plugins/cpu_particles_editor_plugin.cpp
+msgid "CPUParticles"
+msgstr "CPUParticles"
+
+#: editor/plugins/cpu_particles_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Create Emission Points From Mesh"
+msgstr ""
+
+#: editor/plugins/cpu_particles_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Create Emission Points From Node"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Flat 0"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Flat 1"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
+msgid "Ease In"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp editor/property_editor.cpp
+msgid "Ease Out"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Smoothstep"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Modify Curve Point"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Modify Curve Tangent"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Load Curve Preset"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Add Point"
+msgstr "Engadir Punto"
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Remove Point"
+msgstr "Eliminar Punto"
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Left Linear"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Right Linear"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Load Preset"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Remove Curve Point"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Toggle Curve Linear Tangent"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Hold Shift to edit tangents individually"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Right click to add point"
+msgstr ""
+
+#: editor/plugins/gi_probe_editor_plugin.cpp
+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 "Elemento %d"
+
+#: editor/plugins/item_list_editor_plugin.cpp
+msgid "Items"
+msgstr "Elementos"
+
+#: editor/plugins/item_list_editor_plugin.cpp
+msgid "Item List Editor"
+msgstr ""
+
+#: editor/plugins/light_occluder_2d_editor_plugin.cpp
+msgid "Create Occluder Polygon"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Mesh is empty!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Couldn't create a Trimesh collision shape."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Static Trimesh Body"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "This doesn't work on scene root!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Trimesh Static Shape"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Can't create a single convex collision shape for the scene root."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Couldn't create a single convex collision shape."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Single Convex Shape"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Can't create multiple convex collision shapes for the scene root."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Couldn't create any collision shapes."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Multiple Convex Shapes"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Navigation Mesh"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Contained Mesh is not of type ArrayMesh."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "UV Unwrap failed, mesh may not be manifold?"
+msgstr ""
+"Fallo no Unwrap de UV. Posiblemente a malla non é unha variedade (é dicir, "
+"que a malla non forma unha superficie conexa, contínua, e con dous caras "
+"diferenciables). En programas de modelaxe 3D pódese eliminar xeometría que "
+"non sexa unha variedade (\"Non Manifold\") fácilmente."
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "No mesh to debug."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Model has no UV in this layer"
+msgstr "O modelo non ten UVs nesta capa"
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "MeshInstance lacks a Mesh!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Mesh has not surface to create outlines from!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Could not create outline!"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Outline"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Mesh"
+msgstr "Malla"
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Trimesh Static Body"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid ""
+"Creates a StaticBody and assigns a polygon-based collision shape to it "
+"automatically.\n"
+"This is the most accurate (but slowest) option for collision detection."
+msgstr ""
+"Crear un nodo StaticBody e asígnalle automáticamente unha forma física "
+"baseada en polígonos.\n"
+"Esta é a forma máis precisa (e máis lenta) de detección de colisións."
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Trimesh Collision Sibling"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid ""
+"Creates a polygon-based collision shape.\n"
+"This is the most accurate (but slowest) option for collision detection."
+msgstr ""
+"Crea unha formá física baseada en polígonos.\n"
+"Esta é a forma máis precisa (pero máis lenta) de detectar colisións."
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Single Convex Collision Sibling"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid ""
+"Creates a single convex collision shape.\n"
+"This is the fastest (but least accurate) option for collision detection."
+msgstr ""
+"Crea unha única forma física convexa.\n"
+"Esta é a maneira más eficiente (pero menos precisa) de detectar colisións."
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Multiple Convex Collision Siblings"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid ""
+"Creates a polygon-based collision shape.\n"
+"This is a performance middle-ground between the two above options."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Outline Mesh..."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid ""
+"Creates a static outline mesh. The outline mesh will have its normals "
+"flipped automatically.\n"
+"This can be used instead of the SpatialMaterial Grow property when using "
+"that property isn't possible."
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "View UV1"
+msgstr "Amosar UV1"
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "View UV2"
+msgstr "Amosar UV2"
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Unwrap UV2 for Lightmap/AO"
+msgstr "Facer Unwrap do UV2 para Lightmap/AO"
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Create Outline Mesh"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "Outline Size:"
+msgstr ""
+
+#: editor/plugins/mesh_instance_editor_plugin.cpp
+msgid "UV Channel Debug"
+msgstr "Depuración do Canle UV"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Remove item %d?"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid ""
+"Update from existing scene?:\n"
+"%s"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Mesh Library"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Add Item"
+msgstr "Engadir Elemento"
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Remove Selected Item"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Import from Scene"
+msgstr ""
+
+#: editor/plugins/mesh_library_editor_plugin.cpp
+msgid "Update from Scene"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "No mesh source specified (and no MultiMesh set in node)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "No mesh source specified (and MultiMesh contains no Mesh)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Mesh source is invalid (invalid path)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Mesh source is invalid (not a MeshInstance)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Mesh source is invalid (contains no Mesh resource)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "No surface source specified."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Surface source is invalid (invalid path)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Surface source is invalid (no geometry)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Surface source is invalid (no faces)."
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Select a Source Mesh:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Select a Target Surface:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Populate Surface"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Populate MultiMesh"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Target Surface:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Source Mesh:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "X-Axis"
+msgstr "Eixe X"
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Y-Axis"
+msgstr "Eixe Y"
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Z-Axis"
+msgstr "Eixe Z"
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Mesh Up Axis:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Random Rotation:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Random Tilt:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Random Scale:"
+msgstr ""
+
+#: editor/plugins/multimesh_editor_plugin.cpp
+msgid "Populate"
+msgstr "Encher"
+
+#: editor/plugins/navigation_polygon_editor_plugin.cpp
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create Navigation Polygon"
+msgstr ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Convert to CPUParticles"
+msgstr "Converter a CPUParticles"
+
+#: 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 ""
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+msgid "Convert to CPUParticles2D"
+msgstr "Converter a CPUParticles2D"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generation Time (sec):"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "The geometry's faces don't contain any area."
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "The geometry doesn't contain any faces."
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "\"%s\" doesn't inherit from Spatial."
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "\"%s\" doesn't contain geometry."
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "\"%s\" doesn't contain face geometry."
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Create Emitter"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Emission Points:"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Surface Points"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Surface Points+Normal (Directed)"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Volume"
+msgstr "Volume"
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Emission Source: "
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "A processor material of type 'ParticlesMaterial' is required."
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generating AABB"
+msgstr ""
+
+#: editor/plugins/particles_editor_plugin.cpp
+msgid "Generate Visibility AABB"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Remove Point from Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Remove Out-Control from Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Remove In-Control from Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Add Point to Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Split Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Move Point in Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Move In-Control in Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Move Out-Control in Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Select Points"
+msgstr "Seleccionar Puntos"
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Shift+Drag: Select Control Points"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Click: Add Point"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Left Click: Split Segment (in curve)"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Right Click: Delete Point"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+msgid "Select Control Points (Shift+Drag)"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Add Point (in empty space)"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Delete Point"
+msgstr "Eliminar Puntos"
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Close Curve"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp editor/plugins/theme_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp editor/project_export.cpp
+msgid "Options"
+msgstr "Opcións"
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Mirror Handle Angles"
+msgstr ""
+
+#: editor/plugins/path_2d_editor_plugin.cpp
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Mirror Handle Lengths"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Curve Point #"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Set Curve Point Position"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Set Curve In Position"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Set Curve Out Position"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Split Path"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Remove Path Point"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Remove Out-Control Point"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Remove In-Control Point"
+msgstr ""
+
+#: editor/plugins/path_editor_plugin.cpp
+msgid "Split Segment (in curve)"
+msgstr ""
+
+#: editor/plugins/physical_bone_plugin.cpp
+msgid "Move Joint"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"The skeleton property of the Polygon2D does not point to a Skeleton2D node"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Sync Bones"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid ""
+"No texture in this polygon.\n"
+"Set a texture to be able to edit UV."
+msgstr ""
+"Non hai unha textura neste polígono.\n"
+"Engada unha textura para editar o UV."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+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 ""
+"O polígono 2D ten vértices internos, polo que xa non se pode editar na Mini-"
+"Ventá (Viewport)."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Create Polygon & UV"
+msgstr "Crear Polígono e UV"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Create Internal Vertex"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Remove Internal Vertex"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Invalid Polygon (need 3 different vertices)"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Add Custom Polygon"
+msgstr "Engadir Polígono Personalizado"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Remove Custom Polygon"
+msgstr "Eliminar Polígono Personalizado"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Transform UV Map"
+msgstr "Transformar Mapa UV"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Transform Polygon"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Paint Bone Weights"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Open Polygon 2D UV editor."
+msgstr "Abrir Editor UV de Polígonos 2D."
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Polygon 2D UV Editor"
+msgstr "Editor UV de Polígonos 2D"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "UV"
+msgstr "UV"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Points"
+msgstr "Puntos"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Polygons"
+msgstr "Polígonos"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Bones"
+msgstr "Ósos"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Move Points"
+msgstr "Mover Puntos"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Command: Rotate"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Shift: Move All"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Shift+Command: Scale"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Ctrl: Rotate"
+msgstr "Ctrl: Rotar"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Shift+Ctrl: Scale"
+msgstr "Shift+Ctrl: Escalar"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Move Polygon"
+msgstr "Mover Polígono"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Rotate Polygon"
+msgstr "Rotar Polígono"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Scale Polygon"
+msgstr "Escalar Polígono"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Create a custom polygon. Enables custom polygon rendering."
+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."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Unpaint weights with specified intensity."
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Radius:"
+msgstr "Radio:"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Copy Polygon to UV"
+msgstr "Copiar Polígono a UV"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Copy UV to Polygon"
+msgstr "Copiar UV a Polígono"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Clear UV"
+msgstr "Limpar UV"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Grid Settings"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Snap"
+msgstr "Axuste de Cuadrícula"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Enable Snap"
+msgstr "Activar Axuste"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Grid"
+msgstr "Cuadrícula"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Show Grid"
+msgstr "Amosar Cuadrícula"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Configure Grid:"
+msgstr "Configurar Cuadrícula:"
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Grid Offset X:"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Grid Offset Y:"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Grid Step X:"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Grid Step Y:"
+msgstr ""
+
+#: editor/plugins/polygon_2d_editor_plugin.cpp
+msgid "Sync Bones to Polygon"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "ERROR: Couldn't load resource!"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "Add Resource"
+msgstr "Engadir Recurso"
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "Rename Resource"
+msgstr "Renomear Recurso"
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Delete Resource"
+msgstr "Eliminar Recurso"
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "Resource clipboard is empty!"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "Paste Resource"
+msgstr "Pegar Recurso"
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/scene_tree_editor.cpp
+msgid "Instance:"
+msgstr "Instancia:"
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
+#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Type:"
+msgstr "Tipo:"
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr ""
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "Load Resource"
+msgstr "Cargar Recurso"
+
+#: editor/plugins/resource_preloader_editor_plugin.cpp
+msgid "ResourcePreloader"
+msgstr ""
+
+#: editor/plugins/root_motion_editor_plugin.cpp
+msgid "AnimationTree has no path set to an AnimationPlayer"
+msgstr ""
+
+#: editor/plugins/root_motion_editor_plugin.cpp
+msgid "Path to AnimationPlayer is invalid"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Clear Recent Files"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Close and save changes?"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error writing TextFile:"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Could not load file at:"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error saving file!"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error while saving theme."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error Saving"
+msgstr "Erro ao Gardar"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error importing theme."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error Importing"
+msgstr "Erro ao Importar"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "New Text File..."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Open File"
+msgstr "Abrir Arquivo"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Save File As..."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Can't obtain the script for running."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Script failed reloading, check console for errors."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Script is not in tool mode, will not be able to run."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid ""
+"To run this script, it must inherit EditorScript and be set to tool mode."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Import Theme"
+msgstr "Importar Tema"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error while saving theme"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Error saving"
+msgstr "Erro ao gardar"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Save Theme As..."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "%s Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+msgid "Find Next"
+msgstr "Atopar Seguinte"
+
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp
+msgid "Find Previous"
+msgstr "Atopar Anterior"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Filter scripts"
+msgstr "Filtrar scripts"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Toggle alphabetical sorting of the method list."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Filter methods"
+msgstr "Filtrar métodos"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Sort"
+msgstr "Ordenar"
+
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Move Up"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Move Down"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Next script"
+msgstr "Seguinte script"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Previous script"
+msgstr "Anterior script"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "File"
+msgstr "Arquivo"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Open..."
+msgstr "Abrir..."
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Reopen Closed Script"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Save All"
+msgstr "Gardar Todo"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Soft Reload Script"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Copy Script Path"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "History Previous"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "History Next"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme"
+msgstr "Tema"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Import Theme..."
+msgstr "Importar Tema..."
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Reload Theme"
+msgstr "Volver a Cargar Tema"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Save Theme"
+msgstr "Gardar Tema"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Close All"
+msgstr "Pechar Todo"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Close Docs"
+msgstr "Pechar Documentación"
+
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+msgid "Run"
+msgstr "Executar"
+
+#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+msgid "Step Into"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+msgid "Step Over"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+msgid "Break"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/project_manager.cpp
+#: editor/script_editor_debugger.cpp
+msgid "Continue"
+msgstr "Continuar"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Keep Debugger Open"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with External Editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Open Godot online documentation."
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Search the reference documentation."
+msgstr "Buscar na documentación de referencia."
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Go to previous edited document."
+msgstr "Ir ao anterior documento editado."
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Go to next edited document."
+msgstr "Ir ao seguinte documento editado."
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Discard"
+msgstr "Descartar"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?:"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+msgid "Debugger"
+msgstr "Depurador"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Search Results"
+msgstr "Resultados de Búsqueda"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Clear Recent Scripts"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Connections to method:"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp
+msgid "Source"
+msgstr "Fonte"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Target"
+msgstr "Obxectivo"
+
+#: editor/plugins/script_text_editor.cpp
+msgid ""
+"Missing connected method '%s' for signal '%s' from node '%s' to node '%s'."
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "[Ignore]"
+msgstr "[Ignorar]"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Line"
+msgstr "Liña"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Go to Function"
+msgstr "Ir a Función"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Only resources from filesystem can be dropped."
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Can't drop nodes because script '%s' is not used in this scene."
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Lookup Symbol"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Pick Color"
+msgstr "Elexir Cor"
+
+#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
+msgid "Convert Case"
+msgstr "Converter Maiús./Minús."
+
+#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
+msgid "Uppercase"
+msgstr "Maiúscula"
+
+#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
+msgid "Lowercase"
+msgstr "Minúscula"
+
+#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
+msgid "Capitalize"
+msgstr "Capitalizar"
+
+#: editor/plugins/script_text_editor.cpp editor/plugins/text_editor.cpp
+msgid "Syntax Highlighter"
+msgstr "Marcador de Sintaxe"
+
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
+msgid "Bookmarks"
+msgstr "Marcadores"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Breakpoints"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/plugins/text_editor.cpp
+msgid "Go To"
+msgstr "Ir a"
+
+#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
+#: scene/gui/text_edit.cpp
+msgid "Cut"
+msgstr "Cortar"
+
+#: editor/plugins/script_text_editor.cpp scene/gui/line_edit.cpp
+#: scene/gui/text_edit.cpp
+msgid "Select All"
+msgstr "Seleccionar Todo"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Delete Line"
+msgstr "Eliminar Liña"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Indent Left"
+msgstr "Sangrado á Esquerda"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Indent Right"
+msgstr "Sangrado á Dereita"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Toggle Comment"
+msgstr "Comentar/Descomentar"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Fold/Unfold Line"
+msgstr "Expandir/Colapsar Liña"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Fold All Lines"
+msgstr "Colapsar Tódalas Liñas"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Unfold All Lines"
+msgstr "Expandir Tódalas Liñas"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Clone Down"
+msgstr "Clonar Liña"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Complete Symbol"
+msgstr "Completar Símbolo"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Evaluate Selection"
+msgstr "Evaluar Selección"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Trim Trailing Whitespace"
+msgstr "Eliminar Espazos ao Final da Liña"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Convert Indent to Spaces"
+msgstr "Convertir Indentación a Espazos"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Convert Indent to Tabs"
+msgstr "Convertir Identación a Tabulacións"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Auto Indent"
+msgstr "Auto Indentar"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Find in Files..."
+msgstr "Buscar en Arquivos.."
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Contextual Help"
+msgstr "Axuda Contextual"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Toggle Bookmark"
+msgstr "Act./Desact. Marcapáxinas"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Go to Next Bookmark"
+msgstr "Ir ao Seguinte Marcapáxinas"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Go to Previous Bookmark"
+msgstr "Ir ao Anterior Marcapáxinas"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Remove All Bookmarks"
+msgstr "Eliminar Tódolos Marcapáxinas"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Go to Function..."
+msgstr "Ir a Función..."
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Go to Line..."
+msgstr "Ir a Liña..."
+
+#: editor/plugins/script_text_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Toggle Breakpoint"
+msgstr "Act./Desact. Punto de Interrupción (Breakpoint)"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Remove All Breakpoints"
+msgstr "Eliminar Tódolos Puntos de Interrupción (Breakpoints)"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Go to Next Breakpoint"
+msgstr "Ir ao Seguinte Punto de Interrupción"
+
+#: editor/plugins/script_text_editor.cpp
+msgid "Go to Previous Breakpoint"
+msgstr "Ir ao Anterior Punto de Interrupción"
+
+#: editor/plugins/shader_editor_plugin.cpp
+msgid ""
+"This shader has been modified on on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Este shader foi modificado en disco.\n"
+"Que acción deberían de tomarse?"
+
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Shader"
+msgstr "Shader"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "This skeleton has no bones, create some children Bone2D nodes."
+msgstr "Este esqueleto non ten ósos; crea uns nodos fillo Bone2D."
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Create Rest Pose from Bones"
+msgstr "Crear Pose de Repouso a partir dos Ósos"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Rest Pose to Bones"
+msgstr "Asignar Pose de Repouso aos Ósos"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Skeleton2D"
+msgstr "Skeleton2D"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Make Rest Pose (From Bones)"
+msgstr "Crear Pose de Repouso (a partir dos Ósos)"
+
+#: editor/plugins/skeleton_2d_editor_plugin.cpp
+msgid "Set Bones to Rest Pose"
+msgstr "Asignar Pose de Repouso aos Ósos"
+
+#: editor/plugins/skeleton_editor_plugin.cpp
+msgid "Create physical bones"
+msgstr "Crear ósos físicos"
+
+#: editor/plugins/skeleton_editor_plugin.cpp
+msgid "Skeleton"
+msgstr "Esqueleto"
+
+#: editor/plugins/skeleton_editor_plugin.cpp
+msgid "Create physical skeleton"
+msgstr "Crear esqueleto físico"
+
+#: editor/plugins/skeleton_ik_editor_plugin.cpp
+msgid "Play IK"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Orthogonal"
+msgstr "Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Perspective"
+msgstr "Perspetiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Transform Aborted."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "X-Axis Transform."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Y-Axis Transform."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Z-Axis Transform."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Plane Transform."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Scaling: "
+msgstr "Escalado: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Translating: "
+msgstr "Trasladando: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rotating %s degrees."
+msgstr "Rotando % graos."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Keying is disabled (no key inserted)."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Animation Key Inserted."
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Pitch"
+msgstr "Cabeceo"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Yaw"
+msgstr "Guiñada"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "Tamaño"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Objects Drawn"
+msgstr "Obxectos Debuxados"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Material Changes"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Shader Changes"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Surface Changes"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Draw Calls"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Vertices"
+msgstr "Vértices"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top View."
+msgstr "Vista Superior."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom View."
+msgstr "Vista Inferior."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom"
+msgstr "Inferior"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left View."
+msgstr "Vista Esquerda."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left"
+msgstr "Esquerda"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right View."
+msgstr "Vista Dereita."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right"
+msgstr "Dereita"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front View."
+msgstr "Vista Frontal."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front"
+msgstr "Frontal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear View."
+msgstr "Vista Traseria."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear"
+msgstr "Traseira"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Align Transform with View"
+msgstr "Aliñar Transformación con Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Align Rotation with View"
+msgstr "Aliñar Rotación con Perspectiva"
+
+#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "No parent to instance a child at."
+msgstr "Non hai un pai ao que instanciarlle un fillo."
+
+#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
+msgid "This operation requires a single selected node."
+msgstr "Esta operación precisa un único nodo seleccionado."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Auto Orthogonal Enabled"
+msgstr "Auto Ortogonal Activado"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Lock View Rotation"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Display Normal"
+msgstr "Mostrar de Forma Normal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Display Wireframe"
+msgstr "Mostrar Malla"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Display Overdraw"
+msgstr "Mostrar Zonas Redebuxadas (Overdraw)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Display Unshaded"
+msgstr "Mostrar Sen Sombreado"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Environment"
+msgstr "Amosar Entorno"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Gizmos"
+msgstr "Amosar Gizmos"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Information"
+msgstr "Amosar Información"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View FPS"
+msgstr "Ver FPS"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Half Resolution"
+msgstr "Resolución á Metade"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Audio Listener"
+msgstr "Oínte de Son"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Enable Doppler"
+msgstr "Activar Efecto Doppler"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Cinematic Preview"
+msgstr "Vista Previa Cinemática"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Not available when using the GLES2 renderer."
+msgstr "Non dispoñible cando se está usando o renderizador GLES2."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Left"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Right"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Forward"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Backwards"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Down"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Slow Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Rotation Locked"
+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 ""
+"Nota: o valor dos FPS corresponde aos fotogramas por segundo do editor.\n"
+"Non pode usarse como unha forma fiable de medir o rendemento do xogo."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "XForm Dialog"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Click to toggle between visibility states.\n"
+"\n"
+"Open eye: Gizmo is visible.\n"
+"Closed eye: Gizmo is hidden.\n"
+"Half-open eye: Gizmo is also visible through opaque surfaces (\"x-ray\")."
+msgstr ""
+"Faga clic para cambiar entre estados de visibilidade.\n"
+"\n"
+"Ollo aberto: Gizmo visible.\n"
+"Ollo pechado: Gizmo oculto.\n"
+"Ollo medio aberto, medio pechado: Gizmo visible ao través de superficies "
+"opacas (\"raios x\")."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Nodes To Floor"
+msgstr "Axustar Nodos ao Chan"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Couldn't find a solid floor to snap the selection to."
+msgstr "Non se puido encontrar chan sólido no que poder axustar a selección."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Use Local Space"
+msgstr "Usar Espazo Local"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Use Snap"
+msgstr "Usar Axuste de Cuadrícula"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Bottom View"
+msgstr "Vista Inferior"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Top View"
+msgstr "Vista Superior"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rear View"
+msgstr "Vista Traseira"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Front View"
+msgstr "Vista Frontal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Left View"
+msgstr "Vista Esquerda"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Right View"
+msgstr "Vista Dereita"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Switch Perspective/Orthogonal View"
+msgstr "Vista Perspectiva/Ortogonal"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Insert Animation Key"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Focus Origin"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Focus Selection"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Toggle Freelook"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Transform"
+msgstr "Transformación"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Object to Floor"
+msgstr "Axustar Obxecto ao Chan"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Transform Dialog..."
+msgstr "Aplicar Transformación..."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "1 Viewport"
+msgstr "1 Ventá"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "2 Viewports"
+msgstr "2 Ventás"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "2 Viewports (Alt)"
+msgstr "2 Ventás (Alt)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "3 Viewports"
+msgstr "3 Ventás"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "3 Viewports (Alt)"
+msgstr "3 Ventás (Alt)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "4 Viewports"
+msgstr "4 Ventás"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Gizmos"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Origin"
+msgstr "Amosar Orixe"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Grid"
+msgstr "Amosar Cuadrícula"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Settings..."
+msgstr "Axustes..."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Snap Settings"
+msgstr "Configuración de Axuste"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Translate Snap:"
+msgstr "Axuste de Translación:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rotate Snap (deg.):"
+msgstr "Axuste de Rotación (graos):"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Scale Snap (%):"
+msgstr "Axuste de Escalado (%):"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Viewport Settings"
+msgstr "Axustes de Visión"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Perspective FOV (deg.):"
+msgstr "Campo de Visión (graos):"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Z-Near:"
+msgstr "Plano Próximo:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "View Z-Far:"
+msgstr "Plano Afastado:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Transform Change"
+msgstr "Cambio de Transformación"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Translate:"
+msgstr "Trasladar:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Rotate (deg.):"
+msgstr "Rotar (graos):"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Scale (ratio):"
+msgstr "Escalar (Razón):"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Transform Type"
+msgstr "Tipo de Transformación"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Pre"
+msgstr "Anterior (Pre)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Post"
+msgstr "Posterior (Post)"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Nameless gizmo"
+msgstr "Gizmo sen nome"
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Create Mesh2D"
+msgstr "Crear Mesh2D"
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Mesh2D Preview"
+msgstr "Vista Previa de Mesh2D"
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Create Polygon2D"
+msgstr "Crear Polygon2D"
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Polygon2D Preview"
+msgstr "Vista Previa Polygon2D"
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Create CollisionPolygon2D"
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "CollisionPolygon2D Preview"
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Create LightOccluder2D"
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "LightOccluder2D Preview"
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Sprite is empty!"
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Can't convert a sprite using animation frames to mesh."
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Invalid geometry, can't replace by mesh."
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Convert to Mesh2D"
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Invalid geometry, can't create polygon."
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Convert to Polygon2D"
+msgstr "Convertir a Polygon2D"
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Invalid geometry, can't create collision polygon."
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Create CollisionPolygon2D Sibling"
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Invalid geometry, can't create light occluder."
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Create LightOccluder2D Sibling"
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Sprite"
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Simplification: "
+msgstr "Simplificación: "
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Shrink (Pixels): "
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Grow (Pixels): "
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Update Preview"
+msgstr ""
+
+#: editor/plugins/sprite_editor_plugin.cpp
+msgid "Settings:"
+msgstr "Axustes:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "No Frames Selected"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Add %d Frame(s)"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Add Frame"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Unable to load images"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "ERROR: Couldn't load frame resource!"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Resource clipboard is empty or not a texture!"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Paste Frame"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Add Empty"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Change Animation FPS"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "(empty)"
+msgstr "(baleiro)"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Move Frame"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Animations:"
+msgstr "Animacións:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "New Animation"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Speed:"
+msgstr "Velocidade:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Loop"
+msgstr "Bucle"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Animation Frames:"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Add a Texture from File"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Add Frames from a Sprite Sheet"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Insert Empty (Before)"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Insert Empty (After)"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Move (Before)"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Move (After)"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Select Frames"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Horizontal:"
+msgstr "Horizontal:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Vertical:"
+msgstr "Vertical:"
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Select/Clear All Frames"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "Create Frames from Sprite Sheet"
+msgstr ""
+
+#: editor/plugins/sprite_frames_editor_plugin.cpp
+msgid "SpriteFrames"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Set Region Rect"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Set Margin"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Snap Mode:"
+msgstr "Modo de Axuste:"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+#: scene/resources/visual_shader.cpp
+msgid "None"
+msgstr "Ningún"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Pixel Snap"
+msgstr "Axustar aos Píxeles"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Grid Snap"
+msgstr "Axuste de Cuadrícula"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Auto Slice"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Offset:"
+msgstr "Offset:"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Step:"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "Sep.:"
+msgstr ""
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+msgid "TextureRegion"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Add All Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Add All"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Remove All Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
+msgid "Remove All"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Edit Theme"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme editing menu."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Add Class Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Remove Class Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Create Empty Template"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Create Empty Editor Template"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Create From Current Editor Theme"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Toggle Button"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Disabled Button"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Disabled Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Check Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Checked Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Radio Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Checked Radio Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Named Sep."
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Submenu"
+msgstr "Submenú"
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Subitem 1"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Subitem 2"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Has"
+msgstr "Ten"
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Many"
+msgstr "Moitas"
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Disabled LineEdit"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Tab 1"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Tab 2"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Tab 3"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Editable Item"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Subtree"
+msgstr "Subárbore"
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Has,Many,Options"
+msgstr "Ten,Moitas,Opcións"
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Data Type:"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Icon"
+msgstr "Icona"
+
+#: editor/plugins/theme_editor_plugin.cpp editor/rename_dialog.cpp
+msgid "Style"
+msgstr "Estilo"
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Font"
+msgstr "Fonte"
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Color"
+msgstr "Cor"
+
+#: editor/plugins/theme_editor_plugin.cpp
+msgid "Theme File"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Erase Selection"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Fix Invalid Tiles"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cut Selection"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Paint TileMap"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Line Draw"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Bucket Fill"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Erase TileMap"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Find Tile"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Transpose"
+msgstr "Transpoñer"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Disable Autotile"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Enable Priority"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Filter tiles"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Give a TileSet resource to this TileMap to use its tiles."
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Paint Tile"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid ""
+"Shift+LMB: Line Draw\n"
+"Shift+Command+LMB: Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid ""
+"Shift+LMB: Line Draw\n"
+"Shift+Ctrl+LMB: Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Pick Tile"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rotate Left"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rotate Right"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Flip Horizontally"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Flip Vertically"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Clear Transform"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Add Texture(s) to TileSet."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Remove selected Texture from TileSet."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create from Scene"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Merge from Scene"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "New Single Tile"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "New Autotile"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "New Atlas"
+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 "Region"
+msgstr "Rexión"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Collision"
+msgstr "Colisión"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Occlusion"
+msgstr "Oclusión"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Navigation"
+msgstr "Navegación"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Bitmask"
+msgstr "Máscara de Bits"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Priority"
+msgstr "Prioridade"
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Z Index"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Region Mode"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Collision Mode"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Occlusion Mode"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Navigation Mode"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Bitmask Mode"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Priority Mode"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Icon Mode"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Z Index Mode"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Copy bitmask."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Paste bitmask."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+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 "New Rectangle"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create a new polygon."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "New Polygon"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Delete Selected Shape"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Keep polygon inside region Rect."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Enable snap and show grid (configurable via the Inspector)."
+msgstr ""
+"Activar axuste de cuadrícula e amosar cuadrícula (configurable no inspector)."
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Display Tile Names (Hold Alt Key)"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid ""
+"Add or select a texture on the left panel to edit the tiles bound to it."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Remove selected texture? This will remove all tiles which use it."
+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
+msgid "Create from scene? This will overwrite all current tiles."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Merge from scene?"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Remove Texture"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "%s file(s) were not added because was already on the list."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid ""
+"Drag handles to edit Rect.\n"
+"Click on another Tile to edit it."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Delete selected Rect."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid ""
+"Select current edited sub-tile.\n"
+"Click on another Tile to edit it."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Delete polygon."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid ""
+"LMB: Set bit on.\n"
+"RMB: Set bit off.\n"
+"Shift+LMB: Set wildcard bit.\n"
+"Click on another Tile to edit it."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid ""
+"Select sub-tile to use as icon, this will be also used on invalid autotile "
+"bindings.\n"
+"Click on another Tile to edit it."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid ""
+"Select sub-tile to change its priority.\n"
+"Click on another Tile to edit it."
+msgstr ""
+
+#: 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 ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Set Tile Region"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create Tile"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Set Tile Icon"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Edit Tile Bitmask"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Edit Collision Polygon"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Edit Occlusion Polygon"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Edit Navigation Polygon"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Paste Tile Bitmask"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+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 ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Remove Collision Polygon"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Remove Occlusion Polygon"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Remove Navigation Polygon"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Edit Tile Priority"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Edit Tile Z Index"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Convex"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Make Concave"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create Collision Polygon"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "Create Occlusion Polygon"
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "This property can't be changed."
+msgstr ""
+
+#: editor/plugins/tile_set_editor_plugin.cpp
+msgid "TileSet"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "No VCS addons are available."
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Error"
+msgstr "Erro"
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "No files added to stage"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Commit"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "VCS Addon is not initialized"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Version Control System"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Initialize"
+msgstr "Inicializar"
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Staging area"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Detect new changes"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Changes"
+msgstr "Cambios"
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Modified"
+msgstr "Modificado"
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Renamed"
+msgstr "Renomeado"
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Deleted"
+msgstr "Eliminado"
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Typechange"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Stage Selected"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Stage All"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Commit Changes"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+#: modules/gdnative/gdnative_library_singleton_editor.cpp
+msgid "Status"
+msgstr "Estado"
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "View file diffs before committing them to the latest version"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "No file diff is active"
+msgstr ""
+
+#: editor/plugins/version_control_editor_plugin.cpp
+msgid "Detect changes in file diff"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "(GLES3 only)"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add Output"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Scalar"
+msgstr "Escalar"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Vector"
+msgstr "Vector"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Boolean"
+msgstr "Booleano"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Sampler"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add input port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Add output port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Change input port type"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Change output port type"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Change input port name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Change output port name"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Remove input port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Remove output port"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Set expression"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Resize VisualShader node"
+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 "Node(s) Moved"
+msgstr "Nodo(s) Movido(s)"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Duplicate Nodes"
+msgstr "Duplicar Nodos"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Paste Nodes"
+msgstr "Pegar Nodos"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Delete Nodes"
+msgstr "Eliminar Nodos"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Visual Shader Input Type Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "UniformRef Name Changed"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Vertex"
+msgstr "Vertex"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Fragment"
+msgstr "Fragment"
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Light"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Show resulted shader code."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Create Shader Node"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Color function."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Color operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Grayscale function."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Converts HSV vector to RGB equivalent."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Converts RGB vector to HSV equivalent."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Sepia function."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Burn operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Darken operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Difference operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Dodge operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "HardLight operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Lighten operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Overlay operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Screen operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "SoftLight operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Color constant."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Color uniform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the boolean result of the %s comparison between two parameters."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Equal (==)"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Greater Than (>)"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Greater Than or Equal (>=)"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Returns an associated vector if the provided scalars are equal, greater or "
+"less."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Returns the boolean result of the comparison between INF and a scalar "
+"parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Returns the boolean result of the comparison between NaN and a scalar "
+"parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Less Than (<)"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Less Than or Equal (<=)"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Not Equal (!=)"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Returns an associated vector if the provided boolean value is true or false."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Returns an associated scalar if the provided boolean value is true or false."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the boolean result of the comparison between two parameters."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Returns the boolean result of the comparison between INF (or NaN) and a "
+"scalar parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Boolean constant."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Boolean uniform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "'%s' input parameter for all shader modes."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Input parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "'%s' input parameter for vertex and fragment shader modes."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "'%s' input parameter for fragment and light shader modes."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "'%s' input parameter for fragment shader mode."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "'%s' input parameter for light shader mode."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "'%s' input parameter for vertex shader mode."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "'%s' input parameter for vertex and fragment shader mode."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Scalar function."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Scalar operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "E constant (2.718282). Represents the base of the natural logarithm."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Epsilon constant (0.00001). Smallest possible scalar number."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Phi constant (1.618034). Golden ratio."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Pi/4 constant (0.785398) or 45 degrees."
+msgstr "Constante Pi/4 (0.785398), ou 45 graos."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Pi/2 constant (1.570796) or 90 degrees."
+msgstr "Constante Pi/2 (1.570796), ou 90 graos."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Pi constant (3.141593) or 180 degrees."
+msgstr "Constante Pi (3.141593), ou 180 graos."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Tau constant (6.283185) or 360 degrees."
+msgstr "Constante Tau (6.283185), ou 360 graos."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Sqrt2 constant (1.414214). Square root of 2."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the absolute value of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the arc-cosine of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the inverse hyperbolic cosine of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the arc-sine of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the inverse hyperbolic sine of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the arc-tangent of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the arc-tangent of the parameters."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the inverse hyperbolic tangent of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Finds the nearest integer that is greater than or equal to the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Constrains a value to lie between two further values."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the cosine of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the hyperbolic cosine of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Converts a quantity in radians to degrees."
+msgstr "Converte unha cantidade de radiáns a graos."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Base-e Exponential."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Base-2 Exponential."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Finds the nearest integer less than or equal to the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Computes the fractional part of the argument."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the inverse of the square root of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Natural logarithm."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Base-2 logarithm."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the greater of two values."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the lesser of two values."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Linear interpolation between two scalars."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the opposite value of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "1.0 - scalar"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Returns the value of the first parameter raised to the power of the second."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Converts a quantity in degrees to radians."
+msgstr "Converte unha cantidade de graos a radiáns."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "1.0 / scalar"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Finds the nearest integer to the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Finds the nearest even integer to the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Clamps the value between 0.0 and 1.0."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Extracts the sign of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the sine of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the hyperbolic sine of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the square root of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n"
+"\n"
+"Returns 0.0 if 'x' is smaller than 'edge0' and 1.0 if x is larger than "
+"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
+"using Hermite polynomials."
+msgstr ""
+"SmoothStep function( scalar(edge0), scalar(edge1), scalar(x) ).\n"
+"\n"
+"Devolve 0.0 se 'x' é menor que 'edge0' e 1.0 se x é maior que 'edge1'. En "
+"caso contrario devólvese un valor interpolado entre 0.0 e 1.0 usando "
+"polinomios de Hermite."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Step function( scalar(edge), scalar(x) ).\n"
+"\n"
+"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
+msgstr ""
+"Step function( scalar(edge), scalar(x) ).\n"
+"\n"
+"Devolve 0.0 se 'x' e menor que 'edge'; e 1.0 en caso contrario."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the tangent of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the hyperbolic tangent of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Finds the truncated value of the parameter."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Adds scalar to scalar."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Divides scalar by scalar."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Multiplies scalar by scalar."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the remainder of the two scalars."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Subtracts scalar from scalar."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Scalar constant."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Scalar uniform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Perform the cubic texture lookup."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Perform the texture lookup."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Cubic texture uniform lookup."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "2D texture uniform lookup."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "2D texture uniform lookup with triplanar."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Transform function."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Calculate the outer product of a pair of vectors.\n"
+"\n"
+"OuterProduct treats the first parameter 'c' as a column vector (matrix with "
+"one column) and the second parameter 'r' as a row vector (matrix with one "
+"row) and does a linear algebraic matrix multiply 'c * r', yielding a matrix "
+"whose number of rows is the number of components in 'c' and whose number of "
+"columns is the number of components in 'r'."
+msgstr ""
+"Calcula o produto exterior dun par de vectores.\n"
+"\n"
+"OuterProduct trata o primeiro parámetro 'c' coma un vector columna (matriz "
+"con unha soa columna), e o segundo parámetro 'r' coma un vector fila (matriz "
+"con unha soa fila), e fai a multiplicación alxebráica 'c * r'. Esto devolve "
+"unha matriz cun número de filas igual ao número de compoñentes en 'c', e cun "
+"número de columnas igual ao número de compoñentes en 'r'."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Composes transform from four vectors."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Decomposes transform to four vectors."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Calculates the determinant of a transform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Calculates the inverse of a transform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Calculates the transpose of a transform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Multiplies transform by transform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Multiplies vector by transform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Transform constant."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Transform uniform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Vector function."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Vector operator."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Composes vector from three scalars."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Decomposes vector to three scalars."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Calculates the cross product of two vectors."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the distance between two points."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Calculates the dot product of two vectors."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Returns the vector that points in the same direction as a reference vector. "
+"The function has three vector parameters : N, the vector to orient, I, the "
+"incident vector, and Nref, the reference vector. If the dot product of I and "
+"Nref is smaller than zero the return value is N. Otherwise -N is returned."
+msgstr ""
+"Devolve o vector que ten a mesma dirección que o vector de referencia. A "
+"función ten tres vector como parámetros: N, o vector a orientar; I, o vector "
+"incidente; e Nref, o vector de referencia. Se o produto escalar de I e Nref "
+"é menor que cero (forman un ángulo maior que 90 graos) entón devolve N. En "
+"caso contrario devolve -N."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Calculates the length of a vector."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Linear interpolation between two vectors."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Linear interpolation between two vectors using scalar."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Calculates the normalize product of vector."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "1.0 - vector"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "1.0 / vector"
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Returns the vector that points in the direction of reflection ( a : incident "
+"vector, b : normal vector )."
+msgstr ""
+"Devolve o vector que apunta na dirección de reflexo ( a : vector incidente, "
+"b : vector normal)."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the vector that points in the direction of refraction."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"SmoothStep function( vector(edge0), vector(edge1), vector(x) ).\n"
+"\n"
+"Returns 0.0 if 'x' is smaller than 'edge0' and 1.0 if 'x' is larger than "
+"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
+"using Hermite polynomials."
+msgstr ""
+"SmoothStep function( vector(edge0), vector(edge1), vector(x) ).\n"
+"\n"
+"Devolve 0.0 se 'x' é menor que 'edge0' e 1.0 se x é maior que 'edge1'. En "
+"caso contrario devólvese un valor interpolado entre 0.0 e 1.0 usando "
+"polinomios de Hermite."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"SmoothStep function( scalar(edge0), scalar(edge1), vector(x) ).\n"
+"\n"
+"Returns 0.0 if 'x' is smaller than 'edge0' and 1.0 if 'x' is larger than "
+"'edge1'. Otherwise the return value is interpolated between 0.0 and 1.0 "
+"using Hermite polynomials."
+msgstr ""
+"SmoothStep function( scalar(edge0), scalar(edge1), vector(x) ).\n"
+"\n"
+"Devolve 0.0 se 'x' é menor que 'edge0' e 1.0 se x é maior que 'edge1'. En "
+"caso contrario devólvese un valor interpolado entre 0.0 e 1.0 usando "
+"polinomios de Hermite."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Step function( vector(edge), vector(x) ).\n"
+"\n"
+"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
+msgstr ""
+"Step function( vector(edge), vector(x) ).\n"
+"\n"
+"Devolve 0.0 se 'x' e menor que 'edge'; e 1.0 en caso contrario."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Step function( scalar(edge), vector(x) ).\n"
+"\n"
+"Returns 0.0 if 'x' is smaller than 'edge' and otherwise 1.0."
+msgstr ""
+"Step function( scalar(edge), vector(x) ).\n"
+"\n"
+"Devolve 0.0 se 'x' e menor que 'edge'; e 1.0 en caso contrario."
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Adds vector to vector."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Divides vector by vector."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Multiplies vector by vector."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Returns the remainder of the two vectors."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Subtracts vector from vector."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Vector constant."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "Vector uniform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Custom Godot Shader Language expression, with custom amount of input and "
+"output ports. This is a direct injection of code into the vertex/fragment/"
+"light function, do not use it to write the function declarations inside."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Returns falloff based on the dot product of surface normal and view "
+"direction of camera (pass associated inputs to it)."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"Custom Godot Shader Language expression, which is placed on top of the "
+"resulted shader. You can place various function definitions inside and call "
+"it later in the Expressions. You can also declare varyings, uniforms and "
+"constants."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "A reference to an existing uniform."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "(Fragment/Light mode only) Scalar derivative function."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid "(Fragment/Light mode only) Vector derivative function."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"(Fragment/Light mode only) (Vector) Derivative in 'x' using local "
+"differencing."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"(Fragment/Light mode only) (Scalar) Derivative in 'x' using local "
+"differencing."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"(Fragment/Light mode only) (Vector) Derivative in 'y' using local "
+"differencing."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"(Fragment/Light mode only) (Scalar) Derivative in 'y' using local "
+"differencing."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"(Fragment/Light mode only) (Vector) Sum of absolute derivative in 'x' and "
+"'y'."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+msgid ""
+"(Fragment/Light mode only) (Scalar) Sum of absolute derivative in 'x' and "
+"'y'."
+msgstr ""
+
+#: editor/plugins/visual_shader_editor_plugin.cpp
+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 "Executable"
+
+#: editor/project_export.cpp
+msgid "Delete preset '%s'?"
+msgstr "Eliminar axustes de exportación '%s'?"
+
+#: editor/project_export.cpp
+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 ""
+"Fallou a exportación do proxecto á plataforma '%s'.\n"
+"Esto pode deberse a un problema cos axustes de exportación."
+
+#: editor/project_export.cpp
+msgid "Release"
+msgstr ""
+
+#: editor/project_export.cpp
+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 "Axustes de Exportación"
+
+#: editor/project_export.cpp editor/project_settings_editor.cpp
+msgid "Add..."
+msgstr "Engadir..."
+
+#: editor/project_export.cpp
+msgid ""
+"If checked, the preset will be available for use in one-click deploy.\n"
+"Only one preset per platform may be marked as runnable."
+msgstr ""
+"Ao estar activado, estes axustes de exportación estarán dispoñibles para o "
+"usar co despregue dun só clic.\n"
+"Só uns axustes de exportación por plataforma poden marcarse como executables."
+
+#: editor/project_export.cpp
+msgid "Export Path"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Resources"
+msgstr "Recursos"
+
+#: editor/project_export.cpp
+msgid "Export all resources in the project"
+msgstr "Exportar tódolos recursos no proxecto"
+
+#: editor/project_export.cpp
+msgid "Export selected scenes (and dependencies)"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export selected resources (and dependencies)"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export Mode:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Resources to export:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Filters to export non-resource files/folders\n"
+"(comma-separated, e.g: *.json, *.txt, docs/*)"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid ""
+"Filters to exclude files/folders from project\n"
+"(comma-separated, e.g: *.json, *.txt, docs/*)"
+msgstr ""
+"Filtros para excluír arquivos/cartafois de proxectos\n"
+"(separados por coma; exemplo: *json, *.txt, docs*)"
+
+#: editor/project_export.cpp
+msgid "Features"
+msgstr "Características"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Feature List:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Script"
+msgstr "Script"
+
+#: editor/project_export.cpp
+msgid "Script Export Mode:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Text"
+msgstr "Texto"
+
+#: editor/project_export.cpp
+msgid "Compiled"
+msgstr "Compilado"
+
+#: editor/project_export.cpp
+msgid "Encrypted (Provide Key Below)"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Invalid Encryption Key (must be 64 characters long)"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Script Encryption Key (256-bits as hex):"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export Project"
+msgstr "Exportar Proxecto"
+
+#: editor/project_export.cpp
+msgid "Export mode?"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export All"
+msgstr ""
+
+#: editor/project_export.cpp editor/project_manager.cpp
+msgid "ZIP File"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Godot Game Pack"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export templates for this platform are missing:"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Manage Export Templates"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Export With Debug"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "The path specified doesn't exist."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Error opening package file (it's not in ZIP format)."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
+"Invalid \".zip\" project file; it doesn't contain a \"project.godot\" file."
+msgstr ""
+"O arquivo de proxecto '.zip' non é válido; non conteñe ningún arquivo de "
+"configuración 'project.godot'."
+
+#: editor/project_manager.cpp
+msgid "Please choose an empty folder."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "Please choose a \"project.godot\" or \".zip\" file."
+msgstr "Por favor, elixa un arquivo de tipo 'project.godot' ou '.zip'."
+
+#: editor/project_manager.cpp
+msgid "This directory already contains a Godot project."
+msgstr "O directorio xa contén un proxecto Godot."
+
+#: editor/project_manager.cpp
+msgid "New Game Project"
+msgstr "Novo Proxecto de Xogo"
+
+#: editor/project_manager.cpp
+msgid "Imported Project"
+msgstr "Proxecto Importado"
+
+#: editor/project_manager.cpp
+msgid "Invalid Project Name."
+msgstr "Nome de Proxecto Inválido."
+
+#: editor/project_manager.cpp
+msgid "Couldn't create folder."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "There is already a folder in this path with the specified name."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "It would be a good idea to name your project."
+msgstr "Sería unha boa idea nomear o teu proxecto."
+
+#: editor/project_manager.cpp
+msgid "Invalid project path (changed anything?)."
+msgstr "A ruta ao proxecto non é valida. Cambiaches algo?"
+
+#: editor/project_manager.cpp
+msgid ""
+"Couldn't load project.godot in project path (error %d). It may be missing or "
+"corrupted."
+msgstr ""
+"Non se pudo cargar o arquivo de configuración 'project.godot' na ruta do "
+"proxecto (erro %d). Pode ser que o arquivo non exista; ou que esté "
+"corrompido."
+
+#: editor/project_manager.cpp
+msgid "Couldn't edit project.godot in project path."
+msgstr "Non se pudo editar o arquivo 'project.godot' na ruta do proxecto."
+
+#: editor/project_manager.cpp
+msgid "Couldn't create project.godot in project path."
+msgstr "Non se pudo crear o arquivo 'project.godot' na ruta do proxecto."
+
+#: editor/project_manager.cpp
+msgid "Rename Project"
+msgstr "Renomear Proxecto"
+
+#: editor/project_manager.cpp
+msgid "Import Existing Project"
+msgstr "Importar Proxecto Existente"
+
+#: editor/project_manager.cpp
+msgid "Import & Edit"
+msgstr "Importar e Editar"
+
+#: editor/project_manager.cpp
+msgid "Create New Project"
+msgstr "Crear Novo Proxecto"
+
+#: editor/project_manager.cpp
+msgid "Create & Edit"
+msgstr "Crear e Editar"
+
+#: editor/project_manager.cpp
+msgid "Install Project:"
+msgstr "Instalar Proxecto:"
+
+#: editor/project_manager.cpp
+msgid "Install & Edit"
+msgstr "Instalar e Editar"
+
+#: editor/project_manager.cpp
+msgid "Project Name:"
+msgstr "Nome do Proxecto:"
+
+#: editor/project_manager.cpp
+msgid "Project Path:"
+msgstr "Ruta do Proxecto:"
+
+#: editor/project_manager.cpp
+msgid "Project Installation Path:"
+msgstr "Ruta de Instalación do Proxecto:"
+
+#: editor/project_manager.cpp
+msgid "Renderer:"
+msgstr "Renderizador:"
+
+#: editor/project_manager.cpp
+msgid "OpenGL ES 3.0"
+msgstr "OpenGL ES 3.0"
+
+#: editor/project_manager.cpp
+msgid "Not supported by your GPU drivers."
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid ""
+"Higher visual quality\n"
+"All features available\n"
+"Incompatible with older hardware\n"
+"Not recommended for web games"
+msgstr ""
+
+#: editor/project_manager.cpp
+msgid "OpenGL ES 2.0"
+msgstr "OpenGL ES 2.0"
+
+#: editor/project_manager.cpp
+msgid ""
+"Lower visual quality\n"
+"Some features not available\n"
+"Works on most hardware\n"
+"Recommended for web games"
+msgstr ""
+
+#: 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"
+msgstr "Proxecto Sen Nome"
+
+#: editor/project_manager.cpp
+msgid "Missing Project"
+msgstr "Proxecto Faltante"
+
+#: editor/project_manager.cpp
+msgid "Error: Project is missing on the filesystem."
+msgstr "Erro: O proxecto non se pode encontrar no sistema de arquivos."
+
+#: editor/project_manager.cpp
+msgid "Can't open project at '%s'."
+msgstr "Non se pode abrir proxecto en '%s'."
+
+#: editor/project_manager.cpp
+msgid "Are you sure to open more than one project?"
+msgstr "Está seguro de que quere abrir máis dun proxecto?"
+
+#: 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 won't be able to open the project with previous versions of the "
+"engine anymore."
+msgstr ""
+"O arquivo de configuración do seguinte proxecto non especifica a versión de "
+"Godot ca cal foi creado.\n"
+"\n"
+"%s\n"
+"\n"
+"Se o abres o arquivo de configuración será convertido ao formato utilizado "
+"na versión actual de Godot.\n"
+"Aviso: Xa non poderás volver a abrir este proxecto con versións anteriores "
+"de 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"
+"%s\n"
+"\n"
+"Do you want to convert it?\n"
+"Warning: You won't be able to open the project with previous versions of the "
+"engine anymore."
+msgstr ""
+"O arquivo de configuración do seguinte proxecto foi xerado por unha versión "
+"antiga de Godot, e é necesario convertelo á versión actual:\n"
+"\n"
+"%s\n"
+"\n"
+"Queres convertelo?\n"
+"Aviso: Xa non poderás abrir o proxecto con versións anteriores de Godot."
+
+#: editor/project_manager.cpp
+msgid ""
+"The project settings were created by a newer engine version, whose settings "
+"are not compatible with this version."
+msgstr ""
+"A configuración do proxecto foi creada por versións máis novas de Godot; "
+"facéndoa incompatible con esta versión."
+
+#: editor/project_manager.cpp
+msgid ""
+"Can't run project: no main scene defined.\n"
+"Please edit the project and set the main scene in the Project Settings under "
+"the \"Application\" category."
+msgstr ""
+"Non se pode executar o proxecto: non hai unha escena principal definida.\n"
+"Por favor, selecciona unha escena principal en \"Configuración do Proxecto"
+"\", na categoría \"Aplicación\"."
+
+#: 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 ""
+
+#: editor/project_manager.cpp
+msgid "Are you sure to run %d projects at once?"
+msgstr "Seguro que queres executar %d proxectos ao mesmo tempo?"
+
+#: editor/project_manager.cpp
+msgid ""
+"Remove %d projects from the list?\n"
+"The project folders' contents won't be modified."
+msgstr ""
+"Eliminar %d proxectos da lista?\n"
+"Os contidos da carpeta de proxectos non serán modificados."
+
+#: editor/project_manager.cpp
+msgid ""
+"Remove this project from the list?\n"
+"The project folder's contents won't be modified."
+msgstr ""
+"Eliminar este proxecto da lista?\n"
+"Os contidos da carpeta de proxectos non serán modificados."
+
+#: editor/project_manager.cpp
+msgid ""
+"Remove all missing projects from the list?\n"
+"The project folders' contents won't be modified."
+msgstr ""
+"Eliminar todos os proxectos faltantes da lista?\n"
+"Os contidos da carpeta de proxectos non serán modificados."
+
+#: editor/project_manager.cpp
+msgid ""
+"Language changed.\n"
+"The interface will update after restarting the editor or project manager."
+msgstr ""
+"Linguaxe cambiada.\n"
+"A interface actualizarase despois de reiniciar o editor ou administrador de "
+"proxectos."
+
+#: editor/project_manager.cpp
+msgid ""
+"Are you sure to scan %s folders for existing Godot projects?\n"
+"This could take a while."
+msgstr ""
+"Seguro que quere escanear proxectos de Godot en %s cartafois?\n"
+"Esto podería demorarse un tempo."
+
+#. TRANSLATORS: This refers to the application where users manage their Godot projects.
+#: editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "Administrador de Proxectos"
+
+#: editor/project_manager.cpp
+msgid "Projects"
+msgstr "Proxectos"
+
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr ""
+"Examinando arquivos,\n"
+"Por favor, espere..."
+
+#: editor/project_manager.cpp
+msgid "Last Modified"
+msgstr "Derradeira Modificación"
+
+#: editor/project_manager.cpp
+msgid "Scan"
+msgstr "Escanear"
+
+#: editor/project_manager.cpp
+msgid "Select a Folder to Scan"
+msgstr "Seleccionar un Cartafol para Escanear"
+
+#: editor/project_manager.cpp
+msgid "New Project"
+msgstr "Novo Proxecto"
+
+#: editor/project_manager.cpp
+msgid "Remove Missing"
+msgstr "Eliminar Faltantes"
+
+#: editor/project_manager.cpp
+msgid "Templates"
+msgstr "Proxectos Modelo"
+
+#: editor/project_manager.cpp
+msgid "Restart Now"
+msgstr "Reiniciar Agora"
+
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr "Non se pode executar proxecto"
+
+#: editor/project_manager.cpp
+msgid ""
+"You currently don't have any projects.\n"
+"Would you like to explore official example projects in the Asset Library?"
+msgstr ""
+"Actualmente non tes ningún proxecto.\n"
+"Gustaríalle buscar proxectos de exemplo oficiais na biblioteca de Assets?"
+
+#: editor/project_manager.cpp
+msgid ""
+"The search box filters projects by name and last path component.\n"
+"To filter projects by name and full path, the query must contain at least "
+"one `/` character."
+msgstr ""
+"A barra de búsqueda filtra os proxectos por nome e último compoñente da súa "
+"ruta.\n"
+"Se quere filtrar proxectos por nome e ruta completa, a consulta debe conter "
+"polo menos un carácter '/'."
+
+#: editor/project_settings_editor.cpp
+msgid "Key "
+msgstr "Botón: "
+
+#: editor/project_settings_editor.cpp
+msgid "Joy Button"
+msgstr "Botón Joystick"
+
+#: editor/project_settings_editor.cpp
+msgid "Joy Axis"
+msgstr "Eixe Joystick"
+
+#: editor/project_settings_editor.cpp
+msgid "Mouse Button"
+msgstr "Botón do Rato"
+
+#: editor/project_settings_editor.cpp
+msgid ""
+"Invalid action name. it cannot be empty nor contain '/', ':', '=', '\\' or "
+"'\"'"
+msgstr ""
+"Nome de acción inválido. O nome non pode estar baleiro, nin conter '/', ':', "
+"'=', '\\' ou '\"'"
+
+#: editor/project_settings_editor.cpp
+msgid "An action with the name '%s' already exists."
+msgstr "Xa existe unha acción co nome '%s'."
+
+#: editor/project_settings_editor.cpp
+msgid "Rename Input Action Event"
+msgstr "Renomear Evento de Entrada"
+
+#: editor/project_settings_editor.cpp
+msgid "Change Action deadzone"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Add Input Action Event"
+msgstr "Engadir Evento de Entrada"
+
+#: editor/project_settings_editor.cpp
+msgid "All Devices"
+msgstr "Tódolos Dispositivos"
+
+#: editor/project_settings_editor.cpp
+msgid "Device"
+msgstr "Dispositivo"
+
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+msgid "Press a Key..."
+msgstr "Pulse algún botón..."
+
+#: editor/project_settings_editor.cpp
+msgid "Mouse Button Index:"
+msgstr "Ãndice do Botón do Rato:"
+
+#: editor/project_settings_editor.cpp
+msgid "Left Button"
+msgstr "Botón Esquerdo"
+
+#: editor/project_settings_editor.cpp
+msgid "Right Button"
+msgstr "Botón Dereito"
+
+#: editor/project_settings_editor.cpp
+msgid "Middle Button"
+msgstr "Botón Central"
+
+#: editor/project_settings_editor.cpp
+msgid "Wheel Up Button"
+msgstr "Mover Roda cara Arriba"
+
+#: editor/project_settings_editor.cpp
+msgid "Wheel Down Button"
+msgstr "Mover Roda cara Abaixo"
+
+#: editor/project_settings_editor.cpp
+msgid "Wheel Left Button"
+msgstr "Mover Roda cara a Esquerda"
+
+#: editor/project_settings_editor.cpp
+msgid "Wheel Right Button"
+msgstr "Mover Roda cara a Dereita"
+
+#: editor/project_settings_editor.cpp
+msgid "X Button 1"
+msgstr "Botón X 1"
+
+#: editor/project_settings_editor.cpp
+msgid "X Button 2"
+msgstr "Botón X 2"
+
+#: editor/project_settings_editor.cpp
+msgid "Joypad Axis Index:"
+msgstr "Ãndice do Eixe do Joystick:"
+
+#: editor/project_settings_editor.cpp
+msgid "Axis"
+msgstr "Eixe"
+
+#: editor/project_settings_editor.cpp
+msgid "Joypad Button Index:"
+msgstr "Ãndice do Botón do Joystick:"
+
+#: editor/project_settings_editor.cpp
+msgid "Erase Input Action"
+msgstr "Eliminar Acción de Entrada"
+
+#: editor/project_settings_editor.cpp
+msgid "Erase Input Action Event"
+msgstr "Eliminar Evento de Entrada"
+
+#: editor/project_settings_editor.cpp
+msgid "Add Event"
+msgstr "Engadir Evento"
+
+#: editor/project_settings_editor.cpp
+msgid "Button"
+msgstr "Botón"
+
+#: editor/project_settings_editor.cpp
+msgid "Left Button."
+msgstr "Botón Esquerdo."
+
+#: editor/project_settings_editor.cpp
+msgid "Right Button."
+msgstr "Botón Dereito."
+
+#: editor/project_settings_editor.cpp
+msgid "Middle Button."
+msgstr "Botón Central."
+
+#: editor/project_settings_editor.cpp
+msgid "Wheel Up."
+msgstr "Roda cara Arriba."
+
+#: editor/project_settings_editor.cpp
+msgid "Wheel Down."
+msgstr "Roda cara Abaixo."
+
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr "Engadir Propiedade Global"
+
+#: editor/project_settings_editor.cpp
+msgid "Select a setting item first!"
+msgstr "Primeiro seleccione un elemento!"
+
+#: editor/project_settings_editor.cpp
+msgid "No property '%s' exists."
+msgstr "Non existe a propiedade '%s'."
+
+#: editor/project_settings_editor.cpp
+msgid "Setting '%s' is internal, and it can't be deleted."
+msgstr "A propiedade '%s' é interna, e non pode ser eliminada."
+
+#: editor/project_settings_editor.cpp
+msgid "Delete Item"
+msgstr "Eliminar Elemento"
+
+#: editor/project_settings_editor.cpp
+msgid ""
+"Invalid action name. It cannot be empty nor contain '/', ':', '=', '\\' or "
+"'\"'."
+msgstr ""
+"Nome de acción inválido. Non pode estar baleiro, nin pode conter '/', ':', "
+"'=', '\\' ou '\"'."
+
+#: editor/project_settings_editor.cpp
+msgid "Add Input Action"
+msgstr "Engadir Acción de Entrada"
+
+#: editor/project_settings_editor.cpp
+msgid "Error saving settings."
+msgstr "Erro gardando os axustes."
+
+#: editor/project_settings_editor.cpp
+msgid "Settings saved OK."
+msgstr "Axustes gardados correctamente."
+
+#: editor/project_settings_editor.cpp
+msgid "Moved Input Action Event"
+msgstr "Evento de Entrada Movido"
+
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Add Translation"
+msgstr "Engadir Tradución"
+
+#: editor/project_settings_editor.cpp
+msgid "Remove Translation"
+msgstr "Eliminar Tradución"
+
+#: editor/project_settings_editor.cpp
+msgid "Add Remapped Path"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Resource Remap Add Remap"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Change Resource Remap Language"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Remove Resource Remap"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Remove Resource Remap Option"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Changed Locale Filter Mode"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Project Settings (project.godot)"
+msgstr "Configuración do Proxecto (project.godot)"
+
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+msgid "General"
+msgstr "Xeral"
+
+#: editor/project_settings_editor.cpp
+msgid "Override For..."
+msgstr ""
+
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+msgid "The editor must be restarted for changes to take effect."
+msgstr "O editor ten que reiniciarse para que os cambios teñan efecto."
+
+#: editor/project_settings_editor.cpp
+msgid "Input Map"
+msgstr "Mapeado de Entradas"
+
+#: editor/project_settings_editor.cpp
+msgid "Action:"
+msgstr "Acción:"
+
+#: editor/project_settings_editor.cpp
+msgid "Action"
+msgstr "Acción"
+
+#: editor/project_settings_editor.cpp
+msgid "Deadzone"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Device:"
+msgstr "Dispositivo:"
+
+#: editor/project_settings_editor.cpp
+msgid "Index:"
+msgstr "Ãndice:"
+
+#: editor/project_settings_editor.cpp
+msgid "Localization"
+msgstr "Linguaxe"
+
+#: editor/project_settings_editor.cpp
+msgid "Translations"
+msgstr "Traducións"
+
+#: editor/project_settings_editor.cpp
+msgid "Translations:"
+msgstr "Traducións:"
+
+#: editor/project_settings_editor.cpp
+msgid "Remaps"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Resources:"
+msgstr "Recursos:"
+
+#: editor/project_settings_editor.cpp
+msgid "Remaps by Locale:"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Locale"
+msgstr "Linguaxe"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales Filter"
+msgstr "Filtrar Linguaxes"
+
+#: editor/project_settings_editor.cpp
+msgid "Show All Locales"
+msgstr "Amosar Tódolos Linguaxes"
+
+#: editor/project_settings_editor.cpp
+msgid "Show Selected Locales Only"
+msgstr "Amosar só os Linguaxes Seleccionados"
+
+#: editor/project_settings_editor.cpp
+msgid "Filter mode:"
+msgstr "Modo de Filtrado:"
+
+#: editor/project_settings_editor.cpp
+msgid "Locales:"
+msgstr "Linguaxes:"
+
+#: editor/project_settings_editor.cpp
+msgid "AutoLoad"
+msgstr "AutoCargador"
+
+#: editor/project_settings_editor.cpp
+msgid "Plugins"
+msgstr "Características Adicionais (Plugins)"
+
+#: editor/property_editor.cpp
+msgid "Preset..."
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Zero"
+msgstr "Cero"
+
+#: editor/property_editor.cpp
+msgid "Easing In-Out"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "Easing Out-In"
+msgstr ""
+
+#: editor/property_editor.cpp
+msgid "File..."
+msgstr "Arquivo..."
+
+#: editor/property_editor.cpp
+msgid "Dir..."
+msgstr "Directorio..."
+
+#: editor/property_editor.cpp
+msgid "Assign"
+msgstr "Asignar"
+
+#: editor/property_editor.cpp
+msgid "Select Node"
+msgstr "Seleccionar Nodos"
+
+#: editor/property_editor.cpp
+msgid "Error loading file: Not a resource!"
+msgstr "Erro cargando arquivo: Non é un recurso!"
+
+#: editor/property_editor.cpp
+msgid "Pick a Node"
+msgstr "Elixe un Nodo"
+
+#: editor/property_editor.cpp
+msgid "Bit %d, val %d."
+msgstr ""
+
+#: editor/property_selector.cpp
+msgid "Select Property"
+msgstr ""
+
+#: editor/property_selector.cpp
+msgid "Select Virtual Method"
+msgstr ""
+
+#: editor/property_selector.cpp
+msgid "Select Method"
+msgstr ""
+
+#: editor/rename_dialog.cpp editor/scene_tree_dock.cpp
+msgid "Batch Rename"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Replace:"
+msgstr "Substituír:"
+
+#: editor/rename_dialog.cpp
+msgid "Prefix:"
+msgstr "Prefixo:"
+
+#: editor/rename_dialog.cpp
+msgid "Suffix:"
+msgstr "Sufixo:"
+
+#: editor/rename_dialog.cpp
+msgid "Use Regular Expressions"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Advanced Options"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Substitute"
+msgstr "Substituír"
+
+#: editor/rename_dialog.cpp
+msgid "Node name"
+msgstr "Nome do nodo"
+
+#: editor/rename_dialog.cpp
+msgid "Node's parent name, if available"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Node type"
+msgstr "Tipo de nodo"
+
+#: editor/rename_dialog.cpp
+msgid "Current scene name"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Root node name"
+msgstr "Nome do nodo raíz"
+
+#: editor/rename_dialog.cpp
+msgid ""
+"Sequential integer counter.\n"
+"Compare counter options."
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Per-level Counter"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "If set, the counter restarts for each group of child nodes."
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Initial value for the counter"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Step"
+msgstr "Paso"
+
+#: editor/rename_dialog.cpp
+msgid "Amount by which counter is incremented for each node"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Padding"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid ""
+"Minimum number of digits for the counter.\n"
+"Missing digits are padded with leading zeros."
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Post-Process"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Keep"
+msgstr "Manter"
+
+#: editor/rename_dialog.cpp
+msgid "PascalCase to snake_case"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "snake_case to PascalCase"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Case"
+msgstr "Maiús./Minús."
+
+#: editor/rename_dialog.cpp
+msgid "To Lowercase"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "To Uppercase"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "Reset"
+msgstr "Restablecer"
+
+#: editor/rename_dialog.cpp
+msgid "Regular Expression Error:"
+msgstr ""
+
+#: editor/rename_dialog.cpp
+msgid "At character %s"
+msgstr ""
+
+#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
+msgid "Reparent Node"
+msgstr "Remparentar Nodo"
+
+#: editor/reparent_dialog.cpp
+msgid "Reparent Location (Select new Parent):"
+msgstr ""
+
+#: editor/reparent_dialog.cpp
+msgid "Keep Global Transform"
+msgstr ""
+
+#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
+msgid "Reparent"
+msgstr "Remparentar"
+
+#: editor/run_settings_dialog.cpp
+msgid "Run Mode:"
+msgstr ""
+
+#: editor/run_settings_dialog.cpp
+msgid "Current Scene"
+msgstr ""
+
+#: editor/run_settings_dialog.cpp
+msgid "Main Scene"
+msgstr ""
+
+#: editor/run_settings_dialog.cpp
+msgid "Main Scene Arguments:"
+msgstr ""
+
+#: editor/run_settings_dialog.cpp
+msgid "Scene Run Settings"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "No parent to instance the scenes at."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Error loading scene from %s"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot instance the scene '%s' because the current scene exists within one "
+"of its nodes."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Instance Scene(s)"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Replace with Branch Scene"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Instance Child Scene"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Detach Script"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "This operation can't be done on the tree root."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Move Node In Parent"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Move Nodes In Parent"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate Node(s)"
+msgstr "Duplicar Nodo(s)"
+
+#: 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."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+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 %d nodes and any children?"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Delete %d nodes?"
+msgstr "Eliminar %d nodos?"
+
+#: editor/scene_tree_dock.cpp
+msgid "Delete the root node \"%s\"?"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Delete node \"%s\" and its children?"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Delete node \"%s\"?"
+msgstr "Eliminar nodo \"%s\"?"
+
+#: editor/scene_tree_dock.cpp
+msgid "Can not perform with the root node."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "This operation can't be done on instanced scenes."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Save New Scene As..."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid ""
+"Disabling \"editable_instance\" will cause all properties of the node to be "
+"reverted to their default."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid ""
+"Enabling \"Load As Placeholder\" will disable \"Editable Children\" and "
+"cause all properties of the node to be reverted to their default."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Make Local"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "New Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Create Root Node:"
+msgstr "Crear nodo raíz:"
+
+#: editor/scene_tree_dock.cpp
+msgid "2D Scene"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "3D Scene"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "User Interface"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Other Node"
+msgstr "Outro Nodo"
+
+#: editor/scene_tree_dock.cpp
+msgid "Can't operate on nodes from a foreign scene!"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Can't operate on nodes the current scene inherits from!"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Attach Script"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Remove Node(s)"
+msgstr "Eliminar Nodo(s)"
+
+#: editor/scene_tree_dock.cpp
+msgid "Change type of node(s)"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid ""
+"Couldn't save new scene. Likely dependencies (instances) couldn't be "
+"satisfied."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Error saving scene."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Error duplicating scene to save it."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Sub-Resources"
+msgstr "Sub-Recursos"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Editable Children"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Open Documentation"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid ""
+"Cannot attach a script: there are no languages registered.\n"
+"This is probably because this editor was built with all language modules "
+"disabled."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Add Child Node"
+msgstr "Engadir Nodo Fillo"
+
+#: editor/scene_tree_dock.cpp
+msgid "Expand/Collapse All"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Change Type"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Reparent to New Node"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Make Scene Root"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Merge From Scene"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
+msgid "Save Branch as Scene"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp editor/script_editor_debugger.cpp
+msgid "Copy Node Path"
+msgstr "Copiar Ruta do Nodo"
+
+#: editor/scene_tree_dock.cpp
+msgid "Delete (No Confirm)"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Add/Create a New Node."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid ""
+"Instance a scene file as a Node. Creates an inherited scene if no root node "
+"exists."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Attach a new or existing script to the selected node."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Detach the script from the selected node."
+msgstr ""
+
+#: editor/scene_tree_dock.cpp
+msgid "Remote"
+msgstr "Remoto"
+
+#: editor/scene_tree_dock.cpp
+msgid "Local"
+msgstr "Local"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance? (No Undo!)"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Toggle Visible"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Unlock Node"
+msgstr "Desbloquear Nodo"
+
+#: editor/scene_tree_editor.cpp
+msgid "Button Group"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "(Connecting From)"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Node configuration warning:"
+msgstr "Aviso sobre a configuración do nodo:"
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"Node has %s connection(s) and %s group(s).\n"
+"Click to show signals dock."
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"Node has %s connection(s).\n"
+"Click to show signals dock."
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"Node is in %s group(s).\n"
+"Click to show groups dock."
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Open Script:"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"Node is locked.\n"
+"Click to unlock it."
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"Children are not selectable.\n"
+"Click to make selectable."
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Toggle Visibility"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid ""
+"AnimationPlayer is pinned.\n"
+"Click to unpin."
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Invalid node name, the following characters are not allowed:"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Rename Node"
+msgstr "Renomear Nodo"
+
+#: editor/scene_tree_editor.cpp
+msgid "Scene Tree (Nodes):"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Node Configuration Warning!"
+msgstr ""
+
+#: editor/scene_tree_editor.cpp
+msgid "Select a Node"
+msgstr "Seleccione un Nodo"
+
+#: editor/script_create_dialog.cpp
+msgid "Path is empty."
+msgstr "A ruta está baleira."
+
+#: editor/script_create_dialog.cpp
+msgid "Filename is empty."
+msgstr "O nome de arquivo está baleiro."
+
+#: editor/script_create_dialog.cpp
+msgid "Path is not local."
+msgstr "A ruta non é local."
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid base path."
+msgstr "Ruta base inválida."
+
+#: editor/script_create_dialog.cpp
+msgid "A directory with the same name exists."
+msgstr "Xa existe un directorio co mesmo nome."
+
+#: editor/script_create_dialog.cpp
+msgid "File does not exist."
+msgstr "O arquivo non existe."
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid extension."
+msgstr "Extensión inválida."
+
+#: editor/script_create_dialog.cpp
+msgid "Wrong extension chosen."
+msgstr "Extensión incorrecta elixida."
+
+#: editor/script_create_dialog.cpp
+msgid "Error loading template '%s'"
+msgstr "Erro cargando o modelo '%s'"
+
+#: editor/script_create_dialog.cpp
+msgid "Error - Could not create script in filesystem."
+msgstr "Erro - Non se puido gardar o Script no sistema de arquivos."
+
+#: editor/script_create_dialog.cpp
+msgid "Error loading script from %s"
+msgstr "Erro cargando script desde %s"
+
+#: editor/script_create_dialog.cpp
+msgid "Overrides"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "N/A"
+
+#: editor/script_create_dialog.cpp
+msgid "Open Script / Choose Location"
+msgstr "Abrir Script / Elixir Ubicación"
+
+#: editor/script_create_dialog.cpp
+msgid "Open Script"
+msgstr "Abrir Script"
+
+#: editor/script_create_dialog.cpp
+msgid "File exists, it will be reused."
+msgstr "O arquivo xa existe; será reutilizado."
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid path."
+msgstr "Ruta inválida."
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid class name."
+msgstr "Nome de clase inválido."
+
+#: editor/script_create_dialog.cpp
+msgid "Invalid inherited parent name or path."
+msgstr "A ruta ou o nome do pai herdado é inválido."
+
+#: editor/script_create_dialog.cpp
+msgid "Script path/name is valid."
+msgstr "A ruta e nome do script son válidos."
+
+#: editor/script_create_dialog.cpp
+msgid "Allowed: a-z, A-Z, 0-9, _ and ."
+msgstr "Permitido: a-z, A-Z, 0-9,_ e ."
+
+#: editor/script_create_dialog.cpp
+msgid "Built-in script (into scene file)."
+msgstr "Script integrada na escena."
+
+#: editor/script_create_dialog.cpp
+msgid "Will create a new script file."
+msgstr "Crearase un novo arquivo de script."
+
+#: editor/script_create_dialog.cpp
+msgid "Will load an existing script file."
+msgstr "Cargarase un arquivo de script xa existente."
+
+#: editor/script_create_dialog.cpp
+msgid "Script file already exists."
+msgstr "Xa existe un arquivo script na mesma ruta."
+
+#: editor/script_create_dialog.cpp
+msgid ""
+"Note: Built-in scripts have some limitations and can't be edited using an "
+"external editor."
+msgstr ""
+"Nota: Os scripts integrados teñen algunhas limitacións, e non poden editarse "
+"usando editores externos."
+
+#: editor/script_create_dialog.cpp
+msgid "Class Name:"
+msgstr "Nome da Clase:"
+
+#: editor/script_create_dialog.cpp
+msgid "Template:"
+msgstr "Modelo:"
+
+#: editor/script_create_dialog.cpp
+msgid "Built-in Script:"
+msgstr "Script Integrado:"
+
+#: editor/script_create_dialog.cpp
+msgid "Attach Node Script"
+msgstr "Adxuntar Script de Nodo"
+
+#: editor/script_editor_debugger.cpp
+msgid "Remote "
+msgstr "Remoto "
+
+#: editor/script_editor_debugger.cpp
+msgid "Bytes:"
+msgstr "Bytes:"
+
+#: editor/script_editor_debugger.cpp
+msgid "Warning:"
+msgstr "Aviso:"
+
+#: editor/script_editor_debugger.cpp
+msgid "Error:"
+msgstr "Erro:"
+
+#: editor/script_editor_debugger.cpp
+msgid "C++ Error"
+msgstr "Erro de C++"
+
+#: editor/script_editor_debugger.cpp
+msgid "C++ Error:"
+msgstr "Erro de C++:"
+
+#: editor/script_editor_debugger.cpp
+msgid "C++ Source"
+msgstr "Fonte C++"
+
+#: editor/script_editor_debugger.cpp
+msgid "Source:"
+msgstr "Fonte:"
+
+#: editor/script_editor_debugger.cpp
+msgid "C++ Source:"
+msgstr "Fonte C++:"
+
+#: editor/script_editor_debugger.cpp
+msgid "Stack Trace"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Errors"
+msgstr "Erros"
+
+#: editor/script_editor_debugger.cpp
+msgid "Child process connected."
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Copy Error"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Video RAM"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Skip Breakpoints"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Inspect Previous Instance"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Inspect Next Instance"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Stack Frames"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Profiler"
+msgstr "Analítica de Rendemento"
+
+#: editor/script_editor_debugger.cpp
+msgid "Network Profiler"
+msgstr "Analítica de Rendemento de Rede"
+
+#: editor/script_editor_debugger.cpp
+msgid "Monitor"
+msgstr "Monitor"
+
+#: editor/script_editor_debugger.cpp
+msgid "Value"
+msgstr "Valor"
+
+#: editor/script_editor_debugger.cpp
+msgid "Monitors"
+msgstr "Monitores"
+
+#: editor/script_editor_debugger.cpp
+msgid "Pick one or more items from the list to display the graph."
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "List of Video Memory Usage by Resource:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Total:"
+msgstr "Total:"
+
+#: editor/script_editor_debugger.cpp
+msgid "Export list to a CSV file"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Resource Path"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Type"
+msgstr "Tipo"
+
+#: editor/script_editor_debugger.cpp
+msgid "Format"
+msgstr "Formato"
+
+#: editor/script_editor_debugger.cpp
+msgid "Usage"
+msgstr "Uso"
+
+#: editor/script_editor_debugger.cpp
+msgid "Misc"
+msgstr "Outros"
+
+#: editor/script_editor_debugger.cpp
+msgid "Clicked Control:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Clicked Control Type:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Live Edit Root:"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Set From Tree"
+msgstr ""
+
+#: editor/script_editor_debugger.cpp
+msgid "Export measures as CSV"
+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 "Editor Settings"
+msgstr ""
+
+#: editor/settings_config_dialog.cpp
+msgid "Shortcuts"
+msgstr "Atallos"
+
+#: editor/settings_config_dialog.cpp
+msgid "Binding"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Light Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Camera FOV"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Camera Size"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Notifier AABB"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Particles AABB"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Probe Extents"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
+msgid "Change Sphere Shape Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp modules/csg/csg_gizmos.cpp
+msgid "Change Box Shape Extents"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Capsule Shape Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Capsule Shape Height"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Cylinder Shape Radius"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Cylinder Shape Height"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
+msgid "Change Ray Shape Length"
+msgstr ""
+
+#: modules/csg/csg_gizmos.cpp
+msgid "Change Cylinder Radius"
+msgstr ""
+
+#: modules/csg/csg_gizmos.cpp
+msgid "Change Cylinder Height"
+msgstr ""
+
+#: modules/csg/csg_gizmos.cpp
+msgid "Change Torus Inner Radius"
+msgstr ""
+
+#: modules/csg/csg_gizmos.cpp
+msgid "Change Torus Outer Radius"
+msgstr ""
+
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Select the dynamic library for this entry"
+msgstr ""
+
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Select dependencies of the library for this entry"
+msgstr ""
+
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Remove current entry"
+msgstr ""
+
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Double click to create a new entry"
+msgstr ""
+
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Platform:"
+msgstr "Plataforma:"
+
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Platform"
+msgstr "Plataforma"
+
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Dynamic Library"
+msgstr ""
+
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "Add an architecture entry"
+msgstr ""
+
+#: modules/gdnative/gdnative_library_editor_plugin.cpp
+msgid "GDNativeLibrary"
+msgstr ""
+
+#: modules/gdnative/gdnative_library_singleton_editor.cpp
+msgid "Enabled GDNative Singleton"
+msgstr ""
+
+#: modules/gdnative/gdnative_library_singleton_editor.cpp
+msgid "Disabled GDNative Singleton"
+msgstr ""
+
+#: modules/gdnative/gdnative_library_singleton_editor.cpp
+msgid "Library"
+msgstr "Biblioteca"
+
+#: modules/gdnative/gdnative_library_singleton_editor.cpp
+msgid "Libraries: "
+msgstr "Bibliotecas: "
+
+#: modules/gdnative/register_types.cpp
+msgid "GDNative"
+msgstr "GDNative"
+
+#: modules/gdscript/gdscript_functions.cpp
+msgid "Step argument is zero!"
+msgstr ""
+
+#: modules/gdscript/gdscript_functions.cpp
+msgid "Not a script with an instance"
+msgstr ""
+
+#: modules/gdscript/gdscript_functions.cpp
+msgid "Not based on a script"
+msgstr ""
+
+#: modules/gdscript/gdscript_functions.cpp
+msgid "Not based on a resource file"
+msgstr ""
+
+#: modules/gdscript/gdscript_functions.cpp
+msgid "Invalid instance dictionary format (missing @path)"
+msgstr ""
+
+#: modules/gdscript/gdscript_functions.cpp
+msgid "Invalid instance dictionary format (can't load script at @path)"
+msgstr ""
+
+#: modules/gdscript/gdscript_functions.cpp
+msgid "Invalid instance dictionary format (invalid script at @path)"
+msgstr ""
+
+#: modules/gdscript/gdscript_functions.cpp
+msgid "Invalid instance dictionary (invalid subclasses)"
+msgstr ""
+
+#: modules/gdscript/gdscript_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Next Plane"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Previous Plane"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Plane:"
+msgstr "Plano:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Next Floor"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Previous Floor"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Floor:"
+msgstr "Chan:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Delete Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Fill Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paste Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Grid Map"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Snap View"
+msgstr "Axustar Vista"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Clip Disabled"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Clip Above"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Clip Below"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Edit X Axis"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Edit Y Axis"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Edit Z Axis"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Rotate X"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Rotate Y"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Rotate Z"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Back Rotate X"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Back Rotate Y"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Back Rotate Z"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Cursor Clear Rotation"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Paste Selects"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Clear Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Fill Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Settings"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Filter meshes"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
+msgstr ""
+
+#: modules/lightmapper_cpu/lightmapper_cpu.cpp
+msgid "Begin Bake"
+msgstr ""
+
+#: modules/lightmapper_cpu/lightmapper_cpu.cpp
+msgid "Preparing data structures"
+msgstr ""
+
+#: modules/lightmapper_cpu/lightmapper_cpu.cpp
+msgid "Generate buffers"
+msgstr ""
+
+#: modules/lightmapper_cpu/lightmapper_cpu.cpp
+msgid "Direct lighting"
+msgstr ""
+
+#: modules/lightmapper_cpu/lightmapper_cpu.cpp
+msgid "Indirect lighting"
+msgstr ""
+
+#: modules/lightmapper_cpu/lightmapper_cpu.cpp
+msgid "Post processing"
+msgstr ""
+
+#: modules/lightmapper_cpu/lightmapper_cpu.cpp
+msgid "Plotting lightmaps"
+msgstr ""
+
+#: modules/mono/csharp_script.cpp
+msgid "Class name can't be a reserved keyword"
+msgstr ""
+
+#: modules/mono/mono_gd/gd_mono_utils.cpp
+msgid "End of inner exception stack trace"
+msgstr ""
+
+#: modules/recast/navigation_mesh_editor_plugin.cpp
+msgid "Bake NavMesh"
+msgstr ""
+
+#: modules/recast/navigation_mesh_editor_plugin.cpp
+msgid "Clear the navigation mesh."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Setting up Configuration..."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Calculating grid size..."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Creating heightfield..."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Marking walkable triangles..."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Constructing compact heightfield..."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Eroding walkable area..."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Partitioning..."
+msgstr "Particionando..."
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Creating contours..."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Creating polymesh..."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Converting to native navigation mesh..."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Navigation Mesh Generator Setup:"
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Parsing Geometry..."
+msgstr ""
+
+#: modules/recast/navigation_mesh_generator.cpp
+msgid "Done!"
+msgstr "Feito!"
+
+#: modules/visual_script/visual_script.cpp
+msgid ""
+"A node yielded without working memory, please read the docs on how to yield "
+"properly!"
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid ""
+"Node yielded, but did not return a function state in the first working "
+"memory."
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid ""
+"Return value must be assigned to first element of node working memory! Fix "
+"your node please."
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid "Node returned an invalid sequence output: "
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid "Found sequence bit but not the node in the stack, report bug!"
+msgstr ""
+
+#: modules/visual_script/visual_script.cpp
+msgid "Stack overflow with stack depth: "
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Signal Arguments"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Argument Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Argument name"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Set Variable Default Value"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Set Variable Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Input Port"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Output Port"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Override an existing built-in function."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Create a new function."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Variables:"
+msgstr "Variables:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Create a new variable."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Signals:"
+msgstr "Sinais:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Create a new signal."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Name is not a valid identifier:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Name already in use by another func/var/signal:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Rename Function"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Rename Variable"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Rename Signal"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Function"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Delete input port"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Variable"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Signal"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Input Port"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Output Port"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Expression"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove VisualScript Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Duplicate VisualScript Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold %s to drop a Getter. Hold Shift to drop a generic signature."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold %s to drop a simple reference to the node."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold Ctrl to drop a simple reference to the node."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold %s to drop a Variable Setter."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Hold Ctrl to drop a Variable Setter."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Preload Node"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Node(s) From Tree"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid ""
+"Can't drop properties because script '%s' is not used in this scene.\n"
+"Drop holding 'Shift' to just copy the signature."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Getter Property"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Setter Property"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Base Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Move Node(s)"
+msgstr "Mover Nodo(s)"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove VisualScript Node"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Connect Nodes"
+msgstr "Conectar Nodos"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Disconnect Nodes"
+msgstr "Desconectar Nodos"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Connect Node Data"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Connect Node Sequence"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Script already has function '%s'"
+msgstr "O script xa ten unha función chamada '%s'"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Input Value"
+msgstr "Cambiar Valor de Entrada"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Resize Comment"
+msgstr "Cambiar Tamaño do Comentario"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Can't copy the function node."
+msgstr "Non se pode copiar o nodo función."
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Clipboard is empty!"
+msgstr "O portapapeis está baleiro!"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Paste VisualScript Nodes"
+msgstr "Pegar Nodos VisualScript"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Can't create function with a function node."
+msgstr "Non se pode crear unha función cun nodo función."
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Can't create function of nodes from nodes of multiple functions."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Select at least one node with sequence port."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Try to only have one sequence input in selection."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Create Function"
+msgstr "Crear Función"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Eliminar Función"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Eliminar Variable"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Editando Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Eliminar Sinal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Editando Sinal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Make Tool:"
+msgstr "Ferramenta:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Members:"
+msgstr "Membros:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Base Type:"
+msgstr "Cambiar Tipo Base:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Nodes..."
+msgstr "Engadir Nodos..."
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Add Function..."
+msgstr "Engadir Función..."
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "function_name"
+msgstr "nome_da_funcion"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Select or create a function to edit its graph."
+msgstr "Seleccione ou cree unha función para editar a sua gráfica."
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Delete Selected"
+msgstr "Eliminar Selección"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Find Node Type"
+msgstr "Encontrar Tipo de Nodo"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Copy Nodes"
+msgstr "Copiar Nodos"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Cut Nodes"
+msgstr "Cortar Nodos"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Make Function"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Refresh Graph"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Edit Member"
+msgstr "Editar Membro"
+
+#: modules/visual_script/visual_script_flow_control.cpp
+msgid "Input type not iterable: "
+msgstr ""
+
+#: modules/visual_script/visual_script_flow_control.cpp
+msgid "Iterator became invalid"
+msgstr ""
+
+#: modules/visual_script/visual_script_flow_control.cpp
+msgid "Iterator became invalid: "
+msgstr ""
+
+#: modules/visual_script/visual_script_func_nodes.cpp
+msgid "Invalid index property name."
+msgstr ""
+
+#: modules/visual_script/visual_script_func_nodes.cpp
+msgid "Base object is not a Node!"
+msgstr ""
+
+#: modules/visual_script/visual_script_func_nodes.cpp
+msgid "Path does not lead Node!"
+msgstr ""
+
+#: modules/visual_script/visual_script_func_nodes.cpp
+msgid "Invalid index property name '%s' in node %s."
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid ": Invalid argument of type: "
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid ": Invalid arguments: "
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid "VariableGet not found in script: "
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid "VariableSet not found in script: "
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid "Custom node has no _step() method, can't process graph."
+msgstr ""
+
+#: modules/visual_script/visual_script_nodes.cpp
+msgid ""
+"Invalid return value from _step(), must be integer (seq out), or string "
+"(error)."
+msgstr ""
+
+#: modules/visual_script/visual_script_property_selector.cpp
+msgid "Search VisualScript"
+msgstr "Buscar en VisualScript"
+
+#: modules/visual_script/visual_script_property_selector.cpp
+msgid "Get %s"
+msgstr ""
+
+#: modules/visual_script/visual_script_property_selector.cpp
+msgid "Set %s"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Package name is missing."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Package segments must be of non-zero length."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "The character '%s' is not allowed in Android application package names."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "A digit cannot be the first character in a package segment."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "The character '%s' cannot be the first character in a package segment."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "The package must have at least one '.' separator."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Select device from the list"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Unable to find the 'apksigner' tool."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"Android build template not installed in the project. Install it from the "
+"Project menu."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Debug keystore not configured in the Editor Settings nor in the preset."
+msgstr ""
+"Non está configurado o Keystore de depuración nin na configuración do "
+"editor, nin nos axustes de exportación."
+
+#: platform/android/export/export.cpp
+msgid "Release keystore incorrectly configured in the export preset."
+msgstr ""
+"O Keystore Release non está configurado correctamente nos axustes de "
+"exportación."
+
+#: platform/android/export/export.cpp
+msgid "A valid Android SDK path is required in Editor Settings."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Invalid Android SDK path in Editor Settings."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Missing 'platform-tools' directory!"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Unable to find Android SDK platform-tools' adb command."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Please check in the Android SDK directory specified in Editor Settings."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Missing 'build-tools' directory!"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Unable to find Android SDK build-tools' apksigner command."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Invalid public key for APK expansion."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Invalid package name:"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"Invalid \"GodotPaymentV3\" module included in the \"android/modules\" "
+"project setting (changed in Godot 3.2.2).\n"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Use Custom Build\" must be enabled to use the plugins."
+msgstr ""
+"\"Use Custom Build\" debe estar activado para usar estas características "
+"adicionais (plugins)."
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Degrees Of Freedom\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR"
+"\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"\"Focus Awareness\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\"."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "\"Export AAB\" is only valid when \"Use Custom Build\" is enabled."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Invalid filename! Android App Bundle requires the *.aab extension."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "APK Expansion not compatible with Android App Bundle."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Invalid filename! Android APK requires the *.apk extension."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"Trying to build from a custom built template, but no version info for it "
+"exists. Please reinstall from the 'Project' menu."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"Android build version mismatch:\n"
+" Template installed: %s\n"
+" Godot Version: %s\n"
+"Please reinstall Android build template from 'Project' menu."
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid "Building Android Project (gradle)"
+msgstr "Construir Proxecto Android (gradle)"
+
+#: platform/android/export/export.cpp
+msgid ""
+"Building of Android project failed, check output for the error.\n"
+"Alternatively visit docs.godotengine.org for Android build documentation."
+msgstr ""
+"A creación do proxecto para Android fallou; comproba a saída para encontrar "
+"o erro.\n"
+"Ou visita docs.godotengine.org para ver a documentación sobre compilación "
+"para Android."
+
+#: platform/android/export/export.cpp
+msgid "Moving output"
+msgstr ""
+
+#: platform/android/export/export.cpp
+msgid ""
+"Unable to copy and rename export file, check gradle project directory for "
+"outputs."
+msgstr ""
+
+#: platform/iphone/export/export.cpp
+msgid "Identifier is missing."
+msgstr ""
+
+#: platform/iphone/export/export.cpp
+msgid "The character '%s' is not allowed in Identifier."
+msgstr ""
+
+#: platform/iphone/export/export.cpp
+msgid "App Store Team ID not specified - cannot configure the project."
+msgstr ""
+"ID de App Store Team non especificado - non se pode configurar o proxecto."
+
+#: platform/iphone/export/export.cpp
+msgid "Invalid Identifier:"
+msgstr ""
+
+#: platform/iphone/export/export.cpp
+msgid "Required icon is not specified in the preset."
+msgstr ""
+"As iconas requeridas non están especificadas nos axustes de exportación."
+
+#: platform/javascript/export/export.cpp
+msgid "Stop HTTP Server"
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Run in Browser"
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Run exported HTML in the system's default browser."
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Could not write file:"
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Could not open template for export:"
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Invalid export template:"
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Could not read custom HTML shell:"
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Could not read boot splash image file:"
+msgstr ""
+
+#: platform/javascript/export/export.cpp
+msgid "Using default boot splash image."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid package short name."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid package unique name."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid package publisher display name."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid product GUID."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid publisher GUID."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid background color."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid Store Logo image dimensions (should be 50x50)."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+msgstr ""
+
+#: platform/uwp/export/export.cpp
+msgid "Invalid splash screen image dimensions (should be 620x300)."
+msgstr ""
+
+#: scene/2d/animated_sprite.cpp
+msgid ""
+"A SpriteFrames resource must be created or set in the \"Frames\" property in "
+"order for AnimatedSprite to display frames."
+msgstr ""
+
+#: scene/2d/canvas_modulate.cpp
+msgid ""
+"Only one visible CanvasModulate is allowed per scene (or set of instanced "
+"scenes). The first created one will work, while the rest will be ignored."
+msgstr ""
+
+#: scene/2d/collision_object_2d.cpp
+msgid ""
+"This node has no shape, so it can't collide or interact with other objects.\n"
+"Consider adding a CollisionShape2D or CollisionPolygon2D as a child to "
+"define its shape."
+msgstr ""
+"Este nodo non ten unha forma física definida, polo que non pode colisionar "
+"ou interactuar con outros obxectos.\n"
+"Engade un nodo CollisionShape2D ou CollisionPolygon2D como fillo para "
+"definir a sua forma."
+
+#: scene/2d/collision_polygon_2d.cpp
+msgid ""
+"CollisionPolygon2D only serves to provide a collision shape to a "
+"CollisionObject2D derived node. Please only use it as a child of Area2D, "
+"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
+msgstr ""
+"O nodo CollisionPolygon2D só serve para darlle unha forma física a nodos "
+"derivados de CollisionObject2D. É decir, do tipo Area2D, StaticBody2D, "
+"RigidBody2D, KinematicBody2D, etc."
+
+#: scene/2d/collision_polygon_2d.cpp
+msgid "An empty CollisionPolygon2D has no effect on collision."
+msgstr ""
+
+#: scene/2d/collision_shape_2d.cpp
+msgid ""
+"CollisionShape2D only serves to provide a collision shape to a "
+"CollisionObject2D derived node. Please only use it as a child of Area2D, "
+"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
+msgstr ""
+"O nodo CollisionShape2D só serve para darlle unha forma física a nodos "
+"derivados de CollisionObject2D. É decir, do tipo Area2D, StaticBody2D, "
+"RigidBody2D, KinematicBody2D, etc."
+
+#: scene/2d/collision_shape_2d.cpp
+msgid ""
+"A shape must be provided for CollisionShape2D to function. Please create a "
+"shape resource for it!"
+msgstr ""
+
+#: scene/2d/collision_shape_2d.cpp
+msgid ""
+"Polygon-based shapes are not meant be used nor edited directly through the "
+"CollisionShape2D node. Please use the CollisionPolygon2D node instead."
+msgstr ""
+"As formas físicas baseadas en polígonos non están pensadas para editarse "
+"directamente mediante o nodo CollisionShape2D. Por favor, usa o nodo "
+"CollisionPolygon2D no seu lugar."
+
+#: scene/2d/cpu_particles_2d.cpp
+msgid ""
+"CPUParticles2D animation requires the usage of a CanvasItemMaterial with "
+"\"Particles Animation\" enabled."
+msgstr ""
+
+#: scene/2d/joints_2d.cpp
+msgid "Node A and Node B must be PhysicsBody2Ds"
+msgstr "Os nodo A e B teñen que ser do tipo PhysicsBody2D"
+
+#: scene/2d/joints_2d.cpp
+msgid "Node A must be a PhysicsBody2D"
+msgstr "O nodo A ten que ser un nodo PhysicsBody2D"
+
+#: scene/2d/joints_2d.cpp
+msgid "Node B must be a PhysicsBody2D"
+msgstr "O nodo B ten que ser un nodo PhysicsBody2D"
+
+#: scene/2d/joints_2d.cpp
+msgid "Joint is not connected to two PhysicsBody2Ds"
+msgstr "A articulación non está conectada a dous nodos PhysicsBody2D"
+
+#: scene/2d/joints_2d.cpp
+msgid "Node A and Node B must be different PhysicsBody2Ds"
+msgstr "Os nodos A e B teñen que ser nodos PhysicsBody2D distintos"
+
+#: scene/2d/light_2d.cpp
+msgid ""
+"A texture with the shape of the light must be supplied to the \"Texture\" "
+"property."
+msgstr ""
+
+#: scene/2d/light_occluder_2d.cpp
+msgid ""
+"An occluder polygon must be set (or drawn) for this occluder to take effect."
+msgstr ""
+
+#: scene/2d/light_occluder_2d.cpp
+msgid "The occluder polygon for this occluder is empty. Please draw a polygon."
+msgstr ""
+
+#: scene/2d/navigation_polygon.cpp
+msgid ""
+"A NavigationPolygon resource must be set or created for this node to work. "
+"Please set a property or draw a polygon."
+msgstr ""
+
+#: scene/2d/navigation_polygon.cpp
+msgid ""
+"NavigationPolygonInstance must be a child or grandchild to a Navigation2D "
+"node. It only provides navigation data."
+msgstr ""
+
+#: scene/2d/parallax_layer.cpp
+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 ""
+"As partículas baseadas na GPU non están soportas por o controlador de vídeo "
+"de GLES2.\n"
+"Usa o nodo CPUParticles2D no seu lugar. Podes usar a opción \"Converter a "
+"CPUParticles\" con tal motivo."
+
+#: 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 ""
+
+#: scene/2d/particles_2d.cpp
+msgid ""
+"Particles2D animation requires the usage of a CanvasItemMaterial with "
+"\"Particles Animation\" enabled."
+msgstr ""
+
+#: scene/2d/path_2d.cpp
+msgid "PathFollow2D only works when set as a child of a Path2D node."
+msgstr ""
+
+#: scene/2d/physics_body_2d.cpp
+msgid ""
+"Size changes to RigidBody2D (in character or rigid modes) will be overridden "
+"by the physics engine when running.\n"
+"Change the size in children collision shapes instead."
+msgstr ""
+"Os cambios ao tamaño do RigidBody2D (en modo ríxido ou modo personaxe) serán "
+"sobreescritos por o motor físico cando a aplicación estea executándose.\n"
+"Cambia o tamaño dos nodos fillos (CollisionShape2D e CollisionPolygon2D) no "
+"seu lugar."
+
+#: scene/2d/remote_transform_2d.cpp
+msgid "Path property must point to a valid Node2D node to work."
+msgstr ""
+
+#: scene/2d/skeleton_2d.cpp
+msgid "This Bone2D chain should end at a Skeleton2D node."
+msgstr ""
+
+#: scene/2d/skeleton_2d.cpp
+msgid "A Bone2D only works with a Skeleton2D or another Bone2D as parent node."
+msgstr ""
+
+#: scene/2d/skeleton_2d.cpp
+msgid ""
+"This bone lacks a proper REST pose. Go to the Skeleton2D node and set one."
+msgstr ""
+
+#: scene/2d/tile_map.cpp
+msgid ""
+"TileMap with Use Parent on needs a parent CollisionObject2D to give shapes "
+"to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, "
+"KinematicBody2D, etc. to give them a shape."
+msgstr ""
+
+#: scene/2d/visibility_notifier_2d.cpp
+msgid ""
+"VisibilityEnabler2D works best when used with the edited scene root directly "
+"as parent."
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRCamera must have an ARVROrigin node as its parent."
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRController must have an ARVROrigin node as its parent."
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
+msgid ""
+"The controller ID must not be 0 or this controller won't be bound to an "
+"actual controller."
+msgstr ""
+"O ID do controlador non pode ser 0, ou o controlador non estará asociado a "
+"ningún controlador real."
+
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent."
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
+msgid ""
+"The anchor ID must not be 0 or this anchor won't be bound to an actual "
+"anchor."
+msgstr ""
+"O ID da áncora non pode ser 0, ou esta áncora non estará asociada a ningunha "
+"áncora real."
+
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVROrigin requires an ARVRCamera child node."
+msgstr ""
+
+#: scene/3d/baked_lightmap.cpp
+msgid "Finding meshes and lights"
+msgstr ""
+
+#: scene/3d/baked_lightmap.cpp
+msgid "Preparing geometry (%d/%d)"
+msgstr ""
+
+#: scene/3d/baked_lightmap.cpp
+msgid "Preparing environment"
+msgstr ""
+
+#: scene/3d/baked_lightmap.cpp
+msgid "Generating capture"
+msgstr ""
+
+#: scene/3d/baked_lightmap.cpp
+msgid "Saving lightmaps"
+msgstr ""
+
+#: scene/3d/baked_lightmap.cpp
+msgid "Done"
+msgstr "Feito"
+
+#: scene/3d/collision_object.cpp
+msgid ""
+"This node has no shape, so it can't collide or interact with other objects.\n"
+"Consider adding a CollisionShape or CollisionPolygon as a child to define "
+"its shape."
+msgstr ""
+"Este nodo non ten unha forma física definida, polo que non pode colisionar "
+"ou interactuar con outros obxectos.\n"
+"Engade un nodo CollisionShape ou CollisionPolygon como fillo para definir a "
+"sua forma."
+
+#: scene/3d/collision_polygon.cpp
+msgid ""
+"CollisionPolygon only serves to provide a collision shape to a "
+"CollisionObject derived node. Please only use it as a child of Area, "
+"StaticBody, RigidBody, KinematicBody, etc. to give them a shape."
+msgstr ""
+"O nodo CollisionPolygon só serve para darlle unha forma física a nodos "
+"derivados de CollisionObject. É decir, do tipo Area, StaticBody, RigidBody, "
+"KinematicBody, etc."
+
+#: scene/3d/collision_polygon.cpp
+msgid "An empty CollisionPolygon has no effect on collision."
+msgstr ""
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"CollisionShape only serves to provide a collision shape to a CollisionObject "
+"derived node. Please only use it as a child of Area, StaticBody, RigidBody, "
+"KinematicBody, etc. to give them a shape."
+msgstr ""
+"O nodo CollisionShape só serve para darlle unha forma física a nodos "
+"derivados de CollisionObject. É decir, do tipo Area, StaticBody, RigidBody, "
+"KinematicBody, etc."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"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/collision_shape.cpp
+msgid ""
+"ConcavePolygonShape doesn't support RigidBody in another mode than static."
+msgstr ""
+"A forma física ConcavePolygonShape non está soportada en nodos RigidBody en "
+"ningún outro modo que non sexa o estático."
+
+#: scene/3d/cpu_particles.cpp
+msgid "Nothing is visible because no mesh has been assigned."
+msgstr ""
+
+#: scene/3d/cpu_particles.cpp
+msgid ""
+"CPUParticles animation requires the usage of a SpatialMaterial whose "
+"Billboard Mode is set to \"Particle Billboard\"."
+msgstr ""
+
+#: scene/3d/gi_probe.cpp
+msgid "Plotting Meshes"
+msgstr ""
+
+#: scene/3d/gi_probe.cpp
+msgid "Finishing Plot"
+msgstr ""
+
+#: scene/3d/gi_probe.cpp
+msgid ""
+"GIProbes are not supported by the GLES2 video driver.\n"
+"Use a BakedLightmap instead."
+msgstr ""
+
+#: scene/3d/interpolated_camera.cpp
+msgid ""
+"InterpolatedCamera has been deprecated and will be removed in Godot 4.0."
+msgstr ""
+
+#: scene/3d/light.cpp
+msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
+msgstr ""
+
+#: scene/3d/navigation_mesh.cpp
+msgid "A NavigationMesh resource must be set or created for this node to work."
+msgstr ""
+
+#: scene/3d/navigation_mesh.cpp
+msgid ""
+"NavigationMeshInstance must be a child or grandchild to a Navigation node. "
+"It only provides navigation data."
+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 ""
+"As partículas baseadas na GPU non están soportas por o controlador de vídeo "
+"de GLES2.\n"
+"Usa o nodo CPUParticles no seu lugar. Podes usar a opción \"Converter a "
+"CPUParticles\" con tal motivo."
+
+#: scene/3d/particles.cpp
+msgid ""
+"Nothing is visible because meshes have not been assigned to draw passes."
+msgstr ""
+
+#: scene/3d/particles.cpp
+msgid ""
+"Particles animation requires the usage of a SpatialMaterial whose Billboard "
+"Mode is set to \"Particle Billboard\"."
+msgstr ""
+
+#: scene/3d/path.cpp
+msgid "PathFollow only works when set as a child of a Path node."
+msgstr ""
+
+#: scene/3d/path.cpp
+msgid ""
+"PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its "
+"parent Path's Curve resource."
+msgstr ""
+
+#: scene/3d/physics_body.cpp
+msgid ""
+"Size changes to RigidBody (in character or rigid modes) will be overridden "
+"by the physics engine when running.\n"
+"Change the size in children collision shapes instead."
+msgstr ""
+"Os cambios ao tamaño do RigidBody (en modo ríxido ou modo personaxe) serán "
+"sobreescritos por o motor físico cando a aplicación estea executándose.\n"
+"Cambia o tamaño dos nodos fillos (CollisionShape e CollisionPolygon) no seu "
+"lugar."
+
+#: scene/3d/physics_joint.cpp
+msgid "Node A and Node B must be PhysicsBodies"
+msgstr ""
+
+#: scene/3d/physics_joint.cpp
+msgid "Node A must be a PhysicsBody"
+msgstr "O nodo A ten que ser un nodo PhysicsBody"
+
+#: scene/3d/physics_joint.cpp
+msgid "Node B must be a PhysicsBody"
+msgstr "O nodo B ten que ser un nodo PhysicsBody"
+
+#: scene/3d/physics_joint.cpp
+msgid "Joint is not connected to any PhysicsBodies"
+msgstr ""
+
+#: scene/3d/physics_joint.cpp
+msgid "Node A and Node B must be different PhysicsBodies"
+msgstr ""
+
+#: scene/3d/remote_transform.cpp
+msgid ""
+"The \"Remote Path\" property must point to a valid Spatial or Spatial-"
+"derived node to work."
+msgstr ""
+
+#: scene/3d/soft_body.cpp
+msgid "This body will be ignored until you set a mesh."
+msgstr "Este corpo será ignorado ata que se lle sea asignado unha malla."
+
+#: scene/3d/soft_body.cpp
+msgid ""
+"Size changes to SoftBody will be overridden by the physics engine when "
+"running.\n"
+"Change the size in children collision shapes instead."
+msgstr ""
+"Os cambios ao tamaño do SoftBody serán sobreescritos por o motor físico "
+"cando a aplicación estea executándose.\n"
+"Cambia o tamaño dos nodos fillos (CollisionShape e CollisionPolygon) no seu "
+"lugar."
+
+#: scene/3d/sprite_3d.cpp
+msgid ""
+"A SpriteFrames resource must be created or set in the \"Frames\" property in "
+"order for AnimatedSprite3D to display frames."
+msgstr ""
+
+#: scene/3d/vehicle_body.cpp
+msgid ""
+"VehicleWheel serves to provide a wheel system to a VehicleBody. Please use "
+"it as a child of a VehicleBody."
+msgstr ""
+"O nodo VehicleWheel (Roda de Vehículo) serve para proporcionar un sistema de "
+"rodas a un nodo VehicleBody. Por favor; úsao como fillo dun nodo VehicleBody."
+
+#: scene/3d/world_environment.cpp
+msgid ""
+"WorldEnvironment requires its \"Environment\" property to contain an "
+"Environment to have a visible effect."
+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 ""
+
+#: scene/animation/animation_blend_tree.cpp
+msgid "Animation not found: '%s'"
+msgstr ""
+
+#: scene/animation/animation_tree.cpp
+msgid "In node '%s', invalid animation: '%s'."
+msgstr ""
+
+#: scene/animation/animation_tree.cpp
+msgid "Invalid animation: '%s'."
+msgstr ""
+
+#: scene/animation/animation_tree.cpp
+msgid "Nothing connected to input '%s' of node '%s'."
+msgstr ""
+
+#: scene/animation/animation_tree.cpp
+msgid "No root AnimationNode for the graph is set."
+msgstr ""
+
+#: scene/animation/animation_tree.cpp
+msgid "Path to an AnimationPlayer node containing animations is not set."
+msgstr ""
+
+#: scene/animation/animation_tree.cpp
+msgid "Path set for AnimationPlayer does not lead to an AnimationPlayer node."
+msgstr ""
+
+#: scene/animation/animation_tree.cpp
+msgid "The AnimationPlayer root node is not a valid node."
+msgstr ""
+
+#: scene/animation/animation_tree_player.cpp
+msgid "This node has been deprecated. Use AnimationTree instead."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid ""
+"Color: #%s\n"
+"LMB: Set color\n"
+"RMB: Remove preset"
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "Pick a color from the editor window."
+msgstr ""
+
+#: scene/gui/color_picker.cpp
+msgid "HSV"
+msgstr "HSV"
+
+#: scene/gui/color_picker.cpp
+msgid "Raw"
+msgstr "Sen Procesar (Raw)"
+
+#: scene/gui/color_picker.cpp
+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 its "
+"children placement behavior.\n"
+"If you don't intend to add a script, use a plain Control node instead."
+msgstr ""
+"Un nodo contedor (Container) por sí mesmo non ten ningunha utilidade, salvo "
+"que se lle engada algún Script que configure a colocación dos seus nodos "
+"fillos.\n"
+"Se non tes pensado engadir un Script, utilizada un nodo Control no seu lugar."
+
+#: scene/gui/control.cpp
+msgid ""
+"The Hint Tooltip won't be displayed as the control's Mouse Filter is set to "
+"\"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"."
+msgstr ""
+
+#: scene/gui/dialogs.cpp
+msgid "Alert!"
+msgstr "Alerta!"
+
+#: scene/gui/dialogs.cpp
+msgid "Please Confirm..."
+msgstr "Por favor, confirma..."
+
+#: scene/gui/file_dialog.cpp
+msgid "Must use a valid extension."
+msgstr ""
+
+#: scene/gui/graph_edit.cpp
+msgid "Enable grid minimap."
+msgstr ""
+
+#: scene/gui/popup.cpp
+msgid ""
+"Popups will hide by default unless you call popup() or any of the popup*() "
+"functions. Making them visible for editing is fine, but they will hide upon "
+"running."
+msgstr ""
+"As ventás emerxentes (Popups) están ocultas por defecto, a non ser que "
+"chames a popup() ou calquera das funcións popup*(). Podes facelas visibles "
+"para editalas, pero ocultarasen ao iniciar a execución."
+
+#: scene/gui/range.cpp
+msgid "If \"Exp Edit\" is enabled, \"Min Value\" must be greater than 0."
+msgstr ""
+
+#: scene/gui/scroll_container.cpp
+msgid ""
+"ScrollContainer is intended to work with a single child control.\n"
+"Use a container as child (VBox, HBox, etc.), or a Control and set the custom "
+"minimum size manually."
+msgstr ""
+
+#: scene/gui/tree.cpp
+msgid "(Other)"
+msgstr "(Outros)"
+
+#: scene/main/scene_tree.cpp
+msgid ""
+"Default Environment as specified in Project Settings (Rendering -> "
+"Environment -> Default Environment) could not be loaded."
+msgstr ""
+
+#: scene/main/viewport.cpp
+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 "
+"obtain a size. Otherwise, make it a RenderTarget and assign its internal "
+"texture to some node for display."
+msgstr ""
+"Esta Mini-Ventá (Viewport) no está configurada como obxectivo de "
+"renderizado. Se quere que o seu contido se mostre directamente na pantalla, "
+"convértao nun nodo fillo dun nodo Control para que poida recibir dimensións. "
+"Ou ben, fágao un RenderTarget e asigne a súa textura a algún nodo."
+
+#: scene/main/viewport.cpp
+msgid "Viewport size must be greater than 0 to render anything."
+msgstr ""
+"As dimensións da Mini-Ventá (Viewport) deben de ser maior que 0 para poder "
+"renderizar nada."
+
+#: scene/resources/visual_shader_nodes.cpp
+msgid ""
+"The sampler port is connected but not used. Consider changing the source to "
+"'SamplerPort'."
+msgstr ""
+
+#: scene/resources/visual_shader_nodes.cpp
+msgid "Invalid source for preview."
+msgstr ""
+
+#: scene/resources/visual_shader_nodes.cpp
+msgid "Invalid source for shader."
+msgstr ""
+
+#: scene/resources/visual_shader_nodes.cpp
+msgid "Invalid comparison function for that type."
+msgstr ""
+
+#: servers/visual/shader_language.cpp
+msgid "Assignment to function."
+msgstr ""
+
+#: servers/visual/shader_language.cpp
+msgid "Assignment to uniform."
+msgstr ""
+
+#: servers/visual/shader_language.cpp
+msgid "Varyings can only be assigned in vertex function."
+msgstr ""
+
+#: servers/visual/shader_language.cpp
+msgid "Constants cannot be modified."
+msgstr ""
diff --git a/editor/translations/he.po b/editor/translations/he.po
index c179d06c24..78e6c10e33 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -3120,6 +3120,25 @@ msgid "Open & Run a Script"
msgstr "פתיחה והרצה של סקריפט"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"×”×§×‘×¦×™× ×”×‘××™× ×”× ×—×“×©×™× ×‘×›×•× ×Ÿ.\n"
+"ב×ילו פעולות לנקוט?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "רענון"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "שמירה מחדש"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "חדש בירושה"
@@ -7042,16 +7061,6 @@ msgstr ""
"×”×§×‘×¦×™× ×”×‘××™× ×”× ×—×“×©×™× ×‘×›×•× ×Ÿ.\n"
"ב×ילו פעולות לנקוט?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "רענון"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "שמירה מחדש"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "ניפוי שגי×ות"
@@ -7392,6 +7401,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -10053,6 +10066,13 @@ msgid "Projects"
msgstr "מיז×"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr ""
+"×”×§×‘×¦×™× × ×¡×¨×§×™×,\n"
+"× × ×œ×”×ž×ª×™×Ÿâ€¦"
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/hi.po b/editor/translations/hi.po
index fbf1352eff..79fab4e89b 100644
--- a/editor/translations/hi.po
+++ b/editor/translations/hi.po
@@ -3117,6 +3117,23 @@ msgid "Open & Run a Script"
msgstr "ओपन à¤à¤‚ड रन à¤à¤• सà¥à¤•à¥à¤°à¤¿à¤ªà¥à¤Ÿ"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr "निमà¥à¤¨ फ़ाइलों का निसà¥à¤¸à¤¾à¤°à¤£ नहीं हो पाया:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "नई विरासत में मिली"
@@ -6914,16 +6931,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7244,6 +7251,11 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "आकार: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9834,6 +9846,11 @@ msgid "Projects"
msgstr "परियोजना के संसà¥à¤¥à¤¾à¤ªà¤•"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "दरà¥à¤ªà¤£ को पà¥à¤¨à¤ƒ पà¥à¤°à¤¾à¤ªà¥à¤¤ करना, कृपया पà¥à¤°à¤¤à¥€à¤•à¥à¤·à¤¾ करें ..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/hr.po b/editor/translations/hr.po
index 9826f61488..6835f26fc9 100644
--- a/editor/translations/hr.po
+++ b/editor/translations/hr.po
@@ -2998,6 +2998,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6754,16 +6770,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7078,6 +7084,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9611,6 +9621,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index 8ad2fb240e..9224509238 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -14,12 +14,13 @@
# cefrebevalo <szmarci711@gmail.com>, 2020.
# thekeymethod <csokan.andras87@protonmail.ch>, 2020.
# Czmorek Dávid <czmdav.soft@gmail.com>, 2020.
+# Újvári Marcell <mmarci72@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-07 08:11+0000\n"
-"Last-Translator: Czmorek Dávid <czmdav.soft@gmail.com>\n"
+"PO-Revision-Date: 2021-01-22 10:21+0000\n"
+"Last-Translator: Újvári Marcell <mmarci72@gmail.com>\n"
"Language-Team: Hungarian <https://hosted.weblate.org/projects/godot-engine/"
"godot/hu/>\n"
"Language: hu\n"
@@ -27,7 +28,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 4.4-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -738,10 +739,9 @@ msgstr "Csak a kijelölés"
#: editor/code_editor.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/text_editor.cpp
msgid "Standard"
-msgstr ""
+msgstr "Alapértelmezett"
#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Toggle Scripts Panel"
msgstr "Szkript panel váltása"
@@ -3133,6 +3133,25 @@ msgid "Open & Run a Script"
msgstr "Szkriptet Megnyit és Futtat"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"A alábbi fájlok újabbak a lemezen.\n"
+"Mit szeretne lépni?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Újratöltés"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Újramentés"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Új Örökölt"
@@ -6957,16 +6976,6 @@ msgstr ""
"A alábbi fájlok újabbak a lemezen.\n"
"Mit szeretne lépni?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Újratöltés"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Újramentés"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Hibakereső"
@@ -7247,7 +7256,7 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Z-Axis Transform."
-msgstr ""
+msgstr "Z-Tengely transzformáció"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Plane Transform."
@@ -7282,6 +7291,11 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Méret: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Rajzolt objektumok"
@@ -9831,6 +9845,11 @@ msgid "Projects"
msgstr "Projektek"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Tükrök letöltése, kérjük várjon..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/id.po b/editor/translations/id.po
index b7dc29eb20..6704c419d9 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -3161,6 +3161,25 @@ msgid "Open & Run a Script"
msgstr "Buka & Jalankan Skrip"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Berkas berikut lebih baru dalam diska.\n"
+"Aksi apa yang ingin diambil?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Muat Ulang"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Simpan Ulang"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Turunan Baru"
@@ -7028,16 +7047,6 @@ msgstr ""
"Berkas berikut lebih baru dalam diska.\n"
"Aksi apa yang ingin diambil?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Muat Ulang"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Simpan Ulang"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Pengawakutu"
@@ -7360,6 +7369,11 @@ msgid "Yaw"
msgstr "Oleng"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Ukuran: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Objek Digambar"
@@ -10053,6 +10067,11 @@ msgid "Projects"
msgstr "Proyek"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Mendapatkan informasi cermin, silakan tunggu..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Terakhir Diubah"
diff --git a/editor/translations/is.po b/editor/translations/is.po
index 88dbd92927..45335e83e5 100644
--- a/editor/translations/is.po
+++ b/editor/translations/is.po
@@ -3027,6 +3027,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6814,16 +6830,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7139,6 +7145,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9703,6 +9713,10 @@ msgid "Projects"
msgstr "Verkefna Stjóri"
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/it.po b/editor/translations/it.po
index 0e4eac5293..54c2122e93 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -36,7 +36,7 @@
# Davide Giuliano <davidegiuliano00@gmail.com>, 2019.
# Stefano Merazzi <asso99@hotmail.com>, 2019.
# Sinapse X <sinapsex13@gmail.com>, 2019.
-# Micila Micillotto <micillotto@gmail.com>, 2019, 2020.
+# Micila Micillotto <micillotto@gmail.com>, 2019, 2020, 2021.
# Mirko Soppelsa <miknsop@gmail.com>, 2019, 2020.
# No <kingofwizards.kw7@gmail.com>, 2019.
# StarFang208 <polaritymanx@yahoo.it>, 2019.
@@ -52,15 +52,16 @@
# Anonymous <noreply@weblate.org>, 2020.
# riccardo boffelli <riccardo.boffelli.96@gmail.com>, 2020.
# Lorenzo Asolan <brixiumx@gmail.com>, 2020.
-# Lorenzo Cerqua <lorenzocerqua@tutanota.com>, 2020.
+# Lorenzo Cerqua <lorenzocerqua@tutanota.com>, 2020, 2021.
# Federico Manzella <ferdiu.manzella@gmail.com>, 2020.
# Ziv D <wizdavid@gmail.com>, 2020.
+# Riteo Siuga <lorenzocerqua@tutanota.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-22 21:12+0000\n"
-"Last-Translator: Lorenzo Cerqua <lorenzocerqua@tutanota.com>\n"
+"PO-Revision-Date: 2021-02-16 13:40+0000\n"
+"Last-Translator: Riteo Siuga <lorenzocerqua@tutanota.com>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/godot-engine/"
"godot/it/>\n"
"Language: it\n"
@@ -68,7 +69,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -190,9 +191,8 @@ msgid "Anim Delete Keys"
msgstr "Elimina delle chiavi d'animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Change Keyframe Time"
-msgstr "Cambia il tempo di un fotogramma chiave"
+msgstr "Cambia Intervallo Fotogramma Principale Animazione"
#: editor/animation_track_editor.cpp
msgid "Anim Change Transition"
@@ -203,49 +203,41 @@ msgid "Anim Change Transform"
msgstr "Cambia la trasformazione di un'animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Change Keyframe Value"
-msgstr "Cambia il valore del fotogramma chiave di un'animazione"
+msgstr "Cambia Valore Fotogramma Principale Animazione"
#: editor/animation_track_editor.cpp
msgid "Anim Change Call"
msgstr "Cambia la chiamata di un'animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Keyframe Time"
-msgstr "Cambia il tempo di più fotogrammi chiave"
+msgstr "Cambia Multipli Intervalli Fotogramma Principale Animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Transition"
-msgstr "Cambia la transizione di più animazioni"
+msgstr "Cambi Multipli Transizione Animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Transform"
-msgstr "Cambia le trasformazioni di più animazioni"
+msgstr "Cambi Multipli Trasformazione Animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Keyframe Value"
-msgstr "Cambia il valore di più fotogrammi chiave di un'Animazione"
+msgstr "Cambia Multipli Valori Fotogramma Principale Animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Multi Change Call"
-msgstr "Cambia la chiamata di metodo di più animazioni"
+msgstr "Cambi Multipli Chiamata Animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Change Animation Length"
-msgstr "Cambia la lunghezza di un'animazione"
+msgstr "Cambia Lunghezza Animazione"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
-#, fuzzy
msgid "Change Animation Loop"
-msgstr "Commuta ciclicità animazione"
+msgstr "Cambia Loop Animazione"
#: editor/animation_track_editor.cpp
msgid "Property Track"
@@ -317,9 +309,8 @@ msgid "Interpolation Mode"
msgstr "Modalità d'interpolazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Loop Wrap Mode (Interpolate end with beginning on loop)"
-msgstr "Modalità ciclo ad anello (interpola la fine con l'inizio del ciclo)"
+msgstr "Modalità Ciclo ad Anello (interpola la fine con l'inizio a ciclo)"
#: editor/animation_track_editor.cpp
msgid "Remove this track."
@@ -342,17 +333,14 @@ msgid "Discrete"
msgstr "Discreta"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Trigger"
-msgstr "Attivazione"
+msgstr "Attivatore"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Capture"
msgstr "Cattura"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Nearest"
msgstr "Più vicino"
@@ -366,30 +354,25 @@ msgid "Cubic"
msgstr "Cubica"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Clamp Loop Interp"
-msgstr "Blocca l'interpolazione d'un ciclo"
+msgstr "Blocca Interpolazione Ciclo"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Wrap Loop Interp"
-msgstr "Continua l'interpolazione d'un ciclo"
+msgstr "Avvolgi Interpolazione Ciclo"
#: editor/animation_track_editor.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Insert Key"
-msgstr "Inserisci un fotogramma chiave"
+msgstr "Inserisci Fotogramma Chiave"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Duplicate Key(s)"
-msgstr "Duplica i fotogrammi chiave selezionati"
+msgstr "Duplica Fotogrammi Chiave Selezionati"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Delete Key(s)"
-msgstr "Elimina i fotogrammi chiave selezionati"
+msgstr "Elimina Fotogrammi Chiave Selezionati"
#: editor/animation_track_editor.cpp
msgid "Change Animation Update Mode"
@@ -408,14 +391,12 @@ msgid "Remove Anim Track"
msgstr "Rimuovi la traccia di un'animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Create NEW track for %s and insert key?"
-msgstr "Creare una NUOVA traccia per %s e inserirci il fotogramma chiave?"
+msgstr "Crea NUOVA traccia per %s ed inserire fotogramma chiave?"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Create %d NEW tracks and insert keys?"
-msgstr "Creare %d NUOVE tracce e inserirci i fotogrammi chiavi?"
+msgstr "Crea %d NUOVE tracce ed inserire fotogrammi chiave?"
#: editor/animation_track_editor.cpp editor/create_dialog.cpp
#: editor/editor_audio_buses.cpp editor/editor_feature_profile.cpp
@@ -434,24 +415,20 @@ msgid "Anim Insert"
msgstr "Inserisci un'animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "AnimationPlayer can't animate itself, only other players."
-msgstr "AnimationPlayer non può animarsi, solo altri nodi."
+msgstr "AnimationPlayer può solo animare altri riproduttori, non se stesso."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Create & Insert"
-msgstr "Crea un'animazione e inserisci un fotogramma chiave"
+msgstr "Crea & Inserisci Animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Insert Track & Key"
-msgstr "Inserisci un traccia con un fotogramma chiave in un'animazione"
+msgstr "Inserisci Traccia e Fotogramma Chiave Animazione"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Anim Insert Key"
-msgstr "Inserisci un fotogramma chiave in un'animazione"
+msgstr "Inserisci Fotogramma Chiave Animazione"
#: editor/animation_track_editor.cpp
msgid "Change Animation Step"
@@ -462,13 +439,12 @@ msgid "Rearrange Tracks"
msgstr "Riordina delle tracce"
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Transform tracks only apply to Spatial-based nodes."
msgstr ""
-"Le tracce di trasformazioni 3D si applicano solo a nodi di tipo Spatial."
+"Le tracce di trasformazione possono essere applicate soltanto ai nodi basati "
+"sul nodo Spatial."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid ""
"Audio tracks can only point to nodes of type:\n"
"-AudioStreamPlayer\n"
@@ -487,26 +463,28 @@ msgstr ""
"AnimationPlayer."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "An animation player can't animate itself, only other players."
-msgstr "Un AnimationPlayer non può animare se stesso, solo altri riproduttori."
+msgstr ""
+"Un riproduttore di animazioni può solo animare altri riproduttori, non se "
+"stesso."
#: editor/animation_track_editor.cpp
-#, fuzzy
msgid "Not possible to add a new track without a root"
msgstr "Non è possibile aggiungere una nuova traccia senza un nodo radice"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Invalid track for Bezier (no suitable sub-properties)"
-msgstr "Traccia non valida per la curva Bézier (nessuna sottoproprietà adatta)"
+msgstr ""
+"Traccia non valida per una curva di Bézier (nessuna sotto-proprietà adatta)"
#: editor/animation_track_editor.cpp
msgid "Add Bezier Track"
-msgstr "Aggiungi traccia Bézier"
+msgstr "Aggiungi una traccia di curve di Bézier"
#: editor/animation_track_editor.cpp
msgid "Track path is invalid, so can't add a key."
-msgstr "Il tracciato non è valido, non è possibile aggiungere una chiave."
+msgstr "La traccia non è valida, quindi è impossibile aggiungere una chiave."
#: editor/animation_track_editor.cpp
msgid "Track is not of type Spatial, can't insert key"
@@ -514,21 +492,22 @@ msgstr "La traccia non è di tipo Spatial, impossibile aggiungere la chiave"
#: editor/animation_track_editor.cpp
msgid "Add Transform Track Key"
-msgstr "Aggiungi chiave traccia Transform"
+msgstr "Aggiungi una chiave a una traccia di trasformazioni"
#: editor/animation_track_editor.cpp
msgid "Add Track Key"
-msgstr "Aggiungi chiave traccia"
+msgstr "Aggiungi una chiave a una traccia"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Track path is invalid, so can't add a method key."
msgstr ""
-"Il tracciato non è valido, non è possibile aggiungere una chiave di chiamata "
-"di funzione."
+"La traccia non è valida, quindi non è possibile aggiungere una chiave di "
+"chiamata di metodo."
#: editor/animation_track_editor.cpp
msgid "Add Method Track Key"
-msgstr "Aggiungi chiave alla traccia metodo"
+msgstr "Aggiungi una chiave a una traccia di chiamate di metodi"
#: editor/animation_track_editor.cpp
msgid "Method not found in object: "
@@ -536,7 +515,7 @@ msgstr "Metodo non trovato nell'oggetto: "
#: editor/animation_track_editor.cpp
msgid "Anim Move Keys"
-msgstr "Sposta chiavi animazione"
+msgstr "Sposta delle chiavi d'animazione"
#: editor/animation_track_editor.cpp
msgid "Clipboard is empty"
@@ -544,20 +523,21 @@ msgstr "Gli appunti sono vuoti"
#: editor/animation_track_editor.cpp
msgid "Paste Tracks"
-msgstr "Incolla tracce"
+msgstr "Incolla delle tracce"
#: editor/animation_track_editor.cpp
msgid "Anim Scale Keys"
-msgstr "Scala chiavi animazione"
+msgstr "Scala delle chiavi d'animazione"
#: editor/animation_track_editor.cpp
msgid ""
"This option does not work for Bezier editing, as it's only a single track."
msgstr ""
-"Questa opzione non funziona per modificare curve di Bézier, dato che si "
-"tratta di una traccia singola."
+"Questa opzione non funziona per modificare delle curve di Bézier, dato che "
+"si tratta di una singola traccia."
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid ""
"This animation belongs to an imported scene, so changes to imported tracks "
"will not be saved.\n"
@@ -569,14 +549,14 @@ msgid ""
"Alternatively, use an import preset that imports animations to separate "
"files."
msgstr ""
-"Questa animazione appartiene a una scena importata, eventuali modifiche alle "
-"tracce importate non saranno salvate.\n"
+"Quest'animazione appartiene a una scena importata, eventuali modifiche fatte "
+"alle tracce importate non verranno salvate.\n"
"\n"
-"Per abilitare la possibilità di aggiungere ulteriori tracce, vai alle "
-"impostazioni di importazione della scena e imposta\n"
-"\"Animation > Storage\" su \"Files\", abilita \"Animation > Keep Custom "
-"Tracks\", e infine reimporta la scena.\n"
-"Altrimenti, usa un preset di importazione che importa le animazioni in file "
+"Per abilitare la possibilità di aggiungere ulteriori tracce, andare nelle "
+"impostazioni d'importazione della scena, impostare\n"
+"\"Animation > Storage\" su \"Files\", attivare \"Animation > Keep Custom "
+"Tracks\" e infine reimportare la scena.\n"
+"Altrimenti, usare una preimpostazione che importi le animazioni in file "
"separati."
#: editor/animation_track_editor.cpp
@@ -593,11 +573,11 @@ msgstr "Mostra solo le tracce dei nodi selezionati nell'albero."
#: editor/animation_track_editor.cpp
msgid "Group tracks by node or display them as plain list."
-msgstr "Raggruppa le tracce per nodo o mostra una lista semplice."
+msgstr "Raggruppa le tracce per nodo o le visualizza in una lista semplice."
#: editor/animation_track_editor.cpp
msgid "Snap:"
-msgstr "Snap:"
+msgstr "Scatto:"
#: editor/animation_track_editor.cpp
msgid "Animation step value."
@@ -624,25 +604,26 @@ msgstr "Modifica"
#: editor/animation_track_editor.cpp
msgid "Animation properties."
-msgstr "Proprietà animazione."
+msgstr "Proprietà dell'animazione."
#: editor/animation_track_editor.cpp
msgid "Copy Tracks"
-msgstr "Copia tracce"
+msgstr "Copia le tracce"
#: editor/animation_track_editor.cpp
msgid "Scale Selection"
-msgstr "Scala selezione"
+msgstr "Scala la selezione"
#: editor/animation_track_editor.cpp
msgid "Scale From Cursor"
-msgstr "Scala da cursore"
+msgstr "Scala a partire dal cursore"
#: editor/animation_track_editor.cpp modules/gridmap/grid_map_editor_plugin.cpp
msgid "Duplicate Selection"
-msgstr "Duplica selezione"
+msgstr "Duplica la selezione"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Duplicate Transposed"
msgstr "Duplica trasposto"
@@ -651,20 +632,22 @@ msgid "Delete Selection"
msgstr "Elimina la selezione"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Go to Next Step"
msgstr "Va' al passo successivo"
#: editor/animation_track_editor.cpp
+#, fuzzy
msgid "Go to Previous Step"
msgstr "Va' al passo precedente"
#: editor/animation_track_editor.cpp
msgid "Optimize Animation"
-msgstr "Ottimizza animazione"
+msgstr "Ottimizza l'animazione"
#: editor/animation_track_editor.cpp
msgid "Clean-Up Animation"
-msgstr "Pulisci animazione"
+msgstr "Pulisci l'animazione"
#: editor/animation_track_editor.cpp
msgid "Pick the node that will be animated:"
@@ -672,7 +655,7 @@ msgstr "Seleziona il nodo che verrà animato:"
#: editor/animation_track_editor.cpp
msgid "Use Bezier Curves"
-msgstr "Usa curve di Bézier"
+msgstr "Usa le curve di Bézier"
#: editor/animation_track_editor.cpp
msgid "Anim. Optimizer"
@@ -680,15 +663,15 @@ msgstr "Ottimizzatore anim."
#: editor/animation_track_editor.cpp
msgid "Max. Linear Error:"
-msgstr "Max. errore lineare:"
+msgstr "Max errore lineare:"
#: editor/animation_track_editor.cpp
msgid "Max. Angular Error:"
-msgstr "Max. errore angolare:"
+msgstr "Max errore angolare:"
#: editor/animation_track_editor.cpp
msgid "Max Optimizable Angle:"
-msgstr "Max. angolo ottimizzabile:"
+msgstr "Max angolo ottimizzabile:"
#: editor/animation_track_editor.cpp
msgid "Optimize"
@@ -696,11 +679,11 @@ msgstr "Ottimizza"
#: editor/animation_track_editor.cpp
msgid "Remove invalid keys"
-msgstr "Rimuovi chiavi non valide"
+msgstr "Rimuovi le chiavi non valide"
#: editor/animation_track_editor.cpp
msgid "Remove unresolved and empty tracks"
-msgstr "Rimuovi tracce irrisolte e vuote"
+msgstr "Rimuovi le tracce irrisolte e vuote"
#: editor/animation_track_editor.cpp
msgid "Clean-up all animations"
@@ -708,7 +691,7 @@ msgstr "Pulisci tutte le animazioni"
#: editor/animation_track_editor.cpp
msgid "Clean-Up Animation(s) (NO UNDO!)"
-msgstr "Pulisci animazione(i) (NON ANNULLABILE!)"
+msgstr "Pulisci le animazioni (NON ANNULLABILE!)"
#: editor/animation_track_editor.cpp
msgid "Clean-Up"
@@ -733,31 +716,33 @@ msgstr "Copia"
#: editor/animation_track_editor.cpp
msgid "Select All/None"
-msgstr "Seleziona Tutto/Nulla"
+msgstr "Seleziona tutto/nulla"
#: editor/animation_track_editor_plugins.cpp
msgid "Add Audio Track Clip"
-msgstr "Aggiungi traccia clip audio"
+msgstr "Aggiungi audio in una traccia di riproduzione audio"
#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
msgid "Change Audio Track Clip Start Offset"
-msgstr "Cambia Offset di Inizio della Clip della Traccia Audio"
+msgstr "Cambia lo scostamento dell'inizio della traccia audio"
#: editor/animation_track_editor_plugins.cpp
+#, fuzzy
msgid "Change Audio Track Clip End Offset"
-msgstr "Cambia offset di fine della clip della traccia audio"
+msgstr "Cambia lo scostamento della fine della traccia audio"
#: editor/array_property_edit.cpp
msgid "Resize Array"
-msgstr "Ridimensiona array"
+msgstr "Ridimensiona lista"
#: editor/array_property_edit.cpp
msgid "Change Array Value Type"
-msgstr "Cambia tipo del valore dell'array"
+msgstr "Cambia il tipo del valore della lista"
#: editor/array_property_edit.cpp
msgid "Change Array Value"
-msgstr "Cambia valore array"
+msgstr "Cambia il valore della lista"
#: editor/code_editor.cpp
msgid "Go to Line"
@@ -765,7 +750,7 @@ msgstr "Vai alla linea"
#: editor/code_editor.cpp
msgid "Line Number:"
-msgstr "Numero linea:"
+msgstr "Numero della linea:"
#: editor/code_editor.cpp
msgid "%d replaced."
@@ -777,11 +762,11 @@ msgstr "%d corrispondenza."
#: editor/code_editor.cpp editor/editor_help.cpp
msgid "%d matches."
-msgstr "%d corrispondenza/e."
+msgstr "%d corrispondenze."
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Match Case"
-msgstr "Distingui maiuscole"
+msgstr "Distingui le maiuscole"
#: editor/code_editor.cpp editor/find_in_files.cpp
msgid "Whole Words"
@@ -797,7 +782,7 @@ msgstr "Rimpiazza tutti"
#: editor/code_editor.cpp
msgid "Selection Only"
-msgstr "Solo selezione"
+msgstr "Solo nella selezione"
#: editor/code_editor.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/text_editor.cpp
@@ -805,6 +790,7 @@ msgid "Standard"
msgstr "Standard"
#: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Toggle Scripts Panel"
msgstr "Commuta pannello degli script"
@@ -822,15 +808,16 @@ msgstr "Rimpicciolisci"
#: editor/code_editor.cpp
msgid "Reset Zoom"
-msgstr "Resetta ingrandimento"
+msgstr "Reimposta ingrandimento"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Warnings"
msgstr "Avvertenze"
#: editor/code_editor.cpp
msgid "Line and column numbers."
-msgstr "Numeri di riga e colonna."
+msgstr "Numeri di riga e di colonna."
#: editor/connections_dialog.cpp
msgid "Method in target node must be specified."
@@ -838,7 +825,7 @@ msgstr "Il metodo del nodo designato deve essere specificato."
#: editor/connections_dialog.cpp
msgid "Method name must be a valid identifier."
-msgstr "Il nome del metodo dev'essere un identificatore valido."
+msgstr "Il nome del metodo deve essere un identificatore valido."
#: editor/connections_dialog.cpp
msgid ""
@@ -2470,7 +2457,7 @@ msgstr "Non c'è nessuna scena definita da eseguire."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Salva scena prima di eseguire..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3231,6 +3218,25 @@ msgid "Open & Run a Script"
msgstr "Apri ed esegui uno script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"I file seguenti sono più recenti su disco.\n"
+"Che azione deve essere intrapresa?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Ricarica"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Risalva"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Nuova ereditata"
@@ -4002,19 +4008,16 @@ msgid "Searching..."
msgstr "Ricerca..."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d match in %d file."
-msgstr "%d corrispondenza/e."
+msgstr "%d corrispondenza in %d file."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d matches in %d file."
-msgstr "%d corrispondenza/e."
+msgstr "%d corrispondenze in %d file."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d matches in %d files."
-msgstr "%d corrispondenza/e."
+msgstr "%d corrispondenze in %d file."
#: editor/groups_editor.cpp
msgid "Add to Group"
@@ -5256,15 +5259,13 @@ msgid "Assets ZIP File"
msgstr "ZIP File degli Asset"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
-"Impossibile determinare un percorso di salvataggio per le immagini di "
+"Impossibile determinare un percorso di salvataggio per le immagini "
"lightmap.\n"
-"Salva la scena (per salvare le immagini nella stessa directory), o scegli un "
-"percorso di salvataggio nelle proprietà di BackedLightmap."
+"Salva la scena e riprova."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5283,26 +5284,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Impossibile determinare la dimensione della lightmap. La dimensione massima "
+"(della lightmap) è troppo piccola?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Alcune mesh non sono valide. Sii sicuro che i valori dei canali UV2 siano "
+"all'interno nella regione [0.0,1.0] quadra."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Godot Editor è stato costruito senza il supporto per il ray tracing, quindi "
+"il baking delle lightmaps non è possibile."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Preprocessa Lightmaps"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Seleziona file template"
+msgstr "Seleziona il file bake della lightmap:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6408,9 +6414,8 @@ msgstr ""
"ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Converti in CPUParticles"
+msgstr "Converti in CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -7118,16 +7123,6 @@ msgstr ""
"I file seguenti sono più recenti su disco.\n"
"Che azione deve essere intrapresa?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Ricarica"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Risalva"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Debugger"
@@ -7447,6 +7442,11 @@ msgid "Yaw"
msgstr "Imbardata"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Dimensione: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Oggetti disegnati"
@@ -10147,6 +10147,11 @@ msgid "Projects"
msgstr "Progetti"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Recupero dei mirror, attendi..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Ultima Modifica"
@@ -11701,36 +11706,31 @@ msgstr "Dai una risorsa MeshLibrary a questa GridMap per usare le sue mesh."
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Inizia il Baking"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Preparando le strutture dati"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Genera AABB"
+msgstr "Genera buffers"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Direzioni"
+msgstr "Luci dirette"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Indenta a destra"
+msgstr "Luci indirette"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
-msgstr "Post-Processo"
+msgstr "Post processing"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Stampando Luci:"
+msgstr "Stampando le lightmap"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12250,7 +12250,7 @@ msgstr "Seleziona il dispositivo dall'elenco"
#: platform/android/export/export.cpp
msgid "Unable to find the 'apksigner' tool."
-msgstr ""
+msgstr "Impossibile trovare lo strumento 'apksigner'."
#: platform/android/export/export.cpp
msgid ""
@@ -12271,18 +12271,13 @@ msgstr ""
"Release keystore non configurato correttamente nel preset di esportazione."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-"Percorso per Android SDK per build personalizzata nelle impostazioni "
-"dell'editor non è valido."
+"Un percorso valido per il SDK Android è richiesto nelle Impostazioni Editor."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
-"Percorso per Android SDK per build personalizzata nelle impostazioni "
-"dell'editor non è valido."
+msgstr "Un percorso invalido per il SDK Android nelle Impostazioni Editor."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12291,22 +12286,24 @@ msgstr "Cartella 'platform-tools' inesistente!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
+"Impossibile trovare il comando adb negli strumenti di piattaforma del SDK "
+"Android."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-"Percorso per Android SDK per build personalizzata nelle impostazioni "
-"dell'editor non è valido."
+"Per favore, controlla la directory specificata del SDK Android nelle "
+"Impostazioni Editor."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Missing 'build-tools' directory!"
-msgstr "Cartella 'platform-tools' inesistente!"
+msgstr "Cartella 'build-tools' inesistente!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
+"Impossibile trovare il comando apksigner negli strumenti di piattaforma del "
+"SDK Android."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12795,27 +12792,23 @@ msgstr "ARVROrigin richiede un nodo figlio di tipo ARVRCamera."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Cercando mesh e luci"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "Elaborazione Geometria..."
+msgstr "Elaborazione Geometria (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Mostra Ambiente"
+msgstr "Preparazione Ambiente"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Generando Lightmap"
+msgstr "Generando cattura"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "Generando Lightmap"
+msgstr "Salvando Lightmap"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13161,9 +13154,8 @@ msgid "Must use a valid extension."
msgstr "È necessaria un'estensione valida."
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Enable grid minimap."
-msgstr "Abilita Snap"
+msgstr "Abilita mini-mappa griglia."
#: scene/gui/popup.cpp
msgid ""
@@ -13224,6 +13216,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"La porta del sampler è connessa ma mai usata. Considera cambiare la sorgente "
+"a 'SamplerPort'."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index 99ce63a6d1..8ed2a31d77 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -31,13 +31,13 @@
# Akihiro Ogoshi <technical@palsystem-game.com>, 2019, 2020.
# Wataru Onuki <bettawat@yahoo.co.jp>, 2020, 2021.
# sporeball <sporeballdev@gmail.com>, 2020.
-# BinotaLIU <me@binota.org>, 2020.
+# BinotaLIU <me@binota.org>, 2020, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-01-06 18:29+0000\n"
-"Last-Translator: nitenook <admin@alterbaum.net>\n"
+"PO-Revision-Date: 2021-02-07 05:50+0000\n"
+"Last-Translator: BinotaLIU <me@binota.org>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/"
"godot/ja/>\n"
"Language: ja\n"
@@ -45,7 +45,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2410,7 +2410,7 @@ msgstr "実行ã™ã‚‹ã‚·ãƒ¼ãƒ³ãŒå®šç¾©ã•れã¦ã„ã¾ã›ã‚“。"
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "実行å‰ã«ã‚·ãƒ¼ãƒ³ã‚’ä¿å­˜..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3161,6 +3161,25 @@ msgid "Open & Run a Script"
msgstr "スクリプトを開ã„ã¦å®Ÿè¡Œ"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"以下ã®ãƒ•ァイルより新ã—ã„ã‚‚ã®ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ã¾ã™ã€‚\n"
+"ã©ã†ã—ã¾ã™ã‹?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "å†èª­è¾¼"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "å†ä¿å­˜"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "æ–°è¦ã®ç¶™æ‰¿"
@@ -5168,14 +5187,12 @@ msgid "Assets ZIP File"
msgstr "アセットã®zipファイル"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
"ライトマップ画åƒã®ä¿å­˜ãƒ‘スを確定ã§ãã¾ã›ã‚“。\n"
-"シーンをä¿å­˜ã™ã‚‹ (ç”»åƒãŒåŒã˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ä¿å­˜ã•れる) ã‹ã€BakedLightmapプロパ"
-"ティã‹ã‚‰ä¿å­˜ãƒ‘ã‚¹ã‚’é¸æŠžã—ã¦ãã ã•ã„。"
+"シーンをä¿å­˜ã—ã¦ã‹ã‚‰å†åº¦è¡Œã£ã¦ãã ã•ã„。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5194,26 +5211,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"ライトマップサイズã®ç¢ºå®šã«å¤±æ•—ã—ã¾ã—ãŸã€‚ãƒ©ã‚¤ãƒˆãƒžãƒƒãƒ—ã®æœ€å¤§ã‚µã‚¤ã‚ºãŒå°ã•ã™ãŽã¾"
+"ã™ã‹ï¼Ÿ"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"一部ã®ãƒ¡ãƒƒã‚·ãƒ¥ãŒç„¡åйã§ã™ã€‚UV2ãƒãƒ£ãƒ³ãƒãƒ«ã®å€¤ãŒ [0.0,1.0] ã®æ­£æ–¹å½¢é ˜åŸŸå†…ã«ã‚ã‚‹"
+"ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"GodotエディタãŒãƒ¬ã‚¤ãƒˆãƒ¬ãƒ¼ã‚·ãƒ³ã‚°ã«å¯¾å¿œã›ãšã«ãƒ“ルドã•れã¦ãŠã‚Šã€ãƒ©ã‚¤ãƒˆãƒžãƒƒãƒ—ã®ãƒ™"
+"イクãŒã§ãã¾ã›ã‚“。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "ライトマップを焼ã込む"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠž"
+msgstr "ãƒ©ã‚¤ãƒˆãƒžãƒƒãƒ—ãƒ™ã‚¤ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠž:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6307,9 +6329,8 @@ msgid "Can only set point into a ParticlesMaterial process material"
msgstr "ParticlesMaterialプロセスマテリアルã«ã®ã¿ç‚¹ã‚’設定ã§ãã¾ã™"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "CPUパーティクルã«å¤‰æ›"
+msgstr "CPUParticles2D ã«å¤‰æ›"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -7013,16 +7034,6 @@ msgstr ""
"以下ã®ãƒ•ァイルより新ã—ã„ã‚‚ã®ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ã¾ã™ã€‚\n"
"ã©ã†ã—ã¾ã™ã‹?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "å†èª­è¾¼"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "å†ä¿å­˜"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "デãƒãƒƒã‚¬"
@@ -7343,6 +7354,10 @@ msgid "Yaw"
msgstr "ヨー"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "サイズ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "æç”»ã•れãŸã‚ªãƒ–ジェクト"
@@ -10019,6 +10034,11 @@ msgid "Projects"
msgstr "プロジェクト"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "ミラーをå–å¾—ã—ã¦ã„ã¾ã™ã€‚ã—ã°ã‚‰ããŠå¾…ã¡ãã ã•ã„..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "最終更新"
@@ -11572,16 +11592,15 @@ msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "ベイク開始"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "ãƒ‡ãƒ¼ã‚¿æ§‹é€ ã®æº–å‚™"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "AABBを生æˆ"
+msgstr "ãƒãƒƒãƒ•ァを生æˆ"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
#, fuzzy
diff --git a/editor/translations/ka.po b/editor/translations/ka.po
index c35aebac02..92ab76e773 100644
--- a/editor/translations/ka.po
+++ b/editor/translations/ka.po
@@ -3111,6 +3111,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6969,16 +6985,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7307,6 +7313,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9908,6 +9918,11 @@ msgid "Projects"
msgstr "პრáƒáƒ”ქტის დáƒáƒ›áƒ¤áƒ£áƒ«áƒœáƒ”ბლები"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "ძებნáƒ:"
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index 8c15195d24..b8b9eed468 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -3127,6 +3127,25 @@ msgid "Open & Run a Script"
msgstr "스í¬ë¦½íЏ 열기 & 실행"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"해당 파ì¼ì€ 디스í¬ì— 있는 게 ë” ìµœì‹ ìž…ë‹ˆë‹¤.\n"
+"어떻게 할 건가요?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "새로고침"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "다시 저장"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "새 ìƒì† 씬"
@@ -6974,16 +6993,6 @@ msgstr ""
"해당 파ì¼ì€ 디스í¬ì— 있는 게 ë” ìµœì‹ ìž…ë‹ˆë‹¤.\n"
"어떻게 할 건가요?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "새로고침"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "다시 저장"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "디버거"
@@ -7303,6 +7312,11 @@ msgid "Yaw"
msgstr "ìš”"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "í¬ê¸°: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "그려진 ê°ì²´"
@@ -9958,6 +9972,11 @@ msgid "Projects"
msgstr "프로ì íЏ"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "미러를 검색 중입니다. 기다려주세요..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "마지막으로 수정ë¨"
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
index f8c6d6acc9..f9353c1acc 100644
--- a/editor/translations/lt.po
+++ b/editor/translations/lt.po
@@ -3062,6 +3062,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6939,16 +6955,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7269,6 +7275,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9881,6 +9891,11 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Atsiųsti"
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/lv.po b/editor/translations/lv.po
index e7abc2a6e7..85519ccb59 100644
--- a/editor/translations/lv.po
+++ b/editor/translations/lv.po
@@ -3028,6 +3028,23 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr "Sekojošie faili netika izvilkti no paketes:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6793,16 +6810,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7126,6 +7133,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9704,6 +9715,11 @@ msgid "Projects"
msgstr "Projekta DibinÄtÄji"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "IelÄdÄ“t..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/mi.po b/editor/translations/mi.po
index 33153ba3a5..d9edd212bd 100644
--- a/editor/translations/mi.po
+++ b/editor/translations/mi.po
@@ -2974,6 +2974,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6726,16 +6742,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7050,6 +7056,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9570,6 +9580,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/mk.po b/editor/translations/mk.po
index 9c1f076910..561adc90ff 100644
--- a/editor/translations/mk.po
+++ b/editor/translations/mk.po
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2021-01-15 03:43+0000\n"
+"PO-Revision-Date: 2021-01-22 10:21+0000\n"
"Last-Translator: Kristijan Fremen Velkovski <me@krisfremen.com>\n"
"Language-Team: Macedonian <https://hosted.weblate.org/projects/godot-engine/"
"godot/mk/>\n"
@@ -138,11 +138,11 @@ 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"
@@ -150,11 +150,11 @@ 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
msgid "Anim Multi Change Keyframe Time"
@@ -162,7 +162,7 @@ msgstr ""
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Transition"
-msgstr ""
+msgstr "Ðнимација Многукратно Променување на Прелози"
#: editor/animation_track_editor.cpp
msgid "Anim Multi Change Transform"
@@ -2981,6 +2981,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6733,16 +6749,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7057,6 +7063,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9577,6 +9587,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
@@ -10914,27 +10928,27 @@ msgstr ""
#: modules/gdnative/gdnative_library_singleton_editor.cpp
msgid "Libraries: "
-msgstr ""
+msgstr "Библиотеки: "
#: modules/gdnative/register_types.cpp
msgid "GDNative"
-msgstr ""
+msgstr "GDNative(ГДДомороден)"
#: modules/gdscript/gdscript_functions.cpp
msgid "Step argument is zero!"
-msgstr ""
+msgstr "Корак аргумент е нула!"
#: modules/gdscript/gdscript_functions.cpp
msgid "Not a script with an instance"
-msgstr ""
+msgstr "Ðе е Ñкрипта Ñо инÑтанца"
#: modules/gdscript/gdscript_functions.cpp
msgid "Not based on a script"
-msgstr ""
+msgstr "Ðе е оÑновано на Ñкрипта"
#: modules/gdscript/gdscript_functions.cpp
msgid "Not based on a resource file"
-msgstr ""
+msgstr "Ðе е оÑновано на реÑÑƒÑ€Ñ Ñ„Ð°Ñ˜Ð»"
#: modules/gdscript/gdscript_functions.cpp
msgid "Invalid instance dictionary format (missing @path)"
diff --git a/editor/translations/ml.po b/editor/translations/ml.po
index a72cd78ca2..22fdc508ae 100644
--- a/editor/translations/ml.po
+++ b/editor/translations/ml.po
@@ -2986,6 +2986,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6742,16 +6758,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7066,6 +7072,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9587,6 +9597,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/mr.po b/editor/translations/mr.po
index 6f019300ff..660429c147 100644
--- a/editor/translations/mr.po
+++ b/editor/translations/mr.po
@@ -2981,6 +2981,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6733,16 +6749,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7057,6 +7063,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9578,6 +9588,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/ms.po b/editor/translations/ms.po
index 2f3e1481a2..01539c3fb7 100644
--- a/editor/translations/ms.po
+++ b/editor/translations/ms.po
@@ -3214,6 +3214,23 @@ msgstr "Buka & Jalankan Skrip"
#: editor/editor_node.cpp
#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr "Fail berikut gagal diekstrak dari pakej:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
msgid "New Inherited"
msgstr "Baru Diwarisi"
@@ -7063,16 +7080,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7388,6 +7395,11 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Saiz: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9924,6 +9936,11 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Mengambil maklumat cermin, sila tunggu..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index 90f033ad39..3c54f55e99 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -3287,6 +3287,23 @@ msgstr "Åpne & Kjør et Skript"
#: editor/editor_node.cpp
#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr "De følgende filene feilet ekstrahering fra pakke:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Gjeninnlat"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Lagre på nytt"
+
+#: editor/editor_node.cpp
+#, fuzzy
msgid "New Inherited"
msgstr "Ny Arvet"
@@ -7381,16 +7398,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Gjeninnlat"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Lagre på nytt"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Feilsøking"
@@ -7732,6 +7739,11 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Størrelse: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -10438,6 +10450,11 @@ msgid "Projects"
msgstr "Prosjekter"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Henter fillager, vennligst vent..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index 22b3202945..c73520f563 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -28,7 +28,7 @@
# rxadmin <r.van.eeghem@gmail.com>, 2018.
# Peter Goelst <muis24@gmail.com>, 2019.
# Wouter Buckens <wou.buc@gmail.com>, 2019.
-# Stijn Hinlopen <f.a.hinlopen@gmail.com>, 2019, 2020.
+# Stijn Hinlopen <f.a.hinlopen@gmail.com>, 2019, 2020, 2021.
# jef dered <themen098s@vivaldi.net>, 2019.
# Alex H. <sandertjeh13@hotmail.com>, 2019.
# edouardgr <edouard.gruyters@gmail.com>, 2019.
@@ -47,7 +47,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-25 12:29+0000\n"
+"PO-Revision-Date: 2021-02-05 23:44+0000\n"
"Last-Translator: Stijn Hinlopen <f.a.hinlopen@gmail.com>\n"
"Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/"
"nl/>\n"
@@ -56,7 +56,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -1703,7 +1703,7 @@ msgstr "Script Editor"
#: editor/editor_feature_profile.cpp
msgid "Asset Library"
-msgstr "Asset bibliotheek"
+msgstr "Materiaalbibliotheek"
#: editor/editor_feature_profile.cpp
msgid "Scene Tree Editing"
@@ -2430,7 +2430,7 @@ msgstr "Er is geen startscène ingesteld."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Scène opslaan voor het afspelen..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -2901,7 +2901,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
-msgstr "Toon collision shapes"
+msgstr "Botsingsvormen tonen"
#: editor/editor_node.cpp
#, fuzzy
@@ -3185,6 +3185,25 @@ msgid "Open & Run a Script"
msgstr "Voer Een Script Uit"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"De volgende bestanden zijn nieuwer op de schijf.\n"
+"Welke aktie moet worden genomen?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Herladen"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Heropslaan"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Nieuw afgeleid type"
@@ -3210,7 +3229,7 @@ msgstr "Open Script Bewerker"
#: editor/editor_node.cpp editor/project_manager.cpp
msgid "Open Asset Library"
-msgstr "Open Asset Bibliotheek"
+msgstr "Open Materiaalbibliotheek"
#: editor/editor_node.cpp
msgid "Open the next Editor"
@@ -3758,6 +3777,11 @@ msgid ""
"\n"
"Do you wish to overwrite them?"
msgstr ""
+"De volgende bestanden of mappen conflicteren met elementen in '%s':\n"
+"\n"
+"%s\n"
+"\n"
+"Wil je deze overschrijven?"
#: editor/filesystem_dock.cpp
msgid "Renaming file:"
@@ -3950,19 +3974,16 @@ msgid "Searching..."
msgstr "Aan het zoeken..."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d match in %d file."
-msgstr "%d overeenkomst(en) gevonden."
+msgstr "%d overeenkomst in %d bestand."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d matches in %d file."
-msgstr "%d overeenkomst(en) gevonden."
+msgstr "%d overeenkomsten in %d bestand."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d matches in %d files."
-msgstr "%d overeenkomst(en) gevonden."
+msgstr "%d overeenkomsten in %d bestanden."
#: editor/groups_editor.cpp
msgid "Add to Group"
@@ -5242,9 +5263,8 @@ msgid "Bake Lightmaps"
msgstr "Bak Lichtmappen"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Selecteer sjabloonbestand"
+msgstr "Selecteer lightmap bake-bestand"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5313,7 +5333,7 @@ msgstr "Maak nieuwe horizontale en verticale gidsen"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Set CanvasItem \"%s\" Pivot Offset to (%d, %d)"
-msgstr ""
+msgstr "Draaipuntverschuiving van het CanvasItem „%s“ op (%d, %d) zetten"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotate %d CanvasItems"
@@ -5336,24 +5356,20 @@ msgid "Resize Control \"%s\" to (%d, %d)"
msgstr "Control \"%s\" vergrootten tot (%d, %d)"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Scale %d CanvasItems"
-msgstr "Schaal CanvasItem"
+msgstr "Schaal %d CanvasItems"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Scale CanvasItem \"%s\" to (%s, %s)"
-msgstr "Schaal CanvasItem"
+msgstr "Schaal CanvasItem \"%s\" naar (%s, %s)"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Move %d CanvasItems"
-msgstr "Verplaats CanvasItem"
+msgstr "Verplaats %d CanvasItems"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Move CanvasItem \"%s\" to (%d, %d)"
-msgstr "Verplaats CanvasItem"
+msgstr "CanvasItem \"%s\" naar (%d, %d) verplaatsen"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
@@ -6347,9 +6363,8 @@ msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Kan punt alleen plaatsen in een PartikelsMateriaal proces materiaal"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Zet om in CPUParticles"
+msgstr "Omzetten naar CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -6640,9 +6655,8 @@ msgid "Move Points"
msgstr "Beweeg Punten"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Command: Rotate"
-msgstr "Sleep: Roteer"
+msgstr "Ctrl: Roteer"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Shift: Move All"
@@ -6700,14 +6714,12 @@ msgid "Radius:"
msgstr "Radius:"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Copy Polygon to UV"
-msgstr "Creëer Polygon & UV"
+msgstr "Kopieer Polygon naar UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
-#, fuzzy
msgid "Copy UV to Polygon"
-msgstr "Naar Polygon2D omzetten"
+msgstr "Kopieer UV naar Polygon2D"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Clear UV"
@@ -7062,16 +7074,6 @@ msgstr ""
"De volgende bestanden zijn nieuwer op de schijf.\n"
"Welke aktie moet worden genomen?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Herladen"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Heropslaan"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Debugger"
@@ -7389,6 +7391,11 @@ msgid "Yaw"
msgstr "Yaw"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Grootte: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Objecten Getekend"
@@ -7801,7 +7808,7 @@ msgstr "Polygon2D Voorbeeldweergave"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create CollisionPolygon2D"
-msgstr "Creëer CollisionPolygon2D"
+msgstr "CollisionPolygon2D aanmaken"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "CollisionPolygon2D Preview"
@@ -7843,11 +7850,11 @@ msgstr "Naar Polygon2D omzetten"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create collision polygon."
-msgstr "Ongeldige geometrie, kan geen collision polygoon creëren."
+msgstr "Ongeldige geometrie, kan geen botsingspolygoon aanmaken."
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Create CollisionPolygon2D Sibling"
-msgstr "Creëer CollisionPolygon2D Sibling"
+msgstr "CollisionPolygon2D aanmaken"
#: editor/plugins/sprite_editor_plugin.cpp
msgid "Invalid geometry, can't create light occluder."
@@ -8253,13 +8260,12 @@ msgid "Paint Tile"
msgstr "Teken Tegel"
#: editor/plugins/tile_map_editor_plugin.cpp
-#, fuzzy
msgid ""
"Shift+LMB: Line Draw\n"
"Shift+Command+LMB: Rectangle Paint"
msgstr ""
-"Shift+LMB: Lijn Tekenen\n"
-"Shift+Ctrl+LMB: Vierkant Tekenen"
+"Shift+LMB: Lijn tekenen\n"
+"Shift+Ctrl+LMB: Vierkant tekenen"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid ""
@@ -8414,23 +8420,20 @@ msgid "Create a new rectangle."
msgstr "Creëer nieuwe driehoek."
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "New Rectangle"
-msgstr "Teken Driehoek"
+msgstr "Nieuwe rechthoek"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create a new polygon."
msgstr "Nieuwe veelhoek aanmaken."
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "New Polygon"
-msgstr "Beweeg Polygon"
+msgstr "Nieuwe veelhoek"
#: editor/plugins/tile_set_editor_plugin.cpp
-#, fuzzy
msgid "Delete Selected Shape"
-msgstr "Geselecteerde Verwijderen"
+msgstr "Geselecteerde vormen verwijderen"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Keep polygon inside region Rect."
@@ -8557,7 +8560,7 @@ msgstr "Tegelbitmasker bewerken"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Collision Polygon"
-msgstr "Bewerk Collision Polygon"
+msgstr "Botsingspolygoon aanpassen"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Edit Occlusion Polygon"
@@ -8589,7 +8592,7 @@ msgstr "Verwijder Tile"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Collision Polygon"
-msgstr "Verwijder Collision Polygon"
+msgstr "Botsingsvorm verwijderen"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Occlusion Polygon"
@@ -8617,7 +8620,7 @@ msgstr "Maak concaaf"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create Collision Polygon"
-msgstr "Creëer Collision Polygon"
+msgstr "Botsingsvorm aanmaken"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create Occlusion Polygon"
@@ -8795,9 +8798,8 @@ msgid "Add Node to Visual Shader"
msgstr "VisualShader-knoop toevoegen"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "Node(s) Moved"
-msgstr "Knoop verplaatst"
+msgstr "Knoop/knopen verplaatst"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Duplicate Nodes"
@@ -8817,9 +8819,8 @@ msgid "Visual Shader Input Type Changed"
msgstr "Visuele Shader Invoertype Gewijzigd"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "UniformRef Name Changed"
-msgstr "Uniforme naam instellen"
+msgstr "UniformRef naam veranderd"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
@@ -9547,7 +9548,7 @@ msgstr ""
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "A reference to an existing uniform."
-msgstr ""
+msgstr "Een verwijzing naar een bestaande uniform."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "(Fragment/Light mode only) Scalar derivative function."
@@ -9914,7 +9915,7 @@ msgstr "OpenGL ES 3.0"
#: editor/project_manager.cpp
msgid "Not supported by your GPU drivers."
-msgstr ""
+msgstr "Niet ondersteund door de GPU drivers op dit systeem."
#: editor/project_manager.cpp
msgid ""
@@ -10093,6 +10094,11 @@ msgid "Projects"
msgstr "Projecten"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Mirrors ophalen, even wachten a.u.b..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Laatst bewerkt"
@@ -10130,7 +10136,7 @@ msgid ""
"Would you like to explore official example projects in the Asset Library?"
msgstr ""
"U heeft momenteel geen projecten.\n"
-"Wilt u de officiële voorbeeldprojecten verkennen in de Asset Library?"
+"Wilt u officiële voorbeeldprojecten verkennen in de Materiaalbibliotheek?"
#: editor/project_manager.cpp
msgid ""
@@ -10524,19 +10530,16 @@ msgid "Batch Rename"
msgstr "Bulk hernoemen"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Replace:"
-msgstr "Vervangen: "
+msgstr "Vervangen:"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Prefix:"
-msgstr "Voorvoegsel"
+msgstr "Voorvoegsel:"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Suffix:"
-msgstr "Achtervoegsel"
+msgstr "Achtervoegsel:"
#: editor/rename_dialog.cpp
msgid "Use Regular Expressions"
@@ -10583,11 +10586,10 @@ msgid "Per-level Counter"
msgstr "Per niveau teller"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "If set, the counter restarts for each group of child nodes."
msgstr ""
-"Indien ingesteld: herstart de teller voor iedere groep van onderliggende "
-"knopen"
+"Indien ingesteld, zal de teller voor iedere groep van onderliggende knopen "
+"opnieuw starten."
#: editor/rename_dialog.cpp
msgid "Initial value for the counter"
@@ -10646,9 +10648,8 @@ msgid "Reset"
msgstr "Resetten"
#: editor/rename_dialog.cpp
-#, fuzzy
msgid "Regular Expression Error:"
-msgstr "Fout in reguliere expressie"
+msgstr "Fout in reguliere expressie:"
#: editor/rename_dialog.cpp
msgid "At character %s"
@@ -11653,36 +11654,31 @@ msgstr "Voeg een MeshLibrary aan deze GridMap toe om meshes te gebruiken."
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Begin lichtberekening"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Datastructuren worden voorbereid"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Genereer AABB"
+msgstr "Genereer buffers"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Richtingen"
+msgstr "Directe verlichting"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Rechts Inspringen"
+msgstr "Indirecte verlichting"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
-msgstr "Post-Process"
+msgstr "Nabewerking"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Plotten Light:"
+msgstr "Lightmaps plotten"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12202,7 +12198,7 @@ msgstr "Selecteer apparaat uit de lijst"
#: platform/android/export/export.cpp
msgid "Unable to find the 'apksigner' tool."
-msgstr ""
+msgstr "Het hulpmiddel 'apksigner' kon niet gevonden worden."
#: platform/android/export/export.cpp
msgid ""
@@ -12221,18 +12217,17 @@ msgid "Release keystore incorrectly configured in the export preset."
msgstr "Release-Keystore is verkeerd ingesteld in de exportinstelingen."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
-msgstr "Ongeldig Android SDK pad voor custom build in Editor Settings."
+msgstr ""
+"Een geldig Android SDK-pad moet in de Editorinstellingen ingesteld zijn."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr "Ongeldig Android SDK pad voor custom build in Editor Settings."
+msgstr "Ongeldig Android SDK-pad in Editorinstellingen."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
-msgstr ""
+msgstr "'platform-tools' map ontbreekt!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
@@ -12491,10 +12486,10 @@ msgid ""
"Consider adding a CollisionShape2D or CollisionPolygon2D as a child to "
"define its shape."
msgstr ""
-"Deze knoop heeft geen vorm (Shape), dus kan het niet met andere objecten "
-"botsen of interactie hebben.\n"
-"Overweeg om een CollisionShape2D of CollisionPolygon2D als kind toe te "
-"voegen om de vorm ervan vast te leggen."
+"Deze knoop heeft geen botsingsvorm als onderliggende knoop en kan dus niet "
+"met andere objecten botsen of interageren.\n"
+"Plaats hieronder een knoop als CollisionShape2D of CollisionPolygon2D om "
+"deze vorm vast te leggen."
#: scene/2d/collision_polygon_2d.cpp
msgid ""
@@ -12502,13 +12497,14 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionPolygon2D dient enkel om een botsingsvorm te koppelen aan een knoop "
-"afgeleid van CollisionObject2D. Plaats hem onder een Area2D-, StaticBody2D-, "
-"RigidBody2D- of KinematicBody2D-knoop."
+"Een knooppunt van het type CollisionPolygon2D kan alleen een botsingsvorm "
+"keveren aan knopen die zijn afgeleid van CollisionObject2D. Plaats het dus "
+"alleen onder een knoop als Area2D, StaticBody2D, RigidBody2D of "
+"KinematicBody2D."
#: scene/2d/collision_polygon_2d.cpp
msgid "An empty CollisionPolygon2D has no effect on collision."
-msgstr "Een lege CollisionPolygon2D heeft geen effect op botsingen."
+msgstr "Lege CollisionPolygon2D hebben geen botsingsfunctie."
#: scene/2d/collision_shape_2d.cpp
msgid ""
@@ -12516,15 +12512,16 @@ msgid ""
"CollisionObject2D derived node. Please only use it as a child of Area2D, "
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
-"CollisionShape2D dient enkel om een botsingsvorm te koppelen aan een knoop "
-"afgeleid van CollisionObject2D. Plaats hem onder een Area2D-, StaticBody2D-, "
-"RigidBody2D- of KinematicBody2D-knoop."
+"Een knooppunt van het type CollisionShape2D kan alleen een botsingsvorm "
+"keveren aan knopen die zijn afgeleid van CollisionObject2D. Plaats het dus "
+"alleen onder een knoop als Area2D, StaticBody2D, RigidBody2D of "
+"KinematicBody2D."
#: scene/2d/collision_shape_2d.cpp
msgid ""
"A shape must be provided for CollisionShape2D to function. Please create a "
"shape resource for it!"
-msgstr "Een CollisionShape2D heeft een vorm nodig in de Shape-eigenschap!"
+msgstr "Een CollisionShape2D heeft een vorm nodig."
#: scene/2d/collision_shape_2d.cpp
msgid ""
@@ -12640,9 +12637,9 @@ msgid ""
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
-"Grootteveranderingen van een RigidBody2D (in Character- of Rigidmodus) zal "
-"overschreven worden door de physics engine als het spel start.\n"
-"Verander in plaats daarvan de grootte van CollisionShapes in de kinderen."
+"De grootte van een RigidBody2D (in Character- of Rigidmodus) wordt "
+"overschreven wanneer het spel start.\n"
+"Verander in plaats daarvan de grootte van de onderliggende botsingsvormen."
#: scene/2d/remote_transform_2d.cpp
msgid "Path property must point to a valid Node2D node to work."
@@ -12671,10 +12668,9 @@ msgid ""
"to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, "
"KinematicBody2D, etc. to give them a shape."
msgstr ""
-"TileMap met de optie \"Use Parent\" aan heeft een CollisionShape2D-ouder "
-"nodig om vormen aan te geven. De TileMap hoort een kind van een Area2D, "
-"StaticBody2D, RigidBody2D, KinematicBody2D enz. knoop te zijn om ze een vorm "
-"te geven."
+"Een TileMap met de optie \"Use Parent\" ingeschakeld moet knoop afgeleid van "
+"CollisionObject2D (Area2D, StaticBody2D, RigidBody2D of KinematicBody2D) als "
+"ouder hebben."
#: scene/2d/visibility_notifier_2d.cpp
msgid ""
@@ -12751,10 +12747,10 @@ msgid ""
"Consider adding a CollisionShape or CollisionPolygon as a child to define "
"its shape."
msgstr ""
-"Deze knoop heeft geen vorm (Shape), dus het kan niet met andere objecten "
-"botsen of interactie hebben.\n"
-"Overweeg om een CollisionShape of CollisionPolygon als kind toe te voegen om "
-"de vorm ervan vast te leggen."
+"Deze knoop heeft geen botsingsvorm als onderliggende knoop en kan dus niet "
+"met andere objecten botsen of interageren.\n"
+"Plaats hieronder een knoop als CollisionShape of CollisionPolygon om deze "
+"vorm vast te leggen."
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -12762,13 +12758,13 @@ msgid ""
"CollisionObject derived node. Please only use it as a child of Area, "
"StaticBody, RigidBody, KinematicBody, etc. to give them a shape."
msgstr ""
-"CollisionPolygon dient enkel om een botsingsvorm te koppelen aan een knoop "
-"afgeleid van CollisionObject. Plaats hem onder een Area-, StaticBody-, "
-"RigidBody- of KinematicBody-knoop."
+"Een knooppunt van het type CollisionPolygon kan alleen een botsingsvorm "
+"keveren aan knopen die zijn afgeleid van CollisionObject. Plaats het dus "
+"alleen onder een knoop als Area, StaticBody, RigidBody of KinematicBody."
#: scene/3d/collision_polygon.cpp
msgid "An empty CollisionPolygon has no effect on collision."
-msgstr "Een lege CollisionPolygon heeft geen effect op botsingen."
+msgstr "Lege CollisionPolygon hebben geen botsingsfunctie."
#: scene/3d/collision_shape.cpp
msgid ""
@@ -12776,17 +12772,15 @@ msgid ""
"derived node. Please only use it as a child of Area, StaticBody, RigidBody, "
"KinematicBody, etc. to give them a shape."
msgstr ""
-"CollisionShape dient enkel om een botsingsvorm te koppelen aan een knoop "
-"afgeleid van CollisionObject. Plaats hem onder een Area-, StaticBody-, "
-"RigidBody- of KinematicBody-knoop."
+"Een knooppunt van het type CollisionShape kan alleen een botsingsvorm "
+"keveren aan knopen die zijn afgeleid van CollisionObject2D. Plaats het dus "
+"alleen onder een knoop als Area, StaticBody, RigidBody of KinematicBody."
#: scene/3d/collision_shape.cpp
msgid ""
"A shape must be provided for CollisionShape to function. Please create a "
"shape resource for it."
-msgstr ""
-"Om CollisionShape te laten werken, hoort het een Shape te hebben. Maak "
-"hiervoor alstublieft een Shape bron aan."
+msgstr "Een CollisionShape heeft een vorm nodig."
#: scene/3d/collision_shape.cpp
msgid ""
@@ -12895,9 +12889,9 @@ msgid ""
"by the physics engine when running.\n"
"Change the size in children collision shapes instead."
msgstr ""
-"Grootteveranderingen van een RigidBody (in Character- of Rigidmodus) zal "
-"overschreven worden door de physics engine als het spel start.\n"
-"Verander in plaats daarvan de grootte van CollisionShapes in de kinderen."
+"De grootte van een RigidBody (in Character- of Rigidmodus) wordt "
+"overschreven wanneer het spel start.\n"
+"Verander in plaats daarvan de grootte van de onderliggende botsingsvormen."
#: scene/3d/physics_joint.cpp
msgid "Node A and Node B must be PhysicsBodies"
@@ -12937,9 +12931,8 @@ msgid ""
"running.\n"
"Change the size in children collision shapes instead."
msgstr ""
-"Grootteveranderingen van een SoftBody (in Character- of Rigidmodus) zal "
-"overschreven worden door de physics engine als het spel start.\n"
-"Verander de grootte van CollisionShapes in de kinderen."
+"De grootte van een SoftBody wordt overschreven wanneer het spel start.\n"
+"Verander in plaats daarvan de grootte van de onderliggende botsingsvormen."
#: scene/3d/sprite_3d.cpp
msgid ""
@@ -13084,9 +13077,8 @@ msgid "Must use a valid extension."
msgstr "Een geldige extensie moet gebruikt worden."
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Enable grid minimap."
-msgstr "Aan raster kleven"
+msgstr "Rasteroverzicht inschakelen."
#: scene/gui/popup.cpp
msgid ""
diff --git a/editor/translations/or.po b/editor/translations/or.po
index c1bc32d40f..a95df2885d 100644
--- a/editor/translations/or.po
+++ b/editor/translations/or.po
@@ -2980,6 +2980,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6732,16 +6748,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7056,6 +7062,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9576,6 +9586,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index 8de826e897..26ff92e60e 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -45,12 +45,14 @@
# Piotr Grodzki <ziemniakglados@gmail.com>, 2020.
# Dzejkop <jakubtrad@gmail.com>, 2020.
# Mateusz Grzonka <alpinus4@gmail.com>, 2020.
+# gnu-ewm <gnu.ewm@protonmail.com>, 2021.
+# vrid <patryksoon@live.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-01-12 13:32+0000\n"
-"Last-Translator: Tomek <kobewi4e@gmail.com>\n"
+"PO-Revision-Date: 2021-02-15 10:51+0000\n"
+"Last-Translator: vrid <patryksoon@live.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/"
"godot/pl/>\n"
"Language: pl\n"
@@ -59,7 +61,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -903,7 +905,7 @@ msgstr "Sygnał:"
#: editor/connections_dialog.cpp
msgid "Connect '%s' to '%s'"
-msgstr "Połącz \"%s\" z \"%s\""
+msgstr "Połącz '%s' z '%s'"
#: editor/connections_dialog.cpp
msgid "Disconnect '%s' from '%s'"
@@ -2416,7 +2418,7 @@ msgstr "Nie ma zdefiniowanej sceny do uruchomienia."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Zapisz scenÄ™ przed uruchomieniem..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3163,6 +3165,25 @@ msgid "Open & Run a Script"
msgstr "Otwórz i Uruchom Skrypt"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Następujące pliki są nowsze na dysku.\n"
+"Jakie działania powinny zostać podjęte?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Przeładuj"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Zapisz ponownie"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Nowa dziedziczÄ…ca scena"
@@ -5180,14 +5201,12 @@ msgid "Assets ZIP File"
msgstr "Plik ZIP assetów"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
-"Nie można określić ścieżki zapisu dla lightmapy obrazu.\n"
-"Zapisz scenę (obrazy będą zapisane w tym samym katalogu), lub przepisz "
-"ścieżkę zapisu z właściwości BakedLightmap."
+"Nie można określić ścieżki zapisu dla obrazów mapy światła.\n"
+"Zapisz scenę i spróbuj ponownie."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5206,26 +5225,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Nie udało się określić rozmiaru mapy światła. Maksymalny rozmiar jest za "
+"mały?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Jakaś siatka jest nieprawidłowa. Upewnij się, że wartości kanału UV2 "
+"mieszczÄ… siÄ™ w kwadratowym obszarze [0.0, 1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Godot został zbudowany bez wsparcia ray tracingu, mapy światła nie mogą być "
+"wypalone."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Stwórz Lightmaps"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Wybierz plik szablonu"
+msgstr "Wybierz plik wypalenia mapy światła:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6322,9 +6346,8 @@ msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Punkt można wstawić tylko w materiał przetwarzania ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Przekonwertuj na czÄ…steczki CPU"
+msgstr "Przekonwertuj na CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -7029,16 +7052,6 @@ msgstr ""
"Następujące pliki są nowsze na dysku.\n"
"Jakie działania powinny zostać podjęte?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Przeładuj"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Zapisz ponownie"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Debugger"
@@ -7358,6 +7371,10 @@ msgid "Yaw"
msgstr "Odchylenie"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "Rozmiar"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Narysowane obiekty"
@@ -10043,6 +10060,11 @@ msgid "Projects"
msgstr "Projekty"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Pobieranie informacji o serwerach lustrzanych, proszę czekać..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Data modyfikacji"
@@ -10151,15 +10173,15 @@ msgstr "Indeks przycisku myszy:"
#: editor/project_settings_editor.cpp
msgid "Left Button"
-msgstr "Lewy guzik"
+msgstr "Lewy przycisk"
#: editor/project_settings_editor.cpp
msgid "Right Button"
-msgstr "Prawy guzik"
+msgstr "Prawy przycisk"
#: editor/project_settings_editor.cpp
msgid "Middle Button"
-msgstr "Åšrodkowy guzik"
+msgstr "Åšrodkowy przycisk"
#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
@@ -11597,36 +11619,31 @@ msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Zacznij wypalanie"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Przygotowywanie struktur danych"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Generuj AABB"
+msgstr "Generuj bufory"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Kierunki"
+msgstr "Oświetlenie bezpośrednie"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Wcięcie w prawo"
+msgstr "Oświetlenie pośrednie"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
msgstr "Przetwarzanie końcowe"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Kreślenie świateł:"
+msgstr "Kreślenie map światła"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12139,9 +12156,8 @@ msgid "Select device from the list"
msgstr "Wybierz urzÄ…dzenie z listy"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Unable to find the 'apksigner' tool."
-msgstr "Nie udało się znaleźć narzędzia zipalign."
+msgstr "Nie udało się znaleźć narzędzia \"apksigner\"."
#: platform/android/export/export.cpp
msgid ""
@@ -12163,18 +12179,12 @@ msgstr ""
"Wydaniowy keystore jest niepoprawnie skonfigurowany w profilu eksportu."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
-msgstr ""
-"Niepoprawna ścieżka do SDK Androida dla własnego builda w Ustawieniach "
-"Edytora."
+msgstr "Wymagana jest poprawna ścieżka SDK Androida w Ustawieniach Edytora."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
-"Niepoprawna ścieżka do SDK Androida dla własnego builda w Ustawieniach "
-"Edytora."
+msgstr "Niepoprawna ścieżka do SDK Androida w Ustawieniach Edytora."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12183,13 +12193,11 @@ msgstr "Folder \"platform-tools\" nie istnieje!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
+"Nie udało się znaleźć komendy adb z narzędzi platformowych SDK Androida."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
-msgstr ""
-"Niepoprawna ścieżka do SDK Androida dla własnego builda w Ustawieniach "
-"Edytora."
+msgstr "Sprawdź w folderze SDK Androida podanych w Ustawieniach Edytora."
#: platform/android/export/export.cpp
msgid "Missing 'build-tools' directory!"
@@ -12197,7 +12205,7 @@ msgstr "Brakuje folderu \"build-tools\"!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
-msgstr ""
+msgstr "Nie udało się znaleźć komendy apksigner z narzędzi SDK Androida."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12675,27 +12683,23 @@ msgstr "ARVROrigin wymaga węzła potomnego typu ARVRCamera."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Szukanie siatek i świateł"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "Parsowanie Geometrii..."
+msgstr "Przygotowywanie geometrii (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Wyświetlaj środowisko"
+msgstr "Przygotowywanie środowiska"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Generowanie Lightmapy"
+msgstr "Generowanie przechwycenia"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "Generowanie Lightmapy"
+msgstr "Zapisywanie map światła"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13102,6 +13106,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"Port samplera jest podłączony, ale nieużyty. Rozważ zmianę źródła na "
+"\"SamplerPort\"."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index 9f6933a077..2d2ecf41b6 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -3075,6 +3075,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6953,16 +6969,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7293,6 +7299,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9911,6 +9921,10 @@ msgid "Projects"
msgstr "Rename Function"
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/pt.po b/editor/translations/pt.po
index 32686314bc..49f2ff19c1 100644
--- a/editor/translations/pt.po
+++ b/editor/translations/pt.po
@@ -6,7 +6,7 @@
# Carlos Vieira <carlos.vieira@gmail.com>, 2017.
# João <joao@nogordio.com>, 2018.
# João Graça <jgraca95@gmail.com>, 2017.
-# João Lopes <linux-man@hotmail.com>, 2017-2018, 2019, 2020.
+# João Lopes <linux-man@hotmail.com>, 2017-2018, 2019, 2020, 2021.
# Miguel Gomes <miggas09@gmail.com>, 2017.
# Paulo Caldeira <paucal@gmail.com>, 2018.
# Pedro Gomes <pedrogomes1698@gmail.com>, 2017.
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-31 07:09+0000\n"
+"PO-Revision-Date: 2021-01-26 03:28+0000\n"
"Last-Translator: João Lopes <linux-man@hotmail.com>\n"
"Language-Team: Portuguese <https://hosted.weblate.org/projects/godot-engine/"
"godot/pt/>\n"
@@ -31,7 +31,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -566,7 +566,7 @@ msgstr "Copiar Pistas"
#: editor/animation_track_editor.cpp
msgid "Scale Selection"
-msgstr "Escalar Selecção"
+msgstr "Escalar Seleção"
#: editor/animation_track_editor.cpp
msgid "Scale From Cursor"
@@ -622,7 +622,7 @@ msgstr "Máximo de Erros Angulares:"
#: editor/animation_track_editor.cpp
msgid "Max Optimizable Angle:"
-msgstr "Angulo Máximo Otimizável:"
+msgstr "Ângulo Máximo Otimizável:"
#: editor/animation_track_editor.cpp
msgid "Optimize"
@@ -630,7 +630,7 @@ msgstr "Otimizar"
#: editor/animation_track_editor.cpp
msgid "Remove invalid keys"
-msgstr "Remover Chaves inválidas"
+msgstr "Remover chaves inválidas"
#: editor/animation_track_editor.cpp
msgid "Remove unresolved and empty tracks"
@@ -1132,7 +1132,7 @@ msgstr "Agradecimentos da Comunidade Godot!"
#: editor/editor_about.cpp
msgid "Godot Engine contributors"
-msgstr "Contribuidores da engine Godot"
+msgstr "Contribuidores do Godot Engine"
#: editor/editor_about.cpp
msgid "Project Founders"
@@ -2268,7 +2268,7 @@ msgstr "A guardar Cena"
#: editor/editor_node.cpp
msgid "Analyzing"
-msgstr "A analizar"
+msgstr "A analisar"
#: editor/editor_node.cpp
msgid "Creating Thumbnail"
@@ -2397,7 +2397,7 @@ msgstr "Não existe cena definida para execução."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Guardar cena antes de executar..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -2756,7 +2756,7 @@ msgstr "Converter Para..."
#: editor/editor_node.cpp
msgid "MeshLibrary..."
-msgstr "Bib. de Meshes..."
+msgstr "MeshLibrary..."
#: editor/editor_node.cpp
msgid "TileSet..."
@@ -2886,7 +2886,7 @@ msgid ""
"When this option is enabled, navigation meshes and polygons will be visible "
"in the running project."
msgstr ""
-"Com esta opção ativa, Meshes e Polígonos de navegação serão visíveis no "
+"Com esta opção ativa, malhas de navegação e polígonos serão visíveis no "
"projeto em execução."
#: editor/editor_node.cpp
@@ -2907,7 +2907,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Synchronize Script Changes"
-msgstr "Sicronizar alterações de script"
+msgstr "Sincronizar Alterações de Script"
#: editor/editor_node.cpp
msgid ""
@@ -3147,6 +3147,25 @@ msgid "Open & Run a Script"
msgstr "Abrir & Executar um Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Os seguintes Ficheiros são mais recentes no disco.\n"
+"Que ação deve ser tomada?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Recarregar"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Guardar novamente"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Novo Herdado"
@@ -3192,7 +3211,7 @@ msgstr "Sub-recurso não encontrado."
#: editor/editor_plugin.cpp
msgid "Creating Mesh Previews"
-msgstr "A criar pré-visualizações de Malha"
+msgstr "A criar Pré-visualizações de Malha"
#: editor/editor_plugin.cpp
msgid "Thumbnail..."
@@ -3427,7 +3446,7 @@ msgstr "Não consegui executar o script:"
#: editor/editor_run_script.cpp
msgid "Did you forget the '_run' method?"
-msgstr "Esqueceu-se do médodo '_run'?"
+msgstr "Esqueceu-se do método '_run'?"
#: editor/editor_spin_slider.cpp
msgid "Hold Ctrl to round to integers. Hold Shift for more precise changes."
@@ -3721,7 +3740,7 @@ msgid ""
"\n"
"Do you wish to overwrite them?"
msgstr ""
-"Os seguintes ficheiros ou pastas estão em conflito com os items na "
+"Os seguintes ficheiros ou pastas estão em conflito com os itens na "
"localização '%s':\n"
"\n"
"%s\n"
@@ -4319,7 +4338,7 @@ msgid ""
"Activate to enable playback, check node warnings if activation fails."
msgstr ""
"AnimationTree está inativa.\n"
-"Active-a para permitir a reprodução, verifique avisos do nó se a ativação "
+"Ative-a para permitir a reprodução, verifique avisos do nó se a ativação "
"falhar."
#: editor/plugins/animation_blend_space_1d_editor.cpp
@@ -5019,7 +5038,7 @@ msgstr "Tempo expirado."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
-msgstr "Mau hash na transferência, assume-se que o Ficheiro foi manipulado."
+msgstr "Mau hash na transferência, assume-se que o ficheiro foi manipulado."
#: editor/plugins/asset_library_editor_plugin.cpp
msgid "Expected:"
@@ -5163,21 +5182,19 @@ msgid "Assets ZIP File"
msgstr "Ficheiro ZIP de Ativos"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
"Não consigo determinar um caminho para guardar imagens lightmap.\n"
-"Guarde a sua cena (para as imagens serem guardadas na mesma diretoria), ou "
-"escolha um caminho nas propriedades BakedLightmap."
+"Guarde a sua cena e tente novamente."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"No meshes to bake. Make sure they contain an UV2 channel and that the 'Bake "
"Light' flag is on."
msgstr ""
-"Não há Meshes para consolidar. Assegure-se que contêm um canal UV2 e que a "
+"Não há malhas para consolidar. Assegure-se que contêm um canal UV2 e que a "
"referência 'Bake Light' flag está on."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
@@ -5187,26 +5204,31 @@ msgstr "Falha ao criar imagens lightmap, assegure-se que o caminho é gravável.
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Falha na determinação do tamanho do lightmap. Tamanho máximo do lightmap "
+"demasiado pequeno?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Alguma malha é inválida. Certifique-se que os valores do canal UV2 estão "
+"contidos na região quadrada [0.0,1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Editor Godot foi compilado sem suporte para ray tracing, lightmaps não podem "
+"ser consolidados."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Consolidar Lightmaps"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Selecionar Ficheiro de Modelo"
+msgstr "Selecionar ficheiro de consolidação de lightmap:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5319,7 +5341,7 @@ msgid ""
"their parent."
msgstr ""
"As âncoras e margens de filhos de um contentores são sobrescritas pelo seu "
-"pai."
+"progenitor."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Presets for the anchors and margins values of a Control node."
@@ -5419,8 +5441,8 @@ msgid ""
"Game Camera Override\n"
"Overrides game camera with editor viewport camera."
msgstr ""
-"Sobreposição de Câmara de Jogo\n"
-"Sobrepõe câmara de jogo com câmara viewport do editor."
+"Sobreposição de Câmera de Jogo\n"
+"Sobrepõe câmara de jogo com câmera viewport do editor."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5428,7 +5450,7 @@ msgid ""
"Game Camera Override\n"
"No game instance running."
msgstr ""
-"Sobreposição de Câmara de Jogo\n"
+"Sobreposição de Câmera de Jogo\n"
"Nenhuma instância de jogo em execução."
#: editor/plugins/canvas_item_editor_plugin.cpp
@@ -5481,7 +5503,7 @@ msgid ""
"by their parent."
msgstr ""
"Atenção: as crianças de um contentor obtêm a sua posição e tamanho "
-"determinados apenas pelos seus pais."
+"determinados apenas pelos seus progenitores."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/texture_region_editor_plugin.cpp
@@ -5594,7 +5616,7 @@ msgstr "Configurar Ajuste..."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to Parent"
-msgstr "Ajustar ao Parente"
+msgstr "Ajustar ao Progenitor"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap to Node Anchor"
@@ -5982,7 +6004,7 @@ msgstr "Não consegui criar uma forma de colisão Trimesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
-msgstr "Criar corpo estático Trimesh"
+msgstr "Criar Corpo Estático Trimesh"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "This doesn't work on scene root!"
@@ -6027,7 +6049,7 @@ msgstr "Malha contida não é do tipo ArrayMesh."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "UV Unwrap failed, mesh may not be manifold?"
-msgstr "Falhou o desempacotamento UV, a Malha pode não ser múltipla?"
+msgstr "Falhou o desempacotamento UV, a malha pode não ser múltipla?"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "No mesh to debug."
@@ -6047,7 +6069,7 @@ msgstr "A Malha não tem superfície para criar contornos!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh primitive type is not PRIMITIVE_TRIANGLES!"
-msgstr "Tipo primitivo de Malha não é PRIMITIVE_TRIANGLES!"
+msgstr "Tipo primitivo de malha não é PRIMITIVE_TRIANGLES!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Could not create outline!"
@@ -6063,7 +6085,7 @@ msgstr "Malha"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Body"
-msgstr "Criar corpo estático Trimesh"
+msgstr "Criar Corpo Estático Trimesh"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid ""
@@ -6149,7 +6171,7 @@ msgstr "Tamanho do contorno:"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "UV Channel Debug"
-msgstr "Debug Canal UV"
+msgstr "Depuração Canal UV"
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Remove item %d?"
@@ -6165,7 +6187,7 @@ msgstr ""
#: editor/plugins/mesh_library_editor_plugin.cpp
msgid "Mesh Library"
-msgstr "Bib. de Meshes"
+msgstr "Bib. de Malhas"
#: editor/plugins/mesh_library_editor_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
@@ -6186,11 +6208,11 @@ msgstr "Atualizar a partir da Cena"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and no MultiMesh set in node)."
-msgstr "Fonte da Malha não especificada (nem MultiMesh no nó)."
+msgstr "Fonte da malha não especificada (nem MultiMesh definido no nó)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No mesh source specified (and MultiMesh contains no Mesh)."
-msgstr "Fonte da Malha não especificada (e MultiMesh não contêm Malha)."
+msgstr "Fonte da malha não especificada (e MultiMesh não contêm Malha)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Mesh source is invalid (invalid path)."
@@ -6222,7 +6244,7 @@ msgstr "A fonte de superfície é inválida (sem faces)."
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Source Mesh:"
-msgstr "Selecione uma fonte Malha:"
+msgstr "Selecione uma Fonte Malha:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Select a Target Surface:"
@@ -6299,9 +6321,8 @@ msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Só pode definir um Ponto num Material ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Converter em CPUParticles"
+msgstr "Converter em CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -6521,7 +6542,7 @@ msgstr "Criar mapa UV"
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 poder ser editado no viewport."
+msgstr "Polígono 2D tem vértices internos, não pode ser editado no viewport."
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Polygon & UV"
@@ -6561,7 +6582,7 @@ msgstr "Pintar pesos dos ossos"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Open Polygon 2D UV editor."
-msgstr "Abrir editor UV de Polygon2D."
+msgstr "Abrir editor UV de Polígono 2D."
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon 2D UV Editor"
@@ -6813,7 +6834,7 @@ msgstr "Não consigo obter o script para executar."
#: editor/plugins/script_editor_plugin.cpp
msgid "Script failed reloading, check console for errors."
-msgstr "Falhou a re-leitura do script, analise os erros na consola."
+msgstr "Falhou a releitura do script, analise os erros na consola."
#: editor/plugins/script_editor_plugin.cpp
msgid "Script is not in tool mode, will not be able to run."
@@ -7006,16 +7027,6 @@ msgstr ""
"Os seguintes Ficheiros são mais recentes no disco.\n"
"Que ação deve ser tomada?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Recarregar"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Reguardar"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Depurador"
@@ -7030,7 +7041,7 @@ msgstr "Limpar Scripts Recentes"
#: editor/plugins/script_text_editor.cpp
msgid "Connections to method:"
-msgstr "Conecções ao método:"
+msgstr "Conexões ao método:"
#: editor/plugins/script_text_editor.cpp editor/script_editor_debugger.cpp
msgid "Source"
@@ -7332,6 +7343,11 @@ msgid "Yaw"
msgstr "Direção"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Tamanho: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Objetos desenhados"
@@ -7409,7 +7425,7 @@ msgstr "Alinhar Rotação com Vista"
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
-msgstr "Sem parente para criar instância de filho."
+msgstr "Sem progenitor para criar instância de filho."
#: editor/plugins/spatial_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "This operation requires a single selected node."
@@ -7429,7 +7445,7 @@ msgstr "Vista normal"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Wireframe"
-msgstr "Vista wireframe"
+msgstr "Vista Wireframe"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Overdraw"
@@ -7981,7 +7997,7 @@ msgstr "TextureRegion"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add All Items"
-msgstr "Adicionar todos os itens"
+msgstr "Adicionar Todos os Itens"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add All"
@@ -7989,7 +8005,7 @@ msgstr "Adicionar tudo"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove All Items"
-msgstr "Remover todos os itens"
+msgstr "Remover Todos os Itens"
#: editor/plugins/theme_editor_plugin.cpp editor/project_manager.cpp
msgid "Remove All"
@@ -8005,11 +8021,11 @@ msgstr "Menu edição de tema."
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
-msgstr "Adicionar itens de classe"
+msgstr "Adicionar Itens de Classe"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Remove Class Items"
-msgstr "Remover itens de classe"
+msgstr "Remover Itens de Classe"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Create Empty Template"
@@ -8423,7 +8439,7 @@ msgstr ""
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Delete selected Rect."
-msgstr "Eliminar Rect seleccionado."
+msgstr "Eliminar Rect selecionado."
#: editor/plugins/tile_set_editor_plugin.cpp
msgid ""
@@ -9149,8 +9165,8 @@ msgstr ""
"Função SmoothStep( escalar(limite0), escalar(limite1), escalar(x) ).\n"
"\n"
"Devolve 0.0 se 'x' for menor que 'limite0' e 1.0 se 'x' for maior que "
-"'limite1'. Caso contrário o valor devolvido é interpolado entre 0.0 and 1.0 "
-"a usar polinomiais Hermite."
+"'limite1'. Caso contrário o valor devolvido é interpolado entre 0.0 e 1.0 "
+"usando polinomiais Hermite."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9367,8 +9383,8 @@ msgstr ""
"Função SmoothStep( vetor(limite0), vetor(limite1), vetor(x) ).\n"
"\n"
"Devolve 0.0 se 'x' for menor que 'limite0' e 1.0 se 'x' for maior que "
-"'limite1'. Caso contrário o valor devolvido é interpolado entre 0.0 and 1.0 "
-"a usar polinomiais Hermite."
+"'limite1'. Caso contrário o valor devolvido é interpolado entre 0.0 e 1.0 "
+"usando polinomiais Hermite."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9381,8 +9397,8 @@ msgstr ""
"Função SmoothStep( escalar(limite0), escalar(limite1), vetor(x) ).\n"
"\n"
"Devolve 0.0 se 'x' for menor que 'limite0' e 1.0 se 'x' for maior que "
-"'limite1'. Caso contrário o valor devolvido é interpolado entre 0.0 and 1.0 "
-"a usar polinomiais Hermite."
+"'limite1'. Caso contrário o valor devolvido é interpolado entre 0.0 e 1.0 "
+"usando polinomiais Hermite."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -9449,7 +9465,7 @@ msgid ""
"direction of camera (pass associated inputs to it)."
msgstr ""
"Devolve queda baseada no produto escalar da normal à superfície e da direção "
-"da câmara (passa entradas associadas)."
+"da câmera (passa entradas associadas)."
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid ""
@@ -10011,6 +10027,11 @@ msgid "Projects"
msgstr "Projetos"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "A readquirir servidores, espere por favor..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Última modificação"
@@ -10471,7 +10492,7 @@ msgstr "Nome do nó"
#: editor/rename_dialog.cpp
msgid "Node's parent name, if available"
-msgstr "Nome do parente do nó, se disponível"
+msgstr "Nome do progenitor do nó, se disponível"
#: editor/rename_dialog.cpp
msgid "Node type"
@@ -10567,11 +10588,11 @@ msgstr "No carácter %s"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent Node"
-msgstr "Repôr Nó"
+msgstr "Reassociar Nó"
#: editor/reparent_dialog.cpp
msgid "Reparent Location (Select new Parent):"
-msgstr "Repôr localização (selecionar novo Parente):"
+msgstr "Reassociar Localização (Selecionar novo Progenitor):"
#: editor/reparent_dialog.cpp
msgid "Keep Global Transform"
@@ -10579,7 +10600,7 @@ msgstr "Manter transformação global"
#: editor/reparent_dialog.cpp editor/scene_tree_dock.cpp
msgid "Reparent"
-msgstr "Repôr"
+msgstr "Reassociar"
#: editor/run_settings_dialog.cpp
msgid "Run Mode:"
@@ -10603,7 +10624,7 @@ msgstr "Configurações de Execução da Cena"
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
-msgstr "Nenhum parente para instância das cenas."
+msgstr "Nenhum progenitor para instância das cenas."
#: editor/scene_tree_dock.cpp
msgid "Error loading scene from %s"
@@ -10639,11 +10660,11 @@ msgstr "Esta operação não pode ser feita na raiz da árvore."
#: editor/scene_tree_dock.cpp
msgid "Move Node In Parent"
-msgstr "Mover Nó no Parente"
+msgstr "Mover Nó no Progenitor"
#: editor/scene_tree_dock.cpp
msgid "Move Nodes In Parent"
-msgstr "Mover Nós no Parente"
+msgstr "Mover Nós no Progenitor"
#: editor/scene_tree_dock.cpp
msgid "Duplicate Node(s)"
@@ -10652,7 +10673,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 ""
-"Não consigo mudar nó em cenas herdadas, a ordem dos nós não pode mudar."
+"Não consigo reassociar nós 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."
@@ -10823,7 +10844,7 @@ msgstr "Mudar tipo"
#: editor/scene_tree_dock.cpp
msgid "Reparent to New Node"
-msgstr "Repôr o Novo Nó"
+msgstr "Reassociar a Novo Nó"
#: editor/scene_tree_dock.cpp
msgid "Make Scene Root"
@@ -11047,7 +11068,7 @@ msgstr "Nome de classe inválido."
#: editor/script_create_dialog.cpp
msgid "Invalid inherited parent name or path."
-msgstr "Nome ou caminho de parente herdado inválido."
+msgstr "Nome ou caminho herdado do progenitor inválido."
#: editor/script_create_dialog.cpp
msgid "Script path/name is valid."
@@ -11171,11 +11192,11 @@ msgstr "Empilhar Frames"
#: editor/script_editor_debugger.cpp
msgid "Profiler"
-msgstr "Profiler"
+msgstr "Analisador"
#: editor/script_editor_debugger.cpp
msgid "Network Profiler"
-msgstr "Traçador de Rede"
+msgstr "Analisador de Rede"
#: editor/script_editor_debugger.cpp
msgid "Monitor"
@@ -11279,11 +11300,11 @@ msgstr "Mudar ângulo de emissão de AudioStreamPlayer3D"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
-msgstr "Mudar FOV da câmara"
+msgstr "Mudar FOV da Câmera"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera Size"
-msgstr "Mudar tamanho da câmara"
+msgstr "Mudar tamanho da Câmera"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Notifier AABB"
@@ -11331,7 +11352,7 @@ msgstr "Mudar Raio do Cilindro"
#: modules/csg/csg_gizmos.cpp
msgid "Change Cylinder Height"
-msgstr "Mudar Altura do CIlindro"
+msgstr "Mudar Altura do Cilindro"
#: modules/csg/csg_gizmos.cpp
msgid "Change Torus Inner Radius"
@@ -11557,44 +11578,39 @@ msgstr "Distância de escolha:"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Filter meshes"
-msgstr "Meshes de filtro"
+msgstr "Filtrar malhas"
#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Give a MeshLibrary resource to this GridMap to use its meshes."
-msgstr "Dá um recurso MeshLibrary a este GridMap para usar os seus meshes."
+msgstr "Dê um recurso MeshLibrary a este GridMap para usar as suas malhas."
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Começar Consolidação"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "A preparar estruturas de dados"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Gerar AABB"
+msgstr "Gerar buffers"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Direções"
+msgstr "Iluminação direta"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Indentar à direita"
+msgstr "Iluminação indireta"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
msgstr "Pós-processamento"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "A traçar Luzes:"
+msgstr "A Traçar lightmaps"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -11610,7 +11626,7 @@ msgstr "Consolidar NavMesh"
#: modules/recast/navigation_mesh_editor_plugin.cpp
msgid "Clear the navigation mesh."
-msgstr "Limpar a Malha de navegação."
+msgstr "Limpar a malha de navegação."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Setting up Configuration..."
@@ -11634,7 +11650,7 @@ msgstr "A construir heightfield compacto..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Eroding walkable area..."
-msgstr "A corroer a Ãrea caminhável..."
+msgstr "A corroer a área caminhável..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Partitioning..."
@@ -11650,11 +11666,11 @@ msgstr "A criar polymesh..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Converting to native navigation mesh..."
-msgstr "A converter para Malha de navegação nativa..."
+msgstr "A converter para malha de navegação nativa..."
#: modules/recast/navigation_mesh_generator.cpp
msgid "Navigation Mesh Generator Setup:"
-msgstr "Configuração do gerador da Malha de navegação:"
+msgstr "Configuração do Gerador da Malha de Navegação:"
#: modules/recast/navigation_mesh_generator.cpp
msgid "Parsing Geometry..."
@@ -12110,9 +12126,8 @@ msgid "Select device from the list"
msgstr "Selecionar aparelho da lista"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Unable to find the 'apksigner' tool."
-msgstr "Incapaz de localizar a ferramenta zipalign."
+msgstr "Incapaz de localizar a ferramenta 'apksigner'."
#: platform/android/export/export.cpp
msgid ""
@@ -12125,7 +12140,7 @@ msgstr ""
#: platform/android/export/export.cpp
msgid "Debug keystore not configured in the Editor Settings nor in the preset."
msgstr ""
-"Depuração de keystore não configurada nas Configurações do Editor e nem na "
+"Keystore de depuração não configurada nas Configurações do Editor e nem na "
"predefinição."
#: platform/android/export/export.cpp
@@ -12134,18 +12149,13 @@ msgstr ""
"Lançamento de keystore configurado incorretamente na predefinição exportada."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-"Caminho inválido de Android SDK para compilação personalizada no Editor de "
-"Configurações."
+"É necessário um caminho válido para o Android SDK no Editor de Configurações."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
-"Caminho inválido de Android SDK para compilação personalizada no Editor de "
-"Configurações."
+msgstr "Caminho inválido para o Android SDK no Editor de Configurações."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12153,13 +12163,12 @@ msgstr "Diretoria 'platform-tools' em falta!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
-msgstr ""
+msgstr "Incapaz de encontrar o comando adb das ferramentas Android SDK."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-"Caminho inválido de Android SDK para compilação personalizada no Editor de "
+"Por favor confirme a pasta do Android SDK especificada no Editor de "
"Configurações."
#: platform/android/export/export.cpp
@@ -12168,7 +12177,7 @@ msgstr "Diretoria 'build-tools' em falta!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
-msgstr ""
+msgstr "Incapaz de encontrar o comando apksigner das ferramentas Android SDK."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12360,7 +12369,7 @@ msgstr "Cor de fundo inválida."
#: platform/uwp/export/export.cpp
msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "Inválidas dimensões da imagem do logotipo do Store (deve ser 50x50)."
+msgstr "Dimensões inválidas da imagem do logotipo do Store (deve ser 50x50)."
#: platform/uwp/export/export.cpp
msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
@@ -12481,7 +12490,7 @@ msgstr "Nó B tem de ser um PhysicsBody2D"
#: scene/2d/joints_2d.cpp
msgid "Joint is not connected to two PhysicsBody2Ds"
-msgstr "Junção não está conetada a dois PhysicsBody2Ds"
+msgstr "Junção não está conectada a dois PhysicsBody2Ds"
#: scene/2d/joints_2d.cpp
msgid "Node A and Node B must be different PhysicsBody2Ds"
@@ -12582,7 +12591,7 @@ msgstr "Esta corrente de Bone2D deve terminar num nó Skeleton2D."
#: scene/2d/skeleton_2d.cpp
msgid "A Bone2D only works with a Skeleton2D or another Bone2D as parent node."
-msgstr "Um Bone2D só funciona com um nó parente Skeleton2D ou Bone2D."
+msgstr "Um Bone2D só funciona com um nó progenitor Skeleton2D ou Bone2D."
#: scene/2d/skeleton_2d.cpp
msgid ""
@@ -12595,25 +12604,25 @@ msgid ""
"to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, "
"KinematicBody2D, etc. to give them a shape."
msgstr ""
-"TileMap com Usar Parente ativo precisa de um parente CollisionObject2D para "
-"lhe dar formas. Use-o como um filho de Area2D, StaticBody2D, RigidBody2D, "
-"KinematicBody2D, etc. para lhes dar uma forma."
+"TileMap com Usar Progenitor ativo precisa de um progenitor CollisionObject2D "
+"para lhe dar formas. Use-o como um filho de Area2D, StaticBody2D, "
+"RigidBody2D, KinematicBody2D, etc. para lhes dar uma forma."
#: scene/2d/visibility_notifier_2d.cpp
msgid ""
"VisibilityEnabler2D works best when used with the edited scene root directly "
"as parent."
msgstr ""
-"VisibilityEnabler2D funciona melhor quando usado diretamente como parente na "
-"cena raiz editada."
+"VisibilityEnabler2D funciona melhor quando usado diretamente como progenitor "
+"na cena raiz editada."
#: scene/3d/arvr_nodes.cpp
msgid "ARVRCamera must have an ARVROrigin node as its parent."
-msgstr "ARVRCamera precisa de um nó ARVROrigin como parente."
+msgstr "ARVRCamera precisa de um nó ARVROrigin como progenitor."
#: scene/3d/arvr_nodes.cpp
msgid "ARVRController must have an ARVROrigin node as its parent."
-msgstr "ARVRController precisa de um nó ARVROrigin como parente."
+msgstr "ARVRController precisa de um nó ARVROrigin como progenitor."
#: scene/3d/arvr_nodes.cpp
msgid ""
@@ -12625,7 +12634,7 @@ msgstr ""
#: scene/3d/arvr_nodes.cpp
msgid "ARVRAnchor must have an ARVROrigin node as its parent."
-msgstr "ARVRAnchor precisa de um nó ARVROrigin como parente."
+msgstr "ARVRAnchor precisa de um nó ARVROrigin como progenitor."
#: scene/3d/arvr_nodes.cpp
msgid ""
@@ -12641,27 +12650,23 @@ msgstr "ARVROrigin exige um nó filho ARVRCamera."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "A procurar malhas e luzes"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "A analisar geometria..."
+msgstr "A preparar geometria (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Ver ambiente"
+msgstr "A preparar ambiente"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "A gerar Lightmaps"
+msgstr "A gerar captura"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "A gerar Lightmaps"
+msgstr "A guardar lightmaps"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -12724,7 +12729,7 @@ msgstr "ConcavePolygonShape apenas suporta RigidBody no modo estático."
#: 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."
+msgstr "Nada é visível porque nenhuma malha foi atribuída."
#: scene/3d/cpu_particles.cpp
msgid ""
@@ -12736,7 +12741,7 @@ msgstr ""
#: scene/3d/gi_probe.cpp
msgid "Plotting Meshes"
-msgstr "A desenhar Meshes"
+msgstr "A Traçar Malhas"
#: scene/3d/gi_probe.cpp
msgid "Finishing Plot"
@@ -12753,7 +12758,7 @@ msgstr ""
#: scene/3d/interpolated_camera.cpp
msgid ""
"InterpolatedCamera has been deprecated and will be removed in Godot 4.0."
-msgstr "A InterpolatedCamerda foi deprecada e será removida no Godot 4.0."
+msgstr "InterpolatedCamerda foi descontinuada e será removida no Godot 4.0."
#: scene/3d/light.cpp
msgid "A SpotLight with an angle wider than 90 degrees cannot cast shadows."
@@ -12787,7 +12792,7 @@ msgstr ""
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."
+"Nada é visível porque não foram atribuídas malhas aos passos de desenho."
#: scene/3d/particles.cpp
msgid ""
@@ -12807,7 +12812,7 @@ msgid ""
"parent Path's Curve resource."
msgstr ""
"ROTATION_ORIENTED de PathFollow requer \"Up Vector\" ativado no recurso de "
-"Curva do Caminho do seu pai."
+"Curva do Caminho do seu progenitor."
#: scene/3d/physics_body.cpp
msgid ""
@@ -12833,7 +12838,7 @@ msgstr "Nó B tem de ser um PhysicsBody"
#: scene/3d/physics_joint.cpp
msgid "Joint is not connected to any PhysicsBodies"
-msgstr "Junção não está conetada a quaisquer PhysicsBodies"
+msgstr "Junção não está conectada a quaisquer PhysicsBodies"
#: scene/3d/physics_joint.cpp
msgid "Node A and Node B must be different PhysicsBodies"
@@ -12897,7 +12902,7 @@ 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) "
+"Este WorldEnvironment é ignorado. Pode adicionar uma Câmera (para cenas 3D) "
"ou definir o Modo Background deste ambiente como Canvas (para cenas 2D)."
#: scene/animation/animation_blend_tree.cpp
@@ -13064,6 +13069,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"A porta coletora está conectada mas não é usada. Considere mudar a origem "
+"para 'SamplerPort'."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index 838a4e2f29..025ae380fd 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -106,12 +106,18 @@
# ThiagoCTN <thiagocampostn@gmail.com>, 2020.
# Alec Santos <alecsantos96@gmail.com>, 2020.
# Augusto Milão <augusto.milao01@gmail.com>, 2021.
+# Gabriel Gavazzi Felix <mutcholoko32@gmail.com>, 2021.
+# Lucas Dantas <lucas.lucantas38@gmail.com>, 2021.
+# Carlos Bonifacio <carlosboni.sa@gmail.com>, 2021.
+# Lucas Castro <castroclucas@gmail.com>, 2021.
+# Ricardo Zamarrenho Carvalho Correa <ricardozcc17@gmail.com>, 2021.
+# Diego dos Reis Macedo <diego_dragon97@hotmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: 2016-05-30\n"
-"PO-Revision-Date: 2021-01-06 18:29+0000\n"
-"Last-Translator: Augusto Milão <augusto.milao01@gmail.com>\n"
+"PO-Revision-Date: 2021-02-15 10:51+0000\n"
+"Last-Translator: Carlos Bonifacio <carlosboni.sa@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_BR/>\n"
"Language: pt_BR\n"
@@ -119,7 +125,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -1856,7 +1862,7 @@ msgstr "Novo"
#: editor/editor_feature_profile.cpp editor/editor_node.cpp
#: editor/project_manager.cpp
msgid "Import"
-msgstr "Import"
+msgstr "Importar"
#: editor/editor_feature_profile.cpp editor/project_export.cpp
msgid "Export"
@@ -2482,7 +2488,7 @@ msgstr "Não há cena definida para rodar."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Salvar a cena antes de executar..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3237,6 +3243,25 @@ msgid "Open & Run a Script"
msgstr "Abrir e Rodar um Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Os seguintes arquivos são mais recentes no disco.\n"
+"Que ação deve ser tomada?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Recarregar"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Salve novamente"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Novo Herdado"
@@ -4010,19 +4035,16 @@ msgid "Searching..."
msgstr "Procurando..."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d match in %d file."
-msgstr "%d correspondências."
+msgstr "%d correspondência em %d arquivo."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d matches in %d file."
-msgstr "%d correspondências."
+msgstr "%d correspondências em %d arquivo."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d matches in %d files."
-msgstr "%d correspondências."
+msgstr "%d correspondências em %d arquivos."
#: editor/groups_editor.cpp
msgid "Add to Group"
@@ -5263,14 +5285,12 @@ msgid "Assets ZIP File"
msgstr "Arquivo ZIP de Assets"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
"Não foi possível determinar um caminho para salvar as imagens do lightmap.\n"
-"Salve sua cena (para que as imagens sejam salvas no mesmo diretório), ou "
-"escolha um caminho nas propriedades do BakedLightmap."
+"Salve sua cena e tente novamente."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5289,26 +5309,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Falha ao determinar o tamanho do lightmap. Tamanho máximo do lightmap é "
+"muito baixo?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Alguma malha é inválida. Certifique-se de que os valores do canal UV2 estão "
+"contidos na região quadrada [0.0,1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"O editor Godot foi construído sem suporte à ray tracing, os lightmaps não "
+"podem ser bakeados."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
-msgstr "Preparar Lightmaps"
+msgstr "Bake Lightmaps"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Selecionar o Arquivo de Modelo"
+msgstr "Selecione o arquivo de lightmap bake:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6404,9 +6429,8 @@ msgstr ""
"Só é permitido colocar um ponto em um material processador ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Converter para Particulas CPU"
+msgstr "Converter para CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -7113,16 +7137,6 @@ msgstr ""
"Os seguintes arquivos são mais recentes no disco.\n"
"Que ação deve ser tomada?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Recarregar"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Salve novamente"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Depurador"
@@ -7440,6 +7454,11 @@ msgid "Yaw"
msgstr "Guinada"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Tamanho: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Objetos Desenhados"
@@ -8858,9 +8877,8 @@ msgid "Visual Shader Input Type Changed"
msgstr "Tipo de Entrada de Shader Visual Alterado"
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "UniformRef Name Changed"
-msgstr "Definir Nome Uniforme"
+msgstr "UniformRef Name foi altearado"
#: editor/plugins/visual_shader_editor_plugin.cpp
msgid "Vertex"
@@ -9575,7 +9593,6 @@ msgstr ""
"uniformes e constantes."
#: editor/plugins/visual_shader_editor_plugin.cpp
-#, fuzzy
msgid "A reference to an existing uniform."
msgstr "Uma referência a um uniforme existente."
@@ -10125,6 +10142,11 @@ msgid "Projects"
msgstr "Projetos"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Reconectando, por favor aguarde."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Ultima Modificação"
@@ -11679,36 +11701,33 @@ msgstr "Atribua um recurso MeshLibrary a este GridMap para usar seus meshes."
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Iniciar pré-cálculo"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Preparando estruturas de dados"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Gerar AABB"
+msgstr "Gerar buffers"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Direções"
+msgstr "Direct lightning"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Recuar Direita"
+msgstr "Iluminação indireta"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
#, fuzzy
msgid "Post processing"
-msgstr "Pós-Processamento"
+msgstr "Pós-processamento"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Planejando Luzes:"
+msgstr "Traçando mapas de luz"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12227,7 +12246,7 @@ msgstr "Selecione um dispositivo da lista"
#: platform/android/export/export.cpp
msgid "Unable to find the 'apksigner' tool."
-msgstr ""
+msgstr "Não foi possível encontrar a ferramenta 'apksigner'."
#: platform/android/export/export.cpp
msgid ""
@@ -12250,18 +12269,12 @@ msgstr ""
"exportação."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
-msgstr ""
-"Caminho do Android SDK inválido para o build personalizado em Configurações "
-"do Editor."
+msgstr "Um caminho Android SDK é necessário nas Configurações do Editor."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
-"Caminho do Android SDK inválido para o build personalizado em Configurações "
-"do Editor."
+msgstr "Caminho do Android SDK está inválido para Configurações do Editor."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12270,22 +12283,23 @@ msgstr "Diretório 'ferramentas-da-plataforma' ausente!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
+"Não foi possível encontrar o comando adb nas ferramentas do Android SDK."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-"Caminho do Android SDK inválido para o build personalizado em Configurações "
+"Por favor, verifique o caminho do Android SDK especificado nas Configurações "
"do Editor."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Missing 'build-tools' directory!"
-msgstr "Diretório 'ferramentas-da-plataforma' ausente!"
+msgstr "Diretório 'ferramentas-da-plataforma' está faltando !"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
+"Não foi possível encontrar o comando apksigner nas ferramentas de build do "
+"Android SDK."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12755,7 +12769,7 @@ msgstr "ARVROrigin necessita um nó ARVRCamera como filho."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Encontrando malhas e luzes"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
@@ -12763,19 +12777,17 @@ msgid "Preparing geometry (%d/%d)"
msgstr "Analisando Geometria..."
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Visualizar Ambiente"
+msgstr "Preparando ambiente"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Generando Lightmaps"
+msgstr "Gerando captura"
#: scene/3d/baked_lightmap.cpp
#, fuzzy
msgid "Saving lightmaps"
-msgstr "Generando Lightmaps"
+msgstr "Salvando mapas de luz"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13121,9 +13133,8 @@ msgid "Must use a valid extension."
msgstr "Deve usar uma extensão válida."
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Enable grid minimap."
-msgstr "Ativar Snap"
+msgstr "Ativar minimapa de grade."
#: scene/gui/popup.cpp
msgid ""
@@ -13184,6 +13195,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"A porta sampler está conectada mas não está sendo usada. Considere alterar a "
+"fonte para 'SamplerPort'."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/ro.po b/editor/translations/ro.po
index 8cdaef5b59..6497621bc8 100644
--- a/editor/translations/ro.po
+++ b/editor/translations/ro.po
@@ -3148,6 +3148,23 @@ msgid "Open & Run a Script"
msgstr "Deschide și Execută un Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr "Următoarele file au eșuat extragerea din pachet:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Derivare Nouă"
@@ -7083,16 +7100,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7427,6 +7434,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -10065,6 +10076,11 @@ msgid "Projects"
msgstr "Proiect"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Se recuperează oglinzile, te rog așteaptă..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index 6482a315a9..e079c49e3f 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -91,12 +91,13 @@
# Roman Tolkachyov <roman@tolkachyov.name>, 2020.
# Igor Grachev <igorecha.9999@gmail.com>, 2020.
# Dmytro Meleshko <dmytro.meleshko@gmail.com>, 2021.
+# narrnika <narr13niki@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-01-08 19:32+0000\n"
-"Last-Translator: Danil Alexeev <danil@alexeev.xyz>\n"
+"PO-Revision-Date: 2021-02-05 23:44+0000\n"
+"Last-Translator: narrnika <narr13niki@gmail.com>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/"
"godot/ru/>\n"
"Language: ru\n"
@@ -105,7 +106,7 @@ msgstr ""
"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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2468,7 +2469,7 @@ msgstr "Ðет открытой Ñцены Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Сохранение Ñцены перед запуÑком..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3219,6 +3220,25 @@ msgid "Open & Run a Script"
msgstr "Открыть и запуÑтить Ñкрипт"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Следующие файлы новее на диÑке.\n"
+"Какие меры должны быть принÑты?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Перезагрузить"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "ПереÑохранить"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "ÐÐ¾Ð²Ð°Ñ ÑƒÐ½Ð°ÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð½Ð½Ð°Ñ Ñцена"
@@ -5232,14 +5252,12 @@ msgid "Assets ZIP File"
msgstr "ZIP файл аÑÑетов"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
-"Ðе удаетÑÑ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ð¸Ñ‚ÑŒ путь Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ lightmap.\n"
-"Сохраните ваши Ñцены (чтобы Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð±Ñ‹Ð»Ð¸ Ñохранены в том же разделе), "
-"или выберите путь ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² ÑвойÑтвах BakedLightmap."
+"Ðе удалоÑÑŒ определить путь Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ð¹ карты оÑвещениÑ.\n"
+"Сохраните Ñцену и попробуйте ещё раз."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5257,26 +5275,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Ðе удалоÑÑŒ определить размер карты оÑвещениÑ. МакÑимальный размер карты "
+"оÑÐ²ÐµÑ‰ÐµÐ½Ð¸Ñ Ñлишком мал?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"ÐÐµÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð¿Ð¾Ð»Ð¸Ñетка некорректна. УбедитеÑÑŒ, что Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ ÐºÐ°Ð½Ð°Ð»Ð° UV2 "
+"находÑÑ‚ÑÑ Ð² квадратной облаÑти [0.0,1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Редактор Godot был Ñобран без поддержки траÑÑировки лучей, карты оÑÐ²ÐµÑ‰ÐµÐ½Ð¸Ñ "
+"невозможно запечь."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Запекать карты оÑвещениÑ"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Выбрать файл шаблона"
+msgstr "Выберите файл Ð·Ð°Ð¿ÐµÐºÐ°Ð½Ð¸Ñ ÐºÐ°Ñ€Ñ‚Ñ‹ оÑвещениÑ:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -5724,7 +5747,7 @@ msgstr "ОчиÑтить пользовательÑкие коÑти"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View"
-msgstr "Обзор"
+msgstr "Вид"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Always Show Grid"
@@ -5764,7 +5787,7 @@ msgstr "Кадрировать выбранное"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Preview Canvas Scale"
-msgstr "ПроÑмотреть Canvas Scale"
+msgstr "ПредпроÑмотр Canvas Scale"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Translation mask for inserting keys."
@@ -6368,9 +6391,8 @@ msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Возможно уÑтановить точку только в ParticlesMaterial материал"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Преобразовать в CPUParticles"
+msgstr "Преобразовать в CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -7076,16 +7098,6 @@ msgstr ""
"Следующие файлы новее на диÑке.\n"
"Какие меры должны быть принÑты?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Перезагрузить"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "ПереÑохранить"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Отладчик"
@@ -7406,8 +7418,12 @@ msgid "Yaw"
msgstr "РыÑкание"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "Размер"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
-msgstr "ÐариÑовано обьектов"
+msgstr "ÐариÑовано объектов"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Material Changes"
@@ -10089,6 +10105,11 @@ msgid "Projects"
msgstr "Проекты"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Получение зеркал, пожалуйÑта подождите..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "ПоÑледнее изменение"
@@ -11646,36 +11667,31 @@ msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Ðачать запекание"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Подготовка Ñтруктур данных"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Генерировать AABB"
+msgstr "Генерировать буфферы"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "ÐаправлениÑ"
+msgstr "ПрÑмое оÑвещение"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "ОтÑтуп вправо"
+msgstr "ÐепрÑмое оÑвещение"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
-msgstr "ПоÑÑ‚-обработка"
+msgstr "ПоÑтобработка"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "ПоÑтроение Ñвета:"
+msgstr "ПоÑтроение карт оÑвещениÑ"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12189,9 +12205,8 @@ msgid "Select device from the list"
msgstr "Выберите уÑтройÑтво из ÑпиÑка"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Unable to find the 'apksigner' tool."
-msgstr "Ðе удалоÑÑŒ найти инÑтрумент zipalign."
+msgstr "Ðе удалоÑÑŒ найти инÑтрумент «apksigner»."
#: platform/android/export/export.cpp
msgid ""
@@ -12212,18 +12227,13 @@ msgstr ""
"Хранилище ключей не наÑтроено ни в наÑтройках редактора, ни в предуÑтановках."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-"Ðеправильный путь к Android SDK Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÑŒÑкой Ñборки в наÑтройках "
-"редактора."
+"ТребуетÑÑ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ дейÑтвительный путь к Android SDK в ÐаÑтройках редактора."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
-"Ðеправильный путь к Android SDK Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÑŒÑкой Ñборки в наÑтройках "
-"редактора."
+msgstr "ÐедейÑтвительный путь Android SDK в ÐаÑтройках редактора."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12231,14 +12241,12 @@ msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Â«platform-tools» отÑутÑтвует!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
-msgstr ""
+msgstr "Ðе удалоÑÑŒ найти команду adb в Android SDK platform-tools."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-"Ðеправильный путь к Android SDK Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÑŒÑкой Ñборки в наÑтройках "
-"редактора."
+"ПожалуйÑта, проверьте каталог Android SDK, указанный в ÐаÑтройках редактора."
#: platform/android/export/export.cpp
msgid "Missing 'build-tools' directory!"
@@ -12246,7 +12254,7 @@ msgstr "Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Â«build-tools» отÑутÑтвует!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
-msgstr ""
+msgstr "Ðе удалоÑÑŒ найти команду apksigner в Android SDK build-tools."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12719,27 +12727,23 @@ msgstr "ARVROrigin требует дочерний узел ARVRCamera."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "ПоиÑк полиÑеток и иÑточников Ñвета"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "Ðнализ геометрии..."
+msgstr "Подготовка геометрии (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Окружение"
+msgstr "Подготовка окружениÑ"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Создание карт оÑвещениÑ"
+msgstr "Создание захвата"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "Создание карт оÑвещениÑ"
+msgstr "Сохранение карт оÑвещениÑ"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13143,6 +13147,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"Порт ÑÑмплера подключен, но не иÑпользуетÑÑ. РаÑÑмотрите возможноÑть "
+"Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¸Ñточника на «SamplerPort»."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/si.po b/editor/translations/si.po
index 46e606d935..2e5a6f0f81 100644
--- a/editor/translations/si.po
+++ b/editor/translations/si.po
@@ -3,12 +3,13 @@
# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
# Yohan Sandun <Yohan99ysk@gmail.com>, 2018.
+# thushariii <thusharipahalage@gmail.com>, 2021.
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: Yohan Sandun <Yohan99ysk@gmail.com>\n"
+"PO-Revision-Date: 2021-02-05 09:20+0000\n"
+"Last-Translator: thushariii <thusharipahalage@gmail.com>\n"
"Language-Team: Sinhala <https://hosted.weblate.org/projects/godot-engine/"
"godot/si/>\n"
"Language: si\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 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -103,11 +104,11 @@ msgstr "à¶šà·à¶©à¶´à¶­"
#: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp
msgid "Time:"
-msgstr ""
+msgstr "à¶šà·à¶½à¶º:"
#: editor/animation_bezier_editor.cpp
msgid "Value:"
-msgstr ""
+msgstr "වටිනà·à¶šà¶¸:"
#: editor/animation_bezier_editor.cpp
msgid "Insert Key Here"
@@ -190,7 +191,7 @@ msgstr "සජීවීකරණ පුනරà·à·€à¶»à·Šà¶®à¶±à¶º"
#: editor/animation_track_editor.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr ""
+msgstr "සජීවිකරණ ලූපය වෙනස් කරන්න"
#: editor/animation_track_editor.cpp
msgid "Property Track"
@@ -249,7 +250,7 @@ msgstr "Anim පසුරු:"
#: editor/animation_track_editor.cpp
msgid "Change Track Path"
-msgstr ""
+msgstr "පථය වෙනස් කරන්න"
#: editor/animation_track_editor.cpp
msgid "Toggle this track on/off."
@@ -331,7 +332,7 @@ msgstr "යතුරු මක෠දමන්න"
#: editor/animation_track_editor.cpp
msgid "Change Animation Update Mode"
-msgstr ""
+msgstr "සජීවිකරණ යà·à·€à¶­à·Šà¶šà·à¶½à·“à¶± à¶´à·Šâ€à¶»à¶šà·à¶»à¶º වෙනස් කරන්න"
#: editor/animation_track_editor.cpp
#, fuzzy
@@ -435,7 +436,7 @@ msgstr "ලුහුබදින්නෙක් එක් කරන්න"
#: editor/animation_track_editor.cpp
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"
@@ -3006,6 +3007,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6784,16 +6801,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7109,6 +7116,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9654,6 +9665,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index c9133c8d7c..7a8b132fbd 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -3122,6 +3122,23 @@ msgid "Open & Run a Script"
msgstr "Otvoriť a vykonať skript"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr "Nasledovné súbory sa nepodarilo extrahovať z balíka:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Novo Zdedené"
@@ -6984,16 +7001,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7321,6 +7328,11 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Veľkosť: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9958,6 +9970,11 @@ msgid "Projects"
msgstr "Zakladatelia Projektu"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "NaÄítavanie zrkadiel, prosím Äakajte..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index a953258d3f..bdee4655ab 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -12,12 +12,13 @@
# Arnold Marko <arnold.marko@gmail.com>, 2019.
# Alex <alexrixhardson@gmail.com>, 2019.
# Andrew Poženel <andrej.pozenel@outlook.com>, 2020.
+# Jakob Tadej VrtaÄnik <minecraftalka2@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-07-15 02:42+0000\n"
-"Last-Translator: Andrew Poženel <andrej.pozenel@outlook.com>\n"
+"PO-Revision-Date: 2021-02-01 20:54+0000\n"
+"Last-Translator: Jakob Tadej VrtaÄnik <minecraftalka2@gmail.com>\n"
"Language-Team: Slovenian <https://hosted.weblate.org/projects/godot-engine/"
"godot/sl/>\n"
"Language: sl\n"
@@ -26,7 +27,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
"%100==4 ? 2 : 3;\n"
-"X-Generator: Weblate 4.2-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -370,7 +371,7 @@ msgstr "Odstrani animacijsko sled"
#: editor/animation_track_editor.cpp
msgid "Create NEW track for %s and insert key?"
-msgstr "Ustvarim NOVO sled za %s in vstavim kljuÄ?"
+msgstr "Ustvarim NOVO sled za %s in vstavi kljuÄ?"
#: editor/animation_track_editor.cpp
msgid "Create %d NEW tracks and insert keys?"
@@ -3255,6 +3256,22 @@ msgid "Open & Run a Script"
msgstr "Odpri & Zaženi Skripto"
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Novo Podedovano"
@@ -7280,16 +7297,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "RazhroÅ¡Äevalnik"
@@ -7626,6 +7633,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -10301,6 +10312,11 @@ msgid "Projects"
msgstr "Projekt"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Pridobivanje virov, poÄakajte..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/sq.po b/editor/translations/sq.po
index 7dcc32735d..73c3b1cb43 100644
--- a/editor/translations/sq.po
+++ b/editor/translations/sq.po
@@ -3191,6 +3191,22 @@ msgid "Open & Run a Script"
msgstr "Hap & Fillo një Shkrim"
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "E Trashëguar e Re"
@@ -7047,16 +7063,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7380,6 +7386,11 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Madhësia: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9958,6 +9969,11 @@ msgid "Projects"
msgstr "Projekti"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Duke marrë pasqyrat, ju lutem prisni..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po
index b07bc4e1c9..e56d9fd650 100644
--- a/editor/translations/sr_Cyrl.po
+++ b/editor/translations/sr_Cyrl.po
@@ -3400,6 +3400,25 @@ msgid "Open & Run a Script"
msgstr "Отвори и покрени Ñкриптицу"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Следеће датотеке Ñу нове на диÑку.\n"
+"Која акција Ñе треба предузети?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "ОÑвежи"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Поново Ñачувај"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Ðова наÑлеђена"
@@ -7674,16 +7693,6 @@ msgstr ""
"Следеће датотеке Ñу нове на диÑку.\n"
"Која акција Ñе треба предузети?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "ОÑвежи"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Поново Ñачувај"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Дебагер"
@@ -8041,6 +8050,11 @@ msgid "Yaw"
msgstr "Горе-Доле"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Величина:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Ðацртани објекти"
@@ -11142,6 +11156,11 @@ msgstr "Пројекти"
#: editor/project_manager.cpp
#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Прихватам одредишта, молим Ñачекајте..."
+
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Last Modified"
msgstr "Задњи Измењен"
diff --git a/editor/translations/sr_Latn.po b/editor/translations/sr_Latn.po
index 232c53da80..c177f0983b 100644
--- a/editor/translations/sr_Latn.po
+++ b/editor/translations/sr_Latn.po
@@ -3022,6 +3022,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6822,16 +6838,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7153,6 +7159,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9733,6 +9743,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/sv.po b/editor/translations/sv.po
index cab4b7e5bc..4e08c39b9d 100644
--- a/editor/translations/sv.po
+++ b/editor/translations/sv.po
@@ -3193,6 +3193,23 @@ msgid "Open & Run a Script"
msgstr "Öppna & Kör ett Skript"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr "Följande filer gick inte att packa upp från tillägget:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Ladda om"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Spara om"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -7166,16 +7183,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Ladda om"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Spara om"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7515,6 +7522,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -10192,6 +10203,11 @@ msgid "Projects"
msgstr "Projekt"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Laddar..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Senast Ändrad"
diff --git a/editor/translations/ta.po b/editor/translations/ta.po
index 45de03bdb3..407ab40dc8 100644
--- a/editor/translations/ta.po
+++ b/editor/translations/ta.po
@@ -3012,6 +3012,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6789,16 +6805,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7114,6 +7120,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9654,6 +9664,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/te.po b/editor/translations/te.po
index aa703812fe..eff6151683 100644
--- a/editor/translations/te.po
+++ b/editor/translations/te.po
@@ -2983,6 +2983,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6735,16 +6751,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7059,6 +7065,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9580,6 +9590,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/th.po b/editor/translations/th.po
index 4b1d938c54..090e7388a2 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -7,13 +7,13 @@
# Thanachart Monpassorn <nunf_2539@hotmail.com>, 2020.
# Anonymous <noreply@weblate.org>, 2020.
# Lon3r <mptube.p@gmail.com>, 2020.
-# Kongfa Warorot <gongpha@hotmail.com>, 2020.
+# Kongfa Warorot <gongpha@hotmail.com>, 2020, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-31 07:09+0000\n"
-"Last-Translator: Thanachart Monpassorn <nunf_2539@hotmail.com>\n"
+"PO-Revision-Date: 2021-02-15 10:51+0000\n"
+"Last-Translator: Kongfa Warorot <gongpha@hotmail.com>\n"
"Language-Team: Thai <https://hosted.weblate.org/projects/godot-engine/godot/"
"th/>\n"
"Language: th\n"
@@ -21,7 +21,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2347,7 +2347,7 @@ msgstr "ยังไม่ได้เลือà¸à¸‰à¸²à¸à¸—ี่จะเล
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "บันทึà¸à¸‰à¸²à¸à¸à¹ˆà¸­à¸™à¸—ี่จะทำงาน..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3076,6 +3076,25 @@ msgid "Open & Run a Script"
msgstr "เปิดà¹à¸¥à¸°à¸£à¸±à¸™à¸ªà¸„ริปต์"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"ไฟล์ต่อไปนี้ในดิสà¸à¹Œà¹ƒà¸«à¸¡à¹ˆà¸à¸§à¹ˆà¸²\n"
+"จะทำอย่างไรต่อไป?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "โหลดใหม่"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "บันทึà¸à¸­à¸µà¸à¸„รั้ง"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "สืบทอด"
@@ -6887,16 +6906,6 @@ msgstr ""
"ไฟล์ต่อไปนี้ในดิสà¸à¹Œà¹ƒà¸«à¸¡à¹ˆà¸à¸§à¹ˆà¸²\n"
"จะทำอย่างไรต่อไป?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "โหลดใหม่"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "บันทึà¸à¸­à¸µà¸à¸„รั้ง"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "ตัวดีบัà¸"
@@ -7213,6 +7222,11 @@ msgid "Yaw"
msgstr "Yaw"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "ขนาด: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "ออบเจà¸à¸•์ที่วาด"
@@ -9846,6 +9860,11 @@ msgid "Projects"
msgstr "โปรเจà¸à¸•์"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¹€à¸£à¸µà¸¢à¸à¸‚้อมูล โปรดรอ..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "à¹à¸à¹‰à¹„ขล่าสุด"
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index 916e81ec01..624f32aa42 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -46,7 +46,7 @@
# Kaan Genç <kaan@kaangenc.me>, 2020.
# Anonymous <noreply@weblate.org>, 2020.
# Güneş Gümüş <gunes.gumus.001@gmail.com>, 2020.
-# OÄŸuz Ersen <oguzersen@protonmail.com>, 2020.
+# OÄŸuz Ersen <oguzersen@protonmail.com>, 2020, 2021.
# Vedat Günel <gunel15@itu.edu.tr>, 2020.
# Ahmet Elgün <ahmetelgn@gmail.com>, 2020.
# Efruz Yıldırır <efruzyildirir@gmail.com>, 2020.
@@ -55,11 +55,12 @@
# Yusuf Osman YILMAZ <wolfkan4219@gmail.com>, 2020.
# furkan atalar <fatalar55@gmail.com>, 2020.
# Suleyman Poyraz <zaryob.dev@gmail.com>, 2020.
+# Çağlar KOPARIR <ckoparir@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-14 11:03+0000\n"
+"PO-Revision-Date: 2021-02-05 23:44+0000\n"
"Last-Translator: OÄŸuz Ersen <oguzersen@protonmail.com>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/"
"godot/tr/>\n"
@@ -68,7 +69,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 4.4-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2430,7 +2431,7 @@ msgstr "Çalıştırmak için herhangi bir sahne seçilmedi."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Çalıştırmadan önce sahneyi kaydedin..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3181,6 +3182,25 @@ msgid "Open & Run a Script"
msgstr "Aç & Bir Betik Çalıştır"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Aşağıdaki dosyalar diskte daha yeni.\n"
+"Hangi eylem yapılsın?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Yeniden Yükle"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "Yeniden Kaydet"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Yeni Örnekleme"
@@ -3951,19 +3971,16 @@ msgid "Searching..."
msgstr "Aranıyor..."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d match in %d file."
-msgstr "%d eÅŸleÅŸme."
+msgstr "%d eÅŸleÅŸme %d dosyada."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d matches in %d file."
-msgstr "%d eÅŸleÅŸme."
+msgstr "%d eÅŸleÅŸme %d dosyada."
#: editor/find_in_files.cpp
-#, fuzzy
msgid "%d matches in %d files."
-msgstr "%d eÅŸleÅŸme."
+msgstr "%d eÅŸleÅŸme %d dosyada."
#: editor/groups_editor.cpp
msgid "Add to Group"
@@ -5201,14 +5218,12 @@ msgid "Assets ZIP File"
msgstr "Varlıkların ZIP Dosyası"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
-"Lightmap resimleri için kaydetme yolu belirlenemiyor.\n"
-"Sahneni kaydet (resimler aynı klasöre kaydedilmeli), ya da BakedLightmap "
-"özelliklerinden bir kayıt yolu seçin."
+"Lightmap dosyaları için kaydetme yolu belirlenemiyor.\n"
+"Sahneyi kaydedip tekrar deneyin."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5226,27 +5241,30 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
-msgstr ""
+msgstr "Lightmap boyutu belirlenemedi. Lightmap boyutu mu çok küçuk?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"Bazı örgüler geçersiz. [0.0,1.0] bölgesinin UV2 kanal değerlerini "
+"içerdiğinden emin olun."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Godot editör ışın yansıma desteği olmadan derlenmiş, ışık haritaları "
+"piÅŸirilemez."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Işık-Haritalarını Pişir"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Şablon Dosyası Seç"
+msgstr "Işık Haritası pişirme dosyası seçiniz:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6338,9 +6356,8 @@ msgid "Can only set point into a ParticlesMaterial process material"
msgstr "Nokta sadece ParçacıkMateryal işlem materyalinin içinde ayarlanabilir"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "CPUParçacıklar 'a dönüştür"
+msgstr "2BİşlemciPartikül'e dönüştür"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -7045,16 +7062,6 @@ msgstr ""
"Aşağıdaki dosyalar diskte daha yeni.\n"
"Hangi eylem yapılsın?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Yeniden Yükle"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "Yeniden Kaydet"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Hata Ayıklayıcı"
@@ -7373,6 +7380,10 @@ msgid "Yaw"
msgstr "Yalpala"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "Boyut"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Çizilmiş Nesneler"
@@ -10053,6 +10064,11 @@ msgid "Projects"
msgstr "Projeler"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "Aynalar alınıyor, lütfen bekleyin..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "Son DeÄŸiÅŸiklik"
@@ -11603,36 +11619,31 @@ msgstr "Model olarak kullanması için bu GridMap'e MeshLibrary kaynağı atayı
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "PiÅŸirmeye BaÅŸla"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Veri yapıları hazırlanıyor"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "AABB Üret"
+msgstr "Arabellek OluÅŸtur"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "Yönler"
+msgstr "Doğrudan aydınlatma"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "SaÄŸa Girintile"
+msgstr "Dolaylı aydınlatma"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
-msgstr "Artçıl-İşlem"
+msgstr "Rötuş"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Örüntüler Haritalanıyor:"
+msgstr "Işık haritalarını çizme"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12144,9 +12155,8 @@ msgid "Select device from the list"
msgstr "Listeden aygıt seç"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Unable to find the 'apksigner' tool."
-msgstr "Zipalign aracı bulunamıyor."
+msgstr "'apksigner' aracı bulunamıyor."
#: platform/android/export/export.cpp
msgid ""
@@ -12168,14 +12178,12 @@ msgstr ""
"serbest bırakın."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
-msgstr "Editör Ayarlarında özel derleme için geçersiz Android SDK yolu."
+msgstr "Editör Ayarlarında geçerli bir Android SDK yolu gerekli."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr "Editör Ayarlarında özel derleme için geçersiz Android SDK yolu."
+msgstr "Editör Ayarlarında geçersiz Android SDK yolu."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12183,12 +12191,12 @@ msgstr "Eksik 'platform araçları' dizini!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
-msgstr ""
+msgstr "Android SDK platform-tools'un adb komutu bulunamıyor."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
-msgstr "Editör Ayarlarında özel derleme için geçersiz Android SDK yolu."
+msgstr ""
+"Lütfen Editör Ayarlarında girilen Android SDK klasörünü kontrol ediniz."
#: platform/android/export/export.cpp
msgid "Missing 'build-tools' directory!"
@@ -12196,7 +12204,7 @@ msgstr "Eksik 'inşa-araçları' dizini!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
-msgstr ""
+msgstr "Android SDK platform-tools'un apksigner komutu bulunamıyor."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12668,27 +12676,23 @@ msgstr "ARVROrigin bir ARVRCamera alt düğümü gerektirir."
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Örgü ve ışıkları bulmak"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "Geometri Ayrıştırılıyor..."
+msgstr "Geometri hazırlanıyor (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "Ortamı Göster"
+msgstr "Ortam hazırlanıyor"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Işık-haritaları Üretiliyor"
+msgstr "Yakalama oluÅŸturuluyor"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "Işık-haritaları Üretiliyor"
+msgstr "Işık-haritaları kaydediliyor"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13037,9 +13041,8 @@ msgid "Must use a valid extension."
msgstr "Geçerli bir uzantı kullanılmalı."
#: scene/gui/graph_edit.cpp
-#, fuzzy
msgid "Enable grid minimap."
-msgstr "Yapışmayı Enkinleştir"
+msgstr "Izgara haritasını etkinleştir."
#: scene/gui/popup.cpp
msgid ""
@@ -13099,6 +13102,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"Örnekleyici bağlantı noktası bağlandı ama kullanılmadı. Kaynağı "
+"'ÖrnekleyiciBağlantıNoktası' olarak değiştirmeyi düşünün."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/tzm.po b/editor/translations/tzm.po
index 7853cd3b8c..bbd4822fbd 100644
--- a/editor/translations/tzm.po
+++ b/editor/translations/tzm.po
@@ -2981,6 +2981,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr ""
@@ -6733,16 +6749,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7057,6 +7063,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9577,6 +9587,10 @@ msgid "Projects"
msgstr ""
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index 320c85be54..6b94e70e43 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -3,7 +3,7 @@
# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
# Aleksandr <XpycT.TOP@gmail.com>, 2017.
-# Yuri Chornoivan <yurchor@ukr.net>, 2018, 2019, 2020.
+# Yuri Chornoivan <yurchor@ukr.net>, 2018, 2019, 2020, 2021.
# Ðндрій Бандура <andriykopanytsia@gmail.com>, 2018.
# Гидеон Теон <t.kudely94@gmail.com>, 2017.
# МакÑим Якимчук <xpinovo@gmail.com>, 2018, 2019.
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Ukrainian (Godot Engine)\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2020-12-29 21:52+0000\n"
+"PO-Revision-Date: 2021-02-05 23:44+0000\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <https://hosted.weblate.org/projects/godot-engine/"
"godot/uk/>\n"
@@ -30,7 +30,7 @@ msgstr ""
"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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2401,7 +2401,7 @@ msgstr "Ðемає визначеної Ñцени Ð´Ð»Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ."
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "Зберегти Ñцену перед запуÑком…"
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3157,6 +3157,25 @@ msgid "Open & Run a Script"
msgstr "Відкрити Ñ– запуÑтити Ñкрипт"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"Такі файли на диÑку новіші.\n"
+"Що робити?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "Перезавантажити"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "ПерезапиÑати"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Ðовий уÑпадкований"
@@ -5178,14 +5197,12 @@ msgid "Assets ZIP File"
msgstr "ZIP файл реÑурÑів"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
"Ðе вдаєтьÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ шлÑÑ… Ð´Ð»Ñ Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ ÐºÐ°Ñ€Ñ‚ оÑвітленнÑ.\n"
-"Збережіть вашу Ñцену (щоб Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð±ÑƒÐ»Ð¸ збережені в одній теці), або "
-"виберіть шлÑÑ… Ð·Ð±ÐµÑ€Ñ–Ð³Ð°Ð½Ð½Ñ Ñƒ влаÑтивоÑÑ‚ÑÑ… BakedLightmap."
+"Збережіть вашу Ñцену Ñ– повторіть Ñпробу."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5204,26 +5221,31 @@ msgstr ""
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
msgstr ""
+"Ðе вдалоÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ розмір карти оÑвітленнÑ. МакÑимальний розмір карти "
+"оÑÐ²Ñ–Ñ‚Ð»ÐµÐ½Ð½Ñ Ñ” надто малим?"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
msgstr ""
+"ЧаÑтина Ñітки Ñ” некоректною. ПереконайтеÑÑ, що Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ÐºÐ°Ð½Ð°Ð»Ñ–Ð² UV2 "
+"потраплÑють до квадратної облаÑті [0.0,1.0]."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Редактор Godot було зібрано без підтримки траÑÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ–Ð². Карти "
+"оÑÐ²Ñ–Ñ‚Ð»ÐµÐ½Ð½Ñ Ð½Ðµ вдаÑтьÑÑ Ð¿Ð¾Ð±ÑƒÐ´ÑƒÐ²Ð°Ñ‚Ð¸."
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "Запікати карти оÑвітленнÑ"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "Виберіть файл шаблону"
+msgstr "Виберіть файл Ð¿Ñ€Ð¸Ð³Ð¾Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÐ°Ñ€Ñ‚Ð¸ оÑвітленнÑ:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6318,9 +6340,8 @@ msgstr ""
"ПоÑтавити точку можна тільки в процедурному матеріалі ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "Перетворити на CPUParticles"
+msgstr "Перетворити на CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -7028,16 +7049,6 @@ msgstr ""
"Такі файли на диÑку новіші.\n"
"Що робити?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "Перезавантажити"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "ПерезапиÑати"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "Зневаджувач"
@@ -7358,6 +7369,10 @@ msgid "Yaw"
msgstr "ВідхиленнÑ"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "Розмір"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "Ðамальовано об'єктів"
@@ -10049,6 +10064,11 @@ msgid "Projects"
msgstr "Проєкти"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "ÐžÑ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð´Ð·ÐµÑ€ÐºÐ°Ð», будь лаÑка, зачекайте..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "ВоÑтаннє змінено"
@@ -11605,36 +11625,31 @@ msgstr ""
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "Почати обробку"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "Готуємо Ñтруктури даних"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "Генерувати AABB"
+msgstr "Створити буфери"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "ÐапрÑмки"
+msgstr "БезпоÑереднє оÑвітленнÑ"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "Збільшити відÑтуп"
+msgstr "ОпоÑередковане оÑвітленнÑ"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
msgstr "ПоÑÑ‚-обробка"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "Побудова Ñвітла:"
+msgstr "КреÑÐ»ÐµÐ½Ð½Ñ ÐºÐ°Ñ€Ñ‚ оÑвітленнÑ"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -12150,9 +12165,8 @@ msgid "Select device from the list"
msgstr "Вибрати приÑтрій зі ÑпиÑку"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Unable to find the 'apksigner' tool."
-msgstr "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ програму zipalign."
+msgstr "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ програму apksigner."
#: platform/android/export/export.cpp
msgid ""
@@ -12174,18 +12188,13 @@ msgstr ""
"У шаблоні екÑÐ¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð½ÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð¾ налаштовано Ñховище ключів випуÑку."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
msgstr ""
-"Ðекоректний шлÑÑ… до SDK Ð´Ð»Ñ Android Ð´Ð»Ñ Ð½ÐµÑ‚Ð¸Ð¿Ð¾Ð²Ð¾Ð³Ð¾ Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ Ñƒ параметрах "
-"редактора."
+"У параметрах редактора має бути вказано коректний шлÑÑ… до SDK Ð´Ð»Ñ Android."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr ""
-"Ðекоректний шлÑÑ… до SDK Ð´Ð»Ñ Android Ð´Ð»Ñ Ð½ÐµÑ‚Ð¸Ð¿Ð¾Ð²Ð¾Ð³Ð¾ Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ Ñƒ параметрах "
-"редактора."
+msgstr "Ðекоректний шлÑÑ… до SDK Ð´Ð»Ñ Android у параметрах редактора."
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -12194,13 +12203,13 @@ msgstr "Ðе знайдено каталогу «platform-tools»!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
msgstr ""
+"Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ програми adb із інÑтрументів платформи SDK Ð´Ð»Ñ Android."
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
msgstr ""
-"Ðекоректний шлÑÑ… до SDK Ð´Ð»Ñ Android Ð´Ð»Ñ Ð½ÐµÑ‚Ð¸Ð¿Ð¾Ð²Ð¾Ð³Ð¾ Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ Ñƒ параметрах "
-"редактора."
+"Будь лаÑка, перевірте, чи правильно вказано каталог SDK Ð´Ð»Ñ Android у "
+"параметрах редактора."
#: platform/android/export/export.cpp
msgid "Missing 'build-tools' directory!"
@@ -12209,6 +12218,7 @@ msgstr "Ðе знайдено каталогу «build-tools»!"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
msgstr ""
+"Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ програми apksigner з інÑтрументів Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ SDK Ð´Ð»Ñ Android."
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12696,27 +12706,23 @@ msgstr "ARVROrigin повинен мати дочірній вузол ARVRCamer
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "Пошук Ñіток та джерел Ñвітла"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "Ðналіз геометрії..."
+msgstr "ÐŸÑ€Ð¸Ð³Ð¾Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð³ÐµÐ¾Ð¼ÐµÑ‚Ñ€Ñ–Ñ— (%d з %d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "ПереглÑд Ñередовища"
+msgstr "ÐŸÑ€Ð¸Ð³Ð¾Ñ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñередовища"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÐºÐ°Ñ€Ñ‚ оÑвітленнÑ"
+msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð·Ð°Ñ…Ð¾Ð¿Ð»ÐµÐ½Ð½Ñ"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÐºÐ°Ñ€Ñ‚ оÑвітленнÑ"
+msgstr "Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ ÐºÐ°Ñ€Ñ‚ оÑвітленнÑ"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -13128,6 +13134,8 @@ msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
msgstr ""
+"Порт заÑобу ÑÐµÐ¼Ð¿Ð»ÑŽÐ²Ð°Ð½Ð½Ñ Ð·'єднано, але не викориÑтано. Вам варто змінити "
+"джерело на «SamplerPort»."
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index c7722c84c4..14ece3e011 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -3037,6 +3037,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
#, fuzzy
msgid "New Inherited"
msgstr "سب سکریپشن بنائیں"
@@ -6886,16 +6902,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7218,6 +7224,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -9822,6 +9832,10 @@ msgid "Projects"
msgstr ".تمام کا انتخاب"
#: editor/project_manager.cpp
+msgid "Loading, please wait..."
+msgstr ""
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/vi.po b/editor/translations/vi.po
index 97c2be742e..c88429c3d4 100644
--- a/editor/translations/vi.po
+++ b/editor/translations/vi.po
@@ -3140,6 +3140,22 @@ msgid "Open & Run a Script"
msgstr "Mở & Chạy mã lệnh"
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "Kế thừa mới"
@@ -7025,16 +7041,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7366,6 +7372,11 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Size"
+msgstr "Kích thước: "
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -10026,6 +10037,13 @@ msgid "Projects"
msgstr "Dự án"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr ""
+"Äang quét các tệp tin,\n"
+"ChỠmột chút ..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index ac62631b92..20e4c929ac 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -58,7 +58,7 @@
# idleman <1524328475@qq.com>, 2019.
# king <wangding1992@126.com>, 2019.
# silentbird <silentbird520@outlook.com>, 2019.
-# Haoyu Qiu <timothyqiu32@gmail.com>, 2019, 2020.
+# Haoyu Qiu <timothyqiu32@gmail.com>, 2019, 2020, 2021.
# Revan Ji <jiruifancr@gmail.com>, 2020.
# nieyuanhong <15625988003@163.com>, 2020.
# binotaliu <binota@protonmail.ch>, 2020.
@@ -71,14 +71,16 @@
# MintSoda <lionlxh@qq.com>, 2020.
# Gardner Belgrade <hapenia@sina.com>, 2020.
# godhidden <z2zz2zz@yahoo.com>, 2020.
-# BinotaLIU <me@binota.org>, 2020.
+# BinotaLIU <me@binota.org>, 2020, 2021.
# TakWolf <takwolf@foxmail.com>, 2020.
+# twoBornottwoB <305766341@qq.com>, 2021.
+# Magian <magian1127@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified) (Godot Engine)\n"
"POT-Creation-Date: 2018-01-20 12:15+0200\n"
-"PO-Revision-Date: 2020-12-31 07:09+0000\n"
-"Last-Translator: Haoyu Qiu <timothyqiu32@gmail.com>\n"
+"PO-Revision-Date: 2021-02-07 05:50+0000\n"
+"Last-Translator: BinotaLIU <me@binota.org>\n"
"Language-Team: Chinese (Simplified) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hans/>\n"
"Language: zh_CN\n"
@@ -86,7 +88,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2410,7 +2412,7 @@ msgstr "没有设置è¦è¿è¡Œçš„场景。"
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "è¿è¡Œå‰ä¿å­˜åœºæ™¯..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3132,6 +3134,25 @@ msgid "Open & Run a Script"
msgstr "打开并è¿è¡Œè„šæœ¬"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"ç£ç›˜ä¸­çš„下列文件已更新。\n"
+"请选择执行哪项æ“作?:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "釿–°åŠ è½½"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "釿–°ä¿å­˜"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "新建继承"
@@ -3772,7 +3793,7 @@ msgstr "全部折å "
#: editor/filesystem_dock.cpp
msgid "Duplicate..."
-msgstr "é‡å¤..."
+msgstr "å¤åˆ¶ä¸º..."
#: editor/filesystem_dock.cpp
msgid "Move to Trash"
@@ -5118,7 +5139,6 @@ msgid "Assets ZIP File"
msgstr "ç´ æ ZIP 文件"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
@@ -5139,27 +5159,26 @@ msgstr "åˆ›å»ºå…‰ç…§è´´å›¾å¤±è´¥ï¼Œåˆ‡ç¡®ä¿æ–‡ä»¶æ˜¯å¯å†™çš„。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
-msgstr ""
+msgstr "无法确定光照贴图大å°ã€‚最大光照贴图大å°å¤ªå°ï¼Ÿ"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
-msgstr ""
+msgstr "æŸäº›ç½‘格无效。确ä¿UV2通é“值包å«åœ¨[0.0,1.0]平方区域内。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
-msgstr ""
+msgstr "Godot编辑器是在没有光线跟踪支æŒçš„æƒ…况下构建的,光照贴图无法烘焙。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "烘焙光照贴图"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "é€‰æ‹©æ¨¡æ¿æ–‡ä»¶"
+msgstr "选择光照贴图烘焙文件:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6239,9 +6258,8 @@ msgid "Can only set point into a ParticlesMaterial process material"
msgstr "åªå¯è®¾ä¸ºæŒ‡å‘ ParticlesMaterial å¤„ç†ææ–™"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "转æ¢ä¸º CPUParticles"
+msgstr "转æ¢ä¸ºCPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -6940,16 +6958,6 @@ msgstr ""
"ç£ç›˜ä¸­çš„下列文件已更新。\n"
"请选择执行哪项æ“作?:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "釿–°åŠ è½½"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "釿–°ä¿å­˜"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "调试器"
@@ -7266,6 +7274,10 @@ msgid "Yaw"
msgstr "å航角"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "大å°"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "绘制对象"
@@ -9891,6 +9903,11 @@ msgid "Projects"
msgstr "项目"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "检索镜åƒï¼Œè¯·ç­‰å¾…..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "修改时间"
@@ -11425,36 +11442,31 @@ msgstr "呿­¤ GridMap æä¾›ç½‘格库资æºä»¥ä½¿ç”¨å…¶ç½‘格。"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "开始烘焙"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "准备数æ®ç»“æž„"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "ç”Ÿæˆ AABB"
+msgstr "生æˆç¼“冲区"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "æ–¹å‘"
+msgstr "直接照明"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "å‘å³ç¼©è¿›"
+msgstr "间接照明"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
-msgstr "åŽæœŸå¤„ç†"
+msgstr "åŽå¤„ç†"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "正在绘制ç¯å…‰ï¼š"
+msgstr "绘制光照图"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -11955,9 +11967,8 @@ msgid "Select device from the list"
msgstr "从列表中选择设备"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Unable to find the 'apksigner' tool."
-msgstr "未找到 zipalign 工具。"
+msgstr "找ä¸åˆ°â€œapksignerâ€å·¥å…·ã€‚"
#: platform/android/export/export.cpp
msgid ""
@@ -11974,14 +11985,12 @@ msgid "Release keystore incorrectly configured in the export preset."
msgstr "用于å‘布的密钥存储在导出预设中未被正确设置。"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
-msgstr "用于 “编辑器设置†中自定义构建的 Android SDK 路径是无效的。"
+msgstr "ç¼–è¾‘å™¨è®¾ç½®ä¸­éœ€è¦æœ‰æ•ˆçš„Android SDK路径。"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr "用于 “编辑器设置†中自定义构建的 Android SDK 路径是无效的。"
+msgstr "编辑器设置中的Android SDK路径无效。"
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -11989,12 +11998,11 @@ msgstr "缺失“platform-toolsâ€ç›®å½•ï¼"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
-msgstr ""
+msgstr "找ä¸åˆ°Android SDKå¹³å°å·¥å…·çš„adb命令。"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
-msgstr "用于 “编辑器设置†中自定义构建的 Android SDK 路径是无效的。"
+msgstr "请签入编辑器设置中指定的Android SDK目录。"
#: platform/android/export/export.cpp
msgid "Missing 'build-tools' directory!"
@@ -12002,7 +12010,7 @@ msgstr "缺失“build-toolsâ€ç›®å½•ï¼"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
-msgstr ""
+msgstr "找ä¸åˆ°Android SDK生æˆå·¥å…·çš„apksigner命令。"
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12432,27 +12440,23 @@ msgstr "ARVROrigin 需è¦ä¸€ä¸ª ARVRCamera å­èŠ‚ç‚¹ã€‚"
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "正在查找网格和ç¯å…‰"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "è§£æžå¤šè¾¹å½¢ä¸­..."
+msgstr "正在准备几何体(%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "查看环境"
+msgstr "正在准备环境"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "正在生æˆå…‰ç…§è´´å›¾"
+msgstr "æ­£åœ¨ç”Ÿæˆæ•获"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "正在生æˆå…‰ç…§è´´å›¾"
+msgstr "正在ä¿å­˜å…‰ç…§è´´å›¾"
#: scene/3d/baked_lightmap.cpp
msgid "Done"
@@ -12834,7 +12838,7 @@ msgstr "Viewport 大å°å¤§äºŽ 0 æ—¶æ‰èƒ½è¿›è¡Œæ¸²æŸ“。"
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
-msgstr ""
+msgstr "采样器端å£å·²è¿žæŽ¥ä½†æœªä½¿ç”¨ã€‚è€ƒè™‘å°†æºæ›´æ”¹ä¸ºâ€œSamplerPortâ€ã€‚"
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index 99d673b0fa..c3fbf65005 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -3199,6 +3199,22 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr ""
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr ""
+
+#: editor/editor_node.cpp
#, fuzzy
msgid "New Inherited"
msgstr "下一個腳本"
@@ -7218,16 +7234,6 @@ msgid ""
"What action should be taken?:"
msgstr ""
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr ""
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr ""
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr ""
@@ -7569,6 +7575,10 @@ msgid "Yaw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -10251,6 +10261,11 @@ msgid "Projects"
msgstr "專案"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "接收 mirrors中, è«‹ç¨ä¾¯..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr ""
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index a1228463b9..c6241b6ffe 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -29,7 +29,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2021-01-01 10:30+0000\n"
+"PO-Revision-Date: 2021-02-07 05:50+0000\n"
"Last-Translator: BinotaLIU <me@binota.org>\n"
"Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hant/>\n"
@@ -38,7 +38,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 4.4.1-dev\n"
+"X-Generator: Weblate 4.5-dev\n"
#: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -2364,7 +2364,7 @@ msgstr "未定義欲執行之場景。"
#: editor/editor_node.cpp
msgid "Save scene before running..."
-msgstr ""
+msgstr "執行å‰å…ˆä¿å­˜å ´æ™¯..."
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
@@ -3086,6 +3086,25 @@ msgid "Open & Run a Script"
msgstr "開啟並執行腳本"
#: editor/editor_node.cpp
+#, fuzzy
+msgid ""
+"The following files are newer on disk.\n"
+"What action should be taken?"
+msgstr ""
+"ç£ç¢Ÿä¸­çš„下列檔案已更新。\n"
+"è«‹é¸æ“‡æ–¼åŸ·è¡Œä¹‹æ“作:"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Reload"
+msgstr "釿–°è¼‰å…¥"
+
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/plugins/shader_editor_plugin.cpp
+msgid "Resave"
+msgstr "釿–°ä¿å­˜"
+
+#: editor/editor_node.cpp
msgid "New Inherited"
msgstr "新增繼承"
@@ -5072,14 +5091,12 @@ msgid "Assets ZIP File"
msgstr "ç´ æ ZIP 檔"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid ""
"Can't determine a save path for lightmap images.\n"
"Save your scene and try again."
msgstr ""
"無法判斷光照圖的ä¿å­˜è·¯å¾‘。\n"
-"è«‹ä¿å­˜å ´æ™¯ï¼ˆåœ–片將ä¿å­˜æ–¼ç›¸åŒè³‡æ–™å¤¾ï¼‰ï¼Œæˆ–是在 BackedLightmap å±¬æ€§å…§é¸æ“‡ä¸€å€‹ä¿"
-"存路徑。"
+"è«‹ä¿å­˜å ´æ™¯ä¸¦é‡è©¦ã€‚"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
@@ -5094,27 +5111,27 @@ msgstr "建立光照圖失敗,請確ä¿è©²è·¯å¾‘å¯å¯«å…¥ã€‚"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Failed determining lightmap size. Maximum lightmap size too small?"
-msgstr ""
+msgstr "無法判斷光照圖大å°ã€‚æœ€å¤§å…‰ç…§åœ–å¤§å°æ˜¯å¦éŽå°ï¼Ÿ"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Some mesh is invalid. Make sure the UV2 channel values are contained within "
"the [0.0,1.0] square region."
-msgstr ""
+msgstr "éƒ¨åˆ†ç¶²æ ¼ç„¡æ•ˆã€‚è«‹ç¢ºä¿ UV2 通é“çš„å€¼ä½æ–¼ [0.0,1.0] 矩形內。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid ""
"Godot editor was built without ray tracing support, lightmaps can't be baked."
msgstr ""
+"Godot 編輯器在建制時未啟用光線追蹤 (Ray Tracing) 支æ´ï¼Œç„¡æ³•烘焙光照圖。"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
msgid "Bake Lightmaps"
msgstr "烘焙光照圖"
#: editor/plugins/baked_lightmap_editor_plugin.cpp
-#, fuzzy
msgid "Select lightmap bake file:"
-msgstr "鏿“‡æ¨£æ¿æª”案"
+msgstr "鏿“‡å…‰ç…§åœ–烘焙檔案:"
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
@@ -6194,9 +6211,8 @@ msgid "Can only set point into a ParticlesMaterial process material"
msgstr "僅å¯è¨­ç‚ºæŒ‡å‘ ProticlesMaterial è™•ç†ææ–™"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Convert to CPUParticles2D"
-msgstr "轉æ›ç‚º CPUParticles"
+msgstr "轉æ›ç‚º CPUParticles2D"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
@@ -6895,16 +6911,6 @@ msgstr ""
"ç£ç¢Ÿä¸­çš„下列檔案已更新。\n"
"è«‹é¸æ“‡æ–¼åŸ·è¡Œä¹‹æ“作:"
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Reload"
-msgstr "釿–°è¼‰å…¥"
-
-#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/shader_editor_plugin.cpp
-msgid "Resave"
-msgstr "釿–°ä¿å­˜"
-
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
msgstr "除錯工具"
@@ -7221,6 +7227,10 @@ msgid "Yaw"
msgstr "å航"
#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Size"
+msgstr "大å°"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr "繪製的物件"
@@ -9847,6 +9857,11 @@ msgid "Projects"
msgstr "專案"
#: editor/project_manager.cpp
+#, fuzzy
+msgid "Loading, please wait..."
+msgstr "正在å–å¾—é¡åƒï¼Œè«‹ç¨å¾Œ..."
+
+#: editor/project_manager.cpp
msgid "Last Modified"
msgstr "最後修改時間"
@@ -11380,36 +11395,31 @@ msgstr "æä¾› MeshLibrary 予該 GridMap 以使用其網格。"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Begin Bake"
-msgstr ""
+msgstr "開始烘焙"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
msgid "Preparing data structures"
-msgstr ""
+msgstr "æ­£åœ¨æº–å‚™è³‡æ–™çµæ§‹"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Generate buffers"
-msgstr "產生 AABB"
+msgstr "產生緩è¡"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Direct lighting"
-msgstr "æ–¹å‘"
+msgstr "呿€§å…‰ç…§"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Indirect lighting"
-msgstr "å‘å³ç¸®æŽ’"
+msgstr "éžå‘性光照"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Post processing"
msgstr "後處ç†"
#: modules/lightmapper_cpu/lightmapper_cpu.cpp
-#, fuzzy
msgid "Plotting lightmaps"
-msgstr "正在繪製光照:"
+msgstr "正在繪製光照"
#: modules/mono/csharp_script.cpp
msgid "Class name can't be a reserved keyword"
@@ -11909,9 +11919,8 @@ msgid "Select device from the list"
msgstr "è‡ªæ¸…å–®ä¸­é¸æ“‡è£ç½®"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Unable to find the 'apksigner' tool."
-msgstr "找ä¸åˆ° zipalign 工具。"
+msgstr "找ä¸åˆ°ã€Œapksignerã€å·¥å…·ã€‚"
#: platform/android/export/export.cpp
msgid ""
@@ -11928,14 +11937,12 @@ msgid "Release keystore incorrectly configured in the export preset."
msgstr "發行金鑰儲存å€ä¸­ä¸æ­£ç¢ºä¹‹çµ„態設定至匯出é è¨­è¨­å®šã€‚"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "A valid Android SDK path is required in Editor Settings."
-msgstr "編輯器設定中用於自定義設定之 Android SDK 路徑無效。"
+msgstr "必須於 [編輯器設定] 中æä¾›ä¸€å€‹æœ‰æ•ˆçš„ Android SDK 路徑。"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Invalid Android SDK path in Editor Settings."
-msgstr "編輯器設定中用於自定義設定之 Android SDK 路徑無效。"
+msgstr "[編輯器設定] 中所指定的 Android SDK 路徑無效。"
#: platform/android/export/export.cpp
msgid "Missing 'platform-tools' directory!"
@@ -11943,12 +11950,11 @@ msgstr "缺少「platform-toolsã€è³‡æ–™å¤¾ï¼"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK platform-tools' adb command."
-msgstr ""
+msgstr "找ä¸åˆ° Android SDK platform-tools çš„ adb 指令。"
#: platform/android/export/export.cpp
-#, fuzzy
msgid "Please check in the Android SDK directory specified in Editor Settings."
-msgstr "編輯器設定中用於自定義設定之 Android SDK 路徑無效。"
+msgstr "請檢查 [編輯器設定] 中所指定的 Android SDK 資料夾。"
#: platform/android/export/export.cpp
msgid "Missing 'build-tools' directory!"
@@ -11956,7 +11962,7 @@ msgstr "缺少「build-toolsã€è³‡æ–™å¤¾ï¼"
#: platform/android/export/export.cpp
msgid "Unable to find Android SDK build-tools' apksigner command."
-msgstr ""
+msgstr "找ä¸åˆ° Android SDK build-tools çš„ apksigner 指令。"
#: platform/android/export/export.cpp
msgid "Invalid public key for APK expansion."
@@ -12391,32 +12397,27 @@ msgstr "ARVROrigin 必須有一個 ARVRCamera å­ç¯€é»žã€‚"
#: scene/3d/baked_lightmap.cpp
msgid "Finding meshes and lights"
-msgstr ""
+msgstr "正在尋找網格與光照"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing geometry (%d/%d)"
-msgstr "正在解æžå¤šé‚Šå½¢..."
+msgstr "正在解æžå¹¾ä½• (%d/%d)"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Preparing environment"
-msgstr "檢視環境"
+msgstr "正在準備環境"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Generating capture"
-msgstr "正在產生光照圖"
+msgstr "æ­£åœ¨ç”¢ç”Ÿæ•æ‰"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Saving lightmaps"
-msgstr "正在產生光照圖"
+msgstr "正在ä¿å­˜å…‰ç…§åœ–"
#: scene/3d/baked_lightmap.cpp
-#, fuzzy
msgid "Done"
-msgstr "完æˆï¼"
+msgstr "完æˆ"
#: scene/3d/collision_object.cpp
msgid ""
@@ -12794,7 +12795,7 @@ msgstr "Viewport 大å°å¿…須大於 0 æ‰å¯é€²è¡Œç®—繪。"
msgid ""
"The sampler port is connected but not used. Consider changing the source to "
"'SamplerPort'."
-msgstr ""
+msgstr "å·²é€£ç·šè‡³å–æ¨£å™¨é€£çµåŸ ä½†ä¸¦æœªä½¿ç”¨ã€‚建議將來æºè¨­ç‚ºã€ŒSamplerPortã€ã€‚"
#: scene/resources/visual_shader_nodes.cpp
msgid "Invalid source for preview."
diff --git a/main/main.cpp b/main/main.cpp
index 58782fa9c1..41f97b2e3b 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -71,7 +71,6 @@
#include "servers/physics_server_3d.h"
#include "servers/register_server_types.h"
#include "servers/rendering/rendering_server_default.h"
-#include "servers/rendering/rendering_server_wrap_mt.h"
#include "servers/text_server.h"
#include "servers/xr_server.h"
@@ -124,7 +123,9 @@ static bool _start_success = false;
// Drivers
+String tablet_driver = "";
String text_driver = "";
+
static int text_driver_idx = -1;
static int display_driver_idx = -1;
static int audio_driver_idx = -1;
@@ -171,6 +172,8 @@ static bool disable_render_loop = false;
static int fixed_fps = -1;
static bool print_fps = false;
+bool profile_gpu = false;
+
/* Helper methods */
// Used by Mono module, should likely be registered in Engine singleton instead
@@ -263,27 +266,27 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print("\n");
OS::get_singleton()->print("General options:\n");
- OS::get_singleton()->print(" -h, --help Display this help message.\n");
- OS::get_singleton()->print(" --version Display the version string.\n");
- OS::get_singleton()->print(" -v, --verbose Use verbose stdout mode.\n");
- OS::get_singleton()->print(" --quiet Quiet mode, silences stdout messages. Errors are still displayed.\n");
+ OS::get_singleton()->print(" -h, --help Display this help message.\n");
+ OS::get_singleton()->print(" --version Display the version string.\n");
+ OS::get_singleton()->print(" -v, --verbose Use verbose stdout mode.\n");
+ OS::get_singleton()->print(" --quiet Quiet mode, silences stdout messages. Errors are still displayed.\n");
OS::get_singleton()->print("\n");
OS::get_singleton()->print("Run options:\n");
#ifdef TOOLS_ENABLED
- OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n");
- OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n");
+ OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n");
+ OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n");
#endif
- OS::get_singleton()->print(" -q, --quit Quit after the first iteration.\n");
- OS::get_singleton()->print(" -l, --language <locale> Use a specific locale (<locale> being a two-letter code).\n");
- OS::get_singleton()->print(" --path <directory> Path to a project (<directory> must contain a 'project.godot' file).\n");
- OS::get_singleton()->print(" -u, --upwards Scan folders upwards for project.godot file.\n");
- OS::get_singleton()->print(" --main-pack <file> Path to a pack (.pck) file to load.\n");
- OS::get_singleton()->print(" --render-thread <mode> Render thread mode ('unsafe', 'safe', 'separate').\n");
- OS::get_singleton()->print(" --remote-fs <address> Remote filesystem (<host/IP>[:<port>] address).\n");
- OS::get_singleton()->print(" --remote-fs-password <password> Password for remote filesystem.\n");
-
- OS::get_singleton()->print(" --audio-driver <driver> Audio driver [");
+ OS::get_singleton()->print(" -q, --quit Quit after the first iteration.\n");
+ OS::get_singleton()->print(" -l, --language <locale> Use a specific locale (<locale> being a two-letter code).\n");
+ OS::get_singleton()->print(" --path <directory> Path to a project (<directory> must contain a 'project.godot' file).\n");
+ OS::get_singleton()->print(" -u, --upwards Scan folders upwards for project.godot file.\n");
+ OS::get_singleton()->print(" --main-pack <file> Path to a pack (.pck) file to load.\n");
+ OS::get_singleton()->print(" --render-thread <mode> Render thread mode ('unsafe', 'safe', 'separate').\n");
+ OS::get_singleton()->print(" --remote-fs <address> Remote filesystem (<host/IP>[:<port>] address).\n");
+ OS::get_singleton()->print(" --remote-fs-password <password> Password for remote filesystem.\n");
+
+ OS::get_singleton()->print(" --audio-driver <driver> Audio driver [");
for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) {
if (i > 0) {
OS::get_singleton()->print(", ");
@@ -292,7 +295,7 @@ void Main::print_help(const char *p_binary) {
}
OS::get_singleton()->print("].\n");
- OS::get_singleton()->print(" --display-driver <driver> Display driver (and rendering driver) [");
+ OS::get_singleton()->print(" --display-driver <driver> Display driver (and rendering driver) [");
for (int i = 0; i < DisplayServer::get_create_function_count(); i++) {
if (i > 0) {
OS::get_singleton()->print(", ");
@@ -309,72 +312,68 @@ void Main::print_help(const char *p_binary) {
}
OS::get_singleton()->print("].\n");
- OS::get_singleton()->print(" --rendering-driver <driver> Rendering driver (depends on display driver).\n");
+ OS::get_singleton()->print(" --rendering-driver <driver> Rendering driver (depends on display driver).\n");
- OS::get_singleton()->print(" --text-driver <driver> Text driver (Fonts, BiDi, shaping)\n");
+ OS::get_singleton()->print(" --text-driver <driver> Text driver (Fonts, BiDi, shaping)\n");
OS::get_singleton()->print("\n");
#ifndef SERVER_ENABLED
OS::get_singleton()->print("Display options:\n");
- OS::get_singleton()->print(" -f, --fullscreen Request fullscreen mode.\n");
- OS::get_singleton()->print(" -m, --maximized Request a maximized window.\n");
- OS::get_singleton()->print(" -w, --windowed Request windowed mode.\n");
- OS::get_singleton()->print(" -t, --always-on-top Request an always-on-top window.\n");
- OS::get_singleton()->print(" --resolution <W>x<H> Request window resolution.\n");
- OS::get_singleton()->print(" --position <X>,<Y> Request window position.\n");
- OS::get_singleton()->print(" --low-dpi Force low-DPI mode (macOS and Windows only).\n");
- OS::get_singleton()->print(" --no-window Disable window creation (Windows only). Useful together with --script.\n");
- OS::get_singleton()->print(" --enable-vsync-via-compositor When vsync is enabled, vsync via the OS' window compositor (Windows only).\n");
- OS::get_singleton()->print(" --disable-vsync-via-compositor Disable vsync via the OS' window compositor (Windows only).\n");
- OS::get_singleton()->print(" --single-window Use a single window (no separate subwindows).\n");
- OS::get_singleton()->print(" --tablet-driver Tablet input driver (");
- for (int i = 0; i < OS::get_singleton()->get_tablet_driver_count(); i++) {
- if (i != 0)
- OS::get_singleton()->print(", ");
- OS::get_singleton()->print("'%s'", OS::get_singleton()->get_tablet_driver_name(i).utf8().get_data());
- }
- OS::get_singleton()->print(") (Windows only).\n");
+ OS::get_singleton()->print(" -f, --fullscreen Request fullscreen mode.\n");
+ OS::get_singleton()->print(" -m, --maximized Request a maximized window.\n");
+ OS::get_singleton()->print(" -w, --windowed Request windowed mode.\n");
+ OS::get_singleton()->print(" -t, --always-on-top Request an always-on-top window.\n");
+ OS::get_singleton()->print(" --resolution <W>x<H> Request window resolution.\n");
+ OS::get_singleton()->print(" --position <X>,<Y> Request window position.\n");
+ OS::get_singleton()->print(" --low-dpi Force low-DPI mode (macOS and Windows only).\n");
+ OS::get_singleton()->print(" --no-window Disable window creation (Windows only). Useful together with --script.\n");
+ OS::get_singleton()->print(" --enable-vsync-via-compositor When vsync is enabled, vsync via the OS' window compositor (Windows only).\n");
+ OS::get_singleton()->print(" --disable-vsync-via-compositor Disable vsync via the OS' window compositor (Windows only).\n");
+ OS::get_singleton()->print(" --single-window Use a single window (no separate subwindows).\n");
+ OS::get_singleton()->print(" --tablet-driver Pen tablet input driver.\n");
OS::get_singleton()->print("\n");
#endif
OS::get_singleton()->print("Debug options:\n");
- OS::get_singleton()->print(" -d, --debug Debug (local stdout debugger).\n");
- OS::get_singleton()->print(" -b, --breakpoints Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).\n");
- OS::get_singleton()->print(" --profiling Enable profiling in the script debugger.\n");
- OS::get_singleton()->print(" --vk-layers Enable Vulkan Validation layers for debugging.\n");
+ OS::get_singleton()->print(" -d, --debug Debug (local stdout debugger).\n");
+ OS::get_singleton()->print(" -b, --breakpoints Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).\n");
+ OS::get_singleton()->print(" --profiling Enable profiling in the script debugger.\n");
+ OS::get_singleton()->print(" --vk-layers Enable Vulkan Validation layers for debugging.\n");
#if DEBUG_ENABLED
- OS::get_singleton()->print(" --gpu-abort Abort on GPU errors (usually validation layer errors), may help see the problem if your system freezes.\n");
+ OS::get_singleton()->print(" --gpu-abort Abort on GPU errors (usually validation layer errors), may help see the problem if your system freezes.\n");
#endif
- OS::get_singleton()->print(" --remote-debug <uri> Remote debug (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007).\n");
+ OS::get_singleton()->print(" --remote-debug <uri> Remote debug (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007).\n");
#if defined(DEBUG_ENABLED) && !defined(SERVER_ENABLED)
- OS::get_singleton()->print(" --debug-collisions Show collision shapes when running the scene.\n");
- OS::get_singleton()->print(" --debug-navigation Show navigation polygons when running the scene.\n");
+ OS::get_singleton()->print(" --debug-collisions Show collision shapes when running the scene.\n");
+ OS::get_singleton()->print(" --debug-navigation Show navigation polygons when running the scene.\n");
#endif
- OS::get_singleton()->print(" --frame-delay <ms> Simulate high CPU load (delay each frame by <ms> milliseconds).\n");
- OS::get_singleton()->print(" --time-scale <scale> Force time scale (higher values are faster, 1.0 is normal speed).\n");
- OS::get_singleton()->print(" --disable-render-loop Disable render loop so rendering only occurs when called explicitly from script.\n");
- OS::get_singleton()->print(" --disable-crash-handler Disable crash handler when supported by the platform code.\n");
- OS::get_singleton()->print(" --fixed-fps <fps> Force a fixed number of frames per second. This setting disables real-time synchronization.\n");
- OS::get_singleton()->print(" --print-fps Print the frames per second to the stdout.\n");
+ OS::get_singleton()->print(" --frame-delay <ms> Simulate high CPU load (delay each frame by <ms> milliseconds).\n");
+ OS::get_singleton()->print(" --time-scale <scale> Force time scale (higher values are faster, 1.0 is normal speed).\n");
+ OS::get_singleton()->print(" --disable-render-loop Disable render loop so rendering only occurs when called explicitly from script.\n");
+ OS::get_singleton()->print(" --disable-crash-handler Disable crash handler when supported by the platform code.\n");
+ OS::get_singleton()->print(" --fixed-fps <fps> Force a fixed number of frames per second. This setting disables real-time synchronization.\n");
+ OS::get_singleton()->print(" --print-fps Print the frames per second to the stdout.\n");
+ OS::get_singleton()->print(" --profile-gpu Show a simple profile of the tasks that took more time during frame rendering.\n");
OS::get_singleton()->print("\n");
OS::get_singleton()->print("Standalone tools:\n");
- OS::get_singleton()->print(" -s, --script <script> Run a script.\n");
- OS::get_singleton()->print(" --check-only Only parse for errors and quit (use with --script).\n");
+ OS::get_singleton()->print(" -s, --script <script> Run a script.\n");
+ OS::get_singleton()->print(" --check-only Only parse for errors and quit (use with --script).\n");
#ifdef TOOLS_ENABLED
- OS::get_singleton()->print(" --export <preset> <path> Export the project using the given preset and matching release template. The preset name should match one defined in export_presets.cfg.\n");
- OS::get_singleton()->print(" <path> should be absolute or relative to the project directory, and include the filename for the binary (e.g. 'builds/game.exe'). The target directory should exist.\n");
- OS::get_singleton()->print(" --export-debug <preset> <path> Same as --export, but using the debug template.\n");
- OS::get_singleton()->print(" --export-pack <preset> <path> Same as --export, but only export the game pack for the given preset. The <path> extension determines whether it will be in PCK or ZIP format.\n");
- OS::get_singleton()->print(" --doctool <path> Dump the engine API reference to the given <path> in XML format, merging if existing files are found.\n");
- OS::get_singleton()->print(" --no-docbase Disallow dumping the base types (used with --doctool).\n");
- OS::get_singleton()->print(" --build-solutions Build the scripting solutions (e.g. for C# projects). Implies --editor and requires a valid project to edit.\n");
+ OS::get_singleton()->print(" --export <preset> <path> Export the project using the given preset and matching release template. The preset name should match one defined in export_presets.cfg.\n");
+ OS::get_singleton()->print(" <path> should be absolute or relative to the project directory, and include the filename for the binary (e.g. 'builds/game.exe'). The target directory should exist.\n");
+ OS::get_singleton()->print(" --export-debug <preset> <path> Same as --export, but using the debug template.\n");
+ OS::get_singleton()->print(" --export-pack <preset> <path> Same as --export, but only export the game pack for the given preset. The <path> extension determines whether it will be in PCK or ZIP format.\n");
+ OS::get_singleton()->print(" --doctool <path> Dump the engine API reference to the given <path> in XML format, merging if existing files are found.\n");
+ OS::get_singleton()->print(" --no-docbase Disallow dumping the base types (used with --doctool).\n");
+ OS::get_singleton()->print(" --build-solutions Build the scripting solutions (e.g. for C# projects). Implies --editor and requires a valid project to edit.\n");
#ifdef DEBUG_METHODS_ENABLED
- OS::get_singleton()->print(" --gdnative-generate-json-api Generate JSON dump of the Godot API for GDNative bindings.\n");
+ OS::get_singleton()->print(" --gdnative-generate-json-api <path> Generate JSON dump of the Godot API for GDNative bindings and save it on the file specified in <path>.\n");
+ OS::get_singleton()->print(" --gdnative-generate-json-builtin-api <path> Generate JSON dump of the Godot API of the builtin Variant types and utility functions for GDNative bindings and save it on the file specified in <path>.\n");
#endif
#ifdef TESTS_ENABLED
- OS::get_singleton()->print(" --test [--help] Run unit tests. Use --test --help for more information.\n");
+ OS::get_singleton()->print(" --test [--help] Run unit tests. Use --test --help for more information.\n");
#endif
OS::get_singleton()->print("\n");
#endif
@@ -388,8 +387,6 @@ Error Main::test_setup() {
engine = memnew(Engine);
- ClassDB::init();
-
register_core_types();
register_core_driver_types();
@@ -507,8 +504,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
engine = memnew(Engine);
- ClassDB::init();
-
MAIN_PRINT("Main: Initialize CORE");
register_core_types();
@@ -516,10 +511,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
MAIN_PRINT("Main: Initialize Globals");
- Thread::_main_thread_id = Thread::get_caller_id();
-
- globals = memnew(ProjectSettings);
input_map = memnew(InputMap);
+ globals = memnew(ProjectSettings);
register_core_settings(); //here globals is present
@@ -559,7 +552,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
String display_driver = "";
String audio_driver = "";
- String tablet_driver = "";
String project_path = ".";
bool upwards = false;
String debug_uri = "";
@@ -728,19 +720,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else if (I->get() == "--tablet-driver") {
if (I->next()) {
tablet_driver = I->next()->get();
- bool found = false;
- for (int i = 0; i < OS::get_singleton()->get_tablet_driver_count(); i++) {
- if (tablet_driver == OS::get_singleton()->get_tablet_driver_name(i)) {
- found = true;
- }
- }
-
- if (!found) {
- OS::get_singleton()->print("Unknown tablet driver '%s', aborting.\n",
- tablet_driver.utf8().get_data());
- goto error;
- }
-
N = I->next()->next();
} else {
OS::get_singleton()->print("Missing tablet driver argument, aborting.\n");
@@ -880,7 +859,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
auto_build_solutions = true;
editor = true;
#ifdef DEBUG_METHODS_ENABLED
- } else if (I->get() == "--gdnative-generate-json-api") {
+ } else if (I->get() == "--gdnative-generate-json-api" || I->get() == "--gdnative-generate-json-builtin-api") {
// Register as an editor instance to use low-end fallback if relevant.
editor = true;
@@ -1010,6 +989,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
} else if (I->get() == "--print-fps") {
print_fps = true;
+ } else if (I->get() == "--profile-gpu") {
+ profile_gpu = true;
} else if (I->get() == "--disable-crash-handler") {
OS::get_singleton()->disable_crash_handler();
} else if (I->get() == "--skip-breakpoints") {
@@ -1126,29 +1107,29 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
#endif
- GLOBAL_DEF("logging/file_logging/enable_file_logging", false);
+ GLOBAL_DEF("debug/file_logging/enable_file_logging", false);
// Only file logging by default on desktop platforms as logs can't be
// accessed easily on mobile/Web platforms (if at all).
// This also prevents logs from being created for the editor instance, as feature tags
// are disabled while in the editor (even if they should logically apply).
- GLOBAL_DEF("logging/file_logging/enable_file_logging.pc", true);
- GLOBAL_DEF("logging/file_logging/log_path", "user://logs/godot.log");
- GLOBAL_DEF("logging/file_logging/max_log_files", 5);
- ProjectSettings::get_singleton()->set_custom_property_info("logging/file_logging/max_log_files",
+ GLOBAL_DEF("debug/file_logging/enable_file_logging.pc", true);
+ GLOBAL_DEF("debug/file_logging/log_path", "user://logs/godot.log");
+ GLOBAL_DEF("debug/file_logging/max_log_files", 5);
+ ProjectSettings::get_singleton()->set_custom_property_info("debug/file_logging/max_log_files",
PropertyInfo(Variant::INT,
- "logging/file_logging/max_log_files",
+ "debug/file_logging/max_log_files",
PROPERTY_HINT_RANGE,
"0,20,1,or_greater")); //no negative numbers
if (!project_manager && !editor && FileAccess::get_create_func(FileAccess::ACCESS_USERDATA) &&
- GLOBAL_GET("logging/file_logging/enable_file_logging")) {
+ GLOBAL_GET("debug/file_logging/enable_file_logging")) {
// Don't create logs for the project manager as they would be written to
// the current working directory, which is inconvenient.
- String base_path = GLOBAL_GET("logging/file_logging/log_path");
- int max_files = GLOBAL_GET("logging/file_logging/max_log_files");
+ String base_path = GLOBAL_GET("debug/file_logging/log_path");
+ int max_files = GLOBAL_GET("debug/file_logging/max_log_files");
OS::get_singleton()->add_logger(memnew(RotatedFileLogger(base_path, max_files)));
}
- if (main_args.size() == 0 && String(GLOBAL_DEF("application/run/main_scene", "")) == "") {
+ if (main_args.size() == 0 && String(GLOBAL_GET("application/run/main_scene")) == "") {
#ifdef TOOLS_ENABLED
if (!editor && !project_manager) {
#endif
@@ -1180,28 +1161,28 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->set_cmdline(execpath, main_args);
- GLOBAL_DEF("rendering/quality/driver/driver_name", "Vulkan");
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_name",
+ GLOBAL_DEF("rendering/driver/driver_name", "Vulkan");
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/driver/driver_name",
PropertyInfo(Variant::STRING,
- "rendering/quality/driver/driver_name",
+ "rendering/driver/driver_name",
PROPERTY_HINT_ENUM, "Vulkan"));
if (display_driver == "") {
- display_driver = GLOBAL_GET("rendering/quality/driver/driver_name");
+ display_driver = GLOBAL_GET("rendering/driver/driver_name");
}
- GLOBAL_DEF("display/window/size/width", 1024);
+ GLOBAL_DEF_BASIC("display/window/size/width", 1024);
ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/width",
PropertyInfo(Variant::INT, "display/window/size/width",
PROPERTY_HINT_RANGE,
"0,7680,or_greater")); // 8K resolution
- GLOBAL_DEF("display/window/size/height", 600);
+ GLOBAL_DEF_BASIC("display/window/size/height", 600);
ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/height",
PropertyInfo(Variant::INT, "display/window/size/height",
PROPERTY_HINT_RANGE,
"0,4320,or_greater")); // 8K resolution
- GLOBAL_DEF("display/window/size/resizable", true);
- GLOBAL_DEF("display/window/size/borderless", false);
- GLOBAL_DEF("display/window/size/fullscreen", false);
+ GLOBAL_DEF_BASIC("display/window/size/resizable", true);
+ GLOBAL_DEF_BASIC("display/window/size/borderless", false);
+ GLOBAL_DEF_BASIC("display/window/size/fullscreen", false);
GLOBAL_DEF("display/window/size/always_on_top", false);
GLOBAL_DEF("display/window/size/test_width", 0);
ProjectSettings::get_singleton()->set_custom_property_info("display/window/size/test_width",
@@ -1249,7 +1230,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
}
- GLOBAL_DEF("display/window/force_right_to_left_layout_direction", false);
+ GLOBAL_DEF("internationalization/rendering/force_right_to_left_layout_direction", false);
if (!force_lowdpi) {
OS::get_singleton()->_allow_hidpi = GLOBAL_DEF("display/window/dpi/allow_hidpi", false);
@@ -1268,28 +1249,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->_vsync_via_compositor = window_vsync_via_compositor;
- if (tablet_driver == "") { // specified in project.godot
- tablet_driver = GLOBAL_DEF_RST_NOVAL("display/window/tablet_driver", OS::get_singleton()->get_tablet_driver_name(0));
- }
-
- for (int i = 0; i < OS::get_singleton()->get_tablet_driver_count(); i++) {
- if (tablet_driver == OS::get_singleton()->get_tablet_driver_name(i)) {
- OS::get_singleton()->set_current_tablet_driver(OS::get_singleton()->get_tablet_driver_name(i));
- break;
- }
- }
-
- if (tablet_driver == "") {
- OS::get_singleton()->set_current_tablet_driver(OS::get_singleton()->get_tablet_driver_name(0));
- }
-
/* todo restore
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);
*/
- GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2);
- GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3);
-
if (editor || project_manager) {
// The editor and project manager always detect and use hiDPI if needed
OS::get_singleton()->_allow_hidpi = true;
@@ -1298,7 +1261,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->_keep_screen_on = GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true);
if (rtm == -1) {
- rtm = GLOBAL_DEF("rendering/threads/thread_model", OS::RENDER_THREAD_SAFE);
+ rtm = GLOBAL_DEF("rendering/driver/threads/thread_model", OS::RENDER_THREAD_SAFE);
}
if (rtm >= 0 && rtm < 3) {
@@ -1326,7 +1289,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
if (audio_driver == "") { // specified in project.godot
- audio_driver = GLOBAL_DEF_RST_NOVAL("audio/driver", AudioDriverManager::get_driver(0)->get_name());
+ audio_driver = GLOBAL_DEF_RST_NOVAL("audio/driver/driver", AudioDriverManager::get_driver(0)->get_name());
}
for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) {
@@ -1360,7 +1323,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
}
- Engine::get_singleton()->set_iterations_per_second(GLOBAL_DEF("physics/common/physics_fps", 60));
+ Engine::get_singleton()->set_iterations_per_second(GLOBAL_DEF_BASIC("physics/common/physics_fps", 60));
ProjectSettings::get_singleton()->set_custom_property_info("physics/common/physics_fps",
PropertyInfo(Variant::INT, "physics/common/physics_fps",
PROPERTY_HINT_RANGE, "1,120,1,or_greater"));
@@ -1469,15 +1432,16 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
// Print engine name and version
print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE));
+#if !defined(NO_THREADS)
if (p_main_tid_override) {
- Thread::_main_thread_id = p_main_tid_override;
+ Thread::main_thread_id = p_main_tid_override;
}
+#endif
/* Determine text driver */
- GLOBAL_DEF("display/window/text_name", "");
if (text_driver == "") {
- text_driver = GLOBAL_GET("display/window/text_name");
+ text_driver = GLOBAL_GET("internationalization/rendering/text_driver");
}
if (text_driver != "") {
@@ -1506,7 +1470,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
}
}
}
- printf("Using %s text server...\n", TextServerManager::get_interface_name(text_driver_idx).utf8().get_data());
+ print_verbose("Using \"" + TextServerManager::get_interface_name(text_driver_idx) + "\" text server...");
/* Initialize Text Server */
@@ -1566,18 +1530,45 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
display_server->screen_set_orientation(window_orientation);
}
- /* Initialize Visual Server */
+ /* Initialize Pen Table Driver */
+
+ {
+ GLOBAL_DEF_RST_NOVAL("input_devices/pen_tablet/driver", "");
+ GLOBAL_DEF_RST_NOVAL("input_devices/pen_tablet/driver.windows", "");
+ ProjectSettings::get_singleton()->set_custom_property_info("input_devices/pen_tablet/driver.windows", PropertyInfo(Variant::STRING, "input_devices/pen_tablet/driver.windows", PROPERTY_HINT_ENUM, "wintab,winink"));
+ }
+
+ if (tablet_driver == "") { // specified in project.godot
+ tablet_driver = GLOBAL_GET("input_devices/pen_tablet/driver");
+ if (tablet_driver == "") {
+ tablet_driver = DisplayServer::get_singleton()->tablet_get_driver_name(0);
+ }
+ }
- rendering_server = memnew(RenderingServerDefault);
- if (OS::get_singleton()->get_render_thread_mode() != OS::RENDER_THREAD_UNSAFE) {
- rendering_server = memnew(RenderingServerWrapMT(rendering_server,
- OS::get_singleton()->get_render_thread_mode() ==
- OS::RENDER_SEPARATE_THREAD));
+ for (int i = 0; i < DisplayServer::get_singleton()->tablet_get_driver_count(); i++) {
+ if (tablet_driver == DisplayServer::get_singleton()->tablet_get_driver_name(i)) {
+ DisplayServer::get_singleton()->tablet_set_current_driver(DisplayServer::get_singleton()->tablet_get_driver_name(i));
+ break;
+ }
}
+ if (DisplayServer::get_singleton()->tablet_get_current_driver() == "") {
+ DisplayServer::get_singleton()->tablet_set_current_driver(DisplayServer::get_singleton()->tablet_get_driver_name(0));
+ }
+
+ print_verbose("Using \"" + tablet_driver + "\" pen tablet driver...");
+
+ /* Initialize Visual Server */
+
+ rendering_server = memnew(RenderingServerDefault(OS::get_singleton()->get_render_thread_mode() == OS::RENDER_SEPARATE_THREAD));
+
rendering_server->init();
rendering_server->set_render_loop_enabled(!disable_render_loop);
+ if (profile_gpu) {
+ rendering_server->set_print_gpu_profile(true);
+ }
+
OS::get_singleton()->initialize_joypads();
/* Initialize Audio Driver */
@@ -1602,7 +1593,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
MAIN_PRINT("Main: Setup Logo");
-#ifdef JAVASCRIPT_ENABLED
+#if defined(JAVASCRIPT_ENABLED) || defined(ANDROID_ENABLED)
bool show_logo = false;
#else
bool show_logo = true;
@@ -1628,9 +1619,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
register_server_types();
- MAIN_PRINT("Main: Load Remaps");
+ MAIN_PRINT("Main: Load Boot Image");
- Color clear = GLOBAL_DEF("rendering/environment/default_clear_color", Color(0.3, 0.3, 0.3));
+ Color clear = GLOBAL_DEF("rendering/environment/defaults/default_clear_color", Color(0.3, 0.3, 0.3));
RenderingServer::get_singleton()->set_default_clear_color(clear);
if (show_logo) { //boot logo!
@@ -1683,8 +1674,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
MAIN_PRINT("Main: DCC");
RenderingServer::get_singleton()->set_default_clear_color(
- GLOBAL_DEF("rendering/environment/default_clear_color", Color(0.3, 0.3, 0.3)));
- MAIN_PRINT("Main: END");
+ GLOBAL_DEF("rendering/environment/defaults/default_clear_color", Color(0.3, 0.3, 0.3)));
GLOBAL_DEF("application/config/icon", String());
ProjectSettings::get_singleton()->set_custom_property_info("application/config/icon",
@@ -1722,7 +1712,16 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
id->set_emulate_mouse_from_touch(bool(GLOBAL_DEF("input_devices/pointing/emulate_mouse_from_touch", true)));
}
- MAIN_PRINT("Main: Load Remaps");
+ MAIN_PRINT("Main: Load Translations and Remaps");
+
+ translation_server->setup(); //register translations, load them, etc.
+ if (locale != "") {
+ translation_server->set_locale(locale);
+ }
+ translation_server->load_translations();
+ ResourceLoader::load_translation_remaps(); //load remaps for resources
+
+ ResourceLoader::load_path_remaps();
MAIN_PRINT("Main: Load Scene Types");
@@ -1768,17 +1767,6 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
// This loads global classes, so it must happen before custom loaders and savers are registered
ScriptServer::init_languages();
- MAIN_PRINT("Main: Load Translations");
-
- translation_server->setup(); //register translations, load them, etc.
- if (locale != "") {
- translation_server->set_locale(locale);
- }
- translation_server->load_translations();
- ResourceLoader::load_translation_remaps(); //load remaps for resources
-
- ResourceLoader::load_path_remaps();
-
audio_server->load_default_bus_layout();
if (use_debug_profiler && EngineDebugger::is_active()) {
@@ -1973,8 +1961,8 @@ bool Main::start() {
#endif
- if (script == "" && game_path == "" && String(GLOBAL_DEF("application/run/main_scene", "")) != "") {
- game_path = GLOBAL_DEF("application/run/main_scene", "");
+ if (script == "" && game_path == "" && String(GLOBAL_GET("application/run/main_scene")) != "") {
+ game_path = GLOBAL_GET("application/run/main_scene");
}
MainLoop *main_loop = nullptr;
@@ -2146,18 +2134,13 @@ bool Main::start() {
}
#endif
- {
- int directional_atlas_size = GLOBAL_GET("rendering/quality/directional_shadow/size");
- RenderingServer::get_singleton()->directional_shadow_atlas_set_size(directional_atlas_size);
- }
-
if (!editor && !project_manager) {
//standard helpers that can be changed from main config
- String stretch_mode = GLOBAL_DEF("display/window/stretch/mode", "disabled");
- String stretch_aspect = GLOBAL_DEF("display/window/stretch/aspect", "ignore");
- Size2i stretch_size = Size2i(GLOBAL_DEF("display/window/size/width", 0),
- GLOBAL_DEF("display/window/size/height", 0));
+ String stretch_mode = GLOBAL_DEF_BASIC("display/window/stretch/mode", "disabled");
+ String stretch_aspect = GLOBAL_DEF_BASIC("display/window/stretch/aspect", "ignore");
+ Size2i stretch_size = Size2i(GLOBAL_DEF_BASIC("display/window/size/width", 0),
+ GLOBAL_DEF_BASIC("display/window/size/height", 0));
Window::ContentScaleMode cs_sm = Window::CONTENT_SCALE_MODE_DISABLED;
if (stretch_mode == "canvas_items") {
@@ -2194,49 +2177,33 @@ bool Main::start() {
DisplayServer::get_singleton()->window_set_title(appname);
#endif
- int shadow_atlas_size = GLOBAL_GET("rendering/quality/shadow_atlas/size");
- int shadow_atlas_q0_subdiv = GLOBAL_GET("rendering/quality/shadow_atlas/quadrant_0_subdiv");
- int shadow_atlas_q1_subdiv = GLOBAL_GET("rendering/quality/shadow_atlas/quadrant_1_subdiv");
- int shadow_atlas_q2_subdiv = GLOBAL_GET("rendering/quality/shadow_atlas/quadrant_2_subdiv");
- int shadow_atlas_q3_subdiv = GLOBAL_GET("rendering/quality/shadow_atlas/quadrant_3_subdiv");
-
- sml->get_root()->set_shadow_atlas_size(shadow_atlas_size);
- sml->get_root()->set_shadow_atlas_quadrant_subdiv(0, Viewport::ShadowAtlasQuadrantSubdiv(
- shadow_atlas_q0_subdiv));
- sml->get_root()->set_shadow_atlas_quadrant_subdiv(1, Viewport::ShadowAtlasQuadrantSubdiv(
- shadow_atlas_q1_subdiv));
- sml->get_root()->set_shadow_atlas_quadrant_subdiv(2, Viewport::ShadowAtlasQuadrantSubdiv(
- shadow_atlas_q2_subdiv));
- sml->get_root()->set_shadow_atlas_quadrant_subdiv(3, Viewport::ShadowAtlasQuadrantSubdiv(
- shadow_atlas_q3_subdiv));
-
bool snap_controls = GLOBAL_DEF("gui/common/snap_controls_to_pixels", true);
sml->get_root()->set_snap_controls_to_pixels(snap_controls);
- bool font_oversampling = GLOBAL_DEF("rendering/quality/dynamic_fonts/use_oversampling", true);
+ bool font_oversampling = GLOBAL_DEF("gui/fonts/dynamic_fonts/use_oversampling", true);
sml->get_root()->set_use_font_oversampling(font_oversampling);
- int texture_filter = GLOBAL_DEF("rendering/canvas_textures/default_texture_filter", 1);
- int texture_repeat = GLOBAL_DEF("rendering/canvas_textures/default_texture_repeat", 0);
+ int texture_filter = GLOBAL_DEF("rendering/textures/canvas_textures/default_texture_filter", 1);
+ int texture_repeat = GLOBAL_DEF("rendering/textures/canvas_textures/default_texture_repeat", 0);
sml->get_root()->set_default_canvas_item_texture_filter(
Viewport::DefaultCanvasItemTextureFilter(texture_filter));
sml->get_root()->set_default_canvas_item_texture_repeat(
Viewport::DefaultCanvasItemTextureRepeat(texture_repeat));
} else {
- GLOBAL_DEF("display/window/stretch/mode", "disabled");
+ GLOBAL_DEF_BASIC("display/window/stretch/mode", "disabled");
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/mode",
PropertyInfo(Variant::STRING,
"display/window/stretch/mode",
PROPERTY_HINT_ENUM,
"disabled,canvas_items,viewport"));
- GLOBAL_DEF("display/window/stretch/aspect", "ignore");
+ GLOBAL_DEF_BASIC("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.0);
+ GLOBAL_DEF_BASIC("display/window/stretch/shrink", 1.0);
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/shrink",
PropertyInfo(Variant::FLOAT,
"display/window/stretch/shrink",
@@ -2244,18 +2211,18 @@ bool Main::start() {
"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);
- GLOBAL_DEF("rendering/quality/dynamic_fonts/use_oversampling", true);
+ GLOBAL_DEF_BASIC("gui/common/snap_controls_to_pixels", true);
+ GLOBAL_DEF_BASIC("gui/fonts/dynamic_fonts/use_oversampling", true);
- GLOBAL_DEF("rendering/canvas_textures/default_texture_filter", 1);
+ GLOBAL_DEF_BASIC("rendering/textures/canvas_textures/default_texture_filter", 1);
ProjectSettings::get_singleton()->set_custom_property_info(
- "rendering/canvas_textures/default_texture_filter",
- PropertyInfo(Variant::INT, "rendering/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM,
+ "rendering/textures/canvas_textures/default_texture_filter",
+ PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM,
"Nearest,Linear,MipmapLinear,MipmapNearest"));
- GLOBAL_DEF("rendering/canvas_textures/default_texture_repeat", 0);
+ GLOBAL_DEF_BASIC("rendering/textures/canvas_textures/default_texture_repeat", 0);
ProjectSettings::get_singleton()->set_custom_property_info(
- "rendering/canvas_textures/default_texture_repeat",
- PropertyInfo(Variant::INT, "rendering/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM,
+ "rendering/textures/canvas_textures/default_texture_repeat",
+ PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM,
"Disable,Enable,Mirror"));
}
@@ -2469,6 +2436,7 @@ bool Main::iteration() {
for (int iters = 0; iters < advance.physics_steps; ++iters) {
uint64_t physics_begin = OS::get_singleton()->get_ticks_usec();
+ PhysicsServer3D::get_singleton()->sync();
PhysicsServer3D::get_singleton()->flush_queries();
PhysicsServer2D::get_singleton()->sync();
@@ -2483,6 +2451,7 @@ bool Main::iteration() {
message_queue->flush();
+ PhysicsServer3D::get_singleton()->end_sync();
PhysicsServer3D::get_singleton()->step(physics_step * time_scale);
PhysicsServer2D::get_singleton()->end_sync();
diff --git a/main/performance.cpp b/main/performance.cpp
index 1a422dc499..a2e53f2ee2 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -119,7 +119,7 @@ String Performance::get_monitor_name(Monitor p_monitor) const {
"physics_3d/active_objects",
"physics_3d/collision_pairs",
"physics_3d/islands",
- "audio/output_latency",
+ "audio/driver/output_latency",
};
diff --git a/methods.py b/methods.py
index 15eb82ae74..45cfe00959 100644
--- a/methods.py
+++ b/methods.py
@@ -145,34 +145,86 @@ def parse_cg_file(fname, uniforms, sizes, conditionals):
fs.close()
-def detect_modules(at_path):
- module_list = OrderedDict() # name : path
+def detect_modules(search_path, recursive=False):
+ """Detects and collects a list of C++ modules at specified path
- modules_glob = os.path.join(at_path, "*")
- files = glob.glob(modules_glob)
- files.sort() # so register_module_types does not change that often, and also plugins are registered in alphabetic order
+ `search_path` - a directory path containing modules. The path may point to
+ a single module, which may have other nested modules. A module must have
+ "register_types.h", "SCsub", "config.py" files created to be detected.
- for x in files:
- if not is_module(x):
- continue
- name = os.path.basename(x)
- path = x.replace("\\", "/") # win32
- module_list[name] = path
+ `recursive` - if `True`, then all subdirectories are searched for modules as
+ specified by the `search_path`, otherwise collects all modules under the
+ `search_path` directory. If the `search_path` is a module, it is collected
+ in all cases.
- return module_list
+ Returns an `OrderedDict` with module names as keys, and directory paths as
+ values. If a path is relative, then it is a built-in module. If a path is
+ absolute, then it is a custom module collected outside of the engine source.
+ """
+ modules = OrderedDict()
+
+ def add_module(path):
+ module_name = os.path.basename(path)
+ module_path = path.replace("\\", "/") # win32
+ modules[module_name] = module_path
+
+ def is_engine(path):
+ # Prevent recursively detecting modules in self and other
+ # Godot sources when using `custom_modules` build option.
+ version_path = os.path.join(path, "version.py")
+ if os.path.exists(version_path):
+ with open(version_path) as f:
+ if 'short_name = "godot"' in f.read():
+ return True
+ return False
+
+ def get_files(path):
+ files = glob.glob(os.path.join(path, "*"))
+ # Sort so that `register_module_types` does not change that often,
+ # and plugins are registered in alphabetic order as well.
+ files.sort()
+ return files
+
+ if not recursive:
+ if is_module(search_path):
+ add_module(search_path)
+ for path in get_files(search_path):
+ if is_engine(path):
+ continue
+ if is_module(path):
+ add_module(path)
+ else:
+ to_search = [search_path]
+ while to_search:
+ path = to_search.pop()
+ if is_module(path):
+ add_module(path)
+ for child in get_files(path):
+ if not os.path.isdir(child):
+ continue
+ if is_engine(child):
+ continue
+ to_search.insert(0, child)
+ return modules
def is_module(path):
- return os.path.isdir(path) and os.path.exists(os.path.join(path, "SCsub"))
+ if not os.path.isdir(path):
+ return False
+ must_exist = ["register_types.h", "SCsub", "config.py"]
+ for f in must_exist:
+ if not os.path.exists(os.path.join(path, f)):
+ return False
+ return True
-def write_modules(module_list):
+def write_modules(modules):
includes_cpp = ""
preregister_cpp = ""
register_cpp = ""
unregister_cpp = ""
- for name, path in module_list.items():
+ for name, path in modules.items():
try:
with open(os.path.join(path, "register_types.h")):
includes_cpp += '#include "' + path + '/register_types.h"\n'
@@ -230,8 +282,6 @@ def convert_custom_modules_path(path):
raise ValueError(err_msg % "point to an existing directory.")
if path == os.path.realpath("modules"):
raise ValueError(err_msg % "be a directory other than built-in `modules` directory.")
- if is_module(path):
- raise ValueError(err_msg % "point to a directory with modules, not a single module.")
return path
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index de3cd07a93..c2cfd96da5 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -4,7 +4,7 @@
<meta charset='utf-8' />
<meta name='viewport' content='width=device-width, user-scalable=no' />
<link id='-gd-engine-icon' rel='icon' type='image/png' href='favicon.png' />
- <title></title>
+ <title>Godot Engine Web Editor ($GODOT_VERSION)</title>
<style type='text/css'>
*:focus {
@@ -189,8 +189,17 @@
<br />
<img src="logo.svg" width="1024" height="414" style="width: auto; height: auto; max-width: 85%; max-height: 250px" />
<br />
+ $GODOT_VERSION
+ <br />
+ <a href="releases/">Need an old version?</a>
+ <br />
+ <br />
+ <br />
<label for="zip-file" style="margin-right: 1rem">Preload project ZIP:</label> <input id="zip-file" type="file" id="files" name="files" style="margin-bottom: 1rem"/>
<br />
+<a href="demo.zip">(Try this for example)</a>
+ <br />
+ <br />
<button id="startButton" class="btn" style="margin-bottom: 4rem">Start Godot editor</button>
<br />
<button class="btn" onclick="clearPersistence()">Clear persistent data</button>
@@ -253,9 +262,7 @@
return;
}
Promise.all([
- deleteDB("/home/web_user/projects"),
- deleteDB("/home/web_user/.config"),
- deleteDB("/home/web_user/.cache"),
+ deleteDB("/home/web_user"),
]).then(function(results) {
alert("Done.");
}).catch(function (err) {
@@ -277,6 +284,10 @@
tabs.forEach(function (elem) {
if (elem.id == 'tab-' + name) {
elem.style.display = 'block';
+ if (name == 'editor' || name == 'game') {
+ const canvas = document.getElementById(name + '-canvas');
+ canvas.focus();
+ }
} else {
elem.style.display = 'none';
}
@@ -317,7 +328,7 @@
function startEditor(zip) {
const INDETERMINATE_STATUS_STEP_MS = 100;
- const persistentPaths = ['/home/web_user/.config', '/home/web_user/.cache', '/home/web_user/projects'];
+ const persistentPaths = ['/home/web_user'];
var editorCanvas = document.getElementById('editor-canvas');
var gameCanvas = document.getElementById('game-canvas');
@@ -484,11 +495,11 @@
engine.setUnloadAfterInit(false); // Don't want to reload when starting game.
engine.init('godot.tools').then(function() {
if (zip) {
- engine.copyToFS("/home/web_user/preload.zip", zip);
+ engine.copyToFS("/tmp/preload.zip", zip);
}
try {
// Avoid user creating project in the persistent root folder.
- engine.copyToFS("/home/web_user/projects/keep", new Uint8Array());
+ engine.copyToFS("/home/web_user/keep", new Uint8Array());
} catch(e) {
// File exists
}
diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj
index bd21883259..b9ad431e6e 100644
--- a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj
+++ b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj
@@ -8,11 +8,11 @@
/* Begin PBXBuildFile section */
1F1575721F582BE20003B888 /* dylibs in Resources */ = {isa = PBXBuildFile; fileRef = 1F1575711F582BE20003B888 /* dylibs */; };
- DEADBEEF2F582BE20003B888 /* $binary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DEADBEEF1F582BE20003B888 /* $binary.a */; };
+ DEADBEEF2F582BE20003B888 /* $binary.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEADBEEF1F582BE20003B888 /* $binary.xcframework */; };
$modules_buildfile
1FF8DBB11FBA9DE1009DE660 /* dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FF8DBB01FBA9DE1009DE660 /* dummy.cpp */; };
D07CD44E1C5D589C00B7FB28 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D07CD44D1C5D589C00B7FB28 /* Images.xcassets */; };
- 9039D3BE24C093AC0020482C /* MoltenVK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9039D3BD24C093AC0020482C /* MoltenVK.a */; };
+ 9039D3BE24C093AC0020482C /* MoltenVK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9039D3BD24C093AC0020482C /* MoltenVK.xcframework */; };
9073252C24BF980B0063BCD4 /* vulkan in Resources */ = {isa = PBXBuildFile; fileRef = 905036DC24BF932E00301046 /* vulkan */; };
D0BCFE4618AEBDA2004A7AAE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D0BCFE4418AEBDA2004A7AAE /* InfoPlist.strings */; };
D0BCFE7818AEBFEB004A7AAE /* $binary.pck in Resources */ = {isa = PBXBuildFile; fileRef = D0BCFE7718AEBFEB004A7AAE /* $binary.pck */; };
@@ -35,11 +35,11 @@
/* Begin PBXFileReference section */
1F1575711F582BE20003B888 /* dylibs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dylibs; path = "$binary/dylibs"; sourceTree = "<group>"; };
- DEADBEEF1F582BE20003B888 /* $binary.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = godot; path = "$binary.a"; sourceTree = "<group>"; };
+ DEADBEEF1F582BE20003B888 /* $binary.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = godot; path = "$binary.xcframework"; sourceTree = "<group>"; };
$modules_fileref
1FF4C1881F584E6300A41E41 /* $binary.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "$binary.entitlements"; sourceTree = "<group>"; };
1FF8DBB01FBA9DE1009DE660 /* dummy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = dummy.cpp; sourceTree = "<group>"; };
- 9039D3BD24C093AC0020482C /* MoltenVK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = MoltenVK; path = MoltenVK.a; sourceTree = "<group>"; };
+ 9039D3BD24C093AC0020482C /* MoltenVK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = MoltenVK; path = MoltenVK.xcframework; sourceTree = "<group>"; };
905036DC24BF932E00301046 /* vulkan */ = {isa = PBXFileReference; lastKnownFileType = folder; name = vulkan; path = "$binary/vulkan"; sourceTree = "<group>"; };
D07CD44D1C5D589C00B7FB28 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
D0BCFE3418AEBDA2004A7AAE /* $binary.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "$binary.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -56,8 +56,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 9039D3BE24C093AC0020482C /* MoltenVK.a in Frameworks */,
- DEADBEEF2F582BE20003B888 /* $binary.a */,
+ 9039D3BE24C093AC0020482C /* MoltenVK.xcframework in Frameworks */,
+ DEADBEEF2F582BE20003B888 /* $binary.xcframework */,
$modules_buildphase
$additional_pbx_frameworks_build
);
@@ -90,8 +90,8 @@
D0BCFE3618AEBDA2004A7AAE /* Frameworks */ = {
isa = PBXGroup;
children = (
- 9039D3BD24C093AC0020482C /* MoltenVK.a */,
- DEADBEEF1F582BE20003B888 /* $binary.a */,
+ 9039D3BD24C093AC0020482C /* MoltenVK.xcframework */,
+ DEADBEEF1F582BE20003B888 /* $binary.xcframework */,
$modules_buildgrp
$additional_pbx_frameworks_refs
);
diff --git a/misc/dist/ios_xcode/libgodot.iphone.debug.fat.a b/misc/dist/ios_xcode/libgodot.iphone.debug.fat.a
deleted file mode 100644
index e69de29bb2..0000000000
--- a/misc/dist/ios_xcode/libgodot.iphone.debug.fat.a
+++ /dev/null
diff --git a/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/Info.plist b/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/Info.plist
new file mode 100644
index 0000000000..846533594f
--- /dev/null
+++ b/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/Info.plist
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>AvailableLibraries</key>
+ <array>
+ <dict>
+ <key>LibraryIdentifier</key>
+ <string>ios-arm64</string>
+ <key>LibraryPath</key>
+ <string>libgodot.a</string>
+ <key>SupportedArchitectures</key>
+ <array>
+ <string>arm64</string>
+ </array>
+ <key>SupportedPlatform</key>
+ <string>ios</string>
+ </dict>
+ <dict>
+ <key>LibraryIdentifier</key>
+ <string>ios-arm64_x86_64-simulator</string>
+ <key>LibraryPath</key>
+ <string>libgodot.a</string>
+ <key>SupportedArchitectures</key>
+ <array>
+ <string>arm64</string>
+ <string>x86_64</string>
+ </array>
+ <key>SupportedPlatform</key>
+ <string>ios</string>
+ <key>SupportedPlatformVariant</key>
+ <string>simulator</string>
+ </dict>
+ </array>
+ <key>CFBundlePackageType</key>
+ <string>XFWK</string>
+ <key>XCFrameworkFormatVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
diff --git a/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/empty b/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/empty
new file mode 100644
index 0000000000..bd3e894333
--- /dev/null
+++ b/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/empty
@@ -0,0 +1 @@
+Dummy file to make dylibs folder exported
diff --git a/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/empty b/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/empty
new file mode 100644
index 0000000000..bd3e894333
--- /dev/null
+++ b/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/empty
@@ -0,0 +1 @@
+Dummy file to make dylibs folder exported
diff --git a/misc/dist/ios_xcode/libgodot.iphone.release.fat.a b/misc/dist/ios_xcode/libgodot.iphone.release.fat.a
deleted file mode 100644
index e69de29bb2..0000000000
--- a/misc/dist/ios_xcode/libgodot.iphone.release.fat.a
+++ /dev/null
diff --git a/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/Info.plist b/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/Info.plist
new file mode 100644
index 0000000000..846533594f
--- /dev/null
+++ b/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/Info.plist
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>AvailableLibraries</key>
+ <array>
+ <dict>
+ <key>LibraryIdentifier</key>
+ <string>ios-arm64</string>
+ <key>LibraryPath</key>
+ <string>libgodot.a</string>
+ <key>SupportedArchitectures</key>
+ <array>
+ <string>arm64</string>
+ </array>
+ <key>SupportedPlatform</key>
+ <string>ios</string>
+ </dict>
+ <dict>
+ <key>LibraryIdentifier</key>
+ <string>ios-arm64_x86_64-simulator</string>
+ <key>LibraryPath</key>
+ <string>libgodot.a</string>
+ <key>SupportedArchitectures</key>
+ <array>
+ <string>arm64</string>
+ <string>x86_64</string>
+ </array>
+ <key>SupportedPlatform</key>
+ <string>ios</string>
+ <key>SupportedPlatformVariant</key>
+ <string>simulator</string>
+ </dict>
+ </array>
+ <key>CFBundlePackageType</key>
+ <string>XFWK</string>
+ <key>XCFrameworkFormatVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
diff --git a/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/empty b/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/empty
new file mode 100644
index 0000000000..bd3e894333
--- /dev/null
+++ b/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/empty
@@ -0,0 +1 @@
+Dummy file to make dylibs folder exported
diff --git a/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/empty b/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/empty
new file mode 100644
index 0000000000..bd3e894333
--- /dev/null
+++ b/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/empty
@@ -0,0 +1 @@
+Dummy file to make dylibs folder exported
diff --git a/misc/dist/project_icon.svg b/misc/dist/project_icon.svg
index cece381340..39a8cd6332 100644
--- a/misc/dist/project_icon.svg
+++ b/misc/dist/project_icon.svg
@@ -1 +1 @@
-<svg height="1024" width="1024" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -98.519719)"><rect fill="#1e1a21" height="1008" rx="176.28572" stroke="#2e2832" stroke-width="16" width="1008" x="8" y="106.51972"/><path d="m0 0v-47.514-6.035-5.492c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325c5.09692 6.4164712 9.92323 13.494208 13.621 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.4426581-6.973693 9.2079704-13.9828879 13.621-19.449z" fill="#478cbf" transform="matrix(4.2343801 0 0 -4.2343764 97.676491 522.86238)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.066.067c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(4.2343801 0 0 -4.2343764 788.7623 819.22103)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(4.2343801 0 0 -4.2343764 387.09785 624.34645)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(4.2343801 0 0 -4.2343764 364.87318 629.82505)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(4.2343801 0 0 -4.2343764 511.99324 725.12292)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(4.2343801 0 0 -4.2343764 636.90407 624.34645)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(4.2343801 0 0 -4.2343764 659.13434 629.82505)"/></g></svg>
+<svg height="1024" width="1024" xmlns="http://www.w3.org/2000/svg"><rect fill="#1e1a21" height="1008" rx="176.28572" stroke="#2e2832" stroke-width="16" width="1008" x="8" y="8.000001"/><path d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff" transform="matrix(4.23438024 0 0 -4.23438024 926.261959 674.345124)"/><path d="m0 0v-47.514-6.035-5.492c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325c5.09692 6.4164715 9.92323 13.494208 13.621 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.4426579-6.973692 9.2079702-13.9828876 13.621-19.449z" fill="#478cbf" transform="matrix(4.23438024 0 0 -4.23438024 97.676501 424.342903)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.066.067c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(4.23438024 0 0 -4.23438024 788.762303 720.701811)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(4.23438024 0 0 -4.23438024 387.097823 525.827045)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(4.23438024 0 0 -4.23438024 364.873153 531.305653)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(4.23438024 0 0 -4.23438024 511.993216 626.603625)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(4.23438024 0 0 -4.23438024 636.904052 525.827045)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(4.23438024 0 0 -4.23438024 659.134337 531.305653)"/></svg>
diff --git a/misc/hooks/pre-commit-clang-format b/misc/hooks/pre-commit-clang-format
index 4e1fbdeb20..1cbc576565 100755
--- a/misc/hooks/pre-commit-clang-format
+++ b/misc/hooks/pre-commit-clang-format
@@ -74,25 +74,39 @@ else
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
+# To get consistent formatting, we recommend contributors to use the same
+# clang-format version as CI.
+RECOMMENDED_CLANG_FORMAT_MAJOR="11"
+
if [ ! -x "$CLANG_FORMAT" ] ; then
+ message="Error: clang-format executable not found. Please install clang-format $RECOMMENDED_CLANG_FORMAT_MAJOR.x.x."
+
if [ ! -t 1 ] ; then
if [ -x "$ZENITY" ] ; then
- $ZENITY --error --title="Error" --text="Error: clang-format executable not found."
+ $ZENITY --error --title="Error" --text="$message"
exit 1
elif [ -x "$XMSG" ] ; then
- $XMSG -center -title "Error" "Error: clang-format executable not found."
+ $XMSG -center -title "Error" "$message"
exit 1
elif [ \( \( "$OSTYPE" = "msys" \) -o \( "$OSTYPE" = "win32" \) \) -a \( -x "$PWSH" \) ]; then
winmessage="$(canonicalize_filename "./.git/hooks/winmessage.ps1")"
- $PWSH -noprofile -executionpolicy bypass -file "$winmessage" -center -title "Error" --text "Error: clang-format executable not found."
+ $PWSH -noprofile -executionpolicy bypass -file "$winmessage" -center -title "Error" --text "$message"
exit 1
fi
fi
- printf "Error: clang-format executable not found.\n"
+ printf "$message\n"
printf "Set the correct path in $(canonicalize_filename "$0").\n"
exit 1
fi
+CLANG_FORMAT_VERSION="$(clang-format --version | cut -d' ' -f3)"
+CLANG_FORMAT_MAJOR="$(echo "$CLANG_FORMAT_VERSION" | cut -d'.' -f1)"
+
+if [ "$CLANG_FORMAT_MAJOR" != "$RECOMMENDED_CLANG_FORMAT_MAJOR" ]; then
+ echo "Warning: Your clang-format binary is the wrong version ($CLANG_FORMAT_VERSION, expected $CLANG_FORMAT_MAJOR.x.x)."
+ echo " Consider upgrading or downgrading clang-format as formatting may not be applied correctly."
+fi
+
# create a random filename to store our generated patch
prefix="pre-commit-clang-format"
suffix="$(date +%s)"
@@ -111,6 +125,9 @@ do
if grep -q "platform/android/java/lib/src/com" <<< $file; then
continue;
fi
+ if grep -q "\-so_wrap." <<< $file; then
+ continue;
+ fi
# ignore file if we do check for file extensions and the file
# does not match any of the extensions specified in $FILE_EXTS
diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh
index e686305dea..63c66d41c3 100755
--- a/misc/scripts/clang_format.sh
+++ b/misc/scripts/clang_format.sh
@@ -16,6 +16,8 @@ while IFS= read -rd '' f; do
continue
elif [[ "$f" == "platform/android/java/lib/src/com/google"* ]]; then
continue
+ elif [[ "$f" == *"-so_wrap."* ]]; then
+ continue
fi
for extension in ${CLANG_FORMAT_FILE_EXTS[@]}; do
diff --git a/misc/scripts/file_format.sh b/misc/scripts/file_format.sh
index 0e9db68a90..795431cd28 100755
--- a/misc/scripts/file_format.sh
+++ b/misc/scripts/file_format.sh
@@ -30,6 +30,8 @@ while IFS= read -rd '' f; do
continue
elif [[ "$f" == "platform/android/java/lib/src/com/google"* ]]; then
continue
+ elif [[ "$f" == *"-so_wrap."* ]]; then
+ continue
fi
# Ensure that files are UTF-8 formatted.
recode UTF-8 "$f" 2> /dev/null
@@ -38,15 +40,6 @@ while IFS= read -rd '' f; do
# Remove trailing space characters and ensures that files end
# with newline characters. -l option handles newlines conveniently.
perl -i -ple 's/\s*$//g' "$f"
- # Remove the character sequence "== true" if it has a leading space.
- perl -i -pe 's/\x20== true//g' "$f"
-
- if [[ $(uname) == "Linux" ]] && [[ "$f" != *"xml" ]]; then
- # Remove empty lines after the opening brace of indented blocks.
- sed -z -i 's/\x7B\x0A\x0A\x09/\x7B\x0A\x09/g' "$f"
- # Remove empty lines before the closing brace (in some cases).
- sed -z -i 's/\x0A\x0A\x7D/\x0A\x7D/g' "$f"
- fi
done
git diff > patch.patch
diff --git a/modules/SCsub b/modules/SCsub
index 24598f4b28..64da3bd0be 100644
--- a/modules/SCsub
+++ b/modules/SCsub
@@ -45,18 +45,6 @@ for name, path in env.module_list.items():
else:
SConscript(path + "/SCsub") # Custom.
- # Some modules are not linked automatically but can be enabled optionally
- # on iOS, so we handle those specially.
- if env["platform"] == "iphone" and name in [
- "arkit",
- "camera",
- "camera_iphone",
- "gamecenter",
- "inappstore",
- "icloud",
- ]:
- continue
-
lib = env_modules.add_library("module_%s" % name, env.modules_sources)
env.Prepend(LIBS=[lib])
if env["vsproj"]:
diff --git a/modules/arkit/SCsub b/modules/arkit/SCsub
deleted file mode 100644
index 7e103d6565..0000000000
--- a/modules/arkit/SCsub
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-Import("env_modules")
-
-env_arkit = env_modules.Clone()
-
-# (iOS) Enable module support
-env_arkit.Append(CCFLAGS=["-fmodules", "-fcxx-modules"])
-
-# (iOS) Build as separate static library
-modules_sources = []
-env_arkit.add_source_files(modules_sources, "*.cpp")
-env_arkit.add_source_files(modules_sources, "*.mm")
-mod_lib = env_modules.add_library("#bin/libgodot_arkit_module" + env["LIBSUFFIX"], modules_sources)
diff --git a/modules/arkit/arkit.gdip b/modules/arkit/arkit.gdip
deleted file mode 100644
index 22c0a07e26..0000000000
--- a/modules/arkit/arkit.gdip
+++ /dev/null
@@ -1,18 +0,0 @@
-[config]
-name="ARKit"
-binary="arkit_lib.a"
-
-initialization="register_arkit_types"
-deinitialization="unregister_arkit_types"
-
-[dependencies]
-linked=[]
-embedded=[]
-system=["AVFoundation.framework", "ARKit.framework"]
-
-capabilities=["arkit"]
-
-files=[]
-
-[plist]
-NSCameraUsageDescription="Device camera is used for some functionality"
diff --git a/modules/arkit/arkit_interface.h b/modules/arkit/arkit_interface.h
deleted file mode 100644
index f9b7709aba..0000000000
--- a/modules/arkit/arkit_interface.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*************************************************************************/
-/* arkit_interface.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 ARKIT_INTERFACE_H
-#define ARKIT_INTERFACE_H
-
-#include "servers/camera/camera_feed.h"
-#include "servers/xr/xr_interface.h"
-#include "servers/xr/xr_positional_tracker.h"
-
-/**
- @author Bastiaan Olij <mux213@gmail.com>
-
- ARKit interface between iPhone and Godot
-*/
-
-// forward declaration for some needed objects
-class ARKitShader;
-
-#ifdef __OBJC__
-
-typedef ARAnchor GodotARAnchor;
-
-#else
-
-typedef void GodotARAnchor;
-#endif
-
-class ARKitInterface : public XRInterface {
- GDCLASS(ARKitInterface, XRInterface);
-
-private:
- bool initialized;
- bool session_was_started;
- bool plane_detection_is_enabled;
- bool light_estimation_is_enabled;
- real_t ambient_intensity;
- real_t ambient_color_temperature;
-
- Transform transform;
- CameraMatrix projection;
- float eye_height, z_near, z_far;
-
- Ref<CameraFeed> feed;
- size_t image_width[2];
- size_t image_height[2];
- Vector<uint8_t> img_data[2];
-
- struct anchor_map {
- XRPositionalTracker *tracker;
- unsigned char uuid[16];
- };
-
- ///@TODO should use memory map object from Godot?
- unsigned int num_anchors;
- unsigned int max_anchors;
- anchor_map *anchors;
- XRPositionalTracker *get_anchor_for_uuid(const unsigned char *p_uuid);
- void remove_anchor_for_uuid(const unsigned char *p_uuid);
- void remove_all_anchors();
-
-protected:
- static void _bind_methods();
-
-public:
- void start_session();
- void stop_session();
-
- bool get_anchor_detection_is_enabled() const override;
- void set_anchor_detection_is_enabled(bool p_enable) override;
- virtual int get_camera_feed_id() override;
-
- bool get_light_estimation_is_enabled() const;
- void set_light_estimation_is_enabled(bool p_enable);
-
- real_t get_ambient_intensity() const;
- real_t get_ambient_color_temperature() const;
-
- /* while Godot has its own raycast logic this takes ARKits camera into account and hits on any ARAnchor */
- Array raycast(Vector2 p_screen_coord);
-
- virtual void notification(int p_what) override;
-
- virtual StringName get_name() const override;
- virtual int get_capabilities() const override;
-
- virtual bool is_initialized() const override;
- virtual bool initialize() override;
- virtual void uninitialize() override;
-
- virtual Size2 get_render_targetsize() override;
- virtual bool is_stereo() override;
- virtual Transform get_transform_for_eye(XRInterface::Eyes p_eye, const Transform &p_cam_transform) override;
- virtual CameraMatrix get_projection_for_eye(XRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far) override;
- virtual void commit_for_eye(XRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) override;
-
- virtual void process() override;
-
- // called by delegate (void * because C++ and Obj-C don't always mix, should really change all platform/iphone/*.cpp files to .mm)
- void _add_or_update_anchor(GodotARAnchor *p_anchor);
- void _remove_anchor(GodotARAnchor *p_anchor);
-
- ARKitInterface();
- ~ARKitInterface();
-};
-
-#endif /* !ARKIT_INTERFACE_H */
diff --git a/modules/arkit/arkit_interface.mm b/modules/arkit/arkit_interface.mm
deleted file mode 100644
index 608afd4ff3..0000000000
--- a/modules/arkit/arkit_interface.mm
+++ /dev/null
@@ -1,791 +0,0 @@
-/*************************************************************************/
-/* arkit_interface.mm */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "core/input/input.h"
-#include "core/os/os.h"
-#include "scene/resources/surface_tool.h"
-#include "servers/rendering/rendering_server_globals.h"
-
-#import <ARKit/ARKit.h>
-#import <UIKit/UIKit.h>
-
-#include <dlfcn.h>
-
-#include "arkit_interface.h"
-#include "arkit_session_delegate.h"
-
-// just a dirty workaround for now, declare these as globals. I'll probably encapsulate ARSession and associated logic into an mm object and change ARKitInterface to a normal cpp object that consumes it.
-API_AVAILABLE(ios(11.0))
-ARSession *ar_session;
-
-ARKitSessionDelegate *ar_delegate;
-NSTimeInterval last_timestamp;
-
-/* this is called when we initialize or when we come back from having our app pushed to the background, just (re)start our session */
-void ARKitInterface::start_session() {
- // We're active...
- session_was_started = true;
-
- // Ignore this if we're not initialized...
- if (initialized) {
- print_line("Starting ARKit session");
-
- if (@available(iOS 11, *)) {
- Class ARWorldTrackingConfigurationClass = NSClassFromString(@"ARWorldTrackingConfiguration");
- ARWorldTrackingConfiguration *configuration = [ARWorldTrackingConfigurationClass new];
-
- configuration.lightEstimationEnabled = light_estimation_is_enabled;
- if (plane_detection_is_enabled) {
- if (@available(iOS 11.3, *)) {
- configuration.planeDetection = ARPlaneDetectionVertical | ARPlaneDetectionHorizontal;
- } else {
- configuration.planeDetection = ARPlaneDetectionHorizontal;
- }
- } else {
- configuration.planeDetection = 0;
- }
-
- // make sure our camera is on
- if (feed.is_valid()) {
- feed->set_active(true);
- }
-
- [ar_session runWithConfiguration:configuration];
- }
- }
-}
-
-void ARKitInterface::stop_session() {
- session_was_started = false;
-
- // Ignore this if we're not initialized...
- if (initialized) {
- // make sure our camera is off
- if (feed.is_valid()) {
- feed->set_active(false);
- }
-
- if (@available(iOS 11.0, *)) {
- [ar_session pause];
- }
- }
-}
-
-void ARKitInterface::notification(int p_what) {
- // TODO, this is not being called, need to find out why, possibly because this is not a node.
- // in that case we need to find a way to get these notifications!
- switch (p_what) {
- case DisplayServer::WINDOW_EVENT_FOCUS_IN: {
- print_line("Focus in");
-
- start_session();
- }; break;
- case DisplayServer::WINDOW_EVENT_FOCUS_OUT: {
- print_line("Focus out");
-
- stop_session();
- }; break;
- default:
- break;
- }
-}
-
-bool ARKitInterface::get_anchor_detection_is_enabled() const {
- return plane_detection_is_enabled;
-}
-
-void ARKitInterface::set_anchor_detection_is_enabled(bool p_enable) {
- if (plane_detection_is_enabled != p_enable) {
- plane_detection_is_enabled = p_enable;
-
- // Restart our session (this will be ignore if we're not initialised)
- if (session_was_started) {
- start_session();
- }
- }
-}
-
-int ARKitInterface::get_camera_feed_id() {
- if (feed.is_null()) {
- return 0;
- } else {
- return feed->get_id();
- }
-}
-
-bool ARKitInterface::get_light_estimation_is_enabled() const {
- return light_estimation_is_enabled;
-}
-
-void ARKitInterface::set_light_estimation_is_enabled(bool p_enable) {
- if (light_estimation_is_enabled != p_enable) {
- light_estimation_is_enabled = p_enable;
-
- // Restart our session (this will be ignore if we're not initialised)
- if (session_was_started) {
- start_session();
- }
- }
-}
-
-real_t ARKitInterface::get_ambient_intensity() const {
- return ambient_intensity;
-}
-
-real_t ARKitInterface::get_ambient_color_temperature() const {
- return ambient_color_temperature;
-}
-
-StringName ARKitInterface::get_name() const {
- return "ARKit";
-}
-
-int ARKitInterface::get_capabilities() const {
- return ARKitInterface::XR_MONO + ARKitInterface::XR_AR;
-}
-
-Array ARKitInterface::raycast(Vector2 p_screen_coord) {
- if (@available(iOS 11, *)) {
- Array arr;
- Size2 screen_size = DisplayServer::get_singleton()->screen_get_size();
- CGPoint point;
- point.x = p_screen_coord.x / screen_size.x;
- point.y = p_screen_coord.y / screen_size.y;
-
- ///@TODO maybe give more options here, for now we're taking just ARAchors into account that were found during plane detection keeping their size into account
-
- NSArray<ARHitTestResult *> *results = [ar_session.currentFrame hitTest:point types:ARHitTestResultTypeExistingPlaneUsingExtent];
-
- for (ARHitTestResult *result in results) {
- Transform transform;
-
- matrix_float4x4 m44 = result.worldTransform;
- transform.basis.elements[0].x = m44.columns[0][0];
- transform.basis.elements[1].x = m44.columns[0][1];
- transform.basis.elements[2].x = m44.columns[0][2];
- transform.basis.elements[0].y = m44.columns[1][0];
- transform.basis.elements[1].y = m44.columns[1][1];
- transform.basis.elements[2].y = m44.columns[1][2];
- transform.basis.elements[0].z = m44.columns[2][0];
- transform.basis.elements[1].z = m44.columns[2][1];
- transform.basis.elements[2].z = m44.columns[2][2];
- transform.origin.x = m44.columns[3][0];
- transform.origin.y = m44.columns[3][1];
- transform.origin.z = m44.columns[3][2];
-
- /* important, NOT scaled to world_scale !! */
- arr.push_back(transform);
- }
-
- return arr;
- } else {
- return Array();
- }
-}
-
-void ARKitInterface::_bind_methods() {
- ClassDB::bind_method(D_METHOD("_notification", "what"), &ARKitInterface::_notification);
-
- ClassDB::bind_method(D_METHOD("set_light_estimation_is_enabled", "enable"), &ARKitInterface::set_light_estimation_is_enabled);
- ClassDB::bind_method(D_METHOD("get_light_estimation_is_enabled"), &ARKitInterface::get_light_estimation_is_enabled);
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "light_estimation"), "set_light_estimation_is_enabled", "get_light_estimation_is_enabled");
-
- ClassDB::bind_method(D_METHOD("get_ambient_intensity"), &ARKitInterface::get_ambient_intensity);
- ClassDB::bind_method(D_METHOD("get_ambient_color_temperature"), &ARKitInterface::get_ambient_color_temperature);
-
- ClassDB::bind_method(D_METHOD("raycast", "screen_coord"), &ARKitInterface::raycast);
-}
-
-bool ARKitInterface::is_stereo() {
- // this is a mono device...
- return false;
-}
-
-bool ARKitInterface::is_initialized() const {
- return initialized;
-}
-
-bool ARKitInterface::initialize() {
- XRServer *xr_server = XRServer::get_singleton();
- ERR_FAIL_NULL_V(xr_server, false);
-
- if (@available(iOS 11, *)) {
- if (!initialized) {
- print_line("initializing ARKit");
-
- // create our ar session and delegate
- Class ARSessionClass = NSClassFromString(@"ARSession");
- if (ARSessionClass == Nil) {
- void *arkit_handle = dlopen("/System/Library/Frameworks/ARKit.framework/ARKit", RTLD_NOW);
- if (arkit_handle) {
- ARSessionClass = NSClassFromString(@"ARSession");
- } else {
- print_line("ARKit init failed");
- return false;
- }
- }
- ar_session = [ARSessionClass new];
- ar_delegate = [ARKitSessionDelegate new];
- ar_delegate.arkit_interface = this;
- ar_session.delegate = ar_delegate;
-
- // reset our transform
- transform = Transform();
-
- // make this our primary interface
- xr_server->set_primary_interface(this);
-
- // make sure we have our feed setup
- if (feed.is_null()) {
- feed.instance();
- feed->set_name("ARKit");
-
- CameraServer *cs = CameraServer::get_singleton();
- if (cs != NULL) {
- cs->add_feed(feed);
- }
- }
- feed->set_active(true);
-
- // yeah!
- initialized = true;
-
- // Start our session...
- start_session();
- }
-
- return true;
- } else {
- return false;
- }
-}
-
-void ARKitInterface::uninitialize() {
- if (initialized) {
- XRServer *xr_server = XRServer::get_singleton();
- if (xr_server != NULL) {
- // no longer our primary interface
- xr_server->clear_primary_interface_if(this);
- }
-
- if (feed.is_valid()) {
- CameraServer *cs = CameraServer::get_singleton();
- if ((cs != NULL)) {
- cs->remove_feed(feed);
- }
- feed.unref();
- }
-
- remove_all_anchors();
-
- if (@available(iOS 11.0, *)) {
- ar_session = nil;
- }
-
- ar_delegate = nil;
- initialized = false;
- session_was_started = false;
- }
-}
-
-Size2 ARKitInterface::get_render_targetsize() {
- // _THREAD_SAFE_METHOD_
-
- Size2 target_size = DisplayServer::get_singleton()->screen_get_size();
-
- return target_size;
-}
-
-Transform ARKitInterface::get_transform_for_eye(XRInterface::Eyes p_eye, const Transform &p_cam_transform) {
- // _THREAD_SAFE_METHOD_
-
- Transform transform_for_eye;
-
- XRServer *xr_server = XRServer::get_singleton();
- ERR_FAIL_NULL_V(xr_server, transform_for_eye);
-
- if (initialized) {
- float world_scale = xr_server->get_world_scale();
-
- // just scale our origin point of our transform, note that we really shouldn't be using world_scale in ARKit but....
- transform_for_eye = transform;
- transform_for_eye.origin *= world_scale;
-
- transform_for_eye = p_cam_transform * xr_server->get_reference_frame() * transform_for_eye;
- } else {
- // huh? well just return what we got....
- transform_for_eye = p_cam_transform;
- }
-
- return transform_for_eye;
-}
-
-CameraMatrix ARKitInterface::get_projection_for_eye(XRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far) {
- // Remember our near and far, it will be used in process when we obtain our projection from our ARKit session.
- z_near = p_z_near;
- z_far = p_z_far;
-
- return projection;
-}
-
-void ARKitInterface::commit_for_eye(XRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) {
- // _THREAD_SAFE_METHOD_
-
- // We must have a valid render target
- ERR_FAIL_COND(!p_render_target.is_valid());
-
- // Because we are rendering to our device we must use our main viewport!
- ERR_FAIL_COND(p_screen_rect == Rect2());
-
- // get the size of our screen
- // Rect2 screen_rect = p_screen_rect;
-
- // screen_rect.position.x += screen_rect.size.x;
- // screen_rect.size.x = -screen_rect.size.x;
- // screen_rect.position.y += screen_rect.size.y;
- // screen_rect.size.y = -screen_rect.size.y;
-
- // VSG::rasterizer->set_current_render_target(RID());
- // VSG::rasterizer->blit_render_target_to_screen(p_render_target, screen_rect, 0);
-}
-
-XRPositionalTracker *ARKitInterface::get_anchor_for_uuid(const unsigned char *p_uuid) {
- if (anchors == NULL) {
- num_anchors = 0;
- max_anchors = 10;
- anchors = (anchor_map *)malloc(sizeof(anchor_map) * max_anchors);
- }
-
- ERR_FAIL_NULL_V(anchors, NULL);
-
- for (unsigned int i = 0; i < num_anchors; i++) {
- if (memcmp(anchors[i].uuid, p_uuid, 16) == 0) {
- return anchors[i].tracker;
- }
- }
-
- if (num_anchors + 1 == max_anchors) {
- max_anchors += 10;
- anchors = (anchor_map *)realloc(anchors, sizeof(anchor_map) * max_anchors);
- ERR_FAIL_NULL_V(anchors, NULL);
- }
-
- XRPositionalTracker *new_tracker = memnew(XRPositionalTracker);
- new_tracker->set_tracker_type(XRServer::TRACKER_ANCHOR);
-
- char tracker_name[256];
- sprintf(tracker_name, "Anchor %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", p_uuid[0], p_uuid[1], p_uuid[2], p_uuid[3], p_uuid[4], p_uuid[5], p_uuid[6], p_uuid[7], p_uuid[8], p_uuid[9], p_uuid[10], p_uuid[11], p_uuid[12], p_uuid[13], p_uuid[14], p_uuid[15]);
-
- String name = tracker_name;
- print_line("Adding tracker " + name);
- new_tracker->set_tracker_name(name);
-
- // add our tracker
- XRServer::get_singleton()->add_tracker(new_tracker);
- anchors[num_anchors].tracker = new_tracker;
- memcpy(anchors[num_anchors].uuid, p_uuid, 16);
- num_anchors++;
-
- return new_tracker;
-}
-
-void ARKitInterface::remove_anchor_for_uuid(const unsigned char *p_uuid) {
- if (anchors != NULL) {
- for (unsigned int i = 0; i < num_anchors; i++) {
- if (memcmp(anchors[i].uuid, p_uuid, 16) == 0) {
- // remove our tracker
- XRServer::get_singleton()->remove_tracker(anchors[i].tracker);
- memdelete(anchors[i].tracker);
-
- // bring remaining forward
- for (unsigned int j = i + 1; j < num_anchors; j++) {
- anchors[j - 1] = anchors[j];
- };
-
- // decrease count
- num_anchors--;
- return;
- }
- }
- }
-}
-
-void ARKitInterface::remove_all_anchors() {
- if (anchors != NULL) {
- for (unsigned int i = 0; i < num_anchors; i++) {
- // remove our tracker
- XRServer::get_singleton()->remove_tracker(anchors[i].tracker);
- memdelete(anchors[i].tracker);
- };
-
- free(anchors);
- anchors = NULL;
- num_anchors = 0;
- }
-}
-
-void ARKitInterface::process() {
- // _THREAD_SAFE_METHOD_
-
- if (@available(iOS 11.0, *)) {
- if (initialized) {
- // get our next ARFrame
- ARFrame *current_frame = ar_session.currentFrame;
- if (last_timestamp != current_frame.timestamp) {
- // only process if we have a new frame
- last_timestamp = current_frame.timestamp;
-
- // get some info about our screen and orientation
- Size2 screen_size = DisplayServer::get_singleton()->screen_get_size();
- UIInterfaceOrientation orientation = UIInterfaceOrientationUnknown;
-
- if (@available(iOS 13, *)) {
- orientation = [UIApplication sharedApplication].delegate.window.windowScene.interfaceOrientation;
-#if !defined(TARGET_OS_SIMULATOR) || !TARGET_OS_SIMULATOR
- } else {
- orientation = [[UIApplication sharedApplication] statusBarOrientation];
-#endif
- }
-
- // Grab our camera image for our backbuffer
- CVPixelBufferRef pixelBuffer = current_frame.capturedImage;
- if ((CVPixelBufferGetPlaneCount(pixelBuffer) == 2) && (feed != NULL)) {
- // Plane 0 is our Y and Plane 1 is our CbCr buffer
-
- // ignored, we check each plane separately
- // image_width = CVPixelBufferGetWidth(pixelBuffer);
- // image_height = CVPixelBufferGetHeight(pixelBuffer);
-
- // printf("Pixel buffer %i - %i\n", image_width, image_height);
-
- CVPixelBufferLockBaseAddress(pixelBuffer, kCVPixelBufferLock_ReadOnly);
-
- // get our buffers
- unsigned char *dataY = (unsigned char *)CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 0);
- unsigned char *dataCbCr = (unsigned char *)CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 1);
-
- if (dataY == NULL) {
- print_line("Couldn't access Y pixel buffer data");
- } else if (dataCbCr == NULL) {
- print_line("Couldn't access CbCr pixel buffer data");
- } else {
- Ref<Image> img[2];
- size_t extraLeft, extraRight, extraTop, extraBottom;
-
- CVPixelBufferGetExtendedPixels(pixelBuffer, &extraLeft, &extraRight, &extraTop, &extraBottom);
-
- {
- // do Y
- size_t new_width = CVPixelBufferGetWidthOfPlane(pixelBuffer, 0);
- size_t new_height = CVPixelBufferGetHeightOfPlane(pixelBuffer, 0);
- size_t bytes_per_row = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 0);
-
- if ((image_width[0] != new_width) || (image_height[0] != new_height)) {
- printf("- Camera padding l:%lu r:%lu t:%lu b:%lu\n", extraLeft, extraRight, extraTop, extraBottom);
- printf("- Camera Y plane size: %lu, %lu - %lu\n", new_width, new_height, bytes_per_row);
-
- image_width[0] = new_width;
- image_height[0] = new_height;
- img_data[0].resize(new_width * new_height);
- }
-
- uint8_t *w = img_data[0].ptrw();
- if (new_width == bytes_per_row) {
- memcpy(w, dataY, new_width * new_height);
- } else {
- size_t offset_a = 0;
- size_t offset_b = extraLeft + (extraTop * bytes_per_row);
- for (size_t r = 0; r < new_height; r++) {
- memcpy(w + offset_a, dataY + offset_b, new_width);
- offset_a += new_width;
- offset_b += bytes_per_row;
- }
- }
-
- img[0].instance();
- img[0]->create(new_width, new_height, 0, Image::FORMAT_R8, img_data[0]);
- }
-
- {
- // do CbCr
- size_t new_width = CVPixelBufferGetWidthOfPlane(pixelBuffer, 1);
- size_t new_height = CVPixelBufferGetHeightOfPlane(pixelBuffer, 1);
- size_t bytes_per_row = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 0);
-
- if ((image_width[1] != new_width) || (image_height[1] != new_height)) {
- printf("- Camera CbCr plane size: %lu, %lu - %lu\n", new_width, new_height, bytes_per_row);
-
- image_width[1] = new_width;
- image_height[1] = new_height;
- img_data[1].resize(2 * new_width * new_height);
- }
-
- uint8_t *w = img_data[1].ptrw();
- if ((2 * new_width) == bytes_per_row) {
- memcpy(w, dataCbCr, 2 * new_width * new_height);
- } else {
- size_t offset_a = 0;
- size_t offset_b = extraLeft + (extraTop * bytes_per_row);
- for (size_t r = 0; r < new_height; r++) {
- memcpy(w + offset_a, dataCbCr + offset_b, 2 * new_width);
- offset_a += 2 * new_width;
- offset_b += bytes_per_row;
- }
- }
-
- img[1].instance();
- img[1]->create(new_width, new_height, 0, Image::FORMAT_RG8, img_data[1]);
- }
-
- // set our texture...
- feed->set_YCbCr_imgs(img[0], img[1]);
-
- // now build our transform to display this as a background image that matches our camera
- CGAffineTransform affine_transform = [current_frame displayTransformForOrientation:orientation viewportSize:CGSizeMake(screen_size.width, screen_size.height)];
-
- // we need to invert this, probably row v.s. column notation
- affine_transform = CGAffineTransformInvert(affine_transform);
-
- if (orientation != UIInterfaceOrientationPortrait) {
- affine_transform.b = -affine_transform.b;
- affine_transform.d = -affine_transform.d;
- affine_transform.ty = 1.0 - affine_transform.ty;
- } else {
- affine_transform.c = -affine_transform.c;
- affine_transform.a = -affine_transform.a;
- affine_transform.tx = 1.0 - affine_transform.tx;
- }
-
- Transform2D display_transform = Transform2D(
- affine_transform.a, affine_transform.b,
- affine_transform.c, affine_transform.d,
- affine_transform.tx, affine_transform.ty);
-
- feed->set_transform(display_transform);
- }
-
- // and unlock
- CVPixelBufferUnlockBaseAddress(pixelBuffer, kCVPixelBufferLock_ReadOnly);
- }
-
- // Record light estimation to apply to our scene
- if (light_estimation_is_enabled) {
- ambient_intensity = current_frame.lightEstimate.ambientIntensity;
-
- ///@TODO it's there, but not there.. what to do with this...
- // https://developer.apple.com/documentation/arkit/arlightestimate?language=objc
- // ambient_color_temperature = current_frame.lightEstimate.ambientColorTemperature;
- }
-
- // Process our camera
- ARCamera *camera = current_frame.camera;
-
- // strangely enough we have to states, rolling them up into one
- if (camera.trackingState == ARTrackingStateNotAvailable) {
- // no tracking, would be good if we black out the screen or something...
- tracking_state = XRInterface::XR_NOT_TRACKING;
- } else {
- if (camera.trackingState == ARTrackingStateNormal) {
- tracking_state = XRInterface::XR_NORMAL_TRACKING;
- } else if (camera.trackingStateReason == ARTrackingStateReasonExcessiveMotion) {
- tracking_state = XRInterface::XR_EXCESSIVE_MOTION;
- } else if (camera.trackingStateReason == ARTrackingStateReasonInsufficientFeatures) {
- tracking_state = XRInterface::XR_INSUFFICIENT_FEATURES;
- } else {
- tracking_state = XRInterface::XR_UNKNOWN_TRACKING;
- }
-
- // copy our current frame transform
- matrix_float4x4 m44 = camera.transform;
- if (orientation == UIInterfaceOrientationLandscapeLeft) {
- transform.basis.elements[0].x = m44.columns[0][0];
- transform.basis.elements[1].x = m44.columns[0][1];
- transform.basis.elements[2].x = m44.columns[0][2];
- transform.basis.elements[0].y = m44.columns[1][0];
- transform.basis.elements[1].y = m44.columns[1][1];
- transform.basis.elements[2].y = m44.columns[1][2];
- } else if (orientation == UIInterfaceOrientationPortrait) {
- transform.basis.elements[0].x = m44.columns[1][0];
- transform.basis.elements[1].x = m44.columns[1][1];
- transform.basis.elements[2].x = m44.columns[1][2];
- transform.basis.elements[0].y = -m44.columns[0][0];
- transform.basis.elements[1].y = -m44.columns[0][1];
- transform.basis.elements[2].y = -m44.columns[0][2];
- } else if (orientation == UIInterfaceOrientationLandscapeRight) {
- transform.basis.elements[0].x = -m44.columns[0][0];
- transform.basis.elements[1].x = -m44.columns[0][1];
- transform.basis.elements[2].x = -m44.columns[0][2];
- transform.basis.elements[0].y = -m44.columns[1][0];
- transform.basis.elements[1].y = -m44.columns[1][1];
- transform.basis.elements[2].y = -m44.columns[1][2];
- } else if (orientation == UIInterfaceOrientationPortraitUpsideDown) {
- // this may not be correct
- transform.basis.elements[0].x = m44.columns[1][0];
- transform.basis.elements[1].x = m44.columns[1][1];
- transform.basis.elements[2].x = m44.columns[1][2];
- transform.basis.elements[0].y = m44.columns[0][0];
- transform.basis.elements[1].y = m44.columns[0][1];
- transform.basis.elements[2].y = m44.columns[0][2];
- }
- transform.basis.elements[0].z = m44.columns[2][0];
- transform.basis.elements[1].z = m44.columns[2][1];
- transform.basis.elements[2].z = m44.columns[2][2];
- transform.origin.x = m44.columns[3][0];
- transform.origin.y = m44.columns[3][1];
- transform.origin.z = m44.columns[3][2];
-
- // copy our current frame projection, investigate using projectionMatrixWithViewportSize:orientation:zNear:zFar: so we can set our own near and far
- m44 = [camera projectionMatrixForOrientation:orientation viewportSize:CGSizeMake(screen_size.width, screen_size.height) zNear:z_near zFar:z_far];
- projection.matrix[0][0] = m44.columns[0][0];
- projection.matrix[1][0] = m44.columns[1][0];
- projection.matrix[2][0] = m44.columns[2][0];
- projection.matrix[3][0] = m44.columns[3][0];
- projection.matrix[0][1] = m44.columns[0][1];
- projection.matrix[1][1] = m44.columns[1][1];
- projection.matrix[2][1] = m44.columns[2][1];
- projection.matrix[3][1] = m44.columns[3][1];
- projection.matrix[0][2] = m44.columns[0][2];
- projection.matrix[1][2] = m44.columns[1][2];
- projection.matrix[2][2] = m44.columns[2][2];
- projection.matrix[3][2] = m44.columns[3][2];
- projection.matrix[0][3] = m44.columns[0][3];
- projection.matrix[1][3] = m44.columns[1][3];
- projection.matrix[2][3] = m44.columns[2][3];
- projection.matrix[3][3] = m44.columns[3][3];
- }
- }
- }
- }
-}
-
-void ARKitInterface::_add_or_update_anchor(GodotARAnchor *p_anchor) {
- // _THREAD_SAFE_METHOD_
-
- if (@available(iOS 11.0, *)) {
- ARAnchor *anchor = (ARAnchor *)p_anchor;
-
- unsigned char uuid[16];
- [anchor.identifier getUUIDBytes:uuid];
-
- XRPositionalTracker *tracker = get_anchor_for_uuid(uuid);
- if (tracker != NULL) {
- // lets update our mesh! (using Arjens code as is for now)
- // we should also probably limit how often we do this...
-
- // can we safely cast this?
- ARPlaneAnchor *planeAnchor = (ARPlaneAnchor *)anchor;
-
- if (@available(iOS 11.3, *)) {
- if (planeAnchor.geometry.triangleCount > 0) {
- Ref<SurfaceTool> surftool;
- surftool.instance();
- surftool->begin(Mesh::PRIMITIVE_TRIANGLES);
-
- for (int j = planeAnchor.geometry.triangleCount * 3 - 1; j >= 0; j--) {
- int16_t index = planeAnchor.geometry.triangleIndices[j];
- simd_float3 vrtx = planeAnchor.geometry.vertices[index];
- simd_float2 textcoord = planeAnchor.geometry.textureCoordinates[index];
- surftool->set_uv(Vector2(textcoord[0], textcoord[1]));
- surftool->set_color(Color(0.8, 0.8, 0.8));
- surftool->add_vertex(Vector3(vrtx[0], vrtx[1], vrtx[2]));
- }
-
- surftool->generate_normals();
- tracker->set_mesh(surftool->commit());
- } else {
- Ref<Mesh> nomesh;
- tracker->set_mesh(nomesh);
- }
- } else {
- Ref<Mesh> nomesh;
- tracker->set_mesh(nomesh);
- }
-
- // Note, this also contains a scale factor which gives us an idea of the size of the anchor
- // We may extract that in our XRAnchor class
- Basis b;
- matrix_float4x4 m44 = anchor.transform;
- b.elements[0].x = m44.columns[0][0];
- b.elements[1].x = m44.columns[0][1];
- b.elements[2].x = m44.columns[0][2];
- b.elements[0].y = m44.columns[1][0];
- b.elements[1].y = m44.columns[1][1];
- b.elements[2].y = m44.columns[1][2];
- b.elements[0].z = m44.columns[2][0];
- b.elements[1].z = m44.columns[2][1];
- b.elements[2].z = m44.columns[2][2];
- tracker->set_orientation(b);
- tracker->set_rw_position(Vector3(m44.columns[3][0], m44.columns[3][1], m44.columns[3][2]));
- }
- }
-}
-
-void ARKitInterface::_remove_anchor(GodotARAnchor *p_anchor) {
- // _THREAD_SAFE_METHOD_
-
- if (@available(iOS 11.0, *)) {
- ARAnchor *anchor = (ARAnchor *)p_anchor;
-
- unsigned char uuid[16];
- [anchor.identifier getUUIDBytes:uuid];
-
- remove_anchor_for_uuid(uuid);
- }
-}
-
-ARKitInterface::ARKitInterface() {
- initialized = false;
- session_was_started = false;
- plane_detection_is_enabled = false;
- light_estimation_is_enabled = false;
- if (@available(iOS 11.0, *)) {
- ar_session = nil;
- }
- z_near = 0.01;
- z_far = 1000.0;
- projection.set_perspective(60.0, 1.0, z_near, z_far, false);
- anchors = NULL;
- num_anchors = 0;
- ambient_intensity = 1.0;
- ambient_color_temperature = 1.0;
- image_width[0] = 0;
- image_width[1] = 0;
- image_height[0] = 0;
- image_height[1] = 0;
-}
-
-ARKitInterface::~ARKitInterface() {
- remove_all_anchors();
-
- // and make sure we cleanup if we haven't already
- if (is_initialized()) {
- uninitialize();
- }
-}
diff --git a/modules/arkit/arkit_module.cpp b/modules/arkit/arkit_module.cpp
deleted file mode 100644
index be3c5e29ca..0000000000
--- a/modules/arkit/arkit_module.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*************************************************************************/
-/* arkit_module.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "arkit_module.h"
-
-#include "arkit_interface.h"
-
-void register_arkit_types() {
- // does it make sense to register the class?
-
- Ref<ARKitInterface> arkit_interface;
- arkit_interface.instance();
- XRServer::get_singleton()->add_interface(arkit_interface);
-}
-
-void unregister_arkit_types() {
- // should clean itself up nicely :)
-}
diff --git a/modules/arkit/arkit_module.h b/modules/arkit/arkit_module.h
deleted file mode 100644
index ca48371152..0000000000
--- a/modules/arkit/arkit_module.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*************************************************************************/
-/* arkit_module.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 ARKIT_REGISTER_TYPES_H
-#define ARKIT_REGISTER_TYPES_H
-
-void register_arkit_types();
-void unregister_arkit_types();
-
-#endif // ARKIT_REGISTER_TYPES_H
diff --git a/modules/arkit/arkit_session_delegate.mm b/modules/arkit/arkit_session_delegate.mm
deleted file mode 100644
index 97af5bf42c..0000000000
--- a/modules/arkit/arkit_session_delegate.mm
+++ /dev/null
@@ -1,56 +0,0 @@
-/*************************************************************************/
-/* arkit_session_delegate.mm */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "arkit_session_delegate.h"
-#include "arkit_interface.h"
-
-@implementation ARKitSessionDelegate
-
-@synthesize arkit_interface;
-
-- (void)session:(ARSession *)session didAddAnchors:(NSArray<ARAnchor *> *)anchors {
- for (ARAnchor *anchor in anchors) {
- arkit_interface->_add_or_update_anchor(anchor);
- }
-}
-
-- (void)session:(ARSession *)session didRemoveAnchors:(NSArray<ARAnchor *> *)anchors {
- for (ARAnchor *anchor in anchors) {
- arkit_interface->_remove_anchor(anchor);
- }
-}
-
-- (void)session:(ARSession *)session didUpdateAnchors:(NSArray<ARAnchor *> *)anchors {
- for (ARAnchor *anchor in anchors) {
- arkit_interface->_add_or_update_anchor(anchor);
- }
-}
-
-@end
diff --git a/modules/arkit/config.py b/modules/arkit/config.py
deleted file mode 100644
index e68603fc93..0000000000
--- a/modules/arkit/config.py
+++ /dev/null
@@ -1,6 +0,0 @@
-def can_build(env, platform):
- return platform == "iphone"
-
-
-def configure(env):
- pass
diff --git a/modules/basis_universal/texture_basisu.cpp b/modules/basis_universal/texture_basisu.cpp
index 66eb81d7f2..92882a1cc8 100644
--- a/modules/basis_universal/texture_basisu.cpp
+++ b/modules/basis_universal/texture_basisu.cpp
@@ -207,7 +207,6 @@ Vector<uint8_t> TextureBasisU::get_basisu_data() const {
};
TextureBasisU::TextureBasisU() {
- flags = FLAGS_DEFAULT;
texture = RenderingServer::get_singleton()->texture_create();
};
diff --git a/modules/basis_universal/texture_basisu.h b/modules/basis_universal/texture_basisu.h
index 0a4783eaff..282a0dfc8a 100644
--- a/modules/basis_universal/texture_basisu.h
+++ b/modules/basis_universal/texture_basisu.h
@@ -47,7 +47,7 @@ class TextureBasisU : public Texture {
RID texture;
Size2 tex_size;
- uint32_t flags;
+ uint32_t flags = FLAGS_DEFAULT;
Vector<uint8_t> data;
diff --git a/modules/bmp/image_loader_bmp.h b/modules/bmp/image_loader_bmp.h
index d3f12f0115..379e971458 100644
--- a/modules/bmp/image_loader_bmp.h
+++ b/modules/bmp/image_loader_bmp.h
@@ -55,24 +55,24 @@ protected:
struct bmp_header_s {
struct bmp_file_header_s {
- uint16_t bmp_signature;
- uint32_t bmp_file_size;
- uint32_t bmp_file_padding;
- uint32_t bmp_file_offset;
+ uint16_t bmp_signature = 0;
+ uint32_t bmp_file_size = 0;
+ uint32_t bmp_file_padding = 0;
+ uint32_t bmp_file_offset = 0;
} bmp_file_header;
struct bmp_info_header_s {
- uint32_t bmp_header_size;
- uint32_t bmp_width;
- uint32_t bmp_height;
- uint16_t bmp_planes;
- uint16_t bmp_bit_count;
- uint32_t bmp_compression;
- uint32_t bmp_size_image;
- uint32_t bmp_pixels_per_meter_x;
- uint32_t bmp_pixels_per_meter_y;
- uint32_t bmp_colors_used;
- uint32_t bmp_important_colors;
+ uint32_t bmp_header_size = 0;
+ uint32_t bmp_width = 0;
+ uint32_t bmp_height = 0;
+ uint16_t bmp_planes = 0;
+ uint16_t bmp_bit_count = 0;
+ uint32_t bmp_compression = 0;
+ uint32_t bmp_size_image = 0;
+ uint32_t bmp_pixels_per_meter_x = 0;
+ uint32_t bmp_pixels_per_meter_y = 0;
+ uint32_t bmp_colors_used = 0;
+ uint32_t bmp_important_colors = 0;
} bmp_info_header;
};
diff --git a/modules/bullet/area_bullet.h b/modules/bullet/area_bullet.h
index a5fa678fec..7cf666c119 100644
--- a/modules/bullet/area_bullet.h
+++ b/modules/bullet/area_bullet.h
@@ -80,18 +80,18 @@ public:
private:
// These are used by function callEvent. Instead to create this each call I create if one time.
Variant call_event_res[5];
- Variant *call_event_res_ptr[5];
+ Variant *call_event_res_ptr[5] = {};
- btGhostObject *btGhost;
+ btGhostObject *btGhost = nullptr;
Vector<OverlappingObjectData> overlappingObjects;
bool monitorable = true;
PhysicsServer3D::AreaSpaceOverrideMode spOv_mode = PhysicsServer3D::AREA_SPACE_OVERRIDE_DISABLED;
bool spOv_gravityPoint = false;
- real_t spOv_gravityPointDistanceScale = 0;
- real_t spOv_gravityPointAttenuation = 1;
+ real_t spOv_gravityPointDistanceScale = 0.0;
+ real_t spOv_gravityPointAttenuation = 1.0;
Vector3 spOv_gravityVec = Vector3(0, -1, 0);
- real_t spOv_gravityMag = 10;
+ real_t spOv_gravityMag = 10.0;
real_t spOv_linearDump = 0.1;
real_t spOv_angularDump = 0.1;
int spOv_priority = 0;
diff --git a/modules/bullet/btRayShape.cpp b/modules/bullet/btRayShape.cpp
index 1568cca63d..109854c9dd 100644
--- a/modules/bullet/btRayShape.cpp
+++ b/modules/bullet/btRayShape.cpp
@@ -39,11 +39,9 @@
*/
btRayShape::btRayShape(btScalar length) :
- btConvexInternalShape(),
- m_shapeAxis(0, 0, 1) {
+ btConvexInternalShape() {
m_shapeType = CUSTOM_CONVEX_SHAPE_TYPE;
setLength(length);
- slipsOnSlope = false;
}
btRayShape::~btRayShape() {
diff --git a/modules/bullet/btRayShape.h b/modules/bullet/btRayShape.h
index dcc4cc79c7..330755aa31 100644
--- a/modules/bullet/btRayShape.h
+++ b/modules/bullet/btRayShape.h
@@ -42,10 +42,10 @@
/// Ray shape around z axis
ATTRIBUTE_ALIGNED16(class)
btRayShape : public btConvexInternalShape {
- btScalar m_length;
- bool slipsOnSlope;
+ btScalar m_length = 0;
+ bool slipsOnSlope = false;
/// The default axis is the z
- btVector3 m_shapeAxis;
+ btVector3 m_shapeAxis = btVector3(0, 0, 1);
btTransform m_cacheSupportPoint;
btScalar m_cacheScaledLength;
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp
index 632682a15d..26e9f5a044 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/modules/bullet/bullet_physics_server.cpp
@@ -625,14 +625,14 @@ uint32_t BulletPhysicsServer3D::body_get_user_flags(RID p_body) const {
return 0;
}
-void BulletPhysicsServer3D::body_set_param(RID p_body, BodyParameter p_param, float p_value) {
+void BulletPhysicsServer3D::body_set_param(RID p_body, BodyParameter p_param, real_t p_value) {
RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
ERR_FAIL_COND(!body);
body->set_param(p_param, p_value);
}
-float BulletPhysicsServer3D::body_get_param(RID p_body, BodyParameter p_param) const {
+real_t BulletPhysicsServer3D::body_get_param(RID p_body, BodyParameter p_param) const {
RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
ERR_FAIL_COND_V(!body, 0);
@@ -807,11 +807,11 @@ int BulletPhysicsServer3D::body_get_max_contacts_reported(RID p_body) const {
return body->get_max_collisions_detection();
}
-void BulletPhysicsServer3D::body_set_contacts_reported_depth_threshold(RID p_body, float p_threshold) {
+void BulletPhysicsServer3D::body_set_contacts_reported_depth_threshold(RID p_body, real_t p_threshold) {
// Not supported by bullet and even Godot
}
-float BulletPhysicsServer3D::body_get_contacts_reported_depth_threshold(RID p_body) const {
+real_t BulletPhysicsServer3D::body_get_contacts_reported_depth_threshold(RID p_body) const {
// Not supported by bullet and even Godot
return 0.;
}
@@ -862,7 +862,7 @@ bool BulletPhysicsServer3D::body_test_motion(RID p_body, const Transform &p_from
return body->get_space()->test_body_motion(body, p_from, p_motion, p_infinite_inertia, r_result, p_exclude_raycast_shapes);
}
-int BulletPhysicsServer3D::body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin) {
+int BulletPhysicsServer3D::body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin) {
RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
ERR_FAIL_COND_V(!body, 0);
ERR_FAIL_COND_V(!body->get_space(), 0);
@@ -1059,16 +1059,16 @@ real_t BulletPhysicsServer3D::soft_body_get_linear_stiffness(RID p_body) {
return body->get_linear_stiffness();
}
-void BulletPhysicsServer3D::soft_body_set_areaAngular_stiffness(RID p_body, real_t p_stiffness) {
+void BulletPhysicsServer3D::soft_body_set_angular_stiffness(RID p_body, real_t p_stiffness) {
SoftBodyBullet *body = soft_body_owner.getornull(p_body);
ERR_FAIL_COND(!body);
- body->set_areaAngular_stiffness(p_stiffness);
+ body->set_angular_stiffness(p_stiffness);
}
-real_t BulletPhysicsServer3D::soft_body_get_areaAngular_stiffness(RID p_body) {
+real_t BulletPhysicsServer3D::soft_body_get_angular_stiffness(RID p_body) {
SoftBodyBullet *body = soft_body_owner.getornull(p_body);
ERR_FAIL_COND_V(!body, 0.f);
- return body->get_areaAngular_stiffness();
+ return body->get_angular_stiffness();
}
void BulletPhysicsServer3D::soft_body_set_volume_stiffness(RID p_body, real_t p_stiffness) {
@@ -1221,7 +1221,7 @@ RID BulletPhysicsServer3D::joint_create_pin(RID p_body_A, const Vector3 &p_local
CreateThenReturnRID(joint_owner, joint);
}
-void BulletPhysicsServer3D::pin_joint_set_param(RID p_joint, PinJointParam p_param, float p_value) {
+void BulletPhysicsServer3D::pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) {
JointBullet *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_PIN);
@@ -1229,7 +1229,7 @@ void BulletPhysicsServer3D::pin_joint_set_param(RID p_joint, PinJointParam p_par
pin_joint->set_param(p_param, p_value);
}
-float BulletPhysicsServer3D::pin_joint_get_param(RID p_joint, PinJointParam p_param) const {
+real_t BulletPhysicsServer3D::pin_joint_get_param(RID p_joint, PinJointParam p_param) const {
JointBullet *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_PIN, 0);
@@ -1309,7 +1309,7 @@ RID BulletPhysicsServer3D::joint_create_hinge_simple(RID p_body_A, const Vector3
CreateThenReturnRID(joint_owner, joint);
}
-void BulletPhysicsServer3D::hinge_joint_set_param(RID p_joint, HingeJointParam p_param, float p_value) {
+void BulletPhysicsServer3D::hinge_joint_set_param(RID p_joint, HingeJointParam p_param, real_t p_value) {
JointBullet *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_HINGE);
@@ -1317,7 +1317,7 @@ void BulletPhysicsServer3D::hinge_joint_set_param(RID p_joint, HingeJointParam p
hinge_joint->set_param(p_param, p_value);
}
-float BulletPhysicsServer3D::hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const {
+real_t BulletPhysicsServer3D::hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const {
JointBullet *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_HINGE, 0);
@@ -1361,7 +1361,7 @@ RID BulletPhysicsServer3D::joint_create_slider(RID p_body_A, const Transform &p_
CreateThenReturnRID(joint_owner, joint);
}
-void BulletPhysicsServer3D::slider_joint_set_param(RID p_joint, SliderJointParam p_param, float p_value) {
+void BulletPhysicsServer3D::slider_joint_set_param(RID p_joint, SliderJointParam p_param, real_t p_value) {
JointBullet *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_SLIDER);
@@ -1369,7 +1369,7 @@ void BulletPhysicsServer3D::slider_joint_set_param(RID p_joint, SliderJointParam
slider_joint->set_param(p_param, p_value);
}
-float BulletPhysicsServer3D::slider_joint_get_param(RID p_joint, SliderJointParam p_param) const {
+real_t BulletPhysicsServer3D::slider_joint_get_param(RID p_joint, SliderJointParam p_param) const {
JointBullet *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_SLIDER, 0);
@@ -1395,7 +1395,7 @@ RID BulletPhysicsServer3D::joint_create_cone_twist(RID p_body_A, const Transform
CreateThenReturnRID(joint_owner, joint);
}
-void BulletPhysicsServer3D::cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, float p_value) {
+void BulletPhysicsServer3D::cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, real_t p_value) {
JointBullet *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_CONE_TWIST);
@@ -1403,7 +1403,7 @@ void BulletPhysicsServer3D::cone_twist_joint_set_param(RID p_joint, ConeTwistJoi
coneTwist_joint->set_param(p_param, p_value);
}
-float BulletPhysicsServer3D::cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const {
+real_t BulletPhysicsServer3D::cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const {
JointBullet *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0.);
ERR_FAIL_COND_V(joint->get_type() != JOINT_CONE_TWIST, 0.);
@@ -1431,7 +1431,7 @@ RID BulletPhysicsServer3D::joint_create_generic_6dof(RID p_body_A, const Transfo
CreateThenReturnRID(joint_owner, joint);
}
-void BulletPhysicsServer3D::generic_6dof_joint_set_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param, float p_value) {
+void BulletPhysicsServer3D::generic_6dof_joint_set_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param, real_t p_value) {
JointBullet *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
ERR_FAIL_COND(joint->get_type() != JOINT_6DOF);
@@ -1439,7 +1439,7 @@ void BulletPhysicsServer3D::generic_6dof_joint_set_param(RID p_joint, Vector3::A
generic_6dof_joint->set_param(p_axis, p_param, p_value);
}
-float BulletPhysicsServer3D::generic_6dof_joint_get_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param) {
+real_t BulletPhysicsServer3D::generic_6dof_joint_get_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param) {
JointBullet *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
ERR_FAIL_COND_V(joint->get_type() != JOINT_6DOF, 0);
@@ -1525,7 +1525,7 @@ void BulletPhysicsServer3D::init() {
BulletPhysicsDirectBodyState3D::initSingleton();
}
-void BulletPhysicsServer3D::step(float p_deltaTime) {
+void BulletPhysicsServer3D::step(real_t p_deltaTime) {
if (!active) {
return;
}
diff --git a/modules/bullet/bullet_physics_server.h b/modules/bullet/bullet_physics_server.h
index b5dc84c8f5..97b719ae8e 100644
--- a/modules/bullet/bullet_physics_server.h
+++ b/modules/bullet/bullet_physics_server.h
@@ -207,8 +207,8 @@ public:
/// This is not supported by physics server
virtual uint32_t body_get_user_flags(RID p_body) const override;
- virtual void body_set_param(RID p_body, BodyParameter p_param, float p_value) override;
- virtual float body_get_param(RID p_body, BodyParameter p_param) const override;
+ virtual void body_set_param(RID p_body, BodyParameter p_param, real_t p_value) override;
+ virtual real_t body_get_param(RID p_body, BodyParameter p_param) const override;
virtual void body_set_kinematic_safe_margin(RID p_body, real_t p_margin) override;
virtual real_t body_get_kinematic_safe_margin(RID p_body) const override;
@@ -241,8 +241,8 @@ public:
virtual void body_set_max_contacts_reported(RID p_body, int p_contacts) override;
virtual int body_get_max_contacts_reported(RID p_body) const override;
- virtual void body_set_contacts_reported_depth_threshold(RID p_body, float p_threshold) override;
- virtual float body_get_contacts_reported_depth_threshold(RID p_body) const override;
+ virtual void body_set_contacts_reported_depth_threshold(RID p_body, real_t p_threshold) override;
+ virtual real_t body_get_contacts_reported_depth_threshold(RID p_body) const override;
virtual void body_set_omit_force_integration(RID p_body, bool p_omit) override;
virtual bool body_is_omitting_force_integration(RID p_body) const override;
@@ -256,7 +256,7 @@ public:
virtual PhysicsDirectBodyState3D *body_get_direct_state(RID p_body) override;
virtual bool body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) override;
- virtual int body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin = 0.001) override;
+ virtual int body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin = 0.001) override;
/* SOFT BODY API */
@@ -298,8 +298,8 @@ public:
virtual void soft_body_set_linear_stiffness(RID p_body, real_t p_stiffness) override;
virtual real_t soft_body_get_linear_stiffness(RID p_body) override;
- virtual void soft_body_set_areaAngular_stiffness(RID p_body, real_t p_stiffness) override;
- virtual real_t soft_body_get_areaAngular_stiffness(RID p_body) override;
+ virtual void soft_body_set_angular_stiffness(RID p_body, real_t p_stiffness) override;
+ virtual real_t soft_body_get_angular_stiffness(RID p_body) override;
virtual void soft_body_set_volume_stiffness(RID p_body, real_t p_stiffness) override;
virtual real_t soft_body_get_volume_stiffness(RID p_body) override;
@@ -337,8 +337,8 @@ public:
virtual RID joint_create_pin(RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) override;
- virtual void pin_joint_set_param(RID p_joint, PinJointParam p_param, float p_value) override;
- virtual float pin_joint_get_param(RID p_joint, PinJointParam p_param) const override;
+ virtual void pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) override;
+ virtual real_t pin_joint_get_param(RID p_joint, PinJointParam p_param) const override;
virtual void pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) override;
virtual Vector3 pin_joint_get_local_a(RID p_joint) const override;
@@ -349,8 +349,8 @@ public:
virtual RID joint_create_hinge(RID p_body_A, const Transform &p_hinge_A, RID p_body_B, const Transform &p_hinge_B) override;
virtual RID joint_create_hinge_simple(RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B) override;
- virtual void hinge_joint_set_param(RID p_joint, HingeJointParam p_param, float p_value) override;
- virtual float hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const override;
+ virtual void hinge_joint_set_param(RID p_joint, HingeJointParam p_param, real_t p_value) override;
+ virtual real_t hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const override;
virtual void hinge_joint_set_flag(RID p_joint, HingeJointFlag p_flag, bool p_value) override;
virtual bool hinge_joint_get_flag(RID p_joint, HingeJointFlag p_flag) const override;
@@ -358,20 +358,20 @@ public:
/// Reference frame is A
virtual RID joint_create_slider(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) override;
- virtual void slider_joint_set_param(RID p_joint, SliderJointParam p_param, float p_value) override;
- virtual float slider_joint_get_param(RID p_joint, SliderJointParam p_param) const override;
+ virtual void slider_joint_set_param(RID p_joint, SliderJointParam p_param, real_t p_value) override;
+ virtual real_t slider_joint_get_param(RID p_joint, SliderJointParam p_param) const override;
/// Reference frame is A
virtual RID joint_create_cone_twist(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) override;
- virtual void cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, float p_value) override;
- virtual float cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const override;
+ virtual void cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, real_t p_value) override;
+ virtual real_t cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const override;
/// Reference frame is A
virtual RID joint_create_generic_6dof(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) override;
- virtual void generic_6dof_joint_set_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param, float p_value) override;
- virtual float generic_6dof_joint_get_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param) override;
+ virtual void generic_6dof_joint_set_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param, real_t p_value) override;
+ virtual real_t generic_6dof_joint_get_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param) override;
virtual void generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag, bool p_enable) override;
virtual bool generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag) override;
@@ -393,7 +393,7 @@ public:
}
virtual void init() override;
- virtual void step(float p_deltaTime) override;
+ virtual void step(real_t p_deltaTime) override;
virtual void flush_queries() override;
virtual void finish() override;
diff --git a/modules/bullet/collision_object_bullet.h b/modules/bullet/collision_object_bullet.h
index bea28f2183..c8081a53f1 100644
--- a/modules/bullet/collision_object_bullet.h
+++ b/modules/bullet/collision_object_bullet.h
@@ -110,7 +110,7 @@ public:
};
protected:
- Type type;
+ Type type = TYPE_AREA;
ObjectID instance_id;
uint32_t collisionLayer = 0;
uint32_t collisionMask = 0;
diff --git a/modules/bullet/config.py b/modules/bullet/config.py
index d22f9454ed..be7cf74f6f 100644
--- a/modules/bullet/config.py
+++ b/modules/bullet/config.py
@@ -1,5 +1,6 @@
def can_build(env, platform):
- return True
+ # API Changed and bullet is disabled at the moment
+ return False
def configure(env):
diff --git a/modules/bullet/godot_motion_state.h b/modules/bullet/godot_motion_state.h
index 0669d2739a..ca17349130 100644
--- a/modules/bullet/godot_motion_state.h
+++ b/modules/bullet/godot_motion_state.h
@@ -51,7 +51,7 @@ class GodotMotionState : public btMotionState {
/// This data is used to store last world position
btTransform bodyCurrentWorldTransform;
- RigidBodyBullet *owner;
+ RigidBodyBullet *owner = nullptr;
public:
GodotMotionState(RigidBodyBullet *p_owner) :
diff --git a/modules/bullet/godot_ray_world_algorithm.h b/modules/bullet/godot_ray_world_algorithm.h
index f705edef81..25798aecb4 100644
--- a/modules/bullet/godot_ray_world_algorithm.h
+++ b/modules/bullet/godot_ray_world_algorithm.h
@@ -45,7 +45,7 @@ class GodotRayWorldAlgorithm : public btActivatingCollisionAlgorithm {
const btDiscreteDynamicsWorld *m_world;
btPersistentManifold *m_manifoldPtr;
bool m_ownManifold = false;
- bool m_isSwapped;
+ bool m_isSwapped = false;
public:
GodotRayWorldAlgorithm(const btDiscreteDynamicsWorld *world, btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped);
diff --git a/modules/bullet/godot_result_callbacks.h b/modules/bullet/godot_result_callbacks.h
index 4f40f7ecfd..f92665f3e4 100644
--- a/modules/bullet/godot_result_callbacks.h
+++ b/modules/bullet/godot_result_callbacks.h
@@ -59,8 +59,8 @@ struct GodotClosestRayResultCallback : public btCollisionWorld::ClosestRayResult
bool m_pickRay = false;
int m_shapeId = 0;
- bool collide_with_bodies;
- bool collide_with_areas;
+ bool collide_with_bodies = false;
+ bool collide_with_areas = false;
public:
GodotClosestRayResultCallback(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, const Set<RID> *p_exclude, bool p_collide_with_bodies, bool p_collide_with_areas) :
@@ -84,8 +84,8 @@ public:
// store all colliding object
struct GodotAllConvexResultCallback : public btCollisionWorld::ConvexResultCallback {
public:
- PhysicsDirectSpaceState3D::ShapeResult *m_results;
- int m_resultMax;
+ PhysicsDirectSpaceState3D::ShapeResult *m_results = nullptr;
+ int m_resultMax = 0;
const Set<RID> *m_exclude;
int count = 0;
@@ -117,8 +117,8 @@ public:
const Set<RID> *m_exclude;
int m_shapeId = 0;
- bool collide_with_bodies;
- bool collide_with_areas;
+ bool collide_with_bodies = false;
+ bool collide_with_areas = false;
GodotClosestConvexResultCallback(const btVector3 &convexFromWorld, const btVector3 &convexToWorld, const Set<RID> *p_exclude, bool p_collide_with_bodies, bool p_collide_with_areas) :
btCollisionWorld::ClosestConvexResultCallback(convexFromWorld, convexToWorld),
@@ -134,13 +134,13 @@ public:
struct GodotAllContactResultCallback : public btCollisionWorld::ContactResultCallback {
public:
const btCollisionObject *m_self_object;
- PhysicsDirectSpaceState3D::ShapeResult *m_results;
- int m_resultMax;
+ PhysicsDirectSpaceState3D::ShapeResult *m_results = nullptr;
+ int m_resultMax = 0;
const Set<RID> *m_exclude;
int m_count = 0;
- bool collide_with_bodies;
- bool collide_with_areas;
+ bool collide_with_bodies = false;
+ bool collide_with_areas = false;
GodotAllContactResultCallback(btCollisionObject *p_self_object, PhysicsDirectSpaceState3D::ShapeResult *p_results, int p_resultMax, const Set<RID> *p_exclude, bool p_collide_with_bodies, bool p_collide_with_areas) :
m_self_object(p_self_object),
@@ -159,13 +159,13 @@ public:
struct GodotContactPairContactResultCallback : public btCollisionWorld::ContactResultCallback {
public:
const btCollisionObject *m_self_object;
- Vector3 *m_results;
- int m_resultMax;
+ Vector3 *m_results = nullptr;
+ int m_resultMax = 0;
const Set<RID> *m_exclude;
int m_count = 0;
- bool collide_with_bodies;
- bool collide_with_areas;
+ bool collide_with_bodies = false;
+ bool collide_with_areas = false;
GodotContactPairContactResultCallback(btCollisionObject *p_self_object, Vector3 *p_results, int p_resultMax, const Set<RID> *p_exclude, bool p_collide_with_bodies, bool p_collide_with_areas) :
m_self_object(p_self_object),
@@ -183,14 +183,14 @@ public:
struct GodotRestInfoContactResultCallback : public btCollisionWorld::ContactResultCallback {
public:
const btCollisionObject *m_self_object;
- PhysicsDirectSpaceState3D::ShapeRestInfo *m_result;
+ PhysicsDirectSpaceState3D::ShapeRestInfo *m_result = nullptr;
const Set<RID> *m_exclude;
bool m_collided = false;
- real_t m_min_distance = 0;
- const btCollisionObject *m_rest_info_collision_object;
+ real_t m_min_distance = 0.0;
+ const btCollisionObject *m_rest_info_collision_object = nullptr;
btVector3 m_rest_info_bt_point;
- bool collide_with_bodies;
- bool collide_with_areas;
+ bool collide_with_bodies = false;
+ bool collide_with_areas = false;
GodotRestInfoContactResultCallback(btCollisionObject *p_self_object, PhysicsDirectSpaceState3D::ShapeRestInfo *p_result, const Set<RID> *p_exclude, bool p_collide_with_bodies, bool p_collide_with_areas) :
m_self_object(p_self_object),
diff --git a/modules/bullet/rid_bullet.h b/modules/bullet/rid_bullet.h
index 0b74a0cc4d..face6b4861 100644
--- a/modules/bullet/rid_bullet.h
+++ b/modules/bullet/rid_bullet.h
@@ -41,7 +41,7 @@ class BulletPhysicsServer3D;
class RIDBullet {
RID self;
- BulletPhysicsServer3D *physicsServer;
+ BulletPhysicsServer3D *physicsServer = nullptr;
public:
_FORCE_INLINE_ void set_self(const RID &p_self) { self = p_self; }
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 4763098584..a5093afe9d 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -56,11 +56,11 @@ Vector3 BulletPhysicsDirectBodyState3D::get_total_gravity() const {
return gVec;
}
-float BulletPhysicsDirectBodyState3D::get_total_angular_damp() const {
+real_t BulletPhysicsDirectBodyState3D::get_total_angular_damp() const {
return body->btBody->getAngularDamping();
}
-float BulletPhysicsDirectBodyState3D::get_total_linear_damp() const {
+real_t BulletPhysicsDirectBodyState3D::get_total_linear_damp() const {
return body->btBody->getLinearDamping();
}
@@ -74,7 +74,7 @@ Basis BulletPhysicsDirectBodyState3D::get_principal_inertia_axes() const {
return Basis();
}
-float BulletPhysicsDirectBodyState3D::get_inverse_mass() const {
+real_t BulletPhysicsDirectBodyState3D::get_inverse_mass() const {
return body->btBody->getInvMass();
}
@@ -158,7 +158,7 @@ Vector3 BulletPhysicsDirectBodyState3D::get_contact_local_normal(int p_contact_i
return body->collisions[p_contact_idx].hitNormal;
}
-float BulletPhysicsDirectBodyState3D::get_contact_impulse(int p_contact_idx) const {
+real_t BulletPhysicsDirectBodyState3D::get_contact_impulse(int p_contact_idx) const {
return body->collisions[p_contact_idx].appliedImpulse;
}
@@ -412,7 +412,7 @@ void RigidBodyBullet::on_collision_checker_end() {
isTransformChanged = btBody->isActive() && !btBody->isStaticOrKinematicObject();
}
-bool RigidBodyBullet::add_collision_object(RigidBodyBullet *p_otherObject, const Vector3 &p_hitWorldLocation, const Vector3 &p_hitLocalLocation, const Vector3 &p_hitNormal, const float &p_appliedImpulse, int p_other_shape_index, int p_local_shape_index) {
+bool RigidBodyBullet::add_collision_object(RigidBodyBullet *p_otherObject, const Vector3 &p_hitWorldLocation, const Vector3 &p_hitLocalLocation, const Vector3 &p_hitNormal, const real_t &p_appliedImpulse, int p_other_shape_index, int p_local_shape_index) {
if (collisionsCount >= maxCollisionsDetection) {
return false;
}
@@ -710,12 +710,12 @@ bool RigidBodyBullet::is_axis_locked(PhysicsServer3D::BodyAxis p_axis) const {
}
void RigidBodyBullet::reload_axis_lock() {
- btBody->setLinearFactor(btVector3(float(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_X)), float(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_Y)), float(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_Z))));
+ btBody->setLinearFactor(btVector3(btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_X)), btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_Y)), btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_Z))));
if (PhysicsServer3D::BODY_MODE_CHARACTER == mode) {
/// When character angular is always locked
btBody->setAngularFactor(btVector3(0., 0., 0.));
} else {
- btBody->setAngularFactor(btVector3(float(!is_axis_locked(PhysicsServer3D::BODY_AXIS_ANGULAR_X)), float(!is_axis_locked(PhysicsServer3D::BODY_AXIS_ANGULAR_Y)), float(!is_axis_locked(PhysicsServer3D::BODY_AXIS_ANGULAR_Z))));
+ btBody->setAngularFactor(btVector3(btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_ANGULAR_X)), btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_ANGULAR_Y)), btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_ANGULAR_Z))));
}
}
diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h
index fc3f2db796..a4be7f9e07 100644
--- a/modules/bullet/rigid_body_bullet.h
+++ b/modules/bullet/rigid_body_bullet.h
@@ -81,21 +81,21 @@ public:
}
public:
- RigidBodyBullet *body;
- real_t deltaTime;
+ RigidBodyBullet *body = nullptr;
+ real_t deltaTime = 0.0;
private:
BulletPhysicsDirectBodyState3D() {}
public:
virtual Vector3 get_total_gravity() const override;
- virtual float get_total_angular_damp() const override;
- virtual float get_total_linear_damp() const override;
+ virtual real_t get_total_angular_damp() const override;
+ virtual real_t get_total_linear_damp() const override;
virtual Vector3 get_center_of_mass() const override;
virtual Basis get_principal_inertia_axes() const override;
// get the mass
- virtual float get_inverse_mass() const override;
+ virtual real_t get_inverse_mass() const override;
// get density of this body space
virtual Vector3 get_inverse_inertia() const override;
// get density of this body space
@@ -124,7 +124,7 @@ public:
virtual Vector3 get_contact_local_position(int p_contact_idx) const override;
virtual Vector3 get_contact_local_normal(int p_contact_idx) const override;
- virtual float get_contact_impulse(int p_contact_idx) const override;
+ virtual real_t get_contact_impulse(int p_contact_idx) const override;
virtual int get_contact_local_shape(int p_contact_idx) const override;
virtual RID get_contact_collider(int p_contact_idx) const override;
@@ -144,13 +144,13 @@ public:
class RigidBodyBullet : public RigidCollisionObjectBullet {
public:
struct CollisionData {
- RigidBodyBullet *otherObject;
- int other_object_shape;
- int local_shape;
+ RigidBodyBullet *otherObject = nullptr;
+ int other_object_shape = 0;
+ int local_shape = 0;
Vector3 hitLocalLocation;
Vector3 hitWorldLocation;
Vector3 hitNormal;
- float appliedImpulse;
+ real_t appliedImpulse = 0.0;
};
struct ForceIntegrationCallback {
@@ -169,7 +169,7 @@ public:
};
struct KinematicUtilities {
- RigidBodyBullet *owner;
+ RigidBodyBullet *owner = nullptr;
btScalar safe_margin;
Vector<KinematicShape> shapes;
@@ -194,10 +194,10 @@ private:
GodotMotionState *godotMotionState;
btRigidBody *btBody;
uint16_t locked_axis = 0;
- real_t mass = 1;
- real_t gravity_scale = 1;
- real_t linearDamp = 0;
- real_t angularDamp = 0;
+ real_t mass = 1.0;
+ real_t gravity_scale = 1.0;
+ real_t linearDamp = 0.0;
+ real_t angularDamp = 0.0;
bool can_sleep = true;
bool omit_forces_integration = false;
bool can_integrate_forces = false;
@@ -264,7 +264,7 @@ public:
}
bool can_add_collision() { return collisionsCount < maxCollisionsDetection; }
- bool add_collision_object(RigidBodyBullet *p_otherObject, const Vector3 &p_hitWorldLocation, const Vector3 &p_hitLocalLocation, const Vector3 &p_hitNormal, const float &p_appliedImpulse, int p_other_shape_index, int p_local_shape_index);
+ bool add_collision_object(RigidBodyBullet *p_otherObject, const Vector3 &p_hitWorldLocation, const Vector3 &p_hitLocalLocation, const Vector3 &p_hitNormal, const real_t &p_appliedImpulse, int p_other_shape_index, int p_local_shape_index);
bool was_colliding(RigidBodyBullet *p_other_object);
void set_activation_state(bool p_active);
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp
index cc2ec28a9e..82876ab77c 100644
--- a/modules/bullet/shape_bullet.cpp
+++ b/modules/bullet/shape_bullet.cpp
@@ -480,7 +480,11 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
Vector<real_t> l_heights;
Variant l_heights_v = d["heights"];
+#ifdef REAL_T_IS_DOUBLE
+ if (l_heights_v.get_type() == Variant::PACKED_FLOAT64_ARRAY) {
+#else
if (l_heights_v.get_type() == Variant::PACKED_FLOAT32_ARRAY) {
+#endif
// Ready-to-use heights can be passed
l_heights = l_heights_v;
@@ -503,7 +507,7 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
real_t *w = l_heights.ptrw();
const uint8_t *r = im_data.ptr();
- float *rp = (float *)r;
+ real_t *rp = (real_t *)r;
// At this point, `rp` could be used directly for Bullet, but I don't know how safe it would be.
for (int i = 0; i < l_heights.size(); ++i) {
@@ -511,7 +515,11 @@ void HeightMapShapeBullet::set_data(const Variant &p_data) {
}
} else {
+#ifdef REAL_T_IS_DOUBLE
+ ERR_FAIL_MSG("Expected PackedFloat64Array or float Image.");
+#else
ERR_FAIL_MSG("Expected PackedFloat32Array or float Image.");
+#endif
}
ERR_FAIL_COND(l_width <= 0);
diff --git a/modules/bullet/shape_bullet.h b/modules/bullet/shape_bullet.h
index 63475822de..bfd95747eb 100644
--- a/modules/bullet/shape_bullet.h
+++ b/modules/bullet/shape_bullet.h
@@ -213,10 +213,10 @@ private:
class HeightMapShapeBullet : public ShapeBullet {
public:
Vector<real_t> heights;
- int width;
- int depth;
- real_t min_height;
- real_t max_height;
+ int width = 0;
+ int depth = 0;
+ real_t min_height = 0.0;
+ real_t max_height = 0.0;
HeightMapShapeBullet();
@@ -231,7 +231,7 @@ private:
class RayShapeBullet : public ShapeBullet {
public:
- real_t length = 1;
+ real_t length = 1.0;
bool slips_on_slope = false;
RayShapeBullet();
diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp
index a490179964..91a1934e07 100644
--- a/modules/bullet/soft_body_bullet.cpp
+++ b/modules/bullet/soft_body_bullet.cpp
@@ -259,10 +259,10 @@ void SoftBodyBullet::set_linear_stiffness(real_t p_val) {
}
}
-void SoftBodyBullet::set_areaAngular_stiffness(real_t p_val) {
- areaAngular_stiffness = p_val;
+void SoftBodyBullet::set_angular_stiffness(real_t p_val) {
+ angular_stiffness = p_val;
if (bt_soft_body) {
- mat0->m_kAST = areaAngular_stiffness;
+ mat0->m_kAST = angular_stiffness;
}
}
@@ -409,7 +409,7 @@ void SoftBodyBullet::setup_soft_body() {
bt_soft_body->generateBendingConstraints(2, mat0);
mat0->m_kLST = linear_stiffness;
- mat0->m_kAST = areaAngular_stiffness;
+ mat0->m_kAST = angular_stiffness;
mat0->m_kVST = volume_stiffness;
// Clusters allow to have Soft vs Soft collision but doesn't work well right now
diff --git a/modules/bullet/soft_body_bullet.h b/modules/bullet/soft_body_bullet.h
index b15b72daf9..23f6fba9a6 100644
--- a/modules/bullet/soft_body_bullet.h
+++ b/modules/bullet/soft_body_bullet.h
@@ -59,7 +59,7 @@ class SoftBodyBullet : public CollisionObjectBullet {
private:
btSoftBody *bt_soft_body = nullptr;
Vector<Vector<int>> indices_table;
- btSoftBody::Material *mat0; // This is just a copy of pointer managed by btSoftBody
+ btSoftBody::Material *mat0 = nullptr; // This is just a copy of pointer managed by btSoftBody
bool isScratched = false;
Ref<Mesh> soft_mesh;
@@ -67,7 +67,7 @@ private:
int simulation_precision = 5;
real_t total_mass = 1.;
real_t linear_stiffness = 0.5; // [0,1]
- real_t areaAngular_stiffness = 0.5; // [0,1]
+ real_t angular_stiffness = 0.5; // [0,1]
real_t volume_stiffness = 0.5; // [0,1]
real_t pressure_coefficient = 0.; // [-inf,+inf]
real_t pose_matching_coefficient = 0.; // [0,1]
@@ -129,8 +129,8 @@ public:
void set_linear_stiffness(real_t p_val);
_FORCE_INLINE_ real_t get_linear_stiffness() const { return linear_stiffness; }
- void set_areaAngular_stiffness(real_t p_val);
- _FORCE_INLINE_ real_t get_areaAngular_stiffness() const { return areaAngular_stiffness; }
+ void set_angular_stiffness(real_t p_val);
+ _FORCE_INLINE_ real_t get_angular_stiffness() const { return angular_stiffness; }
void set_volume_stiffness(real_t p_val);
_FORCE_INLINE_ real_t get_volume_stiffness() const { return volume_stiffness; }
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index d7dd11d2a5..7d337bc4d0 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -117,7 +117,7 @@ bool BulletPhysicsDirectSpaceState::intersect_ray(const Vector3 &p_from, const V
}
}
-int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Transform &p_xform, float p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
+int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Transform &p_xform, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
if (p_result_max <= 0) {
return 0;
}
@@ -152,7 +152,7 @@ int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Tra
return btQuery.m_count;
}
-bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, float p_margin, float &r_closest_safe, float &r_closest_unsafe, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, ShapeRestInfo *r_info) {
+bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &r_closest_safe, real_t &r_closest_unsafe, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, ShapeRestInfo *r_info) {
r_closest_safe = 0.0f;
r_closest_unsafe = 0.0f;
btVector3 bt_motion;
@@ -214,7 +214,7 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
}
/// Returns the list of contacts pairs in this order: Local contact, other body contact
-bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &p_shape_xform, float p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
+bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &p_shape_xform, real_t p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
if (p_result_max <= 0) {
return false;
}
@@ -250,7 +250,7 @@ bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &
return btQuery.m_count;
}
-bool BulletPhysicsDirectSpaceState::rest_info(RID p_shape, const Transform &p_shape_xform, float p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
+bool BulletPhysicsDirectSpaceState::rest_info(RID p_shape, const Transform &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
ShapeBullet *shape = space->get_physics_server()->get_shape_owner()->getornull(p_shape);
ERR_FAIL_COND_V(!shape, false);
@@ -841,7 +841,7 @@ void SpaceBullet::check_body_collision() {
Vector3 collisionWorldPosition;
Vector3 collisionLocalPosition;
Vector3 normalOnB;
- float appliedImpulse = pt.m_appliedImpulse;
+ real_t appliedImpulse = pt.m_appliedImpulse;
B_TO_G(pt.m_normalWorldOnB, normalOnB);
// The pt.m_index only contains the shape index when more than one collision shape is used
@@ -1062,7 +1062,7 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f
return has_penetration;
}
-int SpaceBullet::test_ray_separation(RigidBodyBullet *p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, PhysicsServer3D::SeparationResult *r_results, int p_result_max, float p_margin) {
+int SpaceBullet::test_ray_separation(RigidBodyBullet *p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, PhysicsServer3D::SeparationResult *r_results, int p_result_max, real_t p_margin) {
btTransform body_transform;
G_TO_B(p_transform, body_transform);
UNSCALE_BT_BASIS(body_transform);
@@ -1092,13 +1092,13 @@ private:
btDbvtVolume bounds;
const btCollisionObject *self_collision_object;
- uint32_t collision_layer;
- uint32_t collision_mask;
+ uint32_t collision_layer = 0;
+ uint32_t collision_mask = 0;
struct CompoundLeafCallback : btDbvt::ICollide {
private:
- RecoverPenetrationBroadPhaseCallback *parent_callback;
- btCollisionObject *collision_object;
+ RecoverPenetrationBroadPhaseCallback *parent_callback = nullptr;
+ btCollisionObject *collision_object = nullptr;
public:
CompoundLeafCallback(RecoverPenetrationBroadPhaseCallback *p_parent_callback, btCollisionObject *p_collision_object) :
@@ -1116,8 +1116,8 @@ private:
public:
struct BroadphaseResult {
- btCollisionObject *collision_object;
- int compound_child_index;
+ btCollisionObject *collision_object = nullptr;
+ int compound_child_index = 0;
};
Vector<BroadphaseResult> results;
diff --git a/modules/bullet/space_bullet.h b/modules/bullet/space_bullet.h
index 0f2482e551..87aa2b9e93 100644
--- a/modules/bullet/space_bullet.h
+++ b/modules/bullet/space_bullet.h
@@ -78,11 +78,11 @@ public:
virtual int intersect_point(const Vector3 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_ray = false) override;
- virtual int intersect_shape(const RID &p_shape, const Transform &p_xform, float p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, float p_margin, float &r_closest_safe, float &r_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) override;
+ virtual int intersect_shape(const RID &p_shape, const Transform &p_xform, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &r_closest_safe, real_t &r_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) override;
/// Returns the list of contacts pairs in this order: Local contact, other body contact
- virtual bool collide_shape(RID p_shape, const Transform &p_shape_xform, float p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
- virtual bool rest_info(RID p_shape, const Transform &p_shape_xform, float p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool collide_shape(RID p_shape, const Transform &p_shape_xform, real_t p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
+ virtual bool rest_info(RID p_shape, const Transform &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) override;
virtual Vector3 get_closest_point_to_object_volume(RID p_object, const Vector3 p_point) const override;
};
@@ -100,12 +100,12 @@ class SpaceBullet : public RIDBullet {
btGhostPairCallback *ghostPairCallback = nullptr;
GodotFilterCallback *godotFilterCallback = nullptr;
- btGjkEpaPenetrationDepthSolver *gjk_epa_pen_solver;
- btVoronoiSimplexSolver *gjk_simplex_solver;
+ btGjkEpaPenetrationDepthSolver *gjk_epa_pen_solver = nullptr;
+ btVoronoiSimplexSolver *gjk_simplex_solver = nullptr;
BulletPhysicsDirectSpaceState *direct_access;
Vector3 gravityDirection = Vector3(0, -1, 0);
- real_t gravityMagnitude = 10;
+ real_t gravityMagnitude = 10.0;
real_t linear_damp = 0.0;
real_t angular_damp = 0.0;
@@ -189,7 +189,7 @@ public:
real_t get_angular_damp() const { return angular_damp; }
bool test_body_motion(RigidBodyBullet *p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, PhysicsServer3D::MotionResult *r_result, bool p_exclude_raycast_shapes);
- int test_ray_separation(RigidBodyBullet *p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, PhysicsServer3D::SeparationResult *r_results, int p_result_max, float p_margin);
+ int test_ray_separation(RigidBodyBullet *p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, PhysicsServer3D::SeparationResult *r_results, int p_result_max, real_t p_margin);
private:
void create_empty_world(bool p_create_soft_world);
diff --git a/modules/camera_iphone/SCsub b/modules/camera_iphone/SCsub
deleted file mode 100644
index 0a37d9a6f5..0000000000
--- a/modules/camera_iphone/SCsub
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-Import("env_modules")
-
-env_camera = env_modules.Clone()
-
-# (iOS) Enable module support
-env_camera.Append(CCFLAGS=["-fmodules", "-fcxx-modules"])
-
-# (iOS) Build as separate static library
-modules_sources = []
-env_camera.add_source_files(modules_sources, "*.cpp")
-env_camera.add_source_files(modules_sources, "*.mm")
-mod_lib = env_modules.add_library("#bin/libgodot_camera_module" + env["LIBSUFFIX"], modules_sources)
diff --git a/modules/camera_iphone/camera.gdip b/modules/camera_iphone/camera.gdip
deleted file mode 100644
index 09017b8d27..0000000000
--- a/modules/camera_iphone/camera.gdip
+++ /dev/null
@@ -1,18 +0,0 @@
-[config]
-name="Camera"
-binary="camera_lib.a"
-
-initialization="register_camera_types"
-deinitialization="unregister_camera_types"
-
-[dependencies]
-linked=[]
-embedded=[]
-system=["AVFoundation.framework"]
-
-capabilities=[]
-
-files=[]
-
-[plist]
-NSCameraUsageDescription="Device camera is used for some functionality"
diff --git a/modules/camera_iphone/camera_ios.h b/modules/camera_iphone/camera_ios.h
deleted file mode 100644
index 0566457a0f..0000000000
--- a/modules/camera_iphone/camera_ios.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*************************************************************************/
-/* camera_ios.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 CAMERAIOS_H
-#define CAMERAIOS_H
-
-#include "servers/camera_server.h"
-
-class CameraIOS : public CameraServer {
-private:
-public:
- CameraIOS();
- ~CameraIOS();
-
- void update_feeds();
-};
-
-#endif /* CAMERAIOS_H */
diff --git a/modules/camera_iphone/camera_ios.mm b/modules/camera_iphone/camera_ios.mm
deleted file mode 100644
index 39568fbd6c..0000000000
--- a/modules/camera_iphone/camera_ios.mm
+++ /dev/null
@@ -1,445 +0,0 @@
-/*************************************************************************/
-/* camera_ios.mm */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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. */
-/*************************************************************************/
-
-///@TODO this is a near duplicate of CameraOSX, we should find a way to combine those to minimize code duplication!!!!
-// If you fix something here, make sure you fix it there as wel!
-
-#include "camera_ios.h"
-#include "servers/camera/camera_feed.h"
-
-#import <AVFoundation/AVFoundation.h>
-#import <UIKit/UIKit.h>
-
-//////////////////////////////////////////////////////////////////////////
-// MyCaptureSession - This is a little helper class so we can capture our frames
-
-@interface MyCaptureSession : AVCaptureSession <AVCaptureVideoDataOutputSampleBufferDelegate> {
- Ref<CameraFeed> feed;
- size_t width[2];
- size_t height[2];
- Vector<uint8_t> img_data[2];
-
- AVCaptureDeviceInput *input;
- AVCaptureVideoDataOutput *output;
-}
-
-@end
-
-@implementation MyCaptureSession
-
-- (id)initForFeed:(Ref<CameraFeed>)p_feed andDevice:(AVCaptureDevice *)p_device {
- if (self = [super init]) {
- NSError *error;
- feed = p_feed;
- width[0] = 0;
- height[0] = 0;
- width[1] = 0;
- height[1] = 0;
-
- // prepare our device
- [p_device lockForConfiguration:&error];
-
- [p_device setFocusMode:AVCaptureFocusModeLocked];
- [p_device setExposureMode:AVCaptureExposureModeLocked];
- [p_device setWhiteBalanceMode:AVCaptureWhiteBalanceModeLocked];
-
- [p_device unlockForConfiguration];
-
- [self beginConfiguration];
-
- // setup our capture
- self.sessionPreset = AVCaptureSessionPreset1280x720;
-
- input = [AVCaptureDeviceInput deviceInputWithDevice:p_device error:&error];
- if (!input) {
- print_line("Couldn't get input device for camera");
- } else {
- [self addInput:input];
- }
-
- output = [AVCaptureVideoDataOutput new];
- if (!output) {
- print_line("Couldn't get output device for camera");
- } else {
- NSDictionary *settings = @{ (NSString *)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) };
- output.videoSettings = settings;
-
- // discard if the data output queue is blocked (as we process the still image)
- [output setAlwaysDiscardsLateVideoFrames:YES];
-
- // now set ourselves as the delegate to receive new frames. Note that we're doing this on the main thread at the moment, we may need to change this..
- [output setSampleBufferDelegate:self queue:dispatch_get_main_queue()];
-
- [self addOutput:output];
- }
-
- [self commitConfiguration];
-
- // kick off our session..
- [self startRunning];
- };
- return self;
-}
-
-- (void)cleanup {
- // stop running
- [self stopRunning];
-
- // cleanup
- [self beginConfiguration];
-
- if (input) {
- [self removeInput:input];
- // don't release this
- input = nil;
- }
-
- if (output) {
- [self removeOutput:output];
- [output setSampleBufferDelegate:nil queue:NULL];
- output = nil;
- }
-
- [self commitConfiguration];
-}
-
-- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
- // This gets called every time our camera has a new image for us to process.
- // May need to investigate in a way to throttle this if we get more images then we're rendering frames..
-
- // For now, version 1, we're just doing the bare minimum to make this work...
-
- CVImageBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
- // int width = CVPixelBufferGetWidth(pixelBuffer);
- // int height = CVPixelBufferGetHeight(pixelBuffer);
-
- // It says that we need to lock this on the documentation pages but it's not in the samples
- // need to lock our base address so we can access our pixel buffers, better safe then sorry?
- CVPixelBufferLockBaseAddress(pixelBuffer, kCVPixelBufferLock_ReadOnly);
-
- // get our buffers
- unsigned char *dataY = (unsigned char *)CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 0);
- unsigned char *dataCbCr = (unsigned char *)CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 1);
- if (dataY == NULL) {
- print_line("Couldn't access Y pixel buffer data");
- } else if (dataCbCr == NULL) {
- print_line("Couldn't access CbCr pixel buffer data");
- } else {
- UIInterfaceOrientation orientation = UIInterfaceOrientationUnknown;
-
- if (@available(iOS 13, *)) {
- orientation = [UIApplication sharedApplication].delegate.window.windowScene.interfaceOrientation;
-#if !defined(TARGET_OS_SIMULATOR) || !TARGET_OS_SIMULATOR
- } else {
- orientation = [[UIApplication sharedApplication] statusBarOrientation];
-#endif
- }
-
- Ref<Image> img[2];
-
- {
- // do Y
- size_t new_width = CVPixelBufferGetWidthOfPlane(pixelBuffer, 0);
- size_t new_height = CVPixelBufferGetHeightOfPlane(pixelBuffer, 0);
-
- if ((width[0] != new_width) || (height[0] != new_height)) {
- width[0] = new_width;
- height[0] = new_height;
- img_data[0].resize(new_width * new_height);
- }
-
- uint8_t *w = img_data[0].ptrw();
- memcpy(w, dataY, new_width * new_height);
-
- img[0].instance();
- img[0]->create(new_width, new_height, 0, Image::FORMAT_R8, img_data[0]);
- }
-
- {
- // do CbCr
- size_t new_width = CVPixelBufferGetWidthOfPlane(pixelBuffer, 1);
- size_t new_height = CVPixelBufferGetHeightOfPlane(pixelBuffer, 1);
-
- if ((width[1] != new_width) || (height[1] != new_height)) {
- width[1] = new_width;
- height[1] = new_height;
- img_data[1].resize(2 * new_width * new_height);
- }
-
- uint8_t *w = img_data[1].ptrw();
- memcpy(w, dataCbCr, 2 * new_width * new_height);
-
- ///TODO GLES2 doesn't support FORMAT_RG8, need to do some form of conversion
- img[1].instance();
- img[1]->create(new_width, new_height, 0, Image::FORMAT_RG8, img_data[1]);
- }
-
- // set our texture...
- feed->set_YCbCr_imgs(img[0], img[1]);
-
- // update our matrix to match the orientation, note, before changing anything
- // here, be aware that the project orientation settings must match your xcode
- // settings or this will go wrong!
- Transform2D display_transform;
- switch (orientation) {
- case UIInterfaceOrientationPortrait: {
- display_transform = Transform2D(0.0, -1.0, -1.0, 0.0, 1.0, 1.0);
- } break;
- case UIInterfaceOrientationLandscapeRight: {
- display_transform = Transform2D(1.0, 0.0, 0.0, -1.0, 0.0, 1.0);
- } break;
- case UIInterfaceOrientationLandscapeLeft: {
- display_transform = Transform2D(-1.0, 0.0, 0.0, 1.0, 1.0, 0.0);
- } break;
- default: {
- display_transform = Transform2D(0.0, 1.0, 1.0, 0.0, 0.0, 0.0);
- } break;
- }
-
- //TODO: this is correct for the camera on the back, I have a feeling this needs to be inversed for the camera on the front!
- feed->set_transform(display_transform);
- }
-
- // and unlock
- CVPixelBufferUnlockBaseAddress(pixelBuffer, kCVPixelBufferLock_ReadOnly);
-}
-
-@end
-
-//////////////////////////////////////////////////////////////////////////
-// CameraFeedIOS - Subclass for camera feeds in iOS
-
-class CameraFeedIOS : public CameraFeed {
-private:
- AVCaptureDevice *device;
- MyCaptureSession *capture_session;
-
-public:
- bool get_is_arkit() const;
- AVCaptureDevice *get_device() const;
-
- CameraFeedIOS();
- ~CameraFeedIOS();
-
- void set_device(AVCaptureDevice *p_device);
-
- bool activate_feed();
- void deactivate_feed();
-};
-
-AVCaptureDevice *CameraFeedIOS::get_device() const {
- return device;
-};
-
-CameraFeedIOS::CameraFeedIOS() {
- capture_session = NULL;
- device = NULL;
- transform = Transform2D(1.0, 0.0, 0.0, 1.0, 0.0, 0.0); /* should re-orientate this based on device orientation */
-};
-
-void CameraFeedIOS::set_device(AVCaptureDevice *p_device) {
- device = p_device;
-
- // get some info
- NSString *device_name = p_device.localizedName;
- name = device_name.UTF8String;
- position = CameraFeed::FEED_UNSPECIFIED;
- if ([p_device position] == AVCaptureDevicePositionBack) {
- position = CameraFeed::FEED_BACK;
- } else if ([p_device position] == AVCaptureDevicePositionFront) {
- position = CameraFeed::FEED_FRONT;
- };
-};
-
-CameraFeedIOS::~CameraFeedIOS() {
- if (capture_session) {
- capture_session = nil;
- };
-
- if (device) {
- device = nil;
- };
-};
-
-bool CameraFeedIOS::activate_feed() {
- if (capture_session) {
- // already recording!
- } else {
- // start camera capture
- capture_session = [[MyCaptureSession alloc] initForFeed:this andDevice:device];
- };
-
- return true;
-};
-
-void CameraFeedIOS::deactivate_feed() {
- // end camera capture if we have one
- if (capture_session) {
- [capture_session cleanup];
- capture_session = nil;
- };
-};
-
-//////////////////////////////////////////////////////////////////////////
-// MyDeviceNotifications - This is a little helper class gets notifications
-// when devices are connected/disconnected
-
-@interface MyDeviceNotifications : NSObject {
- CameraIOS *camera_server;
-}
-
-@end
-
-@implementation MyDeviceNotifications
-
-- (void)devices_changed:(NSNotification *)notification {
- camera_server->update_feeds();
-}
-
-- (id)initForServer:(CameraIOS *)p_server {
- if (self = [super init]) {
- camera_server = p_server;
-
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(devices_changed:) name:AVCaptureDeviceWasConnectedNotification object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(devices_changed:) name:AVCaptureDeviceWasDisconnectedNotification object:nil];
- };
- return self;
-}
-
-- (void)dealloc {
- // remove notifications
- [[NSNotificationCenter defaultCenter] removeObserver:self name:AVCaptureDeviceWasConnectedNotification object:nil];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:AVCaptureDeviceWasDisconnectedNotification object:nil];
-}
-
-@end
-
-MyDeviceNotifications *device_notifications = nil;
-
-//////////////////////////////////////////////////////////////////////////
-// CameraIOS - Subclass for our camera server on iPhone
-
-void CameraIOS::update_feeds() {
- // this way of doing things is deprecated but still works,
- // rewrite to using AVCaptureDeviceDiscoverySession
-
- NSMutableArray *deviceTypes = [NSMutableArray array];
-
- if (@available(iOS 10, *)) {
- [deviceTypes addObject:AVCaptureDeviceTypeBuiltInWideAngleCamera];
- [deviceTypes addObject:AVCaptureDeviceTypeBuiltInTelephotoCamera];
-
- if (@available(iOS 10.2, *)) {
- [deviceTypes addObject:AVCaptureDeviceTypeBuiltInDualCamera];
- }
-
- if (@available(iOS 11.1, *)) {
- [deviceTypes addObject:AVCaptureDeviceTypeBuiltInTrueDepthCamera];
- }
-
- AVCaptureDeviceDiscoverySession *session = [AVCaptureDeviceDiscoverySession
- discoverySessionWithDeviceTypes:deviceTypes
- mediaType:AVMediaTypeVideo
- position:AVCaptureDevicePositionUnspecified];
-
- // remove devices that are gone..
- for (int i = feeds.size() - 1; i >= 0; i--) {
- Ref<CameraFeedIOS> feed(feeds[i]);
-
- if (feed.is_null()) {
- // feed not managed by us
- } else if (![session.devices containsObject:feed->get_device()]) {
- // remove it from our array, this will also destroy it ;)
- remove_feed(feed);
- };
- };
-
- // add new devices..
- for (AVCaptureDevice *device in session.devices) {
- bool found = false;
-
- for (int i = 0; i < feeds.size() && !found; i++) {
- Ref<CameraFeedIOS> feed(feeds[i]);
-
- if (feed.is_null()) {
- // feed not managed by us
- } else if (feed->get_device() == device) {
- found = true;
- };
- };
-
- if (!found) {
- Ref<CameraFeedIOS> newfeed;
- newfeed.instance();
- newfeed->set_device(device);
- add_feed(newfeed);
- };
- };
- }
-};
-
-CameraIOS::CameraIOS() {
- // check if we have our usage description
- NSString *usage_desc = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSCameraUsageDescription"];
- if (usage_desc == NULL) {
- // don't initialise if we don't get anything
- print_line("No NSCameraUsageDescription key in pList, no access to cameras.");
- return;
- } else if (usage_desc.length == 0) {
- // don't initialise if we don't get anything
- print_line("Empty NSCameraUsageDescription key in pList, no access to cameras.");
- return;
- }
-
- // now we'll request access.
- // If this is the first time the user will be prompted with the string (iOS will read it).
- // Once a decision is made it is returned. If the user wants to change it later on they
- // need to go into setting.
- print_line("Requesting Camera permissions");
-
- [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo
- completionHandler:^(BOOL granted) {
- if (granted) {
- print_line("Access to cameras granted!");
-
- // Find available cameras we have at this time
- update_feeds();
-
- // should only have one of these....
- device_notifications = [[MyDeviceNotifications alloc] initForServer:this];
- } else {
- print_line("No access to cameras!");
- }
- }];
-};
-
-CameraIOS::~CameraIOS() {
- device_notifications = nil;
-};
diff --git a/modules/camera_iphone/camera_module.cpp b/modules/camera_iphone/camera_module.cpp
deleted file mode 100644
index 7ea035892e..0000000000
--- a/modules/camera_iphone/camera_module.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*************************************************************************/
-/* camera_module.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "camera_module.h"
-
-#include "camera_ios.h"
-
-void register_camera_types() {
- CameraServer::make_default<CameraIOS>();
-}
-
-void unregister_camera_types() {
-}
diff --git a/modules/camera_iphone/camera_module.h b/modules/camera_iphone/camera_module.h
deleted file mode 100644
index 5a94d8b529..0000000000
--- a/modules/camera_iphone/camera_module.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************************************/
-/* camera_module.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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. */
-/*************************************************************************/
-
-void register_camera_types();
-void unregister_camera_types();
diff --git a/modules/camera_iphone/config.py b/modules/camera_iphone/config.py
deleted file mode 100644
index e68603fc93..0000000000
--- a/modules/camera_iphone/config.py
+++ /dev/null
@@ -1,6 +0,0 @@
-def can_build(env, platform):
- return platform == "iphone"
-
-
-def configure(env):
- pass
diff --git a/modules/csg/csg.h b/modules/csg/csg.h
index 1612c16a32..3fbed66e5c 100644
--- a/modules/csg/csg.h
+++ b/modules/csg/csg.h
@@ -48,9 +48,9 @@ struct CSGBrush {
Vector3 vertices[3];
Vector2 uvs[3];
AABB aabb;
- bool smooth;
- bool invert;
- int material;
+ bool smooth = false;
+ bool invert = false;
+ int material = 0;
};
Vector<Face> faces;
@@ -74,20 +74,20 @@ struct CSGBrushOperation {
struct MeshMerge {
struct Face {
- bool from_b;
- bool inside;
- int points[3];
+ bool from_b = false;
+ bool inside = false;
+ int points[3] = {};
Vector2 uvs[3];
- bool smooth;
- bool invert;
- int material_idx;
+ bool smooth = false;
+ bool invert = false;
+ int material_idx = 0;
};
struct FaceBVH {
- int face;
- int left;
- int right;
- int next;
+ int face = 0;
+ int left = 0;
+ int right = 0;
+ int next = 0;
Vector3 center;
AABB aabb;
};
@@ -142,7 +142,7 @@ struct CSGBrushOperation {
Map<Ref<Material>, int> materials;
Map<Vector3, int> vertex_map;
OAHashMap<VertexKey, int, VertexKeyHash> snap_cache;
- float vertex_snap;
+ float vertex_snap = 0.0;
inline void _add_distance(List<real_t> &r_intersectionsA, List<real_t> &r_intersectionsB, bool p_from_B, real_t p_distance) const;
inline bool _bvh_inside(FaceBVH *facebvhptr, int p_max_depth, int p_bvh_first, int p_face_idx) const;
@@ -159,7 +159,7 @@ struct CSGBrushOperation {
};
struct Face2D {
- int vertex_idx[3];
+ int vertex_idx[3] = {};
};
Vector<Vertex2D> vertices;
@@ -167,7 +167,7 @@ struct CSGBrushOperation {
Plane plane;
Transform to_2D;
Transform to_3D;
- float vertex_snap2;
+ float vertex_snap2 = 0.0;
inline int _get_point_idx(const Vector2 &p_point);
inline int _add_vertex(const Vertex2D &p_vertex);
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 042c3aaca7..40ba457e43 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -45,7 +45,8 @@ void CSGShape3D::set_use_collision(bool p_enable) {
if (use_collision) {
root_collision_shape.instance();
- root_collision_instance = PhysicsServer3D::get_singleton()->body_create(PhysicsServer3D::BODY_MODE_STATIC);
+ root_collision_instance = PhysicsServer3D::get_singleton()->body_create();
+ PhysicsServer3D::get_singleton()->body_set_mode(root_collision_instance, PhysicsServer3D::BODY_MODE_STATIC);
PhysicsServer3D::get_singleton()->body_set_state(root_collision_instance, PhysicsServer3D::BODY_STATE_TRANSFORM, get_global_transform());
PhysicsServer3D::get_singleton()->body_add_shape(root_collision_instance, root_collision_shape->get_rid());
PhysicsServer3D::get_singleton()->body_set_space(root_collision_instance, get_world_3d()->get_space());
@@ -58,7 +59,7 @@ void CSGShape3D::set_use_collision(bool p_enable) {
root_collision_instance = RID();
root_collision_shape.unref();
}
- _change_notify();
+ notify_property_list_changed();
}
bool CSGShape3D::is_using_collision() const {
@@ -494,7 +495,8 @@ void CSGShape3D::_notification(int p_what) {
if (use_collision && is_root_shape()) {
root_collision_shape.instance();
- root_collision_instance = PhysicsServer3D::get_singleton()->body_create(PhysicsServer3D::BODY_MODE_STATIC);
+ root_collision_instance = PhysicsServer3D::get_singleton()->body_create();
+ PhysicsServer3D::get_singleton()->body_set_mode(root_collision_instance, PhysicsServer3D::BODY_MODE_STATIC);
PhysicsServer3D::get_singleton()->body_set_state(root_collision_instance, PhysicsServer3D::BODY_STATE_TRANSFORM, get_global_transform());
PhysicsServer3D::get_singleton()->body_add_shape(root_collision_instance, root_collision_shape->get_rid());
PhysicsServer3D::get_singleton()->body_set_space(root_collision_instance, get_world_3d()->get_space());
@@ -625,15 +627,6 @@ void CSGShape3D::_bind_methods() {
}
CSGShape3D::CSGShape3D() {
- operation = OPERATION_UNION;
- parent = nullptr;
- brush = nullptr;
- dirty = false;
- snap = 0.001;
- use_collision = false;
- collision_layer = 1;
- collision_mask = 1;
- calculate_tangents = true;
set_notify_local_transform(true);
}
@@ -927,25 +920,27 @@ CSGBrush *CSGSphere3D::_build_brush() {
bool *invertw = invert.ptrw();
int face = 0;
+ const double lat_step = Math_TAU / rings;
+ const double lon_step = Math_TAU / radial_segments;
for (int i = 1; i <= rings; i++) {
- double lat0 = Math_PI * (-0.5 + (double)(i - 1) / rings);
+ double lat0 = lat_step * (i - 1) - Math_TAU / 4;
double z0 = Math::sin(lat0);
double zr0 = Math::cos(lat0);
double u0 = double(i - 1) / rings;
- double lat1 = Math_PI * (-0.5 + (double)i / rings);
+ double lat1 = lat_step * i - Math_TAU / 4;
double z1 = Math::sin(lat1);
double zr1 = Math::cos(lat1);
double u1 = double(i) / rings;
for (int j = radial_segments; j >= 1; j--) {
- double lng0 = 2 * Math_PI * (double)(j - 1) / radial_segments;
+ double lng0 = lon_step * (j - 1);
double x0 = Math::cos(lng0);
double y0 = Math::sin(lng0);
double v0 = double(i - 1) / radial_segments;
- double lng1 = 2 * Math_PI * (double)(j) / radial_segments;
+ double lng1 = lon_step * j;
double x1 = Math::cos(lng1);
double y1 = Math::sin(lng1);
double v1 = double(i) / radial_segments;
@@ -1038,7 +1033,6 @@ void CSGSphere3D::set_radius(const float p_radius) {
radius = p_radius;
_make_dirty();
update_gizmo();
- _change_notify("radius");
}
float CSGSphere3D::get_radius() const {
@@ -1208,7 +1202,6 @@ void CSGBox3D::set_size(const Vector3 &p_size) {
size = p_size;
_make_dirty();
update_gizmo();
- _change_notify("size");
}
Vector3 CSGBox3D::get_size() const {
@@ -1266,8 +1259,8 @@ CSGBrush *CSGCylinder3D::_build_brush() {
float inc = float(i) / sides;
float inc_n = float((i + 1)) / sides;
- float ang = inc * Math_PI * 2.0;
- float ang_n = inc_n * Math_PI * 2.0;
+ float ang = inc * Math_TAU;
+ float ang_n = inc_n * Math_TAU;
Vector3 base(Math::cos(ang), 0, Math::sin(ang));
Vector3 base_n(Math::cos(ang_n), 0, Math::sin(ang_n));
@@ -1390,7 +1383,6 @@ void CSGCylinder3D::set_radius(const float p_radius) {
radius = p_radius;
_make_dirty();
update_gizmo();
- _change_notify("radius");
}
float CSGCylinder3D::get_radius() const {
@@ -1401,7 +1393,6 @@ void CSGCylinder3D::set_height(const float p_height) {
height = p_height;
_make_dirty();
update_gizmo();
- _change_notify("height");
}
float CSGCylinder3D::get_height() const {
@@ -1508,8 +1499,8 @@ CSGBrush *CSGTorus3D::_build_brush() {
float inci = float(i) / sides;
float inci_n = float((i + 1)) / sides;
- float angi = inci * Math_PI * 2.0;
- float angi_n = inci_n * Math_PI * 2.0;
+ float angi = inci * Math_TAU;
+ float angi_n = inci_n * Math_TAU;
Vector3 normali = Vector3(Math::cos(angi), 0, Math::sin(angi));
Vector3 normali_n = Vector3(Math::cos(angi_n), 0, Math::sin(angi_n));
@@ -1518,8 +1509,8 @@ CSGBrush *CSGTorus3D::_build_brush() {
float incj = float(j) / ring_sides;
float incj_n = float((j + 1)) / ring_sides;
- float angj = incj * Math_PI * 2.0;
- float angj_n = incj_n * Math_PI * 2.0;
+ float angj = incj * Math_TAU;
+ float angj_n = incj_n * Math_TAU;
Vector2 normalj = Vector2(Math::cos(angj), Math::sin(angj)) * radius + Vector2(min_radius + radius, 0);
Vector2 normalj_n = Vector2(Math::cos(angj_n), Math::sin(angj_n)) * radius + Vector2(min_radius + radius, 0);
@@ -1611,7 +1602,6 @@ void CSGTorus3D::set_inner_radius(const float p_inner_radius) {
inner_radius = p_inner_radius;
_make_dirty();
update_gizmo();
- _change_notify("inner_radius");
}
float CSGTorus3D::get_inner_radius() const {
@@ -1622,7 +1612,6 @@ void CSGTorus3D::set_outer_radius(const float p_outer_radius) {
outer_radius = p_outer_radius;
_make_dirty();
update_gizmo();
- _change_notify("outer_radius");
}
float CSGTorus3D::get_outer_radius() const {
@@ -1891,8 +1880,8 @@ CSGBrush *CSGPolygon3D::_build_brush() {
float inci = float(i) / spin_sides;
float inci_n = float((i + 1)) / spin_sides;
- float angi = -(inci * spin_degrees / 360.0) * Math_PI * 2.0;
- float angi_n = -(inci_n * spin_degrees / 360.0) * Math_PI * 2.0;
+ float angi = -Math::deg2rad(inci * spin_degrees);
+ float angi_n = -Math::deg2rad(inci_n * spin_degrees);
Vector3 normali = Vector3(Math::cos(angi), 0, Math::sin(angi));
Vector3 normali_n = Vector3(Math::cos(angi_n), 0, Math::sin(angi_n));
@@ -2269,7 +2258,7 @@ void CSGPolygon3D::set_mode(Mode p_mode) {
mode = p_mode;
_make_dirty();
update_gizmo();
- _change_notify();
+ notify_property_list_changed();
}
CSGPolygon3D::Mode CSGPolygon3D::get_mode() const {
diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h
index 7dff8b6d3b..de7de09f00 100644
--- a/modules/csg/csg_shape.h
+++ b/modules/csg/csg_shape.h
@@ -50,23 +50,23 @@ public:
};
private:
- Operation operation;
- CSGShape3D *parent;
+ Operation operation = OPERATION_UNION;
+ CSGShape3D *parent = nullptr;
- CSGBrush *brush;
+ CSGBrush *brush = nullptr;
AABB node_aabb;
- bool dirty;
- float snap;
+ bool dirty = false;
+ float snap = 0.001;
- bool use_collision;
- uint32_t collision_layer;
- uint32_t collision_mask;
+ bool use_collision = false;
+ uint32_t collision_layer = 1;
+ uint32_t collision_mask = 1;
Ref<ConcavePolygonShape3D> root_collision_shape;
RID root_collision_instance;
- bool calculate_tangents;
+ bool calculate_tangents = true;
Ref<ArrayMesh> root_mesh;
@@ -85,12 +85,12 @@ private:
Vector<Vector2> uvs;
Vector<float> tans;
Ref<Material> material;
- int last_added;
+ int last_added = 0;
- Vector3 *verticesw;
- Vector3 *normalsw;
- Vector2 *uvsw;
- float *tansw;
+ Vector3 *verticesw = nullptr;
+ Vector3 *normalsw = nullptr;
+ Vector2 *uvsw = nullptr;
+ float *tansw = nullptr;
};
//mikktspace callbacks
diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp
index 6661dbbb0b..3beca3d12a 100644
--- a/modules/cvtt/image_compress_cvtt.cpp
+++ b/modules/cvtt/image_compress_cvtt.cpp
@@ -33,30 +33,31 @@
#include "core/os/os.h"
#include "core/os/thread.h"
#include "core/string/print_string.h"
+#include "core/templates/safe_refcount.h"
#include <ConvectionKernels.h>
struct CVTTCompressionJobParams {
- bool is_hdr;
- bool is_signed;
- int bytes_per_pixel;
+ bool is_hdr = false;
+ bool is_signed = false;
+ int bytes_per_pixel = 0;
cvtt::Options options;
};
struct CVTTCompressionRowTask {
const uint8_t *in_mm_bytes;
- uint8_t *out_mm_bytes;
- int y_start;
- int width;
- int height;
+ uint8_t *out_mm_bytes = nullptr;
+ int y_start = 0;
+ int width = 0;
+ int height = 0;
};
struct CVTTCompressionJobQueue {
CVTTCompressionJobParams job_params;
const CVTTCompressionRowTask *job_tasks;
- uint32_t num_tasks;
- uint32_t current_task;
+ uint32_t num_tasks = 0;
+ SafeNumeric<uint32_t> current_task;
};
static void _digest_row_task(const CVTTCompressionJobParams &p_job_params, const CVTTCompressionRowTask &p_row_task) {
@@ -131,7 +132,7 @@ static void _digest_row_task(const CVTTCompressionJobParams &p_job_params, const
static void _digest_job_queue(void *p_job_queue) {
CVTTCompressionJobQueue *job_queue = static_cast<CVTTCompressionJobQueue *>(p_job_queue);
- for (uint32_t next_task = atomic_increment(&job_queue->current_task); next_task <= job_queue->num_tasks; next_task = atomic_increment(&job_queue->current_task)) {
+ for (uint32_t next_task = job_queue->current_task.increment(); next_task <= job_queue->num_tasks; next_task = job_queue->current_task.increment()) {
_digest_row_task(job_queue->job_params, job_queue->job_tasks[next_task - 1]);
}
}
@@ -263,16 +264,17 @@ void image_compress_cvtt(Image *p_image, float p_lossy_quality, Image::UsedChann
const CVTTCompressionRowTask *tasks_rb = tasks.ptr();
job_queue.job_tasks = &tasks_rb[0];
- job_queue.current_task = 0;
+ job_queue.current_task.set(0);
job_queue.num_tasks = static_cast<uint32_t>(tasks.size());
for (int i = 0; i < num_job_threads; i++) {
- threads_wb[i] = Thread::create(_digest_job_queue, &job_queue);
+ threads_wb[i] = memnew(Thread);
+ threads_wb[i]->start(_digest_job_queue, &job_queue);
}
_digest_job_queue(&job_queue);
for (int i = 0; i < num_job_threads; i++) {
- Thread::wait_to_finish(threads_wb[i]);
+ threads_wb[i]->wait_to_finish();
memdelete(threads_wb[i]);
}
}
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index 2865b3c9ae..2fef576b77 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -69,11 +69,11 @@ enum DDSFormat {
struct DDSFormatInfo {
const char *name;
- bool compressed;
- bool palette;
- uint32_t divisor;
- uint32_t block_size;
- Image::Format format;
+ bool compressed = false;
+ bool palette = false;
+ uint32_t divisor = 0;
+ uint32_t block_size = 0;
+ Image::Format format = Image::Format::FORMAT_BPTC_RGBA;
};
static const DDSFormatInfo dds_format_info[DDS_MAX] = {
@@ -94,7 +94,7 @@ static const DDSFormatInfo dds_format_info[DDS_MAX] = {
{ "GRAYSCALE_ALPHA", false, false, 1, 2, Image::FORMAT_LA8 }
};
-RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_CANT_OPEN;
}
diff --git a/modules/dds/texture_loader_dds.h b/modules/dds/texture_loader_dds.h
index 605e791969..cf93156423 100644
--- a/modules/dds/texture_loader_dds.h
+++ b/modules/dds/texture_loader_dds.h
@@ -36,7 +36,7 @@
class ResourceFormatDDS : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index 66db9ab84e..91984b8928 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -866,28 +866,12 @@ void NetworkedMultiplayerENet::_bind_methods() {
}
NetworkedMultiplayerENet::NetworkedMultiplayerENet() {
- active = false;
- server = false;
- refuse_connections = false;
- server_relay = true;
- unique_id = 0;
- target_peer = 0;
- current_packet.packet = nullptr;
- transfer_mode = TRANSFER_MODE_RELIABLE;
- channel_count = SYSCH_MAX;
- transfer_channel = -1;
- always_ordered = false;
- connection_status = CONNECTION_DISCONNECTED;
- compression_mode = COMPRESS_NONE;
enet_compressor.context = this;
enet_compressor.compress = enet_compress;
enet_compressor.decompress = enet_decompress;
enet_compressor.destroy = enet_compressor_destroy;
bind_ip = IP_Address("*");
-
- dtls_enabled = false;
- dtls_verify = true;
}
NetworkedMultiplayerENet::~NetworkedMultiplayerENet() {
diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h
index 4baa48be5e..eb70d71c2c 100644
--- a/modules/enet/networked_multiplayer_enet.h
+++ b/modules/enet/networked_multiplayer_enet.h
@@ -62,35 +62,35 @@ private:
SYSCH_MAX
};
- bool active;
- bool server;
+ bool active = false;
+ bool server = false;
- uint32_t unique_id;
+ uint32_t unique_id = 0;
- int target_peer;
- TransferMode transfer_mode;
- int transfer_channel;
- int channel_count;
- bool always_ordered;
+ int target_peer = 0;
+ TransferMode transfer_mode = TRANSFER_MODE_RELIABLE;
+ int transfer_channel = -1;
+ int channel_count = SYSCH_MAX;
+ bool always_ordered = false;
ENetEvent event;
- ENetPeer *peer;
- ENetHost *host;
+ ENetPeer *peer = nullptr;
+ ENetHost *host = nullptr;
- bool refuse_connections;
- bool server_relay;
+ bool refuse_connections = false;
+ bool server_relay = true;
- ConnectionStatus connection_status;
+ ConnectionStatus connection_status = CONNECTION_DISCONNECTED;
Map<int, ENetPeer *> peer_map;
struct Packet {
- ENetPacket *packet;
- int from;
- int channel;
+ ENetPacket *packet = nullptr;
+ int from = 0;
+ int channel = 0;
};
- CompressionMode compression_mode;
+ CompressionMode compression_mode = COMPRESS_NONE;
List<Packet> incoming_packets;
@@ -110,10 +110,10 @@ private:
IP_Address bind_ip;
- bool dtls_enabled;
+ bool dtls_enabled = false;
Ref<CryptoKey> dtls_key;
Ref<X509Certificate> dtls_cert;
- bool dtls_verify;
+ bool dtls_verify = true;
protected:
static void _bind_methods();
diff --git a/modules/etc/texture_loader_pkm.cpp b/modules/etc/texture_loader_pkm.cpp
index b0ea109f76..95db9315d5 100644
--- a/modules/etc/texture_loader_pkm.cpp
+++ b/modules/etc/texture_loader_pkm.cpp
@@ -35,14 +35,14 @@
struct ETC1Header {
char tag[6]; // "PKM 10"
- uint16_t format; // Format == number of mips (== zero)
- uint16_t texWidth; // Texture dimensions, multiple of 4 (big-endian)
- uint16_t texHeight;
- uint16_t origWidth; // Original dimensions (big-endian)
- uint16_t origHeight;
+ uint16_t format = 0; // Format == number of mips (== zero)
+ uint16_t texWidth = 0; // Texture dimensions, multiple of 4 (big-endian)
+ uint16_t texHeight = 0;
+ uint16_t origWidth = 0; // Original dimensions (big-endian)
+ uint16_t origHeight = 0;
};
-RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_CANT_OPEN;
}
diff --git a/modules/etc/texture_loader_pkm.h b/modules/etc/texture_loader_pkm.h
index 67fbee3a7e..2ed5e75807 100644
--- a/modules/etc/texture_loader_pkm.h
+++ b/modules/etc/texture_loader_pkm.h
@@ -36,7 +36,7 @@
class ResourceFormatPKM : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/modules/fbx/data/fbx_material.h b/modules/fbx/data/fbx_material.h
index e974a256f6..23310b8e1d 100644
--- a/modules/fbx/data/fbx_material.h
+++ b/modules/fbx/data/fbx_material.h
@@ -217,9 +217,6 @@ struct FBXMaterial : public Reference {
{ "TransparencyFactor", PROPERTY_DESC_TRANSPARENT },
{ "Maya|opacity", PROPERTY_DESC_TRANSPARENT },
- /* Metallic */
- { "Shininess", PROPERTY_DESC_METALLIC },
- { "Reflectivity", PROPERTY_DESC_METALLIC },
{ "Maya|metalness", PROPERTY_DESC_METALLIC },
{ "Maya|metallic", PROPERTY_DESC_METALLIC },
@@ -241,6 +238,8 @@ struct FBXMaterial : public Reference {
{ "Maya|emissionColor", PROPERTY_DESC_EMISSIVE_COLOR },
/* Ignore */
+ { "Shininess", PROPERTY_DESC_IGNORE },
+ { "Reflectivity", PROPERTY_DESC_IGNORE },
{ "Maya|diffuseRoughness", PROPERTY_DESC_IGNORE },
{ "Maya", PROPERTY_DESC_IGNORE },
{ "Diffuse", PROPERTY_DESC_ALBEDO_COLOR },
diff --git a/modules/fbx/data/pivot_transform.cpp b/modules/fbx/data/pivot_transform.cpp
index 7a56074bc5..1895af6f9f 100644
--- a/modules/fbx/data/pivot_transform.cpp
+++ b/modules/fbx/data/pivot_transform.cpp
@@ -76,12 +76,14 @@ void PivotTransform::ReadTransformChain() {
const Vector3 &Scaling = ImportUtils::safe_import_vector3(FBXDocParser::PropertyGet<Vector3>(props, "Lcl Scaling", ok));
if (ok) {
scaling = Scaling;
+ } else {
+ scaling = Vector3(1, 1, 1);
}
const Vector3 &GeometricScaling = ImportUtils::safe_import_vector3(FBXDocParser::PropertyGet<Vector3>(props, "GeometricScaling", ok));
if (ok) {
geometric_scaling = GeometricScaling;
} else {
- geometric_scaling = Vector3(0, 0, 0);
+ geometric_scaling = Vector3(1, 1, 1);
}
const Vector3 &GeometricRotation = ImportUtils::safe_import_vector3(FBXDocParser::PropertyGet<Vector3>(props, "GeometricRotation", ok));
@@ -207,6 +209,8 @@ Transform PivotTransform::ComputeGlobalTransform(Vector3 p_translation, Quat p_r
Transform local_transform = T * Roff * Rp * Rpre * R * Rpost.affine_inverse() * Rp.affine_inverse() * Soff * Sp * S * Sp.affine_inverse();
//Transform local_translation_pivoted = Transform(Basis(), LocalTransform.origin);
+ ERR_FAIL_COND_V_MSG(local_transform.basis.determinant() == 0, Transform(), "Det == 0 prevented in scene file");
+
// manual hack to force SSC not to be compensated for - until we can handle it properly with tests
return parent_global_xform * local_transform;
}
@@ -290,5 +294,14 @@ void PivotTransform::Execute() {
ComputePivotTransform();
ImportUtils::debug_xform("global xform: ", GlobalTransform);
+
+ if (LocalTransform.basis.determinant() == 0) {
+ print_error("Serious det == 0!");
+ }
+
+ if (GlobalTransform.basis.determinant() == 0) {
+ print_error("Serious! node has det == 0!");
+ }
+
computed_global_xform = true;
}
diff --git a/modules/gamecenter/SCsub b/modules/gamecenter/SCsub
deleted file mode 100644
index 72fbf7ab0e..0000000000
--- a/modules/gamecenter/SCsub
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-Import("env_modules")
-
-env_gamecenter = env_modules.Clone()
-
-# (iOS) Enable module support
-env_gamecenter.Append(CCFLAGS=["-fmodules", "-fcxx-modules"])
-
-# (iOS) Build as separate static library
-modules_sources = []
-env_gamecenter.add_source_files(modules_sources, "*.cpp")
-env_gamecenter.add_source_files(modules_sources, "*.mm")
-mod_lib = env_modules.add_library("#bin/libgodot_gamecenter_module" + env["LIBSUFFIX"], modules_sources)
diff --git a/modules/gamecenter/config.py b/modules/gamecenter/config.py
deleted file mode 100644
index e68603fc93..0000000000
--- a/modules/gamecenter/config.py
+++ /dev/null
@@ -1,6 +0,0 @@
-def can_build(env, platform):
- return platform == "iphone"
-
-
-def configure(env):
- pass
diff --git a/modules/gamecenter/game_center.h b/modules/gamecenter/game_center.h
deleted file mode 100644
index 1ac00ca126..0000000000
--- a/modules/gamecenter/game_center.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*************************************************************************/
-/* game_center.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 GAME_CENTER_H
-#define GAME_CENTER_H
-
-#include "core/object/class_db.h"
-
-class GameCenter : public Object {
- GDCLASS(GameCenter, Object);
-
- static GameCenter *instance;
- static void _bind_methods();
-
- List<Variant> pending_events;
-
- bool authenticated;
-
- void return_connect_error(const char *p_error_description);
-
-public:
- Error authenticate();
- bool is_authenticated();
-
- Error post_score(Dictionary p_score);
- Error award_achievement(Dictionary p_params);
- void reset_achievements();
- void request_achievements();
- void request_achievement_descriptions();
- Error show_game_center(Dictionary p_params);
- Error request_identity_verification_signature();
-
- void game_center_closed();
-
- int get_pending_event_count();
- Variant pop_pending_event();
-
- static GameCenter *get_singleton();
-
- GameCenter();
- ~GameCenter();
-};
-
-#endif
diff --git a/modules/gamecenter/game_center.mm b/modules/gamecenter/game_center.mm
deleted file mode 100644
index b971bc1da3..0000000000
--- a/modules/gamecenter/game_center.mm
+++ /dev/null
@@ -1,380 +0,0 @@
-/*************************************************************************/
-/* game_center.mm */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "game_center.h"
-#import "platform/iphone/app_delegate.h"
-
-#import "game_center_delegate.h"
-#import "platform/iphone/view_controller.h"
-#import <GameKit/GameKit.h>
-
-GameCenter *GameCenter::instance = NULL;
-GodotGameCenterDelegate *gameCenterDelegate = nil;
-
-void GameCenter::_bind_methods() {
- ClassDB::bind_method(D_METHOD("authenticate"), &GameCenter::authenticate);
- ClassDB::bind_method(D_METHOD("is_authenticated"), &GameCenter::is_authenticated);
-
- ClassDB::bind_method(D_METHOD("post_score"), &GameCenter::post_score);
- ClassDB::bind_method(D_METHOD("award_achievement", "achievement"), &GameCenter::award_achievement);
- ClassDB::bind_method(D_METHOD("reset_achievements"), &GameCenter::reset_achievements);
- ClassDB::bind_method(D_METHOD("request_achievements"), &GameCenter::request_achievements);
- ClassDB::bind_method(D_METHOD("request_achievement_descriptions"), &GameCenter::request_achievement_descriptions);
- ClassDB::bind_method(D_METHOD("show_game_center"), &GameCenter::show_game_center);
- ClassDB::bind_method(D_METHOD("request_identity_verification_signature"), &GameCenter::request_identity_verification_signature);
-
- ClassDB::bind_method(D_METHOD("get_pending_event_count"), &GameCenter::get_pending_event_count);
- ClassDB::bind_method(D_METHOD("pop_pending_event"), &GameCenter::pop_pending_event);
-};
-
-Error GameCenter::authenticate() {
- //if this class isn't available, game center isn't implemented
- if ((NSClassFromString(@"GKLocalPlayer")) == nil) {
- return ERR_UNAVAILABLE;
- }
-
- GKLocalPlayer *player = [GKLocalPlayer localPlayer];
- ERR_FAIL_COND_V(![player respondsToSelector:@selector(authenticateHandler)], ERR_UNAVAILABLE);
-
- UIViewController *root_controller = [[UIApplication sharedApplication] delegate].window.rootViewController;
- ERR_FAIL_COND_V(!root_controller, FAILED);
-
- // This handler is called several times. First when the view needs to be shown, then again
- // after the view is cancelled or the user logs in. Or if the user's already logged in, it's
- // called just once to confirm they're authenticated. This is why no result needs to be specified
- // in the presentViewController phase. In this case, more calls to this function will follow.
- _weakify(root_controller);
- _weakify(player);
- player.authenticateHandler = (^(UIViewController *controller, NSError *error) {
- _strongify(root_controller);
- _strongify(player);
-
- if (controller) {
- [root_controller presentViewController:controller animated:YES completion:nil];
- } else {
- Dictionary ret;
- ret["type"] = "authentication";
- if (player.isAuthenticated) {
- ret["result"] = "ok";
- if (@available(iOS 13, *)) {
- ret["player_id"] = [player.teamPlayerID UTF8String];
-#if !defined(TARGET_OS_SIMULATOR) || !TARGET_OS_SIMULATOR
- } else {
- ret["player_id"] = [player.playerID UTF8String];
-#endif
- }
-
- GameCenter::get_singleton()->authenticated = true;
- } else {
- ret["result"] = "error";
- ret["error_code"] = (int64_t)error.code;
- ret["error_description"] = [error.localizedDescription UTF8String];
- GameCenter::get_singleton()->authenticated = false;
- };
-
- pending_events.push_back(ret);
- };
- });
-
- return OK;
-};
-
-bool GameCenter::is_authenticated() {
- return authenticated;
-};
-
-Error GameCenter::post_score(Dictionary p_score) {
- ERR_FAIL_COND_V(!p_score.has("score") || !p_score.has("category"), ERR_INVALID_PARAMETER);
- float score = p_score["score"];
- String category = p_score["category"];
-
- NSString *cat_str = [[NSString alloc] initWithUTF8String:category.utf8().get_data()];
- GKScore *reporter = [[GKScore alloc] initWithLeaderboardIdentifier:cat_str];
- reporter.value = score;
-
- ERR_FAIL_COND_V([GKScore respondsToSelector:@selector(reportScores)], ERR_UNAVAILABLE);
-
- [GKScore reportScores:@[ reporter ]
- withCompletionHandler:^(NSError *error) {
- Dictionary ret;
- ret["type"] = "post_score";
- if (error == nil) {
- ret["result"] = "ok";
- } else {
- ret["result"] = "error";
- ret["error_code"] = (int64_t)error.code;
- ret["error_description"] = [error.localizedDescription UTF8String];
- };
-
- pending_events.push_back(ret);
- }];
-
- return OK;
-};
-
-Error GameCenter::award_achievement(Dictionary p_params) {
- ERR_FAIL_COND_V(!p_params.has("name") || !p_params.has("progress"), ERR_INVALID_PARAMETER);
- String name = p_params["name"];
- float progress = p_params["progress"];
-
- NSString *name_str = [[NSString alloc] initWithUTF8String:name.utf8().get_data()];
- GKAchievement *achievement = [[GKAchievement alloc] initWithIdentifier:name_str];
- ERR_FAIL_COND_V(!achievement, FAILED);
-
- ERR_FAIL_COND_V([GKAchievement respondsToSelector:@selector(reportAchievements)], ERR_UNAVAILABLE);
-
- achievement.percentComplete = progress;
- achievement.showsCompletionBanner = NO;
- if (p_params.has("show_completion_banner")) {
- achievement.showsCompletionBanner = p_params["show_completion_banner"] ? YES : NO;
- }
-
- [GKAchievement reportAchievements:@[ achievement ]
- withCompletionHandler:^(NSError *error) {
- Dictionary ret;
- ret["type"] = "award_achievement";
- if (error == nil) {
- ret["result"] = "ok";
- } else {
- ret["result"] = "error";
- ret["error_code"] = (int64_t)error.code;
- };
-
- pending_events.push_back(ret);
- }];
-
- return OK;
-};
-
-void GameCenter::request_achievement_descriptions() {
- [GKAchievementDescription loadAchievementDescriptionsWithCompletionHandler:^(NSArray *descriptions, NSError *error) {
- Dictionary ret;
- ret["type"] = "achievement_descriptions";
- if (error == nil) {
- ret["result"] = "ok";
- PackedStringArray names;
- PackedStringArray titles;
- PackedStringArray unachieved_descriptions;
- PackedStringArray achieved_descriptions;
- PackedInt32Array maximum_points;
- Array hidden;
- Array replayable;
-
- for (NSUInteger i = 0; i < [descriptions count]; i++) {
- GKAchievementDescription *description = [descriptions objectAtIndex:i];
-
- const char *str = [description.identifier UTF8String];
- names.push_back(String::utf8(str != NULL ? str : ""));
-
- str = [description.title UTF8String];
- titles.push_back(String::utf8(str != NULL ? str : ""));
-
- str = [description.unachievedDescription UTF8String];
- unachieved_descriptions.push_back(String::utf8(str != NULL ? str : ""));
-
- str = [description.achievedDescription UTF8String];
- achieved_descriptions.push_back(String::utf8(str != NULL ? str : ""));
-
- maximum_points.push_back(description.maximumPoints);
-
- hidden.push_back(description.hidden == YES);
-
- replayable.push_back(description.replayable == YES);
- }
-
- ret["names"] = names;
- ret["titles"] = titles;
- ret["unachieved_descriptions"] = unachieved_descriptions;
- ret["achieved_descriptions"] = achieved_descriptions;
- ret["maximum_points"] = maximum_points;
- ret["hidden"] = hidden;
- ret["replayable"] = replayable;
-
- } else {
- ret["result"] = "error";
- ret["error_code"] = (int64_t)error.code;
- };
-
- pending_events.push_back(ret);
- }];
-};
-
-void GameCenter::request_achievements() {
- [GKAchievement loadAchievementsWithCompletionHandler:^(NSArray *achievements, NSError *error) {
- Dictionary ret;
- ret["type"] = "achievements";
- if (error == nil) {
- ret["result"] = "ok";
- PackedStringArray names;
- PackedFloat32Array percentages;
-
- for (NSUInteger i = 0; i < [achievements count]; i++) {
- GKAchievement *achievement = [achievements objectAtIndex:i];
- const char *str = [achievement.identifier UTF8String];
- names.push_back(String::utf8(str != NULL ? str : ""));
-
- percentages.push_back(achievement.percentComplete);
- }
-
- ret["names"] = names;
- ret["progress"] = percentages;
-
- } else {
- ret["result"] = "error";
- ret["error_code"] = (int64_t)error.code;
- };
-
- pending_events.push_back(ret);
- }];
-};
-
-void GameCenter::reset_achievements() {
- [GKAchievement resetAchievementsWithCompletionHandler:^(NSError *error) {
- Dictionary ret;
- ret["type"] = "reset_achievements";
- if (error == nil) {
- ret["result"] = "ok";
- } else {
- ret["result"] = "error";
- ret["error_code"] = (int64_t)error.code;
- };
-
- pending_events.push_back(ret);
- }];
-};
-
-Error GameCenter::show_game_center(Dictionary p_params) {
- ERR_FAIL_COND_V(!NSProtocolFromString(@"GKGameCenterControllerDelegate"), FAILED);
-
- GKGameCenterViewControllerState view_state = GKGameCenterViewControllerStateDefault;
- if (p_params.has("view")) {
- String view_name = p_params["view"];
- if (view_name == "default") {
- view_state = GKGameCenterViewControllerStateDefault;
- } else if (view_name == "leaderboards") {
- view_state = GKGameCenterViewControllerStateLeaderboards;
- } else if (view_name == "achievements") {
- view_state = GKGameCenterViewControllerStateAchievements;
- } else if (view_name == "challenges") {
- view_state = GKGameCenterViewControllerStateChallenges;
- } else {
- return ERR_INVALID_PARAMETER;
- }
- }
-
- GKGameCenterViewController *controller = [[GKGameCenterViewController alloc] init];
- ERR_FAIL_COND_V(!controller, FAILED);
-
- UIViewController *root_controller = [[UIApplication sharedApplication] delegate].window.rootViewController;
- ERR_FAIL_COND_V(!root_controller, FAILED);
-
- controller.gameCenterDelegate = gameCenterDelegate;
- controller.viewState = view_state;
- if (view_state == GKGameCenterViewControllerStateLeaderboards) {
- controller.leaderboardIdentifier = nil;
- if (p_params.has("leaderboard_name")) {
- String name = p_params["leaderboard_name"];
- NSString *name_str = [[NSString alloc] initWithUTF8String:name.utf8().get_data()];
- controller.leaderboardIdentifier = name_str;
- }
- }
-
- [root_controller presentViewController:controller animated:YES completion:nil];
-
- return OK;
-};
-
-Error GameCenter::request_identity_verification_signature() {
- ERR_FAIL_COND_V(!is_authenticated(), ERR_UNAUTHORIZED);
-
- GKLocalPlayer *player = [GKLocalPlayer localPlayer];
- [player generateIdentityVerificationSignatureWithCompletionHandler:^(NSURL *publicKeyUrl, NSData *signature, NSData *salt, uint64_t timestamp, NSError *error) {
- Dictionary ret;
- ret["type"] = "identity_verification_signature";
- if (error == nil) {
- ret["result"] = "ok";
- ret["public_key_url"] = [publicKeyUrl.absoluteString UTF8String];
- ret["signature"] = [[signature base64EncodedStringWithOptions:0] UTF8String];
- ret["salt"] = [[salt base64EncodedStringWithOptions:0] UTF8String];
- ret["timestamp"] = timestamp;
- if (@available(iOS 13, *)) {
- ret["player_id"] = [player.teamPlayerID UTF8String];
-#if !defined(TARGET_OS_SIMULATOR) || !TARGET_OS_SIMULATOR
- } else {
- ret["player_id"] = [player.playerID UTF8String];
-#endif
- }
- } else {
- ret["result"] = "error";
- ret["error_code"] = (int64_t)error.code;
- ret["error_description"] = [error.localizedDescription UTF8String];
- };
-
- pending_events.push_back(ret);
- }];
-
- return OK;
-};
-
-void GameCenter::game_center_closed() {
- Dictionary ret;
- ret["type"] = "show_game_center";
- ret["result"] = "ok";
- pending_events.push_back(ret);
-}
-
-int GameCenter::get_pending_event_count() {
- return pending_events.size();
-};
-
-Variant GameCenter::pop_pending_event() {
- Variant front = pending_events.front()->get();
- pending_events.pop_front();
-
- return front;
-};
-
-GameCenter *GameCenter::get_singleton() {
- return instance;
-};
-
-GameCenter::GameCenter() {
- ERR_FAIL_COND(instance != NULL);
- instance = this;
- authenticated = false;
-
- gameCenterDelegate = [[GodotGameCenterDelegate alloc] init];
-};
-
-GameCenter::~GameCenter() {
- if (gameCenterDelegate) {
- gameCenterDelegate = nil;
- }
-}
diff --git a/modules/gamecenter/game_center_delegate.h b/modules/gamecenter/game_center_delegate.h
deleted file mode 100644
index ef1d2ae93d..0000000000
--- a/modules/gamecenter/game_center_delegate.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************/
-/* game_center_delegate.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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. */
-/*************************************************************************/
-
-#import <GameKit/GameKit.h>
-
-@interface GodotGameCenterDelegate : NSObject <GKGameCenterControllerDelegate>
-
-@end
diff --git a/modules/gamecenter/game_center_delegate.mm b/modules/gamecenter/game_center_delegate.mm
deleted file mode 100644
index 6e20db572b..0000000000
--- a/modules/gamecenter/game_center_delegate.mm
+++ /dev/null
@@ -1,45 +0,0 @@
-/*************************************************************************/
-/* game_center_delegate.mm */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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. */
-/*************************************************************************/
-
-#import "game_center_delegate.h"
-
-#include "game_center.h"
-
-@implementation GodotGameCenterDelegate
-
-- (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)gameCenterViewController {
- //[gameCenterViewController dismissViewControllerAnimated:YES completion:^{GameCenter::get_singleton()->game_center_closed();}];//version for signaling when overlay is completely gone
- if (GameCenter::get_singleton()) {
- GameCenter::get_singleton()->game_center_closed();
- }
- [gameCenterViewController dismissViewControllerAnimated:YES completion:nil];
-}
-
-@end
diff --git a/modules/gamecenter/game_center_module.h b/modules/gamecenter/game_center_module.h
deleted file mode 100644
index 5df3645b1c..0000000000
--- a/modules/gamecenter/game_center_module.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************************************/
-/* game_center_module.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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. */
-/*************************************************************************/
-
-void register_gamecenter_types();
-void unregister_gamecenter_types();
diff --git a/modules/gamecenter/gamecenter.gdip b/modules/gamecenter/gamecenter.gdip
deleted file mode 100644
index eb44effbdd..0000000000
--- a/modules/gamecenter/gamecenter.gdip
+++ /dev/null
@@ -1,17 +0,0 @@
-[config]
-name="GameCenter"
-binary="gamecenter_lib.a"
-
-initialization="register_gamecenter_types"
-deinitialization="unregister_gamecenter_types"
-
-[dependencies]
-linked=[]
-embedded=[]
-system=["GameKit.framework"]
-
-capabilities=["gamekit"]
-
-files=[]
-
-[plist]
diff --git a/modules/gdnative/android/android_gdn.cpp b/modules/gdnative/android/android_gdn.cpp
index a48e51a390..fe3b3e7e12 100644
--- a/modules/gdnative/android/android_gdn.cpp
+++ b/modules/gdnative/android/android_gdn.cpp
@@ -48,7 +48,7 @@ extern "C" {
JNIEnv *GDAPI godot_android_get_env() {
#ifdef __ANDROID__
- return ThreadAndroid::get_env();
+ return get_jni_env();
#else
return nullptr;
#endif
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index e3a359e09a..86bd8b820d 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -110,6 +110,16 @@ bool GDNativeLibrary::_get(const StringName &p_name, Variant &r_property) const
return false;
}
+void GDNativeLibrary::reset_state() {
+ config_file.instance();
+ current_library_path = "";
+ current_dependencies.clear();
+ symbol_prefix = default_symbol_prefix;
+ load_once = default_load_once;
+ singleton = default_singleton;
+ reloadable = default_reloadable;
+}
+
void GDNativeLibrary::_get_property_list(List<PropertyInfo> *p_list) const {
// set entries
List<String> entry_key_list;
@@ -508,7 +518,7 @@ Error GDNative::get_symbol(StringName p_procedure_name, void *&r_handle, bool p_
return result;
}
-RES GDNativeLibraryResourceLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES GDNativeLibraryResourceLoader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
Ref<GDNativeLibrary> lib;
lib.instance();
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index 765087d176..a28c58ec0d 100644
--- a/modules/gdnative/gdnative.h
+++ b/modules/gdnative/gdnative.h
@@ -63,6 +63,8 @@ class GDNativeLibrary : public Resource {
bool reloadable;
public:
+ virtual void reset_state() override;
+
GDNativeLibrary();
~GDNativeLibrary();
@@ -166,7 +168,7 @@ public:
class GDNativeLibraryResourceLoader : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/modules/gdnative/gdnative/aabb.cpp b/modules/gdnative/gdnative/aabb.cpp
index 41b5029ef4..5d3f224adc 100644
--- a/modules/gdnative/gdnative/aabb.cpp
+++ b/modules/gdnative/gdnative/aabb.cpp
@@ -31,195 +31,15 @@
#include "gdnative/aabb.h"
#include "core/math/aabb.h"
-#include "core/variant/variant.h"
+
+static_assert(sizeof(godot_aabb) == sizeof(AABB), "AABB size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_aabb) == sizeof(AABB), "AABB size mismatch");
-
-void GDAPI godot_aabb_new(godot_aabb *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size) {
- const Vector3 *pos = (const Vector3 *)p_pos;
- const Vector3 *size = (const Vector3 *)p_size;
- AABB *dest = (AABB *)r_dest;
- *dest = AABB(*pos, *size);
-}
-
-godot_vector3 GDAPI godot_aabb_get_position(const godot_aabb *p_self) {
- godot_vector3 raw_ret;
- const AABB *self = (const AABB *)p_self;
- Vector3 *ret = (Vector3 *)&raw_ret;
- *ret = self->position;
- return raw_ret;
-}
-
-void GDAPI godot_aabb_set_position(const godot_aabb *p_self, const godot_vector3 *p_v) {
- AABB *self = (AABB *)p_self;
- const Vector3 *v = (const Vector3 *)p_v;
- self->position = *v;
-}
-
-godot_vector3 GDAPI godot_aabb_get_size(const godot_aabb *p_self) {
- godot_vector3 raw_ret;
- const AABB *self = (const AABB *)p_self;
- Vector3 *ret = (Vector3 *)&raw_ret;
- *ret = self->size;
- return raw_ret;
-}
-
-void GDAPI godot_aabb_set_size(const godot_aabb *p_self, const godot_vector3 *p_v) {
- AABB *self = (AABB *)p_self;
- const Vector3 *v = (const Vector3 *)p_v;
- self->size = *v;
-}
-
-godot_string GDAPI godot_aabb_as_string(const godot_aabb *p_self) {
- godot_string ret;
- const AABB *self = (const AABB *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_aabb GDAPI godot_aabb_abs(const godot_aabb *p_self) {
- godot_aabb dest;
- const AABB *self = (const AABB *)p_self;
- *((AABB *)&dest) = self->abs();
- return dest;
-}
-
-godot_real GDAPI godot_aabb_get_area(const godot_aabb *p_self) {
- const AABB *self = (const AABB *)p_self;
- return self->get_area();
-}
-
-godot_bool GDAPI godot_aabb_has_no_area(const godot_aabb *p_self) {
- const AABB *self = (const AABB *)p_self;
- return self->has_no_area();
-}
-
-godot_bool GDAPI godot_aabb_has_no_surface(const godot_aabb *p_self) {
- const AABB *self = (const AABB *)p_self;
- return self->has_no_surface();
-}
-
-godot_bool GDAPI godot_aabb_intersects(const godot_aabb *p_self, const godot_aabb *p_with) {
- const AABB *self = (const AABB *)p_self;
- const AABB *with = (const AABB *)p_with;
- return self->intersects(*with);
-}
-
-godot_bool GDAPI godot_aabb_encloses(const godot_aabb *p_self, const godot_aabb *p_with) {
- const AABB *self = (const AABB *)p_self;
- const AABB *with = (const AABB *)p_with;
- return self->encloses(*with);
-}
-
-godot_aabb GDAPI godot_aabb_merge(const godot_aabb *p_self, const godot_aabb *p_with) {
- godot_aabb dest;
- const AABB *self = (const AABB *)p_self;
- const AABB *with = (const AABB *)p_with;
- *((AABB *)&dest) = self->merge(*with);
- return dest;
-}
-
-godot_aabb GDAPI godot_aabb_intersection(const godot_aabb *p_self, const godot_aabb *p_with) {
- godot_aabb dest;
- const AABB *self = (const AABB *)p_self;
- const AABB *with = (const AABB *)p_with;
- *((AABB *)&dest) = self->intersection(*with);
- return dest;
-}
-
-godot_bool GDAPI godot_aabb_intersects_plane(const godot_aabb *p_self, const godot_plane *p_plane) {
- const AABB *self = (const AABB *)p_self;
- const Plane *plane = (const Plane *)p_plane;
- return self->intersects_plane(*plane);
-}
-
-godot_bool GDAPI godot_aabb_intersects_segment(const godot_aabb *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to) {
- const AABB *self = (const AABB *)p_self;
- const Vector3 *from = (const Vector3 *)p_from;
- const Vector3 *to = (const Vector3 *)p_to;
- return self->intersects_segment(*from, *to);
-}
-
-godot_bool GDAPI godot_aabb_has_point(const godot_aabb *p_self, const godot_vector3 *p_point) {
- const AABB *self = (const AABB *)p_self;
- const Vector3 *point = (const Vector3 *)p_point;
- return self->has_point(*point);
-}
-
-godot_vector3 GDAPI godot_aabb_get_support(const godot_aabb *p_self, const godot_vector3 *p_dir) {
- godot_vector3 dest;
- const AABB *self = (const AABB *)p_self;
- const Vector3 *dir = (const Vector3 *)p_dir;
- *((Vector3 *)&dest) = self->get_support(*dir);
- return dest;
-}
-
-godot_vector3 GDAPI godot_aabb_get_longest_axis(const godot_aabb *p_self) {
- godot_vector3 dest;
- const AABB *self = (const AABB *)p_self;
- *((Vector3 *)&dest) = self->get_longest_axis();
- return dest;
-}
-
-godot_int GDAPI godot_aabb_get_longest_axis_index(const godot_aabb *p_self) {
- const AABB *self = (const AABB *)p_self;
- return self->get_longest_axis_index();
-}
-
-godot_real GDAPI godot_aabb_get_longest_axis_size(const godot_aabb *p_self) {
- const AABB *self = (const AABB *)p_self;
- return self->get_longest_axis_size();
-}
-
-godot_vector3 GDAPI godot_aabb_get_shortest_axis(const godot_aabb *p_self) {
- godot_vector3 dest;
- const AABB *self = (const AABB *)p_self;
- *((Vector3 *)&dest) = self->get_shortest_axis();
- return dest;
-}
-
-godot_int GDAPI godot_aabb_get_shortest_axis_index(const godot_aabb *p_self) {
- const AABB *self = (const AABB *)p_self;
- return self->get_shortest_axis_index();
-}
-
-godot_real GDAPI godot_aabb_get_shortest_axis_size(const godot_aabb *p_self) {
- const AABB *self = (const AABB *)p_self;
- return self->get_shortest_axis_size();
-}
-
-godot_aabb GDAPI godot_aabb_expand(const godot_aabb *p_self, const godot_vector3 *p_to_point) {
- godot_aabb dest;
- const AABB *self = (const AABB *)p_self;
- const Vector3 *to_point = (const Vector3 *)p_to_point;
- *((AABB *)&dest) = self->expand(*to_point);
- return dest;
-}
-
-godot_aabb GDAPI godot_aabb_grow(const godot_aabb *p_self, const godot_real p_by) {
- godot_aabb dest;
- const AABB *self = (const AABB *)p_self;
-
- *((AABB *)&dest) = self->grow(p_by);
- return dest;
-}
-
-godot_vector3 GDAPI godot_aabb_get_endpoint(const godot_aabb *p_self, const godot_int p_idx) {
- godot_vector3 dest;
- const AABB *self = (const AABB *)p_self;
-
- *((Vector3 *)&dest) = self->get_endpoint(p_idx);
- return dest;
-}
-
-godot_bool GDAPI godot_aabb_operator_equal(const godot_aabb *p_self, const godot_aabb *p_b) {
- const AABB *self = (const AABB *)p_self;
- const AABB *b = (const AABB *)p_b;
- return *self == *b;
+void GDAPI godot_aabb_new(godot_aabb *p_self) {
+ memnew_placement(p_self, AABB);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/array.cpp b/modules/gdnative/gdnative/array.cpp
index 7099b9d459..e68b60c5e6 100644
--- a/modules/gdnative/gdnative/array.cpp
+++ b/modules/gdnative/gdnative/array.cpp
@@ -33,367 +33,28 @@
#include "core/os/memory.h"
#include "core/variant/array.h"
-#include "core/math/color.h"
-
-#include "core/variant/variant.h"
+static_assert(sizeof(godot_array) == sizeof(Array), "Array size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_array) == sizeof(Array), "Array size mismatch");
-
-void GDAPI godot_array_new(godot_array *r_dest) {
- Array *dest = (Array *)r_dest;
- memnew_placement(dest, Array);
-}
-
-void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src) {
- Array *dest = (Array *)r_dest;
- const Array *src = (const Array *)p_src;
- memnew_placement(dest, Array(*src));
-}
-
-void GDAPI godot_array_new_packed_color_array(godot_array *r_dest, const godot_packed_color_array *p_pca) {
- Array *dest = (Array *)r_dest;
- Vector<Color> *pca = (Vector<Color> *)p_pca;
- memnew_placement(dest, Array);
- dest->resize(pca->size());
-
- for (int i = 0; i < dest->size(); i++) {
- Variant v = pca->operator[](i);
- dest->operator[](i) = v;
- }
-}
-
-void GDAPI godot_array_new_packed_vector3_array(godot_array *r_dest, const godot_packed_vector3_array *p_pv3a) {
- Array *dest = (Array *)r_dest;
- Vector<Vector3> *pca = (Vector<Vector3> *)p_pv3a;
- memnew_placement(dest, Array);
- dest->resize(pca->size());
-
- for (int i = 0; i < dest->size(); i++) {
- Variant v = pca->operator[](i);
- dest->operator[](i) = v;
- }
-}
-
-void GDAPI godot_array_new_packed_vector2_array(godot_array *r_dest, const godot_packed_vector2_array *p_pv2a) {
- Array *dest = (Array *)r_dest;
- Vector<Vector2> *pca = (Vector<Vector2> *)p_pv2a;
- memnew_placement(dest, Array);
- dest->resize(pca->size());
-
- for (int i = 0; i < dest->size(); i++) {
- Variant v = pca->operator[](i);
- dest->operator[](i) = v;
- }
-}
-
-void GDAPI godot_array_new_packed_vector2i_array(godot_array *r_dest, const godot_packed_vector2i_array *p_pv2a) {
- Array *dest = (Array *)r_dest;
- Vector<Vector2i> *pca = (Vector<Vector2i> *)p_pv2a;
- memnew_placement(dest, Array);
- dest->resize(pca->size());
-
- for (int i = 0; i < dest->size(); i++) {
- Variant v = pca->operator[](i);
- dest->operator[](i) = v;
- }
-}
-
-void GDAPI godot_array_new_packed_string_array(godot_array *r_dest, const godot_packed_string_array *p_psa) {
- Array *dest = (Array *)r_dest;
- Vector<String> *pca = (Vector<String> *)p_psa;
- memnew_placement(dest, Array);
- dest->resize(pca->size());
-
- for (int i = 0; i < dest->size(); i++) {
- Variant v = pca->operator[](i);
- dest->operator[](i) = v;
- }
-}
-
-void GDAPI godot_array_new_packed_float32_array(godot_array *r_dest, const godot_packed_float32_array *p_pra) {
- Array *dest = (Array *)r_dest;
- Vector<float> *pca = (Vector<float> *)p_pra;
- memnew_placement(dest, Array);
- dest->resize(pca->size());
-
- for (int i = 0; i < dest->size(); i++) {
- Variant v = pca->operator[](i);
- dest->operator[](i) = v;
- }
-}
-
-void GDAPI godot_array_new_packed_float64_array(godot_array *r_dest, const godot_packed_float64_array *p_pra) {
- Array *dest = (Array *)r_dest;
- Vector<double> *pca = (Vector<double> *)p_pra;
- memnew_placement(dest, Array);
- dest->resize(pca->size());
-
- for (int i = 0; i < dest->size(); i++) {
- Variant v = pca->operator[](i);
- dest->operator[](i) = v;
- }
-}
-
-void GDAPI godot_array_new_packed_int32_array(godot_array *r_dest, const godot_packed_int32_array *p_pia) {
- Array *dest = (Array *)r_dest;
- Vector<int32_t> *pca = (Vector<int32_t> *)p_pia;
- memnew_placement(dest, Array);
- dest->resize(pca->size());
-
- for (int i = 0; i < dest->size(); i++) {
- Variant v = pca->operator[](i);
- dest->operator[](i) = v;
- }
-}
-
-void GDAPI godot_array_new_packed_int64_array(godot_array *r_dest, const godot_packed_int64_array *p_pia) {
- Array *dest = (Array *)r_dest;
- Vector<int64_t> *pca = (Vector<int64_t> *)p_pia;
- memnew_placement(dest, Array);
- dest->resize(pca->size());
-
- for (int i = 0; i < dest->size(); i++) {
- Variant v = pca->operator[](i);
- dest->operator[](i) = v;
- }
-}
-
-void GDAPI godot_array_new_packed_byte_array(godot_array *r_dest, const godot_packed_byte_array *p_pba) {
- Array *dest = (Array *)r_dest;
- Vector<uint8_t> *pca = (Vector<uint8_t> *)p_pba;
- memnew_placement(dest, Array);
- dest->resize(pca->size());
-
- for (int i = 0; i < dest->size(); i++) {
- Variant v = pca->operator[](i);
- dest->operator[](i) = v;
- }
-}
-
-void GDAPI godot_array_set(godot_array *p_self, const godot_int p_idx, const godot_variant *p_value) {
- Array *self = (Array *)p_self;
- Variant *val = (Variant *)p_value;
- self->operator[](p_idx) = *val;
-}
-
-godot_variant GDAPI godot_array_get(const godot_array *p_self, const godot_int p_idx) {
- godot_variant raw_dest;
- Variant *dest = (Variant *)&raw_dest;
- const Array *self = (const Array *)p_self;
- memnew_placement(dest, Variant(self->operator[](p_idx)));
- return raw_dest;
-}
-
-godot_variant GDAPI *godot_array_operator_index(godot_array *p_self, const godot_int p_idx) {
- Array *self = (Array *)p_self;
- return (godot_variant *)&self->operator[](p_idx);
-}
-
-const godot_variant GDAPI *godot_array_operator_index_const(const godot_array *p_self, const godot_int p_idx) {
- const Array *self = (const Array *)p_self;
- return (const godot_variant *)&self->operator[](p_idx);
-}
-
-void GDAPI godot_array_append(godot_array *p_self, const godot_variant *p_value) {
- Array *self = (Array *)p_self;
- Variant *val = (Variant *)p_value;
- self->append(*val);
-}
-
-void GDAPI godot_array_clear(godot_array *p_self) {
- Array *self = (Array *)p_self;
- self->clear();
-}
-
-godot_int GDAPI godot_array_count(const godot_array *p_self, const godot_variant *p_value) {
- const Array *self = (const Array *)p_self;
- const Variant *val = (const Variant *)p_value;
- return self->count(*val);
-}
-
-godot_bool GDAPI godot_array_is_empty(const godot_array *p_self) {
- const Array *self = (const Array *)p_self;
- return self->is_empty();
-}
-
-void GDAPI godot_array_erase(godot_array *p_self, const godot_variant *p_value) {
- Array *self = (Array *)p_self;
- const Variant *val = (const Variant *)p_value;
- self->erase(*val);
-}
-
-godot_variant GDAPI godot_array_front(const godot_array *p_self) {
- const Array *self = (const Array *)p_self;
- godot_variant v;
- Variant *val = (Variant *)&v;
- memnew_placement(val, Variant);
- *val = self->front();
- return v;
-}
-
-godot_variant GDAPI godot_array_back(const godot_array *p_self) {
- const Array *self = (const Array *)p_self;
- godot_variant v;
- Variant *val = (Variant *)&v;
- memnew_placement(val, Variant);
- *val = self->back();
- return v;
-}
-
-godot_int GDAPI godot_array_find(const godot_array *p_self, const godot_variant *p_what, const godot_int p_from) {
- const Array *self = (const Array *)p_self;
- const Variant *val = (const Variant *)p_what;
- return self->find(*val, p_from);
-}
-
-godot_int GDAPI godot_array_find_last(const godot_array *p_self, const godot_variant *p_what) {
- const Array *self = (const Array *)p_self;
- const Variant *val = (const Variant *)p_what;
- return self->find_last(*val);
-}
-
-godot_bool GDAPI godot_array_has(const godot_array *p_self, const godot_variant *p_value) {
- const Array *self = (const Array *)p_self;
- const Variant *val = (const Variant *)p_value;
- return self->has(*val);
-}
-
-godot_int GDAPI godot_array_hash(const godot_array *p_self) {
- const Array *self = (const Array *)p_self;
- return self->hash();
-}
-
-void GDAPI godot_array_insert(godot_array *p_self, const godot_int p_pos, const godot_variant *p_value) {
- Array *self = (Array *)p_self;
- const Variant *val = (const Variant *)p_value;
- self->insert(p_pos, *val);
-}
-
-void GDAPI godot_array_invert(godot_array *p_self) {
- Array *self = (Array *)p_self;
- self->invert();
-}
-
-godot_variant GDAPI godot_array_pop_back(godot_array *p_self) {
- Array *self = (Array *)p_self;
- godot_variant v;
- Variant *val = (Variant *)&v;
- memnew_placement(val, Variant);
- *val = self->pop_back();
- return v;
-}
-
-godot_variant GDAPI godot_array_pop_front(godot_array *p_self) {
- Array *self = (Array *)p_self;
- godot_variant v;
- Variant *val = (Variant *)&v;
- memnew_placement(val, Variant);
- *val = self->pop_front();
- return v;
-}
-
-void GDAPI godot_array_push_back(godot_array *p_self, const godot_variant *p_value) {
- Array *self = (Array *)p_self;
- const Variant *val = (const Variant *)p_value;
- self->push_back(*val);
-}
-
-void GDAPI godot_array_push_front(godot_array *p_self, const godot_variant *p_value) {
- Array *self = (Array *)p_self;
- const Variant *val = (const Variant *)p_value;
- self->push_front(*val);
-}
-
-void GDAPI godot_array_remove(godot_array *p_self, const godot_int p_idx) {
- Array *self = (Array *)p_self;
- self->remove(p_idx);
-}
-
-void GDAPI godot_array_resize(godot_array *p_self, const godot_int p_size) {
- Array *self = (Array *)p_self;
- self->resize(p_size);
-}
-
-godot_int GDAPI godot_array_rfind(const godot_array *p_self, const godot_variant *p_what, const godot_int p_from) {
- const Array *self = (const Array *)p_self;
- const Variant *val = (const Variant *)p_what;
- return self->rfind(*val, p_from);
-}
-
-godot_int GDAPI godot_array_size(const godot_array *p_self) {
- const Array *self = (const Array *)p_self;
- return self->size();
-}
-
-void GDAPI godot_array_sort(godot_array *p_self) {
- Array *self = (Array *)p_self;
- self->sort();
-}
-
-void GDAPI godot_array_sort_custom(godot_array *p_self, godot_object *p_obj, const godot_string *p_func) {
- Array *self = (Array *)p_self;
- const String *func = (const String *)p_func;
- self->sort_custom((Object *)p_obj, *func);
-}
-
-godot_int GDAPI godot_array_bsearch(godot_array *p_self, const godot_variant *p_value, const godot_bool p_before) {
- Array *self = (Array *)p_self;
- return self->bsearch(*(const Variant *)p_value, p_before);
-}
-
-godot_int GDAPI godot_array_bsearch_custom(godot_array *p_self, const godot_variant *p_value, godot_object *p_obj, const godot_string *p_func, const godot_bool p_before) {
- Array *self = (Array *)p_self;
- const String *func = (const String *)p_func;
- return self->bsearch_custom(*(const Variant *)p_value, (Object *)p_obj, *func, p_before);
+void GDAPI godot_array_new(godot_array *p_self) {
+ memnew_placement(p_self, Array);
}
void GDAPI godot_array_destroy(godot_array *p_self) {
((Array *)p_self)->~Array();
}
-godot_array GDAPI godot_array_duplicate(const godot_array *p_self, const godot_bool p_deep) {
- const Array *self = (const Array *)p_self;
- godot_array res;
- Array *val = (Array *)&res;
- memnew_placement(val, Array);
- *val = self->duplicate(p_deep);
- return res;
-}
-
-godot_array GDAPI godot_array_slice(const godot_array *p_self, const godot_int p_begin, const godot_int p_end, const godot_int p_step, const godot_bool p_deep) {
- const Array *self = (const Array *)p_self;
- godot_array res;
- Array *val = (Array *)&res;
- memnew_placement(val, Array);
- *val = self->slice(p_begin, p_end, p_step, p_deep);
- return res;
-}
-
-godot_variant GDAPI godot_array_max(const godot_array *p_self) {
- const Array *self = (const Array *)p_self;
- godot_variant v;
- Variant *val = (Variant *)&v;
- memnew_placement(val, Variant);
- *val = self->max();
- return v;
+godot_variant GDAPI *godot_array_operator_index(godot_array *p_self, godot_int p_index) {
+ Array *self = (Array *)p_self;
+ return (godot_variant *)&self->operator[](p_index);
}
-godot_variant GDAPI godot_array_min(const godot_array *p_self) {
+const godot_variant GDAPI *godot_array_operator_index_const(const godot_array *p_self, godot_int p_index) {
const Array *self = (const Array *)p_self;
- godot_variant v;
- Variant *val = (Variant *)&v;
- memnew_placement(val, Variant);
- *val = self->min();
- return v;
-}
-
-void GDAPI godot_array_shuffle(godot_array *p_self) {
- Array *self = (Array *)p_self;
- self->shuffle();
+ return (const godot_variant *)&self->operator[](p_index);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/basis.cpp b/modules/gdnative/gdnative/basis.cpp
index bfcd9bbf2c..df3e1255ac 100644
--- a/modules/gdnative/gdnative/basis.cpp
+++ b/modules/gdnative/gdnative/basis.cpp
@@ -31,266 +31,25 @@
#include "gdnative/basis.h"
#include "core/math/basis.h"
-#include "core/variant/variant.h"
+
+static_assert(sizeof(godot_basis) == sizeof(Basis), "Basis size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_basis) == sizeof(Basis), "Basis size mismatch");
-
-void GDAPI godot_basis_new_with_rows(godot_basis *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis) {
- const Vector3 *x_axis = (const Vector3 *)p_x_axis;
- const Vector3 *y_axis = (const Vector3 *)p_y_axis;
- const Vector3 *z_axis = (const Vector3 *)p_z_axis;
- Basis *dest = (Basis *)r_dest;
- *dest = Basis(*x_axis, *y_axis, *z_axis);
-}
-
-void GDAPI godot_basis_new_with_axis_and_angle(godot_basis *r_dest, const godot_vector3 *p_axis, const godot_real p_phi) {
- const Vector3 *axis = (const Vector3 *)p_axis;
- Basis *dest = (Basis *)r_dest;
- *dest = Basis(*axis, p_phi);
-}
-
-void GDAPI godot_basis_new_with_euler(godot_basis *r_dest, const godot_vector3 *p_euler) {
- const Vector3 *euler = (const Vector3 *)p_euler;
- Basis *dest = (Basis *)r_dest;
- *dest = Basis(*euler);
-}
-
-godot_string GDAPI godot_basis_as_string(const godot_basis *p_self) {
- godot_string ret;
- const Basis *self = (const Basis *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_basis GDAPI godot_basis_inverse(const godot_basis *p_self) {
- godot_basis dest;
- const Basis *self = (const Basis *)p_self;
- *((Basis *)&dest) = self->inverse();
- return dest;
-}
-
-godot_basis GDAPI godot_basis_transposed(const godot_basis *p_self) {
- godot_basis dest;
- const Basis *self = (const Basis *)p_self;
- *((Basis *)&dest) = self->transposed();
- return dest;
-}
-
-godot_basis GDAPI godot_basis_orthonormalized(const godot_basis *p_self) {
- godot_basis dest;
- const Basis *self = (const Basis *)p_self;
- *((Basis *)&dest) = self->orthonormalized();
- return dest;
-}
-
-godot_real GDAPI godot_basis_determinant(const godot_basis *p_self) {
- const Basis *self = (const Basis *)p_self;
- return self->determinant();
-}
-
-godot_basis GDAPI godot_basis_rotated(const godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_phi) {
- godot_basis dest;
- const Basis *self = (const Basis *)p_self;
- const Vector3 *axis = (const Vector3 *)p_axis;
- *((Basis *)&dest) = self->rotated(*axis, p_phi);
- return dest;
-}
-
-godot_basis GDAPI godot_basis_scaled(const godot_basis *p_self, const godot_vector3 *p_scale) {
- godot_basis dest;
- const Basis *self = (const Basis *)p_self;
- const Vector3 *scale = (const Vector3 *)p_scale;
- *((Basis *)&dest) = self->scaled(*scale);
- return dest;
-}
-
-godot_vector3 GDAPI godot_basis_get_scale(const godot_basis *p_self) {
- godot_vector3 dest;
- const Basis *self = (const Basis *)p_self;
- *((Vector3 *)&dest) = self->get_scale();
- return dest;
-}
-
-godot_quat GDAPI godot_basis_get_quat(const godot_basis *p_self) {
- godot_quat dest;
- const Basis *self = (const Basis *)p_self;
- *((Quat *)&dest) = self->get_quat();
- return dest;
-}
-
-void GDAPI godot_basis_set_quat(godot_basis *p_self, const godot_quat *p_quat) {
- Basis *self = (Basis *)p_self;
- const Quat *quat = (const Quat *)p_quat;
- self->set_quat(*quat);
+void GDAPI godot_basis_new(godot_basis *p_self) {
+ memnew_placement(p_self, Basis);
}
-void GDAPI godot_basis_set_axis_angle_scale(godot_basis *p_self, const godot_vector3 *p_axis, godot_real p_phi, const godot_vector3 *p_scale) {
+godot_vector3 GDAPI *godot_basis_operator_index(godot_basis *p_self, godot_int p_index) {
Basis *self = (Basis *)p_self;
- const Vector3 *axis = (const Vector3 *)p_axis;
- const Vector3 *scale = (const Vector3 *)p_scale;
- self->set_axis_angle_scale(*axis, p_phi, *scale);
-}
-
-void GDAPI godot_basis_set_euler_scale(godot_basis *p_self, const godot_vector3 *p_euler, const godot_vector3 *p_scale) {
- Basis *self = (Basis *)p_self;
- const Vector3 *euler = (const Vector3 *)p_euler;
- const Vector3 *scale = (const Vector3 *)p_scale;
- self->set_euler_scale(*euler, *scale);
-}
-
-void GDAPI godot_basis_set_quat_scale(godot_basis *p_self, const godot_quat *p_quat, const godot_vector3 *p_scale) {
- Basis *self = (Basis *)p_self;
- const Quat *quat = (const Quat *)p_quat;
- const Vector3 *scale = (const Vector3 *)p_scale;
- self->set_quat_scale(*quat, *scale);
-}
-
-godot_vector3 GDAPI godot_basis_get_euler(const godot_basis *p_self) {
- godot_vector3 dest;
- const Basis *self = (const Basis *)p_self;
- *((Vector3 *)&dest) = self->get_euler();
- return dest;
-}
-
-godot_real GDAPI godot_basis_tdotx(const godot_basis *p_self, const godot_vector3 *p_with) {
- const Basis *self = (const Basis *)p_self;
- const Vector3 *with = (const Vector3 *)p_with;
- return self->tdotx(*with);
-}
-
-godot_real GDAPI godot_basis_tdoty(const godot_basis *p_self, const godot_vector3 *p_with) {
- const Basis *self = (const Basis *)p_self;
- const Vector3 *with = (const Vector3 *)p_with;
- return self->tdoty(*with);
-}
-
-godot_real GDAPI godot_basis_tdotz(const godot_basis *p_self, const godot_vector3 *p_with) {
- const Basis *self = (const Basis *)p_self;
- const Vector3 *with = (const Vector3 *)p_with;
- return self->tdotz(*with);
-}
-
-godot_vector3 GDAPI godot_basis_xform(const godot_basis *p_self, const godot_vector3 *p_v) {
- godot_vector3 dest;
- const Basis *self = (const Basis *)p_self;
- const Vector3 *v = (const Vector3 *)p_v;
- *((Vector3 *)&dest) = self->xform(*v);
- return dest;
-}
-
-godot_vector3 GDAPI godot_basis_xform_inv(const godot_basis *p_self, const godot_vector3 *p_v) {
- godot_vector3 dest;
- const Basis *self = (const Basis *)p_self;
- const Vector3 *v = (const Vector3 *)p_v;
- *((Vector3 *)&dest) = self->xform_inv(*v);
- return dest;
-}
-
-godot_int GDAPI godot_basis_get_orthogonal_index(const godot_basis *p_self) {
- const Basis *self = (const Basis *)p_self;
- return self->get_orthogonal_index();
-}
-
-void GDAPI godot_basis_new(godot_basis *r_dest) {
- Basis *dest = (Basis *)r_dest;
- *dest = Basis();
-}
-
-void GDAPI godot_basis_new_with_euler_quat(godot_basis *r_dest, const godot_quat *p_euler) {
- Basis *dest = (Basis *)r_dest;
- const Quat *euler = (const Quat *)p_euler;
- *dest = Basis(*euler);
-}
-
-// p_elements is a pointer to an array of 3 (!!) vector3
-void GDAPI godot_basis_get_elements(const godot_basis *p_self, godot_vector3 *p_elements) {
- const Basis *self = (const Basis *)p_self;
- Vector3 *elements = (Vector3 *)p_elements;
- elements[0] = self->elements[0];
- elements[1] = self->elements[1];
- elements[2] = self->elements[2];
-}
-
-godot_vector3 GDAPI godot_basis_get_axis(const godot_basis *p_self, const godot_int p_axis) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Basis *self = (const Basis *)p_self;
- *d = self->get_axis(p_axis);
- return dest;
-}
-
-void GDAPI godot_basis_set_axis(godot_basis *p_self, const godot_int p_axis, const godot_vector3 *p_value) {
- Basis *self = (Basis *)p_self;
- const Vector3 *value = (const Vector3 *)p_value;
- self->set_axis(p_axis, *value);
-}
-
-godot_vector3 GDAPI godot_basis_get_row(const godot_basis *p_self, const godot_int p_row) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Basis *self = (const Basis *)p_self;
- *d = self->get_row(p_row);
- return dest;
-}
-
-void GDAPI godot_basis_set_row(godot_basis *p_self, const godot_int p_row, const godot_vector3 *p_value) {
- Basis *self = (Basis *)p_self;
- const Vector3 *value = (const Vector3 *)p_value;
- self->set_row(p_row, *value);
-}
-
-godot_bool GDAPI godot_basis_operator_equal(const godot_basis *p_self, const godot_basis *p_b) {
- const Basis *self = (const Basis *)p_self;
- const Basis *b = (const Basis *)p_b;
- return *self == *b;
-}
-
-godot_basis GDAPI godot_basis_operator_add(const godot_basis *p_self, const godot_basis *p_b) {
- godot_basis raw_dest;
- Basis *dest = (Basis *)&raw_dest;
- const Basis *self = (const Basis *)p_self;
- const Basis *b = (const Basis *)p_b;
- *dest = *self + *b;
- return raw_dest;
-}
-
-godot_basis GDAPI godot_basis_operator_subtract(const godot_basis *p_self, const godot_basis *p_b) {
- godot_basis raw_dest;
- Basis *dest = (Basis *)&raw_dest;
- const Basis *self = (const Basis *)p_self;
- const Basis *b = (const Basis *)p_b;
- *dest = *self - *b;
- return raw_dest;
-}
-
-godot_basis GDAPI godot_basis_operator_multiply_vector(const godot_basis *p_self, const godot_basis *p_b) {
- godot_basis raw_dest;
- Basis *dest = (Basis *)&raw_dest;
- const Basis *self = (const Basis *)p_self;
- const Basis *b = (const Basis *)p_b;
- *dest = *self * *b;
- return raw_dest;
-}
-
-godot_basis GDAPI godot_basis_operator_multiply_scalar(const godot_basis *p_self, const godot_real p_b) {
- godot_basis raw_dest;
- Basis *dest = (Basis *)&raw_dest;
- const Basis *self = (const Basis *)p_self;
- *dest = *self * p_b;
- return raw_dest;
+ return (godot_vector3 *)&self->operator[](p_index);
}
-godot_basis GDAPI godot_basis_slerp(const godot_basis *p_self, const godot_basis *p_b, const godot_real p_t) {
- godot_basis raw_dest;
- Basis *dest = (Basis *)&raw_dest;
+const godot_vector3 GDAPI *godot_basis_operator_index_const(const godot_basis *p_self, godot_int p_index) {
const Basis *self = (const Basis *)p_self;
- const Basis *b = (const Basis *)p_b;
- *dest = self->slerp(*b, p_t);
- return raw_dest;
+ return (const godot_vector3 *)&self->operator[](p_index);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/callable.cpp b/modules/gdnative/gdnative/callable.cpp
index d4730a14b3..7c62b5928f 100644
--- a/modules/gdnative/gdnative/callable.cpp
+++ b/modules/gdnative/gdnative/callable.cpp
@@ -30,36 +30,17 @@
#include "gdnative/callable.h"
-#include "core/io/resource.h"
#include "core/variant/callable.h"
#include "core/variant/variant.h"
+static_assert(sizeof(godot_callable) == sizeof(Callable), "Callable size mismatch");
+
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_callable) == sizeof(Callable), "Callable size mismatch");
-static_assert(sizeof(godot_signal) == sizeof(Signal), "Signal size mismatch");
-
-// Callable
-
-void GDAPI godot_callable_new_with_object(godot_callable *r_dest, const godot_object *p_object, const godot_string_name *p_method) {
- Callable *dest = (Callable *)r_dest;
- const Object *object = (const Object *)p_object;
- const StringName *method = (const StringName *)p_method;
- memnew_placement(dest, Callable(object, *method));
-}
-
-void GDAPI godot_callable_new_with_object_id(godot_callable *r_dest, uint64_t p_objectid, const godot_string_name *p_method) {
- Callable *dest = (Callable *)r_dest;
- const StringName *method = (const StringName *)p_method;
- memnew_placement(dest, Callable(ObjectID(p_objectid), *method));
-}
-
-void GDAPI godot_callable_new_copy(godot_callable *r_dest, const godot_callable *p_src) {
- Callable *dest = (Callable *)r_dest;
- const Callable *src = (const Callable *)p_src;
- memnew_placement(dest, Callable(*src));
+void GDAPI godot_callable_new(godot_callable *p_self) {
+ memnew_placement(p_self, Callable);
}
void GDAPI godot_callable_destroy(godot_callable *p_self) {
@@ -67,186 +48,6 @@ void GDAPI godot_callable_destroy(godot_callable *p_self) {
self->~Callable();
}
-godot_int GDAPI godot_callable_call(const godot_callable *p_self, const godot_variant **p_arguments, godot_int p_argcount, godot_variant *r_return_value) {
- const Callable *self = (const Callable *)p_self;
- const Variant **arguments = (const Variant **)p_arguments;
- Variant *return_value = (Variant *)r_return_value;
- Variant ret;
- Callable::CallError err;
- self->call(arguments, p_argcount, ret, err);
- if (return_value)
- (*return_value) = ret;
- return (godot_int)err.error;
-}
-
-void GDAPI godot_callable_call_deferred(const godot_callable *p_self, const godot_variant **p_arguments, godot_int p_argcount) {
- const Callable *self = (const Callable *)p_self;
- const Variant **arguments = (const Variant **)p_arguments;
- self->call_deferred(arguments, p_argcount);
-}
-
-godot_bool GDAPI godot_callable_is_null(const godot_callable *p_self) {
- const Callable *self = (const Callable *)p_self;
- return self->is_null();
-}
-
-godot_bool GDAPI godot_callable_is_custom(const godot_callable *p_self) {
- const Callable *self = (const Callable *)p_self;
- return self->is_custom();
-}
-
-godot_bool GDAPI godot_callable_is_standard(const godot_callable *p_self) {
- const Callable *self = (const Callable *)p_self;
- return self->is_standard();
-}
-
-godot_object GDAPI *godot_callable_get_object(const godot_callable *p_self) {
- const Callable *self = (const Callable *)p_self;
- return (godot_object *)self->get_object();
-}
-
-uint64_t GDAPI godot_callable_get_object_id(const godot_callable *p_self) {
- const Callable *self = (const Callable *)p_self;
- return (uint64_t)self->get_object_id();
-}
-
-godot_string_name GDAPI godot_callable_get_method(const godot_callable *p_self) {
- godot_string_name raw_dest;
- const Callable *self = (const Callable *)p_self;
- StringName *dest = (StringName *)&raw_dest;
- memnew_placement(dest, StringName(self->get_method()));
- return raw_dest;
-}
-
-uint32_t GDAPI godot_callable_hash(const godot_callable *p_self) {
- const Callable *self = (const Callable *)p_self;
- return self->hash();
-}
-
-godot_string GDAPI godot_callable_as_string(const godot_callable *p_self) {
- godot_string ret;
- const Callable *self = (const Callable *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_bool GDAPI godot_callable_operator_equal(const godot_callable *p_self, const godot_callable *p_other) {
- const Callable *self = (const Callable *)p_self;
- const Callable *other = (const Callable *)p_other;
- return *self == *other;
-}
-
-godot_bool GDAPI godot_callable_operator_less(const godot_callable *p_self, const godot_callable *p_other) {
- const Callable *self = (const Callable *)p_self;
- const Callable *other = (const Callable *)p_other;
- return *self < *other;
-}
-
-// Signal
-
-void GDAPI godot_signal_new_with_object(godot_signal *r_dest, const godot_object *p_object, const godot_string_name *p_name) {
- Signal *dest = (Signal *)r_dest;
- const Object *object = (const Object *)p_object;
- const StringName *name = (const StringName *)p_name;
- memnew_placement(dest, Signal(object, *name));
-}
-
-void GDAPI godot_signal_new_with_object_id(godot_signal *r_dest, uint64_t p_objectid, const godot_string_name *p_name) {
- Signal *dest = (Signal *)r_dest;
- const StringName *name = (const StringName *)p_name;
- memnew_placement(dest, Signal(ObjectID(p_objectid), *name));
-}
-
-void GDAPI godot_signal_new_copy(godot_signal *r_dest, const godot_signal *p_src) {
- Signal *dest = (Signal *)r_dest;
- const Signal *src = (const Signal *)p_src;
- memnew_placement(dest, Signal(*src));
-}
-
-void GDAPI godot_signal_destroy(godot_signal *p_self) {
- Signal *self = (Signal *)p_self;
- self->~Signal();
-}
-
-godot_int GDAPI godot_signal_emit(const godot_signal *p_self, const godot_variant **p_arguments, godot_int p_argcount) {
- const Signal *self = (const Signal *)p_self;
- const Variant **arguments = (const Variant **)p_arguments;
- return (godot_int)self->emit(arguments, p_argcount);
-}
-
-godot_int GDAPI godot_signal_connect(godot_signal *p_self, const godot_callable *p_callable, const godot_array *p_binds, uint32_t p_flags) {
- Signal *self = (Signal *)p_self;
- const Callable *callable = (const Callable *)p_callable;
- const Array *binds_ar = (const Array *)p_binds;
- Vector<Variant> binds;
- for (int i = 0; i < binds_ar->size(); i++) {
- binds.push_back(binds_ar->get(i));
- }
- return (godot_int)self->connect(*callable, binds, p_flags);
-}
-
-void GDAPI godot_signal_disconnect(godot_signal *p_self, const godot_callable *p_callable) {
- Signal *self = (Signal *)p_self;
- const Callable *callable = (const Callable *)p_callable;
- self->disconnect(*callable);
-}
-
-godot_bool GDAPI godot_signal_is_null(const godot_signal *p_self) {
- const Signal *self = (const Signal *)p_self;
- return self->is_null();
-}
-
-godot_bool GDAPI godot_signal_is_connected(const godot_signal *p_self, const godot_callable *p_callable) {
- const Signal *self = (const Signal *)p_self;
- const Callable *callable = (const Callable *)p_callable;
- return self->is_connected(*callable);
-}
-
-godot_array GDAPI godot_signal_get_connections(const godot_signal *p_self) {
- godot_array raw_dest;
- const Signal *self = (const Signal *)p_self;
- Array *dest = (Array *)&raw_dest;
- memnew_placement(dest, Array(self->get_connections()));
- return raw_dest;
-}
-
-godot_object GDAPI *godot_signal_get_object(const godot_signal *p_self) {
- const Signal *self = (const Signal *)p_self;
- return (godot_object *)self->get_object();
-}
-
-uint64_t GDAPI godot_signal_get_object_id(const godot_signal *p_self) {
- const Signal *self = (const Signal *)p_self;
- return (uint64_t)self->get_object_id();
-}
-
-godot_string_name GDAPI godot_signal_get_name(const godot_signal *p_self) {
- godot_string_name raw_dest;
- const Signal *self = (const Signal *)p_self;
- StringName *dest = (StringName *)&raw_dest;
- memnew_placement(dest, StringName(self->get_name()));
- return raw_dest;
-}
-
-godot_string GDAPI godot_signal_as_string(const godot_signal *p_self) {
- godot_string ret;
- const Signal *self = (const Signal *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_bool GDAPI godot_signal_operator_equal(const godot_signal *p_self, const godot_signal *p_other) {
- const Signal *self = (const Signal *)p_self;
- const Signal *other = (const Signal *)p_other;
- return *self == *other;
-}
-
-godot_bool GDAPI godot_signal_operator_less(const godot_signal *p_self, const godot_signal *p_other) {
- const Signal *self = (const Signal *)p_self;
- const Signal *other = (const Signal *)p_other;
- return *self < *other;
-}
-
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/gdnative/color.cpp b/modules/gdnative/gdnative/color.cpp
index 939dec3a47..12a800d333 100644
--- a/modules/gdnative/gdnative/color.cpp
+++ b/modules/gdnative/gdnative/color.cpp
@@ -31,178 +31,25 @@
#include "gdnative/color.h"
#include "core/math/color.h"
-#include "core/variant/variant.h"
+
+static_assert(sizeof(godot_color) == sizeof(Color), "Color size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_color) == sizeof(Color), "Color size mismatch");
-
-void GDAPI godot_color_new_rgba(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a) {
- Color *dest = (Color *)r_dest;
- *dest = Color(p_r, p_g, p_b, p_a);
-}
-
-void GDAPI godot_color_new_rgb(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b) {
- Color *dest = (Color *)r_dest;
- *dest = Color(p_r, p_g, p_b);
-}
-
-godot_real godot_color_get_r(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->r;
-}
-
-void godot_color_set_r(godot_color *p_self, const godot_real val) {
- Color *self = (Color *)p_self;
- self->r = val;
-}
-
-godot_real godot_color_get_g(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->g;
-}
-
-void godot_color_set_g(godot_color *p_self, const godot_real val) {
- Color *self = (Color *)p_self;
- self->g = val;
-}
-
-godot_real godot_color_get_b(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->b;
+void GDAPI godot_color_new(godot_color *p_self) {
+ memnew_placement(p_self, Color);
}
-void godot_color_set_b(godot_color *p_self, const godot_real val) {
+float GDAPI *godot_color_operator_index(godot_color *p_self, godot_int p_index) {
Color *self = (Color *)p_self;
- self->b = val;
-}
-
-godot_real godot_color_get_a(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->a;
-}
-
-void godot_color_set_a(godot_color *p_self, const godot_real val) {
- Color *self = (Color *)p_self;
- self->a = val;
-}
-
-godot_real godot_color_get_h(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->get_h();
-}
-
-godot_real godot_color_get_s(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->get_s();
-}
-
-godot_real godot_color_get_v(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->get_v();
-}
-
-godot_string GDAPI godot_color_as_string(const godot_color *p_self) {
- godot_string ret;
- const Color *self = (const Color *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_int GDAPI godot_color_to_rgba32(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->to_rgba32();
-}
-
-godot_int GDAPI godot_color_to_abgr32(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->to_abgr32();
-}
-
-godot_int GDAPI godot_color_to_abgr64(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->to_abgr64();
-}
-
-godot_int GDAPI godot_color_to_argb64(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->to_argb64();
-}
-
-godot_int GDAPI godot_color_to_rgba64(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->to_rgba64();
-}
-
-godot_int GDAPI godot_color_to_argb32(const godot_color *p_self) {
- const Color *self = (const Color *)p_self;
- return self->to_argb32();
-}
-
-godot_color GDAPI godot_color_inverted(const godot_color *p_self) {
- godot_color dest;
- const Color *self = (const Color *)p_self;
- *((Color *)&dest) = self->inverted();
- return dest;
-}
-
-godot_color GDAPI godot_color_lerp(const godot_color *p_self, const godot_color *p_b, const godot_real p_t) {
- godot_color dest;
- const Color *self = (const Color *)p_self;
- const Color *b = (const Color *)p_b;
- *((Color *)&dest) = self->lerp(*b, p_t);
- return dest;
-}
-
-godot_color GDAPI godot_color_blend(const godot_color *p_self, const godot_color *p_over) {
- godot_color dest;
- const Color *self = (const Color *)p_self;
- const Color *over = (const Color *)p_over;
- *((Color *)&dest) = self->blend(*over);
- return dest;
-}
-
-godot_color GDAPI godot_color_darkened(const godot_color *p_self, const godot_real p_amount) {
- godot_color dest;
- const Color *self = (const Color *)p_self;
- *((Color *)&dest) = self->darkened(p_amount);
- return dest;
-}
-
-godot_color GDAPI godot_color_from_hsv(const godot_color *p_self, const godot_real p_h, const godot_real p_s, const godot_real p_v, const godot_real p_a) {
- godot_color dest;
- const Color *self = (const Color *)p_self;
- *((Color *)&dest) = self->from_hsv(p_h, p_s, p_v, p_a);
- return dest;
-}
-
-godot_color GDAPI godot_color_lightened(const godot_color *p_self, const godot_real p_amount) {
- godot_color dest;
- const Color *self = (const Color *)p_self;
- *((Color *)&dest) = self->lightened(p_amount);
- return dest;
-}
-
-godot_string GDAPI godot_color_to_html(const godot_color *p_self, const godot_bool p_with_alpha) {
- godot_string dest;
- const Color *self = (const Color *)p_self;
-
- memnew_placement(&dest, String(self->to_html(p_with_alpha)));
- return dest;
-}
-
-godot_bool GDAPI godot_color_operator_equal(const godot_color *p_self, const godot_color *p_b) {
- const Color *self = (const Color *)p_self;
- const Color *b = (const Color *)p_b;
- return *self == *b;
+ return (float *)&self->operator[](p_index);
}
-godot_bool GDAPI godot_color_operator_less(const godot_color *p_self, const godot_color *p_b) {
+const float GDAPI *godot_color_operator_index_const(const godot_color *p_self, godot_int p_index) {
const Color *self = (const Color *)p_self;
- const Color *b = (const Color *)p_b;
- return *self < *b;
+ return (const float *)&self->operator[](p_index);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/dictionary.cpp b/modules/gdnative/gdnative/dictionary.cpp
index f3c040428a..9fa4a27a83 100644
--- a/modules/gdnative/gdnative/dictionary.cpp
+++ b/modules/gdnative/gdnative/dictionary.cpp
@@ -30,26 +30,17 @@
#include "gdnative/dictionary.h"
-#include "core/variant/variant.h"
-// core/variant/variant.h before to avoid compile errors with MSVC
-#include "core/io/json.h"
#include "core/variant/dictionary.h"
+#include "core/variant/variant.h"
+
+static_assert(sizeof(godot_dictionary) == sizeof(Dictionary), "Dictionary size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_dictionary) == sizeof(Dictionary), "Dictionary size mismatch");
-
-void GDAPI godot_dictionary_new(godot_dictionary *r_dest) {
- Dictionary *dest = (Dictionary *)r_dest;
- memnew_placement(dest, Dictionary);
-}
-
-void GDAPI godot_dictionary_new_copy(godot_dictionary *r_dest, const godot_dictionary *p_src) {
- Dictionary *dest = (Dictionary *)r_dest;
- const Dictionary *src = (const Dictionary *)p_src;
- memnew_placement(dest, Dictionary(*src));
+void GDAPI godot_dictionary_new(godot_dictionary *p_self) {
+ memnew_placement(p_self, Dictionary);
}
void GDAPI godot_dictionary_destroy(godot_dictionary *p_self) {
@@ -57,133 +48,14 @@ void GDAPI godot_dictionary_destroy(godot_dictionary *p_self) {
self->~Dictionary();
}
-godot_dictionary GDAPI godot_dictionary_duplicate(const godot_dictionary *p_self, const godot_bool p_deep) {
- const Dictionary *self = (const Dictionary *)p_self;
- godot_dictionary res;
- Dictionary *val = (Dictionary *)&res;
- memnew_placement(val, Dictionary);
- *val = self->duplicate(p_deep);
- return res;
-}
-
-godot_int GDAPI godot_dictionary_size(const godot_dictionary *p_self) {
- const Dictionary *self = (const Dictionary *)p_self;
- return self->size();
-}
-
-godot_bool GDAPI godot_dictionary_is_empty(const godot_dictionary *p_self) {
- const Dictionary *self = (const Dictionary *)p_self;
- return self->is_empty();
-}
-
-void GDAPI godot_dictionary_clear(godot_dictionary *p_self) {
- Dictionary *self = (Dictionary *)p_self;
- self->clear();
-}
-
-godot_bool GDAPI godot_dictionary_has(const godot_dictionary *p_self, const godot_variant *p_key) {
- const Dictionary *self = (const Dictionary *)p_self;
- const Variant *key = (const Variant *)p_key;
- return self->has(*key);
-}
-
-godot_bool GDAPI godot_dictionary_has_all(const godot_dictionary *p_self, const godot_array *p_keys) {
- const Dictionary *self = (const Dictionary *)p_self;
- const Array *keys = (const Array *)p_keys;
- return self->has_all(*keys);
-}
-
-void GDAPI godot_dictionary_erase(godot_dictionary *p_self, const godot_variant *p_key) {
- Dictionary *self = (Dictionary *)p_self;
- const Variant *key = (const Variant *)p_key;
- self->erase(*key);
-}
-
-godot_int GDAPI godot_dictionary_hash(const godot_dictionary *p_self) {
- const Dictionary *self = (const Dictionary *)p_self;
- return self->hash();
-}
-
-godot_array GDAPI godot_dictionary_keys(const godot_dictionary *p_self) {
- godot_array dest;
- const Dictionary *self = (const Dictionary *)p_self;
- memnew_placement(&dest, Array(self->keys()));
- return dest;
-}
-
-godot_array GDAPI godot_dictionary_values(const godot_dictionary *p_self) {
- godot_array dest;
- const Dictionary *self = (const Dictionary *)p_self;
- memnew_placement(&dest, Array(self->values()));
- return dest;
-}
-
-godot_variant GDAPI godot_dictionary_get(const godot_dictionary *p_self, const godot_variant *p_key) {
- godot_variant raw_dest;
- Variant *dest = (Variant *)&raw_dest;
- const Dictionary *self = (const Dictionary *)p_self;
- const Variant *key = (const Variant *)p_key;
- memnew_placement(dest, Variant(self->operator[](*key)));
- return raw_dest;
-}
-
-void GDAPI godot_dictionary_set(godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_value) {
- Dictionary *self = (Dictionary *)p_self;
- const Variant *key = (const Variant *)p_key;
- const Variant *value = (const Variant *)p_value;
- self->operator[](*key) = *value;
-}
-
godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_self, const godot_variant *p_key) {
Dictionary *self = (Dictionary *)p_self;
- const Variant *key = (const Variant *)p_key;
- return (godot_variant *)&self->operator[](*key);
+ return (godot_variant *)&self->operator[](*((const Variant *)p_key));
}
const godot_variant GDAPI *godot_dictionary_operator_index_const(const godot_dictionary *p_self, const godot_variant *p_key) {
const Dictionary *self = (const Dictionary *)p_self;
- const Variant *key = (const Variant *)p_key;
- return (const godot_variant *)&self->operator[](*key);
-}
-
-godot_variant GDAPI *godot_dictionary_next(const godot_dictionary *p_self, const godot_variant *p_key) {
- Dictionary *self = (Dictionary *)p_self;
- const Variant *key = (const Variant *)p_key;
- return (godot_variant *)self->next(key);
-}
-
-godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self, const godot_dictionary *p_b) {
- const Dictionary *self = (const Dictionary *)p_self;
- const Dictionary *b = (const Dictionary *)p_b;
- return *self == *b;
-}
-
-godot_string GDAPI godot_dictionary_to_json(const godot_dictionary *p_self) {
- godot_string raw_dest;
- String *dest = (String *)&raw_dest;
- const Dictionary *self = (const Dictionary *)p_self;
- memnew_placement(dest, String(JSON::print(Variant(*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;
+ return (const godot_variant *)&self->operator[](*((const Variant *)p_key));
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/gdnative.cpp b/modules/gdnative/gdnative/gdnative.cpp
index 1c11130d89..b84ce2d192 100644
--- a/modules/gdnative/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative/gdnative.cpp
@@ -99,7 +99,7 @@ godot_class_constructor GDAPI godot_get_class_constructor(const char *p_classnam
godot_dictionary GDAPI godot_get_global_constants() {
godot_dictionary constants;
- godot_dictionary_new(&constants);
+ memnew_placement(&constants, Dictionary);
Dictionary *p_constants = (Dictionary *)&constants;
const int constants_count = CoreConstants::get_global_constant_count();
for (int i = 0; i < constants_count; ++i) {
@@ -127,16 +127,15 @@ void GDAPI godot_free(void *p_ptr) {
memfree(p_ptr);
}
+// Helper print functions.
void GDAPI godot_print_error(const char *p_description, const char *p_function, const char *p_file, int p_line) {
_err_print_error(p_function, p_file, p_line, p_description, ERR_HANDLER_ERROR);
}
-
void GDAPI godot_print_warning(const char *p_description, const char *p_function, const char *p_file, int p_line) {
_err_print_error(p_function, p_file, p_line, p_description, ERR_HANDLER_WARNING);
}
-
-void GDAPI godot_print(const godot_string *p_message) {
- print_line(*(String *)p_message);
+void GDAPI godot_print_script_error(const char *p_description, const char *p_function, const char *p_file, int p_line) {
+ _err_print_error(p_function, p_file, p_line, p_description, ERR_HANDLER_SCRIPT);
}
void _gdnative_report_version_mismatch(const godot_object *p_library, const char *p_ext, godot_gdnative_api_version p_want, godot_gdnative_api_version p_have) {
diff --git a/modules/gdnative/gdnative/node_path.cpp b/modules/gdnative/gdnative/node_path.cpp
index 7b215c0d0b..02c2f9b22b 100644
--- a/modules/gdnative/gdnative/node_path.cpp
+++ b/modules/gdnative/gdnative/node_path.cpp
@@ -31,24 +31,15 @@
#include "gdnative/node_path.h"
#include "core/string/node_path.h"
-#include "core/variant/variant.h"
+
+static_assert(sizeof(godot_node_path) == sizeof(NodePath), "NodePath size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_node_path) == sizeof(NodePath), "NodePath size mismatch");
-
-void GDAPI godot_node_path_new(godot_node_path *r_dest, const godot_string *p_from) {
- NodePath *dest = (NodePath *)r_dest;
- const String *from = (const String *)p_from;
- memnew_placement(dest, NodePath(*from));
-}
-
-void GDAPI godot_node_path_new_copy(godot_node_path *r_dest, const godot_node_path *p_src) {
- NodePath *dest = (NodePath *)r_dest;
- const NodePath *src = (const NodePath *)p_src;
- memnew_placement(dest, NodePath(*src));
+void GDAPI godot_node_path_new(godot_node_path *p_self) {
+ memnew_placement(p_self, NodePath);
}
void GDAPI godot_node_path_destroy(godot_node_path *p_self) {
@@ -56,71 +47,6 @@ void GDAPI godot_node_path_destroy(godot_node_path *p_self) {
self->~NodePath();
}
-godot_string GDAPI godot_node_path_as_string(const godot_node_path *p_self) {
- godot_string ret;
- const NodePath *self = (const NodePath *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_bool GDAPI godot_node_path_is_absolute(const godot_node_path *p_self) {
- const NodePath *self = (const NodePath *)p_self;
- return self->is_absolute();
-}
-
-godot_int GDAPI godot_node_path_get_name_count(const godot_node_path *p_self) {
- const NodePath *self = (const NodePath *)p_self;
- return self->get_name_count();
-}
-
-godot_string GDAPI godot_node_path_get_name(const godot_node_path *p_self, const godot_int p_idx) {
- godot_string dest;
- const NodePath *self = (const NodePath *)p_self;
-
- memnew_placement(&dest, String(self->get_name(p_idx)));
- return dest;
-}
-
-godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_self) {
- const NodePath *self = (const NodePath *)p_self;
- return self->get_subname_count();
-}
-
-godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, const godot_int p_idx) {
- godot_string dest;
- const NodePath *self = (const NodePath *)p_self;
-
- memnew_placement(&dest, String(self->get_subname(p_idx)));
- return dest;
-}
-
-godot_string GDAPI godot_node_path_get_concatenated_subnames(const godot_node_path *p_self) {
- godot_string dest;
- const NodePath *self = (const NodePath *)p_self;
- memnew_placement(&dest, String(self->get_concatenated_subnames()));
- return dest;
-}
-
-godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_self) {
- const NodePath *self = (const NodePath *)p_self;
- return self->is_empty();
-}
-
-godot_bool GDAPI godot_node_path_operator_equal(const godot_node_path *p_self, const godot_node_path *p_b) {
- const NodePath *self = (const NodePath *)p_self;
- const NodePath *b = (const NodePath *)p_b;
- return *self == *b;
-}
-
-godot_node_path godot_node_path_get_as_property_path(const godot_node_path *p_self) {
- const NodePath *self = (const NodePath *)p_self;
- godot_node_path res;
- NodePath *val = (NodePath *)&res;
- memnew_placement(val, NodePath);
- *val = self->get_as_property_path();
- return res;
-}
-
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/gdnative/packed_arrays.cpp b/modules/gdnative/gdnative/packed_arrays.cpp
index e714999234..63a2425b87 100644
--- a/modules/gdnative/gdnative/packed_arrays.cpp
+++ b/modules/gdnative/gdnative/packed_arrays.cpp
@@ -30,1110 +30,247 @@
#include "gdnative/packed_arrays.h"
-#include "core/variant/array.h"
-
#include "core/variant/variant.h"
-#include "core/math/color.h"
#include "core/math/vector2.h"
-#include "core/math/vector3.h"
+#include "core/math/vector3i.h"
+
+static_assert(sizeof(godot_packed_byte_array) == sizeof(PackedByteArray), "PackedByteArray size mismatch");
+static_assert(sizeof(godot_packed_int32_array) == sizeof(PackedInt32Array), "PackedInt32Array size mismatch");
+static_assert(sizeof(godot_packed_int64_array) == sizeof(PackedInt64Array), "PackedInt64Array size mismatch");
+static_assert(sizeof(godot_packed_float32_array) == sizeof(PackedFloat32Array), "PackedFloat32Array size mismatch");
+static_assert(sizeof(godot_packed_float64_array) == sizeof(PackedFloat64Array), "PackedFloat64Array size mismatch");
+static_assert(sizeof(godot_packed_string_array) == sizeof(PackedStringArray), "PackedStringArray size mismatch");
+static_assert(sizeof(godot_packed_vector2_array) == sizeof(PackedVector2Array), "PackedVector2Array size mismatch");
+static_assert(sizeof(godot_packed_vector2i_array) == sizeof(Vector<Vector2i>), "Vector<Vector2i> size mismatch");
+static_assert(sizeof(godot_packed_vector3_array) == sizeof(PackedVector3Array), "PackedVector3Array size mismatch");
+static_assert(sizeof(godot_packed_vector3i_array) == sizeof(Vector<Vector3i>), "Vector<Vector3i> size mismatch");
+static_assert(sizeof(godot_packed_color_array) == sizeof(PackedColorArray), "PackedColorArray size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_packed_byte_array) == sizeof(Vector<uint8_t>), "Vector<uint8_t> size mismatch");
-static_assert(sizeof(godot_packed_int32_array) == sizeof(Vector<int32_t>), "Vector<int32_t> size mismatch");
-static_assert(sizeof(godot_packed_int64_array) == sizeof(Vector<int64_t>), "Vector<int64_t> size mismatch");
-static_assert(sizeof(godot_packed_float32_array) == sizeof(Vector<float>), "Vector<float> size mismatch");
-static_assert(sizeof(godot_packed_float64_array) == sizeof(Vector<double>), "Vector<double> size mismatch");
-static_assert(sizeof(godot_packed_string_array) == sizeof(Vector<String>), "Vector<String> size mismatch");
-static_assert(sizeof(godot_packed_vector2_array) == sizeof(Vector<Vector2>), "Vector<Vector2> size mismatch");
-static_assert(sizeof(godot_packed_vector2i_array) == sizeof(Vector<Vector2i>), "Vector<Vector2i> size mismatch");
-static_assert(sizeof(godot_packed_vector3_array) == sizeof(Vector<Vector3>), "Vector<Vector3> size mismatch");
-static_assert(sizeof(godot_packed_color_array) == sizeof(Vector<Color>), "Vector<Color> size mismatch");
-
#define memnew_placement_custom(m_placement, m_class, m_constr) _post_initialize(new (m_placement, sizeof(m_class), "") m_constr)
// byte
-void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *r_dest) {
- Vector<uint8_t> *dest = (Vector<uint8_t> *)r_dest;
- memnew_placement(dest, Vector<uint8_t>);
-}
-
-void GDAPI godot_packed_byte_array_new_copy(godot_packed_byte_array *r_dest, const godot_packed_byte_array *p_src) {
- Vector<uint8_t> *dest = (Vector<uint8_t> *)r_dest;
- const Vector<uint8_t> *src = (const Vector<uint8_t> *)p_src;
- memnew_placement(dest, Vector<uint8_t>(*src));
-}
-
-void GDAPI godot_packed_byte_array_new_with_array(godot_packed_byte_array *r_dest, const godot_array *p_a) {
- Vector<uint8_t> *dest = (Vector<uint8_t> *)r_dest;
- Array *a = (Array *)p_a;
- memnew_placement(dest, Vector<uint8_t>);
-
- dest->resize(a->size());
- for (int i = 0; i < a->size(); i++) {
- dest->set(i, (*a)[i]);
- }
-}
-
-const uint8_t GDAPI *godot_packed_byte_array_ptr(const godot_packed_byte_array *p_self) {
- const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self;
- return self->ptr();
-}
-
-uint8_t GDAPI *godot_packed_byte_array_ptrw(godot_packed_byte_array *p_self) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- return self->ptrw();
-}
-
-void GDAPI godot_packed_byte_array_append(godot_packed_byte_array *p_self, const uint8_t p_data) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- self->push_back(p_data);
-}
-
-void GDAPI godot_packed_byte_array_append_array(godot_packed_byte_array *p_self, const godot_packed_byte_array *p_array) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- Vector<uint8_t> *array = (Vector<uint8_t> *)p_array;
- self->append_array(*array);
-}
-
-godot_error GDAPI godot_packed_byte_array_insert(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- return (godot_error)self->insert(p_idx, p_data);
-}
-
-godot_bool GDAPI godot_packed_byte_array_has(godot_packed_byte_array *p_self, const uint8_t p_value) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- return (godot_bool)self->has(p_value);
-}
-
-void GDAPI godot_packed_byte_array_sort(godot_packed_byte_array *p_self) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- self->sort();
-}
-
-void GDAPI godot_packed_byte_array_invert(godot_packed_byte_array *p_self) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- self->invert();
-}
-
-void GDAPI godot_packed_byte_array_push_back(godot_packed_byte_array *p_self, const uint8_t p_data) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- self->push_back(p_data);
-}
-
-void GDAPI godot_packed_byte_array_remove(godot_packed_byte_array *p_self, const godot_int p_idx) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- self->remove(p_idx);
-}
-
-void GDAPI godot_packed_byte_array_resize(godot_packed_byte_array *p_self, const godot_int p_size) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- self->resize(p_size);
-}
-
-void GDAPI godot_packed_byte_array_set(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data) {
- Vector<uint8_t> *self = (Vector<uint8_t> *)p_self;
- self->set(p_idx, p_data);
-}
-
-uint8_t GDAPI godot_packed_byte_array_get(const godot_packed_byte_array *p_self, const godot_int p_idx) {
- const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self;
- return self->get(p_idx);
-}
-
-godot_int GDAPI godot_packed_byte_array_size(const godot_packed_byte_array *p_self) {
- const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self;
- return self->size();
-}
-
-godot_bool GDAPI godot_packed_byte_array_is_empty(const godot_packed_byte_array *p_self) {
- const Vector<uint8_t> *self = (const Vector<uint8_t> *)p_self;
- return self->is_empty();
+void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *p_self) {
+ memnew_placement(p_self, PackedByteArray);
}
void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self) {
- ((Vector<uint8_t> *)p_self)->~Vector();
+ ((PackedByteArray *)p_self)->~PackedByteArray();
}
-// int32
-
-void GDAPI godot_packed_int32_array_new(godot_packed_int32_array *r_dest) {
- Vector<int32_t> *dest = (Vector<int32_t> *)r_dest;
- memnew_placement(dest, Vector<int32_t>);
+uint8_t GDAPI *godot_packed_byte_array_operator_index(godot_packed_byte_array *p_self, godot_int p_index) {
+ PackedByteArray *self = (PackedByteArray *)p_self;
+ return (uint8_t *)&self->operator[](p_index);
}
-void GDAPI godot_packed_int32_array_new_copy(godot_packed_int32_array *r_dest, const godot_packed_int32_array *p_src) {
- Vector<int32_t> *dest = (Vector<int32_t> *)r_dest;
- const Vector<int32_t> *src = (const Vector<int32_t> *)p_src;
- memnew_placement(dest, Vector<int32_t>(*src));
+const uint8_t GDAPI *godot_packed_byte_array_operator_index_const(const godot_packed_byte_array *p_self, godot_int p_index) {
+ const PackedByteArray *self = (const PackedByteArray *)p_self;
+ return (const uint8_t *)&self->operator[](p_index);
}
-void GDAPI godot_packed_int32_array_new_with_array(godot_packed_int32_array *r_dest, const godot_array *p_a) {
- Vector<int32_t> *dest = (Vector<int32_t> *)r_dest;
- Array *a = (Array *)p_a;
- memnew_placement(dest, Vector<int32_t>);
-
- dest->resize(a->size());
- for (int i = 0; i < a->size(); i++) {
- dest->set(i, (*a)[i]);
- }
-}
-
-const int32_t GDAPI *godot_packed_int32_array_ptr(const godot_packed_int32_array *p_self) {
- const Vector<int32_t> *self = (const Vector<int32_t> *)p_self;
- return self->ptr();
-}
-
-int32_t GDAPI *godot_packed_int32_array_ptrw(godot_packed_int32_array *p_self) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- return self->ptrw();
-}
-
-void GDAPI godot_packed_int32_array_append(godot_packed_int32_array *p_self, const int32_t p_data) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- self->push_back(p_data);
-}
-
-void GDAPI godot_packed_int32_array_append_array(godot_packed_int32_array *p_self, const godot_packed_int32_array *p_array) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- Vector<int32_t> *array = (Vector<int32_t> *)p_array;
- self->append_array(*array);
-}
-
-godot_error GDAPI godot_packed_int32_array_insert(godot_packed_int32_array *p_self, const godot_int p_idx, const int32_t p_data) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- return (godot_error)self->insert(p_idx, p_data);
-}
-
-godot_bool GDAPI godot_packed_int32_array_has(godot_packed_int32_array *p_self, const int32_t p_value) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- return (godot_bool)self->has(p_value);
-}
-
-void GDAPI godot_packed_int32_array_sort(godot_packed_int32_array *p_self) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- self->sort();
-}
-
-void GDAPI godot_packed_int32_array_invert(godot_packed_int32_array *p_self) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- self->invert();
-}
-
-void GDAPI godot_packed_int32_array_push_back(godot_packed_int32_array *p_self, const int32_t p_data) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- self->push_back(p_data);
-}
-
-void GDAPI godot_packed_int32_array_remove(godot_packed_int32_array *p_self, const godot_int p_idx) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- self->remove(p_idx);
-}
-
-void GDAPI godot_packed_int32_array_resize(godot_packed_int32_array *p_self, const godot_int p_size) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- self->resize(p_size);
-}
-
-void GDAPI godot_packed_int32_array_set(godot_packed_int32_array *p_self, const godot_int p_idx, const int32_t p_data) {
- Vector<int32_t> *self = (Vector<int32_t> *)p_self;
- self->set(p_idx, p_data);
-}
-
-int32_t GDAPI godot_packed_int32_array_get(const godot_packed_int32_array *p_self, const godot_int p_idx) {
- const Vector<int32_t> *self = (const Vector<int32_t> *)p_self;
- return self->get(p_idx);
-}
-
-godot_int GDAPI godot_packed_int32_array_size(const godot_packed_int32_array *p_self) {
- const Vector<int32_t> *self = (const Vector<int32_t> *)p_self;
- return self->size();
-}
+// int32
-godot_bool GDAPI godot_packed_int32_array_is_empty(const godot_packed_int32_array *p_self) {
- const Vector<int32_t> *self = (const Vector<int32_t> *)p_self;
- return self->is_empty();
+void GDAPI godot_packed_int32_array_new(godot_packed_int32_array *p_self) {
+ memnew_placement(p_self, PackedInt32Array);
}
void GDAPI godot_packed_int32_array_destroy(godot_packed_int32_array *p_self) {
- ((Vector<int32_t> *)p_self)->~Vector();
-}
-
-// int64
-
-void GDAPI godot_packed_int64_array_new(godot_packed_int64_array *r_dest) {
- Vector<int64_t> *dest = (Vector<int64_t> *)r_dest;
- memnew_placement(dest, Vector<int64_t>);
-}
-
-void GDAPI godot_packed_int64_array_new_copy(godot_packed_int64_array *r_dest, const godot_packed_int64_array *p_src) {
- Vector<int64_t> *dest = (Vector<int64_t> *)r_dest;
- const Vector<int64_t> *src = (const Vector<int64_t> *)p_src;
- memnew_placement(dest, Vector<int64_t>(*src));
-}
-
-void GDAPI godot_packed_int64_array_new_with_array(godot_packed_int64_array *r_dest, const godot_array *p_a) {
- Vector<int64_t> *dest = (Vector<int64_t> *)r_dest;
- Array *a = (Array *)p_a;
- memnew_placement(dest, Vector<int64_t>);
-
- dest->resize(a->size());
- for (int i = 0; i < a->size(); i++) {
- dest->set(i, (*a)[i]);
- }
-}
-
-const int64_t GDAPI *godot_packed_int64_array_ptr(const godot_packed_int64_array *p_self) {
- const Vector<int64_t> *self = (const Vector<int64_t> *)p_self;
- return self->ptr();
-}
-
-int64_t GDAPI *godot_packed_int64_array_ptrw(godot_packed_int64_array *p_self) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- return self->ptrw();
+ ((PackedInt32Array *)p_self)->~PackedInt32Array();
}
-void GDAPI godot_packed_int64_array_append(godot_packed_int64_array *p_self, const int64_t p_data) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- self->push_back(p_data);
+int32_t GDAPI *godot_packed_int32_array_operator_index(godot_packed_int32_array *p_self, godot_int p_index) {
+ PackedInt32Array *self = (PackedInt32Array *)p_self;
+ return (int32_t *)&self->operator[](p_index);
}
-void GDAPI godot_packed_int64_array_append_array(godot_packed_int64_array *p_self, const godot_packed_int64_array *p_array) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- Vector<int64_t> *array = (Vector<int64_t> *)p_array;
- self->append_array(*array);
+const int32_t GDAPI *godot_packed_int32_array_operator_index_const(const godot_packed_int32_array *p_self, godot_int p_index) {
+ const PackedInt32Array *self = (const PackedInt32Array *)p_self;
+ return (const int32_t *)&self->operator[](p_index);
}
-godot_error GDAPI godot_packed_int64_array_insert(godot_packed_int64_array *p_self, const godot_int p_idx, const int64_t p_data) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- return (godot_error)self->insert(p_idx, p_data);
-}
-
-godot_bool GDAPI godot_packed_int64_array_has(godot_packed_int64_array *p_self, const int64_t p_value) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- return (godot_bool)self->has(p_value);
-}
-
-void GDAPI godot_packed_int64_array_sort(godot_packed_int64_array *p_self) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- self->sort();
-}
-
-void GDAPI godot_packed_int64_array_invert(godot_packed_int64_array *p_self) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- self->invert();
-}
-
-void GDAPI godot_packed_int64_array_push_back(godot_packed_int64_array *p_self, const int64_t p_data) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- self->push_back(p_data);
-}
-
-void GDAPI godot_packed_int64_array_remove(godot_packed_int64_array *p_self, const godot_int p_idx) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- self->remove(p_idx);
-}
-
-void GDAPI godot_packed_int64_array_resize(godot_packed_int64_array *p_self, const godot_int p_size) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- self->resize(p_size);
-}
-
-void GDAPI godot_packed_int64_array_set(godot_packed_int64_array *p_self, const godot_int p_idx, const int64_t p_data) {
- Vector<int64_t> *self = (Vector<int64_t> *)p_self;
- self->set(p_idx, p_data);
-}
-
-int64_t GDAPI godot_packed_int64_array_get(const godot_packed_int64_array *p_self, const godot_int p_idx) {
- const Vector<int64_t> *self = (const Vector<int64_t> *)p_self;
- return self->get(p_idx);
-}
-
-godot_int GDAPI godot_packed_int64_array_size(const godot_packed_int64_array *p_self) {
- const Vector<int64_t> *self = (const Vector<int64_t> *)p_self;
- return self->size();
-}
+// int64
-godot_bool GDAPI godot_packed_int64_array_is_empty(const godot_packed_int64_array *p_self) {
- const Vector<int64_t> *self = (const Vector<int64_t> *)p_self;
- return self->is_empty();
+void GDAPI godot_packed_int64_array_new(godot_packed_int64_array *p_self) {
+ memnew_placement(p_self, PackedInt64Array);
}
void GDAPI godot_packed_int64_array_destroy(godot_packed_int64_array *p_self) {
- ((Vector<int64_t> *)p_self)->~Vector();
-}
-
-// float32
-
-void GDAPI godot_packed_float32_array_new(godot_packed_float32_array *r_dest) {
- Vector<float> *dest = (Vector<float> *)r_dest;
- memnew_placement(dest, Vector<float>);
-}
-
-void GDAPI godot_packed_float32_array_new_copy(godot_packed_float32_array *r_dest, const godot_packed_float32_array *p_src) {
- Vector<float> *dest = (Vector<float> *)r_dest;
- const Vector<float> *src = (const Vector<float> *)p_src;
- memnew_placement(dest, Vector<float>(*src));
-}
-
-void GDAPI godot_packed_float32_array_new_with_array(godot_packed_float32_array *r_dest, const godot_array *p_a) {
- Vector<float> *dest = (Vector<float> *)r_dest;
- Array *a = (Array *)p_a;
- memnew_placement(dest, Vector<float>);
-
- dest->resize(a->size());
- for (int i = 0; i < a->size(); i++) {
- dest->set(i, (*a)[i]);
- }
-}
-
-const float GDAPI *godot_packed_float32_array_ptr(const godot_packed_float32_array *p_self) {
- const Vector<float> *self = (const Vector<float> *)p_self;
- return self->ptr();
-}
-
-float GDAPI *godot_packed_float32_array_ptrw(godot_packed_float32_array *p_self) {
- Vector<float> *self = (Vector<float> *)p_self;
- return self->ptrw();
-}
-
-void GDAPI godot_packed_float32_array_append(godot_packed_float32_array *p_self, const float p_data) {
- Vector<float> *self = (Vector<float> *)p_self;
- self->push_back(p_data);
-}
-
-void GDAPI godot_packed_float32_array_append_array(godot_packed_float32_array *p_self, const godot_packed_float32_array *p_array) {
- Vector<float> *self = (Vector<float> *)p_self;
- Vector<float> *array = (Vector<float> *)p_array;
- self->append_array(*array);
-}
-
-godot_error GDAPI godot_packed_float32_array_insert(godot_packed_float32_array *p_self, const godot_int p_idx, const float p_data) {
- Vector<float> *self = (Vector<float> *)p_self;
- return (godot_error)self->insert(p_idx, p_data);
-}
-
-godot_bool GDAPI godot_packed_float32_array_has(godot_packed_float32_array *p_self, const float p_value) {
- Vector<float> *self = (Vector<float> *)p_self;
- return (godot_bool)self->has(p_value);
-}
-
-void GDAPI godot_packed_float32_array_sort(godot_packed_float32_array *p_self) {
- Vector<float> *self = (Vector<float> *)p_self;
- self->sort();
+ ((PackedInt64Array *)p_self)->~PackedInt64Array();
}
-void GDAPI godot_packed_float32_array_invert(godot_packed_float32_array *p_self) {
- Vector<float> *self = (Vector<float> *)p_self;
- self->invert();
+int64_t GDAPI *godot_packed_int64_array_operator_index(godot_packed_int64_array *p_self, godot_int p_index) {
+ PackedInt64Array *self = (PackedInt64Array *)p_self;
+ return (int64_t *)&self->operator[](p_index);
}
-void GDAPI godot_packed_float32_array_push_back(godot_packed_float32_array *p_self, const float p_data) {
- Vector<float> *self = (Vector<float> *)p_self;
- self->push_back(p_data);
+const int64_t GDAPI *godot_packed_int64_array_operator_index_const(const godot_packed_int64_array *p_self, godot_int p_index) {
+ const PackedInt64Array *self = (const PackedInt64Array *)p_self;
+ return (const int64_t *)&self->operator[](p_index);
}
-void GDAPI godot_packed_float32_array_remove(godot_packed_float32_array *p_self, const godot_int p_idx) {
- Vector<float> *self = (Vector<float> *)p_self;
- self->remove(p_idx);
-}
-
-void GDAPI godot_packed_float32_array_resize(godot_packed_float32_array *p_self, const godot_int p_size) {
- Vector<float> *self = (Vector<float> *)p_self;
- self->resize(p_size);
-}
-
-void GDAPI godot_packed_float32_array_set(godot_packed_float32_array *p_self, const godot_int p_idx, const float p_data) {
- Vector<float> *self = (Vector<float> *)p_self;
- self->set(p_idx, p_data);
-}
-
-float GDAPI godot_packed_float32_array_get(const godot_packed_float32_array *p_self, const godot_int p_idx) {
- const Vector<float> *self = (const Vector<float> *)p_self;
- return self->get(p_idx);
-}
-
-godot_int GDAPI godot_packed_float32_array_size(const godot_packed_float32_array *p_self) {
- const Vector<float> *self = (const Vector<float> *)p_self;
- return self->size();
-}
+// float32
-godot_bool GDAPI godot_packed_float32_array_is_empty(const godot_packed_float32_array *p_self) {
- const Vector<float> *self = (const Vector<float> *)p_self;
- return self->is_empty();
+void GDAPI godot_packed_float32_array_new(godot_packed_float32_array *p_self) {
+ memnew_placement(p_self, PackedFloat32Array);
}
void GDAPI godot_packed_float32_array_destroy(godot_packed_float32_array *p_self) {
- ((Vector<float> *)p_self)->~Vector();
-}
-
-// float64
-
-void GDAPI godot_packed_float64_array_new(godot_packed_float64_array *r_dest) {
- Vector<double> *dest = (Vector<double> *)r_dest;
- memnew_placement(dest, Vector<double>);
-}
-
-void GDAPI godot_packed_float64_array_new_copy(godot_packed_float64_array *r_dest, const godot_packed_float64_array *p_src) {
- Vector<double> *dest = (Vector<double> *)r_dest;
- const Vector<double> *src = (const Vector<double> *)p_src;
- memnew_placement(dest, Vector<double>(*src));
-}
-
-void GDAPI godot_packed_float64_array_new_with_array(godot_packed_float64_array *r_dest, const godot_array *p_a) {
- Vector<double> *dest = (Vector<double> *)r_dest;
- Array *a = (Array *)p_a;
- memnew_placement(dest, Vector<double>);
-
- dest->resize(a->size());
- for (int i = 0; i < a->size(); i++) {
- dest->set(i, (*a)[i]);
- }
-}
-
-const double GDAPI *godot_packed_float64_array_ptr(const godot_packed_float64_array *p_self) {
- const Vector<double> *self = (const Vector<double> *)p_self;
- return self->ptr();
+ ((PackedFloat32Array *)p_self)->~PackedFloat32Array();
}
-double GDAPI *godot_packed_float64_array_ptrw(godot_packed_float64_array *p_self) {
- Vector<double> *self = (Vector<double> *)p_self;
- return self->ptrw();
+float GDAPI *godot_packed_float32_array_operator_index(godot_packed_float32_array *p_self, godot_int p_index) {
+ PackedFloat32Array *self = (PackedFloat32Array *)p_self;
+ return (float *)&self->operator[](p_index);
}
-void GDAPI godot_packed_float64_array_append(godot_packed_float64_array *p_self, const double p_data) {
- Vector<double> *self = (Vector<double> *)p_self;
- self->push_back(p_data);
+const float GDAPI *godot_packed_float32_array_operator_index_const(const godot_packed_float32_array *p_self, godot_int p_index) {
+ const PackedFloat32Array *self = (const PackedFloat32Array *)p_self;
+ return (const float *)&self->operator[](p_index);
}
-void GDAPI godot_packed_float64_array_append_array(godot_packed_float64_array *p_self, const godot_packed_float64_array *p_array) {
- Vector<double> *self = (Vector<double> *)p_self;
- Vector<double> *array = (Vector<double> *)p_array;
- self->append_array(*array);
-}
-
-godot_error GDAPI godot_packed_float64_array_insert(godot_packed_float64_array *p_self, const godot_int p_idx, const double p_data) {
- Vector<double> *self = (Vector<double> *)p_self;
- return (godot_error)self->insert(p_idx, p_data);
-}
-
-godot_bool GDAPI godot_packed_float64_array_has(godot_packed_float64_array *p_self, const double p_value) {
- Vector<double> *self = (Vector<double> *)p_self;
- return (godot_bool)self->has(p_value);
-}
-
-void GDAPI godot_packed_float64_array_sort(godot_packed_float64_array *p_self) {
- Vector<double> *self = (Vector<double> *)p_self;
- self->sort();
-}
-
-void GDAPI godot_packed_float64_array_invert(godot_packed_float64_array *p_self) {
- Vector<double> *self = (Vector<double> *)p_self;
- self->invert();
-}
-
-void GDAPI godot_packed_float64_array_push_back(godot_packed_float64_array *p_self, const double p_data) {
- Vector<double> *self = (Vector<double> *)p_self;
- self->push_back(p_data);
-}
-
-void GDAPI godot_packed_float64_array_remove(godot_packed_float64_array *p_self, const godot_int p_idx) {
- Vector<double> *self = (Vector<double> *)p_self;
- self->remove(p_idx);
-}
-
-void GDAPI godot_packed_float64_array_resize(godot_packed_float64_array *p_self, const godot_int p_size) {
- Vector<double> *self = (Vector<double> *)p_self;
- self->resize(p_size);
-}
-
-void GDAPI godot_packed_float64_array_set(godot_packed_float64_array *p_self, const godot_int p_idx, const double p_data) {
- Vector<double> *self = (Vector<double> *)p_self;
- self->set(p_idx, p_data);
-}
-
-double GDAPI godot_packed_float64_array_get(const godot_packed_float64_array *p_self, const godot_int p_idx) {
- const Vector<double> *self = (const Vector<double> *)p_self;
- return self->get(p_idx);
-}
-
-godot_int GDAPI godot_packed_float64_array_size(const godot_packed_float64_array *p_self) {
- const Vector<double> *self = (const Vector<double> *)p_self;
- return self->size();
-}
+// float64
-godot_bool GDAPI godot_packed_float64_array_is_empty(const godot_packed_float64_array *p_self) {
- const Vector<double> *self = (const Vector<double> *)p_self;
- return self->is_empty();
+void GDAPI godot_packed_float64_array_new(godot_packed_float64_array *p_self) {
+ memnew_placement(p_self, PackedFloat64Array);
}
void GDAPI godot_packed_float64_array_destroy(godot_packed_float64_array *p_self) {
- ((Vector<double> *)p_self)->~Vector();
-}
-
-// string
-
-void GDAPI godot_packed_string_array_new(godot_packed_string_array *r_dest) {
- Vector<String> *dest = (Vector<String> *)r_dest;
- memnew_placement(dest, Vector<String>);
-}
-
-void GDAPI godot_packed_string_array_new_copy(godot_packed_string_array *r_dest, const godot_packed_string_array *p_src) {
- Vector<String> *dest = (Vector<String> *)r_dest;
- const Vector<String> *src = (const Vector<String> *)p_src;
- memnew_placement(dest, Vector<String>(*src));
-}
-
-void GDAPI godot_packed_string_array_new_with_array(godot_packed_string_array *r_dest, const godot_array *p_a) {
- Vector<String> *dest = (Vector<String> *)r_dest;
- Array *a = (Array *)p_a;
- memnew_placement(dest, Vector<String>);
-
- dest->resize(a->size());
- for (int i = 0; i < a->size(); i++) {
- dest->set(i, (*a)[i]);
- }
-}
-
-const godot_string GDAPI *godot_packed_string_array_ptr(const godot_packed_string_array *p_self) {
- const Vector<String> *self = (const Vector<String> *)p_self;
- return (const godot_string *)self->ptr();
-}
-
-godot_string GDAPI *godot_packed_string_array_ptrw(godot_packed_string_array *p_self) {
- Vector<String> *self = (Vector<String> *)p_self;
- return (godot_string *)self->ptrw();
-}
-
-void GDAPI godot_packed_string_array_append(godot_packed_string_array *p_self, const godot_string *p_data) {
- Vector<String> *self = (Vector<String> *)p_self;
- String &s = *(String *)p_data;
- self->push_back(s);
-}
-
-void GDAPI godot_packed_string_array_append_array(godot_packed_string_array *p_self, const godot_packed_string_array *p_array) {
- Vector<String> *self = (Vector<String> *)p_self;
- Vector<String> *array = (Vector<String> *)p_array;
- self->append_array(*array);
-}
-
-godot_error GDAPI godot_packed_string_array_insert(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data) {
- Vector<String> *self = (Vector<String> *)p_self;
- String &s = *(String *)p_data;
- return (godot_error)self->insert(p_idx, s);
-}
-
-godot_bool GDAPI godot_packed_string_array_has(godot_packed_string_array *p_self, const godot_string *p_value) {
- Vector<String> *self = (Vector<String> *)p_self;
- String &s = *(String *)p_value;
- return (godot_bool)self->has(s);
+ ((PackedFloat64Array *)p_self)->~PackedFloat64Array();
}
-void GDAPI godot_packed_string_array_sort(godot_packed_string_array *p_self) {
- Vector<String> *self = (Vector<String> *)p_self;
- self->sort();
+double GDAPI *godot_packed_float64_array_operator_index(godot_packed_float64_array *p_self, godot_int p_index) {
+ PackedFloat64Array *self = (PackedFloat64Array *)p_self;
+ return (double *)&self->operator[](p_index);
}
-void GDAPI godot_packed_string_array_invert(godot_packed_string_array *p_self) {
- Vector<String> *self = (Vector<String> *)p_self;
- self->invert();
+const double GDAPI *godot_packed_float64_array_operator_index_const(const godot_packed_float64_array *p_self, godot_int p_index) {
+ const PackedFloat64Array *self = (const PackedFloat64Array *)p_self;
+ return (const double *)&self->operator[](p_index);
}
-void GDAPI godot_packed_string_array_push_back(godot_packed_string_array *p_self, const godot_string *p_data) {
- Vector<String> *self = (Vector<String> *)p_self;
- String &s = *(String *)p_data;
- self->push_back(s);
-}
-
-void GDAPI godot_packed_string_array_remove(godot_packed_string_array *p_self, const godot_int p_idx) {
- Vector<String> *self = (Vector<String> *)p_self;
- self->remove(p_idx);
-}
-
-void GDAPI godot_packed_string_array_resize(godot_packed_string_array *p_self, const godot_int p_size) {
- Vector<String> *self = (Vector<String> *)p_self;
- self->resize(p_size);
-}
-
-void GDAPI godot_packed_string_array_set(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data) {
- Vector<String> *self = (Vector<String> *)p_self;
- String &s = *(String *)p_data;
- self->set(p_idx, s);
-}
-
-godot_string GDAPI godot_packed_string_array_get(const godot_packed_string_array *p_self, const godot_int p_idx) {
- const Vector<String> *self = (const Vector<String> *)p_self;
- godot_string str;
- String *s = (String *)&str;
- memnew_placement(s, String);
- *s = self->get(p_idx);
- return str;
-}
-
-godot_int GDAPI godot_packed_string_array_size(const godot_packed_string_array *p_self) {
- const Vector<String> *self = (const Vector<String> *)p_self;
- return self->size();
-}
+// string
-godot_bool GDAPI godot_packed_string_array_is_empty(const godot_packed_string_array *p_self) {
- const Vector<String> *self = (const Vector<String> *)p_self;
- return self->is_empty();
+void GDAPI godot_packed_string_array_new(godot_packed_string_array *p_self) {
+ memnew_placement(p_self, PackedStringArray);
}
void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self) {
- ((Vector<String> *)p_self)->~Vector();
-}
-
-// vector2
-
-void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *r_dest) {
- Vector<Vector2> *dest = (Vector<Vector2> *)r_dest;
- memnew_placement(dest, Vector<Vector2>);
-}
-
-void GDAPI godot_packed_vector2_array_new_copy(godot_packed_vector2_array *r_dest, const godot_packed_vector2_array *p_src) {
- Vector<Vector2> *dest = (Vector<Vector2> *)r_dest;
- const Vector<Vector2> *src = (const Vector<Vector2> *)p_src;
- memnew_placement(dest, Vector<Vector2>(*src));
-}
-
-void GDAPI godot_packed_vector2_array_new_with_array(godot_packed_vector2_array *r_dest, const godot_array *p_a) {
- Vector<Vector2> *dest = (Vector<Vector2> *)r_dest;
- Array *a = (Array *)p_a;
- memnew_placement(dest, Vector<Vector2>);
-
- dest->resize(a->size());
- for (int i = 0; i < a->size(); i++) {
- dest->set(i, (*a)[i]);
- }
+ ((PackedStringArray *)p_self)->~PackedStringArray();
}
-const godot_vector2 GDAPI *godot_packed_vector2_array_ptr(const godot_packed_vector2_array *p_self) {
- const Vector<Vector2> *self = (const Vector<Vector2> *)p_self;
- return (const godot_vector2 *)self->ptr();
+godot_string GDAPI *godot_packed_string_array_operator_index(godot_packed_string_array *p_self, godot_int p_index) {
+ PackedStringArray *self = (PackedStringArray *)p_self;
+ return (godot_string *)&self->operator[](p_index);
}
-godot_vector2 GDAPI *godot_packed_vector2_array_ptrw(godot_packed_vector2_array *p_self) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- return (godot_vector2 *)self->ptrw();
+const godot_string GDAPI *godot_packed_string_array_operator_index_const(const godot_packed_string_array *p_self, godot_int p_index) {
+ const PackedStringArray *self = (const PackedStringArray *)p_self;
+ return (const godot_string *)&self->operator[](p_index);
}
-void GDAPI godot_packed_vector2_array_append(godot_packed_vector2_array *p_self, const godot_vector2 *p_data) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- Vector2 &s = *(Vector2 *)p_data;
- self->push_back(s);
-}
-
-void GDAPI godot_packed_vector2_array_append_array(godot_packed_vector2_array *p_self, const godot_packed_vector2_array *p_array) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- Vector<Vector2> *array = (Vector<Vector2> *)p_array;
- self->append_array(*array);
-}
-
-godot_error GDAPI godot_packed_vector2_array_insert(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- Vector2 &s = *(Vector2 *)p_data;
- return (godot_error)self->insert(p_idx, s);
-}
-
-godot_bool GDAPI godot_packed_vector2_array_has(godot_packed_vector2_array *p_self, const godot_vector2 *p_value) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- Vector2 &v = *(Vector2 *)p_value;
- return (godot_bool)self->has(v);
-}
-
-void GDAPI godot_packed_vector2_array_sort(godot_packed_vector2_array *p_self) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- self->sort();
-}
-
-void GDAPI godot_packed_vector2_array_invert(godot_packed_vector2_array *p_self) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- self->invert();
-}
-
-void GDAPI godot_packed_vector2_array_push_back(godot_packed_vector2_array *p_self, const godot_vector2 *p_data) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- Vector2 &s = *(Vector2 *)p_data;
- self->push_back(s);
-}
-
-void GDAPI godot_packed_vector2_array_remove(godot_packed_vector2_array *p_self, const godot_int p_idx) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- self->remove(p_idx);
-}
-
-void GDAPI godot_packed_vector2_array_resize(godot_packed_vector2_array *p_self, const godot_int p_size) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- self->resize(p_size);
-}
-
-void GDAPI godot_packed_vector2_array_set(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data) {
- Vector<Vector2> *self = (Vector<Vector2> *)p_self;
- Vector2 &s = *(Vector2 *)p_data;
- self->set(p_idx, s);
-}
-
-godot_vector2 GDAPI godot_packed_vector2_array_get(const godot_packed_vector2_array *p_self, const godot_int p_idx) {
- const Vector<Vector2> *self = (const Vector<Vector2> *)p_self;
- godot_vector2 v;
- Vector2 *s = (Vector2 *)&v;
- *s = self->get(p_idx);
- return v;
-}
-
-godot_int GDAPI godot_packed_vector2_array_size(const godot_packed_vector2_array *p_self) {
- const Vector<Vector2> *self = (const Vector<Vector2> *)p_self;
- return self->size();
-}
+// vector2
-godot_bool GDAPI godot_packed_vector2_array_is_empty(const godot_packed_vector2_array *p_self) {
- const Vector<Vector2> *self = (const Vector<Vector2> *)p_self;
- return self->is_empty();
+void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *p_self) {
+ memnew_placement(p_self, PackedVector2Array);
}
void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self) {
- ((Vector<Vector2> *)p_self)->~Vector();
-}
-
-// vector2i
-
-void GDAPI godot_packed_vector2i_array_new(godot_packed_vector2i_array *r_dest) {
- Vector<Vector2i> *dest = (Vector<Vector2i> *)r_dest;
- memnew_placement(dest, Vector<Vector2i>);
-}
-
-void GDAPI godot_packed_vector2i_array_new_copy(godot_packed_vector2i_array *r_dest, const godot_packed_vector2i_array *p_src) {
- Vector<Vector2i> *dest = (Vector<Vector2i> *)r_dest;
- const Vector<Vector2i> *src = (const Vector<Vector2i> *)p_src;
- memnew_placement(dest, Vector<Vector2i>(*src));
-}
-
-void GDAPI godot_packed_vector2i_array_new_with_array(godot_packed_vector2i_array *r_dest, const godot_array *p_a) {
- Vector<Vector2i> *dest = (Vector<Vector2i> *)r_dest;
- Array *a = (Array *)p_a;
- memnew_placement(dest, Vector<Vector2i>);
-
- dest->resize(a->size());
- for (int i = 0; i < a->size(); i++) {
- dest->set(i, (*a)[i]);
- }
-}
-
-const godot_vector2i GDAPI *godot_packed_vector2i_array_ptr(const godot_packed_vector2i_array *p_self) {
- const Vector<Vector2i> *self = (const Vector<Vector2i> *)p_self;
- return (const godot_vector2i *)self->ptr();
-}
-
-godot_vector2i GDAPI *godot_packed_vector2i_array_ptrw(godot_packed_vector2i_array *p_self) {
- Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- return (godot_vector2i *)self->ptrw();
-}
-
-void GDAPI godot_packed_vector2i_array_append(godot_packed_vector2i_array *p_self, const godot_vector2i *p_data) {
- Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- Vector2i &s = *(Vector2i *)p_data;
- self->push_back(s);
+ ((PackedVector2Array *)p_self)->~PackedVector2Array();
}
-void GDAPI godot_packed_vector2i_array_append_array(godot_packed_vector2i_array *p_self, const godot_packed_vector2i_array *p_array) {
- Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- Vector<Vector2i> *array = (Vector<Vector2i> *)p_array;
- self->append_array(*array);
-}
-
-godot_error GDAPI godot_packed_vector2i_array_insert(godot_packed_vector2i_array *p_self, const godot_int p_idx, const godot_vector2i *p_data) {
- Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- Vector2i &s = *(Vector2i *)p_data;
- return (godot_error)self->insert(p_idx, s);
+godot_vector2 GDAPI *godot_packed_vector2_array_operator_index(godot_packed_vector2_array *p_self, godot_int p_index) {
+ PackedVector2Array *self = (PackedVector2Array *)p_self;
+ return (godot_vector2 *)&self->operator[](p_index);
}
-godot_bool GDAPI godot_packed_vector2i_array_has(godot_packed_vector2i_array *p_self, const godot_vector2i *p_value) {
- Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- Vector2i &v = *(Vector2i *)p_value;
- return (godot_bool)self->has(v);
-}
-
-void GDAPI godot_packed_vector2i_array_sort(godot_packed_vector2i_array *p_self) {
- Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- self->sort();
-}
-
-void GDAPI godot_packed_vector2i_array_invert(godot_packed_vector2i_array *p_self) {
- Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- self->invert();
+const godot_vector2 GDAPI *godot_packed_vector2_array_operator_index_const(const godot_packed_vector2_array *p_self, godot_int p_index) {
+ const PackedVector2Array *self = (const PackedVector2Array *)p_self;
+ return (const godot_vector2 *)&self->operator[](p_index);
}
-void GDAPI godot_packed_vector2i_array_push_back(godot_packed_vector2i_array *p_self, const godot_vector2i *p_data) {
- Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- Vector2i &s = *(Vector2i *)p_data;
- self->push_back(s);
-}
+// vector2i
-void GDAPI godot_packed_vector2i_array_remove(godot_packed_vector2i_array *p_self, const godot_int p_idx) {
- Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- self->remove(p_idx);
+void GDAPI godot_packed_vector2i_array_new(godot_packed_vector2i_array *p_self) {
+ memnew_placement(p_self, Vector<Vector2i>);
}
-void GDAPI godot_packed_vector2i_array_resize(godot_packed_vector2i_array *p_self, const godot_int p_size) {
- Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- self->resize(p_size);
+void GDAPI godot_packed_vector2i_array_destroy(godot_packed_vector2i_array *p_self) {
+ ((Vector<Vector2i> *)p_self)->~Vector();
}
-void GDAPI godot_packed_vector2i_array_set(godot_packed_vector2i_array *p_self, const godot_int p_idx, const godot_vector2i *p_data) {
+godot_vector2i GDAPI *godot_packed_vector2i_array_operator_index(godot_packed_vector2i_array *p_self, godot_int p_index) {
Vector<Vector2i> *self = (Vector<Vector2i> *)p_self;
- Vector2i &s = *(Vector2i *)p_data;
- self->set(p_idx, s);
+ return (godot_vector2i *)&self->operator[](p_index);
}
-godot_vector2i GDAPI godot_packed_vector2i_array_get(const godot_packed_vector2i_array *p_self, const godot_int p_idx) {
+const godot_vector2i GDAPI *godot_packed_vector2i_array_operator_index_const(const godot_packed_vector2i_array *p_self, godot_int p_index) {
const Vector<Vector2i> *self = (const Vector<Vector2i> *)p_self;
- godot_vector2i v;
- Vector2i *s = (Vector2i *)&v;
- *s = self->get(p_idx);
- return v;
-}
-
-godot_int GDAPI godot_packed_vector2i_array_size(const godot_packed_vector2i_array *p_self) {
- const Vector<Vector2i> *self = (const Vector<Vector2i> *)p_self;
- return self->size();
-}
-
-godot_bool GDAPI godot_packed_vector2i_array_is_empty(const godot_packed_vector2i_array *p_self) {
- const Vector<Vector2i> *self = (const Vector<Vector2i> *)p_self;
- return self->is_empty();
-}
-
-void GDAPI godot_packed_vector2i_array_destroy(godot_packed_vector2i_array *p_self) {
- ((Vector<Vector2i> *)p_self)->~Vector();
+ return (const godot_vector2i *)&self->operator[](p_index);
}
// vector3
-void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *r_dest) {
- Vector<Vector3> *dest = (Vector<Vector3> *)r_dest;
- memnew_placement(dest, Vector<Vector3>);
-}
-
-void GDAPI godot_packed_vector3_array_new_copy(godot_packed_vector3_array *r_dest, const godot_packed_vector3_array *p_src) {
- Vector<Vector3> *dest = (Vector<Vector3> *)r_dest;
- const Vector<Vector3> *src = (const Vector<Vector3> *)p_src;
- memnew_placement(dest, Vector<Vector3>(*src));
-}
-
-void GDAPI godot_packed_vector3_array_new_with_array(godot_packed_vector3_array *r_dest, const godot_array *p_a) {
- Vector<Vector3> *dest = (Vector<Vector3> *)r_dest;
- Array *a = (Array *)p_a;
- memnew_placement(dest, Vector<Vector3>);
-
- dest->resize(a->size());
- for (int i = 0; i < a->size(); i++) {
- dest->set(i, (*a)[i]);
- }
-}
-
-const godot_vector3 GDAPI *godot_packed_vector3_array_ptr(const godot_packed_vector3_array *p_self) {
- const Vector<Vector3> *self = (const Vector<Vector3> *)p_self;
- return (const godot_vector3 *)self->ptr();
-}
-
-godot_vector3 GDAPI *godot_packed_vector3_array_ptrw(godot_packed_vector3_array *p_self) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- return (godot_vector3 *)self->ptrw();
-}
-
-void GDAPI godot_packed_vector3_array_append(godot_packed_vector3_array *p_self, const godot_vector3 *p_data) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- Vector3 &s = *(Vector3 *)p_data;
- self->push_back(s);
-}
-
-void GDAPI godot_packed_vector3_array_append_array(godot_packed_vector3_array *p_self, const godot_packed_vector3_array *p_array) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- Vector<Vector3> *array = (Vector<Vector3> *)p_array;
- self->append_array(*array);
-}
-
-godot_error GDAPI godot_packed_vector3_array_insert(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- Vector3 &s = *(Vector3 *)p_data;
- return (godot_error)self->insert(p_idx, s);
-}
-
-godot_bool GDAPI godot_packed_vector3_array_has(godot_packed_vector3_array *p_self, const godot_vector3 *p_value) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- Vector3 &v = *(Vector3 *)p_value;
- return (godot_bool)self->has(v);
-}
-
-void GDAPI godot_packed_vector3_array_sort(godot_packed_vector3_array *p_self) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- self->sort();
-}
-
-void GDAPI godot_packed_vector3_array_invert(godot_packed_vector3_array *p_self) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- self->invert();
-}
-
-void GDAPI godot_packed_vector3_array_push_back(godot_packed_vector3_array *p_self, const godot_vector3 *p_data) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- Vector3 &s = *(Vector3 *)p_data;
- self->push_back(s);
-}
-
-void GDAPI godot_packed_vector3_array_remove(godot_packed_vector3_array *p_self, const godot_int p_idx) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- self->remove(p_idx);
-}
-
-void GDAPI godot_packed_vector3_array_resize(godot_packed_vector3_array *p_self, const godot_int p_size) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- self->resize(p_size);
-}
-
-void GDAPI godot_packed_vector3_array_set(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data) {
- Vector<Vector3> *self = (Vector<Vector3> *)p_self;
- Vector3 &s = *(Vector3 *)p_data;
- self->set(p_idx, s);
-}
-
-godot_vector3 GDAPI godot_packed_vector3_array_get(const godot_packed_vector3_array *p_self, const godot_int p_idx) {
- const Vector<Vector3> *self = (const Vector<Vector3> *)p_self;
- godot_vector3 v;
- Vector3 *s = (Vector3 *)&v;
- *s = self->get(p_idx);
- return v;
-}
-
-godot_int GDAPI godot_packed_vector3_array_size(const godot_packed_vector3_array *p_self) {
- const Vector<Vector3> *self = (const Vector<Vector3> *)p_self;
- return self->size();
-}
-
-godot_bool GDAPI godot_packed_vector3_array_is_empty(const godot_packed_vector3_array *p_self) {
- const Vector<Vector3> *self = (const Vector<Vector3> *)p_self;
- return self->is_empty();
+void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *p_self) {
+ memnew_placement(p_self, PackedVector3Array);
}
void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self) {
- ((Vector<Vector3> *)p_self)->~Vector();
-}
-
-// color
-
-void GDAPI godot_packed_color_array_new(godot_packed_color_array *r_dest) {
- Vector<Color> *dest = (Vector<Color> *)r_dest;
- memnew_placement(dest, Vector<Color>);
+ ((PackedVector3Array *)p_self)->~PackedVector3Array();
}
-void GDAPI godot_packed_color_array_new_copy(godot_packed_color_array *r_dest, const godot_packed_color_array *p_src) {
- Vector<Color> *dest = (Vector<Color> *)r_dest;
- const Vector<Color> *src = (const Vector<Color> *)p_src;
- memnew_placement(dest, Vector<Color>(*src));
-}
-
-void GDAPI godot_packed_color_array_new_with_array(godot_packed_color_array *r_dest, const godot_array *p_a) {
- Vector<Color> *dest = (Vector<Color> *)r_dest;
- Array *a = (Array *)p_a;
- memnew_placement(dest, Vector<Color>);
-
- dest->resize(a->size());
- for (int i = 0; i < a->size(); i++) {
- dest->set(i, (*a)[i]);
- }
+godot_vector3 GDAPI *godot_packed_vector3_array_operator_index(godot_packed_vector3_array *p_self, godot_int p_index) {
+ PackedVector3Array *self = (PackedVector3Array *)p_self;
+ return (godot_vector3 *)&self->operator[](p_index);
}
-const godot_color GDAPI *godot_packed_color_array_ptr(const godot_packed_color_array *p_self) {
- const Vector<Color> *self = (const Vector<Color> *)p_self;
- return (const godot_color *)self->ptr();
+const godot_vector3 GDAPI *godot_packed_vector3_array_operator_index_const(const godot_packed_vector3_array *p_self, godot_int p_index) {
+ const PackedVector3Array *self = (const PackedVector3Array *)p_self;
+ return (const godot_vector3 *)&self->operator[](p_index);
}
-godot_color GDAPI *godot_packed_color_array_ptrw(godot_packed_color_array *p_self) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- return (godot_color *)self->ptrw();
-}
-
-void GDAPI godot_packed_color_array_append(godot_packed_color_array *p_self, const godot_color *p_data) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- Color &s = *(Color *)p_data;
- self->push_back(s);
-}
-
-void GDAPI godot_packed_color_array_append_array(godot_packed_color_array *p_self, const godot_packed_color_array *p_array) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- Vector<Color> *array = (Vector<Color> *)p_array;
- self->append_array(*array);
-}
+// vector3i
-godot_error GDAPI godot_packed_color_array_insert(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- Color &s = *(Color *)p_data;
- return (godot_error)self->insert(p_idx, s);
+void GDAPI godot_packed_vector3i_array_new(godot_packed_vector3i_array *p_self) {
+ memnew_placement(p_self, Vector<Vector3i>);
}
-godot_bool GDAPI godot_packed_color_array_has(godot_packed_color_array *p_self, const godot_color *p_value) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- Color &c = *(Color *)p_value;
- return (godot_bool)self->has(c);
+void GDAPI godot_packed_vector3i_array_destroy(godot_packed_vector3i_array *p_self) {
+ ((Vector<Vector3i> *)p_self)->~Vector();
}
-void GDAPI godot_packed_color_array_sort(godot_packed_color_array *p_self) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- self->sort();
+godot_vector3i GDAPI *godot_packed_vector3i_array_operator_index(godot_packed_vector3i_array *p_self, godot_int p_index) {
+ Vector<Vector3i> *self = (Vector<Vector3i> *)p_self;
+ return (godot_vector3i *)&self->operator[](p_index);
}
-void GDAPI godot_packed_color_array_invert(godot_packed_color_array *p_self) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- self->invert();
+const godot_vector3i GDAPI *godot_packed_vector3i_array_operator_index_const(const godot_packed_vector3i_array *p_self, godot_int p_index) {
+ const Vector<Vector3i> *self = (const Vector<Vector3i> *)p_self;
+ return (const godot_vector3i *)&self->operator[](p_index);
}
-void GDAPI godot_packed_color_array_push_back(godot_packed_color_array *p_self, const godot_color *p_data) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- Color &s = *(Color *)p_data;
- self->push_back(s);
-}
-
-void GDAPI godot_packed_color_array_remove(godot_packed_color_array *p_self, const godot_int p_idx) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- self->remove(p_idx);
-}
-
-void GDAPI godot_packed_color_array_resize(godot_packed_color_array *p_self, const godot_int p_size) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- self->resize(p_size);
-}
-
-void GDAPI godot_packed_color_array_set(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data) {
- Vector<Color> *self = (Vector<Color> *)p_self;
- Color &s = *(Color *)p_data;
- self->set(p_idx, s);
-}
+// color
-godot_color GDAPI godot_packed_color_array_get(const godot_packed_color_array *p_self, const godot_int p_idx) {
- const Vector<Color> *self = (const Vector<Color> *)p_self;
- godot_color v;
- Color *s = (Color *)&v;
- *s = self->get(p_idx);
- return v;
+void GDAPI godot_packed_color_array_new(godot_packed_color_array *p_self) {
+ memnew_placement(p_self, PackedColorArray);
}
-godot_int GDAPI godot_packed_color_array_size(const godot_packed_color_array *p_self) {
- const Vector<Color> *self = (const Vector<Color> *)p_self;
- return self->size();
+void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self) {
+ ((PackedColorArray *)p_self)->~PackedColorArray();
}
-godot_bool GDAPI godot_packed_color_array_is_empty(const godot_packed_color_array *p_self) {
- const Vector<Color> *self = (const Vector<Color> *)p_self;
- return self->is_empty();
+godot_color GDAPI *godot_packed_color_array_operator_index(godot_packed_color_array *p_self, godot_int p_index) {
+ PackedColorArray *self = (PackedColorArray *)p_self;
+ return (godot_color *)&self->operator[](p_index);
}
-void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self) {
- ((Vector<Color> *)p_self)->~Vector();
+const godot_color GDAPI *godot_packed_color_array_operator_index_const(const godot_packed_color_array *p_self, godot_int p_index) {
+ const PackedColorArray *self = (const PackedColorArray *)p_self;
+ return (const godot_color *)&self->operator[](p_index);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/plane.cpp b/modules/gdnative/gdnative/plane.cpp
index 32a90d08fa..61d5e09fad 100644
--- a/modules/gdnative/gdnative/plane.cpp
+++ b/modules/gdnative/gdnative/plane.cpp
@@ -31,139 +31,15 @@
#include "gdnative/plane.h"
#include "core/math/plane.h"
-#include "core/variant/variant.h"
+
+static_assert(sizeof(godot_plane) == sizeof(Plane), "Plane size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_plane) == sizeof(Plane), "Plane size mismatch");
-
-void GDAPI godot_plane_new_with_reals(godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d) {
- Plane *dest = (Plane *)r_dest;
- *dest = Plane(p_a, p_b, p_c, p_d);
-}
-
-void GDAPI godot_plane_new_with_vectors(godot_plane *r_dest, const godot_vector3 *p_v1, const godot_vector3 *p_v2, const godot_vector3 *p_v3) {
- const Vector3 *v1 = (const Vector3 *)p_v1;
- const Vector3 *v2 = (const Vector3 *)p_v2;
- const Vector3 *v3 = (const Vector3 *)p_v3;
- Plane *dest = (Plane *)r_dest;
- *dest = Plane(*v1, *v2, *v3);
-}
-
-void GDAPI godot_plane_new_with_normal(godot_plane *r_dest, const godot_vector3 *p_normal, const godot_real p_d) {
- const Vector3 *normal = (const Vector3 *)p_normal;
- Plane *dest = (Plane *)r_dest;
- *dest = Plane(*normal, p_d);
-}
-
-godot_string GDAPI godot_plane_as_string(const godot_plane *p_self) {
- godot_string ret;
- const Plane *self = (const Plane *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_plane GDAPI godot_plane_normalized(const godot_plane *p_self) {
- godot_plane dest;
- const Plane *self = (const Plane *)p_self;
- *((Plane *)&dest) = self->normalized();
- return dest;
-}
-
-godot_vector3 GDAPI godot_plane_center(const godot_plane *p_self) {
- godot_vector3 dest;
- const Plane *self = (const Plane *)p_self;
- *((Vector3 *)&dest) = self->center();
- return dest;
-}
-
-godot_bool GDAPI godot_plane_is_point_over(const godot_plane *p_self, const godot_vector3 *p_point) {
- const Plane *self = (const Plane *)p_self;
- const Vector3 *point = (const Vector3 *)p_point;
- return self->is_point_over(*point);
-}
-
-godot_real GDAPI godot_plane_distance_to(const godot_plane *p_self, const godot_vector3 *p_point) {
- const Plane *self = (const Plane *)p_self;
- const Vector3 *point = (const Vector3 *)p_point;
- return self->distance_to(*point);
-}
-
-godot_bool GDAPI godot_plane_has_point(const godot_plane *p_self, const godot_vector3 *p_point, const godot_real p_epsilon) {
- const Plane *self = (const Plane *)p_self;
- const Vector3 *point = (const Vector3 *)p_point;
- return self->has_point(*point, p_epsilon);
-}
-
-godot_vector3 GDAPI godot_plane_project(const godot_plane *p_self, const godot_vector3 *p_point) {
- godot_vector3 dest;
- const Plane *self = (const Plane *)p_self;
- const Vector3 *point = (const Vector3 *)p_point;
- *((Vector3 *)&dest) = self->project(*point);
- return dest;
-}
-
-godot_bool GDAPI godot_plane_intersect_3(const godot_plane *p_self, godot_vector3 *r_dest, const godot_plane *p_b, const godot_plane *p_c) {
- const Plane *self = (const Plane *)p_self;
- const Plane *b = (const Plane *)p_b;
- const Plane *c = (const Plane *)p_c;
- Vector3 *dest = (Vector3 *)r_dest;
- return self->intersect_3(*b, *c, dest);
-}
-
-godot_bool GDAPI godot_plane_intersects_ray(const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_from, const godot_vector3 *p_dir) {
- const Plane *self = (const Plane *)p_self;
- const Vector3 *from = (const Vector3 *)p_from;
- const Vector3 *dir = (const Vector3 *)p_dir;
- Vector3 *dest = (Vector3 *)r_dest;
- return self->intersects_ray(*from, *dir, dest);
-}
-
-godot_bool GDAPI godot_plane_intersects_segment(const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_begin, const godot_vector3 *p_end) {
- const Plane *self = (const Plane *)p_self;
- const Vector3 *begin = (const Vector3 *)p_begin;
- const Vector3 *end = (const Vector3 *)p_end;
- Vector3 *dest = (Vector3 *)r_dest;
- return self->intersects_segment(*begin, *end, dest);
-}
-
-godot_plane GDAPI godot_plane_operator_neg(const godot_plane *p_self) {
- godot_plane raw_dest;
- Plane *dest = (Plane *)&raw_dest;
- const Plane *self = (const Plane *)p_self;
- *dest = -(*self);
- return raw_dest;
-}
-
-godot_bool GDAPI godot_plane_operator_equal(const godot_plane *p_self, const godot_plane *p_b) {
- const Plane *self = (const Plane *)p_self;
- const Plane *b = (const Plane *)p_b;
- return *self == *b;
-}
-
-void GDAPI godot_plane_set_normal(godot_plane *p_self, const godot_vector3 *p_normal) {
- Plane *self = (Plane *)p_self;
- const Vector3 *normal = (const Vector3 *)p_normal;
- self->set_normal(*normal);
-}
-
-godot_vector3 GDAPI godot_plane_get_normal(const godot_plane *p_self) {
- const Plane *self = (const Plane *)p_self;
- const Vector3 normal = self->get_normal();
- godot_vector3 *v3 = (godot_vector3 *)&normal;
- return *v3;
-}
-
-godot_real GDAPI godot_plane_get_d(const godot_plane *p_self) {
- const Plane *self = (const Plane *)p_self;
- return self->d;
-}
-
-void GDAPI godot_plane_set_d(godot_plane *p_self, const godot_real p_d) {
- Plane *self = (Plane *)p_self;
- self->d = p_d;
+void GDAPI godot_plane_new(godot_plane *p_self) {
+ memnew_placement(p_self, Plane);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/quat.cpp b/modules/gdnative/gdnative/quat.cpp
index 29edad6636..836d6390d6 100644
--- a/modules/gdnative/gdnative/quat.cpp
+++ b/modules/gdnative/gdnative/quat.cpp
@@ -31,205 +31,25 @@
#include "gdnative/quat.h"
#include "core/math/quat.h"
-#include "core/variant/variant.h"
+
+static_assert(sizeof(godot_quat) == sizeof(Quat), "Quat size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_quat) == sizeof(Quat), "Quat size mismatch");
-
-void GDAPI godot_quat_new(godot_quat *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z, const godot_real p_w) {
- Quat *dest = (Quat *)r_dest;
- *dest = Quat(p_x, p_y, p_z, p_w);
-}
-
-void GDAPI godot_quat_new_with_axis_angle(godot_quat *r_dest, const godot_vector3 *p_axis, const godot_real p_angle) {
- const Vector3 *axis = (const Vector3 *)p_axis;
- Quat *dest = (Quat *)r_dest;
- *dest = Quat(*axis, p_angle);
+void GDAPI godot_quat_new(godot_quat *p_self) {
+ memnew_placement(p_self, Quat);
}
-void GDAPI godot_quat_new_with_basis(godot_quat *r_dest, const godot_basis *p_basis) {
- const Basis *basis = (const Basis *)p_basis;
- Quat *dest = (Quat *)r_dest;
- *dest = Quat(*basis);
-}
-
-void GDAPI godot_quat_new_with_euler(godot_quat *r_dest, const godot_vector3 *p_euler) {
- const Vector3 *euler = (const Vector3 *)p_euler;
- Quat *dest = (Quat *)r_dest;
- *dest = Quat(*euler);
-}
-
-godot_real GDAPI godot_quat_get_x(const godot_quat *p_self) {
- const Quat *self = (const Quat *)p_self;
- return self->x;
-}
-
-void GDAPI godot_quat_set_x(godot_quat *p_self, const godot_real val) {
- Quat *self = (Quat *)p_self;
- self->x = val;
-}
-
-godot_real GDAPI godot_quat_get_y(const godot_quat *p_self) {
- const Quat *self = (const Quat *)p_self;
- return self->y;
-}
-
-void GDAPI godot_quat_set_y(godot_quat *p_self, const godot_real val) {
+godot_real_t GDAPI *godot_quat_operator_index(godot_quat *p_self, godot_int p_index) {
Quat *self = (Quat *)p_self;
- self->y = val;
-}
-
-godot_real GDAPI godot_quat_get_z(const godot_quat *p_self) {
- const Quat *self = (const Quat *)p_self;
- return self->z;
-}
-
-void GDAPI godot_quat_set_z(godot_quat *p_self, const godot_real val) {
- Quat *self = (Quat *)p_self;
- self->z = val;
-}
-
-godot_real GDAPI godot_quat_get_w(const godot_quat *p_self) {
- const Quat *self = (const Quat *)p_self;
- return self->w;
-}
-
-void GDAPI godot_quat_set_w(godot_quat *p_self, const godot_real val) {
- Quat *self = (Quat *)p_self;
- self->w = val;
-}
-
-godot_string GDAPI godot_quat_as_string(const godot_quat *p_self) {
- godot_string ret;
- const Quat *self = (const Quat *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_real GDAPI godot_quat_length(const godot_quat *p_self) {
- const Quat *self = (const Quat *)p_self;
- return self->length();
-}
-
-godot_real GDAPI godot_quat_length_squared(const godot_quat *p_self) {
- const Quat *self = (const Quat *)p_self;
- return self->length_squared();
-}
-
-godot_quat GDAPI godot_quat_normalized(const godot_quat *p_self) {
- godot_quat dest;
- const Quat *self = (const Quat *)p_self;
- *((Quat *)&dest) = self->normalized();
- return dest;
-}
-
-godot_bool GDAPI godot_quat_is_normalized(const godot_quat *p_self) {
- const Quat *self = (const Quat *)p_self;
- return self->is_normalized();
-}
-
-godot_quat GDAPI godot_quat_inverse(const godot_quat *p_self) {
- godot_quat dest;
- const Quat *self = (const Quat *)p_self;
- *((Quat *)&dest) = self->inverse();
- return dest;
-}
-
-godot_real GDAPI godot_quat_dot(const godot_quat *p_self, const godot_quat *p_b) {
- const Quat *self = (const Quat *)p_self;
- const Quat *b = (const Quat *)p_b;
- return self->dot(*b);
+ return (godot_real_t *)&self->operator[](p_index);
}
-godot_vector3 GDAPI godot_quat_xform(const godot_quat *p_self, const godot_vector3 *p_v) {
- godot_vector3 dest;
+const godot_real_t GDAPI *godot_quat_operator_index_const(const godot_quat *p_self, godot_int p_index) {
const Quat *self = (const Quat *)p_self;
- const Vector3 *v = (const Vector3 *)p_v;
- *((Vector3 *)&dest) = self->xform(*v);
- return dest;
-}
-
-godot_quat GDAPI godot_quat_slerp(const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t) {
- godot_quat dest;
- const Quat *self = (const Quat *)p_self;
- const Quat *b = (const Quat *)p_b;
- *((Quat *)&dest) = self->slerp(*b, p_t);
- return dest;
-}
-
-godot_quat GDAPI godot_quat_slerpni(const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t) {
- godot_quat dest;
- const Quat *self = (const Quat *)p_self;
- const Quat *b = (const Quat *)p_b;
- *((Quat *)&dest) = self->slerpni(*b, p_t);
- return dest;
-}
-
-godot_quat GDAPI godot_quat_cubic_slerp(const godot_quat *p_self, const godot_quat *p_b, const godot_quat *p_pre_a, const godot_quat *p_post_b, const godot_real p_t) {
- godot_quat dest;
- const Quat *self = (const Quat *)p_self;
- const Quat *b = (const Quat *)p_b;
- const Quat *pre_a = (const Quat *)p_pre_a;
- const Quat *post_b = (const Quat *)p_post_b;
- *((Quat *)&dest) = self->cubic_slerp(*b, *pre_a, *post_b, p_t);
- return dest;
-}
-
-godot_quat GDAPI godot_quat_operator_multiply(const godot_quat *p_self, const godot_real p_b) {
- godot_quat raw_dest;
- Quat *dest = (Quat *)&raw_dest;
- const Quat *self = (const Quat *)p_self;
- *dest = *self * p_b;
- return raw_dest;
-}
-
-godot_quat GDAPI godot_quat_operator_add(const godot_quat *p_self, const godot_quat *p_b) {
- godot_quat raw_dest;
- Quat *dest = (Quat *)&raw_dest;
- const Quat *self = (const Quat *)p_self;
- const Quat *b = (const Quat *)p_b;
- *dest = *self + *b;
- return raw_dest;
-}
-
-godot_quat GDAPI godot_quat_operator_subtract(const godot_quat *p_self, const godot_quat *p_b) {
- godot_quat raw_dest;
- Quat *dest = (Quat *)&raw_dest;
- const Quat *self = (const Quat *)p_self;
- const Quat *b = (const Quat *)p_b;
- *dest = *self - *b;
- return raw_dest;
-}
-
-godot_quat GDAPI godot_quat_operator_divide(const godot_quat *p_self, const godot_real p_b) {
- godot_quat raw_dest;
- Quat *dest = (Quat *)&raw_dest;
- const Quat *self = (const Quat *)p_self;
- *dest = *self / p_b;
- return raw_dest;
-}
-
-godot_bool GDAPI godot_quat_operator_equal(const godot_quat *p_self, const godot_quat *p_b) {
- const Quat *self = (const Quat *)p_self;
- const Quat *b = (const Quat *)p_b;
- return *self == *b;
-}
-
-godot_quat GDAPI godot_quat_operator_neg(const godot_quat *p_self) {
- godot_quat raw_dest;
- Quat *dest = (Quat *)&raw_dest;
- const Quat *self = (const Quat *)p_self;
- *dest = -(*self);
- return raw_dest;
-}
-
-void GDAPI godot_quat_set_axis_angle(godot_quat *p_self, const godot_vector3 *p_axis, const godot_real p_angle) {
- Quat *self = (Quat *)p_self;
- const Vector3 *axis = (const Vector3 *)p_axis;
- self->set_axis_angle(*axis, p_angle);
+ return (const godot_real_t *)&self->operator[](p_index);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/rect2.cpp b/modules/gdnative/gdnative/rect2.cpp
index 40e8e64ca1..086592ec22 100644
--- a/modules/gdnative/gdnative/rect2.cpp
+++ b/modules/gdnative/gdnative/rect2.cpp
@@ -30,300 +30,21 @@
#include "gdnative/rect2.h"
-#include "core/math/transform_2d.h"
-#include "core/variant/variant.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include "core/math/rect2.h"
static_assert(sizeof(godot_rect2) == sizeof(Rect2), "Rect2 size mismatch");
static_assert(sizeof(godot_rect2i) == sizeof(Rect2i), "Rect2i size mismatch");
-// Rect2
-
-void GDAPI godot_rect2_new_with_position_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size) {
- const Vector2 *position = (const Vector2 *)p_pos;
- const Vector2 *size = (const Vector2 *)p_size;
- Rect2 *dest = (Rect2 *)r_dest;
- *dest = Rect2(*position, *size);
-}
-
-void GDAPI godot_rect2_new(godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height) {
- Rect2 *dest = (Rect2 *)r_dest;
- *dest = Rect2(p_x, p_y, p_width, p_height);
-}
-
-godot_string GDAPI godot_rect2_as_string(const godot_rect2 *p_self) {
- godot_string ret;
- const Rect2 *self = (const Rect2 *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_rect2i GDAPI godot_rect2_as_rect2i(const godot_rect2 *p_self) {
- godot_rect2i dest;
- const Rect2 *self = (const Rect2 *)p_self;
- *((Rect2i *)&dest) = Rect2i(*self);
- return dest;
-}
-
-godot_real GDAPI godot_rect2_get_area(const godot_rect2 *p_self) {
- const Rect2 *self = (const Rect2 *)p_self;
- return self->get_area();
-}
-
-godot_bool GDAPI godot_rect2_intersects(const godot_rect2 *p_self, const godot_rect2 *p_b) {
- const Rect2 *self = (const Rect2 *)p_self;
- const Rect2 *b = (const Rect2 *)p_b;
- return self->intersects(*b);
-}
-
-godot_bool GDAPI godot_rect2_encloses(const godot_rect2 *p_self, const godot_rect2 *p_b) {
- const Rect2 *self = (const Rect2 *)p_self;
- const Rect2 *b = (const Rect2 *)p_b;
- return self->encloses(*b);
-}
-
-godot_bool GDAPI godot_rect2_has_no_area(const godot_rect2 *p_self) {
- const Rect2 *self = (const Rect2 *)p_self;
- return self->has_no_area();
-}
-
-godot_rect2 GDAPI godot_rect2_intersection(const godot_rect2 *p_self, const godot_rect2 *p_b) {
- godot_rect2 dest;
- const Rect2 *self = (const Rect2 *)p_self;
- const Rect2 *b = (const Rect2 *)p_b;
- *((Rect2 *)&dest) = self->intersection(*b);
- return dest;
-}
-
-godot_rect2 GDAPI godot_rect2_merge(const godot_rect2 *p_self, const godot_rect2 *p_b) {
- godot_rect2 dest;
- const Rect2 *self = (const Rect2 *)p_self;
- const Rect2 *b = (const Rect2 *)p_b;
- *((Rect2 *)&dest) = self->merge(*b);
- return dest;
-}
-
-godot_bool GDAPI godot_rect2_has_point(const godot_rect2 *p_self, const godot_vector2 *p_point) {
- const Rect2 *self = (const Rect2 *)p_self;
- const Vector2 *point = (const Vector2 *)p_point;
- return self->has_point(*point);
-}
-
-godot_rect2 GDAPI godot_rect2_grow(const godot_rect2 *p_self, const godot_real p_by) {
- godot_rect2 dest;
- const Rect2 *self = (const Rect2 *)p_self;
-
- *((Rect2 *)&dest) = self->grow(p_by);
- return dest;
-}
-
-godot_rect2 GDAPI godot_rect2_grow_individual(const godot_rect2 *p_self, const godot_real p_left, const godot_real p_top, const godot_real p_right, const godot_real p_bottom) {
- godot_rect2 dest;
- const Rect2 *self = (const Rect2 *)p_self;
- *((Rect2 *)&dest) = self->grow_individual(p_left, p_top, p_right, p_bottom);
- return dest;
-}
-
-godot_rect2 GDAPI godot_rect2_grow_side(const godot_rect2 *p_self, const godot_int p_side, const godot_real p_by) {
- godot_rect2 dest;
- const Rect2 *self = (const Rect2 *)p_self;
- *((Rect2 *)&dest) = self->grow_side((Side)p_side, p_by);
- return dest;
-}
-
-godot_rect2 GDAPI godot_rect2_abs(const godot_rect2 *p_self) {
- godot_rect2 dest;
- const Rect2 *self = (const Rect2 *)p_self;
- *((Rect2 *)&dest) = self->abs();
- return dest;
-}
-
-godot_rect2 GDAPI godot_rect2_expand(const godot_rect2 *p_self, const godot_vector2 *p_to) {
- godot_rect2 dest;
- const Rect2 *self = (const Rect2 *)p_self;
- const Vector2 *to = (const Vector2 *)p_to;
- *((Rect2 *)&dest) = self->expand(*to);
- return dest;
-}
-
-godot_bool GDAPI godot_rect2_operator_equal(const godot_rect2 *p_self, const godot_rect2 *p_b) {
- const Rect2 *self = (const Rect2 *)p_self;
- const Rect2 *b = (const Rect2 *)p_b;
- return *self == *b;
-}
-
-godot_vector2 GDAPI godot_rect2_get_position(const godot_rect2 *p_self) {
- godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Rect2 *self = (const Rect2 *)p_self;
- *d = self->get_position();
- return dest;
-}
-
-godot_vector2 GDAPI godot_rect2_get_size(const godot_rect2 *p_self) {
- godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Rect2 *self = (const Rect2 *)p_self;
- *d = self->get_size();
- return dest;
-}
-
-void GDAPI godot_rect2_set_position(godot_rect2 *p_self, const godot_vector2 *p_pos) {
- Rect2 *self = (Rect2 *)p_self;
- const Vector2 *position = (const Vector2 *)p_pos;
- self->set_position(*position);
-}
-
-void GDAPI godot_rect2_set_size(godot_rect2 *p_self, const godot_vector2 *p_size) {
- Rect2 *self = (Rect2 *)p_self;
- const Vector2 *size = (const Vector2 *)p_size;
- self->set_size(*size);
-}
-
-// Rect2i
-
-void GDAPI godot_rect2i_new_with_position_and_size(godot_rect2i *r_dest, const godot_vector2i *p_pos, const godot_vector2i *p_size) {
- const Vector2i *position = (const Vector2i *)p_pos;
- const Vector2i *size = (const Vector2i *)p_size;
- Rect2i *dest = (Rect2i *)r_dest;
- *dest = Rect2i(*position, *size);
-}
-
-void GDAPI godot_rect2i_new(godot_rect2i *r_dest, const godot_int p_x, const godot_int p_y, const godot_int p_width, const godot_int p_height) {
- Rect2i *dest = (Rect2i *)r_dest;
- *dest = Rect2i(p_x, p_y, p_width, p_height);
-}
-
-godot_string GDAPI godot_rect2i_as_string(const godot_rect2i *p_self) {
- godot_string ret;
- const Rect2i *self = (const Rect2i *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_rect2 GDAPI godot_rect2i_as_rect2(const godot_rect2i *p_self) {
- godot_rect2 dest;
- const Rect2i *self = (const Rect2i *)p_self;
- *((Rect2 *)&dest) = Rect2(*self);
- return dest;
-}
-
-godot_int GDAPI godot_rect2i_get_area(const godot_rect2i *p_self) {
- const Rect2i *self = (const Rect2i *)p_self;
- return self->get_area();
-}
-
-godot_bool GDAPI godot_rect2i_intersects(const godot_rect2i *p_self, const godot_rect2i *p_b) {
- const Rect2i *self = (const Rect2i *)p_self;
- const Rect2i *b = (const Rect2i *)p_b;
- return self->intersects(*b);
-}
-
-godot_bool GDAPI godot_rect2i_encloses(const godot_rect2i *p_self, const godot_rect2i *p_b) {
- const Rect2i *self = (const Rect2i *)p_self;
- const Rect2i *b = (const Rect2i *)p_b;
- return self->encloses(*b);
-}
-
-godot_bool GDAPI godot_rect2i_has_no_area(const godot_rect2i *p_self) {
- const Rect2i *self = (const Rect2i *)p_self;
- return self->has_no_area();
-}
-
-godot_rect2i GDAPI godot_rect2i_intersection(const godot_rect2i *p_self, const godot_rect2i *p_b) {
- godot_rect2i dest;
- const Rect2i *self = (const Rect2i *)p_self;
- const Rect2i *b = (const Rect2i *)p_b;
- *((Rect2i *)&dest) = self->intersection(*b);
- return dest;
-}
-
-godot_rect2i GDAPI godot_rect2i_merge(const godot_rect2i *p_self, const godot_rect2i *p_b) {
- godot_rect2i dest;
- const Rect2i *self = (const Rect2i *)p_self;
- const Rect2i *b = (const Rect2i *)p_b;
- *((Rect2i *)&dest) = self->merge(*b);
- return dest;
-}
-
-godot_bool GDAPI godot_rect2i_has_point(const godot_rect2i *p_self, const godot_vector2i *p_point) {
- const Rect2i *self = (const Rect2i *)p_self;
- const Vector2i *point = (const Vector2i *)p_point;
- return self->has_point(*point);
-}
-
-godot_rect2i GDAPI godot_rect2i_grow(const godot_rect2i *p_self, const godot_int p_by) {
- godot_rect2i dest;
- const Rect2i *self = (const Rect2i *)p_self;
-
- *((Rect2i *)&dest) = self->grow(p_by);
- return dest;
-}
-
-godot_rect2i GDAPI godot_rect2i_grow_individual(const godot_rect2i *p_self, const godot_int p_left, const godot_int p_top, const godot_int p_right, const godot_int p_bottom) {
- godot_rect2i dest;
- const Rect2i *self = (const Rect2i *)p_self;
- *((Rect2i *)&dest) = self->grow_individual(p_left, p_top, p_right, p_bottom);
- return dest;
-}
-
-godot_rect2i GDAPI godot_rect2i_grow_side(const godot_rect2i *p_self, const godot_int p_side, const godot_int p_by) {
- godot_rect2i dest;
- const Rect2i *self = (const Rect2i *)p_self;
- *((Rect2i *)&dest) = self->grow_side((Side)p_side, p_by);
- return dest;
-}
-
-godot_rect2i GDAPI godot_rect2i_abs(const godot_rect2i *p_self) {
- godot_rect2i dest;
- const Rect2i *self = (const Rect2i *)p_self;
- *((Rect2i *)&dest) = self->abs();
- return dest;
-}
-
-godot_rect2i GDAPI godot_rect2i_expand(const godot_rect2i *p_self, const godot_vector2i *p_to) {
- godot_rect2i dest;
- const Rect2i *self = (const Rect2i *)p_self;
- const Vector2i *to = (const Vector2i *)p_to;
- *((Rect2i *)&dest) = self->expand(*to);
- return dest;
-}
-
-godot_bool GDAPI godot_rect2i_operator_equal(const godot_rect2i *p_self, const godot_rect2i *p_b) {
- const Rect2i *self = (const Rect2i *)p_self;
- const Rect2i *b = (const Rect2i *)p_b;
- return *self == *b;
-}
-
-godot_vector2i GDAPI godot_rect2i_get_position(const godot_rect2i *p_self) {
- godot_vector2i dest;
- Vector2i *d = (Vector2i *)&dest;
- const Rect2i *self = (const Rect2i *)p_self;
- *d = self->get_position();
- return dest;
-}
-
-godot_vector2i GDAPI godot_rect2i_get_size(const godot_rect2i *p_self) {
- godot_vector2i dest;
- Vector2i *d = (Vector2i *)&dest;
- const Rect2i *self = (const Rect2i *)p_self;
- *d = self->get_size();
- return dest;
-}
+#ifdef __cplusplus
+extern "C" {
+#endif
-void GDAPI godot_rect2i_set_position(godot_rect2i *p_self, const godot_vector2i *p_pos) {
- Rect2i *self = (Rect2i *)p_self;
- const Vector2i *position = (const Vector2i *)p_pos;
- self->set_position(*position);
+void GDAPI godot_rect2_new(godot_rect2 *p_self) {
+ memnew_placement(p_self, Rect2);
}
-void GDAPI godot_rect2i_set_size(godot_rect2i *p_self, const godot_vector2i *p_size) {
- Rect2i *self = (Rect2i *)p_self;
- const Vector2i *size = (const Vector2i *)p_size;
- self->set_size(*size);
+void GDAPI godot_rect2i_new(godot_rect2i *p_self) {
+ memnew_placement(p_self, Rect2i);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/rid.cpp b/modules/gdnative/gdnative/rid.cpp
index 33685ef51f..5cab9a21ed 100644
--- a/modules/gdnative/gdnative/rid.cpp
+++ b/modules/gdnative/gdnative/rid.cpp
@@ -30,45 +30,17 @@
#include "gdnative/rid.h"
-#include "core/io/resource.h"
+#include "core/os/memory.h"
#include "core/templates/rid.h"
-#include "core/variant/variant.h"
+
+static_assert(sizeof(godot_rid) == sizeof(RID), "RID size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_rid) == sizeof(RID), "RID size mismatch");
-
-void GDAPI godot_rid_new(godot_rid *r_dest) {
- RID *dest = (RID *)r_dest;
- memnew_placement(dest, RID);
-}
-
-godot_int GDAPI godot_rid_get_id(const godot_rid *p_self) {
- const RID *self = (const RID *)p_self;
- return self->get_id();
-}
-
-void GDAPI godot_rid_new_with_resource(godot_rid *r_dest, const godot_object *p_from) {
- const Resource *res_from = Object::cast_to<Resource>((Object *)p_from);
- godot_rid_new(r_dest);
- if (res_from) {
- RID *dest = (RID *)r_dest;
- *dest = RID(res_from->get_rid());
- }
-}
-
-godot_bool GDAPI godot_rid_operator_equal(const godot_rid *p_self, const godot_rid *p_b) {
- const RID *self = (const RID *)p_self;
- const RID *b = (const RID *)p_b;
- return *self == *b;
-}
-
-godot_bool GDAPI godot_rid_operator_less(const godot_rid *p_self, const godot_rid *p_b) {
- const RID *self = (const RID *)p_self;
- const RID *b = (const RID *)p_b;
- return *self < *b;
+void GDAPI godot_rid_new(godot_rid *p_self) {
+ memnew_placement(p_self, RID);
}
#ifdef __cplusplus
diff --git a/core/os/thread_dummy.cpp b/modules/gdnative/gdnative/signal.cpp
index 006757b8e4..bcb4c93b62 100644
--- a/core/os/thread_dummy.cpp
+++ b/modules/gdnative/gdnative/signal.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* thread_dummy.cpp */
+/* signal.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,22 +28,26 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "thread_dummy.h"
+#include "gdnative/signal.h"
-#include "core/os/memory.h"
+#include "core/variant/callable.h"
+#include "core/variant/variant.h"
-Thread *ThreadDummy::create(ThreadCreateCallback p_callback, void *p_user, const Thread::Settings &p_settings) {
- return memnew(ThreadDummy);
-}
+static_assert(sizeof(godot_signal) == sizeof(Signal), "Signal size mismatch");
+
+#ifdef __cplusplus
+extern "C" {
+#endif
-void ThreadDummy::make_default() {
- Thread::create_func = &ThreadDummy::create;
+void GDAPI godot_signal_new(godot_signal *p_self) {
+ memnew_placement(p_self, Signal);
}
-RWLock *RWLockDummy::create() {
- return memnew(RWLockDummy);
+void GDAPI godot_signal_destroy(godot_signal *p_self) {
+ Signal *self = (Signal *)p_self;
+ self->~Signal();
}
-void RWLockDummy::make_default() {
- RWLock::create_func = &RWLockDummy::create;
+#ifdef __cplusplus
}
+#endif
diff --git a/modules/gdnative/gdnative/string.cpp b/modules/gdnative/gdnative/string.cpp
index 734bbe0d16..19d95f2048 100644
--- a/modules/gdnative/gdnative/string.cpp
+++ b/modules/gdnative/gdnative/string.cpp
@@ -30,57 +30,15 @@
#include "gdnative/string.h"
-#include "core/string/string_name.h"
#include "core/string/ustring.h"
-#include "core/variant/variant.h"
-#include <string.h>
+static_assert(sizeof(godot_string) == sizeof(String), "String size mismatch");
+static_assert(sizeof(godot_char_type) == sizeof(char32_t), "char32_t size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_char16_string) == sizeof(Char16String), "Char16String size mismatch");
-static_assert(sizeof(godot_char_string) == sizeof(CharString), "CharString size mismatch");
-static_assert(sizeof(godot_string) == sizeof(String), "String size mismatch");
-static_assert(sizeof(godot_char_type) == sizeof(char32_t), "char32_t size mismatch");
-
-godot_int GDAPI godot_char_string_length(const godot_char_string *p_cs) {
- const CharString *cs = (const CharString *)p_cs;
-
- return cs->length();
-}
-
-const char GDAPI *godot_char_string_get_data(const godot_char_string *p_cs) {
- const CharString *cs = (const CharString *)p_cs;
-
- return cs->get_data();
-}
-
-void GDAPI godot_char_string_destroy(godot_char_string *p_cs) {
- CharString *cs = (CharString *)p_cs;
-
- cs->~CharString();
-}
-
-godot_int GDAPI godot_char16_string_length(const godot_char16_string *p_cs) {
- const Char16String *cs = (const Char16String *)p_cs;
-
- return cs->length();
-}
-
-const char16_t GDAPI *godot_char16_string_get_data(const godot_char16_string *p_cs) {
- const Char16String *cs = (const Char16String *)p_cs;
-
- return cs->get_data();
-}
-
-void GDAPI godot_char16_string_destroy(godot_char16_string *p_cs) {
- Char16String *cs = (Char16String *)p_cs;
-
- cs->~Char16String();
-}
-
void GDAPI godot_string_new(godot_string *r_dest) {
String *dest = (String *)r_dest;
memnew_placement(dest, String);
@@ -167,1206 +125,11 @@ void GDAPI godot_string_new_with_wide_chars_and_len(godot_string *r_dest, const
}
}
-const godot_char_type GDAPI *godot_string_operator_index(godot_string *p_self, const godot_int p_idx) {
- String *self = (String *)p_self;
- return &(self->operator[](p_idx));
-}
-
-godot_char_type GDAPI godot_string_operator_index_const(const godot_string *p_self, const godot_int p_idx) {
- const String *self = (const String *)p_self;
- return self->operator[](p_idx);
-}
-
-const godot_char_type GDAPI *godot_string_get_data(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- return self->get_data();
-}
-
-godot_bool GDAPI godot_string_operator_equal(const godot_string *p_self, const godot_string *p_b) {
- const String *self = (const String *)p_self;
- const String *b = (const String *)p_b;
- return *self == *b;
-}
-
-godot_bool GDAPI godot_string_operator_less(const godot_string *p_self, const godot_string *p_b) {
- const String *self = (const String *)p_self;
- const String *b = (const String *)p_b;
- return *self < *b;
-}
-
-godot_string GDAPI godot_string_operator_plus(const godot_string *p_self, const godot_string *p_b) {
- godot_string ret;
- const String *self = (const String *)p_self;
- const String *b = (const String *)p_b;
- memnew_placement(&ret, String(*self + *b));
- return ret;
-}
-
void GDAPI godot_string_destroy(godot_string *p_self) {
String *self = (String *)p_self;
self->~String();
}
-/* Standard size stuff */
-
-godot_int GDAPI godot_string_length(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->length();
-}
-
-/* Helpers */
-
-signed char GDAPI godot_string_casecmp_to(const godot_string *p_self, const godot_string *p_str) {
- const String *self = (const String *)p_self;
- const String *str = (const String *)p_str;
-
- return self->casecmp_to(*str);
-}
-
-signed char GDAPI godot_string_nocasecmp_to(const godot_string *p_self, const godot_string *p_str) {
- const String *self = (const String *)p_self;
- const String *str = (const String *)p_str;
-
- return self->nocasecmp_to(*str);
-}
-
-signed char GDAPI godot_string_naturalnocasecmp_to(const godot_string *p_self, const godot_string *p_str) {
- const String *self = (const String *)p_self;
- const String *str = (const String *)p_str;
-
- return self->naturalnocasecmp_to(*str);
-}
-
-godot_bool GDAPI godot_string_begins_with(const godot_string *p_self, const godot_string *p_string) {
- const String *self = (const String *)p_self;
- const String *string = (const String *)p_string;
-
- return self->begins_with(*string);
-}
-
-godot_bool GDAPI godot_string_begins_with_char_array(const godot_string *p_self, const char *p_char_array) {
- const String *self = (const String *)p_self;
-
- return self->begins_with(p_char_array);
-}
-
-godot_packed_string_array GDAPI godot_string_bigrams(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_packed_string_array ret;
- memnew_placement(&ret, Vector<String>(self->bigrams()));
- return ret;
-};
-
-godot_string GDAPI godot_string_chr(godot_char_type p_character) {
- godot_string result;
- memnew_placement(&result, String(String::chr(p_character)));
-
- return result;
-}
-
-godot_bool GDAPI godot_string_ends_with(const godot_string *p_self, const godot_string *p_string) {
- const String *self = (const String *)p_self;
- const String *string = (const String *)p_string;
-
- return self->ends_with(*string);
-}
-
-godot_bool GDAPI godot_string_ends_with_char_array(const godot_string *p_self, const char *p_char_array) {
- const String *self = (const String *)p_self;
-
- return self->ends_with(p_char_array);
-}
-
-godot_int GDAPI godot_string_count(const godot_string *p_self, const godot_string *p_what, godot_int p_from, godot_int p_to) {
- const String *self = (const String *)p_self;
- const String *what = (const String *)p_what;
-
- return self->count(*what, p_from, p_to);
-}
-
-godot_int GDAPI godot_string_countn(const godot_string *p_self, const godot_string *p_what, godot_int p_from, godot_int p_to) {
- const String *self = (const String *)p_self;
- const String *what = (const String *)p_what;
-
- return self->countn(*what, p_from, p_to);
-}
-
-godot_int GDAPI godot_string_find(const godot_string *p_self, const godot_string *p_what) {
- const String *self = (const String *)p_self;
- const String *what = (const String *)p_what;
-
- return self->find(*what);
-}
-
-godot_int GDAPI godot_string_find_from(const godot_string *p_self, const godot_string *p_what, godot_int p_from) {
- const String *self = (const String *)p_self;
- const String *what = (const String *)p_what;
-
- return self->find(*what, p_from);
-}
-
-godot_int GDAPI godot_string_findmk(const godot_string *p_self, const godot_packed_string_array *p_keys) {
- const String *self = (const String *)p_self;
- const Vector<String> *keys = (const Vector<String> *)p_keys;
- return self->findmk(*keys);
-}
-
-godot_int GDAPI godot_string_findmk_from(const godot_string *p_self, const godot_packed_string_array *p_keys, godot_int p_from) {
- const String *self = (const String *)p_self;
- const Vector<String> *keys = (const Vector<String> *)p_keys;
- return self->findmk(*keys, p_from);
-}
-
-godot_int GDAPI godot_string_findmk_from_in_place(const godot_string *p_self, const godot_packed_string_array *p_keys, godot_int p_from, godot_int *r_key) {
- const String *self = (const String *)p_self;
- const Vector<String> *keys = (const Vector<String> *)p_keys;
- int key;
- int ret = self->findmk(*keys, p_from, &key);
- if (r_key) {
- *r_key = key;
- }
- return ret;
-}
-
-godot_int GDAPI godot_string_findn(const godot_string *p_self, const godot_string *p_what) {
- const String *self = (const String *)p_self;
- const String *what = (const String *)p_what;
-
- return self->findn(*what);
-}
-
-godot_int GDAPI godot_string_findn_from(const godot_string *p_self, const godot_string *p_what, godot_int p_from) {
- const String *self = (const String *)p_self;
- const String *what = (const String *)p_what;
-
- return self->findn(*what, p_from);
-}
-
-godot_string GDAPI godot_string_format(const godot_string *p_self, const godot_variant *p_values) {
- const String *self = (const String *)p_self;
- const Variant *values = (const Variant *)p_values;
- godot_string result;
- memnew_placement(&result, String(self->format(*values)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_format_with_custom_placeholder(const godot_string *p_self, const godot_variant *p_values, const char *p_placeholder) {
- const String *self = (const String *)p_self;
- const Variant *values = (const Variant *)p_values;
- String placeholder = String(p_placeholder);
- godot_string result;
- memnew_placement(&result, String(self->format(*values, placeholder)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_hex_encode_buffer(const uint8_t *p_buffer, godot_int p_len) {
- godot_string result;
- memnew_placement(&result, String(String::hex_encode_buffer(p_buffer, p_len)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_insert(const godot_string *p_self, godot_int p_at_pos, const godot_string *p_string) {
- const String *self = (const String *)p_self;
- const String *content = (const String *)p_string;
- godot_string result;
- memnew_placement(&result, String(self->insert(p_at_pos, *content)));
-
- return result;
-}
-
-godot_bool GDAPI godot_string_is_numeric(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_numeric();
-}
-
-godot_bool GDAPI godot_string_is_subsequence_of(const godot_string *p_self, const godot_string *p_string) {
- const String *self = (const String *)p_self;
- const String *string = (const String *)p_string;
-
- return self->is_subsequence_of(*string);
-}
-
-godot_bool GDAPI godot_string_is_subsequence_ofi(const godot_string *p_self, const godot_string *p_string) {
- const String *self = (const String *)p_self;
- const String *string = (const String *)p_string;
-
- return self->is_subsequence_ofi(*string);
-}
-
-godot_string GDAPI godot_string_lpad(const godot_string *p_self, godot_int p_min_length) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->lpad(p_min_length)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_lpad_with_custom_character(const godot_string *p_self, godot_int p_min_length, const godot_string *p_character) {
- const String *self = (const String *)p_self;
- const String *character = (const String *)p_character;
- godot_string result;
- memnew_placement(&result, String(self->lpad(p_min_length, *character)));
-
- return result;
-}
-
-godot_bool GDAPI godot_string_match(const godot_string *p_self, const godot_string *p_wildcard) {
- const String *self = (const String *)p_self;
- const String *wildcard = (const String *)p_wildcard;
-
- return self->match(*wildcard);
-}
-
-godot_bool GDAPI godot_string_matchn(const godot_string *p_self, const godot_string *p_wildcard) {
- const String *self = (const String *)p_self;
- const String *wildcard = (const String *)p_wildcard;
-
- return self->matchn(*wildcard);
-}
-
-godot_string GDAPI godot_string_md5(const uint8_t *p_md5) {
- godot_string result;
- memnew_placement(&result, String(String::md5(p_md5)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_num(double p_num) {
- godot_string result;
- memnew_placement(&result, String(String::num(p_num)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_num_int64(int64_t p_num, godot_int p_base) {
- godot_string result;
- memnew_placement(&result, String(String::num_int64(p_num, p_base)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_num_int64_capitalized(int64_t p_num, godot_int p_base, godot_bool p_capitalize_hex) {
- godot_string result;
- memnew_placement(&result, String(String::num_int64(p_num, p_base, true)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_num_real(double p_num) {
- godot_string result;
- memnew_placement(&result, String(String::num_real(p_num)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_num_scientific(double p_num) {
- godot_string result;
- memnew_placement(&result, String(String::num_scientific(p_num)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_num_with_decimals(double p_num, godot_int p_decimals) {
- godot_string result;
- memnew_placement(&result, String(String::num(p_num, p_decimals)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_pad_decimals(const godot_string *p_self, godot_int p_digits) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->pad_decimals(p_digits)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_pad_zeros(const godot_string *p_self, godot_int p_digits) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->pad_zeros(p_digits)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_replace(const godot_string *p_self, const godot_string *p_key, const godot_string *p_with) {
- const String *self = (const String *)p_self;
- const String *key = (const String *)p_key;
- const String *with = (const String *)p_with;
- godot_string result;
- memnew_placement(&result, String(self->replace(*key, *with)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_replacen(const godot_string *p_self, const godot_string *p_key, const godot_string *p_with) {
- const String *self = (const String *)p_self;
- const String *key = (const String *)p_key;
- const String *with = (const String *)p_with;
- godot_string result;
- memnew_placement(&result, String(self->replacen(*key, *with)));
-
- return result;
-}
-
-godot_int GDAPI godot_string_rfind(const godot_string *p_self, const godot_string *p_what) {
- const String *self = (const String *)p_self;
- const String *what = (const String *)p_what;
-
- return self->rfind(*what);
-}
-
-godot_int GDAPI godot_string_rfindn(const godot_string *p_self, const godot_string *p_what) {
- const String *self = (const String *)p_self;
- const String *what = (const String *)p_what;
-
- return self->rfindn(*what);
-}
-
-godot_int GDAPI godot_string_rfind_from(const godot_string *p_self, const godot_string *p_what, godot_int p_from) {
- const String *self = (const String *)p_self;
- const String *what = (const String *)p_what;
-
- return self->rfind(*what, p_from);
-}
-
-godot_int GDAPI godot_string_rfindn_from(const godot_string *p_self, const godot_string *p_what, godot_int p_from) {
- const String *self = (const String *)p_self;
- const String *what = (const String *)p_what;
-
- return self->rfindn(*what, p_from);
-}
-
-godot_string GDAPI godot_string_replace_first(const godot_string *p_self, const godot_string *p_key, const godot_string *p_with) {
- const String *self = (const String *)p_self;
- const String *key = (const String *)p_key;
- const String *with = (const String *)p_with;
- godot_string result;
- memnew_placement(&result, String(self->replace_first(*key, *with)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_rpad(const godot_string *p_self, godot_int p_min_length) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->rpad(p_min_length)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_rpad_with_custom_character(const godot_string *p_self, godot_int p_min_length, const godot_string *p_character) {
- const String *self = (const String *)p_self;
- const String *character = (const String *)p_character;
- godot_string result;
- memnew_placement(&result, String(self->rpad(p_min_length, *character)));
-
- return result;
-}
-
-godot_real GDAPI godot_string_similarity(const godot_string *p_self, const godot_string *p_string) {
- const String *self = (const String *)p_self;
- const String *string = (const String *)p_string;
-
- return self->similarity(*string);
-}
-
-godot_string GDAPI godot_string_sprintf(const godot_string *p_self, const godot_array *p_values, godot_bool *p_error) {
- const String *self = (const String *)p_self;
- const Array *values = (const Array *)p_values;
-
- godot_string result;
- String return_value = self->sprintf(*values, p_error);
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_substr(const godot_string *p_self, godot_int p_from, godot_int p_chars) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->substr(p_from, p_chars)));
-
- return result;
-}
-
-godot_int GDAPI godot_string_to_int(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->to_int();
-}
-
-double GDAPI godot_string_to_float(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->to_float();
-}
-
-godot_string GDAPI godot_string_capitalize(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->capitalize()));
-
- return result;
-}
-
-godot_string GDAPI godot_string_camelcase_to_underscore(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->camelcase_to_underscore(false)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_camelcase_to_underscore_lowercased(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->camelcase_to_underscore()));
-
- return result;
-}
-
-double GDAPI godot_string_char_to_float(const char *p_what) {
- return String::to_float(p_what);
-}
-
-double GDAPI godot_string_wchar_to_float(const wchar_t *p_str, const wchar_t **r_end) {
- return String::to_float(p_str, r_end);
-}
-
-godot_int GDAPI godot_string_char_to_int(const char *p_what) {
- return String::to_int(p_what);
-}
-
-godot_int GDAPI godot_string_wchar_to_int(const wchar_t *p_str) {
- return String::to_int(p_str);
-}
-
-godot_int GDAPI godot_string_char_to_int_with_len(const char *p_what, godot_int p_len) {
- return String::to_int(p_what, p_len);
-}
-
-godot_int GDAPI godot_string_wchar_to_int_with_len(const wchar_t *p_str, int p_len) {
- return String::to_int(p_str, p_len);
-}
-
-godot_int GDAPI godot_string_hex_to_int(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->hex_to_int(false);
-}
-
-godot_int GDAPI godot_string_hex_to_int_with_prefix(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->hex_to_int();
-}
-
-godot_string GDAPI godot_string_get_slice(const godot_string *p_self, const godot_string *p_splitter, godot_int p_slice) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
- godot_string result;
- memnew_placement(&result, String(self->get_slice(*splitter, p_slice)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_get_slicec(const godot_string *p_self, godot_char_type p_splitter, godot_int p_slice) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->get_slicec(p_splitter, p_slice)));
-
- return result;
-}
-
-godot_packed_string_array GDAPI godot_string_split(const godot_string *p_self, const godot_string *p_splitter) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
- godot_packed_string_array ret;
- memnew_placement(&ret, Vector<String>(self->split(*splitter, false)));
- return ret;
-}
-
-godot_packed_string_array GDAPI godot_string_split_allow_empty(const godot_string *p_self, const godot_string *p_splitter) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
- godot_packed_string_array ret;
- memnew_placement(&ret, Vector<String>(self->split(*splitter, true)));
- return ret;
-}
-
-godot_packed_string_array GDAPI godot_string_split_with_maxsplit(const godot_string *p_self, const godot_string *p_splitter, const godot_bool p_allow_empty, const godot_int p_maxsplit) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
- godot_packed_string_array ret;
- memnew_placement(&ret, Vector<String>(self->split(*splitter, p_allow_empty, p_maxsplit)));
- return ret;
-}
-
-godot_packed_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_splitter) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
-
- godot_packed_string_array ret;
- memnew_placement(&ret, Vector<String>(self->rsplit(*splitter, false)));
- return ret;
-}
-
-godot_packed_string_array GDAPI godot_string_rsplit_allow_empty(const godot_string *p_self, const godot_string *p_splitter) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
-
- godot_packed_string_array ret;
- memnew_placement(&ret, Vector<String>(self->rsplit(*splitter, true)));
- return ret;
-}
-
-godot_packed_string_array GDAPI godot_string_rsplit_with_maxsplit(const godot_string *p_self, const godot_string *p_splitter, const godot_bool p_allow_empty, const godot_int p_maxsplit) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
-
- godot_packed_string_array ret;
- memnew_placement(&ret, Vector<String>(self->rsplit(*splitter, p_allow_empty, p_maxsplit)));
- return ret;
-}
-
-godot_packed_float32_array GDAPI godot_string_split_floats(const godot_string *p_self, const godot_string *p_splitter) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
-
- godot_packed_float32_array ret;
- memnew_placement(&ret, Vector<float>(self->split_floats(*splitter, false)));
- return ret;
-}
-
-godot_packed_float32_array GDAPI godot_string_split_floats_allow_empty(const godot_string *p_self, const godot_string *p_splitter) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
-
- godot_packed_float32_array ret;
- memnew_placement(&ret, Vector<float>(self->split_floats(*splitter, true)));
- return ret;
-}
-
-godot_packed_float32_array GDAPI godot_string_split_floats_mk(const godot_string *p_self, const godot_packed_string_array *p_splitters) {
- const String *self = (const String *)p_self;
- const Vector<String> *splitters = (const Vector<String> *)p_splitters;
-
- godot_packed_float32_array ret;
- memnew_placement(&ret, Vector<float>(self->split_floats_mk(*splitters, false)));
- return ret;
-}
-
-godot_packed_float32_array GDAPI godot_string_split_floats_mk_allow_empty(const godot_string *p_self, const godot_packed_string_array *p_splitters) {
- const String *self = (const String *)p_self;
- const Vector<String> *splitters = (const Vector<String> *)p_splitters;
-
- godot_packed_float32_array ret;
- memnew_placement(&ret, Vector<float>(self->split_floats_mk(*splitters, true)));
- return ret;
-}
-
-godot_packed_int32_array GDAPI godot_string_split_ints(const godot_string *p_self, const godot_string *p_splitter) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
-
- godot_packed_int32_array ret;
- memnew_placement(&ret, Vector<int>(self->split_ints(*splitter, false)));
- return ret;
-}
-
-godot_packed_int32_array GDAPI godot_string_split_ints_allow_empty(const godot_string *p_self, const godot_string *p_splitter) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
-
- godot_packed_int32_array ret;
- memnew_placement(&ret, Vector<int>(self->split_ints(*splitter, true)));
- return ret;
-}
-
-godot_packed_int32_array GDAPI godot_string_split_ints_mk(const godot_string *p_self, const godot_packed_string_array *p_splitters) {
- const String *self = (const String *)p_self;
- const Vector<String> *splitters = (const Vector<String> *)p_splitters;
-
- godot_packed_int32_array ret;
- memnew_placement(&ret, Vector<int>(self->split_ints_mk(*splitters, false)));
- return ret;
-}
-
-godot_packed_int32_array GDAPI godot_string_split_ints_mk_allow_empty(const godot_string *p_self, const godot_packed_string_array *p_splitters) {
- const String *self = (const String *)p_self;
- const Vector<String> *splitters = (const Vector<String> *)p_splitters;
-
- godot_packed_int32_array ret;
- memnew_placement(&ret, Vector<int>(self->split_ints_mk(*splitters, true)));
- return ret;
-}
-
-godot_packed_string_array GDAPI godot_string_split_spaces(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- godot_packed_string_array ret;
- memnew_placement(&ret, Vector<String>(self->split_spaces()));
- return ret;
-}
-
-godot_int GDAPI godot_string_get_slice_count(const godot_string *p_self, const godot_string *p_splitter) {
- const String *self = (const String *)p_self;
- const String *splitter = (const String *)p_splitter;
-
- return self->get_slice_count(*splitter);
-}
-
-godot_char_type GDAPI godot_string_char_lowercase(godot_char_type p_char) {
- return String::char_lowercase(p_char);
-}
-
-godot_char_type GDAPI godot_string_char_uppercase(godot_char_type p_char) {
- return String::char_uppercase(p_char);
-}
-
-godot_string GDAPI godot_string_to_lower(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->to_lower()));
-
- return result;
-}
-
-godot_string GDAPI godot_string_to_upper(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->to_upper()));
-
- return result;
-}
-
-godot_string GDAPI godot_string_get_basename(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->get_basename()));
-
- return result;
-}
-
-godot_string GDAPI godot_string_get_extension(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->get_extension()));
-
- return result;
-}
-
-godot_string GDAPI godot_string_left(const godot_string *p_self, godot_int p_pos) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->left(p_pos)));
-
- return result;
-}
-
-godot_char_type GDAPI godot_string_ord_at(const godot_string *p_self, godot_int p_idx) {
- const String *self = (const String *)p_self;
-
- return self->ord_at(p_idx);
-}
-
-godot_string GDAPI godot_string_plus_file(const godot_string *p_self, const godot_string *p_file) {
- const String *self = (const String *)p_self;
- const String *file = (const String *)p_file;
- godot_string result;
- memnew_placement(&result, String(self->plus_file(*file)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_right(const godot_string *p_self, godot_int p_pos) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->right(p_pos)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_repeat(const godot_string *p_self, godot_int p_count) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->repeat(p_count)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_strip_edges(const godot_string *p_self, godot_bool p_left, godot_bool p_right) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->strip_edges(p_left, p_right)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_strip_escapes(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->strip_escapes()));
-
- return result;
-}
-
-void GDAPI godot_string_erase(godot_string *p_self, godot_int p_pos, godot_int p_chars) {
- String *self = (String *)p_self;
-
- return self->erase(p_pos, p_chars);
-}
-
-godot_char_string GDAPI godot_string_ascii(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_char_string result;
-
- memnew_placement(&result, CharString(self->ascii()));
-
- return result;
-}
-
-godot_char_string GDAPI godot_string_latin1(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- godot_char_string result;
-
- memnew_placement(&result, CharString(self->ascii(true)));
-
- return result;
-}
-
-godot_char_string GDAPI godot_string_utf8(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- godot_char_string result;
-
- memnew_placement(&result, CharString(self->utf8()));
-
- return result;
-}
-
-godot_bool GDAPI godot_string_parse_utf8(godot_string *p_self, const char *p_utf8) {
- String *self = (String *)p_self;
-
- return self->parse_utf8(p_utf8);
-}
-
-godot_bool GDAPI godot_string_parse_utf8_with_len(godot_string *p_self, const char *p_utf8, godot_int p_len) {
- String *self = (String *)p_self;
-
- return self->parse_utf8(p_utf8, p_len);
-}
-
-godot_string GDAPI godot_string_chars_to_utf8(const char *p_utf8) {
- godot_string result;
- memnew_placement(&result, String(String::utf8(p_utf8)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_chars_to_utf8_with_len(const char *p_utf8, godot_int p_len) {
- godot_string result;
- memnew_placement(&result, String(String::utf8(p_utf8, p_len)));
-
- return result;
-}
-
-godot_char16_string GDAPI godot_string_utf16(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- godot_char16_string result;
-
- memnew_placement(&result, Char16String(self->utf16()));
-
- return result;
-}
-
-godot_bool GDAPI godot_string_parse_utf16(godot_string *p_self, const char16_t *p_utf16) {
- String *self = (String *)p_self;
-
- return self->parse_utf16(p_utf16);
-}
-
-godot_bool GDAPI godot_string_parse_utf16_with_len(godot_string *p_self, const char16_t *p_utf16, godot_int p_len) {
- String *self = (String *)p_self;
-
- return self->parse_utf16(p_utf16, p_len);
-}
-
-godot_string GDAPI godot_string_chars_to_utf16(const char16_t *p_utf16) {
- godot_string result;
- memnew_placement(&result, String(String::utf16(p_utf16)));
-
- return result;
-}
-
-godot_string GDAPI godot_string_chars_to_utf16_with_len(const char16_t *p_utf16, godot_int p_len) {
- godot_string result;
- memnew_placement(&result, String(String::utf16(p_utf16, p_len)));
-
- return result;
-}
-
-uint32_t GDAPI godot_string_hash(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->hash();
-}
-
-uint64_t GDAPI godot_string_hash64(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->hash64();
-}
-
-uint32_t GDAPI godot_string_hash_chars(const char *p_cstr) {
- return String::hash(p_cstr);
-}
-
-uint32_t GDAPI godot_string_hash_chars_with_len(const char *p_cstr, godot_int p_len) {
- return String::hash(p_cstr, p_len);
-}
-
-uint32_t GDAPI godot_string_hash_wide_chars(const wchar_t *p_str) {
- return String::hash(p_str);
-}
-
-uint32_t GDAPI godot_string_hash_wide_chars_with_len(const wchar_t *p_str, godot_int p_len) {
- return String::hash(p_str, p_len);
-}
-
-godot_packed_byte_array GDAPI godot_string_md5_buffer(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_packed_byte_array result;
- memnew_placement(&result, PackedByteArray(self->md5_buffer()));
- return result;
-}
-
-godot_string GDAPI godot_string_md5_text(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->md5_text()));
-
- return result;
-}
-
-godot_packed_byte_array GDAPI godot_string_sha1_buffer(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_packed_byte_array result;
- memnew_placement(&result, PackedByteArray(self->sha1_buffer()));
- return result;
-}
-
-godot_string GDAPI godot_string_sha1_text(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->sha1_text()));
-
- return result;
-}
-
-godot_packed_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_packed_byte_array result;
- memnew_placement(&result, PackedByteArray(self->sha256_buffer()));
- return result;
-}
-
-godot_string GDAPI godot_string_sha256_text(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- memnew_placement(&result, String(self->sha256_text()));
-
- return result;
-}
-
-godot_bool godot_string_is_empty(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_empty();
-}
-
-// path functions
-godot_string GDAPI godot_string_get_base_dir(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->get_base_dir();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_get_file(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->get_file();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_humanize_size(uint64_t p_size) {
- godot_string result;
- String return_value = String::humanize_size(p_size);
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_bool GDAPI godot_string_is_abs_path(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_abs_path();
-}
-
-godot_bool GDAPI godot_string_is_rel_path(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_rel_path();
-}
-
-godot_bool GDAPI godot_string_is_resource_file(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_resource_file();
-}
-
-godot_string GDAPI godot_string_path_to(const godot_string *p_self, const godot_string *p_path) {
- const String *self = (const String *)p_self;
- String *path = (String *)p_path;
- godot_string result;
- String return_value = self->path_to(*path);
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_path_to_file(const godot_string *p_self, const godot_string *p_path) {
- const String *self = (const String *)p_self;
- String *path = (String *)p_path;
- godot_string result;
- String return_value = self->path_to_file(*path);
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_simplify_path(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->simplify_path();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_c_escape(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->c_escape();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_c_escape_multiline(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->c_escape_multiline();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_c_unescape(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->c_unescape();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_http_escape(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->http_escape();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_http_unescape(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->http_unescape();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_json_escape(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->json_escape();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_xml_escape(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->xml_escape();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_xml_escape_with_quotes(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->xml_escape(true);
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_xml_unescape(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->xml_unescape();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_percent_decode(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->percent_decode();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_percent_encode(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->percent_encode();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_join(const godot_string *p_self, const godot_packed_string_array *p_parts) {
- const String *self = (const String *)p_self;
- const Vector<String> *parts = (const Vector<String> *)p_parts;
- godot_string result;
- String return_value = self->join(*parts);
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_bool GDAPI godot_string_is_valid_filename(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_valid_filename();
-}
-
-godot_bool GDAPI godot_string_is_valid_float(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_valid_float();
-}
-
-godot_bool GDAPI godot_string_is_valid_hex_number(const godot_string *p_self, godot_bool p_with_prefix) {
- const String *self = (const String *)p_self;
-
- return self->is_valid_hex_number(p_with_prefix);
-}
-
-godot_bool GDAPI godot_string_is_valid_html_color(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_valid_html_color();
-}
-
-godot_bool GDAPI godot_string_is_valid_identifier(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_valid_identifier();
-}
-
-godot_bool GDAPI godot_string_is_valid_integer(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_valid_integer();
-}
-
-godot_bool GDAPI godot_string_is_valid_ip_address(const godot_string *p_self) {
- const String *self = (const String *)p_self;
-
- return self->is_valid_ip_address();
-}
-
-godot_string GDAPI godot_string_dedent(const godot_string *p_self) {
- const String *self = (const String *)p_self;
- godot_string result;
- String return_value = self->dedent();
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_trim_prefix(const godot_string *p_self, const godot_string *p_prefix) {
- const String *self = (const String *)p_self;
- String *prefix = (String *)p_prefix;
- godot_string result;
- String return_value = self->trim_prefix(*prefix);
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_trim_suffix(const godot_string *p_self, const godot_string *p_suffix) {
- const String *self = (const String *)p_self;
- String *suffix = (String *)p_suffix;
- godot_string result;
- String return_value = self->trim_suffix(*suffix);
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_lstrip(const godot_string *p_self, const godot_string *p_chars) {
- const String *self = (const String *)p_self;
- String *chars = (String *)p_chars;
- godot_string result;
- String return_value = self->lstrip(*chars);
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
-godot_string GDAPI godot_string_rstrip(const godot_string *p_self, const godot_string *p_chars) {
- const String *self = (const String *)p_self;
- String *chars = (String *)p_chars;
- godot_string result;
- String return_value = self->rstrip(*chars);
- memnew_placement(&result, String(return_value));
-
- return result;
-}
-
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/gdnative/string_name.cpp b/modules/gdnative/gdnative/string_name.cpp
index 3d83f744d6..c9d2dd5bc3 100644
--- a/modules/gdnative/gdnative/string_name.cpp
+++ b/modules/gdnative/gdnative/string_name.cpp
@@ -31,54 +31,27 @@
#include "gdnative/string_name.h"
#include "core/string/string_name.h"
-#include "core/string/ustring.h"
-#include <string.h>
+static_assert(sizeof(godot_string_name) == sizeof(StringName), "StringName size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_string_name) == sizeof(StringName), "StringName size mismatch");
-
-void GDAPI godot_string_name_new(godot_string_name *r_dest, const godot_string *p_name) {
+void GDAPI godot_string_name_new(godot_string_name *r_dest) {
StringName *dest = (StringName *)r_dest;
- const String *name = (const String *)p_name;
- memnew_placement(dest, StringName(*name));
+ memnew_placement(dest, StringName);
}
-void GDAPI godot_string_name_new_data(godot_string_name *r_dest, const char *p_name) {
+void GDAPI godot_string_name_new_copy(godot_string_name *r_dest, const godot_string_name *p_src) {
StringName *dest = (StringName *)r_dest;
- memnew_placement(dest, StringName(p_name));
-}
-
-godot_string GDAPI godot_string_name_get_name(const godot_string_name *p_self) {
- godot_string ret;
- const StringName *self = (const StringName *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-uint32_t GDAPI godot_string_name_get_hash(const godot_string_name *p_self) {
- const StringName *self = (const StringName *)p_self;
- return self->hash();
-}
-
-const void GDAPI *godot_string_name_get_data_unique_pointer(const godot_string_name *p_self) {
- const StringName *self = (const StringName *)p_self;
- return self->data_unique_pointer();
+ const StringName *src = (const StringName *)p_src;
+ memnew_placement(dest, StringName(*src));
}
-godot_bool GDAPI godot_string_name_operator_equal(const godot_string_name *p_self, const godot_string_name *p_other) {
- const StringName *self = (const StringName *)p_self;
- const StringName *other = (const StringName *)p_other;
- return self == other;
-}
-
-godot_bool GDAPI godot_string_name_operator_less(const godot_string_name *p_self, const godot_string_name *p_other) {
- const StringName *self = (const StringName *)p_self;
- const StringName *other = (const StringName *)p_other;
- return self < other;
+void GDAPI godot_string_name_new_with_latin1_chars(godot_string_name *r_dest, const char *p_contents) {
+ StringName *dest = (StringName *)r_dest;
+ memnew_placement(dest, StringName(p_contents));
}
void GDAPI godot_string_name_destroy(godot_string_name *p_self) {
diff --git a/modules/gdnative/gdnative/transform.cpp b/modules/gdnative/gdnative/transform.cpp
index 059e12b401..eae981bd07 100644
--- a/modules/gdnative/gdnative/transform.cpp
+++ b/modules/gdnative/gdnative/transform.cpp
@@ -31,198 +31,15 @@
#include "gdnative/transform.h"
#include "core/math/transform.h"
-#include "core/variant/variant.h"
+
+static_assert(sizeof(godot_transform) == sizeof(Transform), "Transform size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_transform) == sizeof(Transform), "Transform size mismatch");
-
-void GDAPI godot_transform_new_with_axis_origin(godot_transform *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis, const godot_vector3 *p_origin) {
- const Vector3 *x_axis = (const Vector3 *)p_x_axis;
- const Vector3 *y_axis = (const Vector3 *)p_y_axis;
- const Vector3 *z_axis = (const Vector3 *)p_z_axis;
- const Vector3 *origin = (const Vector3 *)p_origin;
- Transform *dest = (Transform *)r_dest;
- dest->basis.set_axis(0, *x_axis);
- dest->basis.set_axis(1, *y_axis);
- dest->basis.set_axis(2, *z_axis);
- dest->origin = *origin;
-}
-
-void GDAPI godot_transform_new(godot_transform *r_dest, const godot_basis *p_basis, const godot_vector3 *p_origin) {
- const Basis *basis = (const Basis *)p_basis;
- const Vector3 *origin = (const Vector3 *)p_origin;
- Transform *dest = (Transform *)r_dest;
- *dest = Transform(*basis, *origin);
-}
-
-void GDAPI godot_transform_new_with_quat(godot_transform *r_dest, const godot_quat *p_quat) {
- const Quat *quat = (const Quat *)p_quat;
- Transform *dest = (Transform *)r_dest;
- *dest = Transform(*quat);
-}
-
-godot_basis GDAPI godot_transform_get_basis(const godot_transform *p_self) {
- godot_basis dest;
- const Transform *self = (const Transform *)p_self;
- *((Basis *)&dest) = self->basis;
- return dest;
-}
-
-void GDAPI godot_transform_set_basis(godot_transform *p_self, const godot_basis *p_v) {
- Transform *self = (Transform *)p_self;
- const Basis *v = (const Basis *)p_v;
- self->basis = *v;
-}
-
-godot_vector3 GDAPI godot_transform_get_origin(const godot_transform *p_self) {
- godot_vector3 dest;
- const Transform *self = (const Transform *)p_self;
- *((Vector3 *)&dest) = self->origin;
- return dest;
-}
-
-void GDAPI godot_transform_set_origin(godot_transform *p_self, const godot_vector3 *p_v) {
- Transform *self = (Transform *)p_self;
- const Vector3 *v = (const Vector3 *)p_v;
- self->origin = *v;
-}
-
-godot_string GDAPI godot_transform_as_string(const godot_transform *p_self) {
- godot_string ret;
- const Transform *self = (const Transform *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_transform GDAPI godot_transform_inverse(const godot_transform *p_self) {
- godot_transform dest;
- const Transform *self = (const Transform *)p_self;
- *((Transform *)&dest) = self->inverse();
- return dest;
-}
-
-godot_transform GDAPI godot_transform_affine_inverse(const godot_transform *p_self) {
- godot_transform dest;
- const Transform *self = (const Transform *)p_self;
- *((Transform *)&dest) = self->affine_inverse();
- return dest;
-}
-
-godot_transform GDAPI godot_transform_orthonormalized(const godot_transform *p_self) {
- godot_transform dest;
- const Transform *self = (const Transform *)p_self;
- *((Transform *)&dest) = self->orthonormalized();
- return dest;
-}
-
-godot_transform GDAPI godot_transform_rotated(const godot_transform *p_self, const godot_vector3 *p_axis, const godot_real p_phi) {
- godot_transform dest;
- const Transform *self = (const Transform *)p_self;
- const Vector3 *axis = (const Vector3 *)p_axis;
- *((Transform *)&dest) = self->rotated(*axis, p_phi);
- return dest;
-}
-
-godot_transform GDAPI godot_transform_scaled(const godot_transform *p_self, const godot_vector3 *p_scale) {
- godot_transform dest;
- const Transform *self = (const Transform *)p_self;
- const Vector3 *scale = (const Vector3 *)p_scale;
- *((Transform *)&dest) = self->scaled(*scale);
- return dest;
-}
-
-godot_transform GDAPI godot_transform_translated(const godot_transform *p_self, const godot_vector3 *p_ofs) {
- godot_transform dest;
- const Transform *self = (const Transform *)p_self;
- const Vector3 *ofs = (const Vector3 *)p_ofs;
- *((Transform *)&dest) = self->translated(*ofs);
- return dest;
-}
-
-godot_transform GDAPI godot_transform_looking_at(const godot_transform *p_self, const godot_vector3 *p_target, const godot_vector3 *p_up) {
- godot_transform dest;
- const Transform *self = (const Transform *)p_self;
- const Vector3 *target = (const Vector3 *)p_target;
- const Vector3 *up = (const Vector3 *)p_up;
- *((Transform *)&dest) = self->looking_at(*target, *up);
- return dest;
-}
-
-godot_plane GDAPI godot_transform_xform_plane(const godot_transform *p_self, const godot_plane *p_v) {
- godot_plane raw_dest;
- Plane *dest = (Plane *)&raw_dest;
- const Transform *self = (const Transform *)p_self;
- const Plane *v = (const Plane *)p_v;
- *dest = self->xform(*v);
- return raw_dest;
-}
-
-godot_plane GDAPI godot_transform_xform_inv_plane(const godot_transform *p_self, const godot_plane *p_v) {
- godot_plane raw_dest;
- Plane *dest = (Plane *)&raw_dest;
- const Transform *self = (const Transform *)p_self;
- const Plane *v = (const Plane *)p_v;
- *dest = self->xform_inv(*v);
- return raw_dest;
-}
-
-void GDAPI godot_transform_new_identity(godot_transform *r_dest) {
- Transform *dest = (Transform *)r_dest;
- *dest = Transform();
-}
-
-godot_bool GDAPI godot_transform_operator_equal(const godot_transform *p_self, const godot_transform *p_b) {
- const Transform *self = (const Transform *)p_self;
- const Transform *b = (const Transform *)p_b;
- return *self == *b;
-}
-
-godot_transform GDAPI godot_transform_operator_multiply(const godot_transform *p_self, const godot_transform *p_b) {
- godot_transform raw_dest;
- Transform *dest = (Transform *)&raw_dest;
- const Transform *self = (const Transform *)p_self;
- const Transform *b = (const Transform *)p_b;
- *dest = *self * *b;
- return raw_dest;
-}
-
-godot_vector3 GDAPI godot_transform_xform_vector3(const godot_transform *p_self, const godot_vector3 *p_v) {
- godot_vector3 raw_dest;
- Vector3 *dest = (Vector3 *)&raw_dest;
- const Transform *self = (const Transform *)p_self;
- const Vector3 *v = (const Vector3 *)p_v;
- *dest = self->xform(*v);
- return raw_dest;
-}
-
-godot_vector3 GDAPI godot_transform_xform_inv_vector3(const godot_transform *p_self, const godot_vector3 *p_v) {
- godot_vector3 raw_dest;
- Vector3 *dest = (Vector3 *)&raw_dest;
- const Transform *self = (const Transform *)p_self;
- const Vector3 *v = (const Vector3 *)p_v;
- *dest = self->xform_inv(*v);
- return raw_dest;
-}
-
-godot_aabb GDAPI godot_transform_xform_aabb(const godot_transform *p_self, const godot_aabb *p_v) {
- godot_aabb raw_dest;
- AABB *dest = (AABB *)&raw_dest;
- const Transform *self = (const Transform *)p_self;
- const AABB *v = (const AABB *)p_v;
- *dest = self->xform(*v);
- return raw_dest;
-}
-
-godot_aabb GDAPI godot_transform_xform_inv_aabb(const godot_transform *p_self, const godot_aabb *p_v) {
- godot_aabb raw_dest;
- AABB *dest = (AABB *)&raw_dest;
- const Transform *self = (const Transform *)p_self;
- const AABB *v = (const AABB *)p_v;
- *dest = self->xform_inv(*v);
- return raw_dest;
+void GDAPI godot_transform_new(godot_transform *p_self) {
+ memnew_placement(p_self, Transform);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/transform2d.cpp b/modules/gdnative/gdnative/transform2d.cpp
index 878599514d..679174d5a5 100644
--- a/modules/gdnative/gdnative/transform2d.cpp
+++ b/modules/gdnative/gdnative/transform2d.cpp
@@ -31,179 +31,25 @@
#include "gdnative/transform2d.h"
#include "core/math/transform_2d.h"
-#include "core/variant/variant.h"
+
+static_assert(sizeof(godot_transform2d) == sizeof(Transform2D), "Transform2D size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-static_assert(sizeof(godot_transform2d) == sizeof(Transform2D), "Transform2D size mismatch");
-
-void GDAPI godot_transform2d_new(godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos) {
- const Vector2 *pos = (const Vector2 *)p_pos;
- Transform2D *dest = (Transform2D *)r_dest;
- *dest = Transform2D(p_rot, *pos);
-}
-
-void GDAPI godot_transform2d_new_axis_origin(godot_transform2d *r_dest, const godot_vector2 *p_x_axis, const godot_vector2 *p_y_axis, const godot_vector2 *p_origin) {
- const Vector2 *x_axis = (const Vector2 *)p_x_axis;
- const Vector2 *y_axis = (const Vector2 *)p_y_axis;
- const Vector2 *origin = (const Vector2 *)p_origin;
- Transform2D *dest = (Transform2D *)r_dest;
- *dest = Transform2D(x_axis->x, x_axis->y, y_axis->x, y_axis->y, origin->x, origin->y);
-}
-
-godot_string GDAPI godot_transform2d_as_string(const godot_transform2d *p_self) {
- godot_string ret;
- const Transform2D *self = (const Transform2D *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_transform2d GDAPI godot_transform2d_inverse(const godot_transform2d *p_self) {
- godot_transform2d dest;
- const Transform2D *self = (const Transform2D *)p_self;
- *((Transform2D *)&dest) = self->inverse();
- return dest;
-}
-
-godot_transform2d GDAPI godot_transform2d_affine_inverse(const godot_transform2d *p_self) {
- godot_transform2d dest;
- const Transform2D *self = (const Transform2D *)p_self;
- *((Transform2D *)&dest) = self->affine_inverse();
- return dest;
-}
-
-godot_real GDAPI godot_transform2d_get_rotation(const godot_transform2d *p_self) {
- const Transform2D *self = (const Transform2D *)p_self;
- return self->get_rotation();
-}
-
-godot_vector2 GDAPI godot_transform2d_get_origin(const godot_transform2d *p_self) {
- godot_vector2 dest;
- const Transform2D *self = (const Transform2D *)p_self;
- *((Vector2 *)&dest) = self->get_origin();
- return dest;
-}
-
-godot_vector2 GDAPI godot_transform2d_get_scale(const godot_transform2d *p_self) {
- godot_vector2 dest;
- const Transform2D *self = (const Transform2D *)p_self;
- *((Vector2 *)&dest) = self->get_scale();
- return dest;
-}
-
-godot_transform2d GDAPI godot_transform2d_orthonormalized(const godot_transform2d *p_self) {
- godot_transform2d dest;
- const Transform2D *self = (const Transform2D *)p_self;
- *((Transform2D *)&dest) = self->orthonormalized();
- return dest;
-}
-
-godot_transform2d GDAPI godot_transform2d_rotated(const godot_transform2d *p_self, const godot_real p_phi) {
- godot_transform2d dest;
- const Transform2D *self = (const Transform2D *)p_self;
-
- *((Transform2D *)&dest) = self->rotated(p_phi);
- return dest;
+void GDAPI godot_transform2d_new(godot_transform2d *p_self) {
+ memnew_placement(p_self, Transform2D);
}
-godot_transform2d GDAPI godot_transform2d_scaled(const godot_transform2d *p_self, const godot_vector2 *p_scale) {
- godot_transform2d dest;
- const Transform2D *self = (const Transform2D *)p_self;
- const Vector2 *scale = (const Vector2 *)p_scale;
- *((Transform2D *)&dest) = self->scaled(*scale);
- return dest;
-}
-
-godot_transform2d GDAPI godot_transform2d_translated(const godot_transform2d *p_self, const godot_vector2 *p_offset) {
- godot_transform2d dest;
- const Transform2D *self = (const Transform2D *)p_self;
- const Vector2 *offset = (const Vector2 *)p_offset;
- *((Transform2D *)&dest) = self->translated(*offset);
- return dest;
-}
-
-godot_vector2 GDAPI godot_transform2d_xform_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Transform2D *self = (const Transform2D *)p_self;
- const Vector2 *v = (const Vector2 *)p_v;
- *dest = self->xform(*v);
- return raw_dest;
-}
-
-godot_vector2 GDAPI godot_transform2d_xform_inv_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Transform2D *self = (const Transform2D *)p_self;
- const Vector2 *v = (const Vector2 *)p_v;
- *dest = self->xform_inv(*v);
- return raw_dest;
-}
-
-godot_vector2 GDAPI godot_transform2d_basis_xform_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Transform2D *self = (const Transform2D *)p_self;
- const Vector2 *v = (const Vector2 *)p_v;
- *dest = self->basis_xform(*v);
- return raw_dest;
-}
-
-godot_vector2 GDAPI godot_transform2d_basis_xform_inv_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Transform2D *self = (const Transform2D *)p_self;
- const Vector2 *v = (const Vector2 *)p_v;
- *dest = self->basis_xform_inv(*v);
- return raw_dest;
-}
-
-godot_transform2d GDAPI godot_transform2d_interpolate_with(const godot_transform2d *p_self, const godot_transform2d *p_m, const godot_real p_c) {
- godot_transform2d dest;
- const Transform2D *self = (const Transform2D *)p_self;
- const Transform2D *m = (const Transform2D *)p_m;
- *((Transform2D *)&dest) = self->interpolate_with(*m, p_c);
- return dest;
-}
-
-godot_bool GDAPI godot_transform2d_operator_equal(const godot_transform2d *p_self, const godot_transform2d *p_b) {
- const Transform2D *self = (const Transform2D *)p_self;
- const Transform2D *b = (const Transform2D *)p_b;
- return *self == *b;
-}
-
-godot_transform2d GDAPI godot_transform2d_operator_multiply(const godot_transform2d *p_self, const godot_transform2d *p_b) {
- godot_transform2d raw_dest;
- Transform2D *dest = (Transform2D *)&raw_dest;
- const Transform2D *self = (const Transform2D *)p_self;
- const Transform2D *b = (const Transform2D *)p_b;
- *dest = *self * *b;
- return raw_dest;
-}
-
-void GDAPI godot_transform2d_new_identity(godot_transform2d *r_dest) {
- Transform2D *dest = (Transform2D *)r_dest;
- *dest = Transform2D();
-}
-
-godot_rect2 GDAPI godot_transform2d_xform_rect2(const godot_transform2d *p_self, const godot_rect2 *p_v) {
- godot_rect2 raw_dest;
- Rect2 *dest = (Rect2 *)&raw_dest;
- const Transform2D *self = (const Transform2D *)p_self;
- const Rect2 *v = (const Rect2 *)p_v;
- *dest = self->xform(*v);
- return raw_dest;
+godot_vector2 GDAPI *godot_transform2d_operator_index(godot_transform2d *p_self, godot_int p_index) {
+ Transform2D *self = (Transform2D *)p_self;
+ return (godot_vector2 *)&self->operator[](p_index);
}
-godot_rect2 GDAPI godot_transform2d_xform_inv_rect2(const godot_transform2d *p_self, const godot_rect2 *p_v) {
- godot_rect2 raw_dest;
- Rect2 *dest = (Rect2 *)&raw_dest;
+const godot_vector2 GDAPI *godot_transform2d_operator_index_const(const godot_transform2d *p_self, godot_int p_index) {
const Transform2D *self = (const Transform2D *)p_self;
- const Rect2 *v = (const Rect2 *)p_v;
- *dest = self->xform_inv(*v);
- return raw_dest;
+ return (const godot_vector2 *)&self->operator[](p_index);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp
index 7ee5fe59e2..ee4353bb48 100644
--- a/modules/gdnative/gdnative/variant.cpp
+++ b/modules/gdnative/gdnative/variant.cpp
@@ -55,16 +55,11 @@ static_assert(sizeof(godot_variant) == sizeof(Variant), "Variant size mismatch")
#pragma GCC pop_options
#endif
-// Constructors
-
-godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_self) {
- const Variant *self = (const Variant *)p_self;
- return (godot_variant_type)self->get_type();
-}
+// Memory
void GDAPI godot_variant_new_copy(godot_variant *p_dest, const godot_variant *p_src) {
Variant *dest = (Variant *)p_dest;
- Variant *src = (Variant *)p_src;
+ const Variant *src = (const Variant *)p_src;
memnew_placement(dest, Variant(*src));
}
@@ -78,139 +73,134 @@ void GDAPI godot_variant_new_bool(godot_variant *r_dest, const godot_bool p_b) {
memnew_placement_custom(dest, Variant, Variant(p_b));
}
-void GDAPI godot_variant_new_uint(godot_variant *r_dest, const uint64_t p_i) {
+void GDAPI godot_variant_new_int(godot_variant *r_dest, const godot_int p_i) {
Variant *dest = (Variant *)r_dest;
memnew_placement_custom(dest, Variant, Variant(p_i));
}
-void GDAPI godot_variant_new_int(godot_variant *r_dest, const int64_t p_i) {
- Variant *dest = (Variant *)r_dest;
- memnew_placement_custom(dest, Variant, Variant(p_i));
-}
-
-void GDAPI godot_variant_new_real(godot_variant *r_dest, const double p_r) {
+void GDAPI godot_variant_new_float(godot_variant *r_dest, const godot_float p_r) {
Variant *dest = (Variant *)r_dest;
memnew_placement_custom(dest, Variant, Variant(p_r));
}
void GDAPI godot_variant_new_string(godot_variant *r_dest, const godot_string *p_s) {
Variant *dest = (Variant *)r_dest;
- String *s = (String *)p_s;
+ const String *s = (const String *)p_s;
memnew_placement_custom(dest, Variant, Variant(*s));
}
void GDAPI godot_variant_new_string_name(godot_variant *r_dest, const godot_string_name *p_s) {
Variant *dest = (Variant *)r_dest;
- StringName *s = (StringName *)p_s;
+ const StringName *s = (const StringName *)p_s;
memnew_placement_custom(dest, Variant, Variant(*s));
}
void GDAPI godot_variant_new_vector2(godot_variant *r_dest, const godot_vector2 *p_v2) {
Variant *dest = (Variant *)r_dest;
- Vector2 *v2 = (Vector2 *)p_v2;
+ const Vector2 *v2 = (const Vector2 *)p_v2;
memnew_placement_custom(dest, Variant, Variant(*v2));
}
void GDAPI godot_variant_new_vector2i(godot_variant *r_dest, const godot_vector2i *p_v2) {
Variant *dest = (Variant *)r_dest;
- Vector2i *v2 = (Vector2i *)p_v2;
+ const Vector2i *v2 = (const Vector2i *)p_v2;
memnew_placement_custom(dest, Variant, Variant(*v2));
}
void GDAPI godot_variant_new_rect2(godot_variant *r_dest, const godot_rect2 *p_rect2) {
Variant *dest = (Variant *)r_dest;
- Rect2 *rect2 = (Rect2 *)p_rect2;
+ const Rect2 *rect2 = (const Rect2 *)p_rect2;
memnew_placement_custom(dest, Variant, Variant(*rect2));
}
void GDAPI godot_variant_new_rect2i(godot_variant *r_dest, const godot_rect2i *p_rect2) {
Variant *dest = (Variant *)r_dest;
- Rect2i *rect2 = (Rect2i *)p_rect2;
+ const Rect2i *rect2 = (const Rect2i *)p_rect2;
memnew_placement_custom(dest, Variant, Variant(*rect2));
}
void GDAPI godot_variant_new_vector3(godot_variant *r_dest, const godot_vector3 *p_v3) {
Variant *dest = (Variant *)r_dest;
- Vector3 *v3 = (Vector3 *)p_v3;
+ const Vector3 *v3 = (const Vector3 *)p_v3;
memnew_placement_custom(dest, Variant, Variant(*v3));
}
void GDAPI godot_variant_new_vector3i(godot_variant *r_dest, const godot_vector3i *p_v3) {
Variant *dest = (Variant *)r_dest;
- Vector3i *v3 = (Vector3i *)p_v3;
+ const Vector3i *v3 = (const Vector3i *)p_v3;
memnew_placement_custom(dest, Variant, Variant(*v3));
}
void GDAPI godot_variant_new_transform2d(godot_variant *r_dest, const godot_transform2d *p_t2d) {
Variant *dest = (Variant *)r_dest;
- Transform2D *t2d = (Transform2D *)p_t2d;
+ const Transform2D *t2d = (const Transform2D *)p_t2d;
memnew_placement_custom(dest, Variant, Variant(*t2d));
}
void GDAPI godot_variant_new_plane(godot_variant *r_dest, const godot_plane *p_plane) {
Variant *dest = (Variant *)r_dest;
- Plane *plane = (Plane *)p_plane;
+ const Plane *plane = (const Plane *)p_plane;
memnew_placement_custom(dest, Variant, Variant(*plane));
}
void GDAPI godot_variant_new_quat(godot_variant *r_dest, const godot_quat *p_quat) {
Variant *dest = (Variant *)r_dest;
- Quat *quat = (Quat *)p_quat;
+ const Quat *quat = (const Quat *)p_quat;
memnew_placement_custom(dest, Variant, Variant(*quat));
}
void GDAPI godot_variant_new_aabb(godot_variant *r_dest, const godot_aabb *p_aabb) {
Variant *dest = (Variant *)r_dest;
- AABB *aabb = (AABB *)p_aabb;
+ const AABB *aabb = (const AABB *)p_aabb;
memnew_placement_custom(dest, Variant, Variant(*aabb));
}
void GDAPI godot_variant_new_basis(godot_variant *r_dest, const godot_basis *p_basis) {
Variant *dest = (Variant *)r_dest;
- Basis *basis = (Basis *)p_basis;
+ const Basis *basis = (const Basis *)p_basis;
memnew_placement_custom(dest, Variant, Variant(*basis));
}
void GDAPI godot_variant_new_transform(godot_variant *r_dest, const godot_transform *p_trans) {
Variant *dest = (Variant *)r_dest;
- Transform *trans = (Transform *)p_trans;
+ const Transform *trans = (const Transform *)p_trans;
memnew_placement_custom(dest, Variant, Variant(*trans));
}
void GDAPI godot_variant_new_color(godot_variant *r_dest, const godot_color *p_color) {
Variant *dest = (Variant *)r_dest;
- Color *color = (Color *)p_color;
+ const Color *color = (const Color *)p_color;
memnew_placement_custom(dest, Variant, Variant(*color));
}
void GDAPI godot_variant_new_node_path(godot_variant *r_dest, const godot_node_path *p_np) {
Variant *dest = (Variant *)r_dest;
- NodePath *np = (NodePath *)p_np;
+ const NodePath *np = (const NodePath *)p_np;
memnew_placement_custom(dest, Variant, Variant(*np));
}
void GDAPI godot_variant_new_rid(godot_variant *r_dest, const godot_rid *p_rid) {
Variant *dest = (Variant *)r_dest;
- RID *rid = (RID *)p_rid;
+ const RID *rid = (const RID *)p_rid;
memnew_placement_custom(dest, Variant, Variant(*rid));
}
void GDAPI godot_variant_new_callable(godot_variant *r_dest, const godot_callable *p_cb) {
Variant *dest = (Variant *)r_dest;
- Callable *cb = (Callable *)p_cb;
+ const Callable *cb = (const Callable *)p_cb;
memnew_placement_custom(dest, Variant, Variant(*cb));
}
void GDAPI godot_variant_new_signal(godot_variant *r_dest, const godot_signal *p_signal) {
Variant *dest = (Variant *)r_dest;
- Signal *signal = (Signal *)p_signal;
+ const Signal *signal = (const Signal *)p_signal;
memnew_placement_custom(dest, Variant, Variant(*signal));
}
void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p_obj) {
Variant *dest = (Variant *)r_dest;
- Object *obj = (Object *)p_obj;
- Reference *reference = Object::cast_to<Reference>(obj);
+ const Object *obj = (const Object *)p_obj;
+ const Reference *reference = Object::cast_to<Reference>(obj);
REF ref;
if (reference) {
ref = REF(reference);
@@ -229,67 +219,67 @@ void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p
void GDAPI godot_variant_new_dictionary(godot_variant *r_dest, const godot_dictionary *p_dict) {
Variant *dest = (Variant *)r_dest;
- Dictionary *dict = (Dictionary *)p_dict;
+ const Dictionary *dict = (const Dictionary *)p_dict;
memnew_placement_custom(dest, Variant, Variant(*dict));
}
void GDAPI godot_variant_new_array(godot_variant *r_dest, const godot_array *p_arr) {
Variant *dest = (Variant *)r_dest;
- Array *arr = (Array *)p_arr;
+ const Array *arr = (const Array *)p_arr;
memnew_placement_custom(dest, Variant, Variant(*arr));
}
void GDAPI godot_variant_new_packed_byte_array(godot_variant *r_dest, const godot_packed_byte_array *p_pba) {
Variant *dest = (Variant *)r_dest;
- PackedByteArray *pba = (PackedByteArray *)p_pba;
+ const PackedByteArray *pba = (const PackedByteArray *)p_pba;
memnew_placement_custom(dest, Variant, Variant(*pba));
}
void GDAPI godot_variant_new_packed_int32_array(godot_variant *r_dest, const godot_packed_int32_array *p_pia) {
Variant *dest = (Variant *)r_dest;
- PackedInt32Array *pia = (PackedInt32Array *)p_pia;
+ const PackedInt32Array *pia = (const PackedInt32Array *)p_pia;
memnew_placement_custom(dest, Variant, Variant(*pia));
}
void GDAPI godot_variant_new_packed_int64_array(godot_variant *r_dest, const godot_packed_int64_array *p_pia) {
Variant *dest = (Variant *)r_dest;
- PackedInt64Array *pia = (PackedInt64Array *)p_pia;
+ const PackedInt64Array *pia = (const PackedInt64Array *)p_pia;
memnew_placement_custom(dest, Variant, Variant(*pia));
}
void GDAPI godot_variant_new_packed_float32_array(godot_variant *r_dest, const godot_packed_float32_array *p_pra) {
Variant *dest = (Variant *)r_dest;
- PackedFloat32Array *pra = (PackedFloat32Array *)p_pra;
+ const PackedFloat32Array *pra = (const PackedFloat32Array *)p_pra;
memnew_placement_custom(dest, Variant, Variant(*pra));
}
void GDAPI godot_variant_new_packed_float64_array(godot_variant *r_dest, const godot_packed_float64_array *p_pra) {
Variant *dest = (Variant *)r_dest;
- PackedFloat64Array *pra = (PackedFloat64Array *)p_pra;
+ const PackedFloat64Array *pra = (const PackedFloat64Array *)p_pra;
memnew_placement_custom(dest, Variant, Variant(*pra));
}
void GDAPI godot_variant_new_packed_string_array(godot_variant *r_dest, const godot_packed_string_array *p_psa) {
Variant *dest = (Variant *)r_dest;
- PackedStringArray *psa = (PackedStringArray *)p_psa;
+ const PackedStringArray *psa = (const PackedStringArray *)p_psa;
memnew_placement_custom(dest, Variant, Variant(*psa));
}
void GDAPI godot_variant_new_packed_vector2_array(godot_variant *r_dest, const godot_packed_vector2_array *p_pv2a) {
Variant *dest = (Variant *)r_dest;
- PackedVector2Array *pv2a = (PackedVector2Array *)p_pv2a;
+ const PackedVector2Array *pv2a = (const PackedVector2Array *)p_pv2a;
memnew_placement_custom(dest, Variant, Variant(*pv2a));
}
void GDAPI godot_variant_new_packed_vector3_array(godot_variant *r_dest, const godot_packed_vector3_array *p_pv3a) {
Variant *dest = (Variant *)r_dest;
- PackedVector3Array *pv3a = (PackedVector3Array *)p_pv3a;
+ const PackedVector3Array *pv3a = (const PackedVector3Array *)p_pv3a;
memnew_placement_custom(dest, Variant, Variant(*pv3a));
}
void GDAPI godot_variant_new_packed_color_array(godot_variant *r_dest, const godot_packed_color_array *p_pca) {
Variant *dest = (Variant *)r_dest;
- PackedColorArray *pca = (PackedColorArray *)p_pca;
+ const PackedColorArray *pca = (const PackedColorArray *)p_pca;
memnew_placement_custom(dest, Variant, Variant(*pca));
}
@@ -298,17 +288,12 @@ godot_bool GDAPI godot_variant_as_bool(const godot_variant *p_self) {
return self->operator bool();
}
-uint64_t GDAPI godot_variant_as_uint(const godot_variant *p_self) {
- const Variant *self = (const Variant *)p_self;
- return self->operator uint64_t();
-}
-
-int64_t GDAPI godot_variant_as_int(const godot_variant *p_self) {
+godot_int GDAPI godot_variant_as_int(const godot_variant *p_self) {
const Variant *self = (const Variant *)p_self;
return self->operator int64_t();
}
-double GDAPI godot_variant_as_real(const godot_variant *p_self) {
+godot_float GDAPI godot_variant_as_float(const godot_variant *p_self) {
const Variant *self = (const Variant *)p_self;
return self->operator double();
}
@@ -569,47 +554,137 @@ godot_packed_color_array GDAPI godot_variant_as_packed_color_array(const godot_v
return raw_dest;
}
-godot_variant GDAPI godot_variant_call(godot_variant *p_self, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *r_error) {
+void GDAPI godot_variant_destroy(godot_variant *p_self) {
+ Variant *self = (Variant *)p_self;
+ self->~Variant();
+}
+
+// Dynamic interaction.
+
+void GDAPI godot_variant_call(godot_variant *p_self, const godot_string_name *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant *r_return, godot_variant_call_error *r_error) {
Variant *self = (Variant *)p_self;
- String *method = (String *)p_method;
+ const StringName *method = (const StringName *)p_method;
const Variant **args = (const Variant **)p_args;
- godot_variant raw_dest;
- Variant *dest = (Variant *)&raw_dest;
- Callable::CallError error;
Variant ret;
+ Callable::CallError error;
self->call(*method, args, p_argcount, ret, error);
- memnew_placement_custom(dest, Variant, Variant(ret));
+ memnew_placement_custom(r_return, Variant, Variant(ret));
+
if (r_error) {
r_error->error = (godot_variant_call_error_error)error.error;
r_error->argument = error.argument;
r_error->expected = (godot_variant_type)error.expected;
}
- return raw_dest;
}
-godot_bool GDAPI godot_variant_has_method(const godot_variant *p_self, const godot_string *p_method) {
+void GDAPI godot_variant_evaluate(godot_variant_operator p_op, const godot_variant *p_a, const godot_variant *p_b, godot_variant *r_return, bool *r_valid) {
+ Variant::Operator op = (Variant::Operator)p_op;
+ const Variant *a = (const Variant *)p_a;
+ const Variant *b = (const Variant *)p_b;
+ Variant *ret = (Variant *)r_return;
+ Variant::evaluate(op, *a, *b, *ret, *r_valid);
+}
+
+void GDAPI godot_variant_set(godot_variant *p_self, const godot_variant *p_key, const godot_variant *p_value, bool *r_valid) {
+ Variant *self = (Variant *)p_self;
+ const Variant *key = (const Variant *)p_key;
+ const Variant *value = (const Variant *)p_value;
+
+ self->set(*key, *value, r_valid);
+}
+
+void GDAPI godot_variant_set_named(godot_variant *p_self, const godot_string_name *p_name, const godot_variant *p_value, bool *r_valid) {
+ Variant *self = (Variant *)p_self;
+ const StringName *name = (const StringName *)p_name;
+ const Variant *value = (const Variant *)p_value;
+
+ self->set_named(*name, *value, *r_valid);
+}
+
+void GDAPI godot_variant_set_keyed(godot_variant *p_self, const godot_variant *p_key, const godot_variant *p_value, bool *r_valid) {
+ Variant *self = (Variant *)p_self;
+ const Variant *key = (const Variant *)p_key;
+ const Variant *value = (const Variant *)p_value;
+
+ self->set_keyed(*key, *value, *r_valid);
+}
+
+void GDAPI godot_variant_set_indexed(godot_variant *p_self, godot_int p_index, const godot_variant *p_value, bool *r_valid, bool *r_oob) {
+ Variant *self = (Variant *)p_self;
+ const Variant *value = (const Variant *)p_value;
+
+ self->set_indexed(p_index, value, *r_valid, *r_oob);
+}
+
+godot_variant GDAPI godot_variant_get(const godot_variant *p_self, const godot_variant *p_key, bool *r_valid) {
const Variant *self = (const Variant *)p_self;
- const String *method = (const String *)p_method;
- return self->has_method(*method);
+ const Variant *key = (const Variant *)p_key;
+ Variant ret;
+
+ ret = self->get(*key, r_valid);
+ godot_variant result;
+ memnew_placement_custom(&result, Variant, Variant(ret));
+ return result;
}
-godot_bool GDAPI godot_variant_operator_equal(const godot_variant *p_self, const godot_variant *p_other) {
+godot_variant GDAPI godot_variant_get_named(const godot_variant *p_self, const godot_string_name *p_key, bool *r_valid) {
const Variant *self = (const Variant *)p_self;
- const Variant *other = (const Variant *)p_other;
- return self->operator==(*other);
+ const StringName *key = (const StringName *)p_key;
+ Variant ret;
+
+ ret = self->get_named(*key, *r_valid);
+ godot_variant result;
+ memnew_placement_custom(&result, Variant, Variant(ret));
+ return result;
}
-godot_bool GDAPI godot_variant_operator_less(const godot_variant *p_self, const godot_variant *p_other) {
+godot_variant GDAPI godot_variant_get_keyed(const godot_variant *p_self, const godot_variant *p_key, bool *r_valid) {
const Variant *self = (const Variant *)p_self;
- const Variant *other = (const Variant *)p_other;
- return self->operator<(*other);
+ const Variant *key = (const Variant *)p_key;
+ Variant ret;
+
+ ret = self->get_keyed(*key, *r_valid);
+ godot_variant result;
+ memnew_placement_custom(&result, Variant, Variant(ret));
+ return result;
+}
+
+godot_variant GDAPI godot_variant_get_indexed(const godot_variant *p_self, godot_int p_index, bool *r_valid, bool *r_oob) {
+ const Variant *self = (const Variant *)p_self;
+ Variant ret;
+
+ ret = self->get_indexed(p_index, *r_valid, *r_oob);
+ godot_variant result;
+ memnew_placement_custom(&result, Variant, Variant(ret));
+ return result;
}
-uint32_t GDAPI godot_variant_hash(const godot_variant *p_self) {
+/// Iteration.
+bool GDAPI godot_variant_iter_init(const godot_variant *p_self, godot_variant *r_iter, bool *r_valid) {
const Variant *self = (const Variant *)p_self;
- return self->hash();
+ Variant *iter = (Variant *)r_iter;
+
+ return self->iter_init(*iter, *r_valid);
}
+bool GDAPI godot_variant_iter_next(const godot_variant *p_self, godot_variant *r_iter, bool *r_valid) {
+ const Variant *self = (const Variant *)p_self;
+ Variant *iter = (Variant *)r_iter;
+
+ return self->iter_next(*iter, *r_valid);
+}
+
+godot_variant GDAPI godot_variant_iter_get(const godot_variant *p_self, godot_variant *r_iter, bool *r_valid) {
+ const Variant *self = (const Variant *)p_self;
+ Variant *iter = (Variant *)r_iter;
+
+ Variant result = self->iter_next(*iter, *r_valid);
+ godot_variant ret;
+ memnew_placement_custom(&ret, Variant, Variant(result));
+ return ret;
+}
+
+/// Variant functions.
godot_bool GDAPI godot_variant_hash_compare(const godot_variant *p_self, const godot_variant *p_other) {
const Variant *self = (const Variant *)p_self;
const Variant *other = (const Variant *)p_other;
@@ -621,27 +696,503 @@ godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_self) {
return self->booleanize();
}
-void GDAPI godot_variant_destroy(godot_variant *p_self) {
- Variant *self = (Variant *)p_self;
- self->~Variant();
+void GDAPI godot_variant_blend(const godot_variant *p_a, const godot_variant *p_b, float p_c, godot_variant *r_dst) {
+ const Variant *a = (const Variant *)p_a;
+ const Variant *b = (const Variant *)p_b;
+ Variant *dst = (Variant *)r_dst;
+ Variant::blend(*a, *b, p_c, *dst);
}
-// GDNative core 1.1
+void GDAPI godot_variant_interpolate(const godot_variant *p_a, const godot_variant *p_b, float p_c, godot_variant *r_dst) {
+ const Variant *a = (const Variant *)p_a;
+ const Variant *b = (const Variant *)p_b;
+ Variant *dst = (Variant *)r_dst;
+ Variant::interpolate(*a, *b, p_c, *dst);
+}
-godot_string GDAPI godot_variant_get_operator_name(godot_variant_operator p_op) {
- Variant::Operator op = (Variant::Operator)p_op;
- godot_string raw_dest;
- String *dest = (String *)&raw_dest;
- memnew_placement(dest, String(Variant::get_operator_name(op))); // operator = is overloaded by String
- return raw_dest;
+godot_variant GDAPI godot_variant_duplicate(const godot_variant *p_self, godot_bool p_deep) {
+ const Variant *self = (const Variant *)p_self;
+ Variant result = self->duplicate(p_deep);
+ godot_variant ret;
+ memnew_placement_custom(&ret, Variant, Variant(result));
+ return ret;
}
-void GDAPI godot_variant_evaluate(godot_variant_operator p_op, const godot_variant *p_a, const godot_variant *p_b, godot_variant *r_ret, godot_bool *r_valid) {
- Variant::Operator op = (Variant::Operator)p_op;
- const Variant *a = (const Variant *)p_a;
- const Variant *b = (const Variant *)p_b;
+godot_string GDAPI godot_variant_stringify(const godot_variant *p_self) {
+ const Variant *self = (const Variant *)p_self;
+ String result = *self;
+ godot_string ret;
+ memnew_placement_custom(&ret, String, String(result));
+ return ret;
+}
+
+// Discovery API
+
+/// Operators
+godot_validated_operator_evaluator GDAPI godot_variant_get_validated_operator_evaluator(godot_variant_operator p_operator, godot_variant_type p_type_a, godot_variant_type p_type_b) {
+ return (godot_validated_operator_evaluator)Variant::get_validated_operator_evaluator((Variant::Operator)p_operator, (Variant::Type)p_type_a, (Variant::Type)p_type_b);
+}
+
+godot_ptr_operator_evaluator GDAPI godot_variant_get_ptr_operator_evaluator(godot_variant_operator p_operator, godot_variant_type p_type_a, godot_variant_type p_type_b) {
+ return (godot_ptr_operator_evaluator)Variant::get_ptr_operator_evaluator((Variant::Operator)p_operator, (Variant::Type)p_type_a, (Variant::Type)p_type_b);
+}
+
+godot_variant_type GDAPI godot_variant_get_operator_return_type(godot_variant_operator p_operator, godot_variant_type p_type_a, godot_variant_type p_type_b) {
+ return (godot_variant_type)Variant::get_operator_return_type((Variant::Operator)p_operator, (Variant::Type)p_type_a, (Variant::Type)p_type_b);
+}
+
+godot_string GDAPI godot_variant_get_operator_name(godot_variant_operator p_operator) {
+ String op_name = Variant::get_operator_name((Variant::Operator)p_operator);
+ godot_string ret;
+ memnew_placement_custom(&ret, String, String(op_name));
+ return ret;
+}
+
+/// Built-in Methods
+
+bool GDAPI godot_variant_has_builtin_method(godot_variant_type p_type, const godot_string_name *p_method) {
+ return Variant::has_builtin_method((Variant::Type)p_type, *((const StringName *)p_method));
+}
+
+bool GDAPI godot_variant_has_builtin_method_with_cstring(godot_variant_type p_type, const char *p_method) {
+ return Variant::has_builtin_method((Variant::Type)p_type, StringName(p_method));
+}
+
+godot_validated_builtin_method GDAPI godot_variant_get_validated_builtin_method(godot_variant_type p_type, const godot_string_name *p_method) {
+ return (godot_validated_builtin_method)Variant::get_validated_builtin_method((Variant::Type)p_type, *((const StringName *)p_method));
+}
+
+godot_validated_builtin_method GDAPI godot_variant_get_validated_builtin_method_with_cstring(godot_variant_type p_type, const char *p_method) {
+ return (godot_validated_builtin_method)Variant::get_validated_builtin_method((Variant::Type)p_type, StringName(p_method));
+}
+
+godot_ptr_builtin_method GDAPI godot_variant_get_ptr_builtin_method(godot_variant_type p_type, const godot_string_name *p_method) {
+ return (godot_ptr_builtin_method)Variant::get_ptr_builtin_method((Variant::Type)p_type, *((const StringName *)p_method));
+}
+
+godot_ptr_builtin_method GDAPI godot_variant_get_ptr_builtin_method_with_cstring(godot_variant_type p_type, const char *p_method) {
+ return (godot_ptr_builtin_method)Variant::get_ptr_builtin_method((Variant::Type)p_type, StringName(p_method));
+}
+
+int GDAPI godot_variant_get_builtin_method_argument_count(godot_variant_type p_type, const godot_string_name *p_method) {
+ return Variant::get_builtin_method_argument_count((Variant::Type)p_type, *((const StringName *)p_method));
+}
+
+int GDAPI godot_variant_get_builtin_method_argument_count_with_cstring(godot_variant_type p_type, const char *p_method) {
+ return Variant::get_builtin_method_argument_count((Variant::Type)p_type, StringName(p_method));
+}
+
+godot_variant_type GDAPI godot_variant_get_builtin_method_argument_type(godot_variant_type p_type, const godot_string_name *p_method, int p_argument) {
+ return (godot_variant_type)Variant::get_builtin_method_argument_type((Variant::Type)p_type, *((const StringName *)p_method), p_argument);
+}
+
+godot_variant_type GDAPI godot_variant_get_builtin_method_argument_type_with_cstring(godot_variant_type p_type, const char *p_method, int p_argument) {
+ return (godot_variant_type)Variant::get_builtin_method_argument_type((Variant::Type)p_type, StringName(p_method), p_argument);
+}
+
+godot_string GDAPI godot_variant_get_builtin_method_argument_name(godot_variant_type p_type, const godot_string_name *p_method, int p_argument) {
+ String name = Variant::get_builtin_method_argument_name((Variant::Type)p_type, *((const StringName *)p_method), p_argument);
+ return *(godot_string *)&name;
+}
+
+godot_string GDAPI godot_variant_get_builtin_method_argument_name_with_cstring(godot_variant_type p_type, const char *p_method, int p_argument) {
+ String name = Variant::get_builtin_method_argument_name((Variant::Type)p_type, StringName(p_method), p_argument);
+ return *(godot_string *)&name;
+}
+
+bool GDAPI godot_variant_has_builtin_method_return_value(godot_variant_type p_type, const godot_string_name *p_method) {
+ return Variant::has_builtin_method_return_value((Variant::Type)p_type, *((const StringName *)p_method));
+}
+
+bool GDAPI godot_variant_has_builtin_method_return_value_with_cstring(godot_variant_type p_type, const char *p_method) {
+ return Variant::has_builtin_method_return_value((Variant::Type)p_type, StringName(p_method));
+}
+
+godot_variant_type GDAPI godot_variant_get_builtin_method_return_type(godot_variant_type p_type, const godot_string_name *p_method) {
+ return (godot_variant_type)Variant::get_builtin_method_return_type((Variant::Type)p_type, *((const StringName *)p_method));
+}
+
+godot_variant_type GDAPI godot_variant_get_builtin_method_return_type_with_cstring(godot_variant_type p_type, const char *p_method) {
+ return (godot_variant_type)Variant::get_builtin_method_return_type((Variant::Type)p_type, StringName(p_method));
+}
+
+bool GDAPI godot_variant_is_builtin_method_const(godot_variant_type p_type, const godot_string_name *p_method) {
+ return Variant::is_builtin_method_const((Variant::Type)p_type, *((const StringName *)p_method));
+}
+
+bool GDAPI godot_variant_is_builtin_method_const_with_cstring(godot_variant_type p_type, const char *p_method) {
+ return Variant::is_builtin_method_const((Variant::Type)p_type, StringName(p_method));
+}
+
+bool GDAPI godot_variant_is_builtin_method_vararg(godot_variant_type p_type, const godot_string_name *p_method) {
+ return Variant::is_builtin_method_vararg((Variant::Type)p_type, *((const StringName *)p_method));
+}
+
+bool GDAPI godot_variant_is_builtin_method_vararg_with_cstring(godot_variant_type p_type, const char *p_method) {
+ return Variant::is_builtin_method_vararg((Variant::Type)p_type, StringName(p_method));
+}
+
+int GDAPI godot_variant_get_builtin_method_count(godot_variant_type p_type) {
+ return Variant::get_builtin_method_count((Variant::Type)p_type);
+}
+
+void GDAPI godot_variant_get_builtin_method_list(godot_variant_type p_type, godot_string_name *r_list) {
+ List<StringName> list;
+ Variant::get_builtin_method_list((Variant::Type)p_type, &list);
+ int i = 0;
+ for (const List<StringName>::Element *E = list.front(); E; E = E->next()) {
+ memnew_placement_custom(&r_list[i], StringName, StringName(E->get()));
+ }
+}
+
+/// Constructors
+
+int GDAPI godot_variant_get_constructor_count(godot_variant_type p_type) {
+ return Variant::get_constructor_count((Variant::Type)p_type);
+}
+
+godot_validated_constructor GDAPI godot_variant_get_validated_constructor(godot_variant_type p_type, int p_constructor) {
+ return (godot_validated_constructor)Variant::get_validated_constructor((Variant::Type)p_type, p_constructor);
+}
+
+godot_ptr_constructor GDAPI godot_variant_get_ptr_constructor(godot_variant_type p_type, int p_constructor) {
+ return (godot_ptr_constructor)Variant::get_ptr_constructor((Variant::Type)p_type, p_constructor);
+}
+
+int GDAPI godot_variant_get_constructor_argument_count(godot_variant_type p_type, int p_constructor) {
+ return Variant::get_constructor_argument_count((Variant::Type)p_type, p_constructor);
+}
+
+godot_variant_type GDAPI godot_variant_get_constructor_argument_type(godot_variant_type p_type, int p_constructor, int p_argument) {
+ return (godot_variant_type)Variant::get_constructor_argument_type((Variant::Type)p_type, p_constructor, p_argument);
+}
+
+godot_string GDAPI godot_variant_get_constructor_argument_name(godot_variant_type p_type, int p_constructor, int p_argument) {
+ String name = Variant::get_constructor_argument_name((Variant::Type)p_type, p_constructor, p_argument);
+ godot_string ret;
+ memnew_placement(&ret, String(name));
+ return ret;
+}
+
+void GDAPI godot_variant_construct(godot_variant_type p_type, godot_variant *p_base, const godot_variant **p_args, int p_argcount, godot_variant_call_error *r_error) {
+ Variant::construct((Variant::Type)p_type, *((Variant *)p_base), (const Variant **)p_args, p_argcount, *((Callable::CallError *)r_error));
+}
+
+/// Properties.
+godot_variant_type GDAPI godot_variant_get_member_type(godot_variant_type p_type, const godot_string_name *p_member) {
+ return (godot_variant_type)Variant::get_member_type((Variant::Type)p_type, *((const StringName *)p_member));
+}
+
+godot_variant_type GDAPI godot_variant_get_member_type_with_cstring(godot_variant_type p_type, const char *p_member) {
+ return (godot_variant_type)Variant::get_member_type((Variant::Type)p_type, StringName(p_member));
+}
+
+int GDAPI godot_variant_get_member_count(godot_variant_type p_type) {
+ return Variant::get_member_count((Variant::Type)p_type);
+}
+
+void GDAPI godot_variant_get_member_list(godot_variant_type p_type, godot_string_name *r_list) {
+ List<StringName> members;
+ Variant::get_member_list((Variant::Type)p_type, &members);
+ int i = 0;
+ for (const List<StringName>::Element *E = members.front(); E; E = E->next()) {
+ memnew_placement_custom(&r_list[i++], StringName, StringName(E->get()));
+ }
+}
+
+godot_validated_setter GDAPI godot_variant_get_validated_setter(godot_variant_type p_type, const godot_string_name *p_member) {
+ return (godot_validated_setter)Variant::get_member_validated_setter((Variant::Type)p_type, *((const StringName *)p_member));
+}
+
+godot_validated_setter GDAPI godot_variant_get_validated_setter_with_cstring(godot_variant_type p_type, const char *p_member) {
+ return (godot_validated_setter)Variant::get_member_validated_setter((Variant::Type)p_type, StringName(p_member));
+}
+
+godot_validated_getter GDAPI godot_variant_get_validated_getter(godot_variant_type p_type, const godot_string_name *p_member) {
+ return (godot_validated_getter)Variant::get_member_validated_getter((Variant::Type)p_type, *((const StringName *)p_member));
+}
+
+godot_validated_getter GDAPI godot_variant_get_validated_getter_with_cstring(godot_variant_type p_type, const char *p_member) {
+ return (godot_validated_getter)Variant::get_member_validated_getter((Variant::Type)p_type, StringName(p_member));
+}
+
+godot_ptr_setter GDAPI godot_variant_get_ptr_setter(godot_variant_type p_type, const godot_string_name *p_member) {
+ return (godot_ptr_setter)Variant::get_member_ptr_setter((Variant::Type)p_type, *((const StringName *)p_member));
+}
+
+godot_ptr_setter GDAPI godot_variant_get_ptr_setter_with_cstring(godot_variant_type p_type, const char *p_member) {
+ return (godot_ptr_setter)Variant::get_member_ptr_setter((Variant::Type)p_type, StringName(p_member));
+}
+
+godot_ptr_getter GDAPI godot_variant_get_ptr_getter(godot_variant_type p_type, const godot_string_name *p_member) {
+ return (godot_ptr_getter)Variant::get_member_ptr_getter((Variant::Type)p_type, *((const StringName *)p_member));
+}
+
+godot_ptr_getter GDAPI godot_variant_get_ptr_getter_with_cstring(godot_variant_type p_type, const char *p_member) {
+ return (godot_ptr_getter)Variant::get_member_ptr_getter((Variant::Type)p_type, StringName(p_member));
+}
+
+/// Indexing.
+bool GDAPI godot_variant_has_indexing(godot_variant_type p_type) {
+ return Variant::has_indexing((Variant::Type)p_type);
+}
+
+godot_variant_type GDAPI godot_variant_get_indexed_element_type(godot_variant_type p_type) {
+ return (godot_variant_type)Variant::get_indexed_element_type((Variant::Type)p_type);
+}
+
+godot_validated_indexed_setter GDAPI godot_variant_get_validated_indexed_setter(godot_variant_type p_type) {
+ return (godot_validated_indexed_setter)Variant::get_member_validated_indexed_setter((Variant::Type)p_type);
+}
+
+godot_validated_indexed_getter GDAPI godot_variant_get_validated_indexed_getter(godot_variant_type p_type) {
+ return (godot_validated_indexed_getter)Variant::get_member_validated_indexed_getter((Variant::Type)p_type);
+}
+
+godot_ptr_indexed_setter GDAPI godot_variant_get_ptr_indexed_setter(godot_variant_type p_type) {
+ return (godot_ptr_indexed_setter)Variant::get_member_ptr_indexed_setter((Variant::Type)p_type);
+}
+
+godot_ptr_indexed_getter GDAPI godot_variant_get_ptr_indexed_getter(godot_variant_type p_type) {
+ return (godot_ptr_indexed_getter)Variant::get_member_ptr_indexed_getter((Variant::Type)p_type);
+}
+
+uint64_t GDAPI godot_variant_get_indexed_size(const godot_variant *p_self) {
+ const Variant *self = (const Variant *)p_self;
+ return self->get_indexed_size();
+}
+
+/// Keying.
+bool GDAPI godot_variant_is_keyed(godot_variant_type p_type) {
+ return Variant::is_keyed((Variant::Type)p_type);
+}
+
+godot_validated_keyed_setter GDAPI godot_variant_get_validated_keyed_setter(godot_variant_type p_type) {
+ return (godot_validated_keyed_setter)Variant::get_member_validated_keyed_setter((Variant::Type)p_type);
+}
+
+godot_validated_keyed_getter GDAPI godot_variant_get_validated_keyed_getter(godot_variant_type p_type) {
+ return (godot_validated_keyed_getter)Variant::get_member_validated_keyed_getter((Variant::Type)p_type);
+}
+
+godot_validated_keyed_checker GDAPI godot_variant_get_validated_keyed_checker(godot_variant_type p_type) {
+ return (godot_validated_keyed_checker)Variant::get_member_validated_keyed_checker((Variant::Type)p_type);
+}
+
+godot_ptr_keyed_setter GDAPI godot_variant_get_ptr_keyed_setter(godot_variant_type p_type) {
+ return (godot_ptr_keyed_setter)Variant::get_member_ptr_keyed_setter((Variant::Type)p_type);
+}
+
+godot_ptr_keyed_getter GDAPI godot_variant_get_ptr_keyed_getter(godot_variant_type p_type) {
+ return (godot_ptr_keyed_getter)Variant::get_member_ptr_keyed_getter((Variant::Type)p_type);
+}
+
+godot_ptr_keyed_checker GDAPI godot_variant_get_ptr_keyed_checker(godot_variant_type p_type) {
+ return (godot_ptr_keyed_checker)Variant::get_member_ptr_keyed_checker((Variant::Type)p_type);
+}
+
+/// Constants.
+int GDAPI godot_variant_get_constants_count(godot_variant_type p_type) {
+ return Variant::get_constants_count_for_type((Variant::Type)p_type);
+}
+
+void GDAPI godot_variant_get_constants_list(godot_variant_type p_type, godot_string_name *r_list) {
+ List<StringName> constants;
+ int i = 0;
+ Variant::get_constants_for_type((Variant::Type)p_type, &constants);
+ for (const List<StringName>::Element *E = constants.front(); E; E = E->next()) {
+ memnew_placement_custom(&r_list[i++], StringName, StringName(E->get()));
+ }
+}
+
+bool GDAPI godot_variant_has_constant(godot_variant_type p_type, const godot_string_name *p_constant) {
+ return Variant::has_constant((Variant::Type)p_type, *((const StringName *)p_constant));
+}
+
+bool GDAPI godot_variant_has_constant_with_cstring(godot_variant_type p_type, const char *p_constant) {
+ return Variant::has_constant((Variant::Type)p_type, StringName(p_constant));
+}
+
+godot_variant GDAPI godot_variant_get_constant_value(godot_variant_type p_type, const godot_string_name *p_constant) {
+ Variant constant = Variant::get_constant_value((Variant::Type)p_type, *((const StringName *)p_constant));
+ godot_variant ret;
+ memnew_placement_custom(&ret, Variant, Variant(constant));
+ return ret;
+}
+
+godot_variant GDAPI godot_variant_get_constant_value_with_cstring(godot_variant_type p_type, const char *p_constant) {
+ Variant constant = Variant::get_constant_value((Variant::Type)p_type, StringName(p_constant));
+ godot_variant ret;
+ memnew_placement_custom(&ret, Variant, Variant(constant));
+ return ret;
+}
+
+/// Utilities.
+bool GDAPI godot_variant_has_utility_function(const godot_string_name *p_function) {
+ return Variant::has_utility_function(*((const StringName *)p_function));
+}
+
+bool GDAPI godot_variant_has_utility_function_with_cstring(const char *p_function) {
+ return Variant::has_utility_function(StringName(p_function));
+}
+
+void GDAPI godot_variant_call_utility_function(const godot_string_name *p_function, godot_variant *r_ret, const godot_variant **p_args, int p_argument_count, godot_variant_call_error *r_error) {
+ const StringName *function = (const StringName *)p_function;
Variant *ret = (Variant *)r_ret;
- Variant::evaluate(op, *a, *b, *ret, *r_valid);
+ const Variant **args = (const Variant **)p_args;
+ Callable::CallError error;
+
+ Variant::call_utility_function(*function, ret, args, p_argument_count, error);
+
+ if (r_error) {
+ r_error->error = (godot_variant_call_error_error)error.error;
+ r_error->argument = error.argument;
+ r_error->expected = (godot_variant_type)error.expected;
+ }
+}
+
+void GDAPI godot_variant_call_utility_function_with_cstring(const char *p_function, godot_variant *r_ret, const godot_variant **p_args, int p_argument_count, godot_variant_call_error *r_error) {
+ Variant *ret = (Variant *)r_ret;
+ const Variant **args = (const Variant **)p_args;
+ Callable::CallError error;
+
+ Variant::call_utility_function(StringName(p_function), ret, args, p_argument_count, error);
+
+ if (r_error) {
+ r_error->error = (godot_variant_call_error_error)error.error;
+ r_error->argument = error.argument;
+ r_error->expected = (godot_variant_type)error.expected;
+ }
+}
+
+godot_ptr_utility_function GDAPI godot_variant_get_ptr_utility_function(const godot_string_name *p_function) {
+ return (godot_ptr_utility_function)Variant::get_ptr_utility_function(*((const StringName *)p_function));
+}
+
+godot_ptr_utility_function GDAPI godot_variant_get_ptr_utility_function_with_cstring(const char *p_function) {
+ return (godot_ptr_utility_function)Variant::get_ptr_utility_function(StringName(p_function));
+}
+
+godot_validated_utility_function GDAPI godot_variant_get_validated_utility_function(const godot_string_name *p_function) {
+ return (godot_validated_utility_function)Variant::get_validated_utility_function(*((const StringName *)p_function));
+}
+
+godot_validated_utility_function GDAPI godot_variant_get_validated_utility_function_with_cstring(const char *p_function) {
+ return (godot_validated_utility_function)Variant::get_validated_utility_function(StringName(p_function));
+}
+
+godot_variant_utility_function_type GDAPI godot_variant_get_utility_function_type(const godot_string_name *p_function) {
+ return (godot_variant_utility_function_type)Variant::get_utility_function_type(*((const StringName *)p_function));
+}
+
+godot_variant_utility_function_type GDAPI godot_variant_get_utility_function_type_with_cstring(const char *p_function) {
+ return (godot_variant_utility_function_type)Variant::get_utility_function_type(StringName(p_function));
+}
+
+int GDAPI godot_variant_get_utility_function_argument_count(const godot_string_name *p_function) {
+ return Variant::get_utility_function_argument_count(*((const StringName *)p_function));
+}
+
+int GDAPI godot_variant_get_utility_function_argument_count_with_cstring(const char *p_function) {
+ return Variant::get_utility_function_argument_count(StringName(p_function));
+}
+
+godot_variant_type GDAPI godot_variant_get_utility_function_argument_type(const godot_string_name *p_function, int p_argument) {
+ return (godot_variant_type)Variant::get_utility_function_argument_type(*((const StringName *)p_function), p_argument);
+}
+
+godot_variant_type GDAPI godot_variant_get_utility_function_argument_type_with_cstring(const char *p_function, int p_argument) {
+ return (godot_variant_type)Variant::get_utility_function_argument_type(StringName(p_function), p_argument);
+}
+
+godot_string GDAPI godot_variant_get_utility_function_argument_name(const godot_string_name *p_function, int p_argument) {
+ String argument_name = Variant::get_utility_function_argument_name(*((const StringName *)p_function), p_argument);
+ godot_string ret;
+ memnew_placement_custom(&ret, String, String(argument_name));
+ return ret;
+}
+
+godot_string GDAPI godot_variant_get_utility_function_argument_name_with_cstring(const char *p_function, int p_argument) {
+ String argument_name = Variant::get_utility_function_argument_name(StringName(p_function), p_argument);
+ godot_string ret;
+ memnew_placement_custom(&ret, String, String(argument_name));
+ return ret;
+}
+
+bool GDAPI godot_variant_has_utility_function_return_value(const godot_string_name *p_function) {
+ return Variant::has_utility_function_return_value(*((const StringName *)p_function));
+}
+
+bool GDAPI godot_variant_has_utility_function_return_value_with_cstring(const char *p_function) {
+ return Variant::has_utility_function_return_value(StringName(p_function));
+}
+
+godot_variant_type GDAPI godot_variant_get_utility_function_return_type(const godot_string_name *p_function) {
+ return (godot_variant_type)Variant::get_utility_function_return_type(*((const StringName *)p_function));
+}
+
+godot_variant_type GDAPI godot_variant_get_utility_function_return_type_with_cstring(const char *p_function) {
+ return (godot_variant_type)Variant::get_utility_function_return_type(StringName(p_function));
+}
+
+bool GDAPI godot_variant_is_utility_function_vararg(const godot_string_name *p_function) {
+ return Variant::is_utility_function_vararg(*((const StringName *)p_function));
+}
+
+bool GDAPI godot_variant_is_utility_function_vararg_with_cstring(const char *p_function) {
+ return Variant::is_utility_function_vararg(StringName(p_function));
+}
+
+int GDAPI godot_variant_get_utility_function_count() {
+ return Variant::get_utility_function_count();
+}
+
+void GDAPI godot_variant_get_utility_function_list(godot_string_name *r_functions) {
+ List<StringName> functions;
+ godot_string_name *func = r_functions;
+ Variant::get_utility_function_list(&functions);
+
+ for (const List<StringName>::Element *E = functions.front(); E; E = E->next()) {
+ memnew_placement_custom(func++, StringName, StringName(E->get()));
+ }
+}
+
+// Introspection.
+
+godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_self) {
+ const Variant *self = (const Variant *)p_self;
+ return (godot_variant_type)self->get_type();
+}
+
+bool GDAPI godot_variant_has_method(const godot_variant *p_self, const godot_string_name *p_method) {
+ const Variant *self = (const Variant *)p_self;
+ const StringName *method = (const StringName *)p_method;
+ return self->has_method(*method);
+}
+
+bool GDAPI godot_variant_has_member(godot_variant_type p_type, const godot_string_name *p_member) {
+ return Variant::has_member((Variant::Type)p_type, *((const StringName *)p_member));
+}
+
+bool GDAPI godot_variant_has_key(const godot_variant *p_self, const godot_variant *p_key, bool *r_valid) {
+ const Variant *self = (const Variant *)p_self;
+ const Variant *key = (const Variant *)p_key;
+ return self->has_key(*key, *r_valid);
+}
+
+godot_string GDAPI godot_variant_get_type_name(godot_variant_type p_type) {
+ String name = Variant::get_type_name((Variant::Type)p_type);
+ godot_string ret;
+ memnew_placement_custom(&ret, String, String(name));
+ return ret;
+}
+
+bool GDAPI godot_variant_can_convert(godot_variant_type p_from, godot_variant_type p_to) {
+ return Variant::can_convert((Variant::Type)p_from, (Variant::Type)p_to);
+}
+
+bool GDAPI godot_variant_can_convert_strict(godot_variant_type p_from, godot_variant_type p_to) {
+ return Variant::can_convert_strict((Variant::Type)p_from, (Variant::Type)p_to);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/vector2.cpp b/modules/gdnative/gdnative/vector2.cpp
index 6f42935228..ebb1996649 100644
--- a/modules/gdnative/gdnative/vector2.cpp
+++ b/modules/gdnative/gdnative/vector2.cpp
@@ -31,430 +31,40 @@
#include "gdnative/vector2.h"
#include "core/math/vector2.h"
-#include "core/variant/variant.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
static_assert(sizeof(godot_vector2) == sizeof(Vector2), "Vector2 size mismatch");
static_assert(sizeof(godot_vector2i) == sizeof(Vector2i), "Vector2i size mismatch");
-// Vector2
-
-void GDAPI godot_vector2_new(godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y) {
- Vector2 *dest = (Vector2 *)r_dest;
- *dest = Vector2(p_x, p_y);
-}
-
-godot_string GDAPI godot_vector2_as_string(const godot_vector2 *p_self) {
- godot_string ret;
- const Vector2 *self = (const Vector2 *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_vector2i GDAPI godot_vector2_as_vector2i(const godot_vector2 *p_self) {
- godot_vector2i dest;
- const Vector2 *self = (const Vector2 *)p_self;
- *((Vector2i *)&dest) = Vector2i(*self);
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_normalized(const godot_vector2 *p_self) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- *((Vector2 *)&dest) = self->normalized();
- return dest;
-}
-
-godot_real GDAPI godot_vector2_length(const godot_vector2 *p_self) {
- const Vector2 *self = (const Vector2 *)p_self;
- return self->length();
-}
-
-godot_real GDAPI godot_vector2_angle(const godot_vector2 *p_self) {
- const Vector2 *self = (const Vector2 *)p_self;
- return self->angle();
-}
-
-godot_real GDAPI godot_vector2_length_squared(const godot_vector2 *p_self) {
- const Vector2 *self = (const Vector2 *)p_self;
- return self->length_squared();
-}
-
-godot_bool GDAPI godot_vector2_is_normalized(const godot_vector2 *p_self) {
- const Vector2 *self = (const Vector2 *)p_self;
- return self->is_normalized();
-}
-
-godot_vector2 GDAPI godot_vector2_direction_to(const godot_vector2 *p_self, const godot_vector2 *p_to) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *to = (const Vector2 *)p_to;
- *((Vector2 *)&dest) = self->direction_to(*to);
- return dest;
-}
-
-godot_real GDAPI godot_vector2_distance_to(const godot_vector2 *p_self, const godot_vector2 *p_to) {
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *to = (const Vector2 *)p_to;
- return self->distance_to(*to);
-}
-
-godot_real GDAPI godot_vector2_distance_squared_to(const godot_vector2 *p_self, const godot_vector2 *p_to) {
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *to = (const Vector2 *)p_to;
- return self->distance_squared_to(*to);
-}
-
-godot_real GDAPI godot_vector2_angle_to(const godot_vector2 *p_self, const godot_vector2 *p_to) {
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *to = (const Vector2 *)p_to;
- return self->angle_to(*to);
-}
-
-godot_real GDAPI godot_vector2_angle_to_point(const godot_vector2 *p_self, const godot_vector2 *p_to) {
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *to = (const Vector2 *)p_to;
- return self->angle_to_point(*to);
-}
-
-godot_vector2 GDAPI godot_vector2_lerp(const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_real p_t) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *b = (const Vector2 *)p_b;
- *((Vector2 *)&dest) = self->lerp(*b, p_t);
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_cubic_interpolate(const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_vector2 *p_pre_a, const godot_vector2 *p_post_b, const godot_real p_t) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *b = (const Vector2 *)p_b;
- const Vector2 *pre_a = (const Vector2 *)p_pre_a;
- const Vector2 *post_b = (const Vector2 *)p_post_b;
- *((Vector2 *)&dest) = self->cubic_interpolate(*b, *pre_a, *post_b, p_t);
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_move_toward(const godot_vector2 *p_self, const godot_vector2 *p_to, const godot_real p_delta) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *to = (const Vector2 *)p_to;
- *((Vector2 *)&dest) = self->move_toward(*to, p_delta);
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_rotated(const godot_vector2 *p_self, const godot_real p_phi) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
-
- *((Vector2 *)&dest) = self->rotated(p_phi);
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_orthogonal(const godot_vector2 *p_self) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- *((Vector2 *)&dest) = self->orthogonal();
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_floor(const godot_vector2 *p_self) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- *((Vector2 *)&dest) = self->floor();
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_sign(const godot_vector2 *p_self) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- *((Vector2 *)&dest) = self->sign();
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_snapped(const godot_vector2 *p_self, const godot_vector2 *p_by) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *by = (const Vector2 *)p_by;
- *((Vector2 *)&dest) = self->snapped(*by);
- return dest;
-}
-
-godot_real GDAPI godot_vector2_aspect(const godot_vector2 *p_self) {
- const Vector2 *self = (const Vector2 *)p_self;
- return self->aspect();
-}
-
-godot_real GDAPI godot_vector2_dot(const godot_vector2 *p_self, const godot_vector2 *p_with) {
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *with = (const Vector2 *)p_with;
- return self->dot(*with);
-}
-
-godot_vector2 GDAPI godot_vector2_slide(const godot_vector2 *p_self, const godot_vector2 *p_n) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *n = (const Vector2 *)p_n;
- *((Vector2 *)&dest) = self->slide(*n);
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_bounce(const godot_vector2 *p_self, const godot_vector2 *p_n) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *n = (const Vector2 *)p_n;
- *((Vector2 *)&dest) = self->bounce(*n);
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_reflect(const godot_vector2 *p_self, const godot_vector2 *p_n) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *n = (const Vector2 *)p_n;
- *((Vector2 *)&dest) = self->reflect(*n);
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_abs(const godot_vector2 *p_self) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
- *((Vector2 *)&dest) = self->abs();
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_clamped(const godot_vector2 *p_self, const godot_real p_length) {
- godot_vector2 dest;
- const Vector2 *self = (const Vector2 *)p_self;
-
- *((Vector2 *)&dest) = self->clamped(p_length);
- return dest;
-}
-
-godot_vector2 GDAPI godot_vector2_operator_add(const godot_vector2 *p_self, const godot_vector2 *p_b) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *b = (const Vector2 *)p_b;
- *dest = *self + *b;
- return raw_dest;
-}
-
-godot_vector2 GDAPI godot_vector2_operator_subtract(const godot_vector2 *p_self, const godot_vector2 *p_b) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *b = (const Vector2 *)p_b;
- *dest = *self - *b;
- return raw_dest;
-}
-
-godot_vector2 GDAPI godot_vector2_operator_multiply_vector(const godot_vector2 *p_self, const godot_vector2 *p_b) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *b = (const Vector2 *)p_b;
- *dest = *self * *b;
- return raw_dest;
-}
-
-godot_vector2 GDAPI godot_vector2_operator_multiply_scalar(const godot_vector2 *p_self, const godot_real p_b) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Vector2 *self = (const Vector2 *)p_self;
- *dest = *self * p_b;
- return raw_dest;
-}
-
-godot_vector2 GDAPI godot_vector2_operator_divide_vector(const godot_vector2 *p_self, const godot_vector2 *p_b) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *b = (const Vector2 *)p_b;
- *dest = *self / *b;
- return raw_dest;
-}
-
-godot_vector2 GDAPI godot_vector2_operator_divide_scalar(const godot_vector2 *p_self, const godot_real p_b) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Vector2 *self = (const Vector2 *)p_self;
- *dest = *self / p_b;
- return raw_dest;
-}
-
-godot_bool GDAPI godot_vector2_operator_equal(const godot_vector2 *p_self, const godot_vector2 *p_b) {
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *b = (const Vector2 *)p_b;
- return *self == *b;
-}
-
-godot_bool GDAPI godot_vector2_operator_less(const godot_vector2 *p_self, const godot_vector2 *p_b) {
- const Vector2 *self = (const Vector2 *)p_self;
- const Vector2 *b = (const Vector2 *)p_b;
- return *self < *b;
-}
+#ifdef __cplusplus
+extern "C" {
+#endif
-godot_vector2 GDAPI godot_vector2_operator_neg(const godot_vector2 *p_self) {
- godot_vector2 raw_dest;
- Vector2 *dest = (Vector2 *)&raw_dest;
- const Vector2 *self = (const Vector2 *)p_self;
- *dest = -(*self);
- return raw_dest;
+void GDAPI godot_vector2_new(godot_vector2 *p_self) {
+ memnew_placement(p_self, Vector2);
}
-void GDAPI godot_vector2_set_x(godot_vector2 *p_self, const godot_real p_x) {
- Vector2 *self = (Vector2 *)p_self;
- self->x = p_x;
+void GDAPI godot_vector2i_new(godot_vector2i *p_self) {
+ memnew_placement(p_self, Vector2i);
}
-void GDAPI godot_vector2_set_y(godot_vector2 *p_self, const godot_real p_y) {
+godot_real_t GDAPI *godot_vector2_operator_index(godot_vector2 *p_self, godot_int p_index) {
Vector2 *self = (Vector2 *)p_self;
- self->y = p_y;
+ return (godot_real_t *)&self->operator[](p_index);
}
-godot_real GDAPI godot_vector2_get_x(const godot_vector2 *p_self) {
+const godot_real_t GDAPI *godot_vector2_operator_index_const(const godot_vector2 *p_self, godot_int p_index) {
const Vector2 *self = (const Vector2 *)p_self;
- return self->x;
-}
-
-godot_real GDAPI godot_vector2_get_y(const godot_vector2 *p_self) {
- const Vector2 *self = (const Vector2 *)p_self;
- return self->y;
-}
-
-// Vector2i
-
-void GDAPI godot_vector2i_new(godot_vector2i *r_dest, const godot_int p_x, const godot_int p_y) {
- Vector2i *dest = (Vector2i *)r_dest;
- *dest = Vector2i(p_x, p_y);
-}
-
-godot_string GDAPI godot_vector2i_as_string(const godot_vector2i *p_self) {
- godot_string ret;
- const Vector2i *self = (const Vector2i *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_vector2 GDAPI godot_vector2i_as_vector2(const godot_vector2i *p_self) {
- godot_vector2 dest;
- const Vector2i *self = (const Vector2i *)p_self;
- *((Vector2 *)&dest) = Vector2(*self);
- return dest;
-}
-
-godot_real GDAPI godot_vector2i_aspect(const godot_vector2i *p_self) {
- const Vector2i *self = (const Vector2i *)p_self;
- return self->aspect();
-}
-
-godot_vector2i GDAPI godot_vector2i_abs(const godot_vector2i *p_self) {
- godot_vector2i dest;
- const Vector2i *self = (const Vector2i *)p_self;
- *((Vector2i *)&dest) = self->abs();
- return dest;
-}
-
-godot_vector2i GDAPI godot_vector2i_sign(const godot_vector2i *p_self) {
- godot_vector2i dest;
- const Vector2i *self = (const Vector2i *)p_self;
- *((Vector2i *)&dest) = self->sign();
- return dest;
-}
-
-godot_vector2i GDAPI godot_vector2i_operator_add(const godot_vector2i *p_self, const godot_vector2i *p_b) {
- godot_vector2i raw_dest;
- Vector2i *dest = (Vector2i *)&raw_dest;
- const Vector2i *self = (const Vector2i *)p_self;
- const Vector2i *b = (const Vector2i *)p_b;
- *dest = *self + *b;
- return raw_dest;
-}
-
-godot_vector2i GDAPI godot_vector2i_operator_subtract(const godot_vector2i *p_self, const godot_vector2i *p_b) {
- godot_vector2i raw_dest;
- Vector2i *dest = (Vector2i *)&raw_dest;
- const Vector2i *self = (const Vector2i *)p_self;
- const Vector2i *b = (const Vector2i *)p_b;
- *dest = *self - *b;
- return raw_dest;
-}
-
-godot_vector2i GDAPI godot_vector2i_operator_multiply_vector(const godot_vector2i *p_self, const godot_vector2i *p_b) {
- godot_vector2i raw_dest;
- Vector2i *dest = (Vector2i *)&raw_dest;
- const Vector2i *self = (const Vector2i *)p_self;
- const Vector2i *b = (const Vector2i *)p_b;
- *dest = *self * *b;
- return raw_dest;
-}
-
-godot_vector2i GDAPI godot_vector2i_operator_multiply_scalar(const godot_vector2i *p_self, const godot_int p_b) {
- godot_vector2i raw_dest;
- Vector2i *dest = (Vector2i *)&raw_dest;
- const Vector2i *self = (const Vector2i *)p_self;
- *dest = *self * p_b;
- return raw_dest;
+ return (const godot_real_t *)&self->operator[](p_index);
}
-godot_vector2i GDAPI godot_vector2i_operator_divide_vector(const godot_vector2i *p_self, const godot_vector2i *p_b) {
- godot_vector2i raw_dest;
- Vector2i *dest = (Vector2i *)&raw_dest;
- const Vector2i *self = (const Vector2i *)p_self;
- const Vector2i *b = (const Vector2i *)p_b;
- *dest = *self / *b;
- return raw_dest;
-}
-
-godot_vector2i GDAPI godot_vector2i_operator_divide_scalar(const godot_vector2i *p_self, const godot_int p_b) {
- godot_vector2i raw_dest;
- Vector2i *dest = (Vector2i *)&raw_dest;
- const Vector2i *self = (const Vector2i *)p_self;
- *dest = *self / p_b;
- return raw_dest;
-}
-
-godot_bool GDAPI godot_vector2i_operator_equal(const godot_vector2i *p_self, const godot_vector2i *p_b) {
- const Vector2i *self = (const Vector2i *)p_self;
- const Vector2i *b = (const Vector2i *)p_b;
- return *self == *b;
-}
-
-godot_bool GDAPI godot_vector2i_operator_less(const godot_vector2i *p_self, const godot_vector2i *p_b) {
- const Vector2i *self = (const Vector2i *)p_self;
- const Vector2i *b = (const Vector2i *)p_b;
- return *self < *b;
-}
-
-godot_vector2i GDAPI godot_vector2i_operator_neg(const godot_vector2i *p_self) {
- godot_vector2i raw_dest;
- Vector2i *dest = (Vector2i *)&raw_dest;
- const Vector2i *self = (const Vector2i *)p_self;
- *dest = -(*self);
- return raw_dest;
-}
-
-void GDAPI godot_vector2i_set_x(godot_vector2i *p_self, const godot_int p_x) {
- Vector2i *self = (Vector2i *)p_self;
- self->x = p_x;
-}
-
-void GDAPI godot_vector2i_set_y(godot_vector2i *p_self, const godot_int p_y) {
+int32_t GDAPI *godot_vector2i_operator_index(godot_vector2i *p_self, godot_int p_index) {
Vector2i *self = (Vector2i *)p_self;
- self->y = p_y;
-}
-
-godot_int GDAPI godot_vector2i_get_x(const godot_vector2i *p_self) {
- const Vector2i *self = (const Vector2i *)p_self;
- return self->x;
+ return (int32_t *)&self->operator[](p_index);
}
-godot_int GDAPI godot_vector2i_get_y(const godot_vector2i *p_self) {
+const int32_t GDAPI *godot_vector2i_operator_index_const(const godot_vector2i *p_self, godot_int p_index) {
const Vector2i *self = (const Vector2i *)p_self;
- return self->y;
+ return (const int32_t *)&self->operator[](p_index);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/vector3.cpp b/modules/gdnative/gdnative/vector3.cpp
index 75aeb59c87..0fe1b292a7 100644
--- a/modules/gdnative/gdnative/vector3.cpp
+++ b/modules/gdnative/gdnative/vector3.cpp
@@ -30,433 +30,41 @@
#include "gdnative/vector3.h"
-#include "core/templates/vector.h"
-#include "core/variant/variant.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include "core/math/vector3.h"
static_assert(sizeof(godot_vector3) == sizeof(Vector3), "Vector3 size mismatch");
static_assert(sizeof(godot_vector3i) == sizeof(Vector3i), "Vector3i size mismatch");
-// Vector3
-
-void GDAPI godot_vector3_new(godot_vector3 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z) {
- Vector3 *dest = (Vector3 *)r_dest;
- *dest = Vector3(p_x, p_y, p_z);
-}
-
-godot_string GDAPI godot_vector3_as_string(const godot_vector3 *p_self) {
- godot_string ret;
- const Vector3 *self = (const Vector3 *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_vector3i GDAPI godot_vector3_as_vector3i(const godot_vector3 *p_self) {
- godot_vector3i dest;
- const Vector3 *self = (const Vector3 *)p_self;
- *((Vector3i *)&dest) = Vector3i(*self);
- return dest;
-}
-
-godot_int GDAPI godot_vector3_min_axis(const godot_vector3 *p_self) {
- const Vector3 *self = (const Vector3 *)p_self;
- return self->min_axis();
-}
-
-godot_int GDAPI godot_vector3_max_axis(const godot_vector3 *p_self) {
- const Vector3 *self = (const Vector3 *)p_self;
- return self->max_axis();
-}
-
-godot_real GDAPI godot_vector3_length(const godot_vector3 *p_self) {
- const Vector3 *self = (const Vector3 *)p_self;
- return self->length();
-}
-
-godot_real GDAPI godot_vector3_length_squared(const godot_vector3 *p_self) {
- const Vector3 *self = (const Vector3 *)p_self;
- return self->length_squared();
-}
-
-godot_bool GDAPI godot_vector3_is_normalized(const godot_vector3 *p_self) {
- const Vector3 *self = (const Vector3 *)p_self;
- return self->is_normalized();
-}
-
-godot_vector3 GDAPI godot_vector3_normalized(const godot_vector3 *p_self) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- *((Vector3 *)&dest) = self->normalized();
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_inverse(const godot_vector3 *p_self) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- *((Vector3 *)&dest) = self->inverse();
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_vector3 *p_by) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *snap_axis = (const Vector3 *)p_by;
-
- *((Vector3 *)&dest) = self->snapped(*snap_axis);
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_rotated(const godot_vector3 *p_self, const godot_vector3 *p_axis, const godot_real p_phi) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *axis = (const Vector3 *)p_axis;
- *((Vector3 *)&dest) = self->rotated(*axis, p_phi);
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_lerp(const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_real p_t) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- *((Vector3 *)&dest) = self->lerp(*b, p_t);
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_cubic_interpolate(const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_vector3 *p_pre_a, const godot_vector3 *p_post_b, const godot_real p_t) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- const Vector3 *pre_a = (const Vector3 *)p_pre_a;
- const Vector3 *post_b = (const Vector3 *)p_post_b;
- *((Vector3 *)&dest) = self->cubic_interpolate(*b, *pre_a, *post_b, p_t);
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_move_toward(const godot_vector3 *p_self, const godot_vector3 *p_to, const godot_real p_delta) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *to = (const Vector3 *)p_to;
- *((Vector3 *)&dest) = self->move_toward(*to, p_delta);
- return dest;
-}
-
-godot_real GDAPI godot_vector3_dot(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- return self->dot(*b);
-}
-
-godot_vector3 GDAPI godot_vector3_cross(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- *((Vector3 *)&dest) = self->cross(*b);
- return dest;
-}
-
-godot_basis GDAPI godot_vector3_outer(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- godot_basis dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- *((Basis *)&dest) = self->outer(*b);
- return dest;
-}
-
-godot_basis GDAPI godot_vector3_to_diagonal_matrix(const godot_vector3 *p_self) {
- godot_basis dest;
- const Vector3 *self = (const Vector3 *)p_self;
- *((Basis *)&dest) = self->to_diagonal_matrix();
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_abs(const godot_vector3 *p_self) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- *((Vector3 *)&dest) = self->abs();
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_sign(const godot_vector3 *p_self) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- *((Vector3 *)&dest) = self->sign();
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_floor(const godot_vector3 *p_self) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- *((Vector3 *)&dest) = self->floor();
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_ceil(const godot_vector3 *p_self) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- *((Vector3 *)&dest) = self->ceil();
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_direction_to(const godot_vector3 *p_self, const godot_vector3 *p_to) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *to = (const Vector3 *)p_to;
- *((Vector3 *)&dest) = self->direction_to(*to);
- return dest;
-}
-
-godot_real GDAPI godot_vector3_distance_to(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- return self->distance_to(*b);
-}
-
-godot_real GDAPI godot_vector3_distance_squared_to(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- return self->distance_squared_to(*b);
-}
-
-godot_real GDAPI godot_vector3_angle_to(const godot_vector3 *p_self, const godot_vector3 *p_to) {
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *to = (const Vector3 *)p_to;
- return self->angle_to(*to);
-}
-
-godot_vector3 GDAPI godot_vector3_slide(const godot_vector3 *p_self, const godot_vector3 *p_n) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *n = (const Vector3 *)p_n;
- *((Vector3 *)&dest) = self->slide(*n);
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_bounce(const godot_vector3 *p_self, const godot_vector3 *p_n) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *n = (const Vector3 *)p_n;
- *((Vector3 *)&dest) = self->bounce(*n);
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_reflect(const godot_vector3 *p_self, const godot_vector3 *p_n) {
- godot_vector3 dest;
- const Vector3 *self = (const Vector3 *)p_self;
- const Vector3 *n = (const Vector3 *)p_n;
- *((Vector3 *)&dest) = self->reflect(*n);
- return dest;
-}
-
-godot_vector3 GDAPI godot_vector3_operator_add(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- godot_vector3 raw_dest;
- Vector3 *dest = (Vector3 *)&raw_dest;
- Vector3 *self = (Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- *dest = *self + *b;
- return raw_dest;
-}
-
-godot_vector3 GDAPI godot_vector3_operator_subtract(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- godot_vector3 raw_dest;
- Vector3 *dest = (Vector3 *)&raw_dest;
- Vector3 *self = (Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- *dest = *self - *b;
- return raw_dest;
-}
-
-godot_vector3 GDAPI godot_vector3_operator_multiply_vector(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- godot_vector3 raw_dest;
- Vector3 *dest = (Vector3 *)&raw_dest;
- Vector3 *self = (Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- *dest = *self * *b;
- return raw_dest;
-}
-
-godot_vector3 GDAPI godot_vector3_operator_multiply_scalar(const godot_vector3 *p_self, const godot_real p_b) {
- godot_vector3 raw_dest;
- Vector3 *dest = (Vector3 *)&raw_dest;
- Vector3 *self = (Vector3 *)p_self;
- *dest = *self * p_b;
- return raw_dest;
-}
-
-godot_vector3 GDAPI godot_vector3_operator_divide_vector(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- godot_vector3 raw_dest;
- Vector3 *dest = (Vector3 *)&raw_dest;
- Vector3 *self = (Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- *dest = *self / *b;
- return raw_dest;
-}
-
-godot_vector3 GDAPI godot_vector3_operator_divide_scalar(const godot_vector3 *p_self, const godot_real p_b) {
- godot_vector3 raw_dest;
- Vector3 *dest = (Vector3 *)&raw_dest;
- Vector3 *self = (Vector3 *)p_self;
- *dest = *self / p_b;
- return raw_dest;
-}
-
-godot_bool GDAPI godot_vector3_operator_equal(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- Vector3 *self = (Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- return *self == *b;
-}
+#ifdef __cplusplus
+extern "C" {
+#endif
-godot_bool GDAPI godot_vector3_operator_less(const godot_vector3 *p_self, const godot_vector3 *p_b) {
- Vector3 *self = (Vector3 *)p_self;
- const Vector3 *b = (const Vector3 *)p_b;
- return *self < *b;
+void GDAPI godot_vector3_new(godot_vector3 *p_self) {
+ memnew_placement(p_self, Vector3);
}
-godot_vector3 GDAPI godot_vector3_operator_neg(const godot_vector3 *p_self) {
- godot_vector3 raw_dest;
- Vector3 *dest = (Vector3 *)&raw_dest;
- const Vector3 *self = (const Vector3 *)p_self;
- *dest = -(*self);
- return raw_dest;
+void GDAPI godot_vector3i_new(godot_vector3i *p_self) {
+ memnew_placement(p_self, Vector3i);
}
-void GDAPI godot_vector3_set_axis(godot_vector3 *p_self, const godot_vector3_axis p_axis, const godot_real p_val) {
+godot_real_t GDAPI *godot_vector3_operator_index(godot_vector3 *p_self, godot_int p_index) {
Vector3 *self = (Vector3 *)p_self;
- self->set_axis(p_axis, p_val);
+ return (godot_real_t *)&self->operator[](p_index);
}
-godot_real GDAPI godot_vector3_get_axis(const godot_vector3 *p_self, const godot_vector3_axis p_axis) {
+const godot_real_t GDAPI *godot_vector3_operator_index_const(const godot_vector3 *p_self, godot_int p_index) {
const Vector3 *self = (const Vector3 *)p_self;
- return self->get_axis(p_axis);
-}
-
-// Vector3i
-
-void GDAPI godot_vector3i_new(godot_vector3i *r_dest, const godot_int p_x, const godot_int p_y, const godot_int p_z) {
- Vector3i *dest = (Vector3i *)r_dest;
- *dest = Vector3i(p_x, p_y, p_z);
-}
-
-godot_string GDAPI godot_vector3i_as_string(const godot_vector3i *p_self) {
- godot_string ret;
- const Vector3i *self = (const Vector3i *)p_self;
- memnew_placement(&ret, String(*self));
- return ret;
-}
-
-godot_vector3 GDAPI godot_vector3i_as_vector3(const godot_vector3i *p_self) {
- godot_vector3 dest;
- const Vector3i *self = (const Vector3i *)p_self;
- *((Vector3 *)&dest) = Vector3(*self);
- return dest;
-}
-
-godot_int GDAPI godot_vector3i_min_axis(const godot_vector3i *p_self) {
- const Vector3i *self = (const Vector3i *)p_self;
- return self->min_axis();
-}
-
-godot_int GDAPI godot_vector3i_max_axis(const godot_vector3i *p_self) {
- const Vector3i *self = (const Vector3i *)p_self;
- return self->max_axis();
-}
-
-godot_vector3i GDAPI godot_vector3i_abs(const godot_vector3i *p_self) {
- godot_vector3i dest;
- const Vector3i *self = (const Vector3i *)p_self;
- *((Vector3i *)&dest) = self->abs();
- return dest;
-}
-
-godot_vector3i GDAPI godot_vector3i_sign(const godot_vector3i *p_self) {
- godot_vector3i dest;
- const Vector3i *self = (const Vector3i *)p_self;
- *((Vector3i *)&dest) = self->sign();
- return dest;
-}
-
-godot_vector3i GDAPI godot_vector3i_operator_add(const godot_vector3i *p_self, const godot_vector3i *p_b) {
- godot_vector3i raw_dest;
- Vector3i *dest = (Vector3i *)&raw_dest;
- Vector3i *self = (Vector3i *)p_self;
- const Vector3i *b = (const Vector3i *)p_b;
- *dest = *self + *b;
- return raw_dest;
-}
-
-godot_vector3i GDAPI godot_vector3i_operator_subtract(const godot_vector3i *p_self, const godot_vector3i *p_b) {
- godot_vector3i raw_dest;
- Vector3i *dest = (Vector3i *)&raw_dest;
- Vector3i *self = (Vector3i *)p_self;
- const Vector3i *b = (const Vector3i *)p_b;
- *dest = *self - *b;
- return raw_dest;
-}
-
-godot_vector3i GDAPI godot_vector3i_operator_multiply_vector(const godot_vector3i *p_self, const godot_vector3i *p_b) {
- godot_vector3i raw_dest;
- Vector3i *dest = (Vector3i *)&raw_dest;
- Vector3i *self = (Vector3i *)p_self;
- const Vector3i *b = (const Vector3i *)p_b;
- *dest = *self * *b;
- return raw_dest;
-}
-
-godot_vector3i GDAPI godot_vector3i_operator_multiply_scalar(const godot_vector3i *p_self, const godot_int p_b) {
- godot_vector3i raw_dest;
- Vector3i *dest = (Vector3i *)&raw_dest;
- Vector3i *self = (Vector3i *)p_self;
- *dest = *self * p_b;
- return raw_dest;
-}
-
-godot_vector3i GDAPI godot_vector3i_operator_divide_vector(const godot_vector3i *p_self, const godot_vector3i *p_b) {
- godot_vector3i raw_dest;
- Vector3i *dest = (Vector3i *)&raw_dest;
- Vector3i *self = (Vector3i *)p_self;
- const Vector3i *b = (const Vector3i *)p_b;
- *dest = *self / *b;
- return raw_dest;
-}
-
-godot_vector3i GDAPI godot_vector3i_operator_divide_scalar(const godot_vector3i *p_self, const godot_int p_b) {
- godot_vector3i raw_dest;
- Vector3i *dest = (Vector3i *)&raw_dest;
- Vector3i *self = (Vector3i *)p_self;
- *dest = *self / p_b;
- return raw_dest;
-}
-
-godot_bool GDAPI godot_vector3i_operator_equal(const godot_vector3i *p_self, const godot_vector3i *p_b) {
- Vector3i *self = (Vector3i *)p_self;
- const Vector3i *b = (const Vector3i *)p_b;
- return *self == *b;
-}
-
-godot_bool GDAPI godot_vector3i_operator_less(const godot_vector3i *p_self, const godot_vector3i *p_b) {
- Vector3i *self = (Vector3i *)p_self;
- const Vector3i *b = (const Vector3i *)p_b;
- return *self < *b;
-}
-
-godot_vector3i GDAPI godot_vector3i_operator_neg(const godot_vector3i *p_self) {
- godot_vector3i raw_dest;
- Vector3i *dest = (Vector3i *)&raw_dest;
- const Vector3i *self = (const Vector3i *)p_self;
- *dest = -(*self);
- return raw_dest;
+ return (const godot_real_t *)&self->operator[](p_index);
}
-void GDAPI godot_vector3i_set_axis(godot_vector3i *p_self, const godot_vector3_axis p_axis, const godot_int p_val) {
+int32_t GDAPI *godot_vector3i_operator_index(godot_vector3i *p_self, godot_int p_index) {
Vector3i *self = (Vector3i *)p_self;
- self->set_axis(p_axis, p_val);
+ return (int32_t *)&self->operator[](p_index);
}
-godot_int GDAPI godot_vector3i_get_axis(const godot_vector3i *p_self, const godot_vector3_axis p_axis) {
+const int32_t GDAPI *godot_vector3i_operator_index_const(const godot_vector3i *p_self, godot_int p_index) {
const Vector3i *self = (const Vector3i *)p_self;
- return self->get_axis(p_axis);
+ return (const int32_t *)&self->operator[](p_index);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index a29a0808ca..c163fbbc1b 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -1,8074 +1,5249 @@
{
- "core": {
- "type": "CORE",
- "version": {
- "major": 4,
- "minor": 0
- },
- "next": null,
- "api": [
- {
- "name": "godot_aabb_new",
- "return_type": "void",
- "arguments": [
- ["godot_aabb *", "r_dest"],
- ["const godot_vector3 *", "p_pos"],
- ["const godot_vector3 *", "p_size"]
- ]
- },
- {
- "name": "godot_aabb_get_position",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_set_position",
- "return_type": "void",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_vector3 *", "p_v"]
- ]
- },
- {
- "name": "godot_aabb_get_size",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_set_size",
- "return_type": "void",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_vector3 *", "p_v"]
- ]
- },
- {
- "name": "godot_aabb_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_abs",
- "return_type": "godot_aabb",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_get_area",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_has_no_area",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_has_no_surface",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_intersects",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_aabb *", "p_with"]
- ]
- },
- {
- "name": "godot_aabb_encloses",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_aabb *", "p_with"]
- ]
- },
- {
- "name": "godot_aabb_merge",
- "return_type": "godot_aabb",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_aabb *", "p_with"]
- ]
- },
- {
- "name": "godot_aabb_intersection",
- "return_type": "godot_aabb",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_aabb *", "p_with"]
- ]
- },
- {
- "name": "godot_aabb_intersects_plane",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_plane *", "p_plane"]
- ]
- },
- {
- "name": "godot_aabb_intersects_segment",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_vector3 *", "p_from"],
- ["const godot_vector3 *", "p_to"]
- ]
- },
- {
- "name": "godot_aabb_has_point",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_vector3 *", "p_point"]
- ]
- },
- {
- "name": "godot_aabb_get_support",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_vector3 *", "p_dir"]
- ]
- },
- {
- "name": "godot_aabb_get_longest_axis",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_get_longest_axis_index",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_get_longest_axis_size",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_get_shortest_axis",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_get_shortest_axis_index",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_get_shortest_axis_size",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_aabb *", "p_self"]
- ]
- },
- {
- "name": "godot_aabb_expand",
- "return_type": "godot_aabb",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_vector3 *", "p_to_point"]
- ]
- },
- {
- "name": "godot_aabb_grow",
- "return_type": "godot_aabb",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_real", "p_by"]
- ]
- },
- {
- "name": "godot_aabb_get_endpoint",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_aabb_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_aabb *", "p_self"],
- ["const godot_aabb *", "p_b"]
- ]
- },
- {
- "name": "godot_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_array *", "p_src"]
- ]
- },
- {
- "name": "godot_array_new_packed_color_array",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_packed_color_array *", "p_pca"]
- ]
- },
- {
- "name": "godot_array_new_packed_vector3_array",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_packed_vector3_array *", "p_pv3a"]
- ]
- },
- {
- "name": "godot_array_new_packed_vector2_array",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_packed_vector2_array *", "p_pv2a"]
- ]
- },
- {
- "name": "godot_array_new_packed_vector2i_array",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_packed_vector2i_array *", "p_pv2a"]
- ]
- },
- {
- "name": "godot_array_new_packed_string_array",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_packed_string_array *", "p_psa"]
- ]
- },
- {
- "name": "godot_array_new_packed_float32_array",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_packed_float32_array *", "p_pra"]
- ]
- },
- {
- "name": "godot_array_new_packed_float64_array",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_packed_float64_array *", "p_pra"]
- ]
- },
- {
- "name": "godot_array_new_packed_int32_array",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_packed_int32_array *", "p_pia"]
- ]
- },
- {
- "name": "godot_array_new_packed_int64_array",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_packed_int64_array *", "p_pia"]
- ]
- },
- {
- "name": "godot_array_new_packed_byte_array",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "r_dest"],
- ["const godot_packed_byte_array *", "p_pba"]
- ]
- },
- {
- "name": "godot_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_variant *", "p_value"]
- ]
- },
- {
- "name": "godot_array_get",
- "return_type": "godot_variant",
- "arguments": [
- ["const godot_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_array_operator_index",
- "return_type": "godot_variant *",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_array_operator_index_const",
- "return_type": "const godot_variant *",
- "arguments": [
- ["const godot_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_variant *", "p_value"]
- ]
- },
- {
- "name": "godot_array_clear",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_count",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_array *", "p_self"],
- ["const godot_variant *", "p_value"]
- ]
- },
- {
- "name": "godot_array_duplicate",
- "return_type": "godot_array",
- "arguments": [
- ["const godot_array *", "p_self"],
- ["const godot_bool", "p_deep"]
- ]
- },
- {
- "name": "godot_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_erase",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_variant *", "p_value"]
- ]
- },
- {
- "name": "godot_array_front",
- "return_type": "godot_variant",
- "arguments": [
- ["const godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_back",
- "return_type": "godot_variant",
- "arguments": [
- ["const godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_find",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_array *", "p_self"],
- ["const godot_variant *", "p_what"],
- ["const godot_int", "p_from"]
- ]
- },
- {
- "name": "godot_array_find_last",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_array *", "p_self"],
- ["const godot_variant *", "p_what"]
- ]
- },
- {
- "name": "godot_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_array *", "p_self"],
- ["const godot_variant *", "p_value"]
- ]
- },
- {
- "name": "godot_array_hash",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_insert",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_int", "p_pos"],
- ["const godot_variant *", "p_value"]
- ]
- },
- {
- "name": "godot_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_max",
- "return_type": "godot_variant",
- "arguments": [
- ["const godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_min",
- "return_type": "godot_variant",
- "arguments": [
- ["const godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_pop_back",
- "return_type": "godot_variant",
- "arguments": [
- ["godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_pop_front",
- "return_type": "godot_variant",
- "arguments": [
- ["godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_variant *", "p_value"]
- ]
- },
- {
- "name": "godot_array_push_front",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_variant *", "p_value"]
- ]
- },
- {
- "name": "godot_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_array_rfind",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_array *", "p_self"],
- ["const godot_variant *", "p_what"],
- ["const godot_int", "p_from"]
- ]
- },
- {
- "name": "godot_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_shuffle",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_slice",
- "return_type": "godot_array",
- "arguments": [
- ["const godot_array *", "p_self"],
- ["const godot_int", "p_begin"],
- ["const godot_int", "p_end"],
- ["const godot_int", "p_step"],
- ["const godot_bool", "p_deep"]
- ]
- },
- {
- "name": "godot_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_array_sort_custom",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"],
- ["godot_object *", "p_obj"],
- ["const godot_string *", "p_func"]
- ]
- },
- {
- "name": "godot_array_bsearch",
- "return_type": "godot_int",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_variant *", "p_value"],
- ["const godot_bool", "p_before"]
- ]
- },
- {
- "name": "godot_array_bsearch_custom",
- "return_type": "godot_int",
- "arguments": [
- ["godot_array *", "p_self"],
- ["const godot_variant *", "p_value"],
- ["godot_object *", "p_obj"],
- ["const godot_string *", "p_func"],
- ["const godot_bool", "p_before"]
- ]
- },
- {
- "name": "godot_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_array *", "p_self"]
- ]
- },
- {
- "name": "godot_basis_new_with_rows",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "r_dest"],
- ["const godot_vector3 *", "p_x_axis"],
- ["const godot_vector3 *", "p_y_axis"],
- ["const godot_vector3 *", "p_z_axis"]
- ]
- },
- {
- "name": "godot_basis_new_with_axis_and_angle",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "r_dest"],
- ["const godot_vector3 *", "p_axis"],
- ["const godot_real", "p_phi"]
- ]
- },
- {
- "name": "godot_basis_new_with_euler",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "r_dest"],
- ["const godot_vector3 *", "p_euler"]
- ]
- },
- {
- "name": "godot_basis_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_basis *", "p_self"]
- ]
- },
- {
- "name": "godot_basis_inverse",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_basis *", "p_self"]
- ]
- },
- {
- "name": "godot_basis_transposed",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_basis *", "p_self"]
- ]
- },
- {
- "name": "godot_basis_orthonormalized",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_basis *", "p_self"]
- ]
- },
- {
- "name": "godot_basis_determinant",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_basis *", "p_self"]
- ]
- },
- {
- "name": "godot_basis_rotated",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_vector3 *", "p_axis"],
- ["const godot_real", "p_phi"]
- ]
- },
- {
- "name": "godot_basis_scaled",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_vector3 *", "p_scale"]
- ]
- },
- {
- "name": "godot_basis_get_scale",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_basis *", "p_self"]
- ]
- },
- {
- "name": "godot_basis_get_euler",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_basis *", "p_self"]
- ]
- },
- {
- "name": "godot_basis_tdotx",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_vector3 *", "p_with"]
- ]
- },
- {
- "name": "godot_basis_tdoty",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_vector3 *", "p_with"]
- ]
- },
- {
- "name": "godot_basis_tdotz",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_vector3 *", "p_with"]
- ]
- },
- {
- "name": "godot_basis_xform",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_vector3 *", "p_v"]
- ]
- },
- {
- "name": "godot_basis_xform_inv",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_vector3 *", "p_v"]
- ]
- },
- {
- "name": "godot_basis_get_orthogonal_index",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_basis *", "p_self"]
- ]
- },
- {
- "name": "godot_basis_new",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "r_dest"]
- ]
- },
- {
- "name": "godot_basis_new_with_euler_quat",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "r_dest"],
- ["const godot_quat *", "p_euler"]
- ]
- },
- {
- "name": "godot_basis_get_elements",
- "return_type": "void",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["godot_vector3 *", "p_elements"]
- ]
- },
- {
- "name": "godot_basis_get_axis",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_int", "p_axis"]
- ]
- },
- {
- "name": "godot_basis_set_axis",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "p_self"],
- ["const godot_int", "p_axis"],
- ["const godot_vector3 *", "p_value"]
- ]
- },
- {
- "name": "godot_basis_get_row",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_int", "p_row"]
- ]
- },
- {
- "name": "godot_basis_set_row",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "p_self"],
- ["const godot_int", "p_row"],
- ["const godot_vector3 *", "p_value"]
- ]
- },
- {
- "name": "godot_basis_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_basis *", "p_b"]
- ]
- },
- {
- "name": "godot_basis_operator_add",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_basis *", "p_b"]
- ]
- },
- {
- "name": "godot_basis_operator_subtract",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_basis *", "p_b"]
- ]
- },
- {
- "name": "godot_basis_operator_multiply_vector",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_basis *", "p_b"]
- ]
- },
- {
- "name": "godot_basis_operator_multiply_scalar",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_real", "p_b"]
- ]
- },
- {
- "name": "godot_basis_slerp",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_basis *", "p_self"],
- ["const godot_basis *", "p_b"],
- ["const godot_real", "p_t"]
- ]
- },
- {
- "name": "godot_basis_get_quat",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_basis *", "p_self"]
- ]
- },
- {
- "name": "godot_basis_set_quat",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "p_self"],
- ["const godot_quat *", "p_quat"]
- ]
- },
- {
- "name": "godot_basis_set_axis_angle_scale",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "p_self"],
- ["const godot_vector3 *", "p_axis"],
- ["godot_real", "p_phi"],
- ["const godot_vector3 *", "p_scale"]
- ]
- },
- {
- "name": "godot_basis_set_euler_scale",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "p_self"],
- ["const godot_vector3 *", "p_euler"],
- ["const godot_vector3 *", "p_scale"]
- ]
- },
- {
- "name": "godot_basis_set_quat_scale",
- "return_type": "void",
- "arguments": [
- ["godot_basis *", "p_self"],
- ["const godot_quat *", "p_quat"],
- ["const godot_vector3 *", "p_scale"]
- ]
- },
- {
- "name": "godot_callable_new_with_object",
- "return_type": "void",
- "arguments": [
- ["godot_callable *", "r_dest"],
- ["const godot_object *", "p_object"],
- ["const godot_string_name *", "p_method"]
- ]
- },
- {
- "name": "godot_callable_new_with_object_id",
- "return_type": "void",
- "arguments": [
- ["godot_callable *", "r_dest"],
- ["uint64_t", "p_objectid"],
- ["const godot_string_name *", "p_method"]
- ]
- },
- {
- "name": "godot_callable_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_callable *", "r_dest"],
- ["const godot_callable *", "p_src"]
- ]
- },
- {
- "name": "godot_callable_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_callable *", "p_self"]
- ]
- },
- {
- "name": "godot_callable_call",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_callable *", "p_self"],
- ["const godot_variant **", "p_arguments"],
- ["godot_int", "p_argcount"],
- ["godot_variant *", "r_return_value"]
- ]
- },
- {
- "name": "godot_callable_call_deferred",
- "return_type": "void",
- "arguments": [
- ["const godot_callable *", "p_self"],
- ["const godot_variant **", "p_arguments"],
- ["godot_int", "p_argcount"]
- ]
- },
- {
- "name": "godot_callable_is_null",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_callable *", "p_self"]
- ]
- },
- {
- "name": "godot_callable_is_custom",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_callable *", "p_self"]
- ]
- },
- {
- "name": "godot_callable_is_standard",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_callable *", "p_self"]
- ]
- },
- {
- "name": "godot_callable_get_object",
- "return_type": "godot_object *",
- "arguments": [
- ["const godot_callable *", "p_self"]
- ]
- },
- {
- "name": "godot_callable_get_object_id",
- "return_type": "uint64_t",
- "arguments": [
- ["const godot_callable *", "p_self"]
- ]
- },
- {
- "name": "godot_callable_get_method",
- "return_type": "godot_string_name",
- "arguments": [
- ["const godot_callable *", "p_self"]
- ]
- },
- {
- "name": "godot_callable_hash",
- "return_type": "uint32_t",
- "arguments": [
- ["const godot_callable *", "p_self"]
- ]
- },
- {
- "name": "godot_callable_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_callable *", "p_self"]
- ]
- },
- {
- "name": "godot_callable_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_callable *", "p_self"],
- ["const godot_callable *", "p_other"]
- ]
- },
- {
- "name": "godot_callable_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_callable *", "p_self"],
- ["const godot_callable *", "p_other"]
- ]
- },
- {
- "name": "godot_signal_new_with_object",
- "return_type": "void",
- "arguments": [
- ["godot_signal *", "r_dest"],
- ["const godot_object *", "p_object"],
- ["const godot_string_name *", "p_method"]
- ]
- },
- {
- "name": "godot_signal_new_with_object_id",
- "return_type": "void",
- "arguments": [
- ["godot_signal *", "r_dest"],
- ["uint64_t", "p_objectid"],
- ["const godot_string_name *", "p_method"]
- ]
- },
- {
- "name": "godot_signal_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_signal *", "r_dest"],
- ["const godot_signal *", "p_src"]
- ]
- },
- {
- "name": "godot_signal_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_signal *", "p_self"]
- ]
- },
- {
- "name": "godot_signal_emit",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_signal *", "p_self"],
- ["const godot_variant **", "p_arguments"],
- ["godot_int", "p_argcount"]
- ]
- },
- {
- "name": "godot_signal_connect",
- "return_type": "godot_int",
- "arguments": [
- ["godot_signal *", "p_self"],
- ["const godot_callable *", "p_callable"],
- ["const godot_array *", "p_binds"],
- ["uint32_t", "p_flags"]
- ]
- },
- {
- "name": "godot_signal_disconnect",
- "return_type": "void",
- "arguments": [
- ["godot_signal *", "p_self"],
- ["const godot_callable *", "p_callable"]
- ]
- },
- {
- "name": "godot_signal_is_null",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_signal *", "p_self"]
- ]
- },
- {
- "name": "godot_signal_is_connected",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_signal *", "p_self"],
- ["const godot_callable *", "p_callable"]
- ]
- },
- {
- "name": "godot_signal_get_connections",
- "return_type": "godot_array",
- "arguments": [
- ["const godot_signal *", "p_self"]
- ]
- },
- {
- "name": "godot_signal_get_object",
- "return_type": "godot_object *",
- "arguments": [
- ["const godot_signal *", "p_self"]
- ]
- },
- {
- "name": "godot_signal_get_object_id",
- "return_type": "uint64_t",
- "arguments": [
- ["const godot_signal *", "p_self"]
- ]
- },
- {
- "name": "godot_signal_get_name",
- "return_type": "godot_string_name",
- "arguments": [
- ["const godot_signal *", "p_self"]
- ]
- },
- {
- "name": "godot_signal_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_signal *", "p_self"]
- ]
- },
- {
- "name": "godot_signal_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_signal *", "p_self"],
- ["const godot_signal *", "p_other"]
- ]
- },
- {
- "name": "godot_signal_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_signal *", "p_self"],
- ["const godot_signal *", "p_other"]
- ]
- },
- {
- "name": "godot_color_new_rgba",
- "return_type": "void",
- "arguments": [
- ["godot_color *", "r_dest"],
- ["const godot_real", "p_r"],
- ["const godot_real", "p_g"],
- ["const godot_real", "p_b"],
- ["const godot_real", "p_a"]
- ]
- },
- {
- "name": "godot_color_new_rgb",
- "return_type": "void",
- "arguments": [
- ["godot_color *", "r_dest"],
- ["const godot_real", "p_r"],
- ["const godot_real", "p_g"],
- ["const godot_real", "p_b"]
- ]
- },
- {
- "name": "godot_color_get_r",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_set_r",
- "return_type": "void",
- "arguments": [
- ["godot_color *", "p_self"],
- ["const godot_real", "r"]
- ]
- },
- {
- "name": "godot_color_get_g",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_set_g",
- "return_type": "void",
- "arguments": [
- ["godot_color *", "p_self"],
- ["const godot_real", "g"]
- ]
- },
- {
- "name": "godot_color_get_b",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_set_b",
- "return_type": "void",
- "arguments": [
- ["godot_color *", "p_self"],
- ["const godot_real", "b"]
- ]
- },
- {
- "name": "godot_color_get_a",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_set_a",
- "return_type": "void",
- "arguments": [
- ["godot_color *", "p_self"],
- ["const godot_real", "a"]
- ]
- },
- {
- "name": "godot_color_get_h",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_get_s",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_get_v",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_to_rgba32",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_to_argb32",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_inverted",
- "return_type": "godot_color",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_lerp",
- "return_type": "godot_color",
- "arguments": [
- ["const godot_color *", "p_self"],
- ["const godot_color *", "p_b"],
- ["const godot_real", "p_t"]
- ]
- },
- {
- "name": "godot_color_blend",
- "return_type": "godot_color",
- "arguments": [
- ["const godot_color *", "p_self"],
- ["const godot_color *", "p_over"]
- ]
- },
- {
- "name": "godot_color_to_html",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_color *", "p_self"],
- ["const godot_bool", "p_with_alpha"]
- ]
- },
- {
- "name": "godot_color_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_color *", "p_self"],
- ["const godot_color *", "p_b"]
- ]
- },
- {
- "name": "godot_color_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_color *", "p_self"],
- ["const godot_color *", "p_b"]
- ]
- },
- {
- "name": "godot_color_to_abgr32",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_to_abgr64",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_to_argb64",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_to_rgba64",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_color *", "p_self"]
- ]
- },
- {
- "name": "godot_color_darkened",
- "return_type": "godot_color",
- "arguments": [
- ["const godot_color *", "p_self"],
- ["const godot_real", "p_amount"]
- ]
- },
- {
- "name": "godot_color_from_hsv",
- "return_type": "godot_color",
- "arguments": [
- ["const godot_color *", "p_self"],
- ["const godot_real", "p_h"],
- ["const godot_real", "p_s"],
- ["const godot_real", "p_v"],
- ["const godot_real", "p_a"]
- ]
- },
- {
- "name": "godot_color_lightened",
- "return_type": "godot_color",
- "arguments": [
- ["const godot_color *", "p_self"],
- ["const godot_real", "p_amount"]
- ]
- },
- {
- "name": "godot_dictionary_new",
- "return_type": "void",
- "arguments": [
- ["godot_dictionary *", "r_dest"]
- ]
- },
- {
- "name": "godot_dictionary_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_dictionary *", "r_dest"],
- ["const godot_dictionary *", "p_src"]
- ]
- },
- {
- "name": "godot_dictionary_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_dictionary *", "p_self"]
- ]
- },
- {
- "name": "godot_dictionary_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_dictionary *", "p_self"]
- ]
- },
- {
- "name": "godot_dictionary_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_dictionary *", "p_self"]
- ]
- },
- {
- "name": "godot_dictionary_clear",
- "return_type": "void",
- "arguments": [
- ["godot_dictionary *", "p_self"]
- ]
- },
- {
- "name": "godot_dictionary_has",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_dictionary *", "p_self"],
- ["const godot_variant *", "p_key"]
- ]
- },
- {
- "name": "godot_dictionary_has_all",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_dictionary *", "p_self"],
- ["const godot_array *", "p_keys"]
- ]
- },
- {
- "name": "godot_dictionary_erase",
- "return_type": "void",
- "arguments": [
- ["godot_dictionary *", "p_self"],
- ["const godot_variant *", "p_key"]
- ]
- },
- {
- "name": "godot_dictionary_hash",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_dictionary *", "p_self"]
- ]
- },
- {
- "name": "godot_dictionary_keys",
- "return_type": "godot_array",
- "arguments": [
- ["const godot_dictionary *", "p_self"]
- ]
- },
- {
- "name": "godot_dictionary_values",
- "return_type": "godot_array",
- "arguments": [
- ["const godot_dictionary *", "p_self"]
- ]
- },
- {
- "name": "godot_dictionary_get",
- "return_type": "godot_variant",
- "arguments": [
- ["const godot_dictionary *", "p_self"],
- ["const godot_variant *", "p_key"]
- ]
- },
- {
- "name": "godot_dictionary_set",
- "return_type": "void",
- "arguments": [
- ["godot_dictionary *", "p_self"],
- ["const godot_variant *", "p_key"],
- ["const godot_variant *", "p_value"]
- ]
- },
- {
- "name": "godot_dictionary_operator_index",
- "return_type": "godot_variant *",
- "arguments": [
- ["godot_dictionary *", "p_self"],
- ["const godot_variant *", "p_key"]
- ]
- },
- {
- "name": "godot_dictionary_operator_index_const",
- "return_type": "const godot_variant *",
- "arguments": [
- ["const godot_dictionary *", "p_self"],
- ["const godot_variant *", "p_key"]
- ]
- },
- {
- "name": "godot_dictionary_next",
- "return_type": "godot_variant *",
- "arguments": [
- ["const godot_dictionary *", "p_self"],
- ["const godot_variant *", "p_key"]
- ]
- },
- {
- "name": "godot_dictionary_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_dictionary *", "p_self"],
- ["const godot_dictionary *", "p_b"]
- ]
- },
- {
- "name": "godot_dictionary_to_json",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_dictionary *", "p_self"]
- ]
- },
- {
- "name": "godot_dictionary_duplicate",
- "return_type": "godot_dictionary",
- "arguments": [
- ["const godot_dictionary *", "p_self"],
- ["const godot_bool", "p_deep"]
- ]
- },
- {
- "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_new",
- "return_type": "void",
- "arguments": [
- ["godot_node_path *", "r_dest"],
- ["const godot_string *", "p_from"]
- ]
- },
- {
- "name": "godot_node_path_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_node_path *", "r_dest"],
- ["const godot_node_path *", "p_src"]
- ]
- },
- {
- "name": "godot_node_path_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_node_path *", "p_self"]
- ]
- },
- {
- "name": "godot_node_path_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_node_path *", "p_self"]
- ]
- },
- {
- "name": "godot_node_path_is_absolute",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_node_path *", "p_self"]
- ]
- },
- {
- "name": "godot_node_path_get_name_count",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_node_path *", "p_self"]
- ]
- },
- {
- "name": "godot_node_path_get_name",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_node_path *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_node_path_get_subname_count",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_node_path *", "p_self"]
- ]
- },
- {
- "name": "godot_node_path_get_subname",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_node_path *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_node_path_get_concatenated_subnames",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_node_path *", "p_self"]
- ]
- },
- {
- "name": "godot_node_path_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_node_path *", "p_self"]
- ]
- },
- {
- "name": "godot_node_path_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_node_path *", "p_self"],
- ["const godot_node_path *", "p_b"]
- ]
- },
- {
- "name": "godot_node_path_get_as_property_path",
- "return_type": "godot_node_path",
- "arguments": [
- ["const godot_node_path *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_byte_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_byte_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "r_dest"],
- ["const godot_packed_byte_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_byte_array_new_with_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "r_dest"],
- ["const godot_array *", "p_a"]
- ]
- },
- {
- "name": "godot_packed_byte_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_byte_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_byte_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"],
- ["const uint8_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_byte_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"],
- ["const godot_packed_byte_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_byte_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const uint8_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_byte_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"],
- ["const uint8_t", "p_value"]
- ]
- },
- {
- "name": "godot_packed_byte_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_byte_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_byte_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"],
- ["const uint8_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_byte_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_byte_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_byte_array_ptr",
- "return_type": "const uint8_t *",
- "arguments": [
- ["const godot_packed_byte_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_byte_array_ptrw",
- "return_type": "uint8_t *",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_byte_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const uint8_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_byte_array_get",
- "return_type": "uint8_t",
- "arguments": [
- ["const godot_packed_byte_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_byte_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_byte_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_byte_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_byte_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int32_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_int32_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "r_dest"],
- ["const godot_packed_int32_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_int32_array_new_with_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "r_dest"],
- ["const godot_array *", "p_a"]
- ]
- },
- {
- "name": "godot_packed_int32_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_int32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int32_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"],
- ["const int32_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_int32_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"],
- ["const godot_packed_int32_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_int32_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const int32_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_int32_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"],
- ["const int32_t", "p_value"]
- ]
- },
- {
- "name": "godot_packed_int32_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int32_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int32_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"],
- ["const int32_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_int32_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_int32_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_int32_array_ptr",
- "return_type": "const int32_t *",
- "arguments": [
- ["const godot_packed_int32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int32_array_ptrw",
- "return_type": "int32_t *",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int32_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const int32_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_int32_array_get",
- "return_type": "int32_t",
- "arguments": [
- ["const godot_packed_int32_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_int32_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_int32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int32_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int64_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_int64_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "r_dest"],
- ["const godot_packed_int64_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_int64_array_new_with_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "r_dest"],
- ["const godot_array *", "p_a"]
- ]
- },
- {
- "name": "godot_packed_int64_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_int64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int64_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"],
- ["const int64_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_int64_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"],
- ["const godot_packed_int64_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_int64_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const int64_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_int64_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"],
- ["const int64_t", "p_value"]
- ]
- },
- {
- "name": "godot_packed_int64_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int64_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int64_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"],
- ["const int64_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_int64_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_int64_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_int64_array_ptr",
- "return_type": "const int64_t *",
- "arguments": [
- ["const godot_packed_int64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int64_array_ptrw",
- "return_type": "int64_t *",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int64_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const int64_t", "p_data"]
- ]
- },
- {
- "name": "godot_packed_int64_array_get",
- "return_type": "int64_t",
- "arguments": [
- ["const godot_packed_int64_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_int64_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_int64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_int64_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_int64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float32_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_float32_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "r_dest"],
- ["const godot_packed_float32_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_float32_array_new_with_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "r_dest"],
- ["const godot_array *", "p_a"]
- ]
- },
- {
- "name": "godot_packed_float32_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_float32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float32_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"],
- ["const float", "p_data"]
- ]
- },
- {
- "name": "godot_packed_float32_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"],
- ["const godot_packed_float32_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_float32_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const float", "p_data"]
- ]
- },
- {
- "name": "godot_packed_float32_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"],
- ["const float", "p_value"]
- ]
- },
- {
- "name": "godot_packed_float32_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float32_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float32_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"],
- ["const float", "p_data"]
- ]
- },
- {
- "name": "godot_packed_float32_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_float32_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_float32_array_ptr",
- "return_type": "const float *",
- "arguments": [
- ["const godot_packed_float32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float32_array_ptrw",
- "return_type": "float *",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float32_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const float", "p_data"]
- ]
- },
- {
- "name": "godot_packed_float32_array_get",
- "return_type": "float",
- "arguments": [
- ["const godot_packed_float32_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_float32_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_float32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float32_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float32_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float64_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_float64_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "r_dest"],
- ["const godot_packed_float64_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_float64_array_new_with_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "r_dest"],
- ["const godot_array *", "p_a"]
- ]
- },
- {
- "name": "godot_packed_float64_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_float64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float64_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"],
- ["const double", "p_data"]
- ]
- },
- {
- "name": "godot_packed_float64_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"],
- ["const godot_packed_float64_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_float64_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const double", "p_data"]
- ]
- },
- {
- "name": "godot_packed_float64_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"],
- ["const double", "p_value"]
- ]
- },
- {
- "name": "godot_packed_float64_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float64_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float64_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"],
- ["const double", "p_data"]
- ]
- },
- {
- "name": "godot_packed_float64_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_float64_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_float64_array_ptr",
- "return_type": "const double *",
- "arguments": [
- ["const godot_packed_float64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float64_array_ptrw",
- "return_type": "double *",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float64_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const double", "p_data"]
- ]
- },
- {
- "name": "godot_packed_float64_array_get",
- "return_type": "double",
- "arguments": [
- ["const godot_packed_float64_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_float64_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_float64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_float64_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_float64_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_string_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_string_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "r_dest"],
- ["const godot_packed_string_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_string_array_new_with_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "r_dest"],
- ["const godot_array *", "p_a"]
- ]
- },
- {
- "name": "godot_packed_string_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_string_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_string_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "p_self"],
- ["const godot_string *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_string_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "p_self"],
- ["const godot_packed_string_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_string_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_string_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_string *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_string_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_string_array *", "p_self"],
- ["const godot_string *", "p_value"]
- ]
- },
- {
- "name": "godot_packed_string_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_string_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_string_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "p_self"],
- ["const godot_string *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_string_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_string_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_string_array_ptr",
- "return_type": "const godot_string *",
- "arguments": [
- ["const godot_packed_string_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_string_array_ptrw",
- "return_type": "godot_string *",
- "arguments": [
- ["godot_packed_string_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_string_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_string *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_string_array_get",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_packed_string_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_string_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_string_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_string_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_string_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "r_dest"],
- ["const godot_packed_vector2_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_new_with_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "r_dest"],
- ["const godot_array *", "p_a"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_vector2_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"],
- ["const godot_vector2 *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"],
- ["const godot_packed_vector2_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_vector2 *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"],
- ["const godot_vector2 *", "p_value"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"],
- ["const godot_vector2 *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_ptr",
- "return_type": "const godot_vector2 *",
- "arguments": [
- ["const godot_packed_vector2_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_ptrw",
- "return_type": "godot_vector2 *",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_vector2 *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_get",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_packed_vector2_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_vector2_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "r_dest"],
- ["const godot_packed_vector2i_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_new_with_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "r_dest"],
- ["const godot_array *", "p_a"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_vector2i_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"],
- ["const godot_vector2i *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"],
- ["const godot_packed_vector2i_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_vector2i *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"],
- ["const godot_vector2i *", "p_value"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"],
- ["const godot_vector2i *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_ptr",
- "return_type": "const godot_vector2i *",
- "arguments": [
- ["const godot_packed_vector2i_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_ptrw",
- "return_type": "godot_vector2i *",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_vector2i *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_get",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_packed_vector2i_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_vector2i_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector2i_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector2i_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "r_dest"],
- ["const godot_packed_vector3_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_new_with_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "r_dest"],
- ["const godot_array *", "p_a"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_vector3_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"],
- ["const godot_vector3 *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"],
- ["const godot_packed_vector3_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_vector3 *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"],
- ["const godot_vector3 *", "p_value"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"],
- ["const godot_vector3 *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_ptr",
- "return_type": "const godot_vector3 *",
- "arguments": [
- ["const godot_packed_vector3_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_ptrw",
- "return_type": "godot_vector3 *",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_vector3 *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_get",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_packed_vector3_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_vector3_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_vector3_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_vector3_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_color_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_color_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "r_dest"],
- ["const godot_packed_color_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_color_array_new_with_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "r_dest"],
- ["const godot_array *", "p_a"]
- ]
- },
- {
- "name": "godot_packed_color_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_color_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "p_self"],
- ["const godot_color *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_color_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "p_self"],
- ["const godot_packed_color_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_color_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_color_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_color *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_color_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_color_array *", "p_self"],
- ["const godot_color *", "p_value"]
- ]
- },
- {
- "name": "godot_packed_color_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_color_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_color_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "p_self"],
- ["const godot_color *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_color_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_color_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_color_array_ptr",
- "return_type": "const godot_color *",
- "arguments": [
- ["const godot_packed_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_color_array_ptrw",
- "return_type": "godot_color *",
- "arguments": [
- ["godot_packed_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_color_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_color *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_color_array_get",
- "return_type": "godot_color",
- "arguments": [
- ["const godot_packed_color_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_color_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_color_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_color_array *", "p_self"]
- ]
- },
- {
- "name": "godot_plane_new_with_reals",
- "return_type": "void",
- "arguments": [
- ["godot_plane *", "r_dest"],
- ["const godot_real", "p_a"],
- ["const godot_real", "p_b"],
- ["const godot_real", "p_c"],
- ["const godot_real", "p_d"]
- ]
- },
- {
- "name": "godot_plane_new_with_vectors",
- "return_type": "void",
- "arguments": [
- ["godot_plane *", "r_dest"],
- ["const godot_vector3 *", "p_v1"],
- ["const godot_vector3 *", "p_v2"],
- ["const godot_vector3 *", "p_v3"]
- ]
- },
- {
- "name": "godot_plane_new_with_normal",
- "return_type": "void",
- "arguments": [
- ["godot_plane *", "r_dest"],
- ["const godot_vector3 *", "p_normal"],
- ["const godot_real", "p_d"]
- ]
- },
- {
- "name": "godot_plane_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_plane *", "p_self"]
- ]
- },
- {
- "name": "godot_plane_normalized",
- "return_type": "godot_plane",
- "arguments": [
- ["const godot_plane *", "p_self"]
- ]
- },
- {
- "name": "godot_plane_center",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_plane *", "p_self"]
- ]
- },
- {
- "name": "godot_plane_is_point_over",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_plane *", "p_self"],
- ["const godot_vector3 *", "p_point"]
- ]
- },
- {
- "name": "godot_plane_distance_to",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_plane *", "p_self"],
- ["const godot_vector3 *", "p_point"]
- ]
- },
- {
- "name": "godot_plane_has_point",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_plane *", "p_self"],
- ["const godot_vector3 *", "p_point"],
- ["const godot_real", "p_epsilon"]
- ]
- },
- {
- "name": "godot_plane_project",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_plane *", "p_self"],
- ["const godot_vector3 *", "p_point"]
- ]
- },
- {
- "name": "godot_plane_intersect_3",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_plane *", "p_self"],
- ["godot_vector3 *", "r_dest"],
- ["const godot_plane *", "p_b"],
- ["const godot_plane *", "p_c"]
- ]
- },
- {
- "name": "godot_plane_intersects_ray",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_plane *", "p_self"],
- ["godot_vector3 *", "r_dest"],
- ["const godot_vector3 *", "p_from"],
- ["const godot_vector3 *", "p_dir"]
- ]
- },
- {
- "name": "godot_plane_intersects_segment",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_plane *", "p_self"],
- ["godot_vector3 *", "r_dest"],
- ["const godot_vector3 *", "p_begin"],
- ["const godot_vector3 *", "p_end"]
- ]
- },
- {
- "name": "godot_plane_operator_neg",
- "return_type": "godot_plane",
- "arguments": [
- ["const godot_plane *", "p_self"]
- ]
- },
- {
- "name": "godot_plane_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_plane *", "p_self"],
- ["const godot_plane *", "p_b"]
- ]
- },
- {
- "name": "godot_plane_set_normal",
- "return_type": "void",
- "arguments": [
- ["godot_plane *", "p_self"],
- ["const godot_vector3 *", "p_normal"]
- ]
- },
- {
- "name": "godot_plane_get_normal",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_plane *", "p_self"]
- ]
- },
- {
- "name": "godot_plane_get_d",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_plane *", "p_self"]
- ]
- },
- {
- "name": "godot_plane_set_d",
- "return_type": "void",
- "arguments": [
- ["godot_plane *", "p_self"],
- ["const godot_real", "p_d"]
- ]
- },
- {
- "name": "godot_quat_new",
- "return_type": "void",
- "arguments": [
- ["godot_quat *", "r_dest"],
- ["const godot_real", "p_x"],
- ["const godot_real", "p_y"],
- ["const godot_real", "p_z"],
- ["const godot_real", "p_w"]
- ]
- },
- {
- "name": "godot_quat_new_with_axis_angle",
- "return_type": "void",
- "arguments": [
- ["godot_quat *", "r_dest"],
- ["const godot_vector3 *", "p_axis"],
- ["const godot_real", "p_angle"]
- ]
- },
- {
- "name": "godot_quat_new_with_basis",
- "return_type": "void",
- "arguments": [
- ["godot_quat *", "r_dest"],
- ["const godot_basis *", "p_basis"]
- ]
- },
- {
- "name": "godot_quat_new_with_euler",
- "return_type": "void",
- "arguments": [
- ["godot_quat *", "r_dest"],
- ["const godot_vector3 *", "p_euler"]
- ]
- },
- {
- "name": "godot_quat_get_x",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_quat_set_x",
- "return_type": "void",
- "arguments": [
- ["godot_quat *", "p_self"],
- ["const godot_real", "val"]
- ]
- },
- {
- "name": "godot_quat_get_y",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_quat_set_y",
- "return_type": "void",
- "arguments": [
- ["godot_quat *", "p_self"],
- ["const godot_real", "val"]
- ]
- },
- {
- "name": "godot_quat_get_z",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_quat_set_z",
- "return_type": "void",
- "arguments": [
- ["godot_quat *", "p_self"],
- ["const godot_real", "val"]
- ]
- },
- {
- "name": "godot_quat_get_w",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_quat_set_w",
- "return_type": "void",
- "arguments": [
- ["godot_quat *", "p_self"],
- ["const godot_real", "val"]
- ]
- },
- {
- "name": "godot_quat_set_axis_angle",
- "return_type": "void",
- "arguments": [
- ["godot_quat *", "p_self"],
- ["const godot_vector3 *", "p_axis"],
- ["const godot_real", "p_angle"]
- ]
- },
- {
- "name": "godot_quat_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_quat_length",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_quat_length_squared",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_quat_normalized",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_quat_is_normalized",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_quat_inverse",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_quat_dot",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_quat *", "p_self"],
- ["const godot_quat *", "p_b"]
- ]
- },
- {
- "name": "godot_quat_xform",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_quat *", "p_self"],
- ["const godot_vector3 *", "p_v"]
- ]
- },
- {
- "name": "godot_quat_slerp",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_quat *", "p_self"],
- ["const godot_quat *", "p_b"],
- ["const godot_real", "p_t"]
- ]
- },
- {
- "name": "godot_quat_slerpni",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_quat *", "p_self"],
- ["const godot_quat *", "p_b"],
- ["const godot_real", "p_t"]
- ]
- },
- {
- "name": "godot_quat_cubic_slerp",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_quat *", "p_self"],
- ["const godot_quat *", "p_b"],
- ["const godot_quat *", "p_pre_a"],
- ["const godot_quat *", "p_post_b"],
- ["const godot_real", "p_t"]
- ]
- },
- {
- "name": "godot_quat_operator_multiply",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_quat *", "p_self"],
- ["const godot_real", "p_b"]
- ]
- },
- {
- "name": "godot_quat_operator_add",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_quat *", "p_self"],
- ["const godot_quat *", "p_b"]
- ]
- },
- {
- "name": "godot_quat_operator_subtract",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_quat *", "p_self"],
- ["const godot_quat *", "p_b"]
- ]
- },
- {
- "name": "godot_quat_operator_divide",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_quat *", "p_self"],
- ["const godot_real", "p_b"]
- ]
- },
- {
- "name": "godot_quat_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_quat *", "p_self"],
- ["const godot_quat *", "p_b"]
- ]
- },
- {
- "name": "godot_quat_operator_neg",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_quat *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2_new_with_position_and_size",
- "return_type": "void",
- "arguments": [
- ["godot_rect2 *", "r_dest"],
- ["const godot_vector2 *", "p_pos"],
- ["const godot_vector2 *", "p_size"]
- ]
- },
- {
- "name": "godot_rect2_new",
- "return_type": "void",
- "arguments": [
- ["godot_rect2 *", "r_dest"],
- ["const godot_real", "p_x"],
- ["const godot_real", "p_y"],
- ["const godot_real", "p_width"],
- ["const godot_real", "p_height"]
- ]
- },
- {
- "name": "godot_rect2_as_rect2i",
- "return_type": "godot_rect2i",
- "arguments": [
- ["const godot_rect2 *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_rect2 *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2_get_area",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_rect2 *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2_grow_individual",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_rect2 *", "p_self"],
- ["const godot_real", "p_left"],
- ["const godot_real", "p_top"],
- ["const godot_real", "p_right"],
- ["const godot_real", "p_bottom"]
- ]
- },
- {
- "name": "godot_rect2_grow_side",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_rect2 *", "p_self"],
- ["const godot_int", "p_side"],
- ["const godot_real", "p_by"]
- ]
- },
- {
- "name": "godot_rect2_abs",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_rect2 *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2_intersects",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rect2 *", "p_self"],
- ["const godot_rect2 *", "p_b"]
- ]
- },
- {
- "name": "godot_rect2_encloses",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rect2 *", "p_self"],
- ["const godot_rect2 *", "p_b"]
- ]
- },
- {
- "name": "godot_rect2_has_no_area",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rect2 *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2_intersection",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_rect2 *", "p_self"],
- ["const godot_rect2 *", "p_b"]
- ]
- },
- {
- "name": "godot_rect2_merge",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_rect2 *", "p_self"],
- ["const godot_rect2 *", "p_b"]
- ]
- },
- {
- "name": "godot_rect2_has_point",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rect2 *", "p_self"],
- ["const godot_vector2 *", "p_point"]
- ]
- },
- {
- "name": "godot_rect2_grow",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_rect2 *", "p_self"],
- ["const godot_real", "p_by"]
- ]
- },
- {
- "name": "godot_rect2_expand",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_rect2 *", "p_self"],
- ["const godot_vector2 *", "p_to"]
- ]
- },
- {
- "name": "godot_rect2_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rect2 *", "p_self"],
- ["const godot_rect2 *", "p_b"]
- ]
- },
- {
- "name": "godot_rect2_get_position",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_rect2 *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2_get_size",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_rect2 *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2_set_position",
- "return_type": "void",
- "arguments": [
- ["godot_rect2 *", "p_self"],
- ["const godot_vector2 *", "p_pos"]
- ]
- },
- {
- "name": "godot_rect2_set_size",
- "return_type": "void",
- "arguments": [
- ["godot_rect2 *", "p_self"],
- ["const godot_vector2 *", "p_size"]
- ]
- },
- {
- "name": "godot_rect2i_new_with_position_and_size",
- "return_type": "void",
- "arguments": [
- ["godot_rect2i *", "r_dest"],
- ["const godot_vector2i *", "p_pos"],
- ["const godot_vector2i *", "p_size"]
- ]
- },
- {
- "name": "godot_rect2i_new",
- "return_type": "void",
- "arguments": [
- ["godot_rect2i *", "r_dest"],
- ["const godot_int", "p_x"],
- ["const godot_int", "p_y"],
- ["const godot_int", "p_width"],
- ["const godot_int", "p_height"]
- ]
- },
- {
- "name": "godot_rect2i_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_rect2i *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2i_as_rect2",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_rect2i *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2i_get_area",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_rect2i *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2i_intersects",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rect2i *", "p_self"],
- ["const godot_rect2i *", "p_b"]
- ]
- },
- {
- "name": "godot_rect2i_encloses",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rect2i *", "p_self"],
- ["const godot_rect2i *", "p_b"]
- ]
- },
- {
- "name": "godot_rect2i_has_no_area",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rect2i *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2i_intersection",
- "return_type": "godot_rect2i",
- "arguments": [
- ["const godot_rect2i *", "p_self"],
- ["const godot_rect2i *", "p_b"]
- ]
- },
- {
- "name": "godot_rect2i_merge",
- "return_type": "godot_rect2i",
- "arguments": [
- ["const godot_rect2i *", "p_self"],
- ["const godot_rect2i *", "p_b"]
- ]
- },
- {
- "name": "godot_rect2i_has_point",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rect2i *", "p_self"],
- ["const godot_vector2i *", "p_point"]
- ]
- },
- {
- "name": "godot_rect2i_grow",
- "return_type": "godot_rect2i",
- "arguments": [
- ["const godot_rect2i *", "p_self"],
- ["const godot_int", "p_by"]
- ]
- },
- {
- "name": "godot_rect2i_grow_individual",
- "return_type": "godot_rect2i",
- "arguments": [
- ["const godot_rect2i *", "p_self"],
- ["const godot_int", "p_left"],
- ["const godot_int", "p_top"],
- ["const godot_int", "p_right"],
- ["const godot_int", "p_bottom"]
- ]
- },
- {
- "name": "godot_rect2i_grow_side",
- "return_type": "godot_rect2i",
- "arguments": [
- ["const godot_rect2i *", "p_self"],
- ["const godot_int", "p_side"],
- ["const godot_int", "p_by"]
- ]
- },
- {
- "name": "godot_rect2i_abs",
- "return_type": "godot_rect2i",
- "arguments": [
- ["const godot_rect2i *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2i_expand",
- "return_type": "godot_rect2i",
- "arguments": [
- ["const godot_rect2i *", "p_self"],
- ["const godot_vector2i *", "p_to"]
- ]
- },
- {
- "name": "godot_rect2i_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rect2i *", "p_self"],
- ["const godot_rect2i *", "p_b"]
- ]
- },
- {
- "name": "godot_rect2i_get_position",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_rect2i *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2i_get_size",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_rect2i *", "p_self"]
- ]
- },
- {
- "name": "godot_rect2i_set_position",
- "return_type": "void",
- "arguments": [
- ["godot_rect2i *", "p_self"],
- ["const godot_vector2i *", "p_pos"]
- ]
- },
- {
- "name": "godot_rect2i_set_size",
- "return_type": "void",
- "arguments": [
- ["godot_rect2i *", "p_self"],
- ["const godot_vector2i *", "p_size"]
- ]
- },
- {
- "name": "godot_rid_new",
- "return_type": "void",
- "arguments": [
- ["godot_rid *", "r_dest"]
- ]
- },
- {
- "name": "godot_rid_get_id",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_rid *", "p_self"]
- ]
- },
- {
- "name": "godot_rid_new_with_resource",
- "return_type": "void",
- "arguments": [
- ["godot_rid *", "r_dest"],
- ["const godot_object *", "p_from"]
- ]
- },
- {
- "name": "godot_rid_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rid *", "p_self"],
- ["const godot_rid *", "p_b"]
- ]
- },
- {
- "name": "godot_rid_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_rid *", "p_self"],
- ["const godot_rid *", "p_b"]
- ]
- },
- {
- "name": "godot_char_string_length",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_char_string *", "p_cs"]
- ]
- },
- {
- "name": "godot_char_string_get_data",
- "return_type": "const char *",
- "arguments": [
- ["const godot_char_string *", "p_cs"]
- ]
- },
- {
- "name": "godot_char_string_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_char_string *", "p_cs"]
- ]
- },
- {
- "name": "godot_char16_string_length",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_char16_string *", "p_cs"]
- ]
- },
- {
- "name": "godot_char16_string_get_data",
- "return_type": "const char16_t *",
- "arguments": [
- ["const godot_char16_string *", "p_cs"]
- ]
- },
- {
- "name": "godot_char16_string_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_char16_string *", "p_cs"]
- ]
- },
- {
- "name": "godot_string_new",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"]
- ]
- },
- {
- "name": "godot_string_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const godot_string *", "p_src"]
- ]
- },
- {
- "name": "godot_string_new_with_latin1_chars",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const char *", "p_contents"]
- ]
- },
- {
- "name": "godot_string_new_with_utf8_chars",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const char *", "p_contents"]
- ]
- },
- {
- "name": "godot_string_new_with_utf16_chars",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const char16_t *", "p_contents"]
- ]
- },
- {
- "name": "godot_string_new_with_utf32_chars",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const char32_t *", "p_contents"]
- ]
- },
- {
- "name": "godot_string_new_with_wide_chars",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const wchar_t *", "p_contents"]
- ]
- },
- {
- "name": "godot_string_new_with_latin1_chars_and_len",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const char *", "p_contents"],
- ["const int", "p_size"]
- ]
- },
- {
- "name": "godot_string_new_with_utf8_chars_and_len",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const char *", "p_contents"],
- ["const int", "p_size"]
- ]
- },
- {
- "name": "godot_string_new_with_utf16_chars_and_len",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const char16_t *", "p_contents"],
- ["const int", "p_size"]
- ]
- },
- {
- "name": "godot_string_new_with_utf32_chars_and_len",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const char32_t *", "p_contents"],
- ["const int", "p_size"]
- ]
- },
- {
- "name": "godot_string_new_with_wide_chars_and_len",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "r_dest"],
- ["const wchar_t *", "p_contents"],
- ["const int", "p_size"]
- ]
- },
- {
- "name": "godot_string_operator_index",
- "return_type": "const godot_char_type *",
- "arguments": [
- ["godot_string *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_string_operator_index_const",
- "return_type": "godot_char_type",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_string_get_data",
- "return_type": "const godot_char_type *",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_b"]
- ]
- },
- {
- "name": "godot_string_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_b"]
- ]
- },
- {
- "name": "godot_string_operator_plus",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_b"]
- ]
- },
- {
- "name": "godot_string_count",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_what"],
- ["godot_int", "p_from"],
- ["godot_int", "p_to"]
- ]
- },
- {
- "name": "godot_string_countn",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_what"],
- ["godot_int", "p_from"],
- ["godot_int", "p_to"]
- ]
- },
- {
- "name": "godot_string_dedent",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_length",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_casecmp_to",
- "return_type": "signed char",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_str"]
- ]
- },
- {
- "name": "godot_string_nocasecmp_to",
- "return_type": "signed char",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_str"]
- ]
- },
- {
- "name": "godot_string_naturalnocasecmp_to",
- "return_type": "signed char",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_str"]
- ]
- },
- {
- "name": "godot_string_begins_with",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_string"]
- ]
- },
- {
- "name": "godot_string_begins_with_char_array",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const char *", "p_char_array"]
- ]
- },
- {
- "name": "godot_string_bigrams",
- "return_type": "godot_packed_string_array",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_chr",
- "return_type": "godot_string",
- "arguments": [
- ["godot_char_type", "p_character"]
- ]
- },
- {
- "name": "godot_string_ends_with",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_string"]
- ]
- },
- {
- "name": "godot_string_ends_with_char_array",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const char *", "p_char_array"]
- ]
- },
- {
- "name": "godot_string_find",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_what"]
- ]
- },
- {
- "name": "godot_string_find_from",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_what"],
- ["godot_int", "p_from"]
- ]
- },
- {
- "name": "godot_string_findmk",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_packed_string_array *", "p_keys"]
- ]
- },
- {
- "name": "godot_string_findmk_from",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_packed_string_array *", "p_keys"],
- ["godot_int", "p_from"]
- ]
- },
- {
- "name": "godot_string_findmk_from_in_place",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_packed_string_array *", "p_keys"],
- ["godot_int", "p_from"],
- ["godot_int *", "r_key"]
- ]
- },
- {
- "name": "godot_string_findn",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_what"]
- ]
- },
- {
- "name": "godot_string_findn_from",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_what"],
- ["godot_int", "p_from"]
- ]
- },
- {
- "name": "godot_string_format",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_variant *", "p_values"]
- ]
- },
- {
- "name": "godot_string_format_with_custom_placeholder",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_variant *", "p_values"],
- ["const char *", "p_placeholder"]
- ]
- },
- {
- "name": "godot_string_hex_encode_buffer",
- "return_type": "godot_string",
- "arguments": [
- ["const uint8_t *", "p_buffer"],
- ["godot_int", "p_len"]
- ]
- },
- {
- "name": "godot_string_insert",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_at_pos"],
- ["const godot_string *", "p_string"]
- ]
- },
- {
- "name": "godot_string_is_numeric",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_is_subsequence_of",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_string"]
- ]
- },
- {
- "name": "godot_string_is_subsequence_ofi",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_string"]
- ]
- },
- {
- "name": "godot_string_lpad",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_min_length"]
- ]
- },
- {
- "name": "godot_string_lpad_with_custom_character",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_min_length"],
- ["const godot_string *", "p_character"]
- ]
- },
- {
- "name": "godot_string_match",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_wildcard"]
- ]
- },
- {
- "name": "godot_string_matchn",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_wildcard"]
- ]
- },
- {
- "name": "godot_string_md5",
- "return_type": "godot_string",
- "arguments": [
- ["const uint8_t *", "p_md5"]
- ]
- },
- {
- "name": "godot_string_num",
- "return_type": "godot_string",
- "arguments": [
- ["double", "p_num"]
- ]
- },
- {
- "name": "godot_string_num_int64",
- "return_type": "godot_string",
- "arguments": [
- ["int64_t", "p_num"],
- ["godot_int", "p_base"]
- ]
- },
- {
- "name": "godot_string_num_int64_capitalized",
- "return_type": "godot_string",
- "arguments": [
- ["int64_t", "p_num"],
- ["godot_int", "p_base"],
- ["godot_bool", "p_capitalize_hex"]
- ]
- },
- {
- "name": "godot_string_num_real",
- "return_type": "godot_string",
- "arguments": [
- ["double", "p_num"]
- ]
- },
- {
- "name": "godot_string_num_scientific",
- "return_type": "godot_string",
- "arguments": [
- ["double", "p_num"]
- ]
- },
- {
- "name": "godot_string_num_with_decimals",
- "return_type": "godot_string",
- "arguments": [
- ["double", "p_num"],
- ["godot_int", "p_decimals"]
- ]
- },
- {
- "name": "godot_string_pad_decimals",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_digits"]
- ]
- },
- {
- "name": "godot_string_pad_zeros",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_digits"]
- ]
- },
- {
- "name": "godot_string_replace_first",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_key"],
- ["const godot_string *", "p_with"]
- ]
- },
- {
- "name": "godot_string_replace",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_key"],
- ["const godot_string *", "p_with"]
- ]
- },
- {
- "name": "godot_string_replacen",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_key"],
- ["const godot_string *", "p_with"]
- ]
- },
- {
- "name": "godot_string_rfind",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_what"]
- ]
- },
- {
- "name": "godot_string_rfindn",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_what"]
- ]
- },
- {
- "name": "godot_string_rfind_from",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_what"],
- ["godot_int", "p_from"]
- ]
- },
- {
- "name": "godot_string_rfindn_from",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_what"],
- ["godot_int", "p_from"]
- ]
- },
- {
- "name": "godot_string_rpad",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_min_length"]
- ]
- },
- {
- "name": "godot_string_rpad_with_custom_character",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_min_length"],
- ["const godot_string *", "p_character"]
- ]
- },
- {
- "name": "godot_string_similarity",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_string"]
- ]
- },
- {
- "name": "godot_string_sprintf",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_array *", "p_values"],
- ["godot_bool *", "p_error"]
- ]
- },
- {
- "name": "godot_string_substr",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_from"],
- ["godot_int", "p_chars"]
- ]
- },
- {
- "name": "godot_string_to_int",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_to_float",
- "return_type": "double",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_camelcase_to_underscore",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_camelcase_to_underscore_lowercased",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_capitalize",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_char_to_float",
- "return_type": "double",
- "arguments": [
- ["const char *", "p_what"]
- ]
- },
- {
- "name": "godot_string_wchar_to_float",
- "return_type": "double",
- "arguments": [
- ["const wchar_t *", "p_str"],
- ["const wchar_t **", "r_end"]
- ]
- },
- {
- "name": "godot_string_char_to_int",
- "return_type": "godot_int",
- "arguments": [
- ["const char *", "p_what"]
- ]
- },
- {
- "name": "godot_string_wchar_to_int",
- "return_type": "godot_int",
- "arguments": [
- ["const wchar_t *", "p_str"]
- ]
- },
- {
- "name": "godot_string_char_to_int_with_len",
- "return_type": "godot_int",
- "arguments": [
- ["const char *", "p_what"],
- ["godot_int", "p_len"]
- ]
- },
- {
- "name": "godot_string_wchar_to_int_with_len",
- "return_type": "godot_int",
- "arguments": [
- ["const wchar_t *", "p_str"],
- ["int", "p_len"]
- ]
- },
- {
- "name": "godot_string_hex_to_int",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_hex_to_int_with_prefix",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_get_slice_count",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"]
- ]
- },
- {
- "name": "godot_string_get_slice",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"],
- ["godot_int", "p_slice"]
- ]
- },
- {
- "name": "godot_string_get_slicec",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_char_type", "p_splitter"],
- ["godot_int", "p_slice"]
- ]
- },
- {
- "name": "godot_string_split",
- "return_type": "godot_packed_string_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"]
- ]
- },
- {
- "name": "godot_string_split_allow_empty",
- "return_type": "godot_packed_string_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"]
- ]
- },
- {
- "name": "godot_string_split_with_maxsplit",
- "return_type": "godot_packed_string_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"],
- ["const godot_bool", "p_allow_empty"],
- ["const godot_int", "p_maxsplit"]
- ]
- },
- {
- "name": "godot_string_rsplit",
- "return_type": "godot_packed_string_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"]
- ]
- },
- {
- "name": "godot_string_rsplit_allow_empty",
- "return_type": "godot_packed_string_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"]
- ]
- },
- {
- "name": "godot_string_rsplit_with_maxsplit",
- "return_type": "godot_packed_string_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"],
- ["const godot_bool", "p_allow_empty"],
- ["const godot_int", "p_maxsplit"]
- ]
- },
- {
- "name": "godot_string_split_floats",
- "return_type": "godot_packed_float32_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"]
- ]
- },
- {
- "name": "godot_string_split_floats_allow_empty",
- "return_type": "godot_packed_float32_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"]
- ]
- },
- {
- "name": "godot_string_split_floats_mk",
- "return_type": "godot_packed_float32_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_packed_string_array *", "p_splitters"]
- ]
- },
- {
- "name": "godot_string_split_floats_mk_allow_empty",
- "return_type": "godot_packed_float32_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_packed_string_array *", "p_splitters"]
- ]
- },
- {
- "name": "godot_string_split_ints",
- "return_type": "godot_packed_int32_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"]
- ]
- },
- {
- "name": "godot_string_split_ints_allow_empty",
- "return_type": "godot_packed_int32_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_splitter"]
- ]
- },
- {
- "name": "godot_string_split_ints_mk",
- "return_type": "godot_packed_int32_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_packed_string_array *", "p_splitters"]
- ]
- },
- {
- "name": "godot_string_split_ints_mk_allow_empty",
- "return_type": "godot_packed_int32_array",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_packed_string_array *", "p_splitters"]
- ]
- },
- {
- "name": "godot_string_split_spaces",
- "return_type": "godot_packed_string_array",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_lstrip",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_chars"]
- ]
- },
- {
- "name": "godot_string_rstrip",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_chars"]
- ]
- },
- {
- "name": "godot_string_trim_prefix",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_prefix"]
- ]
- },
- {
- "name": "godot_string_trim_suffix",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_suffix"]
- ]
- },
- {
- "name": "godot_string_char_lowercase",
- "return_type": "godot_char_type",
- "arguments": [
- ["godot_char_type", "p_char"]
- ]
- },
- {
- "name": "godot_string_char_uppercase",
- "return_type": "godot_char_type",
- "arguments": [
- ["godot_char_type", "p_char"]
- ]
- },
- {
- "name": "godot_string_to_lower",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_to_upper",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_get_basename",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_get_extension",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_left",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_pos"]
- ]
- },
- {
- "name": "godot_string_ord_at",
- "return_type": "godot_char_type",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_string_plus_file",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_file"]
- ]
- },
- {
- "name": "godot_string_right",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_pos"]
- ]
- },
- {
- "name": "godot_string_repeat",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_int", "p_count"]
- ]
- },
- {
- "name": "godot_string_strip_edges",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_bool", "p_left"],
- ["godot_bool", "p_right"]
- ]
- },
- {
- "name": "godot_string_strip_escapes",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_erase",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "p_self"],
- ["godot_int", "p_pos"],
- ["godot_int", "p_chars"]
- ]
- },
- {
- "name": "godot_string_ascii",
- "return_type": "godot_char_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_latin1",
- "return_type": "godot_char_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_utf8",
- "return_type": "godot_char_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_parse_utf8",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_string *", "p_self"],
- ["const char *", "p_utf8"]
- ]
- },
- {
- "name": "godot_string_parse_utf8_with_len",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_string *", "p_self"],
- ["const char *", "p_utf8"],
- ["godot_int", "p_len"]
- ]
- },
- {
- "name": "godot_string_utf16",
- "return_type": "godot_char16_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_parse_utf16",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_string *", "p_self"],
- ["const char16_t *", "p_utf16"]
- ]
- },
- {
- "name": "godot_string_parse_utf16_with_len",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_string *", "p_self"],
- ["const char16_t *", "p_utf16"],
- ["godot_int", "p_len"]
- ]
- },
- {
- "name": "godot_string_hash",
- "return_type": "uint32_t",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_hash64",
- "return_type": "uint64_t",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_hash_chars",
- "return_type": "uint32_t",
- "arguments": [
- ["const char *", "p_cstr"]
- ]
- },
- {
- "name": "godot_string_hash_chars_with_len",
- "return_type": "uint32_t",
- "arguments": [
- ["const char *", "p_cstr"],
- ["godot_int", "p_len"]
- ]
- },
- {
- "name": "godot_string_hash_wide_chars",
- "return_type": "uint32_t",
- "arguments": [
- ["const wchar_t *", "p_str"]
- ]
- },
- {
- "name": "godot_string_hash_wide_chars_with_len",
- "return_type": "uint32_t",
- "arguments": [
- ["const wchar_t *", "p_str"],
- ["godot_int", "p_len"]
- ]
- },
- {
- "name": "godot_string_md5_buffer",
- "return_type": "godot_packed_byte_array",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_md5_text",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_sha1_buffer",
- "return_type": "godot_packed_byte_array",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_sha1_text",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_sha256_buffer",
- "return_type": "godot_packed_byte_array",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_sha256_text",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_get_base_dir",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_get_file",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_humanize_size",
- "return_type": "godot_string",
- "arguments": [
- ["uint64_t", "p_size"]
- ]
- },
- {
- "name": "godot_string_is_abs_path",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_is_rel_path",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_is_resource_file",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_path_to",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_path"]
- ]
- },
- {
- "name": "godot_string_path_to_file",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_string *", "p_path"]
- ]
- },
- {
- "name": "godot_string_simplify_path",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_c_escape",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_c_escape_multiline",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_c_unescape",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_http_escape",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_http_unescape",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_json_escape",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_xml_escape",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_xml_escape_with_quotes",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_xml_unescape",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_percent_decode",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_percent_encode",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_join",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["const godot_packed_string_array *", "p_parts"]
- ]
- },
- {
- "name": "godot_string_is_valid_filename",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_is_valid_float",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_is_valid_hex_number",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"],
- ["godot_bool", "p_with_prefix"]
- ]
- },
- {
- "name": "godot_string_is_valid_html_color",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_is_valid_identifier",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_is_valid_integer",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_is_valid_ip_address",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_string *", "p_self"]
- ]
- },
- {
- "name": "godot_string_name_new",
- "return_type": "void",
- "arguments": [
- ["godot_string_name *", "r_dest"],
- ["const godot_string *", "p_name"]
- ]
- },
- {
- "name": "godot_string_name_new_data",
- "return_type": "void",
- "arguments": [
- ["godot_string_name *", "r_dest"],
- ["const char *", "p_name"]
- ]
- },
- {
- "name": "godot_string_name_get_name",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_string_name *", "p_self"]
- ]
- },
- {
- "name": "godot_string_name_get_hash",
- "return_type": "uint32_t",
- "arguments": [
- ["const godot_string_name *", "p_self"]
- ]
- },
- {
- "name": "godot_string_name_get_data_unique_pointer",
- "return_type": "const void *",
- "arguments": [
- ["const godot_string_name *", "p_self"]
- ]
- },
- {
- "name": "godot_string_name_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string_name *", "p_self"],
- ["const godot_string_name *", "p_other"]
- ]
- },
- {
- "name": "godot_string_name_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_string_name *", "p_self"],
- ["const godot_string_name *", "p_other"]
- ]
- },
- {
- "name": "godot_string_name_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_string_name *", "p_self"]
- ]
- },
- {
- "name": "godot_transform_new_with_axis_origin",
- "return_type": "void",
- "arguments": [
- ["godot_transform *", "r_dest"],
- ["const godot_vector3 *", "p_x_axis"],
- ["const godot_vector3 *", "p_y_axis"],
- ["const godot_vector3 *", "p_z_axis"],
- ["const godot_vector3 *", "p_origin"]
- ]
- },
- {
- "name": "godot_transform_new_with_quat",
- "return_type": "void",
- "arguments": [
- ["godot_transform *", "r_dest"],
- ["const godot_quat *", "p_quat"]
- ]
- },
- {
- "name": "godot_transform_new",
- "return_type": "void",
- "arguments": [
- ["godot_transform *", "r_dest"],
- ["const godot_basis *", "p_basis"],
- ["const godot_vector3 *", "p_origin"]
- ]
- },
- {
- "name": "godot_transform_get_basis",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_transform *", "p_self"]
- ]
- },
- {
- "name": "godot_transform_set_basis",
- "return_type": "void",
- "arguments": [
- ["godot_transform *", "p_self"],
- ["const godot_basis *", "p_v"]
- ]
- },
- {
- "name": "godot_transform_get_origin",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_transform *", "p_self"]
- ]
- },
- {
- "name": "godot_transform_set_origin",
- "return_type": "void",
- "arguments": [
- ["godot_transform *", "p_self"],
- ["const godot_vector3 *", "p_v"]
- ]
- },
- {
- "name": "godot_transform_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_transform *", "p_self"]
- ]
- },
- {
- "name": "godot_transform_inverse",
- "return_type": "godot_transform",
- "arguments": [
- ["const godot_transform *", "p_self"]
- ]
- },
- {
- "name": "godot_transform_affine_inverse",
- "return_type": "godot_transform",
- "arguments": [
- ["const godot_transform *", "p_self"]
- ]
- },
- {
- "name": "godot_transform_orthonormalized",
- "return_type": "godot_transform",
- "arguments": [
- ["const godot_transform *", "p_self"]
- ]
- },
- {
- "name": "godot_transform_rotated",
- "return_type": "godot_transform",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_vector3 *", "p_axis"],
- ["const godot_real", "p_phi"]
- ]
- },
- {
- "name": "godot_transform_scaled",
- "return_type": "godot_transform",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_vector3 *", "p_scale"]
- ]
- },
- {
- "name": "godot_transform_translated",
- "return_type": "godot_transform",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_vector3 *", "p_ofs"]
- ]
- },
- {
- "name": "godot_transform_looking_at",
- "return_type": "godot_transform",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_vector3 *", "p_target"],
- ["const godot_vector3 *", "p_up"]
- ]
- },
- {
- "name": "godot_transform_xform_plane",
- "return_type": "godot_plane",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_plane *", "p_v"]
- ]
- },
- {
- "name": "godot_transform_xform_inv_plane",
- "return_type": "godot_plane",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_plane *", "p_v"]
- ]
- },
- {
- "name": "godot_transform_new_identity",
- "return_type": "void",
- "arguments": [
- ["godot_transform *", "r_dest"]
- ]
- },
- {
- "name": "godot_transform_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_transform *", "p_b"]
- ]
- },
- {
- "name": "godot_transform_operator_multiply",
- "return_type": "godot_transform",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_transform *", "p_b"]
- ]
- },
- {
- "name": "godot_transform_xform_vector3",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_vector3 *", "p_v"]
- ]
- },
- {
- "name": "godot_transform_xform_inv_vector3",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_vector3 *", "p_v"]
- ]
- },
- {
- "name": "godot_transform_xform_aabb",
- "return_type": "godot_aabb",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_aabb *", "p_v"]
- ]
- },
- {
- "name": "godot_transform_xform_inv_aabb",
- "return_type": "godot_aabb",
- "arguments": [
- ["const godot_transform *", "p_self"],
- ["const godot_aabb *", "p_v"]
- ]
- },
- {
- "name": "godot_transform2d_new",
- "return_type": "void",
- "arguments": [
- ["godot_transform2d *", "r_dest"],
- ["const godot_real", "p_rot"],
- ["const godot_vector2 *", "p_pos"]
- ]
- },
- {
- "name": "godot_transform2d_new_axis_origin",
- "return_type": "void",
- "arguments": [
- ["godot_transform2d *", "r_dest"],
- ["const godot_vector2 *", "p_x_axis"],
- ["const godot_vector2 *", "p_y_axis"],
- ["const godot_vector2 *", "p_origin"]
- ]
- },
- {
- "name": "godot_transform2d_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_transform2d *", "p_self"]
- ]
- },
- {
- "name": "godot_transform2d_inverse",
- "return_type": "godot_transform2d",
- "arguments": [
- ["const godot_transform2d *", "p_self"]
- ]
- },
- {
- "name": "godot_transform2d_affine_inverse",
- "return_type": "godot_transform2d",
- "arguments": [
- ["const godot_transform2d *", "p_self"]
- ]
- },
- {
- "name": "godot_transform2d_get_rotation",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_transform2d *", "p_self"]
- ]
- },
- {
- "name": "godot_transform2d_get_origin",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_transform2d *", "p_self"]
- ]
- },
- {
- "name": "godot_transform2d_get_scale",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_transform2d *", "p_self"]
- ]
- },
- {
- "name": "godot_transform2d_orthonormalized",
- "return_type": "godot_transform2d",
- "arguments": [
- ["const godot_transform2d *", "p_self"]
- ]
- },
- {
- "name": "godot_transform2d_rotated",
- "return_type": "godot_transform2d",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_real", "p_phi"]
- ]
- },
- {
- "name": "godot_transform2d_scaled",
- "return_type": "godot_transform2d",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_vector2 *", "p_scale"]
- ]
- },
- {
- "name": "godot_transform2d_translated",
- "return_type": "godot_transform2d",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_vector2 *", "p_offset"]
- ]
- },
- {
- "name": "godot_transform2d_xform_vector2",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_vector2 *", "p_v"]
- ]
- },
- {
- "name": "godot_transform2d_xform_inv_vector2",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_vector2 *", "p_v"]
- ]
- },
- {
- "name": "godot_transform2d_basis_xform_vector2",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_vector2 *", "p_v"]
- ]
- },
- {
- "name": "godot_transform2d_basis_xform_inv_vector2",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_vector2 *", "p_v"]
- ]
- },
- {
- "name": "godot_transform2d_interpolate_with",
- "return_type": "godot_transform2d",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_transform2d *", "p_m"],
- ["const godot_real", "p_c"]
- ]
- },
- {
- "name": "godot_transform2d_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_transform2d *", "p_b"]
- ]
- },
- {
- "name": "godot_transform2d_operator_multiply",
- "return_type": "godot_transform2d",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_transform2d *", "p_b"]
- ]
- },
- {
- "name": "godot_transform2d_new_identity",
- "return_type": "void",
- "arguments": [
- ["godot_transform2d *", "r_dest"]
- ]
- },
- {
- "name": "godot_transform2d_xform_rect2",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_rect2 *", "p_v"]
- ]
- },
- {
- "name": "godot_transform2d_xform_inv_rect2",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_transform2d *", "p_self"],
- ["const godot_rect2 *", "p_v"]
- ]
- },
- {
- "name": "godot_variant_get_type",
- "return_type": "godot_variant_type",
- "arguments": [
- ["const godot_variant *", "p_v"]
- ]
- },
- {
- "name": "godot_variant_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_variant *", "p_src"]
- ]
- },
- {
- "name": "godot_variant_new_nil",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"]
- ]
- },
- {
- "name": "godot_variant_new_bool",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_bool", "p_b"]
- ]
- },
- {
- "name": "godot_variant_new_uint",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const uint64_t", "p_i"]
- ]
- },
- {
- "name": "godot_variant_new_int",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const int64_t", "p_i"]
- ]
- },
- {
- "name": "godot_variant_new_real",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const double", "p_r"]
- ]
- },
- {
- "name": "godot_variant_new_string",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_string *", "p_s"]
- ]
- },
- {
- "name": "godot_variant_new_string_name",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_string_name *", "p_s"]
- ]
- },
- {
- "name": "godot_variant_new_vector2",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_vector2 *", "p_v2"]
- ]
- },
- {
- "name": "godot_variant_new_vector2i",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_vector2i *", "p_v2"]
- ]
- },
- {
- "name": "godot_variant_new_rect2",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_rect2 *", "p_rect2"]
- ]
- },
- {
- "name": "godot_variant_new_rect2i",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_rect2i *", "p_rect2"]
- ]
- },
- {
- "name": "godot_variant_new_vector3",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_vector3 *", "p_v3"]
- ]
- },
- {
- "name": "godot_variant_new_vector3i",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_vector3i *", "p_v3"]
- ]
- },
- {
- "name": "godot_variant_new_transform2d",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_transform2d *", "p_t2d"]
- ]
- },
- {
- "name": "godot_variant_new_plane",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_plane *", "p_plane"]
- ]
- },
- {
- "name": "godot_variant_new_quat",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_quat *", "p_quat"]
- ]
- },
- {
- "name": "godot_variant_new_aabb",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_aabb *", "p_aabb"]
- ]
- },
- {
- "name": "godot_variant_new_basis",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_basis *", "p_basis"]
- ]
- },
- {
- "name": "godot_variant_new_transform",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_transform *", "p_trans"]
- ]
- },
- {
- "name": "godot_variant_new_color",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_color *", "p_color"]
- ]
- },
- {
- "name": "godot_variant_new_node_path",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_node_path *", "p_np"]
- ]
- },
- {
- "name": "godot_variant_new_rid",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_rid *", "p_rid"]
- ]
- },
- {
- "name": "godot_variant_new_object",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_object *", "p_obj"]
- ]
- },
- {
- "name": "godot_variant_new_callable",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_callable *", "p_cb"]
- ]
- },
- {
- "name": "godot_variant_new_signal",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_signal *", "p_signal"]
- ]
- },
- {
- "name": "godot_variant_new_dictionary",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_dictionary *", "p_dict"]
- ]
- },
- {
- "name": "godot_variant_new_array",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_array *", "p_arr"]
- ]
- },
- {
- "name": "godot_variant_new_packed_byte_array",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_packed_byte_array *", "p_pba"]
- ]
- },
- {
- "name": "godot_variant_new_packed_int32_array",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_packed_int32_array *", "p_pia"]
- ]
- },
- {
- "name": "godot_variant_new_packed_int64_array",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_packed_int64_array *", "p_pia"]
- ]
- },
- {
- "name": "godot_variant_new_packed_float32_array",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_packed_float32_array *", "p_pra"]
- ]
- },
- {
- "name": "godot_variant_new_packed_float64_array",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_packed_float64_array *", "p_pra"]
- ]
- },
- {
- "name": "godot_variant_new_packed_string_array",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_packed_string_array *", "p_psa"]
- ]
- },
- {
- "name": "godot_variant_new_packed_vector2_array",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_packed_vector2_array *", "p_pv2a"]
- ]
- },
- {
- "name": "godot_variant_new_packed_vector3_array",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_packed_vector3_array *", "p_pv3a"]
- ]
- },
- {
- "name": "godot_variant_new_packed_color_array",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "r_dest"],
- ["const godot_packed_color_array *", "p_pca"]
- ]
- },
- {
- "name": "godot_variant_as_bool",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_uint",
- "return_type": "uint64_t",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_int",
- "return_type": "int64_t",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_real",
- "return_type": "double",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_string_name",
- "return_type": "godot_string_name",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_vector2",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_vector2i",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_rect2",
- "return_type": "godot_rect2",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_rect2i",
- "return_type": "godot_rect2i",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_vector3",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_vector3i",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_transform2d",
- "return_type": "godot_transform2d",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_plane",
- "return_type": "godot_plane",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_quat",
- "return_type": "godot_quat",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_aabb",
- "return_type": "godot_aabb",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_basis",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_transform",
- "return_type": "godot_transform",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_color",
- "return_type": "godot_color",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_node_path",
- "return_type": "godot_node_path",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_rid",
- "return_type": "godot_rid",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_object",
- "return_type": "godot_object *",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_callable",
- "return_type": "godot_callable",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_signal",
- "return_type": "godot_signal",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_dictionary",
- "return_type": "godot_dictionary",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_array",
- "return_type": "godot_array",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_packed_byte_array",
- "return_type": "godot_packed_byte_array",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_packed_int32_array",
- "return_type": "godot_packed_int32_array",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_packed_int64_array",
- "return_type": "godot_packed_int64_array",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_packed_float32_array",
- "return_type": "godot_packed_float32_array",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_packed_float64_array",
- "return_type": "godot_packed_float64_array",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_packed_string_array",
- "return_type": "godot_packed_string_array",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_packed_vector2_array",
- "return_type": "godot_packed_vector2_array",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_packed_vector3_array",
- "return_type": "godot_packed_vector3_array",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_as_packed_color_array",
- "return_type": "godot_packed_color_array",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_call",
- "return_type": "godot_variant",
- "arguments": [
- ["godot_variant *", "p_self"],
- ["const godot_string *", "p_method"],
- ["const godot_variant **", "p_args"],
- ["const godot_int", "p_argcount"],
- ["godot_variant_call_error *", "r_error"]
- ]
- },
- {
- "name": "godot_variant_has_method",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_variant *", "p_self"],
- ["const godot_string *", "p_method"]
- ]
- },
- {
- "name": "godot_variant_hash",
- "return_type": "uint32_t",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_variant *", "p_self"],
- ["const godot_variant *", "p_other"]
- ]
- },
- {
- "name": "godot_variant_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_variant *", "p_self"],
- ["const godot_variant *", "p_other"]
- ]
- },
- {
- "name": "godot_variant_get_operator_name",
- "return_type": "godot_string",
- "arguments": [
- ["godot_variant_operator", "p_op"]
- ]
- },
- {
- "name": "godot_variant_evaluate",
- "return_type": "void",
- "arguments": [
- ["godot_variant_operator", "p_op"],
- ["const godot_variant *", "p_a"],
- ["const godot_variant *", "p_b"],
- ["godot_variant *", "r_ret"],
- ["godot_bool *", "r_valid"]
- ]
- },
- {
- "name": "godot_variant_hash_compare",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_variant *", "p_self"],
- ["const godot_variant *", "p_other"]
- ]
- },
- {
- "name": "godot_variant_booleanize",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_variant_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_variant *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_as_vector2i",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_sign",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_move_toward",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_to"],
- ["const godot_real", "p_delta"]
- ]
- },
- {
- "name": "godot_vector2_direction_to",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_to"]
- ]
- },
- {
- "name": "godot_vector2_new",
- "return_type": "void",
- "arguments": [
- ["godot_vector2 *", "r_dest"],
- ["const godot_real", "p_x"],
- ["const godot_real", "p_y"]
- ]
- },
- {
- "name": "godot_vector2_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_normalized",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_length",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_angle",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_length_squared",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_is_normalized",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_distance_to",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_to"]
- ]
- },
- {
- "name": "godot_vector2_distance_squared_to",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_to"]
- ]
- },
- {
- "name": "godot_vector2_angle_to",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_to"]
- ]
- },
- {
- "name": "godot_vector2_angle_to_point",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_to"]
- ]
- },
- {
- "name": "godot_vector2_lerp",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_b"],
- ["const godot_real", "p_t"]
- ]
- },
- {
- "name": "godot_vector2_cubic_interpolate",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_b"],
- ["const godot_vector2 *", "p_pre_a"],
- ["const godot_vector2 *", "p_post_b"],
- ["const godot_real", "p_t"]
- ]
- },
- {
- "name": "godot_vector2_rotated",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_real", "p_phi"]
- ]
- },
- {
- "name": "godot_vector2_orthogonal",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_floor",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_snapped",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_by"]
- ]
- },
- {
- "name": "godot_vector2_aspect",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_dot",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_with"]
- ]
- },
- {
- "name": "godot_vector2_slide",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_n"]
- ]
- },
- {
- "name": "godot_vector2_bounce",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_n"]
- ]
- },
- {
- "name": "godot_vector2_reflect",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_n"]
- ]
- },
- {
- "name": "godot_vector2_abs",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_clamped",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_real", "p_length"]
- ]
- },
- {
- "name": "godot_vector2_operator_add",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2_operator_subtract",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2_operator_multiply_vector",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2_operator_multiply_scalar",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_real", "p_b"]
- ]
- },
- {
- "name": "godot_vector2_operator_divide_vector",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2_operator_divide_scalar",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_real", "p_b"]
- ]
- },
- {
- "name": "godot_vector2_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_vector2 *", "p_self"],
- ["const godot_vector2 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2_operator_neg",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_set_x",
- "return_type": "void",
- "arguments": [
- ["godot_vector2 *", "p_self"],
- ["const godot_real", "p_x"]
- ]
- },
- {
- "name": "godot_vector2_set_y",
- "return_type": "void",
- "arguments": [
- ["godot_vector2 *", "p_self"],
- ["const godot_real", "p_y"]
- ]
- },
- {
- "name": "godot_vector2_get_x",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2_get_y",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2i_new",
- "return_type": "void",
- "arguments": [
- ["godot_vector2i *", "r_dest"],
- ["const godot_int", "p_x"],
- ["const godot_int", "p_y"]
- ]
- },
- {
- "name": "godot_vector2i_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_vector2i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2i_as_vector2",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_vector2i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2i_aspect",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector2i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2i_abs",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_vector2i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2i_sign",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_vector2i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2i_operator_add",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_vector2i *", "p_self"],
- ["const godot_vector2i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2i_operator_subtract",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_vector2i *", "p_self"],
- ["const godot_vector2i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2i_operator_multiply_vector",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_vector2i *", "p_self"],
- ["const godot_vector2i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2i_operator_multiply_scalar",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_vector2i *", "p_self"],
- ["const godot_int", "p_b"]
- ]
- },
- {
- "name": "godot_vector2i_operator_divide_vector",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_vector2i *", "p_self"],
- ["const godot_vector2i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2i_operator_divide_scalar",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_vector2i *", "p_self"],
- ["const godot_int", "p_b"]
- ]
- },
- {
- "name": "godot_vector2i_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_vector2i *", "p_self"],
- ["const godot_vector2i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2i_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_vector2i *", "p_self"],
- ["const godot_vector2i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector2i_operator_neg",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_vector2i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2i_set_x",
- "return_type": "void",
- "arguments": [
- ["godot_vector2i *", "p_self"],
- ["const godot_int", "p_x"]
- ]
- },
- {
- "name": "godot_vector2i_set_y",
- "return_type": "void",
- "arguments": [
- ["godot_vector2i *", "p_self"],
- ["const godot_int", "p_y"]
- ]
- },
- {
- "name": "godot_vector2i_get_x",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_vector2i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector2i_get_y",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_vector2i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_as_vector3i",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_sign",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_move_toward",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_to"],
- ["const godot_real", "p_delta"]
- ]
- },
- {
- "name": "godot_vector3_direction_to",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_to"]
- ]
- },
- {
- "name": "godot_vector3_new",
- "return_type": "void",
- "arguments": [
- ["godot_vector3 *", "r_dest"],
- ["const godot_real", "p_x"],
- ["const godot_real", "p_y"],
- ["const godot_real", "p_z"]
- ]
- },
- {
- "name": "godot_vector3_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_min_axis",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_max_axis",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_length",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_length_squared",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_is_normalized",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_normalized",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_inverse",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_snapped",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_by"]
- ]
- },
- {
- "name": "godot_vector3_rotated",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_axis"],
- ["const godot_real", "p_phi"]
- ]
- },
- {
- "name": "godot_vector3_lerp",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"],
- ["const godot_real", "p_t"]
- ]
- },
- {
- "name": "godot_vector3_cubic_interpolate",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"],
- ["const godot_vector3 *", "p_pre_a"],
- ["const godot_vector3 *", "p_post_b"],
- ["const godot_real", "p_t"]
- ]
- },
- {
- "name": "godot_vector3_dot",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_cross",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_outer",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_to_diagonal_matrix",
- "return_type": "godot_basis",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_abs",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_floor",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_ceil",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_distance_to",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_distance_squared_to",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_angle_to",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_to"]
- ]
- },
- {
- "name": "godot_vector3_slide",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_n"]
- ]
- },
- {
- "name": "godot_vector3_bounce",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_n"]
- ]
- },
- {
- "name": "godot_vector3_reflect",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_n"]
- ]
- },
- {
- "name": "godot_vector3_operator_add",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_operator_subtract",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_operator_multiply_vector",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_operator_multiply_scalar",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_real", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_operator_divide_vector",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_operator_divide_scalar",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_real", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3 *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3_operator_neg",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3 *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3_set_axis",
- "return_type": "void",
- "arguments": [
- ["godot_vector3 *", "p_self"],
- ["const godot_vector3_axis", "p_axis"],
- ["const godot_real", "p_val"]
- ]
- },
- {
- "name": "godot_vector3_get_axis",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_vector3 *", "p_self"],
- ["const godot_vector3_axis", "p_axis"]
- ]
- },
- {
- "name": "godot_vector3i_new",
- "return_type": "void",
- "arguments": [
- ["godot_vector3i *", "r_dest"],
- ["const godot_int", "p_x"],
- ["const godot_int", "p_y"],
- ["const godot_int", "p_z"]
- ]
- },
- {
- "name": "godot_vector3i_as_string",
- "return_type": "godot_string",
- "arguments": [
- ["const godot_vector3i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3i_as_vector3",
- "return_type": "godot_vector3",
- "arguments": [
- ["const godot_vector3i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3i_min_axis",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_vector3i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3i_max_axis",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_vector3i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3i_abs",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_vector3i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3i_sign",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_vector3i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3i_operator_add",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_vector3i *", "p_self"],
- ["const godot_vector3i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3i_operator_subtract",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_vector3i *", "p_self"],
- ["const godot_vector3i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3i_operator_multiply_vector",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_vector3i *", "p_self"],
- ["const godot_vector3i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3i_operator_multiply_scalar",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_vector3i *", "p_self"],
- ["const godot_int", "p_b"]
- ]
- },
- {
- "name": "godot_vector3i_operator_divide_vector",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_vector3i *", "p_self"],
- ["const godot_vector3i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3i_operator_divide_scalar",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_vector3i *", "p_self"],
- ["const godot_int", "p_b"]
- ]
- },
- {
- "name": "godot_vector3i_operator_equal",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_vector3i *", "p_self"],
- ["const godot_vector3i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3i_operator_less",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_vector3i *", "p_self"],
- ["const godot_vector3i *", "p_b"]
- ]
- },
- {
- "name": "godot_vector3i_operator_neg",
- "return_type": "godot_vector3i",
- "arguments": [
- ["const godot_vector3i *", "p_self"]
- ]
- },
- {
- "name": "godot_vector3i_set_axis",
- "return_type": "void",
- "arguments": [
- ["godot_vector3i *", "p_self"],
- ["const godot_vector3_axis", "p_axis"],
- ["const godot_int", "p_val"]
- ]
- },
- {
- "name": "godot_vector3i_get_axis",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_vector3i *", "p_self"],
- ["const godot_vector3_axis", "p_axis"]
- ]
- },
- {
- "name": "godot_global_get_singleton",
- "return_type": "godot_object *",
- "arguments": [
- ["char *", "p_name"]
- ]
- },
- {
- "name": "godot_get_class_tag",
- "return_type": "void *",
- "arguments": [
- ["const godot_string_name *", "p_class"]
- ]
- },
- {
- "name": "godot_object_cast_to",
- "return_type": "godot_object *",
- "arguments": [
- ["const godot_object *", "p_object"],
- ["void *", "p_class_tag"]
- ]
- },
- {
- "name": "godot_object_get_instance_id",
- "return_type": "uint64_t",
- "arguments": [
- ["const godot_object *", "p_object"]
- ]
- },
- {
- "name": "godot_instance_from_id",
- "return_type": "godot_object *",
- "arguments": [
- ["uint64_t", "p_instance_id"]
- ]
- },
- {
- "name": "godot_object_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_object *", "p_o"]
- ]
- },
- {
- "name": "godot_method_bind_get_method",
- "return_type": "godot_method_bind *",
- "arguments": [
- ["const char *", "p_classname"],
- ["const char *", "p_methodname"]
- ]
- },
- {
- "name": "godot_method_bind_ptrcall",
- "return_type": "void",
- "arguments": [
- ["godot_method_bind *", "p_method_bind"],
- ["godot_object *", "p_instance"],
- ["const void **", "p_args"],
- ["void *", "p_ret"]
- ]
- },
- {
- "name": "godot_method_bind_call",
- "return_type": "godot_variant",
- "arguments": [
- ["godot_method_bind *", "p_method_bind"],
- ["godot_object *", "p_instance"],
- ["const godot_variant **", "p_args"],
- ["const int", "p_arg_count"],
- ["godot_variant_call_error *", "p_call_error"]
- ]
- },
- {
- "name": "godot_get_class_constructor",
- "return_type": "godot_class_constructor",
- "arguments": [
- ["const char *", "p_classname"]
- ]
- },
- {
- "name": "godot_get_global_constants",
- "return_type": "godot_dictionary",
- "arguments": [
- ]
- },
- {
- "name": "godot_register_native_call_type",
- "return_type": "void",
- "arguments": [
- ["const char *", "call_type"],
- ["native_call_cb", "p_callback"]
- ]
- },
- {
- "name": "godot_alloc",
- "return_type": "void *",
- "arguments": [
- ["int", "p_bytes"]
- ]
- },
- {
- "name": "godot_realloc",
- "return_type": "void *",
- "arguments": [
- ["void *", "p_ptr"],
- ["int", "p_bytes"]
- ]
- },
- {
- "name": "godot_free",
- "return_type": "void",
- "arguments": [
- ["void *", "p_ptr"]
- ]
- },
- {
- "name": "godot_print_error",
- "return_type": "void",
- "arguments": [
- ["const char *", "p_description"],
- ["const char *", "p_function"],
- ["const char *", "p_file"],
- ["int", "p_line"]
- ]
- },
- {
- "name": "godot_print_warning",
- "return_type": "void",
- "arguments": [
- ["const char *", "p_description"],
- ["const char *", "p_function"],
- ["const char *", "p_file"],
- ["int", "p_line"]
- ]
- },
- {
- "name": "godot_print",
- "return_type": "void",
- "arguments": [
- ["const godot_string *", "p_message"]
- ]
- }
- ]
- },
- "extensions": [
- {
- "name": "nativescript",
- "type": "NATIVESCRIPT",
- "version": {
- "major": 4,
- "minor": 0
- },
- "next": null,
- "api": [
- {
- "name": "godot_nativescript_register_class",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["const char *", "p_base"],
- ["godot_nativescript_instance_create_func", "p_create_func"],
- ["godot_nativescript_instance_destroy_func", "p_destroy_func"]
- ]
- },
- {
- "name": "godot_nativescript_register_tool_class",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["const char *", "p_base"],
- ["godot_nativescript_instance_create_func", "p_create_func"],
- ["godot_nativescript_instance_destroy_func", "p_destroy_func"]
- ]
- },
- {
- "name": "godot_nativescript_register_method",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["const char *", "p_function_name"],
- ["godot_nativescript_method_attributes", "p_attr"],
- ["godot_nativescript_instance_method", "p_method"]
- ]
- },
- {
- "name": "godot_nativescript_set_method_argument_information",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["const char *", "p_function_name"],
- ["int", "p_num_args"],
- ["const godot_nativescript_method_argument *", "p_args"]
- ]
- },
- {
- "name": "godot_nativescript_register_property",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["const char *", "p_path"],
- ["godot_nativescript_property_attributes *", "p_attr"],
- ["godot_nativescript_property_set_func", "p_set_func"],
- ["godot_nativescript_property_get_func", "p_get_func"]
- ]
- },
- {
- "name": "godot_nativescript_register_signal",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["const godot_nativescript_signal *", "p_signal"]
- ]
- },
- {
- "name": "godot_nativescript_get_userdata",
- "return_type": "void *",
- "arguments": [
- ["godot_object *", "p_instance"]
- ]
- },
- {
- "name": "godot_nativescript_set_class_documentation",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["godot_string", "p_documentation"]
- ]
- },
- {
- "name": "godot_nativescript_set_method_documentation",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["const char *", "p_function_name"],
- ["godot_string", "p_documentation"]
- ]
- },
- {
- "name": "godot_nativescript_set_property_documentation",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["const char *", "p_path"],
- ["godot_string", "p_documentation"]
- ]
- },
- {
- "name": "godot_nativescript_set_signal_documentation",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["const char *", "p_signal_name"],
- ["godot_string", "p_documentation"]
- ]
- },
- {
- "name": "godot_nativescript_set_global_type_tag",
- "return_type": "void",
- "arguments": [
- ["int", "p_idx"],
- ["const char *", "p_name"],
- ["const void *", "p_type_tag"]
- ]
- },
- {
- "name": "godot_nativescript_get_global_type_tag",
- "return_type": "const void *",
- "arguments": [
- ["int", "p_idx"],
- ["const char *", "p_name"]
- ]
- },
- {
- "name": "godot_nativescript_set_type_tag",
- "return_type": "void",
- "arguments": [
- ["void *", "p_gdnative_handle"],
- ["const char *", "p_name"],
- ["const void *", "p_type_tag"]
- ]
- },
- {
- "name": "godot_nativescript_get_type_tag",
- "return_type": "const void *",
- "arguments": [
- ["const godot_object *", "p_object"]
- ]
- },
- {
- "name": "godot_nativescript_register_instance_binding_data_functions",
- "return_type": "int",
- "arguments": [
- ["godot_nativescript_instance_binding_functions", "p_binding_functions"]
- ]
- },
- {
- "name": "godot_nativescript_unregister_instance_binding_data_functions",
- "return_type": "void",
- "arguments": [
- ["int", "p_idx"]
- ]
- },
- {
- "name": "godot_nativescript_get_instance_binding_data",
- "return_type": "void *",
- "arguments": [
- ["int", "p_idx"],
- ["godot_object *", "p_object"]
- ]
- },
- {
- "name": "godot_nativescript_profiling_add_data",
- "return_type": "void",
- "arguments": [
- ["const char *", "p_signature"],
- ["uint64_t", "p_line"]
- ]
- }
- ]
- },
- {
- "name": "pluginscript",
- "type": "PLUGINSCRIPT",
- "version": {
- "major": 1,
- "minor": 0
- },
- "next": null,
- "api": [
- {
- "name": "godot_pluginscript_register_language",
- "return_type": "void",
- "arguments": [
- ["const godot_pluginscript_language_desc *", "language_desc"]
- ]
- }
- ]
- },
- {
- "name": "android",
- "type": "ANDROID",
- "version": {
- "major": 1,
- "minor": 1
- },
- "next": null,
- "api": [
- {
- "name": "godot_android_get_env",
- "return_type": "JNIEnv*",
- "arguments": [
- ]
- },
- {
- "name": "godot_android_get_activity",
- "return_type": "jobject",
- "arguments": [
- ]
- },
- {
- "name": "godot_android_get_surface",
- "return_type": "jobject",
- "arguments": [
- ]
- },
- {
- "name": "godot_android_is_activity_resumed",
- "return_type": "bool",
- "arguments": [
- ]
- }
- ]
- },
- {
- "name": "xr",
- "type": "XR",
- "version": {
- "major": 1,
- "minor": 1
- },
- "next": null,
- "api": [
- {
- "name": "godot_xr_register_interface",
- "return_type": "void",
- "arguments": [
- ["const godot_xr_interface_gdnative *", "p_interface"]
- ]
- },
- {
- "name": "godot_xr_get_worldscale",
- "return_type": "godot_real",
- "arguments": []
- },
- {
- "name": "godot_xr_get_reference_frame",
- "return_type": "godot_transform",
- "arguments": []
- },
- {
- "name": "godot_xr_blit",
- "return_type": "void",
- "arguments": [
- ["godot_int", "p_eye"],
- ["godot_rid *", "p_render_target"],
- ["godot_rect2 *", "p_screen_rect"]
- ]
- },
- {
- "name": "godot_xr_get_texid",
- "return_type": "godot_int",
- "arguments": [
- ["godot_rid *", "p_render_target"]
- ]
- },
- {
- "name": "godot_xr_add_controller",
- "return_type": "godot_int",
- "arguments": [
- ["char *", "p_device_name"],
- ["godot_int", "p_hand"],
- ["godot_bool", "p_tracks_orientation"],
- ["godot_bool", "p_tracks_position"]
- ]
- },
- {
- "name": "godot_xr_remove_controller",
- "return_type": "void",
- "arguments": [
- ["godot_int", "p_controller_id"]
- ]
- },
- {
- "name": "godot_xr_set_controller_transform",
- "return_type": "void",
- "arguments": [
- ["godot_int", "p_controller_id"],
- ["godot_transform *", "p_transform"],
- ["godot_bool", "p_tracks_orientation"],
- ["godot_bool", "p_tracks_position"]
- ]
- },
- {
- "name": "godot_xr_set_controller_button",
- "return_type": "void",
- "arguments": [
- ["godot_int", "p_controller_id"],
- ["godot_int", "p_button"],
- ["godot_bool", "p_is_pressed"]
- ]
- },
- {
- "name": "godot_xr_set_controller_axis",
- "return_type": "void",
- "arguments": [
- ["godot_int", "p_controller_id"],
- ["godot_int", "p_exis"],
- ["godot_real", "p_value"],
- ["godot_bool", "p_can_be_negative"]
- ]
- },
- {
- "name": "godot_xr_get_controller_rumble",
- "return_type": "godot_real",
- "arguments": [
- ["godot_int", "p_controller_id"]
- ]
- }
- ]
- },
- {
- "name": "videodecoder",
- "type": "VIDEODECODER",
- "version": {
- "major": 0,
- "minor": 1
- },
- "next": null,
- "api": [
- {
- "name": "godot_videodecoder_file_read",
- "return_type": "godot_int",
- "arguments": [
- ["void *", "file_ptr"],
- ["uint8_t *", "buf"],
- ["int", "buf_size"]
- ]
- },
- {
- "name": "godot_videodecoder_file_seek",
- "return_type": "int64_t",
- "arguments": [
- [ "void *", "file_ptr"],
- ["int64_t", "pos"],
- ["int", "whence"]
- ]
- },
- {
- "name": "godot_videodecoder_register_decoder",
- "return_type": "void",
- "arguments": [
- ["const godot_videodecoder_interface_gdnative *", "p_interface"]
- ]
- }
- ]
- },
- {
- "name": "net",
- "type": "NET",
- "version": {
- "major": 4,
- "minor": 0
- },
- "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"]
- ]
- },
- {
- "name": "godot_net_set_webrtc_library",
- "return_type": "godot_error",
- "arguments": [
- ["const godot_net_webrtc_library *", "p_library"]
- ]
- },
- {
- "name": "godot_net_bind_webrtc_peer_connection",
- "return_type": "void",
- "arguments": [
- ["godot_object *", "p_obj"],
- ["const godot_net_webrtc_peer_connection *", "p_interface"]
- ]
- },
- {
- "name": "godot_net_bind_webrtc_data_channel",
- "return_type": "void",
- "arguments": [
- ["godot_object *", "p_obj"],
- ["const godot_net_webrtc_data_channel *", "p_interface"]
- ]
- }
- ]
- },
- {
- "name": "text",
- "type": "TEXT",
- "version": {
- "major": 1,
- "minor": 0
- },
- "next": null,
- "api": [
- {
- "name": "godot_text_register_interface",
- "return_type": "void",
- "arguments": [
- ["const godot_text_interface_gdnative *", "p_interface"],
- ["const godot_string *", "p_name"],
- ["uint32_t", "p_features"]
- ]
- },
- {
- "name": "godot_glyph_new",
- "return_type": "void",
- "arguments": [
- ["godot_glyph *", "r_dest"]
- ]
- },
- {
- "name": "godot_glyph_get_range",
- "return_type": "godot_vector2i",
- "arguments": [
- ["const godot_glyph *", "p_self"]
- ]
- },
- {
- "name": "godot_glyph_set_range",
- "return_type": "void",
- "arguments": [
- ["godot_glyph *", "p_self"],
- ["const godot_vector2i *", "p_range"]
- ]
- },
- {
- "name": "godot_glyph_get_count",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_glyph *", "p_self"]
- ]
- },
- {
- "name": "godot_glyph_set_count",
- "return_type": "void",
- "arguments": [
- ["godot_glyph *", "p_self"],
- ["godot_int", "p_count"]
- ]
- },
- {
- "name": "godot_glyph_get_repeat",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_glyph *", "p_self"]
- ]
- },
- {
- "name": "godot_glyph_set_repeat",
- "return_type": "void",
- "arguments": [
- ["godot_glyph *", "p_self"],
- ["godot_int", "p_repeat"]
- ]
- },
- {
- "name": "godot_glyph_get_flags",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_glyph *", "p_self"]
- ]
- },
- {
- "name": "godot_glyph_set_flags",
- "return_type": "void",
- "arguments": [
- ["godot_glyph *", "p_self"],
- ["godot_int", "p_flags"]
- ]
- },
- {
- "name": "godot_glyph_get_offset",
- "return_type": "godot_vector2",
- "arguments": [
- ["const godot_glyph *", "p_self"]
- ]
- },
- {
- "name": "godot_glyph_set_offset",
- "return_type": "void",
- "arguments": [
- ["godot_glyph *", "p_self"],
- ["const godot_vector2 *", "p_offset"]
- ]
- },
- {
- "name": "godot_glyph_get_advance",
- "return_type": "godot_real",
- "arguments": [
- ["const godot_glyph *", "p_self"]
- ]
- },
- {
- "name": "godot_glyph_set_advance",
- "return_type": "void",
- "arguments": [
- ["godot_glyph *", "p_self"],
- ["godot_real", "p_advance"]
- ]
- },
- {
- "name": "godot_glyph_get_font",
- "return_type": "godot_rid",
- "arguments": [
- ["const godot_glyph *", "p_self"]
- ]
- },
- {
- "name": "godot_glyph_set_font",
- "return_type": "void ",
- "arguments": [
- ["godot_glyph *", "p_self"],
- ["godot_rid *", "p_font"]
- ]
- },
- {
- "name": "godot_glyph_get_font_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_glyph *", "p_self"]
- ]
- },
- {
- "name": "godot_glyph_set_font_size",
- "return_type": "void",
- "arguments": [
- ["godot_glyph *", "p_self"],
- ["godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_glyph_get_index",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_glyph *", "p_self"]
- ]
- },
- {
- "name": "godot_glyph_set_index",
- "return_type": "void",
- "arguments": [
- ["godot_glyph *", "p_self"],
- ["godot_int", "p_index"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_new",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "r_dest"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_new_copy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "r_dest"],
- ["const godot_packed_glyph_array *", "p_src"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_is_empty",
- "return_type": "godot_bool",
- "arguments": [
- ["const godot_packed_glyph_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_append",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"],
- ["const godot_glyph *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_append_array",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"],
- ["const godot_packed_glyph_array *", "p_array"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_insert",
- "return_type": "godot_error",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_glyph *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_has",
- "return_type": "godot_bool",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"],
- ["const godot_glyph *", "p_value"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_sort",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_invert",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_push_back",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"],
- ["const godot_glyph *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_remove",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_resize",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"],
- ["const godot_int", "p_size"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_ptr",
- "return_type": "const godot_glyph *",
- "arguments": [
- ["const godot_packed_glyph_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_ptrw",
- "return_type": "godot_glyph *",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_set",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"],
- ["const godot_int", "p_idx"],
- ["const godot_glyph *", "p_data"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_get",
- "return_type": "godot_glyph",
- "arguments": [
- ["const godot_packed_glyph_array *", "p_self"],
- ["const godot_int", "p_idx"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_size",
- "return_type": "godot_int",
- "arguments": [
- ["const godot_packed_glyph_array *", "p_self"]
- ]
- },
- {
- "name": "godot_packed_glyph_array_destroy",
- "return_type": "void",
- "arguments": [
- ["godot_packed_glyph_array *", "p_self"]
- ]
- }
- ]
- }
- ]
+ "core": {
+ "type": "CORE",
+ "version": {
+ "major": 4,
+ "minor": 0
+ },
+ "next": null,
+ "api": [
+ {
+ "name": "godot_object_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_object *",
+ "p_o"
+ ]
+ ]
+ },
+ {
+ "name": "godot_global_get_singleton",
+ "return_type": "godot_object *",
+ "arguments": [
+ [
+ "char *",
+ "p_name"
+ ]
+ ]
+ },
+ {
+ "name": "godot_method_bind_get_method",
+ "return_type": "godot_method_bind *",
+ "arguments": [
+ [
+ "const char *",
+ "p_classname"
+ ],
+ [
+ "const char *",
+ "p_methodname"
+ ]
+ ]
+ },
+ {
+ "name": "godot_method_bind_ptrcall",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_method_bind *",
+ "p_method_bind"
+ ],
+ [
+ "godot_object *",
+ "p_instance"
+ ],
+ [
+ "const void **",
+ "p_args"
+ ],
+ [
+ "void *",
+ "p_ret"
+ ]
+ ]
+ },
+ {
+ "name": "godot_method_bind_call",
+ "return_type": "godot_variant",
+ "arguments": [
+ [
+ "godot_method_bind *",
+ "p_method_bind"
+ ],
+ [
+ "godot_object *",
+ "p_instance"
+ ],
+ [
+ "const godot_variant **",
+ "p_args"
+ ],
+ [
+ "const int",
+ "p_arg_count"
+ ],
+ [
+ "godot_variant_call_error *",
+ "p_call_error"
+ ]
+ ]
+ },
+ {
+ "name": "godot_get_class_constructor",
+ "return_type": "godot_class_constructor",
+ "arguments": [
+ [
+ "const char *",
+ "p_classname"
+ ]
+ ]
+ },
+ {
+ "name": "godot_get_global_constants",
+ "return_type": "godot_dictionary",
+ "arguments": []
+ },
+ {
+ "name": "godot_register_native_call_type",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const char *",
+ "call_type"
+ ],
+ [
+ "native_call_cb",
+ "p_callback"
+ ]
+ ]
+ },
+ {
+ "name": "godot_alloc",
+ "return_type": "void *",
+ "arguments": [
+ [
+ "int",
+ "p_bytes"
+ ]
+ ]
+ },
+ {
+ "name": "godot_realloc",
+ "return_type": "void *",
+ "arguments": [
+ [
+ "void *",
+ "p_ptr"
+ ],
+ [
+ "int",
+ "p_bytes"
+ ]
+ ]
+ },
+ {
+ "name": "godot_free",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_ptr"
+ ]
+ ]
+ },
+ {
+ "name": "godot_print_error",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const char *",
+ "p_description"
+ ],
+ [
+ "const char *",
+ "p_function"
+ ],
+ [
+ "const char *",
+ "p_file"
+ ],
+ [
+ "int",
+ "p_line"
+ ]
+ ]
+ },
+ {
+ "name": "godot_print_warning",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const char *",
+ "p_description"
+ ],
+ [
+ "const char *",
+ "p_function"
+ ],
+ [
+ "const char *",
+ "p_file"
+ ],
+ [
+ "int",
+ "p_line"
+ ]
+ ]
+ },
+ {
+ "name": "godot_print_script_error",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const char *",
+ "p_description"
+ ],
+ [
+ "const char *",
+ "p_function"
+ ],
+ [
+ "const char *",
+ "p_file"
+ ],
+ [
+ "int",
+ "p_line"
+ ]
+ ]
+ },
+ {
+ "name": "godot_get_class_tag",
+ "return_type": "void *",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_class"
+ ]
+ ]
+ },
+ {
+ "name": "godot_object_cast_to",
+ "return_type": "godot_object *",
+ "arguments": [
+ [
+ "const godot_object *",
+ "p_object"
+ ],
+ [
+ "void *",
+ "p_class_tag"
+ ]
+ ]
+ },
+ {
+ "name": "godot_instance_from_id",
+ "return_type": "godot_object *",
+ "arguments": [
+ [
+ "uint64_t",
+ "p_instance_id"
+ ]
+ ]
+ },
+ {
+ "name": "godot_object_get_instance_id",
+ "return_type": "uint64_t",
+ "arguments": [
+ [
+ "const godot_object *",
+ "p_object"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_copy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_variant *",
+ "p_src"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_nil",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_bool",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_bool",
+ "p_b"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_int",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const int64_t",
+ "p_i"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_float",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const double",
+ "p_f"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_string",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_string *",
+ "p_s"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_string_name",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_string_name *",
+ "p_s"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_vector2",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_vector2 *",
+ "p_v2"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_vector2i",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_vector2i *",
+ "p_v2"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_rect2",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_rect2 *",
+ "p_rect2"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_rect2i",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_rect2i *",
+ "p_rect2"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_vector3",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_vector3 *",
+ "p_v3"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_vector3i",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_vector3i *",
+ "p_v3"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_transform2d",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_transform2d *",
+ "p_t2d"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_plane",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_plane *",
+ "p_plane"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_quat",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_quat *",
+ "p_quat"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_aabb",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_aabb *",
+ "p_aabb"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_basis",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_basis *",
+ "p_basis"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_transform",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_transform *",
+ "p_trans"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_color",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_color *",
+ "p_color"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_node_path",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_node_path *",
+ "p_np"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_rid",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_rid *",
+ "p_rid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_object",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_object *",
+ "p_obj"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_callable",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_callable *",
+ "p_cb"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_signal",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_signal *",
+ "p_signal"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_dictionary",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_dictionary *",
+ "p_dict"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_array *",
+ "p_arr"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_packed_byte_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_packed_byte_array *",
+ "p_pba"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_packed_int32_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_packed_int32_array *",
+ "p_pia"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_packed_int64_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_packed_int64_array *",
+ "p_pia"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_packed_float32_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_packed_float32_array *",
+ "p_pra"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_packed_float64_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_packed_float64_array *",
+ "p_pra"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_packed_string_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_packed_string_array *",
+ "p_psa"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_packed_vector2_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_packed_vector2_array *",
+ "p_pv2a"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_packed_vector3_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_packed_vector3_array *",
+ "p_pv3a"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_new_packed_color_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "r_dest"
+ ],
+ [
+ "const godot_packed_color_array *",
+ "p_pca"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_bool",
+ "return_type": "godot_bool",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_int",
+ "return_type": "int64_t",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_float",
+ "return_type": "double",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_string",
+ "return_type": "godot_string",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_string_name",
+ "return_type": "godot_string_name",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_vector2",
+ "return_type": "godot_vector2",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_vector2i",
+ "return_type": "godot_vector2i",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_rect2",
+ "return_type": "godot_rect2",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_rect2i",
+ "return_type": "godot_rect2i",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_vector3",
+ "return_type": "godot_vector3",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_vector3i",
+ "return_type": "godot_vector3i",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_transform2d",
+ "return_type": "godot_transform2d",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_plane",
+ "return_type": "godot_plane",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_quat",
+ "return_type": "godot_quat",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_aabb",
+ "return_type": "godot_aabb",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_basis",
+ "return_type": "godot_basis",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_transform",
+ "return_type": "godot_transform",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_color",
+ "return_type": "godot_color",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_node_path",
+ "return_type": "godot_node_path",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_rid",
+ "return_type": "godot_rid",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_object",
+ "return_type": "godot_object *",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_callable",
+ "return_type": "godot_callable",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_signal",
+ "return_type": "godot_signal",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_dictionary",
+ "return_type": "godot_dictionary",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_array",
+ "return_type": "godot_array",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_packed_byte_array",
+ "return_type": "godot_packed_byte_array",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_packed_int32_array",
+ "return_type": "godot_packed_int32_array",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_packed_int64_array",
+ "return_type": "godot_packed_int64_array",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_packed_float32_array",
+ "return_type": "godot_packed_float32_array",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_packed_float64_array",
+ "return_type": "godot_packed_float64_array",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_packed_string_array",
+ "return_type": "godot_packed_string_array",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_packed_vector2_array",
+ "return_type": "godot_packed_vector2_array",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_packed_vector3_array",
+ "return_type": "godot_packed_vector3_array",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_as_packed_color_array",
+ "return_type": "godot_packed_color_array",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_call",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "p_self"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ],
+ [
+ "const godot_variant **",
+ "p_args"
+ ],
+ [
+ "const godot_int",
+ "p_argument_count"
+ ],
+ [
+ "godot_variant *",
+ "r_return"
+ ],
+ [
+ "godot_variant_call_error *",
+ "r_error"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_evaluate",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant_operator",
+ "p_op"
+ ],
+ [
+ "const godot_variant *",
+ "p_a"
+ ],
+ [
+ "const godot_variant *",
+ "p_b"
+ ],
+ [
+ "godot_variant *",
+ "r_return"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_set",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "p_self"
+ ],
+ [
+ "const godot_variant *",
+ "p_key"
+ ],
+ [
+ "const godot_variant *",
+ "p_value"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_set_named",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "p_self"
+ ],
+ [
+ "const godot_string_name *",
+ "p_name"
+ ],
+ [
+ "const godot_variant *",
+ "p_value"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_set_keyed",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "p_self"
+ ],
+ [
+ "const godot_variant *",
+ "p_key"
+ ],
+ [
+ "const godot_variant *",
+ "p_value"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_set_indexed",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ],
+ [
+ "const godot_variant *",
+ "p_value"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ],
+ [
+ "bool *",
+ "r_oob"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get",
+ "return_type": "godot_variant",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "const godot_variant *",
+ "p_key"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_named",
+ "return_type": "godot_variant",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "const godot_string_name *",
+ "p_key"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_keyed",
+ "return_type": "godot_variant",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "const godot_variant *",
+ "p_key"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_indexed",
+ "return_type": "godot_variant",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ],
+ [
+ "bool *",
+ "r_oob"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_iter_init",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "godot_variant *",
+ "r_iter"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_iter_next",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "godot_variant *",
+ "r_iter"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_iter_get",
+ "return_type": "godot_variant",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "godot_variant *",
+ "r_iter"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_hash_compare",
+ "return_type": "godot_bool",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "const godot_variant *",
+ "p_other"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_booleanize",
+ "return_type": "godot_bool",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_blend",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_a"
+ ],
+ [
+ "const godot_variant *",
+ "p_b"
+ ],
+ [
+ "float",
+ "p_c"
+ ],
+ [
+ "godot_variant *",
+ "r_dst"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_interpolate",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_a"
+ ],
+ [
+ "const godot_variant *",
+ "p_b"
+ ],
+ [
+ "float",
+ "p_c"
+ ],
+ [
+ "godot_variant *",
+ "r_dst"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_duplicate",
+ "return_type": "godot_variant",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "godot_bool",
+ "p_deep"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_stringify",
+ "return_type": "godot_string",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_operator_evaluator",
+ "return_type": "godot_validated_operator_evaluator",
+ "arguments": [
+ [
+ "godot_variant_operator",
+ "p_operator"
+ ],
+ [
+ "godot_variant_type",
+ "p_type_a"
+ ],
+ [
+ "godot_variant_type",
+ "p_type_b"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_operator_evaluator",
+ "return_type": "godot_ptr_operator_evaluator",
+ "arguments": [
+ [
+ "godot_variant_operator",
+ "p_operator"
+ ],
+ [
+ "godot_variant_type",
+ "p_type_a"
+ ],
+ [
+ "godot_variant_type",
+ "p_type_b"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_operator_return_type",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "godot_variant_operator",
+ "p_operator"
+ ],
+ [
+ "godot_variant_type",
+ "p_type_a"
+ ],
+ [
+ "godot_variant_type",
+ "p_type_b"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_operator_name",
+ "return_type": "godot_string",
+ "arguments": [
+ [
+ "godot_variant_operator",
+ "p_operator"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_builtin_method",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_builtin_method_with_cstring",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_builtin_method",
+ "return_type": "godot_validated_builtin_method",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_builtin_method_with_cstring",
+ "return_type": "godot_validated_builtin_method",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_builtin_method",
+ "return_type": "godot_ptr_builtin_method",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_builtin_method_with_cstring",
+ "return_type": "godot_ptr_builtin_method",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_builtin_method_argument_count",
+ "return_type": "int",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_builtin_method_argument_count_with_cstring",
+ "return_type": "int",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_builtin_method_argument_type",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ],
+ [
+ "int",
+ "p_argument"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_builtin_method_argument_type_with_cstring",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_method"
+ ],
+ [
+ "int",
+ "p_argument"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_builtin_method_argument_name",
+ "return_type": "godot_string",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ],
+ [
+ "int",
+ "p_argument"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_builtin_method_argument_name_with_cstring",
+ "return_type": "godot_string",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_method"
+ ],
+ [
+ "int",
+ "p_argument"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_builtin_method_return_value",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_builtin_method_return_value_with_cstring",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_builtin_method_return_type",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_builtin_method_return_type_with_cstring",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_is_builtin_method_const",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_is_builtin_method_const_with_cstring",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_is_builtin_method_vararg",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_is_builtin_method_vararg_with_cstring",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_builtin_method_count",
+ "return_type": "int",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_builtin_method_list",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "godot_string_name *",
+ "r_list"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_constructor_count",
+ "return_type": "int",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_constructor",
+ "return_type": "godot_validated_constructor",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "int",
+ "p_constructor"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_constructor",
+ "return_type": "godot_ptr_constructor",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "int",
+ "p_constructor"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_constructor_argument_count",
+ "return_type": "int",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "int",
+ "p_constructor"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_constructor_argument_type",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "int",
+ "p_constructor"
+ ],
+ [
+ "int",
+ "p_argument"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_constructor_argument_name",
+ "return_type": "godot_string",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "int",
+ "p_constructor"
+ ],
+ [
+ "int",
+ "p_argument"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_construct",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "godot_variant *",
+ "p_base"
+ ],
+ [
+ "const godot_variant **",
+ "p_args"
+ ],
+ [
+ "int",
+ "p_argument_count"
+ ],
+ [
+ "godot_variant_call_error *",
+ "r_error"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_member_type",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_member_type_with_cstring",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_member_count",
+ "return_type": "int",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_member_list",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "godot_string_name *",
+ "r_list"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_setter",
+ "return_type": "godot_validated_setter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_setter_with_cstring",
+ "return_type": "godot_validated_setter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_getter",
+ "return_type": "godot_validated_getter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_getter_with_cstring",
+ "return_type": "godot_validated_getter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_setter",
+ "return_type": "godot_ptr_setter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_setter_with_cstring",
+ "return_type": "godot_ptr_setter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_getter",
+ "return_type": "godot_ptr_getter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_getter_with_cstring",
+ "return_type": "godot_ptr_getter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_indexing",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_indexed_element_type",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_indexed_setter",
+ "return_type": "godot_validated_indexed_setter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_indexed_getter",
+ "return_type": "godot_validated_indexed_getter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_indexed_setter",
+ "return_type": "godot_ptr_indexed_setter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_indexed_getter",
+ "return_type": "godot_ptr_indexed_getter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_indexed_size",
+ "return_type": "uint64_t",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_is_keyed",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_keyed_setter",
+ "return_type": "godot_validated_keyed_setter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_keyed_getter",
+ "return_type": "godot_validated_keyed_getter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_keyed_checker",
+ "return_type": "godot_validated_keyed_checker",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_keyed_setter",
+ "return_type": "godot_ptr_keyed_setter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_keyed_getter",
+ "return_type": "godot_ptr_keyed_getter",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_keyed_checker",
+ "return_type": "godot_ptr_keyed_checker",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_constants_count",
+ "return_type": "int",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_constants_list",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "godot_string_name *",
+ "r_list"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_constant",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_constant"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_constant_with_cstring",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_constant"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_constant_value",
+ "return_type": "godot_variant",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_constant"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_constant_value_with_cstring",
+ "return_type": "godot_variant",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const char *",
+ "p_constant"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_utility_function",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_utility_function_with_cstring",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_call_utility_function",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ],
+ [
+ "godot_variant *",
+ "r_ret"
+ ],
+ [
+ "const godot_variant **",
+ "p_args"
+ ],
+ [
+ "int",
+ "p_argument_count"
+ ],
+ [
+ "godot_variant_call_error *",
+ "r_error"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_call_utility_function_with_cstring",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ],
+ [
+ "godot_variant *",
+ "r_ret"
+ ],
+ [
+ "const godot_variant **",
+ "p_args"
+ ],
+ [
+ "int",
+ "p_argument_count"
+ ],
+ [
+ "godot_variant_call_error *",
+ "r_error"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_utility_function",
+ "return_type": "godot_ptr_utility_function",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_ptr_utility_function_with_cstring",
+ "return_type": "godot_ptr_utility_function",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_utility_function",
+ "return_type": "godot_validated_utility_function",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_validated_utility_function_with_cstring",
+ "return_type": "godot_validated_utility_function",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_type",
+ "return_type": "godot_variant_utility_function_type",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_type_with_cstring",
+ "return_type": "godot_variant_utility_function_type",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_argument_count",
+ "return_type": "int",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_argument_count_with_cstring",
+ "return_type": "int",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_argument_type",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ],
+ [
+ "int",
+ "p_argument"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_argument_type_with_cstring",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ],
+ [
+ "int",
+ "p_argument"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_argument_name",
+ "return_type": "godot_string",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ],
+ [
+ "int",
+ "p_argument"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_argument_name_with_cstring",
+ "return_type": "godot_string",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ],
+ [
+ "int",
+ "p_argument"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_utility_function_return_value",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_utility_function_return_value_with_cstring",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_return_type",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_return_type_with_cstring",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_is_utility_function_vararg",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "const godot_string_name *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_is_utility_function_vararg_with_cstring",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "const char *",
+ "p_function"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_utility_function_count",
+ "return_type": "int",
+ "arguments": []
+ },
+ {
+ "name": "godot_variant_get_utility_function_list",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string_name *",
+ "r_functions"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_type",
+ "return_type": "godot_variant_type",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_method",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "const godot_string_name *",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_member",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ],
+ [
+ "const godot_string_name *",
+ "p_member"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_has_key",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "const godot_variant *",
+ "p_self"
+ ],
+ [
+ "const godot_variant *",
+ "p_key"
+ ],
+ [
+ "bool *",
+ "r_valid"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_get_type_name",
+ "return_type": "godot_string",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_type"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_can_convert",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_from"
+ ],
+ [
+ "godot_variant_type",
+ "p_to"
+ ]
+ ]
+ },
+ {
+ "name": "godot_variant_can_convert_strict",
+ "return_type": "bool",
+ "arguments": [
+ [
+ "godot_variant_type",
+ "p_from"
+ ],
+ [
+ "godot_variant_type",
+ "p_to"
+ ]
+ ]
+ },
+ {
+ "name": "godot_aabb_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_aabb *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_array_operator_index",
+ "return_type": "godot_variant *",
+ "arguments": [
+ [
+ "godot_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_array_operator_index_const",
+ "return_type": "const godot_variant *",
+ "arguments": [
+ [
+ "const godot_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_basis_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_basis *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_basis_operator_index",
+ "return_type": "godot_vector3 *",
+ "arguments": [
+ [
+ "godot_basis *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_basis_operator_index_const",
+ "return_type": "const godot_vector3 *",
+ "arguments": [
+ [
+ "const godot_basis *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_callable_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_callable *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_callable_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_callable *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_color_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_color *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_color_operator_index",
+ "return_type": "float *",
+ "arguments": [
+ [
+ "godot_color *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_color_operator_index_const",
+ "return_type": "const float *",
+ "arguments": [
+ [
+ "const godot_color *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_dictionary_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_dictionary *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_dictionary_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_dictionary *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_dictionary_operator_index",
+ "return_type": "godot_variant *",
+ "arguments": [
+ [
+ "godot_dictionary *",
+ "p_self"
+ ],
+ [
+ "const godot_variant *",
+ "p_key"
+ ]
+ ]
+ },
+ {
+ "name": "godot_dictionary_operator_index_const",
+ "return_type": "const godot_variant *",
+ "arguments": [
+ [
+ "const godot_dictionary *",
+ "p_self"
+ ],
+ [
+ "const godot_variant *",
+ "p_key"
+ ]
+ ]
+ },
+ {
+ "name": "godot_node_path_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_node_path *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_node_path_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_node_path *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_byte_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_byte_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_byte_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_byte_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_byte_array_operator_index",
+ "return_type": "uint8_t *",
+ "arguments": [
+ [
+ "godot_packed_byte_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_byte_array_operator_index_const",
+ "return_type": "const uint8_t *",
+ "arguments": [
+ [
+ "const godot_packed_byte_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_int32_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_int32_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_int32_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_int32_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_int32_array_operator_index",
+ "return_type": "int32_t *",
+ "arguments": [
+ [
+ "godot_packed_int32_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_int32_array_operator_index_const",
+ "return_type": "const int32_t *",
+ "arguments": [
+ [
+ "const godot_packed_int32_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_int64_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_int64_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_int64_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_int64_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_int64_array_operator_index",
+ "return_type": "int64_t *",
+ "arguments": [
+ [
+ "godot_packed_int64_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_int64_array_operator_index_const",
+ "return_type": "const int64_t *",
+ "arguments": [
+ [
+ "const godot_packed_int64_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_float32_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_float32_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_float32_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_float32_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_float32_array_operator_index",
+ "return_type": "float *",
+ "arguments": [
+ [
+ "godot_packed_float32_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_float32_array_operator_index_const",
+ "return_type": "const float *",
+ "arguments": [
+ [
+ "const godot_packed_float32_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_float64_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_float64_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_float64_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_float64_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_float64_array_operator_index",
+ "return_type": "double *",
+ "arguments": [
+ [
+ "godot_packed_float64_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_float64_array_operator_index_const",
+ "return_type": "const double *",
+ "arguments": [
+ [
+ "const godot_packed_float64_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_string_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_string_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_string_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_string_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_string_array_operator_index",
+ "return_type": "godot_string *",
+ "arguments": [
+ [
+ "godot_packed_string_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_string_array_operator_index_const",
+ "return_type": "const godot_string *",
+ "arguments": [
+ [
+ "const godot_packed_string_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector2_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_vector2_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector2_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_vector2_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector2_array_operator_index",
+ "return_type": "godot_vector2 *",
+ "arguments": [
+ [
+ "godot_packed_vector2_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector2_array_operator_index_const",
+ "return_type": "const godot_vector2 *",
+ "arguments": [
+ [
+ "const godot_packed_vector2_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector2i_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_vector2i_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector2i_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_vector2i_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector2i_array_operator_index",
+ "return_type": "godot_vector2i *",
+ "arguments": [
+ [
+ "godot_packed_vector2i_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector2i_array_operator_index_const",
+ "return_type": "const godot_vector2i *",
+ "arguments": [
+ [
+ "const godot_packed_vector2i_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector3_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_vector3_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector3_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_vector3_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector3_array_operator_index",
+ "return_type": "godot_vector3 *",
+ "arguments": [
+ [
+ "godot_packed_vector3_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector3_array_operator_index_const",
+ "return_type": "const godot_vector3 *",
+ "arguments": [
+ [
+ "const godot_packed_vector3_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector3i_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_vector3i_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector3i_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_vector3i_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector3i_array_operator_index",
+ "return_type": "godot_vector3i *",
+ "arguments": [
+ [
+ "godot_packed_vector3i_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_vector3i_array_operator_index_const",
+ "return_type": "const godot_vector3i *",
+ "arguments": [
+ [
+ "const godot_packed_vector3i_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_color_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_color_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_color_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_color_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_color_array_operator_index",
+ "return_type": "godot_color *",
+ "arguments": [
+ [
+ "godot_packed_color_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_color_array_operator_index_const",
+ "return_type": "const godot_color *",
+ "arguments": [
+ [
+ "const godot_packed_color_array *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_plane_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_plane *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_quat_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_quat *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_quat_operator_index",
+ "return_type": "godot_real_t *",
+ "arguments": [
+ [
+ "godot_quat *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_quat_operator_index_const",
+ "return_type": "const godot_real_t *",
+ "arguments": [
+ [
+ "const godot_quat *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_rect2_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_rect2 *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_rect2i_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_rect2i *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_rid_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_rid *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_signal_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_signal *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_signal_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_signal *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_copy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const godot_string *",
+ "p_src"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_with_latin1_chars",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const char *",
+ "p_contents"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_with_utf8_chars",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const char *",
+ "p_contents"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_with_utf16_chars",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const char16_t *",
+ "p_contents"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_with_utf32_chars",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const char32_t *",
+ "p_contents"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_with_wide_chars",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const wchar_t *",
+ "p_contents"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_with_latin1_chars_and_len",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const char *",
+ "p_contents"
+ ],
+ [
+ "const int",
+ "p_size"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_with_utf8_chars_and_len",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const char *",
+ "p_contents"
+ ],
+ [
+ "const int",
+ "p_size"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_with_utf16_chars_and_len",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const char16_t *",
+ "p_contents"
+ ],
+ [
+ "const int",
+ "p_size"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_with_utf32_chars_and_len",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const char32_t *",
+ "p_contents"
+ ],
+ [
+ "const int",
+ "p_size"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_new_with_wide_chars_and_len",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string *",
+ "r_dest"
+ ],
+ [
+ "const wchar_t *",
+ "p_contents"
+ ],
+ [
+ "const int",
+ "p_size"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_name_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string_name *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_name_new_copy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string_name *",
+ "r_dest"
+ ],
+ [
+ "const godot_string_name *",
+ "p_src"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_name_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string_name *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_string_name_new_with_latin1_chars",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_string_name *",
+ "r_dest"
+ ],
+ [
+ "const char *",
+ "p_contents"
+ ]
+ ]
+ },
+ {
+ "name": "godot_transform_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_transform *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_transform2d_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_transform2d *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_transform2d_operator_index",
+ "return_type": "godot_vector2 *",
+ "arguments": [
+ [
+ "godot_transform2d *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_transform2d_operator_index_const",
+ "return_type": "const godot_vector2 *",
+ "arguments": [
+ [
+ "const godot_transform2d *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector2_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_vector2 *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector2_operator_index",
+ "return_type": "godot_real_t *",
+ "arguments": [
+ [
+ "godot_vector2 *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector2_operator_index_const",
+ "return_type": "const godot_real_t *",
+ "arguments": [
+ [
+ "const godot_vector2 *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector2i_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_vector2i *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector2i_operator_index",
+ "return_type": "int32_t *",
+ "arguments": [
+ [
+ "godot_vector2i *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector2i_operator_index_const",
+ "return_type": "const int32_t *",
+ "arguments": [
+ [
+ "const godot_vector2i *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector3_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_vector3 *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector3_operator_index",
+ "return_type": "godot_real_t *",
+ "arguments": [
+ [
+ "godot_vector3 *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector3_operator_index_const",
+ "return_type": "const godot_real_t *",
+ "arguments": [
+ [
+ "const godot_vector3 *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector3i_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_vector3i *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector3i_operator_index",
+ "return_type": "int32_t *",
+ "arguments": [
+ [
+ "godot_vector3i *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_vector3i_operator_index_const",
+ "return_type": "const int32_t *",
+ "arguments": [
+ [
+ "const godot_vector3i *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ }
+ ]
+ },
+ "extensions": [
+ {
+ "name": "nativescript",
+ "type": "NATIVESCRIPT",
+ "version": {
+ "major": 4,
+ "minor": 0
+ },
+ "next": null,
+ "api": [
+ {
+ "name": "godot_nativescript_register_class",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const char *",
+ "p_base"
+ ],
+ [
+ "godot_nativescript_instance_create_func",
+ "p_create_func"
+ ],
+ [
+ "godot_nativescript_instance_destroy_func",
+ "p_destroy_func"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_register_tool_class",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const char *",
+ "p_base"
+ ],
+ [
+ "godot_nativescript_instance_create_func",
+ "p_create_func"
+ ],
+ [
+ "godot_nativescript_instance_destroy_func",
+ "p_destroy_func"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_register_method",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const char *",
+ "p_function_name"
+ ],
+ [
+ "godot_nativescript_method_attributes",
+ "p_attr"
+ ],
+ [
+ "godot_nativescript_instance_method",
+ "p_method"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_set_method_argument_information",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const char *",
+ "p_function_name"
+ ],
+ [
+ "int",
+ "p_num_args"
+ ],
+ [
+ "const godot_nativescript_method_argument *",
+ "p_args"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_register_property",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const char *",
+ "p_path"
+ ],
+ [
+ "godot_nativescript_property_attributes *",
+ "p_attr"
+ ],
+ [
+ "godot_nativescript_property_set_func",
+ "p_set_func"
+ ],
+ [
+ "godot_nativescript_property_get_func",
+ "p_get_func"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_register_signal",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const godot_nativescript_signal *",
+ "p_signal"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_get_userdata",
+ "return_type": "void *",
+ "arguments": [
+ [
+ "godot_object *",
+ "p_instance"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_set_class_documentation",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "godot_string",
+ "p_documentation"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_set_method_documentation",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const char *",
+ "p_function_name"
+ ],
+ [
+ "godot_string",
+ "p_documentation"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_set_property_documentation",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const char *",
+ "p_path"
+ ],
+ [
+ "godot_string",
+ "p_documentation"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_set_signal_documentation",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const char *",
+ "p_signal_name"
+ ],
+ [
+ "godot_string",
+ "p_documentation"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_set_global_type_tag",
+ "return_type": "void",
+ "arguments": [
+ [
+ "int",
+ "p_idx"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const void *",
+ "p_type_tag"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_get_global_type_tag",
+ "return_type": "const void *",
+ "arguments": [
+ [
+ "int",
+ "p_idx"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_set_type_tag",
+ "return_type": "void",
+ "arguments": [
+ [
+ "void *",
+ "p_gdnative_handle"
+ ],
+ [
+ "const char *",
+ "p_name"
+ ],
+ [
+ "const void *",
+ "p_type_tag"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_get_type_tag",
+ "return_type": "const void *",
+ "arguments": [
+ [
+ "const godot_object *",
+ "p_object"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_register_instance_binding_data_functions",
+ "return_type": "int",
+ "arguments": [
+ [
+ "godot_nativescript_instance_binding_functions",
+ "p_binding_functions"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_unregister_instance_binding_data_functions",
+ "return_type": "void",
+ "arguments": [
+ [
+ "int",
+ "p_idx"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_get_instance_binding_data",
+ "return_type": "void *",
+ "arguments": [
+ [
+ "int",
+ "p_idx"
+ ],
+ [
+ "godot_object *",
+ "p_object"
+ ]
+ ]
+ },
+ {
+ "name": "godot_nativescript_profiling_add_data",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const char *",
+ "p_signature"
+ ],
+ [
+ "uint64_t",
+ "p_line"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "name": "pluginscript",
+ "type": "PLUGINSCRIPT",
+ "version": {
+ "major": 1,
+ "minor": 0
+ },
+ "next": null,
+ "api": [
+ {
+ "name": "godot_pluginscript_register_language",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const godot_pluginscript_language_desc *",
+ "language_desc"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "name": "android",
+ "type": "ANDROID",
+ "version": {
+ "major": 1,
+ "minor": 1
+ },
+ "next": null,
+ "api": [
+ {
+ "name": "godot_android_get_env",
+ "return_type": "JNIEnv*",
+ "arguments": []
+ },
+ {
+ "name": "godot_android_get_activity",
+ "return_type": "jobject",
+ "arguments": []
+ },
+ {
+ "name": "godot_android_get_surface",
+ "return_type": "jobject",
+ "arguments": []
+ },
+ {
+ "name": "godot_android_is_activity_resumed",
+ "return_type": "bool",
+ "arguments": []
+ }
+ ]
+ },
+ {
+ "name": "xr",
+ "type": "XR",
+ "version": {
+ "major": 1,
+ "minor": 1
+ },
+ "next": null,
+ "api": [
+ {
+ "name": "godot_xr_register_interface",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const godot_xr_interface_gdnative *",
+ "p_interface"
+ ]
+ ]
+ },
+ {
+ "name": "godot_xr_get_worldscale",
+ "return_type": "godot_float",
+ "arguments": []
+ },
+ {
+ "name": "godot_xr_get_reference_frame",
+ "return_type": "godot_transform",
+ "arguments": []
+ },
+ {
+ "name": "godot_xr_blit",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_int",
+ "p_eye"
+ ],
+ [
+ "godot_rid *",
+ "p_render_target"
+ ],
+ [
+ "godot_rect2 *",
+ "p_screen_rect"
+ ]
+ ]
+ },
+ {
+ "name": "godot_xr_get_texid",
+ "return_type": "godot_int",
+ "arguments": [
+ [
+ "godot_rid *",
+ "p_render_target"
+ ]
+ ]
+ },
+ {
+ "name": "godot_xr_add_controller",
+ "return_type": "godot_int",
+ "arguments": [
+ [
+ "char *",
+ "p_device_name"
+ ],
+ [
+ "godot_int",
+ "p_hand"
+ ],
+ [
+ "godot_bool",
+ "p_tracks_orientation"
+ ],
+ [
+ "godot_bool",
+ "p_tracks_position"
+ ]
+ ]
+ },
+ {
+ "name": "godot_xr_remove_controller",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_int",
+ "p_controller_id"
+ ]
+ ]
+ },
+ {
+ "name": "godot_xr_set_controller_transform",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_int",
+ "p_controller_id"
+ ],
+ [
+ "godot_transform *",
+ "p_transform"
+ ],
+ [
+ "godot_bool",
+ "p_tracks_orientation"
+ ],
+ [
+ "godot_bool",
+ "p_tracks_position"
+ ]
+ ]
+ },
+ {
+ "name": "godot_xr_set_controller_button",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_int",
+ "p_controller_id"
+ ],
+ [
+ "godot_int",
+ "p_button"
+ ],
+ [
+ "godot_bool",
+ "p_is_pressed"
+ ]
+ ]
+ },
+ {
+ "name": "godot_xr_set_controller_axis",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_int",
+ "p_controller_id"
+ ],
+ [
+ "godot_int",
+ "p_exis"
+ ],
+ [
+ "godot_float",
+ "p_value"
+ ],
+ [
+ "godot_bool",
+ "p_can_be_negative"
+ ]
+ ]
+ },
+ {
+ "name": "godot_xr_get_controller_rumble",
+ "return_type": "godot_float",
+ "arguments": [
+ [
+ "godot_int",
+ "p_controller_id"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "name": "videodecoder",
+ "type": "VIDEODECODER",
+ "version": {
+ "major": 0,
+ "minor": 1
+ },
+ "next": null,
+ "api": [
+ {
+ "name": "godot_videodecoder_file_read",
+ "return_type": "godot_int",
+ "arguments": [
+ [
+ "void *",
+ "file_ptr"
+ ],
+ [
+ "uint8_t *",
+ "buf"
+ ],
+ [
+ "int",
+ "buf_size"
+ ]
+ ]
+ },
+ {
+ "name": "godot_videodecoder_file_seek",
+ "return_type": "int64_t",
+ "arguments": [
+ [
+ "void *",
+ "file_ptr"
+ ],
+ [
+ "int64_t",
+ "pos"
+ ],
+ [
+ "int",
+ "whence"
+ ]
+ ]
+ },
+ {
+ "name": "godot_videodecoder_register_decoder",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const godot_videodecoder_interface_gdnative *",
+ "p_interface"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "name": "net",
+ "type": "NET",
+ "version": {
+ "major": 4,
+ "minor": 0
+ },
+ "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"
+ ]
+ ]
+ },
+ {
+ "name": "godot_net_set_webrtc_library",
+ "return_type": "godot_error",
+ "arguments": [
+ [
+ "const godot_net_webrtc_library *",
+ "p_library"
+ ]
+ ]
+ },
+ {
+ "name": "godot_net_bind_webrtc_peer_connection",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_object *",
+ "p_obj"
+ ],
+ [
+ "const godot_net_webrtc_peer_connection *",
+ "p_interface"
+ ]
+ ]
+ },
+ {
+ "name": "godot_net_bind_webrtc_data_channel",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_object *",
+ "p_obj"
+ ],
+ [
+ "const godot_net_webrtc_data_channel *",
+ "p_interface"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "name": "text",
+ "type": "TEXT",
+ "version": {
+ "major": 1,
+ "minor": 0
+ },
+ "next": null,
+ "api": [
+ {
+ "name": "godot_text_register_interface",
+ "return_type": "void",
+ "arguments": [
+ [
+ "const godot_text_interface_gdnative *",
+ "p_interface"
+ ],
+ [
+ "const godot_string *",
+ "p_name"
+ ],
+ [
+ "uint32_t",
+ "p_features"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_glyph *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_get_range",
+ "return_type": "godot_vector2i",
+ "arguments": [
+ [
+ "const godot_glyph *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_set_range",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_glyph *",
+ "p_self"
+ ],
+ [
+ "const godot_vector2i *",
+ "p_range"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_get_count",
+ "return_type": "godot_int",
+ "arguments": [
+ [
+ "const godot_glyph *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_set_count",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_glyph *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_count"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_get_repeat",
+ "return_type": "godot_int",
+ "arguments": [
+ [
+ "const godot_glyph *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_set_repeat",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_glyph *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_repeat"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_get_flags",
+ "return_type": "godot_int",
+ "arguments": [
+ [
+ "const godot_glyph *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_set_flags",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_glyph *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_flags"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_get_offset",
+ "return_type": "godot_vector2",
+ "arguments": [
+ [
+ "const godot_glyph *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_set_offset",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_glyph *",
+ "p_self"
+ ],
+ [
+ "const godot_vector2 *",
+ "p_offset"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_get_advance",
+ "return_type": "godot_float",
+ "arguments": [
+ [
+ "const godot_glyph *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_set_advance",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_glyph *",
+ "p_self"
+ ],
+ [
+ "godot_float",
+ "p_advance"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_get_font",
+ "return_type": "godot_rid",
+ "arguments": [
+ [
+ "const godot_glyph *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_set_font",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_glyph *",
+ "p_self"
+ ],
+ [
+ "godot_rid *",
+ "p_font"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_get_font_size",
+ "return_type": "godot_int",
+ "arguments": [
+ [
+ "const godot_glyph *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_set_font_size",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_glyph *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_size"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_get_index",
+ "return_type": "godot_int",
+ "arguments": [
+ [
+ "const godot_glyph *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_glyph_set_index",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_glyph *",
+ "p_self"
+ ],
+ [
+ "godot_int",
+ "p_index"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_new",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "r_dest"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_new_copy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "r_dest"
+ ],
+ [
+ "const godot_packed_glyph_array *",
+ "p_src"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_is_empty",
+ "return_type": "godot_bool",
+ "arguments": [
+ [
+ "const godot_packed_glyph_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_append",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ],
+ [
+ "const godot_glyph *",
+ "p_data"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_append_array",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ],
+ [
+ "const godot_packed_glyph_array *",
+ "p_array"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_insert",
+ "return_type": "godot_error",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ],
+ [
+ "const godot_int",
+ "p_idx"
+ ],
+ [
+ "const godot_glyph *",
+ "p_data"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_has",
+ "return_type": "godot_bool",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ],
+ [
+ "const godot_glyph *",
+ "p_value"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_sort",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_invert",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_push_back",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ],
+ [
+ "const godot_glyph *",
+ "p_data"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_remove",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ],
+ [
+ "const godot_int",
+ "p_idx"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_resize",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ],
+ [
+ "const godot_int",
+ "p_size"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_ptr",
+ "return_type": "const godot_glyph *",
+ "arguments": [
+ [
+ "const godot_packed_glyph_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_ptrw",
+ "return_type": "godot_glyph *",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_set",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ],
+ [
+ "const godot_int",
+ "p_idx"
+ ],
+ [
+ "const godot_glyph *",
+ "p_data"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_get",
+ "return_type": "godot_glyph",
+ "arguments": [
+ [
+ "const godot_packed_glyph_array *",
+ "p_self"
+ ],
+ [
+ "const godot_int",
+ "p_idx"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_size",
+ "return_type": "godot_int",
+ "arguments": [
+ [
+ "const godot_packed_glyph_array *",
+ "p_self"
+ ]
+ ]
+ },
+ {
+ "name": "godot_packed_glyph_array_destroy",
+ "return_type": "void",
+ "arguments": [
+ [
+ "godot_packed_glyph_array *",
+ "p_self"
+ ]
+ ]
+ }
+ ]
+ }
+ ]
}
diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp
index d3cca5b1be..dfb26c13e3 100644
--- a/modules/gdnative/gdnative_library_editor_plugin.cpp
+++ b/modules/gdnative/gdnative_library_editor_plugin.cpp
@@ -257,7 +257,7 @@ void GDNativeLibraryEditor::_translate_to_config_file() {
}
}
- library->_change_notify();
+ library->notify_property_list_changed();
}
}
diff --git a/modules/gdnative/gdnative_library_editor_plugin.h b/modules/gdnative/gdnative_library_editor_plugin.h
index 184db3d817..61afb1aaaa 100644
--- a/modules/gdnative/gdnative_library_editor_plugin.h
+++ b/modules/gdnative/gdnative_library_editor_plugin.h
@@ -95,9 +95,9 @@ public:
class GDNativeLibraryEditorPlugin : public EditorPlugin {
GDCLASS(GDNativeLibraryEditorPlugin, EditorPlugin);
- GDNativeLibraryEditor *library_editor;
- EditorNode *editor;
- Button *button;
+ GDNativeLibraryEditor *library_editor = nullptr;
+ EditorNode *editor = nullptr;
+ Button *button = nullptr;
public:
virtual String get_name() const override { return "GDNativeLibrary"; }
diff --git a/modules/gdnative/include/gdnative/aabb.h b/modules/gdnative/include/gdnative/aabb.h
index daf5ebfdd8..be0235221f 100644
--- a/modules/gdnative/include/gdnative/aabb.h
+++ b/modules/gdnative/include/gdnative/aabb.h
@@ -35,9 +35,9 @@
extern "C" {
#endif
-#include <stdint.h>
+#include <gdnative/math_defs.h>
-#define GODOT_AABB_SIZE 24
+#define GODOT_AABB_SIZE (sizeof(godot_real_t) * 6)
#ifndef GODOT_CORE_API_GODOT_AABB_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_AABB_TYPE_DEFINED
@@ -46,72 +46,9 @@ typedef struct {
} godot_aabb;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#include <gdnative/plane.h>
-#include <gdnative/vector3.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_aabb_new(godot_aabb *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size);
-
-godot_vector3 GDAPI godot_aabb_get_position(const godot_aabb *p_self);
-void GDAPI godot_aabb_set_position(const godot_aabb *p_self, const godot_vector3 *p_v);
-
-godot_vector3 GDAPI godot_aabb_get_size(const godot_aabb *p_self);
-void GDAPI godot_aabb_set_size(const godot_aabb *p_self, const godot_vector3 *p_v);
-
-godot_string GDAPI godot_aabb_as_string(const godot_aabb *p_self);
-
-godot_aabb GDAPI godot_aabb_abs(const godot_aabb *p_self);
-
-godot_real GDAPI godot_aabb_get_area(const godot_aabb *p_self);
-
-godot_bool GDAPI godot_aabb_has_no_area(const godot_aabb *p_self);
-
-godot_bool GDAPI godot_aabb_has_no_surface(const godot_aabb *p_self);
-
-godot_bool GDAPI godot_aabb_intersects(const godot_aabb *p_self, const godot_aabb *p_with);
-
-godot_bool GDAPI godot_aabb_encloses(const godot_aabb *p_self, const godot_aabb *p_with);
-
-godot_aabb GDAPI godot_aabb_merge(const godot_aabb *p_self, const godot_aabb *p_with);
-
-godot_aabb GDAPI godot_aabb_intersection(const godot_aabb *p_self, const godot_aabb *p_with);
-
-godot_bool GDAPI godot_aabb_intersects_plane(const godot_aabb *p_self, const godot_plane *p_plane);
-
-godot_bool GDAPI godot_aabb_intersects_segment(const godot_aabb *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to);
-
-godot_bool GDAPI godot_aabb_has_point(const godot_aabb *p_self, const godot_vector3 *p_point);
-
-godot_vector3 GDAPI godot_aabb_get_support(const godot_aabb *p_self, const godot_vector3 *p_dir);
-
-godot_vector3 GDAPI godot_aabb_get_longest_axis(const godot_aabb *p_self);
-
-godot_int GDAPI godot_aabb_get_longest_axis_index(const godot_aabb *p_self);
-
-godot_real GDAPI godot_aabb_get_longest_axis_size(const godot_aabb *p_self);
-
-godot_vector3 GDAPI godot_aabb_get_shortest_axis(const godot_aabb *p_self);
-
-godot_int GDAPI godot_aabb_get_shortest_axis_index(const godot_aabb *p_self);
-
-godot_real GDAPI godot_aabb_get_shortest_axis_size(const godot_aabb *p_self);
-
-godot_aabb GDAPI godot_aabb_expand(const godot_aabb *p_self, const godot_vector3 *p_to_point);
-
-godot_aabb GDAPI godot_aabb_grow(const godot_aabb *p_self, const godot_real p_by);
-
-godot_vector3 GDAPI godot_aabb_get_endpoint(const godot_aabb *p_self, const godot_int p_idx);
-godot_bool GDAPI godot_aabb_operator_equal(const godot_aabb *p_self, const godot_aabb *p_b);
+void GDAPI godot_aabb_new(godot_aabb *p_self);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/array.h b/modules/gdnative/include/gdnative/array.h
index 9cc5bdfad5..7603edaa73 100644
--- a/modules/gdnative/include/gdnative/array.h
+++ b/modules/gdnative/include/gdnative/array.h
@@ -46,102 +46,13 @@ typedef struct {
} godot_array;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
-#include <gdnative/packed_arrays.h>
-#include <gdnative/variant.h>
-
#include <gdnative/gdnative.h>
+#include <gdnative/variant_struct.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_array_new(godot_array *r_dest);
-void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src);
-void GDAPI godot_array_new_packed_color_array(godot_array *r_dest, const godot_packed_color_array *p_pca);
-void GDAPI godot_array_new_packed_vector3_array(godot_array *r_dest, const godot_packed_vector3_array *p_pv3a);
-void GDAPI godot_array_new_packed_vector2_array(godot_array *r_dest, const godot_packed_vector2_array *p_pv2a);
-void GDAPI godot_array_new_packed_vector2i_array(godot_array *r_dest, const godot_packed_vector2i_array *p_pv2a);
-void GDAPI godot_array_new_packed_string_array(godot_array *r_dest, const godot_packed_string_array *p_psa);
-void GDAPI godot_array_new_packed_float32_array(godot_array *r_dest, const godot_packed_float32_array *p_pra);
-void GDAPI godot_array_new_packed_float64_array(godot_array *r_dest, const godot_packed_float64_array *p_pra);
-void GDAPI godot_array_new_packed_int32_array(godot_array *r_dest, const godot_packed_int32_array *p_pia);
-void GDAPI godot_array_new_packed_int64_array(godot_array *r_dest, const godot_packed_int64_array *p_pia);
-void GDAPI godot_array_new_packed_byte_array(godot_array *r_dest, const godot_packed_byte_array *p_pba);
-
-void GDAPI godot_array_set(godot_array *p_self, const godot_int p_idx, const godot_variant *p_value);
-
-godot_variant GDAPI godot_array_get(const godot_array *p_self, const godot_int p_idx);
-
-godot_variant GDAPI *godot_array_operator_index(godot_array *p_self, const godot_int p_idx);
-
-const godot_variant GDAPI *godot_array_operator_index_const(const godot_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_array_append(godot_array *p_self, const godot_variant *p_value);
-
-void GDAPI godot_array_clear(godot_array *p_self);
-
-godot_int GDAPI godot_array_count(const godot_array *p_self, const godot_variant *p_value);
-
-godot_bool GDAPI godot_array_is_empty(const godot_array *p_self);
-
-void GDAPI godot_array_erase(godot_array *p_self, const godot_variant *p_value);
-
-godot_variant GDAPI godot_array_front(const godot_array *p_self);
-
-godot_variant GDAPI godot_array_back(const godot_array *p_self);
-
-godot_int GDAPI godot_array_find(const godot_array *p_self, const godot_variant *p_what, const godot_int p_from);
-
-godot_int GDAPI godot_array_find_last(const godot_array *p_self, const godot_variant *p_what);
-
-godot_bool GDAPI godot_array_has(const godot_array *p_self, const godot_variant *p_value);
-
-godot_int GDAPI godot_array_hash(const godot_array *p_self);
-
-void GDAPI godot_array_insert(godot_array *p_self, const godot_int p_pos, const godot_variant *p_value);
-
-void GDAPI godot_array_invert(godot_array *p_self);
-
-godot_variant GDAPI godot_array_pop_back(godot_array *p_self);
-
-godot_variant GDAPI godot_array_pop_front(godot_array *p_self);
-
-void GDAPI godot_array_push_back(godot_array *p_self, const godot_variant *p_value);
-
-void GDAPI godot_array_push_front(godot_array *p_self, const godot_variant *p_value);
-
-void GDAPI godot_array_remove(godot_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_array_resize(godot_array *p_self, const godot_int p_size);
-
-godot_int GDAPI godot_array_rfind(const godot_array *p_self, const godot_variant *p_what, const godot_int p_from);
-
-godot_int GDAPI godot_array_size(const godot_array *p_self);
-
-void GDAPI godot_array_sort(godot_array *p_self);
-
-void GDAPI godot_array_sort_custom(godot_array *p_self, godot_object *p_obj, const godot_string *p_func);
-
-godot_int GDAPI godot_array_bsearch(godot_array *p_self, const godot_variant *p_value, const godot_bool p_before);
-
-godot_int GDAPI godot_array_bsearch_custom(godot_array *p_self, const godot_variant *p_value, godot_object *p_obj, const godot_string *p_func, const godot_bool p_before);
-
+void GDAPI godot_array_new(godot_array *p_self);
void GDAPI godot_array_destroy(godot_array *p_self);
-
-godot_array GDAPI godot_array_duplicate(const godot_array *p_self, const godot_bool p_deep);
-
-godot_array GDAPI godot_array_slice(const godot_array *p_self, const godot_int p_begin, const godot_int p_end, const godot_int p_step, const godot_bool p_deep);
-
-godot_variant GDAPI godot_array_max(const godot_array *p_self);
-
-godot_variant GDAPI godot_array_min(const godot_array *p_self);
-
-void GDAPI godot_array_shuffle(godot_array *p_self);
+godot_variant GDAPI *godot_array_operator_index(godot_array *p_self, godot_int p_index);
+const godot_variant GDAPI *godot_array_operator_index_const(const godot_array *p_self, godot_int p_index);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/basis.h b/modules/gdnative/include/gdnative/basis.h
index c6dab4c3c1..af8d7cbdd3 100644
--- a/modules/gdnative/include/gdnative/basis.h
+++ b/modules/gdnative/include/gdnative/basis.h
@@ -35,9 +35,9 @@
extern "C" {
#endif
-#include <stdint.h>
+#include <gdnative/math_defs.h>
-#define GODOT_BASIS_SIZE 36
+#define GODOT_BASIS_SIZE (sizeof(godot_real_t) * 9)
#ifndef GODOT_CORE_API_GODOT_BASIS_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_BASIS_TYPE_DEFINED
@@ -46,88 +46,11 @@ typedef struct {
} godot_basis;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#include <gdnative/quat.h>
-#include <gdnative/vector3.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_basis_new_with_rows(godot_basis *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis);
-void GDAPI godot_basis_new_with_axis_and_angle(godot_basis *r_dest, const godot_vector3 *p_axis, const godot_real p_phi);
-void GDAPI godot_basis_new_with_euler(godot_basis *r_dest, const godot_vector3 *p_euler);
-void GDAPI godot_basis_new_with_euler_quat(godot_basis *r_dest, const godot_quat *p_euler);
-
-godot_string GDAPI godot_basis_as_string(const godot_basis *p_self);
-
-godot_basis GDAPI godot_basis_inverse(const godot_basis *p_self);
-
-godot_basis GDAPI godot_basis_transposed(const godot_basis *p_self);
-
-godot_basis GDAPI godot_basis_orthonormalized(const godot_basis *p_self);
-
-godot_real GDAPI godot_basis_determinant(const godot_basis *p_self);
-
-godot_basis GDAPI godot_basis_rotated(const godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_phi);
-
-godot_basis GDAPI godot_basis_scaled(const godot_basis *p_self, const godot_vector3 *p_scale);
-
-godot_vector3 GDAPI godot_basis_get_scale(const godot_basis *p_self);
-
-godot_vector3 GDAPI godot_basis_get_euler(const godot_basis *p_self);
-
-godot_quat GDAPI godot_basis_get_quat(const godot_basis *p_self);
-
-void GDAPI godot_basis_set_quat(godot_basis *p_self, const godot_quat *p_quat);
-
-void GDAPI godot_basis_set_axis_angle_scale(godot_basis *p_self, const godot_vector3 *p_axis, godot_real p_phi, const godot_vector3 *p_scale);
-
-void GDAPI godot_basis_set_euler_scale(godot_basis *p_self, const godot_vector3 *p_euler, const godot_vector3 *p_scale);
-
-void GDAPI godot_basis_set_quat_scale(godot_basis *p_self, const godot_quat *p_quat, const godot_vector3 *p_scale);
-
-godot_real GDAPI godot_basis_tdotx(const godot_basis *p_self, const godot_vector3 *p_with);
-
-godot_real GDAPI godot_basis_tdoty(const godot_basis *p_self, const godot_vector3 *p_with);
-
-godot_real GDAPI godot_basis_tdotz(const godot_basis *p_self, const godot_vector3 *p_with);
-
-godot_vector3 GDAPI godot_basis_xform(const godot_basis *p_self, const godot_vector3 *p_v);
-
-godot_vector3 GDAPI godot_basis_xform_inv(const godot_basis *p_self, const godot_vector3 *p_v);
-
-godot_int GDAPI godot_basis_get_orthogonal_index(const godot_basis *p_self);
-
-void GDAPI godot_basis_new(godot_basis *r_dest);
-
-// p_elements is a pointer to an array of 3 (!!) vector3
-void GDAPI godot_basis_get_elements(const godot_basis *p_self, godot_vector3 *p_elements);
-
-godot_vector3 GDAPI godot_basis_get_axis(const godot_basis *p_self, const godot_int p_axis);
-
-void GDAPI godot_basis_set_axis(godot_basis *p_self, const godot_int p_axis, const godot_vector3 *p_value);
-
-godot_vector3 GDAPI godot_basis_get_row(const godot_basis *p_self, const godot_int p_row);
-
-void GDAPI godot_basis_set_row(godot_basis *p_self, const godot_int p_row, const godot_vector3 *p_value);
-
-godot_bool GDAPI godot_basis_operator_equal(const godot_basis *p_self, const godot_basis *p_b);
-
-godot_basis GDAPI godot_basis_operator_add(const godot_basis *p_self, const godot_basis *p_b);
-
-godot_basis GDAPI godot_basis_operator_subtract(const godot_basis *p_self, const godot_basis *p_b);
-
-godot_basis GDAPI godot_basis_operator_multiply_vector(const godot_basis *p_self, const godot_basis *p_b);
-
-godot_basis GDAPI godot_basis_operator_multiply_scalar(const godot_basis *p_self, const godot_real p_b);
-godot_basis GDAPI godot_basis_slerp(const godot_basis *p_self, const godot_basis *p_b, const godot_real p_t);
+void GDAPI godot_basis_new(godot_basis *p_self);
+godot_vector3 GDAPI *godot_basis_operator_index(godot_basis *p_self, godot_int p_index);
+const godot_vector3 GDAPI *godot_basis_operator_index_const(const godot_basis *p_self, godot_int p_index);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/callable.h b/modules/gdnative/include/gdnative/callable.h
index b3daaa7d0c..6f359ada5e 100644
--- a/modules/gdnative/include/gdnative/callable.h
+++ b/modules/gdnative/include/gdnative/callable.h
@@ -46,79 +46,11 @@ typedef struct {
} godot_callable;
#endif
-#define GODOT_SIGNAL_SIZE (16)
-
-#ifndef GODOT_CORE_API_GODOT_SIGNAL_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_SIGNAL_TYPE_DEFINED
-typedef struct {
- uint8_t _dont_touch_that[GODOT_SIGNAL_SIZE];
-} godot_signal;
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#include <gdnative/string_name.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Callable
-
-void GDAPI godot_callable_new_with_object(godot_callable *r_dest, const godot_object *p_object, const godot_string_name *p_method);
-void GDAPI godot_callable_new_with_object_id(godot_callable *r_dest, uint64_t p_objectid, const godot_string_name *p_method);
-void GDAPI godot_callable_new_copy(godot_callable *r_dest, const godot_callable *p_src);
+void GDAPI godot_callable_new(godot_callable *p_self);
void GDAPI godot_callable_destroy(godot_callable *p_self);
-godot_int GDAPI godot_callable_call(const godot_callable *p_self, const godot_variant **p_arguments, godot_int p_argcount, godot_variant *r_return_value);
-void GDAPI godot_callable_call_deferred(const godot_callable *p_self, const godot_variant **p_arguments, godot_int p_argcount);
-
-godot_bool GDAPI godot_callable_is_null(const godot_callable *p_self);
-godot_bool GDAPI godot_callable_is_custom(const godot_callable *p_self);
-godot_bool GDAPI godot_callable_is_standard(const godot_callable *p_self);
-
-godot_object GDAPI *godot_callable_get_object(const godot_callable *p_self);
-uint64_t GDAPI godot_callable_get_object_id(const godot_callable *p_self);
-godot_string_name GDAPI godot_callable_get_method(const godot_callable *p_self);
-
-uint32_t GDAPI godot_callable_hash(const godot_callable *p_self);
-
-godot_string GDAPI godot_callable_as_string(const godot_callable *p_self);
-
-godot_bool GDAPI godot_callable_operator_equal(const godot_callable *p_self, const godot_callable *p_other);
-godot_bool GDAPI godot_callable_operator_less(const godot_callable *p_self, const godot_callable *p_other);
-
-// Signal
-
-void GDAPI godot_signal_new_with_object(godot_signal *r_dest, const godot_object *p_object, const godot_string_name *p_name);
-void GDAPI godot_signal_new_with_object_id(godot_signal *r_dest, uint64_t p_objectid, const godot_string_name *p_name);
-void GDAPI godot_signal_new_copy(godot_signal *r_dest, const godot_signal *p_src);
-
-void GDAPI godot_signal_destroy(godot_signal *p_self);
-
-godot_int GDAPI godot_signal_emit(const godot_signal *p_self, const godot_variant **p_arguments, godot_int p_argcount);
-
-godot_int GDAPI godot_signal_connect(godot_signal *p_self, const godot_callable *p_callable, const godot_array *p_binds, uint32_t p_flags);
-void GDAPI godot_signal_disconnect(godot_signal *p_self, const godot_callable *p_callable);
-
-godot_bool GDAPI godot_signal_is_null(const godot_signal *p_self);
-godot_bool GDAPI godot_signal_is_connected(const godot_signal *p_self, const godot_callable *p_callable);
-
-godot_array GDAPI godot_signal_get_connections(const godot_signal *p_self);
-
-godot_object GDAPI *godot_signal_get_object(const godot_signal *p_self);
-uint64_t GDAPI godot_signal_get_object_id(const godot_signal *p_self);
-godot_string_name GDAPI godot_signal_get_name(const godot_signal *p_self);
-
-godot_string GDAPI godot_signal_as_string(const godot_signal *p_self);
-
-godot_bool GDAPI godot_signal_operator_equal(const godot_signal *p_self, const godot_signal *p_other);
-godot_bool GDAPI godot_signal_operator_less(const godot_signal *p_self, const godot_signal *p_other);
-
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/include/gdnative/color.h b/modules/gdnative/include/gdnative/color.h
index c6ef921ad9..17a021e6ea 100644
--- a/modules/gdnative/include/gdnative/color.h
+++ b/modules/gdnative/include/gdnative/color.h
@@ -35,9 +35,10 @@
extern "C" {
#endif
-#include <stdint.h>
+#include <gdnative/math_defs.h>
-#define GODOT_COLOR_SIZE 16
+// Colors should always use 32-bit floats, so don't use real_t here.
+#define GODOT_COLOR_SIZE (sizeof(float) * 4)
#ifndef GODOT_CORE_API_GODOT_COLOR_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_COLOR_TYPE_DEFINED
@@ -46,68 +47,11 @@ typedef struct {
} godot_color;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#include <gdnative/string.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_color_new_rgba(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a);
-void GDAPI godot_color_new_rgb(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b);
-
-godot_real godot_color_get_r(const godot_color *p_self);
-void godot_color_set_r(godot_color *p_self, const godot_real r);
-
-godot_real godot_color_get_g(const godot_color *p_self);
-void godot_color_set_g(godot_color *p_self, const godot_real g);
-
-godot_real godot_color_get_b(const godot_color *p_self);
-void godot_color_set_b(godot_color *p_self, const godot_real b);
-
-godot_real godot_color_get_a(const godot_color *p_self);
-void godot_color_set_a(godot_color *p_self, const godot_real a);
-
-godot_real godot_color_get_h(const godot_color *p_self);
-godot_real godot_color_get_s(const godot_color *p_self);
-godot_real godot_color_get_v(const godot_color *p_self);
-
-godot_string GDAPI godot_color_as_string(const godot_color *p_self);
-
-godot_int GDAPI godot_color_to_rgba32(const godot_color *p_self);
-
-godot_int GDAPI godot_color_to_abgr32(const godot_color *p_self);
-
-godot_int GDAPI godot_color_to_abgr64(const godot_color *p_self);
-
-godot_int GDAPI godot_color_to_argb64(const godot_color *p_self);
-
-godot_int GDAPI godot_color_to_rgba64(const godot_color *p_self);
-
-godot_int GDAPI godot_color_to_argb32(const godot_color *p_self);
-
-godot_color GDAPI godot_color_inverted(const godot_color *p_self);
-
-godot_color GDAPI godot_color_lerp(const godot_color *p_self, const godot_color *p_b, const godot_real p_t);
-
-godot_color GDAPI godot_color_blend(const godot_color *p_self, const godot_color *p_over);
-
-godot_color GDAPI godot_color_darkened(const godot_color *p_self, const godot_real p_amount);
-
-godot_color GDAPI godot_color_from_hsv(const godot_color *p_self, const godot_real p_h, const godot_real p_s, const godot_real p_v, const godot_real p_a);
-
-godot_color GDAPI godot_color_lightened(const godot_color *p_self, const godot_real p_amount);
-
-godot_string GDAPI godot_color_to_html(const godot_color *p_self, const godot_bool p_with_alpha);
-
-godot_bool GDAPI godot_color_operator_equal(const godot_color *p_self, const godot_color *p_b);
-godot_bool GDAPI godot_color_operator_less(const godot_color *p_self, const godot_color *p_b);
+void GDAPI godot_color_new(godot_color *p_self);
+float GDAPI *godot_color_operator_index(godot_color *p_self, godot_int p_index);
+const float GDAPI *godot_color_operator_index_const(const godot_color *p_self, godot_int p_index);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/dictionary.h b/modules/gdnative/include/gdnative/dictionary.h
index 3f664567d8..d2afbc4c94 100644
--- a/modules/gdnative/include/gdnative/dictionary.h
+++ b/modules/gdnative/include/gdnative/dictionary.h
@@ -46,62 +46,14 @@ typedef struct {
} godot_dictionary;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
-#include <gdnative/array.h>
#include <gdnative/gdnative.h>
-#include <gdnative/variant.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <gdnative/variant_struct.h>
-void GDAPI godot_dictionary_new(godot_dictionary *r_dest);
-void GDAPI godot_dictionary_new_copy(godot_dictionary *r_dest, const godot_dictionary *p_src);
+void GDAPI godot_dictionary_new(godot_dictionary *p_self);
void GDAPI godot_dictionary_destroy(godot_dictionary *p_self);
-
-godot_dictionary GDAPI godot_dictionary_duplicate(const godot_dictionary *p_self, const godot_bool p_deep);
-
-godot_int GDAPI godot_dictionary_size(const godot_dictionary *p_self);
-
-godot_bool GDAPI godot_dictionary_is_empty(const godot_dictionary *p_self);
-
-void GDAPI godot_dictionary_clear(godot_dictionary *p_self);
-
-godot_bool GDAPI godot_dictionary_has(const godot_dictionary *p_self, const godot_variant *p_key);
-
-godot_bool GDAPI godot_dictionary_has_all(const godot_dictionary *p_self, const godot_array *p_keys);
-
-void GDAPI godot_dictionary_erase(godot_dictionary *p_self, const godot_variant *p_key);
-
-godot_int GDAPI godot_dictionary_hash(const godot_dictionary *p_self);
-
-godot_array GDAPI godot_dictionary_keys(const godot_dictionary *p_self);
-
-godot_array GDAPI godot_dictionary_values(const godot_dictionary *p_self);
-
-godot_variant GDAPI godot_dictionary_get(const godot_dictionary *p_self, const godot_variant *p_key);
-void GDAPI godot_dictionary_set(godot_dictionary *p_self, const godot_variant *p_key, const godot_variant *p_value);
-
godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_self, const godot_variant *p_key);
-
const godot_variant GDAPI *godot_dictionary_operator_index_const(const godot_dictionary *p_self, const godot_variant *p_key);
-godot_variant GDAPI *godot_dictionary_next(const godot_dictionary *p_self, const godot_variant *p_key);
-
-godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self, const godot_dictionary *p_b);
-
-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/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h
index cc8bf52fe4..a4ed7ebb8c 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -62,8 +62,6 @@ extern "C" {
#include <stdbool.h>
#include <stdint.h>
-#define GODOT_API_VERSION 1
-
////// Error
typedef enum {
@@ -118,21 +116,6 @@ typedef enum {
GODOT_ERR_PRINTER_ON_FIRE, /// the parallel port printer is engulfed in flames
} godot_error;
-////// bool
-
-typedef bool godot_bool;
-
-#define GODOT_TRUE 1
-#define GODOT_FALSE 0
-
-/////// int
-
-typedef int64_t godot_int;
-
-/////// real
-
-typedef float godot_real;
-
/////// Object (forward declared)
typedef void godot_object;
@@ -215,7 +198,7 @@ void GDAPI godot_object_destroy(godot_object *p_o);
////// Singleton API
-godot_object GDAPI *godot_global_get_singleton(char *p_name); // result shouldn't be freed
+godot_object GDAPI *godot_global_get_singleton(char *p_name); // Result shouldn't be freed.
////// MethodBind API
@@ -281,12 +264,10 @@ void GDAPI *godot_alloc(int p_bytes);
void GDAPI *godot_realloc(void *p_ptr, int p_bytes);
void GDAPI godot_free(void *p_ptr);
-//print using Godot's error handler list
+// Helper print functions.
void GDAPI godot_print_error(const char *p_description, const char *p_function, const char *p_file, int p_line);
void GDAPI godot_print_warning(const char *p_description, const char *p_function, const char *p_file, int p_line);
-void GDAPI godot_print(const godot_string *p_message);
-
-// GDNATIVE CORE 1.0.2?
+void GDAPI godot_print_script_error(const char *p_description, const char *p_function, const char *p_file, int p_line);
//tags used for safe dynamic casting
void GDAPI *godot_get_class_tag(const godot_string_name *p_class);
@@ -301,4 +282,4 @@ uint64_t GDAPI godot_object_get_instance_id(const godot_object *p_object);
}
#endif
-#endif // GODOT_C_H
+#endif // GODOT_GDNATIVE_H
diff --git a/modules/gamecenter/game_center_module.cpp b/modules/gdnative/include/gdnative/math_defs.h
index 8f6ef291c0..b5cf389506 100644
--- a/modules/gamecenter/game_center_module.cpp
+++ b/modules/gdnative/include/gdnative/math_defs.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* game_center_module.cpp */
+/* math_defs.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,21 +28,39 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "game_center_module.h"
+#ifndef GODOT_GDNATIVE_MATH_DEFS_H
+#define GODOT_GDNATIVE_MATH_DEFS_H
-#include "core/config/engine.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
-#include "game_center.h"
+#include <stdbool.h>
+#include <stdint.h>
-GameCenter *game_center;
+////// bool
-void register_gamecenter_types() {
- game_center = memnew(GameCenter);
- Engine::get_singleton()->add_singleton(Engine::Singleton("GameCenter", game_center));
-}
+typedef bool godot_bool;
+
+#define GODOT_TRUE 1
+#define GODOT_FALSE 0
+
+/////// int
+
+typedef int64_t godot_int;
-void unregister_gamecenter_types() {
- if (game_center) {
- memdelete(game_center);
- }
+/////// float
+
+typedef double godot_float;
+
+#ifdef REAL_T_IS_DOUBLE
+typedef double godot_real_t;
+#else
+typedef float godot_real_t;
+#endif
+
+#ifdef __cplusplus
}
+#endif
+
+#endif // GODOT_C_H
diff --git a/modules/gdnative/include/gdnative/node_path.h b/modules/gdnative/include/gdnative/node_path.h
index 052e4469a2..3c31b9a98f 100644
--- a/modules/gdnative/include/gdnative/node_path.h
+++ b/modules/gdnative/include/gdnative/node_path.h
@@ -46,42 +46,11 @@ typedef struct {
} godot_node_path;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#include <gdnative/string.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_node_path_new(godot_node_path *r_dest, const godot_string *p_from);
-void GDAPI godot_node_path_new_copy(godot_node_path *r_dest, const godot_node_path *p_src);
+void GDAPI godot_node_path_new(godot_node_path *p_self);
void GDAPI godot_node_path_destroy(godot_node_path *p_self);
-godot_string GDAPI godot_node_path_as_string(const godot_node_path *p_self);
-
-godot_bool GDAPI godot_node_path_is_absolute(const godot_node_path *p_self);
-
-godot_int GDAPI godot_node_path_get_name_count(const godot_node_path *p_self);
-
-godot_string GDAPI godot_node_path_get_name(const godot_node_path *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_self);
-
-godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, const godot_int p_idx);
-
-godot_string GDAPI godot_node_path_get_concatenated_subnames(const godot_node_path *p_self);
-
-godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_self);
-
-godot_bool GDAPI godot_node_path_operator_equal(const godot_node_path *p_self, const godot_node_path *p_b);
-
-godot_node_path godot_node_path_get_as_property_path(const godot_node_path *p_self);
-
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/include/gdnative/packed_arrays.h b/modules/gdnative/include/gdnative/packed_arrays.h
index f5b95eadd3..621ed60cdf 100644
--- a/modules/gdnative/include/gdnative/packed_arrays.h
+++ b/modules/gdnative/include/gdnative/packed_arrays.h
@@ -136,6 +136,17 @@ typedef struct {
} godot_packed_vector3_array;
#endif
+/////// PackedVector3iArray
+
+#define GODOT_PACKED_VECTOR3I_ARRAY_SIZE (2 * sizeof(void *))
+
+#ifndef GODOT_CORE_API_GODOT_PACKED_VECTOR3I_ARRAY_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_PACKED_VECTOR3I_ARRAY_TYPE_DEFINED
+typedef struct {
+ uint8_t _dont_touch_that[GODOT_PACKED_VECTOR3I_ARRAY_SIZE];
+} godot_packed_vector3i_array;
+#endif
+
/////// PackedColorArray
#define GODOT_PACKED_COLOR_ARRAY_SIZE (2 * sizeof(void *))
@@ -147,384 +158,87 @@ typedef struct {
} godot_packed_color_array;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
-#include <gdnative/array.h>
-#include <gdnative/color.h>
-#include <gdnative/vector2.h>
-#include <gdnative/vector3.h>
-
#include <gdnative/gdnative.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// byte
-
-void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *r_dest);
-void GDAPI godot_packed_byte_array_new_copy(godot_packed_byte_array *r_dest, const godot_packed_byte_array *p_src);
-void GDAPI godot_packed_byte_array_new_with_array(godot_packed_byte_array *r_dest, const godot_array *p_a);
-
-const uint8_t GDAPI *godot_packed_byte_array_ptr(const godot_packed_byte_array *p_self);
-uint8_t GDAPI *godot_packed_byte_array_ptrw(godot_packed_byte_array *p_self);
-
-void GDAPI godot_packed_byte_array_append(godot_packed_byte_array *p_self, const uint8_t p_data);
-
-void GDAPI godot_packed_byte_array_append_array(godot_packed_byte_array *p_self, const godot_packed_byte_array *p_array);
-
-godot_error GDAPI godot_packed_byte_array_insert(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data);
-
-godot_bool GDAPI godot_packed_byte_array_has(godot_packed_byte_array *p_self, const uint8_t p_value);
-
-void GDAPI godot_packed_byte_array_sort(godot_packed_byte_array *p_self);
-
-void GDAPI godot_packed_byte_array_invert(godot_packed_byte_array *p_self);
-
-void GDAPI godot_packed_byte_array_push_back(godot_packed_byte_array *p_self, const uint8_t p_data);
-
-void GDAPI godot_packed_byte_array_remove(godot_packed_byte_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_packed_byte_array_resize(godot_packed_byte_array *p_self, const godot_int p_size);
-
-void GDAPI godot_packed_byte_array_set(godot_packed_byte_array *p_self, const godot_int p_idx, const uint8_t p_data);
-uint8_t GDAPI godot_packed_byte_array_get(const godot_packed_byte_array *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_packed_byte_array_size(const godot_packed_byte_array *p_self);
-
-godot_bool GDAPI godot_packed_byte_array_is_empty(const godot_packed_byte_array *p_self);
+// Byte.
+void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *p_self);
void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self);
+uint8_t GDAPI *godot_packed_byte_array_operator_index(godot_packed_byte_array *p_self, godot_int p_index);
+const uint8_t GDAPI *godot_packed_byte_array_operator_index_const(const godot_packed_byte_array *p_self, godot_int p_index);
-// int32
-
-void GDAPI godot_packed_int32_array_new(godot_packed_int32_array *r_dest);
-void GDAPI godot_packed_int32_array_new_copy(godot_packed_int32_array *r_dest, const godot_packed_int32_array *p_src);
-void GDAPI godot_packed_int32_array_new_with_array(godot_packed_int32_array *r_dest, const godot_array *p_a);
-
-const int32_t GDAPI *godot_packed_int32_array_ptr(const godot_packed_int32_array *p_self);
-int32_t GDAPI *godot_packed_int32_array_ptrw(godot_packed_int32_array *p_self);
-
-void GDAPI godot_packed_int32_array_append(godot_packed_int32_array *p_self, const int32_t p_data);
-
-void GDAPI godot_packed_int32_array_append_array(godot_packed_int32_array *p_self, const godot_packed_int32_array *p_array);
-
-godot_error GDAPI godot_packed_int32_array_insert(godot_packed_int32_array *p_self, const godot_int p_idx, const int32_t p_data);
-
-godot_bool GDAPI godot_packed_int32_array_has(godot_packed_int32_array *p_self, const int32_t p_value);
-
-void GDAPI godot_packed_int32_array_sort(godot_packed_int32_array *p_self);
-
-void GDAPI godot_packed_int32_array_invert(godot_packed_int32_array *p_self);
-
-void GDAPI godot_packed_int32_array_push_back(godot_packed_int32_array *p_self, const int32_t p_data);
-
-void GDAPI godot_packed_int32_array_remove(godot_packed_int32_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_packed_int32_array_resize(godot_packed_int32_array *p_self, const godot_int p_size);
-
-void GDAPI godot_packed_int32_array_set(godot_packed_int32_array *p_self, const godot_int p_idx, const int32_t p_data);
-int32_t GDAPI godot_packed_int32_array_get(const godot_packed_int32_array *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_packed_int32_array_size(const godot_packed_int32_array *p_self);
-
-godot_bool GDAPI godot_packed_int32_array_is_empty(const godot_packed_int32_array *p_self);
+// Int32.
+void GDAPI godot_packed_int32_array_new(godot_packed_int32_array *p_self);
void GDAPI godot_packed_int32_array_destroy(godot_packed_int32_array *p_self);
+int32_t GDAPI *godot_packed_int32_array_operator_index(godot_packed_int32_array *p_self, godot_int p_index);
+const int32_t GDAPI *godot_packed_int32_array_operator_index_const(const godot_packed_int32_array *p_self, godot_int p_index);
-// int64
-
-void GDAPI godot_packed_int64_array_new(godot_packed_int64_array *r_dest);
-void GDAPI godot_packed_int64_array_new_copy(godot_packed_int64_array *r_dest, const godot_packed_int64_array *p_src);
-void GDAPI godot_packed_int64_array_new_with_array(godot_packed_int64_array *r_dest, const godot_array *p_a);
-
-const int64_t GDAPI *godot_packed_int64_array_ptr(const godot_packed_int64_array *p_self);
-int64_t GDAPI *godot_packed_int64_array_ptrw(godot_packed_int64_array *p_self);
-
-void GDAPI godot_packed_int64_array_append(godot_packed_int64_array *p_self, const int64_t p_data);
-
-void GDAPI godot_packed_int64_array_append_array(godot_packed_int64_array *p_self, const godot_packed_int64_array *p_array);
-
-godot_error GDAPI godot_packed_int64_array_insert(godot_packed_int64_array *p_self, const godot_int p_idx, const int64_t p_data);
-
-godot_bool GDAPI godot_packed_int64_array_has(godot_packed_int64_array *p_self, const int64_t p_value);
-
-void GDAPI godot_packed_int64_array_sort(godot_packed_int64_array *p_self);
-
-void GDAPI godot_packed_int64_array_invert(godot_packed_int64_array *p_self);
-
-void GDAPI godot_packed_int64_array_push_back(godot_packed_int64_array *p_self, const int64_t p_data);
-
-void GDAPI godot_packed_int64_array_remove(godot_packed_int64_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_packed_int64_array_resize(godot_packed_int64_array *p_self, const godot_int p_size);
-
-void GDAPI godot_packed_int64_array_set(godot_packed_int64_array *p_self, const godot_int p_idx, const int64_t p_data);
-int64_t GDAPI godot_packed_int64_array_get(const godot_packed_int64_array *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_packed_int64_array_size(const godot_packed_int64_array *p_self);
-
-godot_bool GDAPI godot_packed_int64_array_is_empty(const godot_packed_int64_array *p_self);
+// Int64.
+void GDAPI godot_packed_int64_array_new(godot_packed_int64_array *p_self);
void GDAPI godot_packed_int64_array_destroy(godot_packed_int64_array *p_self);
+int64_t GDAPI *godot_packed_int64_array_operator_index(godot_packed_int64_array *p_self, godot_int p_index);
+const int64_t GDAPI *godot_packed_int64_array_operator_index_const(const godot_packed_int64_array *p_self, godot_int p_index);
-// float32
-
-void GDAPI godot_packed_float32_array_new(godot_packed_float32_array *r_dest);
-void GDAPI godot_packed_float32_array_new_copy(godot_packed_float32_array *r_dest, const godot_packed_float32_array *p_src);
-void GDAPI godot_packed_float32_array_new_with_array(godot_packed_float32_array *r_dest, const godot_array *p_a);
-
-const float GDAPI *godot_packed_float32_array_ptr(const godot_packed_float32_array *p_self);
-float GDAPI *godot_packed_float32_array_ptrw(godot_packed_float32_array *p_self);
-
-void GDAPI godot_packed_float32_array_append(godot_packed_float32_array *p_self, const float p_data);
-
-void GDAPI godot_packed_float32_array_append_array(godot_packed_float32_array *p_self, const godot_packed_float32_array *p_array);
-
-godot_error GDAPI godot_packed_float32_array_insert(godot_packed_float32_array *p_self, const godot_int p_idx, const float p_data);
-
-godot_bool GDAPI godot_packed_float32_array_has(godot_packed_float32_array *p_self, const float p_value);
-
-void GDAPI godot_packed_float32_array_sort(godot_packed_float32_array *p_self);
-
-void GDAPI godot_packed_float32_array_invert(godot_packed_float32_array *p_self);
-
-void GDAPI godot_packed_float32_array_push_back(godot_packed_float32_array *p_self, const float p_data);
-
-void GDAPI godot_packed_float32_array_remove(godot_packed_float32_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_packed_float32_array_resize(godot_packed_float32_array *p_self, const godot_int p_size);
-
-void GDAPI godot_packed_float32_array_set(godot_packed_float32_array *p_self, const godot_int p_idx, const float p_data);
-float GDAPI godot_packed_float32_array_get(const godot_packed_float32_array *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_packed_float32_array_size(const godot_packed_float32_array *p_self);
-
-godot_bool GDAPI godot_packed_float32_array_is_empty(const godot_packed_float32_array *p_self);
+// Float32.
+void GDAPI godot_packed_float32_array_new(godot_packed_float32_array *p_self);
void GDAPI godot_packed_float32_array_destroy(godot_packed_float32_array *p_self);
+float GDAPI *godot_packed_float32_array_operator_index(godot_packed_float32_array *p_self, godot_int p_index);
+const float GDAPI *godot_packed_float32_array_operator_index_const(const godot_packed_float32_array *p_self, godot_int p_index);
-// float64
-
-void GDAPI godot_packed_float64_array_new(godot_packed_float64_array *r_dest);
-void GDAPI godot_packed_float64_array_new_copy(godot_packed_float64_array *r_dest, const godot_packed_float64_array *p_src);
-void GDAPI godot_packed_float64_array_new_with_array(godot_packed_float64_array *r_dest, const godot_array *p_a);
-
-const double GDAPI *godot_packed_float64_array_ptr(const godot_packed_float64_array *p_self);
-double GDAPI *godot_packed_float64_array_ptrw(godot_packed_float64_array *p_self);
-
-void GDAPI godot_packed_float64_array_append(godot_packed_float64_array *p_self, const double p_data);
-
-void GDAPI godot_packed_float64_array_append_array(godot_packed_float64_array *p_self, const godot_packed_float64_array *p_array);
-
-godot_error GDAPI godot_packed_float64_array_insert(godot_packed_float64_array *p_self, const godot_int p_idx, const double p_data);
-
-godot_bool GDAPI godot_packed_float64_array_has(godot_packed_float64_array *p_self, const double p_value);
-
-void GDAPI godot_packed_float64_array_sort(godot_packed_float64_array *p_self);
-
-void GDAPI godot_packed_float64_array_invert(godot_packed_float64_array *p_self);
-
-void GDAPI godot_packed_float64_array_push_back(godot_packed_float64_array *p_self, const double p_data);
-
-void GDAPI godot_packed_float64_array_remove(godot_packed_float64_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_packed_float64_array_resize(godot_packed_float64_array *p_self, const godot_int p_size);
-
-void GDAPI godot_packed_float64_array_set(godot_packed_float64_array *p_self, const godot_int p_idx, const double p_data);
-double GDAPI godot_packed_float64_array_get(const godot_packed_float64_array *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_packed_float64_array_size(const godot_packed_float64_array *p_self);
-
-godot_bool GDAPI godot_packed_float64_array_is_empty(const godot_packed_float64_array *p_self);
+// Float64.
+void GDAPI godot_packed_float64_array_new(godot_packed_float64_array *p_self);
void GDAPI godot_packed_float64_array_destroy(godot_packed_float64_array *p_self);
+double GDAPI *godot_packed_float64_array_operator_index(godot_packed_float64_array *p_self, godot_int p_index);
+const double GDAPI *godot_packed_float64_array_operator_index_const(const godot_packed_float64_array *p_self, godot_int p_index);
-// string
-
-void GDAPI godot_packed_string_array_new(godot_packed_string_array *r_dest);
-void GDAPI godot_packed_string_array_new_copy(godot_packed_string_array *r_dest, const godot_packed_string_array *p_src);
-void GDAPI godot_packed_string_array_new_with_array(godot_packed_string_array *r_dest, const godot_array *p_a);
-
-const godot_string GDAPI *godot_packed_string_array_ptr(const godot_packed_string_array *p_self);
-godot_string GDAPI *godot_packed_string_array_ptrw(godot_packed_string_array *p_self);
-
-void GDAPI godot_packed_string_array_append(godot_packed_string_array *p_self, const godot_string *p_data);
-
-void GDAPI godot_packed_string_array_append_array(godot_packed_string_array *p_self, const godot_packed_string_array *p_array);
-
-godot_error GDAPI godot_packed_string_array_insert(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data);
-
-godot_bool GDAPI godot_packed_string_array_has(godot_packed_string_array *p_self, const godot_string *p_value);
-
-void GDAPI godot_packed_string_array_sort(godot_packed_string_array *p_self);
-
-void GDAPI godot_packed_string_array_invert(godot_packed_string_array *p_self);
-
-void GDAPI godot_packed_string_array_push_back(godot_packed_string_array *p_self, const godot_string *p_data);
-
-void GDAPI godot_packed_string_array_remove(godot_packed_string_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_packed_string_array_resize(godot_packed_string_array *p_self, const godot_int p_size);
-
-void GDAPI godot_packed_string_array_set(godot_packed_string_array *p_self, const godot_int p_idx, const godot_string *p_data);
-godot_string GDAPI godot_packed_string_array_get(const godot_packed_string_array *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_packed_string_array_size(const godot_packed_string_array *p_self);
-
-godot_bool GDAPI godot_packed_string_array_is_empty(const godot_packed_string_array *p_self);
+// String.
+void GDAPI godot_packed_string_array_new(godot_packed_string_array *p_self);
void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self);
+godot_string GDAPI *godot_packed_string_array_operator_index(godot_packed_string_array *p_self, godot_int p_index);
+const godot_string GDAPI *godot_packed_string_array_operator_index_const(const godot_packed_string_array *p_self, godot_int p_index);
-// vector2
-
-void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *r_dest);
-void GDAPI godot_packed_vector2_array_new_copy(godot_packed_vector2_array *r_dest, const godot_packed_vector2_array *p_src);
-void GDAPI godot_packed_vector2_array_new_with_array(godot_packed_vector2_array *r_dest, const godot_array *p_a);
-
-const godot_vector2 GDAPI *godot_packed_vector2_array_ptr(const godot_packed_vector2_array *p_self);
-godot_vector2 GDAPI *godot_packed_vector2_array_ptrw(godot_packed_vector2_array *p_self);
-
-void GDAPI godot_packed_vector2_array_append(godot_packed_vector2_array *p_self, const godot_vector2 *p_data);
-
-void GDAPI godot_packed_vector2_array_append_array(godot_packed_vector2_array *p_self, const godot_packed_vector2_array *p_array);
-
-godot_error GDAPI godot_packed_vector2_array_insert(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data);
-
-godot_bool GDAPI godot_packed_vector2_array_has(godot_packed_vector2_array *p_self, const godot_vector2 *p_value);
-
-void GDAPI godot_packed_vector2_array_sort(godot_packed_vector2_array *p_self);
-
-void GDAPI godot_packed_vector2_array_invert(godot_packed_vector2_array *p_self);
-
-void GDAPI godot_packed_vector2_array_push_back(godot_packed_vector2_array *p_self, const godot_vector2 *p_data);
-
-void GDAPI godot_packed_vector2_array_remove(godot_packed_vector2_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_packed_vector2_array_resize(godot_packed_vector2_array *p_self, const godot_int p_size);
-
-void GDAPI godot_packed_vector2_array_set(godot_packed_vector2_array *p_self, const godot_int p_idx, const godot_vector2 *p_data);
-godot_vector2 GDAPI godot_packed_vector2_array_get(const godot_packed_vector2_array *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_packed_vector2_array_size(const godot_packed_vector2_array *p_self);
-
-godot_bool GDAPI godot_packed_vector2_array_is_empty(const godot_packed_vector2_array *p_self);
+// Vector2.
+void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *p_self);
void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self);
+godot_vector2 GDAPI *godot_packed_vector2_array_operator_index(godot_packed_vector2_array *p_self, godot_int p_index);
+const godot_vector2 GDAPI *godot_packed_vector2_array_operator_index_const(const godot_packed_vector2_array *p_self, godot_int p_index);
-// vector2i
-
-void GDAPI godot_packed_vector2i_array_new(godot_packed_vector2i_array *r_dest);
-void GDAPI godot_packed_vector2i_array_new_copy(godot_packed_vector2i_array *r_dest, const godot_packed_vector2i_array *p_src);
-void GDAPI godot_packed_vector2i_array_new_with_array(godot_packed_vector2i_array *r_dest, const godot_array *p_a);
-
-const godot_vector2i GDAPI *godot_packed_vector2i_array_ptr(const godot_packed_vector2i_array *p_self);
-godot_vector2i GDAPI *godot_packed_vector2i_array_ptrw(godot_packed_vector2i_array *p_self);
-
-void GDAPI godot_packed_vector2i_array_append(godot_packed_vector2i_array *p_self, const godot_vector2i *p_data);
-
-void GDAPI godot_packed_vector2i_array_append_array(godot_packed_vector2i_array *p_self, const godot_packed_vector2i_array *p_array);
-
-godot_error GDAPI godot_packed_vector2i_array_insert(godot_packed_vector2i_array *p_self, const godot_int p_idx, const godot_vector2i *p_data);
-
-godot_bool GDAPI godot_packed_vector2i_array_has(godot_packed_vector2i_array *p_self, const godot_vector2i *p_value);
-
-void GDAPI godot_packed_vector2i_array_sort(godot_packed_vector2i_array *p_self);
-
-void GDAPI godot_packed_vector2i_array_invert(godot_packed_vector2i_array *p_self);
-
-void GDAPI godot_packed_vector2i_array_push_back(godot_packed_vector2i_array *p_self, const godot_vector2i *p_data);
-
-void GDAPI godot_packed_vector2i_array_remove(godot_packed_vector2i_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_packed_vector2i_array_resize(godot_packed_vector2i_array *p_self, const godot_int p_size);
-
-void GDAPI godot_packed_vector2i_array_set(godot_packed_vector2i_array *p_self, const godot_int p_idx, const godot_vector2i *p_data);
-godot_vector2i GDAPI godot_packed_vector2i_array_get(const godot_packed_vector2i_array *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_packed_vector2i_array_size(const godot_packed_vector2i_array *p_self);
-
-godot_bool GDAPI godot_packed_vector2i_array_is_empty(const godot_packed_vector2i_array *p_self);
+// Vector2i.
+void GDAPI godot_packed_vector2i_array_new(godot_packed_vector2i_array *p_self);
void GDAPI godot_packed_vector2i_array_destroy(godot_packed_vector2i_array *p_self);
+godot_vector2i GDAPI *godot_packed_vector2i_array_operator_index(godot_packed_vector2i_array *p_self, godot_int p_index);
+const godot_vector2i GDAPI *godot_packed_vector2i_array_operator_index_const(const godot_packed_vector2i_array *p_self, godot_int p_index);
-// vector3
-
-void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *r_dest);
-void GDAPI godot_packed_vector3_array_new_copy(godot_packed_vector3_array *r_dest, const godot_packed_vector3_array *p_src);
-void GDAPI godot_packed_vector3_array_new_with_array(godot_packed_vector3_array *r_dest, const godot_array *p_a);
-
-const godot_vector3 GDAPI *godot_packed_vector3_array_ptr(const godot_packed_vector3_array *p_self);
-godot_vector3 GDAPI *godot_packed_vector3_array_ptrw(godot_packed_vector3_array *p_self);
-
-void GDAPI godot_packed_vector3_array_append(godot_packed_vector3_array *p_self, const godot_vector3 *p_data);
-
-void GDAPI godot_packed_vector3_array_append_array(godot_packed_vector3_array *p_self, const godot_packed_vector3_array *p_array);
-
-godot_error GDAPI godot_packed_vector3_array_insert(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data);
-
-godot_bool GDAPI godot_packed_vector3_array_has(godot_packed_vector3_array *p_self, const godot_vector3 *p_value);
-
-void GDAPI godot_packed_vector3_array_sort(godot_packed_vector3_array *p_self);
-
-void GDAPI godot_packed_vector3_array_invert(godot_packed_vector3_array *p_self);
-
-void GDAPI godot_packed_vector3_array_push_back(godot_packed_vector3_array *p_self, const godot_vector3 *p_data);
-
-void GDAPI godot_packed_vector3_array_remove(godot_packed_vector3_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_packed_vector3_array_resize(godot_packed_vector3_array *p_self, const godot_int p_size);
-
-void GDAPI godot_packed_vector3_array_set(godot_packed_vector3_array *p_self, const godot_int p_idx, const godot_vector3 *p_data);
-godot_vector3 GDAPI godot_packed_vector3_array_get(const godot_packed_vector3_array *p_self, const godot_int p_idx);
-
-godot_int GDAPI godot_packed_vector3_array_size(const godot_packed_vector3_array *p_self);
-
-godot_bool GDAPI godot_packed_vector3_array_is_empty(const godot_packed_vector3_array *p_self);
+// Vector3.
+void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *p_self);
void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self);
+godot_vector3 GDAPI *godot_packed_vector3_array_operator_index(godot_packed_vector3_array *p_self, godot_int p_index);
+const godot_vector3 GDAPI *godot_packed_vector3_array_operator_index_const(const godot_packed_vector3_array *p_self, godot_int p_index);
-// color
-
-void GDAPI godot_packed_color_array_new(godot_packed_color_array *r_dest);
-void GDAPI godot_packed_color_array_new_copy(godot_packed_color_array *r_dest, const godot_packed_color_array *p_src);
-void GDAPI godot_packed_color_array_new_with_array(godot_packed_color_array *r_dest, const godot_array *p_a);
-
-const godot_color GDAPI *godot_packed_color_array_ptr(const godot_packed_color_array *p_self);
-godot_color GDAPI *godot_packed_color_array_ptrw(godot_packed_color_array *p_self);
-
-void GDAPI godot_packed_color_array_append(godot_packed_color_array *p_self, const godot_color *p_data);
-
-void GDAPI godot_packed_color_array_append_array(godot_packed_color_array *p_self, const godot_packed_color_array *p_array);
-
-godot_error GDAPI godot_packed_color_array_insert(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data);
-
-godot_bool GDAPI godot_packed_color_array_has(godot_packed_color_array *p_self, const godot_color *p_value);
-
-void GDAPI godot_packed_color_array_sort(godot_packed_color_array *p_self);
-
-void GDAPI godot_packed_color_array_invert(godot_packed_color_array *p_self);
-
-void GDAPI godot_packed_color_array_push_back(godot_packed_color_array *p_self, const godot_color *p_data);
-
-void GDAPI godot_packed_color_array_remove(godot_packed_color_array *p_self, const godot_int p_idx);
-
-void GDAPI godot_packed_color_array_resize(godot_packed_color_array *p_self, const godot_int p_size);
-
-void GDAPI godot_packed_color_array_set(godot_packed_color_array *p_self, const godot_int p_idx, const godot_color *p_data);
-godot_color GDAPI godot_packed_color_array_get(const godot_packed_color_array *p_self, const godot_int p_idx);
+// Vector3i.
-godot_int GDAPI godot_packed_color_array_size(const godot_packed_color_array *p_self);
+void GDAPI godot_packed_vector3i_array_new(godot_packed_vector3i_array *p_self);
+void GDAPI godot_packed_vector3i_array_destroy(godot_packed_vector3i_array *p_self);
+godot_vector3i GDAPI *godot_packed_vector3i_array_operator_index(godot_packed_vector3i_array *p_self, godot_int p_index);
+const godot_vector3i GDAPI *godot_packed_vector3i_array_operator_index_const(const godot_packed_vector3i_array *p_self, godot_int p_index);
-godot_bool GDAPI godot_packed_color_array_is_empty(const godot_packed_color_array *p_self);
+// Color.
+void GDAPI godot_packed_color_array_new(godot_packed_color_array *p_self);
void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self);
+godot_color GDAPI *godot_packed_color_array_operator_index(godot_packed_color_array *p_self, godot_int p_index);
+const godot_color GDAPI *godot_packed_color_array_operator_index_const(const godot_packed_color_array *p_self, godot_int p_index);
#ifdef __cplusplus
}
#endif
-#endif // GODOT_POOL_ARRAYS_H
+#endif // GODOT_PACKED_ARRAYS_H
diff --git a/modules/gdnative/include/gdnative/plane.h b/modules/gdnative/include/gdnative/plane.h
index a8625d4cd6..ed10955e5f 100644
--- a/modules/gdnative/include/gdnative/plane.h
+++ b/modules/gdnative/include/gdnative/plane.h
@@ -35,9 +35,9 @@
extern "C" {
#endif
-#include <stdint.h>
+#include <gdnative/math_defs.h>
-#define GODOT_PLANE_SIZE 16
+#define GODOT_PLANE_SIZE (sizeof(godot_real_t) * 4)
#ifndef GODOT_CORE_API_GODOT_PLANE_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_PLANE_TYPE_DEFINED
@@ -46,53 +46,9 @@ typedef struct {
} godot_plane;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#include <gdnative/vector3.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_plane_new_with_reals(godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d);
-void GDAPI godot_plane_new_with_vectors(godot_plane *r_dest, const godot_vector3 *p_v1, const godot_vector3 *p_v2, const godot_vector3 *p_v3);
-void GDAPI godot_plane_new_with_normal(godot_plane *r_dest, const godot_vector3 *p_normal, const godot_real p_d);
-
-godot_string GDAPI godot_plane_as_string(const godot_plane *p_self);
-
-godot_plane GDAPI godot_plane_normalized(const godot_plane *p_self);
-
-godot_vector3 GDAPI godot_plane_center(const godot_plane *p_self);
-
-godot_bool GDAPI godot_plane_is_point_over(const godot_plane *p_self, const godot_vector3 *p_point);
-
-godot_real GDAPI godot_plane_distance_to(const godot_plane *p_self, const godot_vector3 *p_point);
-
-godot_bool GDAPI godot_plane_has_point(const godot_plane *p_self, const godot_vector3 *p_point, const godot_real p_epsilon);
-
-godot_vector3 GDAPI godot_plane_project(const godot_plane *p_self, const godot_vector3 *p_point);
-
-godot_bool GDAPI godot_plane_intersect_3(const godot_plane *p_self, godot_vector3 *r_dest, const godot_plane *p_b, const godot_plane *p_c);
-
-godot_bool GDAPI godot_plane_intersects_ray(const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_from, const godot_vector3 *p_dir);
-
-godot_bool GDAPI godot_plane_intersects_segment(const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_begin, const godot_vector3 *p_end);
-
-godot_plane GDAPI godot_plane_operator_neg(const godot_plane *p_self);
-
-godot_bool GDAPI godot_plane_operator_equal(const godot_plane *p_self, const godot_plane *p_b);
-
-void GDAPI godot_plane_set_normal(godot_plane *p_self, const godot_vector3 *p_normal);
-
-godot_vector3 GDAPI godot_plane_get_normal(const godot_plane *p_self);
-
-godot_real GDAPI godot_plane_get_d(const godot_plane *p_self);
-void GDAPI godot_plane_set_d(godot_plane *p_self, const godot_real p_d);
+void GDAPI godot_plane_new(godot_plane *p_self);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/quat.h b/modules/gdnative/include/gdnative/quat.h
index 68ca1765dd..69bf427611 100644
--- a/modules/gdnative/include/gdnative/quat.h
+++ b/modules/gdnative/include/gdnative/quat.h
@@ -35,9 +35,9 @@
extern "C" {
#endif
-#include <stdint.h>
+#include <gdnative/math_defs.h>
-#define GODOT_QUAT_SIZE 16
+#define GODOT_QUAT_SIZE (sizeof(godot_real_t) * 4)
#ifndef GODOT_CORE_API_GODOT_QUAT_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_QUAT_TYPE_DEFINED
@@ -46,70 +46,11 @@ typedef struct {
} godot_quat;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#include <gdnative/vector3.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_quat_new(godot_quat *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z, const godot_real p_w);
-void GDAPI godot_quat_new_with_axis_angle(godot_quat *r_dest, const godot_vector3 *p_axis, const godot_real p_angle);
-void GDAPI godot_quat_new_with_basis(godot_quat *r_dest, const godot_basis *p_basis);
-void GDAPI godot_quat_new_with_euler(godot_quat *r_dest, const godot_vector3 *p_euler);
-
-godot_real GDAPI godot_quat_get_x(const godot_quat *p_self);
-void GDAPI godot_quat_set_x(godot_quat *p_self, const godot_real val);
-
-godot_real GDAPI godot_quat_get_y(const godot_quat *p_self);
-void GDAPI godot_quat_set_y(godot_quat *p_self, const godot_real val);
-
-godot_real GDAPI godot_quat_get_z(const godot_quat *p_self);
-void GDAPI godot_quat_set_z(godot_quat *p_self, const godot_real val);
-
-godot_real GDAPI godot_quat_get_w(const godot_quat *p_self);
-void GDAPI godot_quat_set_w(godot_quat *p_self, const godot_real val);
-
-godot_string GDAPI godot_quat_as_string(const godot_quat *p_self);
-
-godot_real GDAPI godot_quat_length(const godot_quat *p_self);
-
-godot_real GDAPI godot_quat_length_squared(const godot_quat *p_self);
-
-godot_quat GDAPI godot_quat_normalized(const godot_quat *p_self);
-
-godot_bool GDAPI godot_quat_is_normalized(const godot_quat *p_self);
-
-godot_quat GDAPI godot_quat_inverse(const godot_quat *p_self);
-
-godot_real GDAPI godot_quat_dot(const godot_quat *p_self, const godot_quat *p_b);
-
-godot_vector3 GDAPI godot_quat_xform(const godot_quat *p_self, const godot_vector3 *p_v);
-
-godot_quat GDAPI godot_quat_slerp(const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t);
-
-godot_quat GDAPI godot_quat_slerpni(const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t);
-
-godot_quat GDAPI godot_quat_cubic_slerp(const godot_quat *p_self, const godot_quat *p_b, const godot_quat *p_pre_a, const godot_quat *p_post_b, const godot_real p_t);
-
-godot_quat GDAPI godot_quat_operator_multiply(const godot_quat *p_self, const godot_real p_b);
-
-godot_quat GDAPI godot_quat_operator_add(const godot_quat *p_self, const godot_quat *p_b);
-
-godot_quat GDAPI godot_quat_operator_subtract(const godot_quat *p_self, const godot_quat *p_b);
-
-godot_quat GDAPI godot_quat_operator_divide(const godot_quat *p_self, const godot_real p_b);
-
-godot_bool GDAPI godot_quat_operator_equal(const godot_quat *p_self, const godot_quat *p_b);
-
-godot_quat GDAPI godot_quat_operator_neg(const godot_quat *p_self);
-void GDAPI godot_quat_set_axis_angle(godot_quat *p_self, const godot_vector3 *p_axis, const godot_real p_angle);
+void GDAPI godot_quat_new(godot_quat *p_self);
+godot_real_t GDAPI *godot_quat_operator_index(godot_quat *p_self, godot_int p_index);
+const godot_real_t GDAPI *godot_quat_operator_index_const(const godot_quat *p_self, godot_int p_index);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/rect2.h b/modules/gdnative/include/gdnative/rect2.h
index d3cb276e14..9e51254cfe 100644
--- a/modules/gdnative/include/gdnative/rect2.h
+++ b/modules/gdnative/include/gdnative/rect2.h
@@ -35,119 +35,30 @@
extern "C" {
#endif
-#include <stdint.h>
+#include <gdnative/math_defs.h>
+
+#define GODOT_RECT2_SIZE (sizeof(godot_real_t) * 4)
#ifndef GODOT_CORE_API_GODOT_RECT2_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_RECT2_TYPE_DEFINED
typedef struct godot_rect2 {
- uint8_t _dont_touch_that[16];
+ uint8_t _dont_touch_that[GODOT_RECT2_SIZE];
} godot_rect2;
#endif
+#define GODOT_RECT2I_SIZE (sizeof(int32_t) * 4)
+
#ifndef GODOT_CORE_API_GODOT_RECT2I_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_RECT2I_TYPE_DEFINED
typedef struct godot_rect2i {
- uint8_t _dont_touch_that[16];
+ uint8_t _dont_touch_that[GODOT_RECT2I_SIZE];
} godot_rect2i;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#include <gdnative/vector2.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Rect2
-
-void GDAPI godot_rect2_new_with_position_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size);
-void GDAPI godot_rect2_new(godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height);
-
-godot_string GDAPI godot_rect2_as_string(const godot_rect2 *p_self);
-
-godot_rect2i GDAPI godot_rect2_as_rect2i(const godot_rect2 *p_self);
-
-godot_real GDAPI godot_rect2_get_area(const godot_rect2 *p_self);
-
-godot_bool GDAPI godot_rect2_intersects(const godot_rect2 *p_self, const godot_rect2 *p_b);
-
-godot_bool GDAPI godot_rect2_encloses(const godot_rect2 *p_self, const godot_rect2 *p_b);
-
-godot_bool GDAPI godot_rect2_has_no_area(const godot_rect2 *p_self);
-
-godot_rect2 GDAPI godot_rect2_intersection(const godot_rect2 *p_self, const godot_rect2 *p_b);
-
-godot_rect2 GDAPI godot_rect2_merge(const godot_rect2 *p_self, const godot_rect2 *p_b);
-
-godot_bool GDAPI godot_rect2_has_point(const godot_rect2 *p_self, const godot_vector2 *p_point);
-
-godot_rect2 GDAPI godot_rect2_grow(const godot_rect2 *p_self, const godot_real p_by);
-
-godot_rect2 GDAPI godot_rect2_grow_individual(const godot_rect2 *p_self, const godot_real p_left, const godot_real p_top, const godot_real p_right, const godot_real p_bottom);
-
-godot_rect2 GDAPI godot_rect2_grow_side(const godot_rect2 *p_self, const godot_int p_margin, const godot_real p_by);
-
-godot_rect2 GDAPI godot_rect2_abs(const godot_rect2 *p_self);
-
-godot_rect2 GDAPI godot_rect2_expand(const godot_rect2 *p_self, const godot_vector2 *p_to);
-
-godot_bool GDAPI godot_rect2_operator_equal(const godot_rect2 *p_self, const godot_rect2 *p_b);
-
-godot_vector2 GDAPI godot_rect2_get_position(const godot_rect2 *p_self);
-
-godot_vector2 GDAPI godot_rect2_get_size(const godot_rect2 *p_self);
-
-void GDAPI godot_rect2_set_position(godot_rect2 *p_self, const godot_vector2 *p_pos);
-
-void GDAPI godot_rect2_set_size(godot_rect2 *p_self, const godot_vector2 *p_size);
-
-// Rect2I
-
-void GDAPI godot_rect2i_new_with_position_and_size(godot_rect2i *r_dest, const godot_vector2i *p_pos, const godot_vector2i *p_size);
-void GDAPI godot_rect2i_new(godot_rect2i *r_dest, const godot_int p_x, const godot_int p_y, const godot_int p_width, const godot_int p_height);
-
-godot_string GDAPI godot_rect2i_as_string(const godot_rect2i *p_self);
-
-godot_rect2 GDAPI godot_rect2i_as_rect2(const godot_rect2i *p_self);
-
-godot_int GDAPI godot_rect2i_get_area(const godot_rect2i *p_self);
-
-godot_bool GDAPI godot_rect2i_intersects(const godot_rect2i *p_self, const godot_rect2i *p_b);
-
-godot_bool GDAPI godot_rect2i_encloses(const godot_rect2i *p_self, const godot_rect2i *p_b);
-
-godot_bool GDAPI godot_rect2i_has_no_area(const godot_rect2i *p_self);
-
-godot_rect2i GDAPI godot_rect2i_intersection(const godot_rect2i *p_self, const godot_rect2i *p_b);
-
-godot_rect2i GDAPI godot_rect2i_merge(const godot_rect2i *p_self, const godot_rect2i *p_b);
-
-godot_bool GDAPI godot_rect2i_has_point(const godot_rect2i *p_self, const godot_vector2i *p_point);
-
-godot_rect2i GDAPI godot_rect2i_grow(const godot_rect2i *p_self, const godot_int p_by);
-
-godot_rect2i GDAPI godot_rect2i_grow_individual(const godot_rect2i *p_self, const godot_int p_left, const godot_int p_top, const godot_int p_right, const godot_int p_bottom);
-
-godot_rect2i GDAPI godot_rect2i_grow_side(const godot_rect2i *p_self, const godot_int p_margin, const godot_int p_by);
-
-godot_rect2i GDAPI godot_rect2i_abs(const godot_rect2i *p_self);
-
-godot_rect2i GDAPI godot_rect2i_expand(const godot_rect2i *p_self, const godot_vector2i *p_to);
-
-godot_bool GDAPI godot_rect2i_operator_equal(const godot_rect2i *p_self, const godot_rect2i *p_b);
-
-godot_vector2i GDAPI godot_rect2i_get_position(const godot_rect2i *p_self);
-
-godot_vector2i GDAPI godot_rect2i_get_size(const godot_rect2i *p_self);
-
-void GDAPI godot_rect2i_set_position(godot_rect2i *p_self, const godot_vector2i *p_pos);
-void GDAPI godot_rect2i_set_size(godot_rect2i *p_self, const godot_vector2i *p_size);
+void GDAPI godot_rect2_new(godot_rect2 *p_self);
+void GDAPI godot_rect2i_new(godot_rect2i *p_self);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/rid.h b/modules/gdnative/include/gdnative/rid.h
index cbf066d47f..7ea8cfd174 100644
--- a/modules/gdnative/include/gdnative/rid.h
+++ b/modules/gdnative/include/gdnative/rid.h
@@ -46,26 +46,9 @@ typedef struct {
} godot_rid;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_rid_new(godot_rid *r_dest);
-
-godot_int GDAPI godot_rid_get_id(const godot_rid *p_self);
-
-void GDAPI godot_rid_new_with_resource(godot_rid *r_dest, const godot_object *p_from);
-
-godot_bool GDAPI godot_rid_operator_equal(const godot_rid *p_self, const godot_rid *p_b);
-
-godot_bool GDAPI godot_rid_operator_less(const godot_rid *p_self, const godot_rid *p_b);
+void GDAPI godot_rid_new(godot_rid *p_self);
#ifdef __cplusplus
}
diff --git a/modules/icloud/icloud_module.cpp b/modules/gdnative/include/gdnative/signal.h
index 8a2c41a38c..ad84542677 100644
--- a/modules/icloud/icloud_module.cpp
+++ b/modules/gdnative/include/gdnative/signal.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* icloud_module.cpp */
+/* signal.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,21 +28,31 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "icloud_module.h"
+#ifndef GODOT_SIGNAL_H
+#define GODOT_SIGNAL_H
-#include "core/config/engine.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
-#include "icloud.h"
+#include <stdint.h>
-ICloud *icloud;
+#define GODOT_SIGNAL_SIZE (16)
-void register_icloud_types() {
- icloud = memnew(ICloud);
- Engine::get_singleton()->add_singleton(Engine::Singleton("ICloud", icloud));
-}
+#ifndef GODOT_CORE_API_GODOT_SIGNAL_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_SIGNAL_TYPE_DEFINED
+typedef struct {
+ uint8_t _dont_touch_that[GODOT_SIGNAL_SIZE];
+} godot_signal;
+#endif
+
+#include <gdnative/gdnative.h>
-void unregister_icloud_types() {
- if (icloud) {
- memdelete(icloud);
- }
+void GDAPI godot_signal_new(godot_signal *p_self);
+void GDAPI godot_signal_destroy(godot_signal *p_self);
+
+#ifdef __cplusplus
}
+#endif
+
+#endif
diff --git a/modules/gdnative/include/gdnative/string.h b/modules/gdnative/include/gdnative/string.h
index e58be18b21..10fbb2c078 100644
--- a/modules/gdnative/include/gdnative/string.h
+++ b/modules/gdnative/include/gdnative/string.h
@@ -39,61 +39,26 @@ extern "C" {
#include <stdint.h>
#ifndef __cplusplus
-typedef uint32_t char32_t;
typedef uint16_t char16_t;
+typedef uint32_t char32_t;
#endif
typedef char32_t godot_char_type;
#define GODOT_STRING_SIZE sizeof(void *)
-#define GODOT_CHAR_STRING_SIZE sizeof(void *)
-#define GODOT_CHAR16_STRING_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_STRING_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_STRING_TYPE_DEFINED
typedef struct {
uint8_t _dont_touch_that[GODOT_STRING_SIZE];
} godot_string;
-
-#endif
-
-#ifndef GODOT_CORE_API_GODOT_CHAR_STRING_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_CHAR_STRING_TYPE_DEFINED
-typedef struct {
- uint8_t _dont_touch_that[GODOT_CHAR_STRING_SIZE];
-} godot_char_string;
-#endif
-
-#ifndef GODOT_CORE_API_GODOT_CHAR16_STRING_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_CHAR16_STRING_TYPE_DEFINED
-typedef struct {
- uint8_t _dont_touch_that[GODOT_CHAR16_STRING_SIZE];
-} godot_char16_string;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
-#include <gdnative/array.h>
#include <gdnative/gdnative.h>
-#include <gdnative/variant.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-godot_int GDAPI godot_char_string_length(const godot_char_string *p_cs);
-const char GDAPI *godot_char_string_get_data(const godot_char_string *p_cs);
-void GDAPI godot_char_string_destroy(godot_char_string *p_cs);
-
-godot_int GDAPI godot_char16_string_length(const godot_char16_string *p_cs);
-const char16_t GDAPI *godot_char16_string_get_data(const godot_char16_string *p_cs);
-void GDAPI godot_char16_string_destroy(godot_char16_string *p_cs);
void GDAPI godot_string_new(godot_string *r_dest);
void GDAPI godot_string_new_copy(godot_string *r_dest, const godot_string *p_src);
+void GDAPI godot_string_destroy(godot_string *p_self);
void GDAPI godot_string_new_with_latin1_chars(godot_string *r_dest, const char *p_contents);
void GDAPI godot_string_new_with_utf8_chars(godot_string *r_dest, const char *p_contents);
@@ -107,198 +72,6 @@ void GDAPI godot_string_new_with_utf16_chars_and_len(godot_string *r_dest, const
void GDAPI godot_string_new_with_utf32_chars_and_len(godot_string *r_dest, const char32_t *p_contents, const int p_size);
void GDAPI godot_string_new_with_wide_chars_and_len(godot_string *r_dest, const wchar_t *p_contents, const int p_size);
-const godot_char_type GDAPI *godot_string_operator_index(godot_string *p_self, const godot_int p_idx);
-godot_char_type GDAPI godot_string_operator_index_const(const godot_string *p_self, const godot_int p_idx);
-const godot_char_type GDAPI *godot_string_get_data(const godot_string *p_self);
-
-godot_bool GDAPI godot_string_operator_equal(const godot_string *p_self, const godot_string *p_b);
-godot_bool GDAPI godot_string_operator_less(const godot_string *p_self, const godot_string *p_b);
-godot_string GDAPI godot_string_operator_plus(const godot_string *p_self, const godot_string *p_b);
-
-/* Standard size stuff */
-
-/*+++*/ godot_int GDAPI godot_string_length(const godot_string *p_self);
-
-/* Helpers */
-
-signed char GDAPI godot_string_casecmp_to(const godot_string *p_self, const godot_string *p_str);
-signed char GDAPI godot_string_nocasecmp_to(const godot_string *p_self, const godot_string *p_str);
-signed char GDAPI godot_string_naturalnocasecmp_to(const godot_string *p_self, const godot_string *p_str);
-
-godot_bool GDAPI godot_string_begins_with(const godot_string *p_self, const godot_string *p_string);
-godot_bool GDAPI godot_string_begins_with_char_array(const godot_string *p_self, const char *p_char_array);
-godot_packed_string_array GDAPI godot_string_bigrams(const godot_string *p_self);
-godot_string GDAPI godot_string_chr(godot_char_type p_character);
-godot_bool GDAPI godot_string_ends_with(const godot_string *p_self, const godot_string *p_string);
-godot_bool GDAPI godot_string_ends_with_char_array(const godot_string *p_self, const char *p_char_array);
-godot_int GDAPI godot_string_count(const godot_string *p_self, const godot_string *p_what, godot_int p_from, godot_int p_to);
-godot_int GDAPI godot_string_countn(const godot_string *p_self, const godot_string *p_what, godot_int p_from, godot_int p_to);
-godot_int GDAPI godot_string_find(const godot_string *p_self, const godot_string *p_what);
-godot_int GDAPI godot_string_find_from(const godot_string *p_self, const godot_string *p_what, godot_int p_from);
-godot_int GDAPI godot_string_findmk(const godot_string *p_self, const godot_packed_string_array *p_keys);
-godot_int GDAPI godot_string_findmk_from(const godot_string *p_self, const godot_packed_string_array *p_keys, godot_int p_from);
-godot_int GDAPI godot_string_findmk_from_in_place(const godot_string *p_self, const godot_packed_string_array *p_keys, godot_int p_from, godot_int *r_key);
-godot_int GDAPI godot_string_findn(const godot_string *p_self, const godot_string *p_what);
-godot_int GDAPI godot_string_findn_from(const godot_string *p_self, const godot_string *p_what, godot_int p_from);
-godot_string GDAPI godot_string_format(const godot_string *p_self, const godot_variant *p_values);
-godot_string GDAPI godot_string_format_with_custom_placeholder(const godot_string *p_self, const godot_variant *p_values, const char *p_placeholder);
-godot_string GDAPI godot_string_hex_encode_buffer(const uint8_t *p_buffer, godot_int p_len);
-godot_int GDAPI godot_string_hex_to_int(const godot_string *p_self);
-godot_int GDAPI godot_string_hex_to_int_with_prefix(const godot_string *p_self);
-godot_string GDAPI godot_string_insert(const godot_string *p_self, godot_int p_at_pos, const godot_string *p_string);
-godot_bool GDAPI godot_string_is_numeric(const godot_string *p_self);
-godot_bool GDAPI godot_string_is_subsequence_of(const godot_string *p_self, const godot_string *p_string);
-godot_bool GDAPI godot_string_is_subsequence_ofi(const godot_string *p_self, const godot_string *p_string);
-godot_string GDAPI godot_string_lpad(const godot_string *p_self, godot_int p_min_length);
-godot_string GDAPI godot_string_lpad_with_custom_character(const godot_string *p_self, godot_int p_min_length, const godot_string *p_character);
-godot_bool GDAPI godot_string_match(const godot_string *p_self, const godot_string *p_wildcard);
-godot_bool GDAPI godot_string_matchn(const godot_string *p_self, const godot_string *p_wildcard);
-godot_string GDAPI godot_string_md5(const uint8_t *p_md5);
-godot_string GDAPI godot_string_num(double p_num);
-godot_string GDAPI godot_string_num_int64(int64_t p_num, godot_int p_base);
-godot_string GDAPI godot_string_num_int64_capitalized(int64_t p_num, godot_int p_base, godot_bool p_capitalize_hex);
-godot_string GDAPI godot_string_num_real(double p_num);
-godot_string GDAPI godot_string_num_scientific(double p_num);
-godot_string GDAPI godot_string_num_with_decimals(double p_num, godot_int p_decimals);
-godot_string GDAPI godot_string_pad_decimals(const godot_string *p_self, godot_int p_digits);
-godot_string GDAPI godot_string_pad_zeros(const godot_string *p_self, godot_int p_digits);
-godot_string GDAPI godot_string_replace_first(const godot_string *p_self, const godot_string *p_key, const godot_string *p_with);
-godot_string GDAPI godot_string_replace(const godot_string *p_self, const godot_string *p_key, const godot_string *p_with);
-godot_string GDAPI godot_string_replacen(const godot_string *p_self, const godot_string *p_key, const godot_string *p_with);
-godot_int GDAPI godot_string_rfind(const godot_string *p_self, const godot_string *p_what);
-godot_int GDAPI godot_string_rfindn(const godot_string *p_self, const godot_string *p_what);
-godot_int GDAPI godot_string_rfind_from(const godot_string *p_self, const godot_string *p_what, godot_int p_from);
-godot_int GDAPI godot_string_rfindn_from(const godot_string *p_self, const godot_string *p_what, godot_int p_from);
-godot_string GDAPI godot_string_rpad(const godot_string *p_self, godot_int p_min_length);
-godot_string GDAPI godot_string_rpad_with_custom_character(const godot_string *p_self, godot_int p_min_length, const godot_string *p_character);
-godot_real GDAPI godot_string_similarity(const godot_string *p_self, const godot_string *p_string);
-godot_string GDAPI godot_string_sprintf(const godot_string *p_self, const godot_array *p_values, godot_bool *p_error);
-godot_string GDAPI godot_string_substr(const godot_string *p_self, godot_int p_from, godot_int p_chars);
-double GDAPI godot_string_to_float(const godot_string *p_self);
-godot_int GDAPI godot_string_to_int(const godot_string *p_self);
-
-godot_string GDAPI godot_string_camelcase_to_underscore(const godot_string *p_self);
-godot_string GDAPI godot_string_camelcase_to_underscore_lowercased(const godot_string *p_self);
-godot_string GDAPI godot_string_capitalize(const godot_string *p_self);
-
-double GDAPI godot_string_char_to_float(const char *p_what);
-double GDAPI godot_string_wchar_to_float(const wchar_t *p_str, const wchar_t **r_end);
-
-godot_int GDAPI godot_string_char_to_int(const char *p_what);
-godot_int GDAPI godot_string_wchar_to_int(const wchar_t *p_str);
-
-godot_int GDAPI godot_string_char_to_int_with_len(const char *p_what, godot_int p_len);
-godot_int GDAPI godot_string_wchar_to_int_with_len(const wchar_t *p_str, int p_len);
-
-godot_int GDAPI godot_string_get_slice_count(const godot_string *p_self, const godot_string *p_splitter);
-godot_string GDAPI godot_string_get_slice(const godot_string *p_self, const godot_string *p_splitter, godot_int p_slice);
-godot_string GDAPI godot_string_get_slicec(const godot_string *p_self, godot_char_type p_splitter, godot_int p_slice);
-
-godot_packed_string_array GDAPI godot_string_split(const godot_string *p_self, const godot_string *p_splitter);
-godot_packed_string_array GDAPI godot_string_split_allow_empty(const godot_string *p_self, const godot_string *p_splitter);
-godot_packed_string_array GDAPI godot_string_split_with_maxsplit(const godot_string *p_self, const godot_string *p_splitter, const godot_bool p_allow_empty, const godot_int p_maxsplit);
-
-godot_packed_string_array GDAPI godot_string_rsplit(const godot_string *p_self, const godot_string *p_splitter);
-godot_packed_string_array GDAPI godot_string_rsplit_allow_empty(const godot_string *p_self, const godot_string *p_splitter);
-godot_packed_string_array GDAPI godot_string_rsplit_with_maxsplit(const godot_string *p_self, const godot_string *p_splitter, const godot_bool p_allow_empty, const godot_int p_maxsplit);
-
-godot_packed_float32_array GDAPI godot_string_split_floats(const godot_string *p_self, const godot_string *p_splitter);
-godot_packed_float32_array GDAPI godot_string_split_floats_allow_empty(const godot_string *p_self, const godot_string *p_splitter);
-godot_packed_float32_array GDAPI godot_string_split_floats_mk(const godot_string *p_self, const godot_packed_string_array *p_splitters);
-godot_packed_float32_array GDAPI godot_string_split_floats_mk_allow_empty(const godot_string *p_self, const godot_packed_string_array *p_splitters);
-godot_packed_int32_array GDAPI godot_string_split_ints(const godot_string *p_self, const godot_string *p_splitter);
-godot_packed_int32_array GDAPI godot_string_split_ints_allow_empty(const godot_string *p_self, const godot_string *p_splitter);
-godot_packed_int32_array GDAPI godot_string_split_ints_mk(const godot_string *p_self, const godot_packed_string_array *p_splitters);
-godot_packed_int32_array GDAPI godot_string_split_ints_mk_allow_empty(const godot_string *p_self, const godot_packed_string_array *p_splitters);
-
-godot_packed_string_array GDAPI godot_string_split_spaces(const godot_string *p_self);
-
-godot_char_type GDAPI godot_string_char_lowercase(godot_char_type p_char);
-godot_char_type GDAPI godot_string_char_uppercase(godot_char_type p_char);
-godot_string GDAPI godot_string_to_lower(const godot_string *p_self);
-godot_string GDAPI godot_string_to_upper(const godot_string *p_self);
-
-godot_string GDAPI godot_string_get_basename(const godot_string *p_self);
-godot_string GDAPI godot_string_get_extension(const godot_string *p_self);
-godot_string GDAPI godot_string_left(const godot_string *p_self, godot_int p_pos);
-godot_char_type GDAPI godot_string_ord_at(const godot_string *p_self, godot_int p_idx);
-godot_string GDAPI godot_string_plus_file(const godot_string *p_self, const godot_string *p_file);
-godot_string GDAPI godot_string_right(const godot_string *p_self, godot_int p_pos);
-godot_string GDAPI godot_string_repeat(const godot_string *p_self, godot_int p_count);
-godot_string GDAPI godot_string_strip_edges(const godot_string *p_self, godot_bool p_left, godot_bool p_right);
-godot_string GDAPI godot_string_strip_escapes(const godot_string *p_self);
-
-void GDAPI godot_string_erase(godot_string *p_self, godot_int p_pos, godot_int p_chars);
-
-godot_char_string GDAPI godot_string_ascii(const godot_string *p_self);
-godot_char_string GDAPI godot_string_latin1(const godot_string *p_self);
-
-godot_char_string GDAPI godot_string_utf8(const godot_string *p_self);
-godot_bool GDAPI godot_string_parse_utf8(godot_string *p_self, const char *p_utf8);
-godot_bool GDAPI godot_string_parse_utf8_with_len(godot_string *p_self, const char *p_utf8, godot_int p_len);
-
-godot_char16_string GDAPI godot_string_utf16(const godot_string *p_self);
-godot_bool GDAPI godot_string_parse_utf16(godot_string *p_self, const char16_t *p_utf16);
-godot_bool GDAPI godot_string_parse_utf16_with_len(godot_string *p_self, const char16_t *p_utf16, godot_int p_len);
-
-uint32_t GDAPI godot_string_hash(const godot_string *p_self);
-uint64_t GDAPI godot_string_hash64(const godot_string *p_self);
-
-uint32_t GDAPI godot_string_hash_chars(const char *p_cstr);
-uint32_t GDAPI godot_string_hash_chars_with_len(const char *p_cstr, godot_int p_len);
-uint32_t GDAPI godot_string_hash_wide_chars(const wchar_t *p_str);
-uint32_t GDAPI godot_string_hash_wide_chars_with_len(const wchar_t *p_str, godot_int p_len);
-
-godot_packed_byte_array GDAPI godot_string_md5_buffer(const godot_string *p_self);
-godot_string GDAPI godot_string_md5_text(const godot_string *p_self);
-godot_packed_byte_array GDAPI godot_string_sha1_buffer(const godot_string *p_self);
-godot_string GDAPI godot_string_sha1_text(const godot_string *p_self);
-godot_packed_byte_array GDAPI godot_string_sha256_buffer(const godot_string *p_self);
-godot_string GDAPI godot_string_sha256_text(const godot_string *p_self);
-
-godot_bool godot_string_is_empty(const godot_string *p_self);
-
-// path functions
-godot_string GDAPI godot_string_get_base_dir(const godot_string *p_self);
-godot_string GDAPI godot_string_get_file(const godot_string *p_self);
-godot_string GDAPI godot_string_humanize_size(uint64_t p_size);
-godot_bool GDAPI godot_string_is_abs_path(const godot_string *p_self);
-godot_bool GDAPI godot_string_is_rel_path(const godot_string *p_self);
-godot_bool GDAPI godot_string_is_resource_file(const godot_string *p_self);
-godot_string GDAPI godot_string_path_to(const godot_string *p_self, const godot_string *p_path);
-godot_string GDAPI godot_string_path_to_file(const godot_string *p_self, const godot_string *p_path);
-godot_string GDAPI godot_string_simplify_path(const godot_string *p_self);
-
-godot_string GDAPI godot_string_c_escape(const godot_string *p_self);
-godot_string GDAPI godot_string_c_escape_multiline(const godot_string *p_self);
-godot_string GDAPI godot_string_c_unescape(const godot_string *p_self);
-godot_string GDAPI godot_string_http_escape(const godot_string *p_self);
-godot_string GDAPI godot_string_http_unescape(const godot_string *p_self);
-godot_string GDAPI godot_string_json_escape(const godot_string *p_self);
-godot_string GDAPI godot_string_xml_escape(const godot_string *p_self);
-godot_string GDAPI godot_string_xml_escape_with_quotes(const godot_string *p_self);
-godot_string GDAPI godot_string_xml_unescape(const godot_string *p_self);
-
-godot_string GDAPI godot_string_percent_decode(const godot_string *p_self);
-godot_string GDAPI godot_string_percent_encode(const godot_string *p_self);
-godot_string GDAPI godot_string_join(const godot_string *p_self, const godot_packed_string_array *p_parts);
-
-godot_bool GDAPI godot_string_is_valid_filename(const godot_string *p_self);
-godot_bool GDAPI godot_string_is_valid_float(const godot_string *p_self);
-godot_bool GDAPI godot_string_is_valid_hex_number(const godot_string *p_self, godot_bool p_with_prefix);
-godot_bool GDAPI godot_string_is_valid_html_color(const godot_string *p_self);
-godot_bool GDAPI godot_string_is_valid_identifier(const godot_string *p_self);
-godot_bool GDAPI godot_string_is_valid_integer(const godot_string *p_self);
-godot_bool GDAPI godot_string_is_valid_ip_address(const godot_string *p_self);
-
-godot_string GDAPI godot_string_dedent(const godot_string *p_self);
-godot_string GDAPI godot_string_trim_prefix(const godot_string *p_self, const godot_string *p_prefix);
-godot_string GDAPI godot_string_trim_suffix(const godot_string *p_self, const godot_string *p_suffix);
-godot_string GDAPI godot_string_lstrip(const godot_string *p_self, const godot_string *p_chars);
-godot_string GDAPI godot_string_rstrip(const godot_string *p_self, const godot_string *p_chars);
-
-void GDAPI godot_string_destroy(godot_string *p_self);
-
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/include/gdnative/string_name.h b/modules/gdnative/include/gdnative/string_name.h
index b468f716e1..346f626e81 100644
--- a/modules/gdnative/include/gdnative/string_name.h
+++ b/modules/gdnative/include/gdnative/string_name.h
@@ -47,30 +47,14 @@ typedef struct {
} godot_string_name;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_string_name_new(godot_string_name *r_dest, const godot_string *p_name);
-void GDAPI godot_string_name_new_data(godot_string_name *r_dest, const char *p_name);
-
-godot_string GDAPI godot_string_name_get_name(const godot_string_name *p_self);
-
-uint32_t GDAPI godot_string_name_get_hash(const godot_string_name *p_self);
-const void GDAPI *godot_string_name_get_data_unique_pointer(const godot_string_name *p_self);
-
-godot_bool GDAPI godot_string_name_operator_equal(const godot_string_name *p_self, const godot_string_name *p_other);
-godot_bool GDAPI godot_string_name_operator_less(const godot_string_name *p_self, const godot_string_name *p_other);
-
+void GDAPI godot_string_name_new(godot_string_name *r_dest);
+void GDAPI godot_string_name_new_copy(godot_string_name *r_dest, const godot_string_name *p_src);
void GDAPI godot_string_name_destroy(godot_string_name *p_self);
+void GDAPI godot_string_name_new_with_latin1_chars(godot_string_name *r_dest, const char *p_contents);
+
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/include/gdnative/transform.h b/modules/gdnative/include/gdnative/transform.h
index 948cb2ecfd..e67862d140 100644
--- a/modules/gdnative/include/gdnative/transform.h
+++ b/modules/gdnative/include/gdnative/transform.h
@@ -35,9 +35,9 @@
extern "C" {
#endif
-#include <stdint.h>
+#include <gdnative/math_defs.h>
-#define GODOT_TRANSFORM_SIZE 48
+#define GODOT_TRANSFORM_SIZE (sizeof(godot_real_t) * 12)
#ifndef GODOT_CORE_API_GODOT_TRANSFORM_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_TRANSFORM_TYPE_DEFINED
@@ -46,63 +46,9 @@ typedef struct {
} godot_transform;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
-#include <gdnative/basis.h>
#include <gdnative/gdnative.h>
-#include <gdnative/variant.h>
-#include <gdnative/vector3.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_transform_new_with_axis_origin(godot_transform *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis, const godot_vector3 *p_origin);
-void GDAPI godot_transform_new(godot_transform *r_dest, const godot_basis *p_basis, const godot_vector3 *p_origin);
-void GDAPI godot_transform_new_with_quat(godot_transform *r_dest, const godot_quat *p_quat);
-
-godot_basis GDAPI godot_transform_get_basis(const godot_transform *p_self);
-void GDAPI godot_transform_set_basis(godot_transform *p_self, const godot_basis *p_v);
-
-godot_vector3 GDAPI godot_transform_get_origin(const godot_transform *p_self);
-void GDAPI godot_transform_set_origin(godot_transform *p_self, const godot_vector3 *p_v);
-
-godot_string GDAPI godot_transform_as_string(const godot_transform *p_self);
-
-godot_transform GDAPI godot_transform_inverse(const godot_transform *p_self);
-
-godot_transform GDAPI godot_transform_affine_inverse(const godot_transform *p_self);
-
-godot_transform GDAPI godot_transform_orthonormalized(const godot_transform *p_self);
-
-godot_transform GDAPI godot_transform_rotated(const godot_transform *p_self, const godot_vector3 *p_axis, const godot_real p_phi);
-
-godot_transform GDAPI godot_transform_scaled(const godot_transform *p_self, const godot_vector3 *p_scale);
-
-godot_transform GDAPI godot_transform_translated(const godot_transform *p_self, const godot_vector3 *p_ofs);
-
-godot_transform GDAPI godot_transform_looking_at(const godot_transform *p_self, const godot_vector3 *p_target, const godot_vector3 *p_up);
-
-godot_plane GDAPI godot_transform_xform_plane(const godot_transform *p_self, const godot_plane *p_v);
-
-godot_plane GDAPI godot_transform_xform_inv_plane(const godot_transform *p_self, const godot_plane *p_v);
-
-void GDAPI godot_transform_new_identity(godot_transform *r_dest);
-
-godot_bool GDAPI godot_transform_operator_equal(const godot_transform *p_self, const godot_transform *p_b);
-
-godot_transform GDAPI godot_transform_operator_multiply(const godot_transform *p_self, const godot_transform *p_b);
-
-godot_vector3 GDAPI godot_transform_xform_vector3(const godot_transform *p_self, const godot_vector3 *p_v);
-
-godot_vector3 GDAPI godot_transform_xform_inv_vector3(const godot_transform *p_self, const godot_vector3 *p_v);
-
-godot_aabb GDAPI godot_transform_xform_aabb(const godot_transform *p_self, const godot_aabb *p_v);
-godot_aabb GDAPI godot_transform_xform_inv_aabb(const godot_transform *p_self, const godot_aabb *p_v);
+void GDAPI godot_transform_new(godot_transform *p_self);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/transform2d.h b/modules/gdnative/include/gdnative/transform2d.h
index 51c5306c7d..4a2bca7cfc 100644
--- a/modules/gdnative/include/gdnative/transform2d.h
+++ b/modules/gdnative/include/gdnative/transform2d.h
@@ -35,9 +35,9 @@
extern "C" {
#endif
-#include <stdint.h>
+#include <gdnative/math_defs.h>
-#define GODOT_TRANSFORM2D_SIZE 24
+#define GODOT_TRANSFORM2D_SIZE (sizeof(godot_real_t) * 6)
#ifndef GODOT_CORE_API_GODOT_TRANSFORM2D_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_TRANSFORM2D_TYPE_DEFINED
@@ -46,61 +46,11 @@ typedef struct {
} godot_transform2d;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#include <gdnative/variant.h>
-#include <gdnative/vector2.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void GDAPI godot_transform2d_new(godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos);
-void GDAPI godot_transform2d_new_axis_origin(godot_transform2d *r_dest, const godot_vector2 *p_x_axis, const godot_vector2 *p_y_axis, const godot_vector2 *p_origin);
-
-godot_string GDAPI godot_transform2d_as_string(const godot_transform2d *p_self);
-
-godot_transform2d GDAPI godot_transform2d_inverse(const godot_transform2d *p_self);
-
-godot_transform2d GDAPI godot_transform2d_affine_inverse(const godot_transform2d *p_self);
-
-godot_real GDAPI godot_transform2d_get_rotation(const godot_transform2d *p_self);
-
-godot_vector2 GDAPI godot_transform2d_get_origin(const godot_transform2d *p_self);
-
-godot_vector2 GDAPI godot_transform2d_get_scale(const godot_transform2d *p_self);
-
-godot_transform2d GDAPI godot_transform2d_orthonormalized(const godot_transform2d *p_self);
-
-godot_transform2d GDAPI godot_transform2d_rotated(const godot_transform2d *p_self, const godot_real p_phi);
-
-godot_transform2d GDAPI godot_transform2d_scaled(const godot_transform2d *p_self, const godot_vector2 *p_scale);
-
-godot_transform2d GDAPI godot_transform2d_translated(const godot_transform2d *p_self, const godot_vector2 *p_offset);
-
-godot_vector2 GDAPI godot_transform2d_xform_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v);
-
-godot_vector2 GDAPI godot_transform2d_xform_inv_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v);
-
-godot_vector2 GDAPI godot_transform2d_basis_xform_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v);
-
-godot_vector2 GDAPI godot_transform2d_basis_xform_inv_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v);
-
-godot_transform2d GDAPI godot_transform2d_interpolate_with(const godot_transform2d *p_self, const godot_transform2d *p_m, const godot_real p_c);
-
-godot_bool GDAPI godot_transform2d_operator_equal(const godot_transform2d *p_self, const godot_transform2d *p_b);
-
-godot_transform2d GDAPI godot_transform2d_operator_multiply(const godot_transform2d *p_self, const godot_transform2d *p_b);
-
-void GDAPI godot_transform2d_new_identity(godot_transform2d *r_dest);
-
-godot_rect2 GDAPI godot_transform2d_xform_rect2(const godot_transform2d *p_self, const godot_rect2 *p_v);
-godot_rect2 GDAPI godot_transform2d_xform_inv_rect2(const godot_transform2d *p_self, const godot_rect2 *p_v);
+void GDAPI godot_transform2d_new(godot_transform2d *p_self);
+godot_vector2 GDAPI *godot_transform2d_operator_index(godot_transform2d *p_self, godot_int p_index);
+const godot_vector2 GDAPI *godot_transform2d_operator_index_const(const godot_transform2d *p_self, godot_int p_index);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/variant.h b/modules/gdnative/include/gdnative/variant.h
index a50947cb72..329a6faf51 100644
--- a/modules/gdnative/include/gdnative/variant.h
+++ b/modules/gdnative/include/gdnative/variant.h
@@ -35,16 +35,8 @@
extern "C" {
#endif
-#include <stdint.h>
-
-#define GODOT_VARIANT_SIZE (16 + sizeof(int64_t))
-
-#ifndef GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
-typedef struct {
- uint8_t _dont_touch_that[GODOT_VARIANT_SIZE];
-} godot_variant;
-#endif
+#include <gdnative/math_defs.h>
+#include <gdnative/variant_struct.h>
typedef enum godot_variant_type {
GODOT_VARIANT_TYPE_NIL,
@@ -146,10 +138,35 @@ typedef enum godot_variant_operator {
GODOT_VARIANT_OP_MAX,
} godot_variant_operator;
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
+typedef enum godot_variant_utility_function_type {
+ GODOT_UTILITY_FUNC_TYPE_MATH,
+ GODOT_UTILITY_FUNC_TYPE_RANDOM,
+ GODOT_UTILITY_FUNC_TYPE_GENERAL,
+} godot_variant_utility_function_type;
+
+// Types for function pointers.
+typedef void (*godot_validated_operator_evaluator)(const godot_variant *p_left, const godot_variant *p_right, godot_variant *r_result);
+typedef void (*godot_ptr_operator_evaluator)(const void *p_left, const void *p_right, void *r_result);
+typedef void (*godot_validated_builtin_method)(godot_variant *p_base, const godot_variant **p_args, int p_argument_count, godot_variant *r_return);
+typedef void (*godot_ptr_builtin_method)(void *p_base, const void **p_args, void *r_return, int p_argument_count);
+typedef void (*godot_validated_constructor)(godot_variant *p_base, const godot_variant **p_args);
+typedef void (*godot_ptr_constructor)(void *p_base, const void **p_args);
+typedef void (*godot_validated_setter)(godot_variant *p_base, const godot_variant *p_value);
+typedef void (*godot_validated_getter)(const godot_variant *p_base, godot_variant *r_value);
+typedef void (*godot_ptr_setter)(void *p_base, const void *p_value);
+typedef void (*godot_ptr_getter)(const void *p_base, void *r_value);
+typedef void (*godot_validated_indexed_setter)(godot_variant *p_base, godot_int p_index, const godot_variant *p_value, bool *r_oob);
+typedef void (*godot_validated_indexed_getter)(const godot_variant *p_base, godot_int p_index, godot_variant *r_value, bool *r_oob);
+typedef void (*godot_ptr_indexed_setter)(void *p_base, godot_int p_index, const void *p_value);
+typedef void (*godot_ptr_indexed_getter)(const void *p_base, godot_int p_index, void *r_value);
+typedef void (*godot_validated_keyed_setter)(godot_variant *p_base, const godot_variant *p_key, const godot_variant *p_value, bool *r_valid);
+typedef void (*godot_validated_keyed_getter)(const godot_variant *p_base, const godot_variant *p_key, godot_variant *r_value, bool *r_valid);
+typedef bool (*godot_validated_keyed_checker)(const godot_variant *p_base, const godot_variant *p_key, bool *r_valid);
+typedef void (*godot_ptr_keyed_setter)(void *p_base, const void *p_key, const void *p_value);
+typedef void (*godot_ptr_keyed_getter)(const void *p_base, const void *p_key, void *r_value);
+typedef bool (*godot_ptr_keyed_checker)(const godot_variant *p_base, const godot_variant *p_key);
+typedef void (*godot_validated_utility_function)(godot_variant *r_return, const godot_variant **p_arguments, int p_argument_count);
+typedef void (*godot_ptr_utility_function)(void *r_return, const void **p_arguments, int p_argument_count);
#include <gdnative/aabb.h>
#include <gdnative/array.h>
@@ -163,6 +180,7 @@ typedef enum godot_variant_operator {
#include <gdnative/quat.h>
#include <gdnative/rect2.h>
#include <gdnative/rid.h>
+#include <gdnative/signal.h>
#include <gdnative/string.h>
#include <gdnative/string_name.h>
#include <gdnative/transform.h>
@@ -173,22 +191,15 @@ typedef enum godot_variant_operator {
#include <gdnative/gdnative.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_v);
+// Memory.
void GDAPI godot_variant_new_copy(godot_variant *r_dest, const godot_variant *p_src);
void GDAPI godot_variant_new_nil(godot_variant *r_dest);
-
void GDAPI godot_variant_new_bool(godot_variant *r_dest, const godot_bool p_b);
-void GDAPI godot_variant_new_uint(godot_variant *r_dest, const uint64_t p_i);
-void GDAPI godot_variant_new_int(godot_variant *r_dest, const int64_t p_i);
-void GDAPI godot_variant_new_real(godot_variant *r_dest, const double p_r);
+void GDAPI godot_variant_new_int(godot_variant *r_dest, const godot_int p_i);
+void GDAPI godot_variant_new_float(godot_variant *r_dest, const godot_float p_f);
void GDAPI godot_variant_new_string(godot_variant *r_dest, const godot_string *p_s);
-void GDAPI godot_variant_new_string_name(godot_variant *r_dest, const godot_string_name *p_s);
void GDAPI godot_variant_new_vector2(godot_variant *r_dest, const godot_vector2 *p_v2);
void GDAPI godot_variant_new_vector2i(godot_variant *r_dest, const godot_vector2i *p_v2);
void GDAPI godot_variant_new_rect2(godot_variant *r_dest, const godot_rect2 *p_rect2);
@@ -202,11 +213,12 @@ void GDAPI godot_variant_new_aabb(godot_variant *r_dest, const godot_aabb *p_aab
void GDAPI godot_variant_new_basis(godot_variant *r_dest, const godot_basis *p_basis);
void GDAPI godot_variant_new_transform(godot_variant *r_dest, const godot_transform *p_trans);
void GDAPI godot_variant_new_color(godot_variant *r_dest, const godot_color *p_color);
+void GDAPI godot_variant_new_string_name(godot_variant *r_dest, const godot_string_name *p_s);
void GDAPI godot_variant_new_node_path(godot_variant *r_dest, const godot_node_path *p_np);
void GDAPI godot_variant_new_rid(godot_variant *r_dest, const godot_rid *p_rid);
+void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p_obj);
void GDAPI godot_variant_new_callable(godot_variant *r_dest, const godot_callable *p_callable);
void GDAPI godot_variant_new_signal(godot_variant *r_dest, const godot_signal *p_signal);
-void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p_obj);
void GDAPI godot_variant_new_dictionary(godot_variant *r_dest, const godot_dictionary *p_dict);
void GDAPI godot_variant_new_array(godot_variant *r_dest, const godot_array *p_arr);
void GDAPI godot_variant_new_packed_byte_array(godot_variant *r_dest, const godot_packed_byte_array *p_pba);
@@ -220,11 +232,9 @@ void GDAPI godot_variant_new_packed_vector3_array(godot_variant *r_dest, const g
void GDAPI godot_variant_new_packed_color_array(godot_variant *r_dest, const godot_packed_color_array *p_pca);
godot_bool GDAPI godot_variant_as_bool(const godot_variant *p_self);
-uint64_t GDAPI godot_variant_as_uint(const godot_variant *p_self);
-int64_t GDAPI godot_variant_as_int(const godot_variant *p_self);
-double GDAPI godot_variant_as_real(const godot_variant *p_self);
+godot_int GDAPI godot_variant_as_int(const godot_variant *p_self);
+godot_float GDAPI godot_variant_as_float(const godot_variant *p_self);
godot_string GDAPI godot_variant_as_string(const godot_variant *p_self);
-godot_string_name GDAPI godot_variant_as_string_name(const godot_variant *p_self);
godot_vector2 GDAPI godot_variant_as_vector2(const godot_variant *p_self);
godot_vector2i GDAPI godot_variant_as_vector2i(const godot_variant *p_self);
godot_rect2 GDAPI godot_variant_as_rect2(const godot_variant *p_self);
@@ -238,11 +248,12 @@ godot_aabb GDAPI godot_variant_as_aabb(const godot_variant *p_self);
godot_basis GDAPI godot_variant_as_basis(const godot_variant *p_self);
godot_transform GDAPI godot_variant_as_transform(const godot_variant *p_self);
godot_color GDAPI godot_variant_as_color(const godot_variant *p_self);
+godot_string_name GDAPI godot_variant_as_string_name(const godot_variant *p_self);
godot_node_path GDAPI godot_variant_as_node_path(const godot_variant *p_self);
godot_rid GDAPI godot_variant_as_rid(const godot_variant *p_self);
+godot_object GDAPI *godot_variant_as_object(const godot_variant *p_self);
godot_callable GDAPI godot_variant_as_callable(const godot_variant *p_self);
godot_signal GDAPI godot_variant_as_signal(const godot_variant *p_self);
-godot_object GDAPI *godot_variant_as_object(const godot_variant *p_self);
godot_dictionary GDAPI godot_variant_as_dictionary(const godot_variant *p_self);
godot_array GDAPI godot_variant_as_array(const godot_variant *p_self);
godot_packed_byte_array GDAPI godot_variant_as_packed_byte_array(const godot_variant *p_self);
@@ -255,24 +266,153 @@ godot_packed_vector2_array GDAPI godot_variant_as_packed_vector2_array(const god
godot_packed_vector3_array GDAPI godot_variant_as_packed_vector3_array(const godot_variant *p_self);
godot_packed_color_array GDAPI godot_variant_as_packed_color_array(const godot_variant *p_self);
-godot_variant GDAPI godot_variant_call(godot_variant *p_self, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *r_error);
-
-godot_bool GDAPI godot_variant_has_method(const godot_variant *p_self, const godot_string *p_method);
-
-godot_bool GDAPI godot_variant_operator_equal(const godot_variant *p_self, const godot_variant *p_other);
-godot_bool GDAPI godot_variant_operator_less(const godot_variant *p_self, const godot_variant *p_other);
+void GDAPI godot_variant_destroy(godot_variant *p_self);
-uint32_t GDAPI godot_variant_hash(const godot_variant *p_self);
+// Dynamic interaction.
+
+void GDAPI godot_variant_call(godot_variant *p_self, const godot_string_name *p_method, const godot_variant **p_args, const godot_int p_argument_count, godot_variant *r_return, godot_variant_call_error *r_error);
+void GDAPI godot_variant_call_with_cstring(godot_variant *p_self, const char *p_method, const godot_variant **p_args, const godot_int p_argument_count, godot_variant *r_return, godot_variant_call_error *r_error);
+void GDAPI godot_variant_evaluate(godot_variant_operator p_op, const godot_variant *p_a, const godot_variant *p_b, godot_variant *r_return, bool *r_valid);
+void GDAPI godot_variant_set(godot_variant *p_self, const godot_variant *p_key, const godot_variant *p_value, bool *r_valid);
+void GDAPI godot_variant_set_named(godot_variant *p_self, const godot_string_name *p_name, const godot_variant *p_value, bool *r_valid);
+void GDAPI godot_variant_set_named_with_cstring(godot_variant *p_self, const char *p_name, const godot_variant *p_value, bool *r_valid);
+void GDAPI godot_variant_set_keyed(godot_variant *p_self, const godot_variant *p_key, const godot_variant *p_value, bool *r_valid);
+void GDAPI godot_variant_set_indexed(godot_variant *p_self, godot_int p_index, const godot_variant *p_value, bool *r_valid, bool *r_oob);
+godot_variant GDAPI godot_variant_get(const godot_variant *p_self, const godot_variant *p_key, bool *r_valid);
+godot_variant GDAPI godot_variant_get_named(const godot_variant *p_self, const godot_string_name *p_key, bool *r_valid);
+godot_variant GDAPI godot_variant_get_named_with_cstring(const godot_variant *p_self, const char *p_key, bool *r_valid);
+godot_variant GDAPI godot_variant_get_keyed(const godot_variant *p_self, const godot_variant *p_key, bool *r_valid);
+godot_variant GDAPI godot_variant_get_indexed(const godot_variant *p_self, godot_int p_index, bool *r_valid, bool *r_oob);
+/// Iteration.
+bool GDAPI godot_variant_iter_init(const godot_variant *p_self, godot_variant *r_iter, bool *r_valid);
+bool GDAPI godot_variant_iter_next(const godot_variant *p_self, godot_variant *r_iter, bool *r_valid);
+godot_variant GDAPI godot_variant_iter_get(const godot_variant *p_self, godot_variant *r_iter, bool *r_valid);
+
+/// Variant functions.
godot_bool GDAPI godot_variant_hash_compare(const godot_variant *p_self, const godot_variant *p_other);
-
godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_self);
-
-void GDAPI godot_variant_destroy(godot_variant *p_self);
-
-// GDNative core 1.1
-
-godot_string GDAPI godot_variant_get_operator_name(godot_variant_operator p_op);
-void GDAPI godot_variant_evaluate(godot_variant_operator p_op, const godot_variant *p_a, const godot_variant *p_b, godot_variant *r_ret, godot_bool *r_valid);
+void GDAPI godot_variant_blend(const godot_variant *p_a, const godot_variant *p_b, float p_c, godot_variant *r_dst);
+void GDAPI godot_variant_interpolate(const godot_variant *p_a, const godot_variant *p_b, float p_c, godot_variant *r_dst);
+godot_variant GDAPI godot_variant_duplicate(const godot_variant *p_self, godot_bool p_deep);
+godot_string GDAPI godot_variant_stringify(const godot_variant *p_self);
+
+// Discovery API.
+
+/// Operators.
+godot_validated_operator_evaluator GDAPI godot_variant_get_validated_operator_evaluator(godot_variant_operator p_operator, godot_variant_type p_type_a, godot_variant_type p_type_b);
+godot_ptr_operator_evaluator GDAPI godot_variant_get_ptr_operator_evaluator(godot_variant_operator p_operator, godot_variant_type p_type_a, godot_variant_type p_type_b);
+godot_variant_type GDAPI godot_variant_get_operator_return_type(godot_variant_operator p_operator, godot_variant_type p_type_a, godot_variant_type p_type_b);
+godot_string GDAPI godot_variant_get_operator_name(godot_variant_operator p_operator);
+
+/// Built-in methods.
+bool GDAPI godot_variant_has_builtin_method(godot_variant_type p_type, const godot_string_name *p_method);
+bool GDAPI godot_variant_has_builtin_method_with_cstring(godot_variant_type p_type, const char *p_method);
+godot_validated_builtin_method GDAPI godot_variant_get_validated_builtin_method(godot_variant_type p_type, const godot_string_name *p_method);
+godot_validated_builtin_method GDAPI godot_variant_get_validated_builtin_method_with_cstring(godot_variant_type p_type, const char *p_method);
+godot_ptr_builtin_method GDAPI godot_variant_get_ptr_builtin_method(godot_variant_type p_type, const godot_string_name *p_method);
+godot_ptr_builtin_method GDAPI godot_variant_get_ptr_builtin_method_with_cstring(godot_variant_type p_type, const char *p_method);
+int GDAPI godot_variant_get_builtin_method_argument_count(godot_variant_type p_type, const godot_string_name *p_method);
+int GDAPI godot_variant_get_builtin_method_argument_count_with_cstring(godot_variant_type p_type, const char *p_method);
+godot_variant_type GDAPI godot_variant_get_builtin_method_argument_type(godot_variant_type p_type, const godot_string_name *p_method, int p_argument);
+godot_variant_type GDAPI godot_variant_get_builtin_method_argument_type_with_cstring(godot_variant_type p_type, const char *p_method, int p_argument);
+godot_string GDAPI godot_variant_get_builtin_method_argument_name(godot_variant_type p_type, const godot_string_name *p_method, int p_argument);
+godot_string GDAPI godot_variant_get_builtin_method_argument_name_with_cstring(godot_variant_type p_type, const char *p_method, int p_argument);
+bool GDAPI godot_variant_has_builtin_method_return_value(godot_variant_type p_type, const godot_string_name *p_method);
+bool GDAPI godot_variant_has_builtin_method_return_value_with_cstring(godot_variant_type p_type, const char *p_method);
+godot_variant_type GDAPI godot_variant_get_builtin_method_return_type(godot_variant_type p_type, const godot_string_name *p_method);
+godot_variant_type GDAPI godot_variant_get_builtin_method_return_type_with_cstring(godot_variant_type p_type, const char *p_method);
+bool GDAPI godot_variant_is_builtin_method_const(godot_variant_type p_type, const godot_string_name *p_method);
+bool GDAPI godot_variant_is_builtin_method_const_with_cstring(godot_variant_type p_type, const char *p_method);
+bool GDAPI godot_variant_is_builtin_method_vararg(godot_variant_type p_type, const godot_string_name *p_method);
+bool GDAPI godot_variant_is_builtin_method_vararg_with_cstring(godot_variant_type p_type, const char *p_method);
+int GDAPI godot_variant_get_builtin_method_count(godot_variant_type p_type);
+void GDAPI godot_variant_get_builtin_method_list(godot_variant_type p_type, godot_string_name *r_list);
+
+/// Constructors.
+int GDAPI godot_variant_get_constructor_count(godot_variant_type p_type);
+godot_validated_constructor GDAPI godot_variant_get_validated_constructor(godot_variant_type p_type, int p_constructor);
+godot_ptr_constructor GDAPI godot_variant_get_ptr_constructor(godot_variant_type p_type, int p_constructor);
+int GDAPI godot_variant_get_constructor_argument_count(godot_variant_type p_type, int p_constructor);
+godot_variant_type GDAPI godot_variant_get_constructor_argument_type(godot_variant_type p_type, int p_constructor, int p_argument);
+godot_string GDAPI godot_variant_get_constructor_argument_name(godot_variant_type p_type, int p_constructor, int p_argument);
+void GDAPI godot_variant_construct(godot_variant_type p_type, godot_variant *p_base, const godot_variant **p_args, int p_argument_count, godot_variant_call_error *r_error);
+
+/// Properties.
+godot_variant_type GDAPI godot_variant_get_member_type(godot_variant_type p_type, const godot_string_name *p_member);
+godot_variant_type GDAPI godot_variant_get_member_type_with_cstring(godot_variant_type p_type, const char *p_member);
+int GDAPI godot_variant_get_member_count(godot_variant_type p_type);
+void GDAPI godot_variant_get_member_list(godot_variant_type p_type, godot_string_name *r_list);
+godot_validated_setter GDAPI godot_variant_get_validated_setter(godot_variant_type p_type, const godot_string_name *p_member);
+godot_validated_setter GDAPI godot_variant_get_validated_setter_with_cstring(godot_variant_type p_type, const char *p_member);
+godot_validated_getter GDAPI godot_variant_get_validated_getter(godot_variant_type p_type, const godot_string_name *p_member);
+godot_validated_getter GDAPI godot_variant_get_validated_getter_with_cstring(godot_variant_type p_type, const char *p_member);
+godot_ptr_setter GDAPI godot_variant_get_ptr_setter(godot_variant_type p_type, const godot_string_name *p_member);
+godot_ptr_setter GDAPI godot_variant_get_ptr_setter_with_cstring(godot_variant_type p_type, const char *p_member);
+godot_ptr_getter GDAPI godot_variant_get_ptr_getter(godot_variant_type p_type, const godot_string_name *p_member);
+godot_ptr_getter GDAPI godot_variant_get_ptr_getter_with_cstring(godot_variant_type p_type, const char *p_member);
+
+/// Indexing.
+bool GDAPI godot_variant_has_indexing(godot_variant_type p_type);
+godot_variant_type GDAPI godot_variant_get_indexed_element_type(godot_variant_type p_type);
+godot_validated_indexed_setter GDAPI godot_variant_get_validated_indexed_setter(godot_variant_type p_type);
+godot_validated_indexed_getter GDAPI godot_variant_get_validated_indexed_getter(godot_variant_type p_type);
+godot_ptr_indexed_setter GDAPI godot_variant_get_ptr_indexed_setter(godot_variant_type p_type);
+godot_ptr_indexed_getter GDAPI godot_variant_get_ptr_indexed_getter(godot_variant_type p_type);
+uint64_t GDAPI godot_variant_get_indexed_size(const godot_variant *p_self);
+
+/// Keying.
+bool GDAPI godot_variant_is_keyed(godot_variant_type p_type);
+godot_validated_keyed_setter GDAPI godot_variant_get_validated_keyed_setter(godot_variant_type p_type);
+godot_validated_keyed_getter GDAPI godot_variant_get_validated_keyed_getter(godot_variant_type p_type);
+godot_validated_keyed_checker GDAPI godot_variant_get_validated_keyed_checker(godot_variant_type p_type);
+godot_ptr_keyed_setter GDAPI godot_variant_get_ptr_keyed_setter(godot_variant_type p_type);
+godot_ptr_keyed_getter GDAPI godot_variant_get_ptr_keyed_getter(godot_variant_type p_type);
+godot_ptr_keyed_checker GDAPI godot_variant_get_ptr_keyed_checker(godot_variant_type p_type);
+
+/// Constants.
+int GDAPI godot_variant_get_constants_count(godot_variant_type p_type);
+void GDAPI godot_variant_get_constants_list(godot_variant_type p_type, godot_string_name *r_list);
+bool GDAPI godot_variant_has_constant(godot_variant_type p_type, const godot_string_name *p_constant);
+bool GDAPI godot_variant_has_constant_with_cstring(godot_variant_type p_type, const char *p_constant);
+godot_variant GDAPI godot_variant_get_constant_value(godot_variant_type p_type, const godot_string_name *p_constant);
+godot_variant GDAPI godot_variant_get_constant_value_with_cstring(godot_variant_type p_type, const char *p_constant);
+
+/// Utilities.
+bool GDAPI godot_variant_has_utility_function(const godot_string_name *p_function);
+bool GDAPI godot_variant_has_utility_function_with_cstring(const char *p_function);
+void GDAPI godot_variant_call_utility_function(const godot_string_name *p_function, godot_variant *r_ret, const godot_variant **p_args, int p_argument_count, godot_variant_call_error *r_error);
+void GDAPI godot_variant_call_utility_function_with_cstring(const char *p_function, godot_variant *r_ret, const godot_variant **p_args, int p_argument_count, godot_variant_call_error *r_error);
+godot_ptr_utility_function GDAPI godot_variant_get_ptr_utility_function(const godot_string_name *p_function);
+godot_ptr_utility_function GDAPI godot_variant_get_ptr_utility_function_with_cstring(const char *p_function);
+godot_validated_utility_function GDAPI godot_variant_get_validated_utility_function(const godot_string_name *p_function);
+godot_validated_utility_function GDAPI godot_variant_get_validated_utility_function_with_cstring(const char *p_function);
+godot_variant_utility_function_type GDAPI godot_variant_get_utility_function_type(const godot_string_name *p_function);
+godot_variant_utility_function_type GDAPI godot_variant_get_utility_function_type_with_cstring(const char *p_function);
+int GDAPI godot_variant_get_utility_function_argument_count(const godot_string_name *p_function);
+int GDAPI godot_variant_get_utility_function_argument_count_with_cstring(const char *p_function);
+godot_variant_type GDAPI godot_variant_get_utility_function_argument_type(const godot_string_name *p_function, int p_argument);
+godot_variant_type GDAPI godot_variant_get_utility_function_argument_type_with_cstring(const char *p_function, int p_argument);
+godot_string GDAPI godot_variant_get_utility_function_argument_name(const godot_string_name *p_function, int p_argument);
+godot_string GDAPI godot_variant_get_utility_function_argument_name_with_cstring(const char *p_function, int p_argument);
+bool GDAPI godot_variant_has_utility_function_return_value(const godot_string_name *p_function);
+bool GDAPI godot_variant_has_utility_function_return_value_with_cstring(const char *p_function);
+godot_variant_type GDAPI godot_variant_get_utility_function_return_type(const godot_string_name *p_function);
+godot_variant_type GDAPI godot_variant_get_utility_function_return_type_with_cstring(const char *p_function);
+bool GDAPI godot_variant_is_utility_function_vararg(const godot_string_name *p_function);
+bool GDAPI godot_variant_is_utility_function_vararg_with_cstring(const char *p_function);
+int GDAPI godot_variant_get_utility_function_count();
+void GDAPI godot_variant_get_utility_function_list(godot_string_name *r_functions);
+
+// Introspection.
+
+godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_self);
+bool GDAPI godot_variant_has_method(const godot_variant *p_self, const godot_string_name *p_method);
+bool GDAPI godot_variant_has_member(godot_variant_type p_type, const godot_string_name *p_member);
+bool GDAPI godot_variant_has_key(const godot_variant *p_self, const godot_variant *p_key, bool *r_valid);
+
+godot_string GDAPI godot_variant_get_type_name(godot_variant_type p_type);
+bool GDAPI godot_variant_can_convert(godot_variant_type p_from, godot_variant_type p_to);
+bool GDAPI godot_variant_can_convert_strict(godot_variant_type p_from, godot_variant_type p_to);
#ifdef __cplusplus
}
diff --git a/core/os/rw_lock.cpp b/modules/gdnative/include/gdnative/variant_struct.h
index 26db0aab30..321c76c206 100644
--- a/core/os/rw_lock.cpp
+++ b/modules/gdnative/include/gdnative/variant_struct.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* rw_lock.cpp */
+/* variant_struct.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,16 +28,26 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "rw_lock.h"
+#ifndef GODOT_VARIANT_STRUCT_H
+#define GODOT_VARIANT_STRUCT_H
-#include "core/error/error_macros.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
-#include <stddef.h>
+#include <gdnative/math_defs.h>
-RWLock *(*RWLock::create_func)() = nullptr;
+#define GODOT_VARIANT_SIZE (sizeof(godot_real_t) * 4 + sizeof(int64_t))
-RWLock *RWLock::create() {
- ERR_FAIL_COND_V(!create_func, nullptr);
+#ifndef GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
+typedef struct {
+ uint8_t _dont_touch_that[GODOT_VARIANT_SIZE];
+} godot_variant;
+#endif
- return create_func();
+#ifdef __cplusplus
}
+#endif
+
+#endif
diff --git a/modules/gdnative/include/gdnative/vector2.h b/modules/gdnative/include/gdnative/vector2.h
index eb146a9232..5ebb705ba4 100644
--- a/modules/gdnative/include/gdnative/vector2.h
+++ b/modules/gdnative/include/gdnative/vector2.h
@@ -35,9 +35,9 @@
extern "C" {
#endif
-#include <stdint.h>
+#include <gdnative/math_defs.h>
-#define GODOT_VECTOR2_SIZE 8
+#define GODOT_VECTOR2_SIZE (sizeof(godot_real_t) * 2)
#ifndef GODOT_CORE_API_GODOT_VECTOR2_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_VECTOR2_TYPE_DEFINED
@@ -46,7 +46,7 @@ typedef struct {
} godot_vector2;
#endif
-#define GODOT_VECTOR2I_SIZE 8
+#define GODOT_VECTOR2I_SIZE (sizeof(int32_t) * 2)
#ifndef GODOT_CORE_API_GODOT_VECTOR2I_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_VECTOR2I_TYPE_DEFINED
@@ -55,140 +55,14 @@ typedef struct {
} godot_vector2i;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
#include <gdnative/gdnative.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Vector2
-
-void GDAPI godot_vector2_new(godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y);
-
-godot_string GDAPI godot_vector2_as_string(const godot_vector2 *p_self);
-
-godot_vector2i GDAPI godot_vector2_as_vector2i(const godot_vector2 *p_self);
-
-godot_vector2 GDAPI godot_vector2_normalized(const godot_vector2 *p_self);
-
-godot_real GDAPI godot_vector2_length(const godot_vector2 *p_self);
-
-godot_real GDAPI godot_vector2_angle(const godot_vector2 *p_self);
-
-godot_real GDAPI godot_vector2_length_squared(const godot_vector2 *p_self);
-
-godot_bool GDAPI godot_vector2_is_normalized(const godot_vector2 *p_self);
-
-godot_vector2 GDAPI godot_vector2_direction_to(const godot_vector2 *p_self, const godot_vector2 *p_b);
-
-godot_real GDAPI godot_vector2_distance_to(const godot_vector2 *p_self, const godot_vector2 *p_to);
-
-godot_real GDAPI godot_vector2_distance_squared_to(const godot_vector2 *p_self, const godot_vector2 *p_to);
-
-godot_real GDAPI godot_vector2_angle_to(const godot_vector2 *p_self, const godot_vector2 *p_to);
-
-godot_real GDAPI godot_vector2_angle_to_point(const godot_vector2 *p_self, const godot_vector2 *p_to);
-
-godot_vector2 GDAPI godot_vector2_lerp(const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_real p_t);
-
-godot_vector2 GDAPI godot_vector2_cubic_interpolate(const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_vector2 *p_pre_a, const godot_vector2 *p_post_b, const godot_real p_t);
-
-godot_vector2 GDAPI godot_vector2_move_toward(const godot_vector2 *p_self, const godot_vector2 *p_to, const godot_real p_delta);
-
-godot_vector2 GDAPI godot_vector2_rotated(const godot_vector2 *p_self, const godot_real p_phi);
-
-godot_vector2 GDAPI godot_vector2_orthogonal(const godot_vector2 *p_self);
-
-godot_vector2 GDAPI godot_vector2_floor(const godot_vector2 *p_self);
-
-godot_vector2 GDAPI godot_vector2_sign(const godot_vector2 *p_self);
-
-godot_vector2 GDAPI godot_vector2_snapped(const godot_vector2 *p_self, const godot_vector2 *p_by);
-
-godot_real GDAPI godot_vector2_aspect(const godot_vector2 *p_self);
-
-godot_real GDAPI godot_vector2_dot(const godot_vector2 *p_self, const godot_vector2 *p_with);
-
-godot_vector2 GDAPI godot_vector2_slide(const godot_vector2 *p_self, const godot_vector2 *p_n);
-
-godot_vector2 GDAPI godot_vector2_bounce(const godot_vector2 *p_self, const godot_vector2 *p_n);
-
-godot_vector2 GDAPI godot_vector2_reflect(const godot_vector2 *p_self, const godot_vector2 *p_n);
-
-godot_vector2 GDAPI godot_vector2_abs(const godot_vector2 *p_self);
-
-godot_vector2 GDAPI godot_vector2_clamped(const godot_vector2 *p_self, const godot_real p_length);
-
-godot_vector2 GDAPI godot_vector2_operator_add(const godot_vector2 *p_self, const godot_vector2 *p_b);
-
-godot_vector2 GDAPI godot_vector2_operator_subtract(const godot_vector2 *p_self, const godot_vector2 *p_b);
-
-godot_vector2 GDAPI godot_vector2_operator_multiply_vector(const godot_vector2 *p_self, const godot_vector2 *p_b);
-
-godot_vector2 GDAPI godot_vector2_operator_multiply_scalar(const godot_vector2 *p_self, const godot_real p_b);
-
-godot_vector2 GDAPI godot_vector2_operator_divide_vector(const godot_vector2 *p_self, const godot_vector2 *p_b);
-
-godot_vector2 GDAPI godot_vector2_operator_divide_scalar(const godot_vector2 *p_self, const godot_real p_b);
-
-godot_bool GDAPI godot_vector2_operator_equal(const godot_vector2 *p_self, const godot_vector2 *p_b);
-
-godot_bool GDAPI godot_vector2_operator_less(const godot_vector2 *p_self, const godot_vector2 *p_b);
-
-godot_vector2 GDAPI godot_vector2_operator_neg(const godot_vector2 *p_self);
-
-void GDAPI godot_vector2_set_x(godot_vector2 *p_self, const godot_real p_x);
-
-void GDAPI godot_vector2_set_y(godot_vector2 *p_self, const godot_real p_y);
-
-godot_real GDAPI godot_vector2_get_x(const godot_vector2 *p_self);
-
-godot_real GDAPI godot_vector2_get_y(const godot_vector2 *p_self);
-
-// Vector2i
-
-void GDAPI godot_vector2i_new(godot_vector2i *r_dest, const godot_int p_x, const godot_int p_y);
-
-godot_string GDAPI godot_vector2i_as_string(const godot_vector2i *p_self);
-
-godot_vector2 GDAPI godot_vector2i_as_vector2(const godot_vector2i *p_self);
-
-godot_real GDAPI godot_vector2i_aspect(const godot_vector2i *p_self);
-
-godot_vector2i GDAPI godot_vector2i_abs(const godot_vector2i *p_self);
-
-godot_vector2i GDAPI godot_vector2i_sign(const godot_vector2i *p_self);
-
-godot_vector2i GDAPI godot_vector2i_operator_add(const godot_vector2i *p_self, const godot_vector2i *p_b);
-
-godot_vector2i GDAPI godot_vector2i_operator_subtract(const godot_vector2i *p_self, const godot_vector2i *p_b);
-
-godot_vector2i GDAPI godot_vector2i_operator_multiply_vector(const godot_vector2i *p_self, const godot_vector2i *p_b);
-
-godot_vector2i GDAPI godot_vector2i_operator_multiply_scalar(const godot_vector2i *p_self, const godot_int p_b);
-
-godot_vector2i GDAPI godot_vector2i_operator_divide_vector(const godot_vector2i *p_self, const godot_vector2i *p_b);
-
-godot_vector2i GDAPI godot_vector2i_operator_divide_scalar(const godot_vector2i *p_self, const godot_int p_b);
-
-godot_bool GDAPI godot_vector2i_operator_equal(const godot_vector2i *p_self, const godot_vector2i *p_b);
-
-godot_bool GDAPI godot_vector2i_operator_less(const godot_vector2i *p_self, const godot_vector2i *p_b);
-
-godot_vector2i GDAPI godot_vector2i_operator_neg(const godot_vector2i *p_self);
-
-void GDAPI godot_vector2i_set_x(godot_vector2i *p_self, const godot_int p_x);
-
-void GDAPI godot_vector2i_set_y(godot_vector2i *p_self, const godot_int p_y);
-
-godot_int GDAPI godot_vector2i_get_x(const godot_vector2i *p_self);
-
-godot_int GDAPI godot_vector2i_get_y(const godot_vector2i *p_self);
+void GDAPI godot_vector2_new(godot_vector2 *p_self);
+void GDAPI godot_vector2i_new(godot_vector2i *p_self);
+godot_real_t GDAPI *godot_vector2_operator_index(godot_vector2 *p_self, godot_int p_index);
+const godot_real_t GDAPI *godot_vector2_operator_index_const(const godot_vector2 *p_self, godot_int p_index);
+int32_t GDAPI *godot_vector2i_operator_index(godot_vector2i *p_self, godot_int p_index);
+const int32_t GDAPI *godot_vector2i_operator_index_const(const godot_vector2i *p_self, godot_int p_index);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/gdnative/vector3.h b/modules/gdnative/include/gdnative/vector3.h
index e0205c2fc7..d37ebd3cc9 100644
--- a/modules/gdnative/include/gdnative/vector3.h
+++ b/modules/gdnative/include/gdnative/vector3.h
@@ -35,9 +35,9 @@
extern "C" {
#endif
-#include <stdint.h>
+#include <gdnative/math_defs.h>
-#define GODOT_VECTOR3_SIZE 12
+#define GODOT_VECTOR3_SIZE (sizeof(godot_real_t) * 3)
#ifndef GODOT_CORE_API_GODOT_VECTOR3_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_VECTOR3_TYPE_DEFINED
@@ -46,7 +46,7 @@ typedef struct {
} godot_vector3;
#endif
-#define GODOT_VECTOR3I_SIZE 12
+#define GODOT_VECTOR3I_SIZE (sizeof(int32_t) * 3)
#ifndef GODOT_CORE_API_GODOT_VECTOR3I_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_VECTOR3I_TYPE_DEFINED
@@ -55,145 +55,14 @@ typedef struct {
} godot_vector3i;
#endif
-// reduce extern "C" nesting for VS2013
-#ifdef __cplusplus
-}
-#endif
-
-#include <gdnative/basis.h>
#include <gdnative/gdnative.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- GODOT_VECTOR3_AXIS_X,
- GODOT_VECTOR3_AXIS_Y,
- GODOT_VECTOR3_AXIS_Z,
-} godot_vector3_axis;
-
-// Vector3
-
-void GDAPI godot_vector3_new(godot_vector3 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z);
-
-godot_string GDAPI godot_vector3_as_string(const godot_vector3 *p_self);
-
-godot_vector3i GDAPI godot_vector3_as_vector3i(const godot_vector3 *p_self);
-
-godot_int GDAPI godot_vector3_min_axis(const godot_vector3 *p_self);
-
-godot_int GDAPI godot_vector3_max_axis(const godot_vector3 *p_self);
-
-godot_real GDAPI godot_vector3_length(const godot_vector3 *p_self);
-
-godot_real GDAPI godot_vector3_length_squared(const godot_vector3 *p_self);
-
-godot_bool GDAPI godot_vector3_is_normalized(const godot_vector3 *p_self);
-
-godot_vector3 GDAPI godot_vector3_normalized(const godot_vector3 *p_self);
-
-godot_vector3 GDAPI godot_vector3_inverse(const godot_vector3 *p_self);
-
-godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_vector3 *p_by);
-
-godot_vector3 GDAPI godot_vector3_rotated(const godot_vector3 *p_self, const godot_vector3 *p_axis, const godot_real p_phi);
-
-godot_vector3 GDAPI godot_vector3_lerp(const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_real p_t);
-
-godot_vector3 GDAPI godot_vector3_cubic_interpolate(const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_vector3 *p_pre_a, const godot_vector3 *p_post_b, const godot_real p_t);
-
-godot_vector3 GDAPI godot_vector3_move_toward(const godot_vector3 *p_self, const godot_vector3 *p_to, const godot_real p_delta);
-
-godot_real GDAPI godot_vector3_dot(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_vector3 GDAPI godot_vector3_cross(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_basis GDAPI godot_vector3_outer(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_basis GDAPI godot_vector3_to_diagonal_matrix(const godot_vector3 *p_self);
-
-godot_vector3 GDAPI godot_vector3_abs(const godot_vector3 *p_self);
-
-godot_vector3 GDAPI godot_vector3_sign(const godot_vector3 *p_self);
-
-godot_vector3 GDAPI godot_vector3_floor(const godot_vector3 *p_self);
-
-godot_vector3 GDAPI godot_vector3_ceil(const godot_vector3 *p_self);
-
-godot_vector3 GDAPI godot_vector3_direction_to(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_real GDAPI godot_vector3_distance_to(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_real GDAPI godot_vector3_distance_squared_to(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_real GDAPI godot_vector3_angle_to(const godot_vector3 *p_self, const godot_vector3 *p_to);
-
-godot_vector3 GDAPI godot_vector3_slide(const godot_vector3 *p_self, const godot_vector3 *p_n);
-
-godot_vector3 GDAPI godot_vector3_bounce(const godot_vector3 *p_self, const godot_vector3 *p_n);
-
-godot_vector3 GDAPI godot_vector3_reflect(const godot_vector3 *p_self, const godot_vector3 *p_n);
-
-godot_vector3 GDAPI godot_vector3_operator_add(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_vector3 GDAPI godot_vector3_operator_subtract(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_vector3 GDAPI godot_vector3_operator_multiply_vector(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_vector3 GDAPI godot_vector3_operator_multiply_scalar(const godot_vector3 *p_self, const godot_real p_b);
-
-godot_vector3 GDAPI godot_vector3_operator_divide_vector(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_vector3 GDAPI godot_vector3_operator_divide_scalar(const godot_vector3 *p_self, const godot_real p_b);
-
-godot_bool GDAPI godot_vector3_operator_equal(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_bool GDAPI godot_vector3_operator_less(const godot_vector3 *p_self, const godot_vector3 *p_b);
-
-godot_vector3 GDAPI godot_vector3_operator_neg(const godot_vector3 *p_self);
-
-void GDAPI godot_vector3_set_axis(godot_vector3 *p_self, const godot_vector3_axis p_axis, const godot_real p_val);
-
-godot_real GDAPI godot_vector3_get_axis(const godot_vector3 *p_self, const godot_vector3_axis p_axis);
-
-// Vector3i
-
-void GDAPI godot_vector3i_new(godot_vector3i *r_dest, const godot_int p_x, const godot_int p_y, const godot_int p_z);
-
-godot_string GDAPI godot_vector3i_as_string(const godot_vector3i *p_self);
-
-godot_vector3 GDAPI godot_vector3i_as_vector3(const godot_vector3i *p_self);
-
-godot_int GDAPI godot_vector3i_min_axis(const godot_vector3i *p_self);
-
-godot_int GDAPI godot_vector3i_max_axis(const godot_vector3i *p_self);
-
-godot_vector3i GDAPI godot_vector3i_abs(const godot_vector3i *p_self);
-
-godot_vector3i GDAPI godot_vector3i_sign(const godot_vector3i *p_self);
-
-godot_vector3i GDAPI godot_vector3i_operator_add(const godot_vector3i *p_self, const godot_vector3i *p_b);
-
-godot_vector3i GDAPI godot_vector3i_operator_subtract(const godot_vector3i *p_self, const godot_vector3i *p_b);
-
-godot_vector3i GDAPI godot_vector3i_operator_multiply_vector(const godot_vector3i *p_self, const godot_vector3i *p_b);
-
-godot_vector3i GDAPI godot_vector3i_operator_multiply_scalar(const godot_vector3i *p_self, const godot_int p_b);
-
-godot_vector3i GDAPI godot_vector3i_operator_divide_vector(const godot_vector3i *p_self, const godot_vector3i *p_b);
-
-godot_vector3i GDAPI godot_vector3i_operator_divide_scalar(const godot_vector3i *p_self, const godot_int p_b);
-
-godot_bool GDAPI godot_vector3i_operator_equal(const godot_vector3i *p_self, const godot_vector3i *p_b);
-
-godot_bool GDAPI godot_vector3i_operator_less(const godot_vector3i *p_self, const godot_vector3i *p_b);
-
-godot_vector3i GDAPI godot_vector3i_operator_neg(const godot_vector3i *p_self);
-
-void GDAPI godot_vector3i_set_axis(godot_vector3i *p_self, const godot_vector3_axis p_axis, const godot_int p_val);
-
-godot_int GDAPI godot_vector3i_get_axis(const godot_vector3i *p_self, const godot_vector3_axis p_axis);
+void GDAPI godot_vector3_new(godot_vector3 *p_self);
+void GDAPI godot_vector3i_new(godot_vector3i *p_self);
+godot_real_t GDAPI *godot_vector3_operator_index(godot_vector3 *p_self, godot_int p_index);
+const godot_real_t GDAPI *godot_vector3_operator_index_const(const godot_vector3 *p_self, godot_int p_index);
+int32_t GDAPI *godot_vector3i_operator_index(godot_vector3i *p_self, godot_int p_index);
+const int32_t GDAPI *godot_vector3i_operator_index_const(const godot_vector3i *p_self, godot_int p_index);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/include/text/godot_text.h b/modules/gdnative/include/text/godot_text.h
index 9de47edf87..ef60633a3d 100644
--- a/modules/gdnative/include/text/godot_text.h
+++ b/modules/gdnative/include/text/godot_text.h
@@ -79,6 +79,10 @@ typedef struct {
float (*font_get_descent)(void *, godot_rid *, int);
float (*font_get_underline_position)(void *, godot_rid *, int);
float (*font_get_underline_thickness)(void *, godot_rid *, int);
+ int (*font_get_spacing_space)(void *, godot_rid *);
+ void (*font_set_spacing_space)(void *, godot_rid *, int);
+ int (*font_get_spacing_glyph)(void *, godot_rid *);
+ void (*font_set_spacing_glyph)(void *, godot_rid *, int);
void (*font_set_antialiased)(void *, godot_rid *, bool);
bool (*font_get_antialiased)(void *, godot_rid *);
godot_dictionary (*font_get_feature_list)(void *, godot_rid *);
@@ -175,8 +179,8 @@ void GDAPI godot_glyph_set_flags(godot_glyph *p_self, godot_int p_flags);
godot_vector2 GDAPI godot_glyph_get_offset(const godot_glyph *p_self);
void GDAPI godot_glyph_set_offset(godot_glyph *p_self, const godot_vector2 *p_offset);
-godot_real GDAPI godot_glyph_get_advance(const godot_glyph *p_self);
-void GDAPI godot_glyph_set_advance(godot_glyph *p_self, godot_real p_advance);
+godot_float GDAPI godot_glyph_get_advance(const godot_glyph *p_self);
+void GDAPI godot_glyph_set_advance(godot_glyph *p_self, godot_float p_advance);
godot_rid GDAPI godot_glyph_get_font(const godot_glyph *p_self);
void GDAPI godot_glyph_set_font(godot_glyph *p_self, godot_rid *p_font);
diff --git a/modules/gdnative/include/videodecoder/godot_videodecoder.h b/modules/gdnative/include/videodecoder/godot_videodecoder.h
index e5a2657997..dc2cf5ec07 100644
--- a/modules/gdnative/include/videodecoder/godot_videodecoder.h
+++ b/modules/gdnative/include/videodecoder/godot_videodecoder.h
@@ -49,11 +49,11 @@ typedef struct
const char *(*get_plugin_name)();
const char **(*get_supported_extensions)(int *count);
godot_bool (*open_file)(void *, void *); // data struct, and a FileAccess pointer
- godot_real (*get_length)(const void *);
- godot_real (*get_playback_position)(const void *);
- void (*seek)(void *, godot_real);
+ godot_float (*get_length)(const void *);
+ godot_float (*get_playback_position)(const void *);
+ void (*seek)(void *, godot_float);
void (*set_audio_track)(void *, godot_int);
- void (*update)(void *, godot_real);
+ void (*update)(void *, godot_float);
godot_packed_byte_array *(*get_videoframe)(void *);
godot_int (*get_audioframe)(void *, float *, int);
godot_int (*get_channels)(const void *);
diff --git a/modules/gdnative/include/xr/godot_xr.h b/modules/gdnative/include/xr/godot_xr.h
index 235242bc84..7eaf1c7ec3 100644
--- a/modules/gdnative/include/xr/godot_xr.h
+++ b/modules/gdnative/include/xr/godot_xr.h
@@ -58,7 +58,7 @@ typedef struct {
void (*uninitialize)(void *);
godot_vector2 (*get_render_targetsize)(const void *);
godot_transform (*get_transform_for_eye)(void *, godot_int, godot_transform *);
- void (*fill_projection_for_eye)(void *, godot_real *, godot_int, godot_real, godot_real, godot_real);
+ void (*fill_projection_for_eye)(void *, godot_float *, godot_int, godot_float, godot_float, godot_float);
void (*commit_for_eye)(void *, godot_int, godot_rid *, godot_rect2 *);
void (*process)(void *);
godot_int (*get_external_texture_for_eye)(void *, godot_int);
@@ -69,7 +69,7 @@ typedef struct {
void GDAPI godot_xr_register_interface(const godot_xr_interface_gdnative *p_interface);
// helper functions to access XRServer data
-godot_real GDAPI godot_xr_get_worldscale();
+godot_float GDAPI godot_xr_get_worldscale();
godot_transform GDAPI godot_xr_get_reference_frame();
// helper functions for rendering
@@ -81,8 +81,8 @@ godot_int GDAPI godot_xr_add_controller(char *p_device_name, godot_int p_hand, g
void GDAPI godot_xr_remove_controller(godot_int p_controller_id);
void GDAPI godot_xr_set_controller_transform(godot_int p_controller_id, godot_transform *p_transform, godot_bool p_tracks_orientation, godot_bool p_tracks_position);
void GDAPI godot_xr_set_controller_button(godot_int p_controller_id, godot_int p_button, godot_bool p_is_pressed);
-void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_axis, godot_real p_value, godot_bool p_can_be_negative);
-godot_real GDAPI godot_xr_get_controller_rumble(godot_int p_controller_id);
+void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_axis, godot_float p_value, godot_bool p_can_be_negative);
+godot_float GDAPI godot_xr_get_controller_rumble(godot_int p_controller_id);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp
index 6b46c9418a..3e75478cd8 100644
--- a/modules/gdnative/nativescript/api_generator.cpp
+++ b/modules/gdnative/nativescript/api_generator.cpp
@@ -36,6 +36,7 @@
#include "core/core_constants.h"
#include "core/object/class_db.h"
#include "core/os/file_access.h"
+#include "core/string/string_builder.h"
#include "core/templates/pair.h"
// helper stuff
@@ -65,14 +66,14 @@ struct MethodAPI {
Map<int, Variant> default_arguments;
- int argument_count;
- bool has_varargs;
- bool is_editor;
- bool is_noscript;
- bool is_const;
- bool is_reverse;
- bool is_virtual;
- bool is_from_script;
+ int argument_count = 0;
+ bool has_varargs = false;
+ bool is_editor = false;
+ bool is_noscript = false;
+ bool is_const = false;
+ bool is_reverse = false;
+ bool is_virtual = false;
+ bool is_from_script = false;
};
struct PropertyAPI {
@@ -80,12 +81,14 @@ struct PropertyAPI {
String getter;
String setter;
String type;
- int index;
+ int index = 0;
};
struct ConstantAPI {
String constant_name;
- int constant_value;
+ int constant_value = 0;
+ Variant builtin_constant_value; // For builtin types;
+ String builtin_constant_type; // For builtin types;
};
struct SignalAPI {
@@ -100,23 +103,35 @@ struct EnumAPI {
List<Pair<int, String>> values;
};
+struct OperatorAPI { // For builtin types;
+ String name;
+ int oper = Variant::OP_MAX;
+ String other_type;
+ String return_type;
+};
+
struct ClassAPI {
String class_name;
String super_class_name;
- ClassDB::APIType api_type;
+ ClassDB::APIType api_type = ClassDB::API_NONE;
- bool is_singleton;
+ bool is_singleton = false;
String singleton_name;
- bool is_instanciable;
+ bool is_instantiable = false;
// @Unclear
- bool is_reference;
+ bool is_reference = false;
+ bool has_indexing = false; // For builtin types.
+ String indexed_type; // For builtin types.
+ bool is_keyed = false; // For builtin types.
List<MethodAPI> methods;
+ List<MethodAPI> constructors; // For builtin types.
List<PropertyAPI> properties;
List<ConstantAPI> constants;
List<SignalAPI> signals_;
List<EnumAPI> enums;
+ List<OperatorAPI> operators; // For builtin types.
};
static String get_type_name(const PropertyInfo &info) {
@@ -127,7 +142,7 @@ static String get_type_name(const PropertyInfo &info) {
return info.class_name;
}
if (info.hint == PROPERTY_HINT_RESOURCE_TYPE) {
- return info.hint_string;
+ return info.class_name;
}
if (info.type == Variant::NIL && (info.usage & PROPERTY_USAGE_NIL_IS_VARIANT)) {
return "Variant";
@@ -180,13 +195,34 @@ List<ClassAPI> generate_c_api_classes() {
global_constants_api.api_type = ClassDB::API_CORE;
global_constants_api.is_singleton = true;
global_constants_api.singleton_name = "CoreConstants";
- global_constants_api.is_instanciable = false;
+ global_constants_api.is_instantiable = false;
const int constants_count = CoreConstants::get_global_constant_count();
+
+ Map<StringName, EnumAPI> enum_api_map;
for (int i = 0; i < constants_count; ++i) {
- ConstantAPI constant_api;
- constant_api.constant_name = CoreConstants::get_global_constant_name(i);
- constant_api.constant_value = CoreConstants::get_global_constant_value(i);
- global_constants_api.constants.push_back(constant_api);
+ StringName enum_name = CoreConstants::get_global_constant_enum(i);
+ String name = String(CoreConstants::get_global_constant_name(i));
+ int value = CoreConstants::get_global_constant_value(i);
+
+ if (enum_name == StringName()) {
+ ConstantAPI constant_api;
+ constant_api.constant_name = name;
+ constant_api.constant_value = value;
+ global_constants_api.constants.push_back(constant_api);
+ } else {
+ EnumAPI enum_api;
+ if (enum_api_map.has(enum_name)) {
+ enum_api = enum_api_map[enum_name];
+ } else {
+ enum_api.name = String(enum_name);
+ }
+ enum_api.values.push_back(Pair(value, name));
+
+ enum_api_map[enum_name] = enum_api;
+ }
+ }
+ for (const Map<StringName, EnumAPI>::Element *E = enum_api_map.front(); E; E = E->next()) {
+ global_constants_api.enums.push_back(E->get());
}
global_constants_api.constants.sort_custom<ConstantAPIComparator>();
api.push_back(global_constants_api);
@@ -195,6 +231,10 @@ List<ClassAPI> generate_c_api_classes() {
for (List<StringName>::Element *e = classes.front(); e != nullptr; e = e->next()) {
StringName class_name = e->get();
+ if (!ClassDB::is_class_exposed(class_name)) {
+ continue;
+ }
+
ClassAPI class_api;
class_api.api_type = ClassDB::get_api_type(e->get());
class_api.class_name = class_name;
@@ -209,7 +249,7 @@ List<ClassAPI> generate_c_api_classes() {
class_api.singleton_name = name;
}
}
- class_api.is_instanciable = !class_api.is_singleton && ClassDB::can_instance(class_name);
+ class_api.is_instantiable = !class_api.is_singleton && ClassDB::can_instance(class_name);
{
List<StringName> inheriters;
@@ -290,7 +330,9 @@ List<ClassAPI> generate_c_api_classes() {
property_api.type = p->get().name.get_slice(":", 1);
property_api.name = p->get().name.get_slice(":", 0);
} else {
- property_api.type = get_type_name(p->get());
+ MethodInfo minfo;
+ ClassDB::get_method_info(class_name, property_api.getter, &minfo, true, false);
+ property_api.type = get_type_name(minfo.return_val);
}
property_api.index = ClassDB::get_property_index(class_name, p->get().name);
@@ -352,7 +394,7 @@ List<ClassAPI> generate_c_api_classes() {
arg_type = arg_info.name.get_slice(":", 1);
arg_name = arg_info.name.get_slice(":", 0);
} else if (arg_info.hint == PROPERTY_HINT_RESOURCE_TYPE) {
- arg_type = arg_info.hint_string;
+ arg_type = arg_info.class_name;
} else if (arg_info.type == Variant::NIL) {
arg_type = "Variant";
} else if (arg_info.type == Variant::OBJECT) {
@@ -402,6 +444,192 @@ List<ClassAPI> generate_c_api_classes() {
}
/*
+ * Reads the builtin Variant API to a list
+ */
+List<ClassAPI> generate_c_builtin_api_types() {
+ List<ClassAPI> api;
+
+ // Special class for the utility methods.
+ {
+ ClassAPI utility_api;
+ utility_api.class_name = "Utilities";
+ utility_api.is_instantiable = false;
+
+ List<StringName> utility_functions;
+ Variant::get_utility_function_list(&utility_functions);
+ for (const List<StringName>::Element *E = utility_functions.front(); E; E = E->next()) {
+ const StringName &function_name = E->get();
+
+ MethodAPI function_api;
+ function_api.method_name = function_name;
+ function_api.has_varargs = Variant::is_utility_function_vararg(function_name);
+ function_api.argument_count = function_api.has_varargs ? 0 : Variant::get_utility_function_argument_count(function_name);
+ function_api.is_const = Variant::get_utility_function_type(function_name) == Variant::UTILITY_FUNC_TYPE_MATH;
+
+ for (int i = 0; i < function_api.argument_count; i++) {
+ function_api.argument_names.push_back(Variant::get_utility_function_argument_name(function_name, i));
+ Variant::Type arg_type = Variant::get_utility_function_argument_type(function_name, i);
+ function_api.argument_types.push_back(arg_type == Variant::NIL ? "Variant" : Variant::get_type_name(arg_type));
+ }
+
+ if (Variant::has_utility_function_return_value(function_name)) {
+ Variant::Type ret_type = Variant::get_utility_function_return_type(function_name);
+ function_api.return_type = ret_type == Variant::NIL ? "Variant" : Variant::get_type_name(ret_type);
+ } else {
+ function_api.return_type = "void";
+ }
+
+ utility_api.methods.push_back(function_api);
+ }
+
+ api.push_back(utility_api);
+ }
+
+ for (int t = 0; t < Variant::VARIANT_MAX; t++) {
+ Variant::Type type = (Variant::Type)t;
+
+ ClassAPI class_api;
+ class_api.class_name = Variant::get_type_name(type);
+ class_api.is_instantiable = true;
+ class_api.has_indexing = Variant::has_indexing(type);
+ class_api.indexed_type = Variant::get_type_name(Variant::get_indexed_element_type(type));
+ class_api.is_keyed = Variant::is_keyed(type);
+ // Types that are passed by reference.
+ switch (type) {
+ case Variant::OBJECT:
+ case Variant::DICTIONARY:
+ case Variant::ARRAY:
+ case Variant::PACKED_BYTE_ARRAY:
+ case Variant::PACKED_INT32_ARRAY:
+ case Variant::PACKED_INT64_ARRAY:
+ case Variant::PACKED_FLOAT32_ARRAY:
+ case Variant::PACKED_FLOAT64_ARRAY:
+ case Variant::PACKED_STRING_ARRAY:
+ case Variant::PACKED_VECTOR2_ARRAY:
+ case Variant::PACKED_VECTOR3_ARRAY:
+ case Variant::PACKED_COLOR_ARRAY:
+ class_api.is_reference = true;
+ break;
+ default:
+ class_api.is_reference = false;
+ break;
+ }
+
+ // Methods.
+
+ List<StringName> methods;
+ Variant::get_builtin_method_list(type, &methods);
+ for (const List<StringName>::Element *E = methods.front(); E; E = E->next()) {
+ const StringName &method_name = E->get();
+
+ MethodAPI method_api;
+
+ method_api.method_name = method_name;
+ method_api.argument_count = Variant::get_builtin_method_argument_count(type, method_name);
+ method_api.has_varargs = Variant::is_builtin_method_vararg(type, method_name);
+ method_api.is_const = Variant::is_builtin_method_const(type, method_name);
+
+ for (int i = 0; i < method_api.argument_count; i++) {
+ method_api.argument_names.push_back(Variant::get_builtin_method_argument_name(type, method_name, i));
+ Variant::Type arg_type = Variant::get_builtin_method_argument_type(type, method_name, i);
+ method_api.argument_types.push_back(arg_type == Variant::NIL ? "Variant" : Variant::get_type_name(arg_type));
+ }
+
+ Vector<Variant> default_arguments = Variant::get_builtin_method_default_arguments(type, method_name);
+
+ int default_start = method_api.argument_names.size() - default_arguments.size();
+
+ for (int i = 0; i < default_arguments.size(); i++) {
+ method_api.default_arguments[default_start + i] = default_arguments[i];
+ }
+
+ if (Variant::has_builtin_method_return_value(type, method_name)) {
+ Variant::Type ret_type = Variant::get_builtin_method_return_type(type, method_name);
+ method_api.return_type = ret_type == Variant::NIL ? "Variant" : Variant::get_type_name(ret_type);
+ } else {
+ method_api.return_type = "void";
+ }
+
+ class_api.methods.push_back(method_api);
+ }
+
+ // Constructors.
+
+ for (int c = 0; c < Variant::get_constructor_count(type); c++) {
+ MethodAPI constructor_api;
+
+ constructor_api.method_name = Variant::get_type_name(type);
+ constructor_api.argument_count = Variant::get_constructor_argument_count(type, c);
+ constructor_api.return_type = Variant::get_type_name(type);
+
+ for (int i = 0; i < constructor_api.argument_count; i++) {
+ constructor_api.argument_names.push_back(Variant::get_constructor_argument_name(type, c, i));
+ Variant::Type arg_type = Variant::get_constructor_argument_type(type, c, i);
+ constructor_api.argument_types.push_back(arg_type == Variant::NIL ? "Variant" : Variant::get_type_name(arg_type));
+ }
+
+ class_api.constructors.push_back(constructor_api);
+ }
+
+ // Constants.
+
+ List<StringName> constants;
+ Variant::get_constants_for_type(type, &constants);
+ for (const List<StringName>::Element *E = constants.front(); E; E = E->next()) {
+ const StringName &constant_name = E->get();
+ ConstantAPI constant_api;
+
+ constant_api.constant_name = constant_name;
+ constant_api.builtin_constant_value = Variant::get_constant_value(type, constant_name);
+ constant_api.builtin_constant_type = Variant::get_type_name(constant_api.builtin_constant_value.get_type());
+
+ class_api.constants.push_back(constant_api);
+ }
+
+ // Members.
+
+ List<StringName> members;
+ Variant::get_member_list(type, &members);
+ for (const List<StringName>::Element *E = members.front(); E; E = E->next()) {
+ const StringName &member_name = E->get();
+
+ PropertyAPI member_api;
+ member_api.name = member_name;
+ Variant::Type member_type = Variant::get_member_type(type, member_name);
+ member_api.type = member_type == Variant::NIL ? "Variant" : Variant::get_type_name(member_type);
+
+ class_api.properties.push_back(member_api);
+ }
+
+ // Operators.
+
+ for (int op = 0; op < Variant::OP_MAX; op++) {
+ Variant::Operator oper = (Variant::Operator)op;
+
+ for (int ot = 0; ot < Variant::VARIANT_MAX; ot++) {
+ Variant::Type other_type = (Variant::Type)ot;
+
+ if (!Variant::get_validated_operator_evaluator(oper, type, other_type)) {
+ continue;
+ }
+
+ OperatorAPI oper_api;
+ oper_api.name = Variant::get_operator_name(oper);
+ oper_api.oper = oper;
+ oper_api.other_type = Variant::get_type_name(other_type);
+ oper_api.return_type = Variant::get_type_name(Variant::get_operator_return_type(oper, type, other_type));
+
+ class_api.operators.push_back(oper_api);
+ }
+ }
+
+ api.push_back(class_api);
+ }
+
+ return api;
+}
+
+/*
* Generates the JSON source from the API in p_api
*/
static List<String> generate_c_api_json(const List<ClassAPI> &p_api) {
@@ -421,9 +649,8 @@ static List<String> generate_c_api_json(const List<ClassAPI> &p_api) {
source.push_back(String("\t\t\"api_type\": \"") + (api.api_type == ClassDB::API_CORE ? "core" : (api.api_type == ClassDB::API_EDITOR ? "tools" : "none")) + "\",\n");
source.push_back(String("\t\t\"singleton\": ") + (api.is_singleton ? "true" : "false") + ",\n");
source.push_back("\t\t\"singleton_name\": \"" + api.singleton_name + "\",\n");
- source.push_back(String("\t\t\"instanciable\": ") + (api.is_instanciable ? "true" : "false") + ",\n");
+ source.push_back(String("\t\t\"instantiable\": ") + (api.is_instantiable ? "true" : "false") + ",\n");
source.push_back(String("\t\t\"is_reference\": ") + (api.is_reference ? "true" : "false") + ",\n");
- // @Unclear
source.push_back("\t\t\"constants\": {\n");
for (List<ConstantAPI>::Element *e = api.constants.front(); e; e = e->next()) {
@@ -508,6 +735,165 @@ static List<String> generate_c_api_json(const List<ClassAPI> &p_api) {
return source;
}
+static int indent_level = 0;
+
+static void append_indented(StringBuilder &p_source, const String &p_text) {
+ for (int i = 0; i < indent_level; i++) {
+ p_source.append("\t");
+ }
+ p_source.append(p_text);
+ p_source.append("\n");
+}
+
+static void append_indented(StringBuilder &p_source, const char *p_text) {
+ for (int i = 0; i < indent_level; i++) {
+ p_source.append("\t");
+ }
+ p_source.append(p_text);
+ p_source.append("\n");
+}
+
+static void write_builtin_method(StringBuilder &p_source, const MethodAPI &p_method) {
+ append_indented(p_source, vformat(R"("name": "%s",)", p_method.method_name));
+ append_indented(p_source, vformat(R"("return_type": "%s",)", p_method.return_type));
+ append_indented(p_source, vformat(R"("is_const": %s,)", p_method.is_const ? "true" : "false"));
+ append_indented(p_source, vformat(R"("has_varargs": %s,)", p_method.has_varargs ? "true" : "false"));
+
+ append_indented(p_source, R"("arguments": [)");
+ indent_level++;
+ for (int i = 0; i < p_method.argument_count; i++) {
+ append_indented(p_source, "{");
+ indent_level++;
+
+ append_indented(p_source, vformat(R"("name": "%s",)", p_method.argument_names[i]));
+ append_indented(p_source, vformat(R"("type": "%s",)", p_method.argument_types[i]));
+ append_indented(p_source, vformat(R"("has_default_value": %s,)", p_method.default_arguments.has(i) ? "true" : "false"));
+ append_indented(p_source, vformat(R"("default_value": "%s")", p_method.default_arguments.has(i) ? p_method.default_arguments[i].operator String() : ""));
+
+ indent_level--;
+ append_indented(p_source, i < p_method.argument_count - 1 ? "}," : "}");
+ }
+ indent_level--;
+ append_indented(p_source, "]");
+}
+
+static List<String> generate_c_builtin_api_json(const List<ClassAPI> &p_api) {
+ StringBuilder source;
+
+ source.append("[\n");
+
+ indent_level = 1;
+
+ for (const List<ClassAPI>::Element *C = p_api.front(); C; C = C->next()) {
+ const ClassAPI &class_api = C->get();
+ append_indented(source, "{");
+ indent_level++;
+
+ append_indented(source, vformat(R"("name": "%s",)", class_api.class_name));
+ append_indented(source, vformat(R"("is_instantiable": %s,)", class_api.is_instantiable ? "true" : "false"));
+ append_indented(source, vformat(R"("is_reference": %s,)", class_api.is_reference ? "true" : "false"));
+ append_indented(source, vformat(R"("has_indexing": %s,)", class_api.has_indexing ? "true" : "false"));
+ append_indented(source, vformat(R"("indexed_type": "%s",)", class_api.has_indexing && class_api.indexed_type == "Nil" ? "Variant" : class_api.indexed_type));
+ append_indented(source, vformat(R"("is_keyed": %s,)", class_api.is_keyed ? "true" : "false"));
+
+ // Constructors.
+ append_indented(source, R"("constructors": [)");
+ indent_level++;
+ for (const List<MethodAPI>::Element *E = class_api.constructors.front(); E; E = E->next()) {
+ const MethodAPI &constructor = E->get();
+ append_indented(source, "{");
+ indent_level++;
+
+ write_builtin_method(source, constructor);
+
+ indent_level--;
+ append_indented(source, E->next() ? "}," : "}");
+ }
+ indent_level--;
+ append_indented(source, "],");
+
+ // Constants.
+ append_indented(source, R"("constants": [)");
+ indent_level++;
+ for (const List<ConstantAPI>::Element *E = class_api.constants.front(); E; E = E->next()) {
+ const ConstantAPI &constant = E->get();
+ append_indented(source, "{");
+ indent_level++;
+
+ append_indented(source, vformat(R"("name": "%s",)", constant.constant_name));
+ append_indented(source, vformat(R"("type": "%s",)", constant.builtin_constant_type));
+ append_indented(source, vformat(R"("value": "%s")", constant.builtin_constant_value.operator String()));
+
+ indent_level--;
+ append_indented(source, E->next() ? "}," : "}");
+ }
+ indent_level--;
+ append_indented(source, "],");
+
+ // Methods.
+ append_indented(source, R"("methods": [)");
+ indent_level++;
+ for (const List<MethodAPI>::Element *E = class_api.methods.front(); E; E = E->next()) {
+ const MethodAPI &method = E->get();
+ append_indented(source, "{");
+ indent_level++;
+
+ write_builtin_method(source, method);
+
+ indent_level--;
+ append_indented(source, E->next() ? "}," : "}");
+ }
+ indent_level--;
+ append_indented(source, "],");
+
+ // Members.
+ append_indented(source, R"("members": [)");
+ indent_level++;
+ for (const List<PropertyAPI>::Element *E = class_api.properties.front(); E; E = E->next()) {
+ const PropertyAPI &member = E->get();
+ append_indented(source, "{");
+ indent_level++;
+
+ append_indented(source, vformat(R"("name": "%s",)", member.name));
+ append_indented(source, vformat(R"("type": "%s")", member.type));
+
+ indent_level--;
+ append_indented(source, E->next() ? "}," : "}");
+ }
+ indent_level--;
+ append_indented(source, "],");
+
+ // Operators.
+ append_indented(source, R"("operators": [)");
+ indent_level++;
+ for (const List<OperatorAPI>::Element *E = class_api.operators.front(); E; E = E->next()) {
+ const OperatorAPI &oper = E->get();
+ append_indented(source, "{");
+ indent_level++;
+
+ append_indented(source, vformat(R"("name": "%s",)", oper.name));
+ append_indented(source, vformat(R"("operator": %d,)", oper.oper));
+ append_indented(source, vformat(R"("other_type": "%s",)", oper.other_type));
+ append_indented(source, vformat(R"("return_type": "%s")", oper.return_type));
+
+ indent_level--;
+ append_indented(source, E->next() ? "}," : "}");
+ }
+ indent_level--;
+ append_indented(source, "]");
+
+ indent_level--;
+ append_indented(source, C->next() ? "}," : "}");
+ }
+
+ indent_level--;
+ source.append("]\n");
+
+ List<String> result;
+ result.push_back(source.as_string());
+ return result;
+}
+
#endif
/*
@@ -526,3 +912,19 @@ Error generate_c_api(const String &p_path) {
return save_file(p_path, json_source);
#endif
}
+/*
+ * Saves the builtin Godot API to a JSON file located at
+ * p_path
+ */
+Error generate_c_builtin_api(const String &p_path) {
+#ifndef TOOLS_ENABLED
+ return ERR_BUG;
+#else
+
+ List<ClassAPI> api = generate_c_builtin_api_types();
+
+ List<String> json_source = generate_c_builtin_api_json(api);
+
+ return save_file(p_path, json_source);
+#endif
+}
diff --git a/modules/gdnative/nativescript/api_generator.h b/modules/gdnative/nativescript/api_generator.h
index a324ded4a9..611abb2a2d 100644
--- a/modules/gdnative/nativescript/api_generator.h
+++ b/modules/gdnative/nativescript/api_generator.h
@@ -35,5 +35,6 @@
#include "core/typedefs.h"
Error generate_c_api(const String &p_path);
+Error generate_c_builtin_api(const String &p_path);
#endif // API_GENERATOR_H
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index e08961564d..1bdbb0b03b 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -1196,13 +1196,6 @@ void NativeScriptLanguage::_unload_stuff(bool p_reload) {
NativeScriptLanguage::NativeScriptLanguage() {
NativeScriptLanguage::singleton = this;
-#ifndef NO_THREADS
- has_objects_to_register = false;
-#endif
-
-#ifdef DEBUG_ENABLED
- profiling = false;
-#endif
_init_call_type = "nativescript_init";
_init_call_name = "nativescript_init";
@@ -1257,6 +1250,15 @@ void NativeScriptLanguage::init() {
}
exit(0);
}
+
+ E = args.find("--gdnative-generate-json-builtin-api");
+
+ if (E && E->next()) {
+ if (generate_c_builtin_api(E->next()->get()) != OK) {
+ ERR_PRINT("Failed to generate C builtin API\n");
+ }
+ exit(0);
+ }
#endif
#ifdef TOOLS_ENABLED
@@ -1668,7 +1670,7 @@ void NativeScriptLanguage::defer_init_library(Ref<GDNativeLibrary> lib, NativeSc
MutexLock lock(mutex);
libs_to_init.insert(lib);
scripts_to_register.insert(script);
- has_objects_to_register = true;
+ has_objects_to_register.set();
}
#endif
@@ -1724,6 +1726,12 @@ void NativeScriptLanguage::unregister_script(NativeScript *script) {
S->get().erase(script);
if (S->get().size() == 0) {
library_script_users.erase(S);
+
+ Map<String, Ref<GDNative>>::Element *G = library_gdnatives.find(script->lib_path);
+ if (G && G->get()->get_library()->is_reloadable()) {
+ G->get()->terminate();
+ library_gdnatives.erase(G);
+ }
}
}
#ifndef NO_THREADS
@@ -1751,7 +1759,7 @@ void NativeScriptLanguage::call_libraries_cb(const StringName &name) {
void NativeScriptLanguage::frame() {
#ifndef NO_THREADS
- if (has_objects_to_register) {
+ if (has_objects_to_register.is_set()) {
MutexLock lock(mutex);
for (Set<Ref<GDNativeLibrary>>::Element *L = libs_to_init.front(); L; L = L->next()) {
init_library(L->get());
@@ -1761,7 +1769,7 @@ void NativeScriptLanguage::frame() {
register_script(S->get());
}
scripts_to_register.clear();
- has_objects_to_register = false;
+ has_objects_to_register.clear();
}
#endif
@@ -1932,7 +1940,7 @@ void NativeReloadNode::_notification(int p_what) {
#endif
}
-RES ResourceFormatLoaderNativeScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderNativeScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_no_cache) {
return ResourceFormatLoaderText::singleton->load(p_path, p_original_path, r_error);
}
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index 9d72bf39d1..d6ba2bbec1 100644
--- a/modules/gdnative/nativescript/nativescript.h
+++ b/modules/gdnative/nativescript/nativescript.h
@@ -40,6 +40,7 @@
#include "core/os/thread_safe.h"
#include "core/templates/oa_hash_map.h"
#include "core/templates/ordered_hash_map.h"
+#include "core/templates/safe_refcount.h"
#include "core/templates/self_list.h"
#include "scene/main/node.h"
@@ -51,8 +52,8 @@ struct NativeScriptDesc {
struct Method {
godot_nativescript_instance_method method;
MethodInfo info;
- int rpc_mode;
- uint16_t rpc_method_id;
+ int rpc_mode = 0;
+ uint16_t rpc_method_id = 0;
String documentation;
};
@@ -61,7 +62,7 @@ struct NativeScriptDesc {
godot_nativescript_property_get_func getter;
PropertyInfo info;
Variant default_value;
- int rset_mode;
+ int rset_mode = 0;
uint16_t rset_property_id;
String documentation;
};
@@ -78,7 +79,7 @@ struct NativeScriptDesc {
Map<StringName, Signal> signals_; // QtCreator doesn't like the name signals
StringName base;
StringName base_native_type;
- NativeScriptDesc *base_data;
+ NativeScriptDesc *base_data = nullptr;
godot_nativescript_instance_create_func create_func;
godot_nativescript_instance_destroy_func destroy_func;
@@ -86,7 +87,7 @@ struct NativeScriptDesc {
const void *type_tag = nullptr;
- bool is_tool;
+ bool is_tool = false;
inline NativeScriptDesc() {
zeromem(&create_func, sizeof(godot_nativescript_instance_create_func));
@@ -254,7 +255,7 @@ class NativeScriptLanguage : public ScriptLanguage {
private:
static NativeScriptLanguage *singleton;
- int lang_idx;
+ int lang_idx = 0;
void _unload_stuff(bool p_reload = false);
@@ -262,7 +263,7 @@ private:
#ifndef NO_THREADS
Set<Ref<GDNativeLibrary>> libs_to_init;
Set<NativeScript *> scripts_to_register;
- volatile bool has_objects_to_register; // so that we don't lock mutex every frame - it's rarely needed
+ SafeFlag has_objects_to_register; // so that we don't lock mutex every frame - it's rarely needed
void defer_init_library(Ref<GDNativeLibrary> lib, NativeScript *script);
#endif
@@ -279,19 +280,19 @@ private:
struct ProfileData {
StringName signature;
- uint64_t call_count;
- uint64_t self_time;
- uint64_t total_time;
- uint64_t frame_call_count;
- uint64_t frame_self_time;
- uint64_t frame_total_time;
- uint64_t last_frame_call_count;
- uint64_t last_frame_self_time;
- uint64_t last_frame_total_time;
+ uint64_t call_count = 0;
+ uint64_t self_time = 0;
+ uint64_t total_time = 0;
+ uint64_t frame_call_count = 0;
+ uint64_t frame_self_time = 0;
+ uint64_t frame_total_time = 0;
+ uint64_t last_frame_call_count = 0;
+ uint64_t last_frame_self_time = 0;
+ uint64_t last_frame_total_time = 0;
};
Map<StringName, ProfileData> profile_data;
- bool profiling;
+ bool profiling = false;
public:
// These two maps must only be touched on the main thread
@@ -402,7 +403,7 @@ public:
class ResourceFormatLoaderNativeScript : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.h b/modules/gdnative/pluginscript/pluginscript_instance.h
index 865080fddf..536eb550e0 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.h
+++ b/modules/gdnative/pluginscript/pluginscript_instance.h
@@ -44,10 +44,10 @@ class PluginScriptInstance : public ScriptInstance {
private:
Ref<PluginScript> _script;
- Object *_owner;
+ Object *_owner = nullptr;
Variant _owner_variant;
- godot_pluginscript_instance_data *_data;
- const godot_pluginscript_instance_desc *_desc;
+ godot_pluginscript_instance_data *_data = nullptr;
+ const godot_pluginscript_instance_desc *_desc = nullptr;
public:
_FORCE_INLINE_ Object *get_owner() { return _owner; }
diff --git a/modules/gdnative/pluginscript/pluginscript_loader.cpp b/modules/gdnative/pluginscript/pluginscript_loader.cpp
index cd1879a13e..f2165cd225 100644
--- a/modules/gdnative/pluginscript/pluginscript_loader.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_loader.cpp
@@ -39,7 +39,7 @@ ResourceFormatLoaderPluginScript::ResourceFormatLoaderPluginScript(PluginScriptL
_language = language;
}
-RES ResourceFormatLoaderPluginScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderPluginScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_FILE_CANT_OPEN;
}
diff --git a/modules/gdnative/pluginscript/pluginscript_loader.h b/modules/gdnative/pluginscript/pluginscript_loader.h
index 7b1a7f5423..e5d665c186 100644
--- a/modules/gdnative/pluginscript/pluginscript_loader.h
+++ b/modules/gdnative/pluginscript/pluginscript_loader.h
@@ -43,7 +43,7 @@ class ResourceFormatLoaderPluginScript : public ResourceFormatLoader {
public:
ResourceFormatLoaderPluginScript(PluginScriptLanguage *language);
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/modules/gdnative/tests/test_string.h b/modules/gdnative/tests/test_string.h
deleted file mode 100644
index 3e2ba7451b..0000000000
--- a/modules/gdnative/tests/test_string.h
+++ /dev/null
@@ -1,1979 +0,0 @@
-/*************************************************************************/
-/* test_string.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 TEST_GDNATIVE_STRING_H
-#define TEST_GDNATIVE_STRING_H
-
-namespace TestGDNativeString {
-
-#include "gdnative/string.h"
-
-#include "tests/test_macros.h"
-
-int u32scmp(const char32_t *l, const char32_t *r) {
- for (; *l == *r && *l && *r; l++, r++)
- ;
- return *l - *r;
-}
-
-TEST_CASE("[GDNative String] Construct from Latin-1 char string") {
- godot_string s;
-
- godot_string_new_with_latin1_chars(&s, "Hello");
- CHECK(u32scmp(godot_string_get_data(&s), U"Hello") == 0);
- godot_string_destroy(&s);
-
- godot_string_new_with_latin1_chars_and_len(&s, "Hello", 3);
- CHECK(u32scmp(godot_string_get_data(&s), U"Hel") == 0);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Construct from wchar_t string") {
- godot_string s;
-
- godot_string_new_with_wide_chars(&s, L"Give me");
- CHECK(u32scmp(godot_string_get_data(&s), U"Give me") == 0);
- godot_string_destroy(&s);
-
- godot_string_new_with_wide_chars_and_len(&s, L"Give me", 3);
- CHECK(u32scmp(godot_string_get_data(&s), U"Giv") == 0);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Construct from UTF-8 char string") {
- static const char32_t u32str[] = { 0x0045, 0x0020, 0x304A, 0x360F, 0x3088, 0x3046, 0x1F3A4, 0 };
- static const char32_t u32str_short[] = { 0x0045, 0x0020, 0x304A, 0 };
- static const uint8_t u8str[] = { 0x45, 0x20, 0xE3, 0x81, 0x8A, 0xE3, 0x98, 0x8F, 0xE3, 0x82, 0x88, 0xE3, 0x81, 0x86, 0xF0, 0x9F, 0x8E, 0xA4, 0 };
-
- godot_string s;
-
- godot_string_new_with_utf8_chars(&s, (const char *)u8str);
- CHECK(u32scmp(godot_string_get_data(&s), u32str) == 0);
- godot_string_destroy(&s);
-
- godot_string_new_with_utf8_chars_and_len(&s, (const char *)u8str, 5);
- CHECK(u32scmp(godot_string_get_data(&s), u32str_short) == 0);
- godot_string_destroy(&s);
-
- godot_string_new_with_utf32_chars(&s, u32str);
- godot_char_string cs = godot_string_utf8(&s);
- godot_string_parse_utf8(&s, godot_char_string_get_data(&cs));
- CHECK(u32scmp(godot_string_get_data(&s), u32str) == 0);
- godot_string_destroy(&s);
- godot_char_string_destroy(&cs);
-
- godot_string_new_with_utf32_chars(&s, u32str);
- cs = godot_string_utf8(&s);
- godot_string_parse_utf8_with_len(&s, godot_char_string_get_data(&cs), godot_char_string_length(&cs));
- CHECK(u32scmp(godot_string_get_data(&s), u32str) == 0);
- godot_string_destroy(&s);
- godot_char_string_destroy(&cs);
-}
-
-TEST_CASE("[GDNative String] Construct from UTF-8 string with BOM") {
- static const char32_t u32str[] = { 0x0045, 0x0020, 0x304A, 0x360F, 0x3088, 0x3046, 0x1F3A4, 0 };
- static const char32_t u32str_short[] = { 0x0045, 0x0020, 0x304A, 0 };
- static const uint8_t u8str[] = { 0xEF, 0xBB, 0xBF, 0x45, 0x20, 0xE3, 0x81, 0x8A, 0xE3, 0x98, 0x8F, 0xE3, 0x82, 0x88, 0xE3, 0x81, 0x86, 0xF0, 0x9F, 0x8E, 0xA4, 0 };
-
- godot_string s;
-
- godot_string_new_with_utf8_chars(&s, (const char *)u8str);
- CHECK(u32scmp(godot_string_get_data(&s), u32str) == 0);
- godot_string_destroy(&s);
-
- godot_string_new_with_utf8_chars_and_len(&s, (const char *)u8str, 8);
- CHECK(u32scmp(godot_string_get_data(&s), u32str_short) == 0);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Construct from UTF-16 string") {
- static const char32_t u32str[] = { 0x0045, 0x0020, 0x1F3A4, 0x360F, 0x3088, 0x3046, 0x1F3A4, 0 };
- static const char32_t u32str_short[] = { 0x0045, 0x0020, 0x1F3A4, 0 };
- static const char16_t u16str[] = { 0x0045, 0x0020, 0xD83C, 0xDFA4, 0x360F, 0x3088, 0x3046, 0xD83C, 0xDFA4, 0 };
-
- godot_string s;
-
- godot_string_new_with_utf16_chars(&s, u16str);
- CHECK(u32scmp(godot_string_get_data(&s), u32str) == 0);
- godot_string_destroy(&s);
-
- godot_string_new_with_utf16_chars_and_len(&s, u16str, 4);
- CHECK(u32scmp(godot_string_get_data(&s), u32str_short) == 0);
- godot_string_destroy(&s);
-
- godot_string_new_with_utf32_chars(&s, u32str);
- godot_char16_string cs = godot_string_utf16(&s);
- godot_string_parse_utf16(&s, godot_char16_string_get_data(&cs));
- CHECK(u32scmp(godot_string_get_data(&s), u32str) == 0);
- godot_string_destroy(&s);
- godot_char16_string_destroy(&cs);
-
- godot_string_new_with_utf32_chars(&s, u32str);
- cs = godot_string_utf16(&s);
- godot_string_parse_utf16_with_len(&s, godot_char16_string_get_data(&cs), godot_char16_string_length(&cs));
- CHECK(u32scmp(godot_string_get_data(&s), u32str) == 0);
- godot_string_destroy(&s);
- godot_char16_string_destroy(&cs);
-}
-
-TEST_CASE("[GDNative String] Construct from UTF-16 string with BOM ") {
- static const char32_t u32str[] = { 0x0045, 0x0020, 0x1F3A4, 0x360F, 0x3088, 0x3046, 0x1F3A4, 0 };
- static const char32_t u32str_short[] = { 0x0045, 0x0020, 0x1F3A4, 0 };
- static const char16_t u16str[] = { 0xFEFF, 0x0045, 0x0020, 0xD83C, 0xDFA4, 0x360F, 0x3088, 0x3046, 0xD83C, 0xDFA4, 0 };
- static const char16_t u16str_swap[] = { 0xFFFE, 0x4500, 0x2000, 0x3CD8, 0xA4DF, 0x0F36, 0x8830, 0x4630, 0x3CD8, 0xA4DF, 0 };
-
- godot_string s;
-
- godot_string_new_with_utf16_chars(&s, u16str);
- CHECK(u32scmp(godot_string_get_data(&s), u32str) == 0);
- godot_string_destroy(&s);
-
- godot_string_new_with_utf16_chars(&s, u16str_swap);
- CHECK(u32scmp(godot_string_get_data(&s), u32str) == 0);
- godot_string_destroy(&s);
-
- godot_string_new_with_utf16_chars_and_len(&s, u16str, 5);
- CHECK(u32scmp(godot_string_get_data(&s), u32str_short) == 0);
- godot_string_destroy(&s);
-
- godot_string_new_with_utf16_chars_and_len(&s, u16str_swap, 5);
- CHECK(u32scmp(godot_string_get_data(&s), u32str_short) == 0);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Construct string copy") {
- godot_string s, t;
-
- godot_string_new_with_latin1_chars(&s, "Hello");
- godot_string_new_copy(&t, &s);
- CHECK(u32scmp(godot_string_get_data(&t), U"Hello") == 0);
- godot_string_destroy(&t);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Construct empty string") {
- godot_string s;
-
- godot_string_new(&s);
- CHECK(u32scmp(godot_string_get_data(&s), U"") == 0);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] ASCII/Latin-1") {
- godot_string s;
- godot_string_new_with_utf32_chars(&s, U"Primero Leche");
-
- godot_char_string cs = godot_string_ascii(&s);
- CHECK(strcmp(godot_char_string_get_data(&cs), "Primero Leche") == 0);
- godot_char_string_destroy(&cs);
-
- cs = godot_string_latin1(&s);
- CHECK(strcmp(godot_char_string_get_data(&cs), "Primero Leche") == 0);
- godot_char_string_destroy(&cs);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Comparisons (equal)") {
- godot_string s, t;
-
- godot_string_new_with_latin1_chars(&s, "Test Compare");
- godot_string_new_with_latin1_chars(&t, "Test Compare");
- CHECK(godot_string_operator_equal(&s, &t));
- godot_string_destroy(&s);
- godot_string_destroy(&t);
-}
-
-TEST_CASE("[GDNative String] Comparisons (operator <)") {
- godot_string s, t;
-
- godot_string_new_with_latin1_chars(&s, "Bees");
-
- godot_string_new_with_latin1_chars(&t, "Elephant");
- CHECK(godot_string_operator_less(&s, &t));
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "Amber");
- CHECK(!godot_string_operator_less(&s, &t));
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "Beatrix");
- CHECK(!godot_string_operator_less(&s, &t));
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Concatenation (operator +)") {
- godot_string s, t, x;
-
- godot_string_new_with_latin1_chars(&s, "Hel");
- godot_string_new_with_latin1_chars(&t, "lo");
- x = godot_string_operator_plus(&s, &t);
- CHECK(u32scmp(godot_string_get_data(&x), U"Hello") == 0);
- godot_string_destroy(&x);
- godot_string_destroy(&s);
- godot_string_destroy(&t);
-}
-
-TEST_CASE("[GDNative String] Testing size and length of string") {
- godot_string s;
-
- godot_string_new_with_latin1_chars(&s, "Mellon");
- CHECK(godot_string_length(&s) == 6);
- godot_string_destroy(&s);
-
- godot_string_new_with_latin1_chars(&s, "Mellon1");
- CHECK(godot_string_length(&s) == 7);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Testing for empty string") {
- godot_string s;
-
- godot_string_new_with_latin1_chars(&s, "Mellon");
- CHECK(!godot_string_is_empty(&s));
- godot_string_destroy(&s);
-
- godot_string_new_with_latin1_chars(&s, "");
- CHECK(godot_string_is_empty(&s));
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Test chr") {
- godot_string s;
-
- s = godot_string_chr('H');
- CHECK(u32scmp(godot_string_get_data(&s), U"H") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_chr(0x3012);
- CHECK(godot_string_operator_index_const(&s, 0) == 0x3012);
- godot_string_destroy(&s);
-
- ERR_PRINT_OFF
- s = godot_string_chr(0xd812);
- CHECK(godot_string_operator_index_const(&s, 0) == 0xfffd); // Unpaired UTF-16 surrogate
- godot_string_destroy(&s);
-
- s = godot_string_chr(0x20d812);
- CHECK(godot_string_operator_index_const(&s, 0) == 0xfffd); // Outside UTF-32 range
- godot_string_destroy(&s);
- ERR_PRINT_ON
-}
-
-TEST_CASE("[GDNative String] Operator []") {
- godot_string s;
-
- godot_string_new_with_latin1_chars(&s, "Hello");
- CHECK(*godot_string_operator_index(&s, 1) == 'e');
- CHECK(godot_string_operator_index_const(&s, 0) == 'H');
- CHECK(godot_string_ord_at(&s, 0) == 'H');
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Case function test") {
- godot_string s, t;
-
- godot_string_new_with_latin1_chars(&s, "MoMoNgA");
-
- t = godot_string_to_upper(&s);
- CHECK(u32scmp(godot_string_get_data(&t), U"MOMONGA") == 0);
- godot_string_destroy(&t);
-
- t = godot_string_to_lower(&s);
- CHECK(u32scmp(godot_string_get_data(&t), U"momonga") == 0);
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Case compare function test") {
- godot_string s, t;
-
- godot_string_new_with_latin1_chars(&s, "MoMoNgA");
- godot_string_new_with_latin1_chars(&t, "momonga");
-
- CHECK(godot_string_casecmp_to(&s, &t) != 0);
- CHECK(godot_string_nocasecmp_to(&s, &t) == 0);
-
- godot_string_destroy(&s);
- godot_string_destroy(&t);
-}
-
-TEST_CASE("[GDNative String] Natural compare function test") {
- godot_string s, t;
-
- godot_string_new_with_latin1_chars(&s, "img2.png");
- godot_string_new_with_latin1_chars(&t, "img10.png");
-
- CHECK(godot_string_nocasecmp_to(&s, &t) > 0);
- CHECK(godot_string_naturalnocasecmp_to(&s, &t) < 0);
-
- godot_string_destroy(&s);
- godot_string_destroy(&t);
-}
-
-TEST_CASE("[GDNative String] hex_encode_buffer") {
- static const uint8_t u8str[] = { 0x45, 0xE3, 0x81, 0x8A, 0x8F, 0xE3 };
- godot_string s = godot_string_hex_encode_buffer(u8str, 6);
- CHECK(u32scmp(godot_string_get_data(&s), U"45e3818a8fe3") == 0);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Substr") {
- godot_string s, t;
- godot_string_new_with_latin1_chars(&s, "Killer Baby");
- t = godot_string_substr(&s, 3, 4);
- CHECK(u32scmp(godot_string_get_data(&t), U"ler ") == 0);
- godot_string_destroy(&t);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Find") {
- godot_string s, t;
- godot_string_new_with_latin1_chars(&s, "Pretty Woman Woman");
-
- godot_string_new_with_latin1_chars(&t, "Revenge of the Monster Truck");
- CHECK(godot_string_find(&s, &t) == -1);
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "tty");
- CHECK(godot_string_find(&s, &t) == 3);
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "Wo");
- CHECK(godot_string_find_from(&s, &t, 9) == 13);
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "man");
- CHECK(godot_string_rfind(&s, &t) == 15);
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Find no case") {
- godot_string s, t;
- godot_string_new_with_latin1_chars(&s, "Pretty Whale Whale");
-
- godot_string_new_with_latin1_chars(&t, "WHA");
- CHECK(godot_string_findn(&s, &t) == 7);
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "WHA");
- CHECK(godot_string_findn_from(&s, &t, 9) == 13);
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "WHA");
- CHECK(godot_string_rfindn(&s, &t) == 13);
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "Revenge of the Monster SawFish");
- CHECK(godot_string_findn(&s, &t) == -1);
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Find MK") {
- godot_packed_string_array keys;
- godot_packed_string_array_new(&keys);
-
-#define PUSH_KEY(x) \
- { \
- godot_string t; \
- godot_string_new_with_latin1_chars(&t, x); \
- godot_packed_string_array_push_back(&keys, &t); \
- godot_string_destroy(&t); \
- }
-
- PUSH_KEY("sty")
- PUSH_KEY("tty")
- PUSH_KEY("man")
-
- godot_string s;
- godot_string_new_with_latin1_chars(&s, "Pretty Woman");
- godot_int key = 0;
-
- CHECK(godot_string_findmk(&s, &keys) == 3);
- CHECK(godot_string_findmk_from_in_place(&s, &keys, 0, &key) == 3);
- CHECK(key == 1);
-
- CHECK(godot_string_findmk_from(&s, &keys, 5) == 9);
- CHECK(godot_string_findmk_from_in_place(&s, &keys, 5, &key) == 9);
- CHECK(key == 2);
-
- godot_string_destroy(&s);
- godot_packed_string_array_destroy(&keys);
-
-#undef PUSH_KEY
-}
-
-TEST_CASE("[GDNative String] Find and replace") {
- godot_string s, c, w;
- godot_string_new_with_latin1_chars(&s, "Happy Birthday, Anna!");
- godot_string_new_with_latin1_chars(&c, "Birthday");
- godot_string_new_with_latin1_chars(&w, "Halloween");
- godot_string t = godot_string_replace(&s, &c, &w);
- CHECK(u32scmp(godot_string_get_data(&t), U"Happy Halloween, Anna!") == 0);
- godot_string_destroy(&s);
- godot_string_destroy(&c);
- godot_string_destroy(&w);
-
- godot_string_new_with_latin1_chars(&c, "H");
- godot_string_new_with_latin1_chars(&w, "W");
- s = godot_string_replace_first(&t, &c, &w);
- godot_string_destroy(&t);
- godot_string_destroy(&c);
- godot_string_destroy(&w);
-
- CHECK(u32scmp(godot_string_get_data(&s), U"Wappy Halloween, Anna!") == 0);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Insertion") {
- godot_string s, t, r, u;
- godot_string_new_with_latin1_chars(&s, "Who is Frederic?");
- godot_string_new_with_latin1_chars(&t, "?");
- godot_string_new_with_latin1_chars(&r, " Chopin");
-
- u = godot_string_insert(&s, godot_string_find(&s, &t), &r);
- CHECK(u32scmp(godot_string_get_data(&u), U"Who is Frederic Chopin?") == 0);
-
- godot_string_destroy(&s);
- godot_string_destroy(&t);
- godot_string_destroy(&r);
- godot_string_destroy(&u);
-}
-
-TEST_CASE("[GDNative String] Number to string") {
- godot_string s;
- s = godot_string_num(3.141593);
- CHECK(u32scmp(godot_string_get_data(&s), U"3.141593") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_num_with_decimals(3.141593, 3);
- CHECK(u32scmp(godot_string_get_data(&s), U"3.142") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_num_real(3.141593);
- CHECK(u32scmp(godot_string_get_data(&s), U"3.141593") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_num_scientific(30000000);
- CHECK(u32scmp(godot_string_get_data(&s), U"3e+07") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_num_int64(3141593, 10);
- CHECK(u32scmp(godot_string_get_data(&s), U"3141593") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_num_int64(0xA141593, 16);
- CHECK(u32scmp(godot_string_get_data(&s), U"a141593") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_num_int64_capitalized(0xA141593, 16, true);
- CHECK(u32scmp(godot_string_get_data(&s), U"A141593") == 0);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] String to integer") {
- static const wchar_t *wnums[4] = { L"1237461283", L"- 22", L"0", L" - 1123412" };
- static const char *nums[4] = { "1237461283", "- 22", "0", " - 1123412" };
- static const int num[4] = { 1237461283, -22, 0, -1123412 };
-
- for (int i = 0; i < 4; i++) {
- godot_string s;
- godot_string_new_with_latin1_chars(&s, nums[i]);
- CHECK(godot_string_to_int(&s) == num[i]);
- godot_string_destroy(&s);
-
- CHECK(godot_string_char_to_int(nums[i]) == num[i]);
- CHECK(godot_string_wchar_to_int(wnums[i]) == num[i]);
- }
-}
-
-TEST_CASE("[GDNative String] Hex to integer") {
- static const char *nums[4] = { "0xFFAE", "22", "0", "AADDAD" };
- static const int64_t num[4] = { 0xFFAE, 0x22, 0, 0xAADDAD };
- static const bool wo_prefix[4] = { false, true, true, true };
- static const bool w_prefix[4] = { true, false, true, false };
-
- for (int i = 0; i < 4; i++) {
- godot_string s;
- godot_string_new_with_latin1_chars(&s, nums[i]);
- CHECK((godot_string_hex_to_int_with_prefix(&s) == num[i]) == w_prefix[i]);
- CHECK((godot_string_hex_to_int(&s) == num[i]) == wo_prefix[i]);
- godot_string_destroy(&s);
- }
-}
-
-TEST_CASE("[GDNative String] String to float") {
- static const wchar_t *wnums[4] = { L"-12348298412.2", L"0.05", L"2.0002", L" -0.0001" };
- static const char *nums[4] = { "-12348298412.2", "0.05", "2.0002", " -0.0001" };
- static const double num[4] = { -12348298412.2, 0.05, 2.0002, -0.0001 };
-
- for (int i = 0; i < 4; i++) {
- godot_string s;
- godot_string_new_with_latin1_chars(&s, nums[i]);
- CHECK(!(ABS(godot_string_to_float(&s) - num[i]) > 0.00001));
- godot_string_destroy(&s);
-
- CHECK(!(ABS(godot_string_char_to_float(nums[i]) - num[i]) > 0.00001));
- CHECK(!(ABS(godot_string_wchar_to_float(wnums[i], nullptr) - num[i]) > 0.00001));
- }
-}
-
-TEST_CASE("[GDNative String] CamelCase to underscore") {
- godot_string s, t;
- godot_string_new_with_latin1_chars(&s, "TestTestStringGD");
-
- t = godot_string_camelcase_to_underscore(&s);
- CHECK(u32scmp(godot_string_get_data(&t), U"Test_Test_String_GD") == 0);
- godot_string_destroy(&t);
-
- t = godot_string_camelcase_to_underscore_lowercased(&s);
- CHECK(u32scmp(godot_string_get_data(&t), U"test_test_string_gd") == 0);
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Slicing") {
- godot_string s, c;
- godot_string_new_with_latin1_chars(&s, "Mars,Jupiter,Saturn,Uranus");
- godot_string_new_with_latin1_chars(&c, ",");
-
- const char32_t *slices[4] = { U"Mars", U"Jupiter", U"Saturn", U"Uranus" };
- for (int i = 0; i < godot_string_get_slice_count(&s, &c); i++) {
- godot_string t;
- t = godot_string_get_slice(&s, &c, i);
- CHECK(u32scmp(godot_string_get_data(&t), slices[i]) == 0);
- godot_string_destroy(&t);
-
- t = godot_string_get_slicec(&s, U',', i);
- CHECK(u32scmp(godot_string_get_data(&t), slices[i]) == 0);
- godot_string_destroy(&t);
- }
-
- godot_string_destroy(&c);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Splitting") {
- godot_string s, c;
- godot_string_new_with_latin1_chars(&s, "Mars,Jupiter,Saturn,Uranus");
- godot_string_new_with_latin1_chars(&c, ",");
-
- godot_packed_string_array l;
-
- const char32_t *slices_l[3] = { U"Mars", U"Jupiter", U"Saturn,Uranus" };
- const char32_t *slices_r[3] = { U"Mars,Jupiter", U"Saturn", U"Uranus" };
-
- l = godot_string_split_with_maxsplit(&s, &c, true, 2);
- CHECK(godot_packed_string_array_size(&l) == 3);
- for (int i = 0; i < godot_packed_string_array_size(&l); i++) {
- godot_string t = godot_packed_string_array_get(&l, i);
- CHECK(u32scmp(godot_string_get_data(&t), slices_l[i]) == 0);
- godot_string_destroy(&t);
- }
- godot_packed_string_array_destroy(&l);
-
- l = godot_string_rsplit_with_maxsplit(&s, &c, true, 2);
- CHECK(godot_packed_string_array_size(&l) == 3);
- for (int i = 0; i < godot_packed_string_array_size(&l); i++) {
- godot_string t = godot_packed_string_array_get(&l, i);
- CHECK(u32scmp(godot_string_get_data(&t), slices_r[i]) == 0);
- godot_string_destroy(&t);
- }
- godot_packed_string_array_destroy(&l);
- godot_string_destroy(&s);
-
- godot_string_new_with_latin1_chars(&s, "Mars Jupiter Saturn Uranus");
- const char32_t *slices_s[4] = { U"Mars", U"Jupiter", U"Saturn", U"Uranus" };
- l = godot_string_split_spaces(&s);
- for (int i = 0; i < godot_packed_string_array_size(&l); i++) {
- godot_string t = godot_packed_string_array_get(&l, i);
- CHECK(u32scmp(godot_string_get_data(&t), slices_s[i]) == 0);
- godot_string_destroy(&t);
- }
- godot_packed_string_array_destroy(&l);
- godot_string_destroy(&s);
-
- godot_string c1, c2;
- godot_string_new_with_latin1_chars(&c1, ";");
- godot_string_new_with_latin1_chars(&c2, " ");
-
- godot_string_new_with_latin1_chars(&s, "1.2;2.3 4.5");
- const double slices_d[3] = { 1.2, 2.3, 4.5 };
-
- godot_packed_float32_array lf = godot_string_split_floats_allow_empty(&s, &c1);
- CHECK(godot_packed_float32_array_size(&lf) == 2);
- for (int i = 0; i < godot_packed_float32_array_size(&lf); i++) {
- CHECK(ABS(godot_packed_float32_array_get(&lf, i) - slices_d[i]) <= 0.00001);
- }
- godot_packed_float32_array_destroy(&lf);
-
- godot_packed_string_array keys;
- godot_packed_string_array_new(&keys);
- godot_packed_string_array_push_back(&keys, &c1);
- godot_packed_string_array_push_back(&keys, &c2);
-
- lf = godot_string_split_floats_mk_allow_empty(&s, &keys);
- CHECK(godot_packed_float32_array_size(&lf) == 3);
- for (int i = 0; i < godot_packed_float32_array_size(&lf); i++) {
- CHECK(ABS(godot_packed_float32_array_get(&lf, i) - slices_d[i]) <= 0.00001);
- }
- godot_packed_float32_array_destroy(&lf);
-
- godot_string_destroy(&s);
- godot_string_new_with_latin1_chars(&s, "1;2 4");
- const int slices_i[3] = { 1, 2, 4 };
-
- godot_packed_int32_array li = godot_string_split_ints_allow_empty(&s, &c1);
- CHECK(godot_packed_int32_array_size(&li) == 2);
- for (int i = 0; i < godot_packed_int32_array_size(&li); i++) {
- CHECK(godot_packed_int32_array_get(&li, i) == slices_i[i]);
- }
- godot_packed_int32_array_destroy(&li);
-
- li = godot_string_split_ints_mk_allow_empty(&s, &keys);
- CHECK(godot_packed_int32_array_size(&li) == 3);
- for (int i = 0; i < godot_packed_int32_array_size(&li); i++) {
- CHECK(godot_packed_int32_array_get(&li, i) == slices_i[i]);
- }
- godot_packed_int32_array_destroy(&li);
-
- godot_string_destroy(&s);
- godot_string_destroy(&c);
- godot_string_destroy(&c1);
- godot_string_destroy(&c2);
- godot_packed_string_array_destroy(&keys);
-}
-
-TEST_CASE("[GDNative String] Erasing") {
- godot_string s, t;
- godot_string_new_with_latin1_chars(&s, "Josephine is such a cute girl!");
- godot_string_new_with_latin1_chars(&t, "cute ");
-
- godot_string_erase(&s, godot_string_find(&s, &t), godot_string_length(&t));
-
- CHECK(u32scmp(godot_string_get_data(&s), U"Josephine is such a girl!") == 0);
-
- godot_string_destroy(&s);
- godot_string_destroy(&t);
-}
-
-struct test_27_data {
- char const *data;
- char const *part;
- bool expected;
-};
-
-TEST_CASE("[GDNative String] Begins with") {
- test_27_data tc[] = {
- { "res://foobar", "res://", true },
- { "res", "res://", false },
- { "abc", "abc", true }
- };
- size_t count = sizeof(tc) / sizeof(tc[0]);
- bool state = true;
- for (size_t i = 0; state && i < count; ++i) {
- godot_string s;
- godot_string_new_with_latin1_chars(&s, tc[i].data);
-
- state = godot_string_begins_with_char_array(&s, tc[i].part) == tc[i].expected;
- if (state) {
- godot_string t;
- godot_string_new_with_latin1_chars(&t, tc[i].part);
- state = godot_string_begins_with(&s, &t) == tc[i].expected;
- godot_string_destroy(&t);
- }
- godot_string_destroy(&s);
-
- CHECK(state);
- if (!state) {
- break;
- }
- };
- CHECK(state);
-}
-
-TEST_CASE("[GDNative String] Ends with") {
- test_27_data tc[] = {
- { "res://foobar", "foobar", true },
- { "res", "res://", false },
- { "abc", "abc", true }
- };
- size_t count = sizeof(tc) / sizeof(tc[0]);
- bool state = true;
- for (size_t i = 0; state && i < count; ++i) {
- godot_string s;
- godot_string_new_with_latin1_chars(&s, tc[i].data);
-
- state = godot_string_ends_with_char_array(&s, tc[i].part) == tc[i].expected;
- if (state) {
- godot_string t;
- godot_string_new_with_latin1_chars(&t, tc[i].part);
- state = godot_string_ends_with(&s, &t) == tc[i].expected;
- godot_string_destroy(&t);
- }
- godot_string_destroy(&s);
-
- CHECK(state);
- if (!state) {
- break;
- }
- };
- CHECK(state);
-}
-
-TEST_CASE("[GDNative String] format") {
- godot_string value_format, t;
- godot_string_new_with_latin1_chars(&value_format, "red=\"$red\" green=\"$green\" blue=\"$blue\" alpha=\"$alpha\"");
-
- godot_variant key_v, val_v;
- godot_dictionary value_dictionary;
- godot_dictionary_new(&value_dictionary);
-
- godot_string_new_with_latin1_chars(&t, "red");
- godot_variant_new_string(&key_v, &t);
- godot_string_destroy(&t);
- godot_variant_new_int(&val_v, 10);
- godot_dictionary_set(&value_dictionary, &key_v, &val_v);
- godot_variant_destroy(&key_v);
- godot_variant_destroy(&val_v);
-
- godot_string_new_with_latin1_chars(&t, "green");
- godot_variant_new_string(&key_v, &t);
- godot_string_destroy(&t);
- godot_variant_new_int(&val_v, 20);
- godot_dictionary_set(&value_dictionary, &key_v, &val_v);
- godot_variant_destroy(&key_v);
- godot_variant_destroy(&val_v);
-
- godot_string_new_with_latin1_chars(&t, "blue");
- godot_variant_new_string(&key_v, &t);
- godot_string_destroy(&t);
- godot_string_new_with_latin1_chars(&t, "bla");
- godot_variant_new_string(&val_v, &t);
- godot_string_destroy(&t);
- godot_dictionary_set(&value_dictionary, &key_v, &val_v);
- godot_variant_destroy(&key_v);
- godot_variant_destroy(&val_v);
-
- godot_string_new_with_latin1_chars(&t, "alpha");
- godot_variant_new_string(&key_v, &t);
- godot_string_destroy(&t);
- godot_variant_new_real(&val_v, 0.4);
- godot_dictionary_set(&value_dictionary, &key_v, &val_v);
- godot_variant_destroy(&key_v);
- godot_variant_destroy(&val_v);
-
- godot_variant dict_v;
- godot_variant_new_dictionary(&dict_v, &value_dictionary);
- godot_string s = godot_string_format_with_custom_placeholder(&value_format, &dict_v, "$_");
-
- CHECK(u32scmp(godot_string_get_data(&s), U"red=\"10\" green=\"20\" blue=\"bla\" alpha=\"0.4\"") == 0);
-
- godot_dictionary_destroy(&value_dictionary);
- godot_string_destroy(&s);
- godot_variant_destroy(&dict_v);
- godot_string_destroy(&value_format);
-}
-
-TEST_CASE("[GDNative String] sprintf") {
- //godot_string GDAPI (const godot_string *p_self, const godot_array *p_values, godot_bool *p_error);
- godot_string format, output;
- godot_array args;
- bool error;
-
-#define ARRAY_PUSH_STRING(x) \
- { \
- godot_variant v; \
- godot_string t; \
- godot_string_new_with_latin1_chars(&t, x); \
- godot_variant_new_string(&v, &t); \
- godot_string_destroy(&t); \
- godot_array_push_back(&args, &v); \
- godot_variant_destroy(&v); \
- }
-
-#define ARRAY_PUSH_INT(x) \
- { \
- godot_variant v; \
- godot_variant_new_int(&v, x); \
- godot_array_push_back(&args, &v); \
- godot_variant_destroy(&v); \
- }
-
-#define ARRAY_PUSH_REAL(x) \
- { \
- godot_variant v; \
- godot_variant_new_real(&v, x); \
- godot_array_push_back(&args, &v); \
- godot_variant_destroy(&v); \
- }
-
- godot_array_new(&args);
-
- // %%
- godot_string_new_with_latin1_chars(&format, "fish %% frog");
- godot_array_clear(&args);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish % frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
- //////// INTS
-
- // Int
- godot_string_new_with_latin1_chars(&format, "fish %d frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(5);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 5 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Int left padded with zeroes.
- godot_string_new_with_latin1_chars(&format, "fish %05d frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(5);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 00005 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Int left padded with spaces.
- godot_string_new_with_latin1_chars(&format, "fish %5d frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(5);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 5 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Int right padded with spaces.
- godot_string_new_with_latin1_chars(&format, "fish %-5d frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(5);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 5 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Int with sign (positive).
- godot_string_new_with_latin1_chars(&format, "fish %+d frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(5);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish +5 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Negative int.
- godot_string_new_with_latin1_chars(&format, "fish %d frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(-5);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish -5 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Hex (lower)
- godot_string_new_with_latin1_chars(&format, "fish %x frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(45);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 2d frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Hex (upper)
- godot_string_new_with_latin1_chars(&format, "fish %X frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(45);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 2D frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Octal
- godot_string_new_with_latin1_chars(&format, "fish %o frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 143 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
- ////// REALS
-
- // Real
- godot_string_new_with_latin1_chars(&format, "fish %f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_REAL(99.99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 99.990000 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Real left-padded
- godot_string_new_with_latin1_chars(&format, "fish %11f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_REAL(99.99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 99.990000 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Real right-padded
- godot_string_new_with_latin1_chars(&format, "fish %-11f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_REAL(99.99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 99.990000 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Real given int.
- godot_string_new_with_latin1_chars(&format, "fish %f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_REAL(99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 99.000000 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Real with sign (positive).
- godot_string_new_with_latin1_chars(&format, "fish %+f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_REAL(99.99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish +99.990000 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Real with 1 decimals.
- godot_string_new_with_latin1_chars(&format, "fish %.1f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_REAL(99.99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 100.0 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Real with 12 decimals.
- godot_string_new_with_latin1_chars(&format, "fish %.12f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_REAL(99.99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 99.990000000000 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Real with no decimals.
- godot_string_new_with_latin1_chars(&format, "fish %.f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_REAL(99.99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 100 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- /////// Strings.
-
- // String
- godot_string_new_with_latin1_chars(&format, "fish %s frog");
- godot_array_clear(&args);
- ARRAY_PUSH_STRING("cheese");
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish cheese frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // String left-padded
- godot_string_new_with_latin1_chars(&format, "fish %10s frog");
- godot_array_clear(&args);
- ARRAY_PUSH_STRING("cheese");
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish cheese frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // String right-padded
- godot_string_new_with_latin1_chars(&format, "fish %-10s frog");
- godot_array_clear(&args);
- ARRAY_PUSH_STRING("cheese");
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish cheese frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- ///// Characters
-
- // Character as string.
- godot_string_new_with_latin1_chars(&format, "fish %c frog");
- godot_array_clear(&args);
- ARRAY_PUSH_STRING("A");
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish A frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Character as int.
- godot_string_new_with_latin1_chars(&format, "fish %c frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(65);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish A frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- ///// Dynamic width
-
- // String dynamic width
- godot_string_new_with_latin1_chars(&format, "fish %*s frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(10);
- ARRAY_PUSH_STRING("cheese");
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- REQUIRE(u32scmp(godot_string_get_data(&output), U"fish cheese frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Int dynamic width
- godot_string_new_with_latin1_chars(&format, "fish %*d frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(10);
- ARRAY_PUSH_INT(99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- REQUIRE(u32scmp(godot_string_get_data(&output), U"fish 99 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Float dynamic width
- godot_string_new_with_latin1_chars(&format, "fish %*.*f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_INT(10);
- ARRAY_PUSH_INT(3);
- ARRAY_PUSH_REAL(99.99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error == false);
- CHECK(u32scmp(godot_string_get_data(&output), U"fish 99.990 frog") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- ///// Errors
-
- // More formats than arguments.
- godot_string_new_with_latin1_chars(&format, "fish %s %s frog");
- godot_array_clear(&args);
- ARRAY_PUSH_STRING("cheese");
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error);
- CHECK(u32scmp(godot_string_get_data(&output), U"not enough arguments for format string") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // More arguments than formats.
- godot_string_new_with_latin1_chars(&format, "fish %s frog");
- godot_array_clear(&args);
- ARRAY_PUSH_STRING("hello");
- ARRAY_PUSH_STRING("cheese");
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error);
- CHECK(u32scmp(godot_string_get_data(&output), U"not all arguments converted during string formatting") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Incomplete format.
- godot_string_new_with_latin1_chars(&format, "fish %10");
- godot_array_clear(&args);
- ARRAY_PUSH_STRING("cheese");
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error);
- CHECK(u32scmp(godot_string_get_data(&output), U"incomplete format") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Bad character in format string
- godot_string_new_with_latin1_chars(&format, "fish %&f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_STRING("cheese");
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error);
- CHECK(u32scmp(godot_string_get_data(&output), U"unsupported format character") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Too many decimals.
- godot_string_new_with_latin1_chars(&format, "fish %2.2.2f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_REAL(99.99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error);
- CHECK(u32scmp(godot_string_get_data(&output), U"too many decimal points in format") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // * not a number
- godot_string_new_with_latin1_chars(&format, "fish %*f frog");
- godot_array_clear(&args);
- ARRAY_PUSH_STRING("cheese");
- ARRAY_PUSH_REAL(99.99);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error);
- CHECK(u32scmp(godot_string_get_data(&output), U"* wants number") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Character too long.
- godot_string_new_with_latin1_chars(&format, "fish %c frog");
- godot_array_clear(&args);
- ARRAY_PUSH_STRING("sc");
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error);
- CHECK(u32scmp(godot_string_get_data(&output), U"%c requires number or single-character string") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- // Character bad type.
- godot_string_new_with_latin1_chars(&format, "fish %c frog");
- godot_array_clear(&args);
- godot_array t;
- godot_array_new(&t);
- godot_variant v;
- godot_variant_new_array(&v, &t);
- godot_array_destroy(&t);
- godot_array_push_back(&args, &v);
- godot_variant_destroy(&v);
- output = godot_string_sprintf(&format, &args, &error);
- REQUIRE(error);
- CHECK(u32scmp(godot_string_get_data(&output), U"%c requires number or single-character string") == 0);
- godot_string_destroy(&format);
- godot_string_destroy(&output);
-
- godot_array_destroy(&args);
-#undef ARRAY_PUSH_INT
-#undef ARRAY_PUSH_REAL
-#undef ARRAY_PUSH_STRING
-}
-
-TEST_CASE("[GDNative String] is_numeric") {
-#define IS_NUM_TEST(x, r) \
- { \
- godot_string t; \
- godot_string_new_with_latin1_chars(&t, x); \
- CHECK(godot_string_is_numeric(&t) == r); \
- godot_string_destroy(&t); \
- }
-
- IS_NUM_TEST("12", true);
- IS_NUM_TEST("1.2", true);
- IS_NUM_TEST("AF", false);
- IS_NUM_TEST("-12", true);
- IS_NUM_TEST("-1.2", true);
-
-#undef IS_NUM_TEST
-}
-
-TEST_CASE("[GDNative String] pad") {
- godot_string s, c;
- godot_string_new_with_latin1_chars(&s, "test");
- godot_string_new_with_latin1_chars(&c, "x");
-
- godot_string l = godot_string_lpad_with_custom_character(&s, 10, &c);
- CHECK(u32scmp(godot_string_get_data(&l), U"xxxxxxtest") == 0);
- godot_string_destroy(&l);
-
- godot_string r = godot_string_rpad_with_custom_character(&s, 10, &c);
- CHECK(u32scmp(godot_string_get_data(&r), U"testxxxxxx") == 0);
- godot_string_destroy(&r);
-
- godot_string_destroy(&s);
- godot_string_destroy(&c);
-
- godot_string_new_with_latin1_chars(&s, "10.10");
- c = godot_string_pad_decimals(&s, 4);
- CHECK(u32scmp(godot_string_get_data(&c), U"10.1000") == 0);
- godot_string_destroy(&c);
- c = godot_string_pad_zeros(&s, 4);
- CHECK(u32scmp(godot_string_get_data(&c), U"0010.10") == 0);
- godot_string_destroy(&c);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] is_subsequence_of") {
- godot_string a, t;
- godot_string_new_with_latin1_chars(&a, "is subsequence of");
-
- godot_string_new_with_latin1_chars(&t, "sub");
- CHECK(godot_string_is_subsequence_of(&t, &a));
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "Sub");
- CHECK(!godot_string_is_subsequence_of(&t, &a));
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "Sub");
- CHECK(godot_string_is_subsequence_ofi(&t, &a));
- godot_string_destroy(&t);
-
- godot_string_destroy(&a);
-}
-
-TEST_CASE("[GDNative String] match") {
- godot_string s, t;
- godot_string_new_with_latin1_chars(&s, "*.png");
-
- godot_string_new_with_latin1_chars(&t, "img1.png");
- CHECK(godot_string_match(&t, &s));
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "img1.jpeg");
- CHECK(!godot_string_match(&t, &s));
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "img1.Png");
- CHECK(!godot_string_match(&t, &s));
- CHECK(godot_string_matchn(&t, &s));
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] IPVX address to string") {
- godot_string ip;
-
- godot_string_new_with_latin1_chars(&ip, "192.168.0.1");
- CHECK(godot_string_is_valid_ip_address(&ip));
- godot_string_destroy(&ip);
-
- godot_string_new_with_latin1_chars(&ip, "192.368.0.1");
- CHECK(!godot_string_is_valid_ip_address(&ip));
- godot_string_destroy(&ip);
-
- godot_string_new_with_latin1_chars(&ip, "2001:0db8:85a3:0000:0000:8a2e:0370:7334");
- CHECK(godot_string_is_valid_ip_address(&ip));
- godot_string_destroy(&ip);
-
- godot_string_new_with_latin1_chars(&ip, "2001:0db8:85j3:0000:0000:8a2e:0370:7334");
- CHECK(!godot_string_is_valid_ip_address(&ip));
- godot_string_destroy(&ip);
-
- godot_string_new_with_latin1_chars(&ip, "2001:0db8:85f345:0000:0000:8a2e:0370:7334");
- CHECK(!godot_string_is_valid_ip_address(&ip));
- godot_string_destroy(&ip);
-
- godot_string_new_with_latin1_chars(&ip, "2001:0db8::0:8a2e:370:7334");
- CHECK(godot_string_is_valid_ip_address(&ip));
- godot_string_destroy(&ip);
-
- godot_string_new_with_latin1_chars(&ip, "::ffff:192.168.0.1");
- CHECK(godot_string_is_valid_ip_address(&ip));
- godot_string_destroy(&ip);
-}
-
-TEST_CASE("[GDNative String] Capitalize against many strings") {
-#define CAP_TEST(i, o) \
- godot_string_new_with_latin1_chars(&input, i); \
- godot_string_new_with_latin1_chars(&output, o); \
- test = godot_string_capitalize(&input); \
- CHECK(u32scmp(godot_string_get_data(&output), godot_string_get_data(&test)) == 0); \
- godot_string_destroy(&input); \
- godot_string_destroy(&output); \
- godot_string_destroy(&test);
-
- godot_string input, output, test;
-
- CAP_TEST("bytes2var", "Bytes 2 Var");
- CAP_TEST("linear2db", "Linear 2 Db");
- CAP_TEST("vector3", "Vector 3");
- CAP_TEST("sha256", "Sha 256");
- CAP_TEST("2db", "2 Db");
- CAP_TEST("PascalCase", "Pascal Case");
- CAP_TEST("PascalPascalCase", "Pascal Pascal Case");
- CAP_TEST("snake_case", "Snake Case");
- CAP_TEST("snake_snake_case", "Snake Snake Case");
- CAP_TEST("sha256sum", "Sha 256 Sum");
- CAP_TEST("cat2dog", "Cat 2 Dog");
- CAP_TEST("function(name)", "Function(name)");
- CAP_TEST("snake_case_function(snake_case_arg)", "Snake Case Function(snake Case Arg)");
- CAP_TEST("snake_case_function( snake_case_arg )", "Snake Case Function( Snake Case Arg )");
-
-#undef CAP_TEST
-}
-
-TEST_CASE("[GDNative String] lstrip and rstrip") {
-#define LSTRIP_TEST(x, y, z) \
- { \
- godot_string xx, yy, zz, rr; \
- godot_string_new_with_latin1_chars(&xx, x); \
- godot_string_new_with_latin1_chars(&yy, y); \
- godot_string_new_with_latin1_chars(&zz, z); \
- rr = godot_string_lstrip(&xx, &yy); \
- state = state && (u32scmp(godot_string_get_data(&rr), godot_string_get_data(&zz)) == 0); \
- godot_string_destroy(&xx); \
- godot_string_destroy(&yy); \
- godot_string_destroy(&zz); \
- godot_string_destroy(&rr); \
- }
-
-#define RSTRIP_TEST(x, y, z) \
- { \
- godot_string xx, yy, zz, rr; \
- godot_string_new_with_latin1_chars(&xx, x); \
- godot_string_new_with_latin1_chars(&yy, y); \
- godot_string_new_with_latin1_chars(&zz, z); \
- rr = godot_string_rstrip(&xx, &yy); \
- state = state && (u32scmp(godot_string_get_data(&rr), godot_string_get_data(&zz)) == 0); \
- godot_string_destroy(&xx); \
- godot_string_destroy(&yy); \
- godot_string_destroy(&zz); \
- godot_string_destroy(&rr); \
- }
-
-#define LSTRIP_UTF8_TEST(x, y, z) \
- { \
- godot_string xx, yy, zz, rr; \
- godot_string_new_with_utf8_chars(&xx, x); \
- godot_string_new_with_utf8_chars(&yy, y); \
- godot_string_new_with_utf8_chars(&zz, z); \
- rr = godot_string_lstrip(&xx, &yy); \
- state = state && (u32scmp(godot_string_get_data(&rr), godot_string_get_data(&zz)) == 0); \
- godot_string_destroy(&xx); \
- godot_string_destroy(&yy); \
- godot_string_destroy(&zz); \
- godot_string_destroy(&rr); \
- }
-
-#define RSTRIP_UTF8_TEST(x, y, z) \
- { \
- godot_string xx, yy, zz, rr; \
- godot_string_new_with_utf8_chars(&xx, x); \
- godot_string_new_with_utf8_chars(&yy, y); \
- godot_string_new_with_utf8_chars(&zz, z); \
- rr = godot_string_rstrip(&xx, &yy); \
- state = state && (u32scmp(godot_string_get_data(&rr), godot_string_get_data(&zz)) == 0); \
- godot_string_destroy(&xx); \
- godot_string_destroy(&yy); \
- godot_string_destroy(&zz); \
- godot_string_destroy(&rr); \
- }
-
- bool state = true;
-
- // strip none
- LSTRIP_TEST("abc", "", "abc");
- RSTRIP_TEST("abc", "", "abc");
- // strip one
- LSTRIP_TEST("abc", "a", "bc");
- RSTRIP_TEST("abc", "c", "ab");
- // strip lots
- LSTRIP_TEST("bababbababccc", "ab", "ccc");
- RSTRIP_TEST("aaabcbcbcbbcbbc", "cb", "aaa");
- // strip empty string
- LSTRIP_TEST("", "", "");
- RSTRIP_TEST("", "", "");
- // strip to empty string
- LSTRIP_TEST("abcabcabc", "bca", "");
- RSTRIP_TEST("abcabcabc", "bca", "");
- // don't strip wrong end
- LSTRIP_TEST("abc", "c", "abc");
- LSTRIP_TEST("abca", "a", "bca");
- RSTRIP_TEST("abc", "a", "abc");
- RSTRIP_TEST("abca", "a", "abc");
- // in utf-8 "¿" (\u00bf) has the same first byte as "µ" (\u00b5)
- // and the same second as "ÿ" (\u00ff)
- LSTRIP_UTF8_TEST("¿", "µÿ", "¿");
- RSTRIP_UTF8_TEST("¿", "µÿ", "¿");
- LSTRIP_UTF8_TEST("µ¿ÿ", "µÿ", "¿ÿ");
- RSTRIP_UTF8_TEST("µ¿ÿ", "µÿ", "µ¿");
-
- // the above tests repeated with additional superfluous strip chars
-
- // strip none
- LSTRIP_TEST("abc", "qwjkl", "abc");
- RSTRIP_TEST("abc", "qwjkl", "abc");
- // strip one
- LSTRIP_TEST("abc", "qwajkl", "bc");
- RSTRIP_TEST("abc", "qwcjkl", "ab");
- // strip lots
- LSTRIP_TEST("bababbababccc", "qwabjkl", "ccc");
- RSTRIP_TEST("aaabcbcbcbbcbbc", "qwcbjkl", "aaa");
- // strip empty string
- LSTRIP_TEST("", "qwjkl", "");
- RSTRIP_TEST("", "qwjkl", "");
- // strip to empty string
- LSTRIP_TEST("abcabcabc", "qwbcajkl", "");
- RSTRIP_TEST("abcabcabc", "qwbcajkl", "");
- // don't strip wrong end
- LSTRIP_TEST("abc", "qwcjkl", "abc");
- LSTRIP_TEST("abca", "qwajkl", "bca");
- RSTRIP_TEST("abc", "qwajkl", "abc");
- RSTRIP_TEST("abca", "qwajkl", "abc");
- // in utf-8 "¿" (\u00bf) has the same first byte as "µ" (\u00b5)
- // and the same second as "ÿ" (\u00ff)
- LSTRIP_UTF8_TEST("¿", "qwaµÿjkl", "¿");
- RSTRIP_UTF8_TEST("¿", "qwaµÿjkl", "¿");
- LSTRIP_UTF8_TEST("µ¿ÿ", "qwaµÿjkl", "¿ÿ");
- RSTRIP_UTF8_TEST("µ¿ÿ", "qwaµÿjkl", "µ¿");
-
- CHECK(state);
-
-#undef LSTRIP_TEST
-#undef RSTRIP_TEST
-#undef LSTRIP_UTF8_TEST
-#undef RSTRIP_UTF8_TEST
-}
-
-TEST_CASE("[GDNative String] Cyrillic to_lower()") {
- godot_string upper, lower, test;
- godot_string_new_with_utf8_chars(&upper, "ÐБВГДЕÐЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯ");
- godot_string_new_with_utf8_chars(&lower, "абвгдеёжзийклмнопрÑтуфхцчшщъыьÑÑŽÑ");
-
- test = godot_string_to_lower(&upper);
-
- CHECK((u32scmp(godot_string_get_data(&test), godot_string_get_data(&lower)) == 0));
-
- godot_string_destroy(&upper);
- godot_string_destroy(&lower);
- godot_string_destroy(&test);
-}
-
-TEST_CASE("[GDNative String] Count and countn functionality") {
-#define COUNT_TEST(x, y, r) \
- { \
- godot_string s, t; \
- godot_string_new_with_latin1_chars(&s, x); \
- godot_string_new_with_latin1_chars(&t, y); \
- state = state && (godot_string_count(&s, &t, 0, 0) == r); \
- godot_string_destroy(&s); \
- godot_string_destroy(&t); \
- }
-
-#define COUNTR_TEST(x, y, a, b, r) \
- { \
- godot_string s, t; \
- godot_string_new_with_latin1_chars(&s, x); \
- godot_string_new_with_latin1_chars(&t, y); \
- state = state && (godot_string_count(&s, &t, a, b) == r); \
- godot_string_destroy(&s); \
- godot_string_destroy(&t); \
- }
-
-#define COUNTN_TEST(x, y, r) \
- { \
- godot_string s, t; \
- godot_string_new_with_latin1_chars(&s, x); \
- godot_string_new_with_latin1_chars(&t, y); \
- state = state && (godot_string_countn(&s, &t, 0, 0) == r); \
- godot_string_destroy(&s); \
- godot_string_destroy(&t); \
- }
-
-#define COUNTNR_TEST(x, y, a, b, r) \
- { \
- godot_string s, t; \
- godot_string_new_with_latin1_chars(&s, x); \
- godot_string_new_with_latin1_chars(&t, y); \
- state = state && (godot_string_countn(&s, &t, a, b) == r); \
- godot_string_destroy(&s); \
- godot_string_destroy(&t); \
- }
- bool state = true;
-
- COUNT_TEST("", "Test", 0);
- COUNT_TEST("Test", "", 0);
- COUNT_TEST("Test", "test", 0);
- COUNT_TEST("Test", "TEST", 0);
- COUNT_TEST("TEST", "TEST", 1);
- COUNT_TEST("Test", "Test", 1);
- COUNT_TEST("aTest", "Test", 1);
- COUNT_TEST("Testa", "Test", 1);
- COUNT_TEST("TestTestTest", "Test", 3);
- COUNT_TEST("TestTestTest", "TestTest", 1);
- COUNT_TEST("TestGodotTestGodotTestGodot", "Test", 3);
-
- COUNTR_TEST("TestTestTestTest", "Test", 4, 8, 1);
- COUNTR_TEST("TestTestTestTest", "Test", 4, 12, 2);
- COUNTR_TEST("TestTestTestTest", "Test", 4, 16, 3);
- COUNTR_TEST("TestTestTestTest", "Test", 4, 0, 3);
-
- COUNTN_TEST("Test", "test", 1);
- COUNTN_TEST("Test", "TEST", 1);
- COUNTN_TEST("testTest-Testatest", "tEst", 4);
- COUNTNR_TEST("testTest-TeStatest", "tEsT", 4, 16, 2);
-
- CHECK(state);
-
-#undef COUNT_TEST
-#undef COUNTR_TEST
-#undef COUNTN_TEST
-#undef COUNTNR_TEST
-}
-
-TEST_CASE("[GDNative String] Bigrams") {
- godot_string s, t;
- godot_string_new_with_latin1_chars(&s, "abcd");
- godot_packed_string_array bigr = godot_string_bigrams(&s);
- godot_string_destroy(&s);
-
- CHECK(godot_packed_string_array_size(&bigr) == 3);
-
- t = godot_packed_string_array_get(&bigr, 0);
- CHECK(u32scmp(godot_string_get_data(&t), U"ab") == 0);
- godot_string_destroy(&t);
-
- t = godot_packed_string_array_get(&bigr, 1);
- CHECK(u32scmp(godot_string_get_data(&t), U"bc") == 0);
- godot_string_destroy(&t);
-
- t = godot_packed_string_array_get(&bigr, 2);
- CHECK(u32scmp(godot_string_get_data(&t), U"cd") == 0);
- godot_string_destroy(&t);
-
- godot_packed_string_array_destroy(&bigr);
-}
-
-TEST_CASE("[GDNative String] c-escape/unescape") {
- godot_string s;
- godot_string_new_with_latin1_chars(&s, "\\1\a2\b\f3\n45\r6\t7\v8\'9\?0\"");
- godot_string t = godot_string_c_escape(&s);
- godot_string u = godot_string_c_unescape(&t);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&s)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] dedent") {
- godot_string s, t;
- godot_string_new_with_latin1_chars(&s, " aaa\n bbb");
- godot_string_new_with_latin1_chars(&t, "aaa\nbbb");
- godot_string u = godot_string_dedent(&s);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Path functions") {
- static const char *path[4] = { "C:\\Godot\\project\\test.tscn", "/Godot/project/test.xscn", "../Godot/project/test.scn", "Godot\\test.doc" };
- static const char *base_dir[4] = { "C:\\Godot\\project", "/Godot/project", "../Godot/project", "Godot" };
- static const char *base_name[4] = { "C:\\Godot\\project\\test", "/Godot/project/test", "../Godot/project/test", "Godot\\test" };
- static const char *ext[4] = { "tscn", "xscn", "scn", "doc" };
- static const char *file[4] = { "test.tscn", "test.xscn", "test.scn", "test.doc" };
- static const bool abs[4] = { true, true, false, false };
-
- for (int i = 0; i < 4; i++) {
- godot_string s, t, u, f;
- godot_string_new_with_latin1_chars(&s, path[i]);
-
- t = godot_string_get_base_dir(&s);
- godot_string_new_with_latin1_chars(&u, base_dir[i]);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- t = godot_string_get_basename(&s);
- godot_string_new_with_latin1_chars(&u, base_name[i]);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- t = godot_string_get_extension(&s);
- godot_string_new_with_latin1_chars(&u, ext[i]);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- t = godot_string_get_file(&s);
- godot_string_new_with_latin1_chars(&u, file[i]);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- godot_string s_simp;
- s_simp = godot_string_simplify_path(&s);
- t = godot_string_get_base_dir(&s_simp);
- godot_string_new_with_latin1_chars(&u, file[i]);
- f = godot_string_plus_file(&t, &u);
- CHECK(u32scmp(godot_string_get_data(&f), godot_string_get_data(&s_simp)) == 0);
- godot_string_destroy(&f);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
- godot_string_destroy(&s_simp);
-
- CHECK(godot_string_is_abs_path(&s) == abs[i]);
- CHECK(godot_string_is_rel_path(&s) != abs[i]);
-
- godot_string_destroy(&s);
- }
-
- static const char *file_name[3] = { "test.tscn", "test://.xscn", "?tes*t.scn" };
- static const bool valid[3] = { true, false, false };
- for (int i = 0; i < 3; i++) {
- godot_string s;
- godot_string_new_with_latin1_chars(&s, file_name[i]);
- CHECK(godot_string_is_valid_filename(&s) == valid[i]);
- godot_string_destroy(&s);
- }
-}
-
-TEST_CASE("[GDNative String] hash") {
- godot_string a, b, c;
- godot_string_new_with_latin1_chars(&a, "Test");
- godot_string_new_with_latin1_chars(&b, "Test");
- godot_string_new_with_latin1_chars(&c, "West");
- CHECK(godot_string_hash(&a) == godot_string_hash(&b));
- CHECK(godot_string_hash(&a) != godot_string_hash(&c));
-
- CHECK(godot_string_hash64(&a) == godot_string_hash64(&b));
- CHECK(godot_string_hash64(&a) != godot_string_hash64(&c));
-
- godot_string_destroy(&a);
- godot_string_destroy(&b);
- godot_string_destroy(&c);
-}
-
-TEST_CASE("[GDNative String] http_escape/unescape") {
- godot_string s, t, u;
- godot_string_new_with_latin1_chars(&s, "Godot Engine:'docs'");
- godot_string_new_with_latin1_chars(&t, "Godot%20Engine%3A%27docs%27");
-
- u = godot_string_http_escape(&s);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
-
- u = godot_string_http_unescape(&t);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&s)) == 0);
- godot_string_destroy(&u);
-
- godot_string_destroy(&s);
- godot_string_destroy(&t);
-}
-
-TEST_CASE("[GDNative String] percent_encode/decode") {
- godot_string s, t, u;
- godot_string_new_with_latin1_chars(&s, "Godot Engine:'docs'");
- godot_string_new_with_latin1_chars(&t, "Godot%20Engine%3a%27docs%27");
-
- u = godot_string_percent_encode(&s);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
-
- u = godot_string_percent_decode(&t);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&s)) == 0);
- godot_string_destroy(&u);
-
- godot_string_destroy(&s);
- godot_string_destroy(&t);
-}
-
-TEST_CASE("[GDNative String] xml_escape/unescape") {
- godot_string s, t, u;
- godot_string_new_with_latin1_chars(&s, "\"Test\" <test@test&'test'>");
-
- t = godot_string_xml_escape_with_quotes(&s);
- u = godot_string_xml_unescape(&t);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&s)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- t = godot_string_xml_escape(&s);
- u = godot_string_xml_unescape(&t);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&s)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Strip escapes") {
- godot_string s, t, u;
- godot_string_new_with_latin1_chars(&s, "\t\tTest Test\r\n Test");
- godot_string_new_with_latin1_chars(&t, "Test Test Test");
-
- u = godot_string_strip_escapes(&s);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
-
- godot_string_destroy(&t);
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Strip edges") {
- godot_string s, t, u;
- godot_string_new_with_latin1_chars(&s, "\t Test Test ");
-
- godot_string_new_with_latin1_chars(&t, "Test Test ");
- u = godot_string_strip_edges(&s, true, false);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "\t Test Test");
- u = godot_string_strip_edges(&s, false, true);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "Test Test");
- u = godot_string_strip_edges(&s, true, true);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Similarity") {
- godot_string a, b, c;
- godot_string_new_with_latin1_chars(&a, "Test");
- godot_string_new_with_latin1_chars(&b, "West");
- godot_string_new_with_latin1_chars(&c, "Toad");
-
- CHECK(godot_string_similarity(&a, &b) > godot_string_similarity(&a, &c));
-
- godot_string_destroy(&a);
- godot_string_destroy(&b);
- godot_string_destroy(&c);
-}
-
-TEST_CASE("[GDNative String] Trim") {
- godot_string s, t, u, p;
- godot_string_new_with_latin1_chars(&s, "aaaTestbbb");
-
- godot_string_new_with_latin1_chars(&p, "aaa");
- godot_string_new_with_latin1_chars(&t, "Testbbb");
- u = godot_string_trim_prefix(&s, &p);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
- godot_string_destroy(&p);
-
- godot_string_new_with_latin1_chars(&p, "bbb");
- godot_string_new_with_latin1_chars(&t, "aaaTest");
- u = godot_string_trim_suffix(&s, &p);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
- godot_string_destroy(&p);
-
- godot_string_new_with_latin1_chars(&p, "Test");
- u = godot_string_trim_suffix(&s, &p);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&s)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&p);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Right/Left") {
- godot_string s, t, u;
- godot_string_new_with_latin1_chars(&s, "aaaTestbbb");
- // ^
-
- godot_string_new_with_latin1_chars(&t, "tbbb");
- u = godot_string_right(&s, 6);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&t, "aaaTes");
- u = godot_string_left(&s, 6);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
-}
-
-TEST_CASE("[GDNative String] Repeat") {
- godot_string t, u;
- godot_string_new_with_latin1_chars(&t, "ab");
-
- u = godot_string_repeat(&t, 4);
- CHECK(u32scmp(godot_string_get_data(&u), U"abababab") == 0);
- godot_string_destroy(&u);
-
- godot_string_destroy(&t);
-}
-
-TEST_CASE("[GDNative String] SHA1/SHA256/MD5") {
- godot_string s, t, sha1, sha256, md5;
- godot_string_new_with_latin1_chars(&s, "Godot");
- godot_string_new_with_latin1_chars(&sha1, "a1e91f39b9fce6a9998b14bdbe2aa2b39dc2d201");
- static uint8_t sha1_buf[20] = {
- 0xA1, 0xE9, 0x1F, 0x39, 0xB9, 0xFC, 0xE6, 0xA9, 0x99, 0x8B, 0x14, 0xBD, 0xBE, 0x2A, 0xA2, 0xB3,
- 0x9D, 0xC2, 0xD2, 0x01
- };
- godot_string_new_with_latin1_chars(&sha256, "2a02b2443f7985d89d09001086ae3dcfa6eb0f55c6ef170715d42328e16e6cb8");
- static uint8_t sha256_buf[32] = {
- 0x2A, 0x02, 0xB2, 0x44, 0x3F, 0x79, 0x85, 0xD8, 0x9D, 0x09, 0x00, 0x10, 0x86, 0xAE, 0x3D, 0xCF,
- 0xA6, 0xEB, 0x0F, 0x55, 0xC6, 0xEF, 0x17, 0x07, 0x15, 0xD4, 0x23, 0x28, 0xE1, 0x6E, 0x6C, 0xB8
- };
- godot_string_new_with_latin1_chars(&md5, "4a336d087aeb0390da10ee2ea7cb87f8");
- static uint8_t md5_buf[16] = {
- 0x4A, 0x33, 0x6D, 0x08, 0x7A, 0xEB, 0x03, 0x90, 0xDA, 0x10, 0xEE, 0x2E, 0xA7, 0xCB, 0x87, 0xF8
- };
-
- godot_packed_byte_array buf = godot_string_sha1_buffer(&s);
- CHECK(memcmp(sha1_buf, godot_packed_byte_array_ptr(&buf), 20) == 0);
- godot_packed_byte_array_destroy(&buf);
-
- t = godot_string_sha1_text(&s);
- CHECK(u32scmp(godot_string_get_data(&t), godot_string_get_data(&sha1)) == 0);
- godot_string_destroy(&t);
-
- buf = godot_string_sha256_buffer(&s);
- CHECK(memcmp(sha256_buf, godot_packed_byte_array_ptr(&buf), 32) == 0);
- godot_packed_byte_array_destroy(&buf);
-
- t = godot_string_sha256_text(&s);
- CHECK(u32scmp(godot_string_get_data(&t), godot_string_get_data(&sha256)) == 0);
- godot_string_destroy(&t);
-
- buf = godot_string_md5_buffer(&s);
- CHECK(memcmp(md5_buf, godot_packed_byte_array_ptr(&buf), 16) == 0);
- godot_packed_byte_array_destroy(&buf);
-
- t = godot_string_md5_text(&s);
- CHECK(u32scmp(godot_string_get_data(&t), godot_string_get_data(&md5)) == 0);
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
- godot_string_destroy(&sha1);
- godot_string_destroy(&sha256);
- godot_string_destroy(&md5);
-}
-
-TEST_CASE("[GDNative String] Join") {
- godot_string s, t, u;
- godot_string_new_with_latin1_chars(&s, ", ");
-
- godot_packed_string_array parts;
- godot_packed_string_array_new(&parts);
- godot_string_new_with_latin1_chars(&t, "One");
- godot_packed_string_array_push_back(&parts, &t);
- godot_string_destroy(&t);
- godot_string_new_with_latin1_chars(&t, "B");
- godot_packed_string_array_push_back(&parts, &t);
- godot_string_destroy(&t);
- godot_string_new_with_latin1_chars(&t, "C");
- godot_packed_string_array_push_back(&parts, &t);
- godot_string_destroy(&t);
-
- godot_string_new_with_latin1_chars(&u, "One, B, C");
- t = godot_string_join(&s, &parts);
- CHECK(u32scmp(godot_string_get_data(&u), godot_string_get_data(&t)) == 0);
- godot_string_destroy(&u);
- godot_string_destroy(&t);
-
- godot_string_destroy(&s);
- godot_packed_string_array_destroy(&parts);
-}
-
-TEST_CASE("[GDNative String] Is_*") {
- static const char *data[12] = { "-30", "100", "10.1", "10,1", "1e2", "1e-2", "1e2e3", "0xAB", "AB", "Test1", "1Test", "Test*1" };
- static bool isnum[12] = { true, true, true, false, false, false, false, false, false, false, false, false };
- static bool isint[12] = { true, true, false, false, false, false, false, false, false, false, false, false };
- static bool ishex[12] = { true, true, false, false, true, false, true, false, true, false, false, false };
- static bool ishex_p[12] = { false, false, false, false, false, false, false, true, false, false, false, false };
- static bool isflt[12] = { true, true, true, false, true, true, false, false, false, false, false, false };
- static bool isid[12] = { false, false, false, false, false, false, false, false, true, true, false, false };
-
- for (int i = 0; i < 12; i++) {
- godot_string s;
- godot_string_new_with_latin1_chars(&s, data[i]);
- CHECK(godot_string_is_numeric(&s) == isnum[i]);
- CHECK(godot_string_is_valid_integer(&s) == isint[i]);
- CHECK(godot_string_is_valid_hex_number(&s, false) == ishex[i]);
- CHECK(godot_string_is_valid_hex_number(&s, true) == ishex_p[i]);
- CHECK(godot_string_is_valid_float(&s) == isflt[i]);
- CHECK(godot_string_is_valid_identifier(&s) == isid[i]);
- godot_string_destroy(&s);
- }
-}
-
-TEST_CASE("[GDNative String] humanize_size") {
- godot_string s;
-
- s = godot_string_humanize_size(1000);
- CHECK(u32scmp(godot_string_get_data(&s), U"1000 B") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_humanize_size(1025);
- CHECK(u32scmp(godot_string_get_data(&s), U"1.00 KiB") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_humanize_size(1025300);
- CHECK(u32scmp(godot_string_get_data(&s), U"1001.2 KiB") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_humanize_size(100523550);
- CHECK(u32scmp(godot_string_get_data(&s), U"95.86 MiB") == 0);
- godot_string_destroy(&s);
-
- s = godot_string_humanize_size(5345555000);
- CHECK(u32scmp(godot_string_get_data(&s), U"4.97 GiB") == 0);
- godot_string_destroy(&s);
-}
-} // namespace TestGDNativeString
-
-#endif // TEST_GDNATIVE_STRING_H
diff --git a/modules/gdnative/tests/test_variant.h b/modules/gdnative/tests/test_variant.h
new file mode 100644
index 0000000000..aeceb6e68f
--- /dev/null
+++ b/modules/gdnative/tests/test_variant.h
@@ -0,0 +1,205 @@
+/*************************************************************************/
+/* test_variant.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 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 TEST_GDNATIVE_VARIANT_H
+#define TEST_GDNATIVE_VARIANT_H
+
+#include <gdnative/gdnative.h>
+#include <gdnative/variant.h>
+
+#include "tests/test_macros.h"
+
+namespace TestGDNativeVariant {
+
+TEST_CASE("[GDNative Variant] New Variant with copy") {
+ godot_variant src;
+ godot_variant_new_int(&src, 42);
+
+ godot_variant copy;
+ godot_variant_new_copy(&copy, &src);
+
+ CHECK(godot_variant_as_int(&copy) == 42);
+ CHECK(godot_variant_get_type(&copy) == GODOT_VARIANT_TYPE_INT);
+
+ godot_variant_destroy(&src);
+ godot_variant_destroy(&copy);
+}
+
+TEST_CASE("[GDNative Variant] New Variant with Nil") {
+ godot_variant val;
+ godot_variant_new_nil(&val);
+
+ CHECK(godot_variant_get_type(&val) == GODOT_VARIANT_TYPE_NIL);
+
+ godot_variant_destroy(&val);
+}
+
+TEST_CASE("[GDNative Variant] New Variant with bool") {
+ godot_variant val;
+ godot_variant_new_bool(&val, true);
+
+ CHECK(godot_variant_as_bool(&val));
+ CHECK(godot_variant_get_type(&val) == GODOT_VARIANT_TYPE_BOOL);
+
+ godot_variant_destroy(&val);
+}
+
+TEST_CASE("[GDNative Variant] New Variant with float") {
+ godot_variant val;
+ godot_variant_new_float(&val, 4.2);
+
+ CHECK(godot_variant_as_float(&val) == 4.2);
+ CHECK(godot_variant_get_type(&val) == GODOT_VARIANT_TYPE_FLOAT);
+
+ godot_variant_destroy(&val);
+}
+
+TEST_CASE("[GDNative Variant] New Variant with String") {
+ String str = "something";
+
+ godot_variant val;
+ godot_variant_new_string(&val, (godot_string *)&str);
+ godot_string gd_str = godot_variant_as_string(&val);
+ String *result = (String *)&gd_str;
+
+ CHECK(*result == String("something"));
+ CHECK(godot_variant_get_type(&val) == GODOT_VARIANT_TYPE_STRING);
+
+ godot_variant_destroy(&val);
+ godot_string_destroy(&gd_str);
+}
+
+TEST_CASE("[GDNative Variant] Variant call") {
+ String str("something");
+ godot_variant self;
+ godot_variant_new_string(&self, (godot_string *)&str);
+
+ godot_variant ret;
+
+ godot_string_name method;
+ godot_string_name_new_with_latin1_chars(&method, "is_valid_identifier");
+
+ godot_variant_call_error error;
+ godot_variant_call(&self, &method, NULL, 0, &ret, &error);
+
+ CHECK(godot_variant_get_type(&ret) == GODOT_VARIANT_TYPE_BOOL);
+ CHECK(godot_variant_as_bool(&ret));
+
+ godot_variant_destroy(&ret);
+ godot_variant_destroy(&self);
+ godot_string_name_destroy(&method);
+}
+
+TEST_CASE("[GDNative Variant] Variant evaluate") {
+ godot_variant one;
+ godot_variant_new_int(&one, 1);
+ godot_variant two;
+ godot_variant_new_int(&two, 2);
+
+ godot_variant three;
+ godot_variant_new_nil(&three);
+ bool valid = false;
+
+ godot_variant_evaluate(GODOT_VARIANT_OP_ADD, &one, &two, &three, &valid);
+
+ CHECK(godot_variant_get_type(&three) == GODOT_VARIANT_TYPE_INT);
+ CHECK(godot_variant_as_int(&three) == 3);
+ CHECK(valid);
+
+ godot_variant_destroy(&one);
+ godot_variant_destroy(&two);
+ godot_variant_destroy(&three);
+}
+
+TEST_CASE("[GDNative Variant] Variant set/get named") {
+ godot_string_name x;
+ godot_string_name_new_with_latin1_chars(&x, "x");
+
+ Vector2 vec(0, 0);
+ godot_variant self;
+ godot_variant_new_vector2(&self, (godot_vector2 *)&vec);
+
+ godot_variant set;
+ godot_variant_new_float(&set, 1.0);
+
+ bool set_valid = false;
+ godot_variant_set_named(&self, &x, &set, &set_valid);
+
+ bool get_valid = false;
+ godot_variant get = godot_variant_get_named(&self, &x, &get_valid);
+
+ CHECK(get_valid);
+ CHECK(set_valid);
+ CHECK(godot_variant_get_type(&get) == GODOT_VARIANT_TYPE_FLOAT);
+ CHECK(godot_variant_as_float(&get) == 1.0);
+
+ godot_string_name_destroy(&x);
+ godot_variant_destroy(&self);
+ godot_variant_destroy(&set);
+ godot_variant_destroy(&get);
+}
+
+TEST_CASE("[GDNative Variant] Get utility function argument name") {
+ godot_string_name function;
+ godot_string_name_new_with_latin1_chars(&function, "pow");
+
+ godot_string arg_name = godot_variant_get_utility_function_argument_name(&function, 0);
+
+ String *arg_name_str = (String *)&arg_name;
+
+ CHECK(*arg_name_str == "base");
+
+ godot_string_destroy(&arg_name);
+ godot_string_name_destroy(&function);
+}
+
+TEST_CASE("[GDNative Variant] Get utility function list") {
+ int count = godot_variant_get_utility_function_count();
+
+ godot_string_name *c_list = (godot_string_name *)godot_alloc(count * sizeof(godot_string_name));
+ godot_variant_get_utility_function_list(c_list);
+
+ List<StringName> cpp_list;
+ Variant::get_utility_function_list(&cpp_list);
+
+ godot_string_name *cur = c_list;
+
+ for (const List<StringName>::Element *E = cpp_list.front(); E; E = E->next()) {
+ const StringName &cpp_name = E->get();
+ StringName *c_name = (StringName *)cur++;
+
+ CHECK(*c_name == cpp_name);
+ }
+
+ godot_free(c_list);
+}
+} // namespace TestGDNativeVariant
+
+#endif // TEST_GDNATIVE_VARIANT_H
diff --git a/modules/gdnative/text/text_server_gdnative.cpp b/modules/gdnative/text/text_server_gdnative.cpp
index f670d4af6f..7584568dd8 100644
--- a/modules/gdnative/text/text_server_gdnative.cpp
+++ b/modules/gdnative/text/text_server_gdnative.cpp
@@ -138,6 +138,26 @@ float TextServerGDNative::font_get_underline_thickness(RID p_font, int p_size) c
return interface->font_get_underline_thickness(data, (godot_rid *)&p_font, p_size);
}
+int TextServerGDNative::font_get_spacing_space(RID p_font) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0);
+ return interface->font_get_spacing_space(data, (godot_rid *)&p_font);
+}
+
+void TextServerGDNative::font_set_spacing_space(RID p_font, int p_value) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_spacing_space(data, (godot_rid *)&p_font, p_value);
+}
+
+int TextServerGDNative::font_get_spacing_glyph(RID p_font) const {
+ ERR_FAIL_COND_V(interface == nullptr, 0);
+ return interface->font_get_spacing_glyph(data, (godot_rid *)&p_font);
+}
+
+void TextServerGDNative::font_set_spacing_glyph(RID p_font, int p_value) {
+ ERR_FAIL_COND(interface == nullptr);
+ interface->font_set_spacing_glyph(data, (godot_rid *)&p_font, p_value);
+}
+
void TextServerGDNative::font_set_antialiased(RID p_font, bool p_antialiased) {
ERR_FAIL_COND(interface == nullptr);
interface->font_set_antialiased(data, (godot_rid *)&p_font, p_antialiased);
@@ -703,12 +723,12 @@ void GDAPI godot_glyph_set_offset(godot_glyph *p_self, const godot_vector2 *p_of
self->y_off = offset->y;
}
-godot_real GDAPI godot_glyph_get_advance(const godot_glyph *p_self) {
+godot_float GDAPI godot_glyph_get_advance(const godot_glyph *p_self) {
const TextServer::Glyph *self = (const TextServer::Glyph *)p_self;
return self->advance;
}
-void GDAPI godot_glyph_set_advance(godot_glyph *p_self, godot_real p_advance) {
+void GDAPI godot_glyph_set_advance(godot_glyph *p_self, godot_float p_advance) {
TextServer::Glyph *self = (TextServer::Glyph *)p_self;
self->advance = p_advance;
}
diff --git a/modules/gdnative/text/text_server_gdnative.h b/modules/gdnative/text/text_server_gdnative.h
index 9cbb94217e..9783b65431 100644
--- a/modules/gdnative/text/text_server_gdnative.h
+++ b/modules/gdnative/text/text_server_gdnative.h
@@ -72,6 +72,12 @@ public:
virtual float font_get_underline_position(RID p_font, int p_size) const override;
virtual float font_get_underline_thickness(RID p_font, int p_size) const override;
+ virtual int font_get_spacing_space(RID p_font) const override;
+ virtual void font_set_spacing_space(RID p_font, int p_value) override;
+
+ virtual int font_get_spacing_glyph(RID p_font) const override;
+ virtual void font_set_spacing_glyph(RID p_font, int p_value) override;
+
virtual void font_set_antialiased(RID p_font, bool p_antialiased) override;
virtual bool font_get_antialiased(RID p_font) const override;
diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp
index 18d26a9528..f2fb0a2fdc 100644
--- a/modules/gdnative/videodecoder/video_stream_gdnative.cpp
+++ b/modules/gdnative/videodecoder/video_stream_gdnative.cpp
@@ -250,7 +250,7 @@ void VideoStreamPlaybackGDNative::play() {
playing = true;
- delay_compensation = ProjectSettings::get_singleton()->get("audio/video_delay_compensation_ms");
+ delay_compensation = ProjectSettings::get_singleton()->get("audio/video/video_delay_compensation_ms");
delay_compensation /= 1000.0;
}
@@ -360,7 +360,7 @@ void VideoStreamGDNative::set_audio_track(int p_track) {
/* --- NOTE ResourceFormatLoaderVideoStreamGDNative starts here. ----- */
-RES ResourceFormatLoaderVideoStreamGDNative::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderVideoStreamGDNative::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
if (!f) {
if (r_error) {
diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.h b/modules/gdnative/videodecoder/video_stream_gdnative.h
index e64cda6602..140888cd4b 100644
--- a/modules/gdnative/videodecoder/video_stream_gdnative.h
+++ b/modules/gdnative/videodecoder/video_stream_gdnative.h
@@ -118,7 +118,7 @@ class VideoStreamPlaybackGDNative : public VideoStreamPlayback {
AudioMixCallback mix_callback = nullptr;
int num_channels = -1;
- float time = 0;
+ float time = 0.0;
bool seek_backward = false;
int mix_rate = 0;
double delay_compensation = 0;
@@ -196,7 +196,7 @@ public:
class ResourceFormatLoaderVideoStreamGDNative : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/modules/gdnative/xr/xr_interface_gdnative.cpp b/modules/gdnative/xr/xr_interface_gdnative.cpp
index d4fd2876b5..5bbf70174c 100644
--- a/modules/gdnative/xr/xr_interface_gdnative.cpp
+++ b/modules/gdnative/xr/xr_interface_gdnative.cpp
@@ -190,7 +190,7 @@ CameraMatrix XRInterfaceGDNative::get_projection_for_eye(XRInterface::Eyes p_eye
ERR_FAIL_COND_V(interface == nullptr, CameraMatrix());
- interface->fill_projection_for_eye(data, (godot_real *)cm.matrix, (godot_int)p_eye, p_aspect, p_z_near, p_z_far);
+ interface->fill_projection_for_eye(data, (godot_float *)cm.matrix, (godot_int)p_eye, p_aspect, p_z_near, p_z_far);
return cm;
}
@@ -234,7 +234,7 @@ void GDAPI godot_xr_register_interface(const godot_xr_interface_gdnative *p_inte
XRServer::get_singleton()->add_interface(new_interface);
}
-godot_real GDAPI godot_xr_get_worldscale() {
+godot_float GDAPI godot_xr_get_worldscale() {
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL_V(xr_server, 1.0);
@@ -249,7 +249,7 @@ godot_transform GDAPI godot_xr_get_reference_frame() {
if (xr_server != nullptr) {
*reference_frame_ptr = xr_server->get_reference_frame();
} else {
- godot_transform_new_identity(&reference_frame);
+ memnew_placement(&reference_frame, Transform);
}
return reference_frame;
@@ -387,7 +387,7 @@ void GDAPI godot_xr_set_controller_button(godot_int p_controller_id, godot_int p
}
}
-void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_axis, godot_real p_value, godot_bool p_can_be_negative) {
+void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_axis, godot_float p_value, godot_bool p_can_be_negative) {
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL(xr_server);
@@ -406,7 +406,7 @@ void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_a
}
}
-godot_real GDAPI godot_xr_get_controller_rumble(godot_int p_controller_id) {
+godot_float GDAPI godot_xr_get_controller_rumble(godot_int p_controller_id) {
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL_V(xr_server, 0.0);
diff --git a/modules/gdnavigation/nav_utils.h b/modules/gdnavigation/nav_utils.h
index d1d1687a1f..d257a95ef1 100644
--- a/modules/gdnavigation/nav_utils.h
+++ b/modules/gdnavigation/nav_utils.h
@@ -51,7 +51,7 @@ union PointKey {
int64_t z : 21;
};
- uint64_t key;
+ uint64_t key = 0;
bool operator<(const PointKey &p_key) const { return key < p_key.key; }
};
@@ -86,8 +86,6 @@ struct Edge {
/// The other `Polygon` at this edge id has this `Polygon`.
int other_edge = -1;
-
- Edge() {}
};
struct Polygon {
@@ -111,8 +109,6 @@ struct Connection {
int A_edge = -1;
Polygon *B = nullptr;
int B_edge = -1;
-
- Connection() {}
};
struct NavigationPoly {
@@ -141,12 +137,12 @@ struct NavigationPoly {
};
struct FreeEdge {
- bool is_free;
- Polygon *poly;
- uint32_t edge_id;
+ bool is_free = false;
+ Polygon *poly = nullptr;
+ uint32_t edge_id = 0;
Vector3 edge_center;
Vector3 edge_dir;
- float edge_len_squared;
+ float edge_len_squared = 0.0;
};
} // namespace gd
diff --git a/modules/gdnavigation/rvo_agent.h b/modules/gdnavigation/rvo_agent.h
index d9e3345498..369cb1f9a3 100644
--- a/modules/gdnavigation/rvo_agent.h
+++ b/modules/gdnavigation/rvo_agent.h
@@ -53,7 +53,7 @@ class RvoAgent : public NavRid {
NavMap *map = nullptr;
RVO::Agent agent;
AvoidanceComputedCallback callback;
- uint32_t map_update_id;
+ uint32_t map_update_id = 0;
public:
RvoAgent();
diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp
index b792ff54d6..ccc942d86b 100644
--- a/modules/gdscript/editor/gdscript_highlighter.cpp
+++ b/modules/gdscript/editor/gdscript_highlighter.cpp
@@ -269,19 +269,21 @@ Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting(int p_line)
col = keywords[word];
} else if (member_keywords.has(word)) {
col = member_keywords[word];
+ }
+
+ if (col != Color()) {
for (int k = j - 1; k >= 0; k--) {
if (str[k] == '.') {
- col = Color(); //member indexing not allowed
+ col = Color(); // keyword & member indexing not allowed
break;
} else if (str[k] > 32) {
break;
}
}
- }
-
- if (col != Color()) {
- in_keyword = true;
- keyword_color = col;
+ if (col != Color()) {
+ in_keyword = true;
+ keyword_color = col;
+ }
}
}
diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp b/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp
index 6e930b6bf4..9d0d91162c 100644
--- a/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp
+++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp
@@ -44,7 +44,7 @@ Error GDScriptEditorTranslationParserPlugin::parse_file(const String &p_path, Ve
// Search strings in AssignmentNode -> text = "__", hint_tooltip = "__" etc.
Error err;
- RES loaded_res = ResourceLoader::load(p_path, "", false, &err);
+ RES loaded_res = ResourceLoader::load(p_path, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err);
if (err) {
ERR_PRINT("Failed to load " + p_path);
return err;
diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.h b/modules/gdscript/editor/gdscript_translation_parser_plugin.h
index 5358a77140..fcf438422a 100644
--- a/modules/gdscript/editor/gdscript_translation_parser_plugin.h
+++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.h
@@ -39,8 +39,8 @@
class GDScriptEditorTranslationParserPlugin : public EditorTranslationParserPlugin {
GDCLASS(GDScriptEditorTranslationParserPlugin, EditorTranslationParserPlugin);
- Vector<String> *ids;
- Vector<Vector<String>> *ids_ctx_plural;
+ Vector<String> *ids = nullptr;
+ Vector<Vector<String>> *ids_ctx_plural = nullptr;
// List of patterns used for extracting translation strings.
StringName tr_func = "tr";
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 502e294275..a129b73c1a 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -219,7 +219,7 @@ StringName GDScript::get_instance_base_type() const {
}
struct _GDScriptMemberSort {
- int index;
+ int index = 0;
StringName name;
_FORCE_INLINE_ bool operator<(const _GDScriptMemberSort &p_member) const { return index < p_member.index; }
};
@@ -1162,17 +1162,6 @@ String GDScript::_get_gdscript_reference_class_name(const GDScript *p_gdscript)
GDScript::GDScript() :
script_list(this) {
- valid = false;
- subclass_count = 0;
- initializer = nullptr;
- _base = nullptr;
- _owner = nullptr;
- tool = false;
-#ifdef TOOLS_ENABLED
- source_changed_cache = false;
- placeholder_fallback_enabled = false;
-#endif
-
#ifdef DEBUG_ENABLED
{
MutexLock lock(GDScriptLanguage::get_singleton()->lock);
@@ -2327,7 +2316,7 @@ Ref<GDScript> GDScriptLanguage::get_orphan_subclass(const String &p_qualified_na
/*************** RESOURCE ***************/
-RES ResourceFormatLoaderGDScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderGDScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_FILE_CANT_OPEN;
}
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h
index 37f01b2571..12c909fd4f 100644
--- a/modules/gdscript/gdscript.h
+++ b/modules/gdscript/gdscript.h
@@ -57,11 +57,11 @@ public:
class GDScript : public Script {
GDCLASS(GDScript, Script);
- bool tool;
- bool valid;
+ bool tool = false;
+ bool valid = false;
struct MemberInfo {
- int index;
+ int index = 0;
StringName setter;
StringName getter;
MultiplayerAPI::RPCMode rpc_mode;
@@ -77,8 +77,8 @@ class GDScript : public Script {
Ref<GDScriptNativeClass> native;
Ref<GDScript> base;
- GDScript *_base; //fast pointer access
- GDScript *_owner; //for subclasses
+ GDScript *_base = nullptr; //fast pointer access
+ GDScript *_owner = nullptr; //for subclasses
Set<StringName> members; //members are just indices to the instanced script.
Map<StringName, Variant> constants;
@@ -97,8 +97,8 @@ class GDScript : public Script {
Map<StringName, Variant> member_default_values_cache;
Ref<GDScript> base_cache;
Set<ObjectID> inheriters_cache;
- bool source_changed_cache;
- bool placeholder_fallback_enabled;
+ bool source_changed_cache = false;
+ bool placeholder_fallback_enabled = false;
void _update_exports_values(Map<StringName, Variant> &values, List<PropertyInfo> &propnames);
DocData::ClassDoc doc;
@@ -121,7 +121,7 @@ class GDScript : public Script {
GDScriptFunction *implicit_initializer = nullptr;
GDScriptFunction *initializer = nullptr; //direct pointer to new , faster to locate
- int subclass_count;
+ int subclass_count = 0;
Set<Object *> instances;
//exported members
String source;
@@ -529,7 +529,7 @@ public:
class ResourceFormatLoaderGDScript : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/modules/gdscript/gdscript_compiler.h b/modules/gdscript/gdscript_compiler.h
index 00953ad752..651391f972 100644
--- a/modules/gdscript/gdscript_compiler.h
+++ b/modules/gdscript/gdscript_compiler.h
@@ -133,8 +133,8 @@ class GDScriptCompiler {
Error _parse_class_level(GDScript *p_script, const GDScriptParser::ClassNode *p_class, bool p_keep_state);
Error _parse_class_blocks(GDScript *p_script, const GDScriptParser::ClassNode *p_class, bool p_keep_state);
void _make_scripts(GDScript *p_script, const GDScriptParser::ClassNode *p_class, bool p_keep_state);
- int err_line;
- int err_column;
+ int err_line = 0;
+ int err_column = 0;
StringName source;
String error;
bool within_await = false;
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index 2171426e6f..c6c9a439df 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -77,14 +77,14 @@ int GDScriptFunction::get_max_stack_size() const {
}
struct _GDFKC {
- int order;
+ int order = 0;
List<int> pos;
};
struct _GDFKCS {
- int order;
+ int order = 0;
StringName id;
- int pos;
+ int pos = 0;
bool operator<(const _GDFKCS &p_r) const {
return order < p_r.order;
@@ -294,7 +294,6 @@ void GDScriptFunctionState::_bind_methods() {
GDScriptFunctionState::GDScriptFunctionState() :
scripts_list(this),
instances_list(this) {
- function = nullptr;
}
GDScriptFunctionState::~GDScriptFunctionState() {
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h
index 6c791836b9..e64630a743 100644
--- a/modules/gdscript/gdscript_function.h
+++ b/modules/gdscript/gdscript_function.h
@@ -420,19 +420,19 @@ private:
public:
struct CallState {
- GDScript *script;
- GDScriptInstance *instance;
+ GDScript *script = nullptr;
+ GDScriptInstance *instance = nullptr;
#ifdef DEBUG_ENABLED
StringName function_name;
String script_path;
#endif
Vector<uint8_t> stack;
- int stack_size;
+ int stack_size = 0;
Variant self;
- uint32_t alloca_size;
- int ip;
- int line;
- int defarg;
+ uint32_t alloca_size = 0;
+ int ip = 0;
+ int line = 0;
+ int defarg = 0;
Variant result;
};
@@ -488,7 +488,7 @@ public:
class GDScriptFunctionState : public Reference {
GDCLASS(GDScriptFunctionState, Reference);
friend class GDScriptFunction;
- GDScriptFunction *function;
+ GDScriptFunction *function = nullptr;
GDScriptFunction::CallState state;
Variant _signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
Ref<GDScriptFunctionState> first_state;
diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h
index f43708b81f..d59b68b602 100644
--- a/modules/gdscript/gdscript_parser.h
+++ b/modules/gdscript/gdscript_parser.h
@@ -351,7 +351,7 @@ public:
OP_COMP_GREATER_EQUAL,
};
- OpType operation;
+ OpType operation = OpType::OP_ADDITION;
Variant::Operator variant_op = Variant::OP_MAX;
ExpressionNode *left_operand = nullptr;
ExpressionNode *right_operand = nullptr;
@@ -753,7 +753,7 @@ public:
struct MatchBranchNode : public Node {
Vector<PatternNode *> patterns;
- SuiteNode *block;
+ SuiteNode *block = nullptr;
bool has_wildcard = false;
MatchBranchNode() {
@@ -1001,7 +1001,7 @@ public:
OP_LOGIC_NOT,
};
- OpType operation;
+ OpType operation = OP_POSITIVE;
Variant::Operator variant_op = Variant::OP_MAX;
ExpressionNode *operand = nullptr;
diff --git a/modules/gdscript/gdscript_tokenizer.h b/modules/gdscript/gdscript_tokenizer.h
index cdb0072294..bea4b14019 100644
--- a/modules/gdscript/gdscript_tokenizer.h
+++ b/modules/gdscript/gdscript_tokenizer.h
@@ -178,7 +178,6 @@ public:
}
Token() {
- type = EMPTY;
}
};
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp
index 5e3d6213d3..912c9a174e 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.cpp
+++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp
@@ -163,7 +163,7 @@ void GDScriptLanguageProtocol::_bind_methods() {
ClassDB::bind_method(D_METHOD("initialized", "params"), &GDScriptLanguageProtocol::initialized);
ClassDB::bind_method(D_METHOD("on_client_connected"), &GDScriptLanguageProtocol::on_client_connected);
ClassDB::bind_method(D_METHOD("on_client_disconnected"), &GDScriptLanguageProtocol::on_client_disconnected);
- ClassDB::bind_method(D_METHOD("notify_client", "method", "params"), &GDScriptLanguageProtocol::notify_client, DEFVAL(Variant()), DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("notify_client", "method", "params", "client_id"), &GDScriptLanguageProtocol::notify_client, DEFVAL(Variant()), DEFVAL(-1));
ClassDB::bind_method(D_METHOD("is_smart_resolve_enabled"), &GDScriptLanguageProtocol::is_smart_resolve_enabled);
ClassDB::bind_method(D_METHOD("get_text_document"), &GDScriptLanguageProtocol::get_text_document);
ClassDB::bind_method(D_METHOD("get_workspace"), &GDScriptLanguageProtocol::get_workspace);
diff --git a/modules/gdscript/language_server/gdscript_language_server.cpp b/modules/gdscript/language_server/gdscript_language_server.cpp
index aac9cb7fd7..98ada9de4d 100644
--- a/modules/gdscript/language_server/gdscript_language_server.cpp
+++ b/modules/gdscript/language_server/gdscript_language_server.cpp
@@ -36,12 +36,6 @@
#include "editor/editor_node.h"
GDScriptLanguageServer::GDScriptLanguageServer() {
- thread = nullptr;
- thread_running = false;
- started = false;
-
- use_thread = false;
- port = 6008;
_EDITOR_DEF("network/language_server/remote_port", port);
_EDITOR_DEF("network/language_server/enable_smart_resolve", true);
_EDITOR_DEF("network/language_server/show_native_symbols_in_editor", false);
@@ -87,9 +81,8 @@ void GDScriptLanguageServer::start() {
if (protocol.start(port, IP_Address("127.0.0.1")) == OK) {
EditorNode::get_log()->add_message("--- GDScript language server started ---", EditorLog::MSG_TYPE_EDITOR);
if (use_thread) {
- ERR_FAIL_COND(thread != nullptr);
thread_running = true;
- thread = Thread::create(GDScriptLanguageServer::thread_main, this);
+ thread.start(GDScriptLanguageServer::thread_main, this);
}
set_process_internal(!use_thread);
started = true;
@@ -98,11 +91,9 @@ void GDScriptLanguageServer::start() {
void GDScriptLanguageServer::stop() {
if (use_thread) {
- ERR_FAIL_COND(nullptr == thread);
+ ERR_FAIL_COND(!thread.is_started());
thread_running = false;
- Thread::wait_to_finish(thread);
- memdelete(thread);
- thread = nullptr;
+ thread.wait_to_finish();
}
protocol.stop();
started = false;
diff --git a/modules/gdscript/language_server/gdscript_language_server.h b/modules/gdscript/language_server/gdscript_language_server.h
index 218f42199e..29c5ddd70e 100644
--- a/modules/gdscript/language_server/gdscript_language_server.h
+++ b/modules/gdscript/language_server/gdscript_language_server.h
@@ -40,11 +40,11 @@ class GDScriptLanguageServer : public EditorPlugin {
GDScriptLanguageProtocol protocol;
- Thread *thread;
- bool thread_running;
- bool started;
- bool use_thread;
- int port;
+ Thread thread;
+ bool thread_running = false;
+ bool started = false;
+ bool use_thread = false;
+ int port = 6008;
static void thread_main(void *p_userdata);
private:
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index 7b502f079b..69cad1a335 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -350,7 +350,7 @@ Error GDScriptWorkspace::parse_local_script(const String &p_path) {
String GDScriptWorkspace::get_file_path(const String &p_uri) const {
String path = p_uri;
path = path.replace(root_uri + "/", "res://");
- path = path.http_unescape();
+ path = path.uri_decode();
return path;
}
diff --git a/modules/gdscript/language_server/lsp.hpp b/modules/gdscript/language_server/lsp.hpp
index 6a913edbbf..96744a15d7 100644
--- a/modules/gdscript/language_server/lsp.hpp
+++ b/modules/gdscript/language_server/lsp.hpp
@@ -547,7 +547,7 @@ struct TextDocumentItem {
* The version number of this document (it will increase after each
* change, including undo/redo).
*/
- int version;
+ int version = 0;
/**
* The content of the opened text document.
@@ -584,7 +584,7 @@ struct TextDocumentContentChangeEvent {
/**
* The length of the range that got replaced.
*/
- int rangeLength;
+ int rangeLength = 0;
/**
* The new text of the range/document.
@@ -656,12 +656,12 @@ struct Diagnostic {
* The diagnostic's severity. Can be omitted. If omitted it is up to the
* client to interpret diagnostics as error, warning, info or hint.
*/
- int severity;
+ int severity = 0;
/**
* The diagnostic's code, which might appear in the user interface.
*/
- int code;
+ int code = 0;
/**
* A human-readable string describing the source of this
@@ -833,7 +833,7 @@ struct CompletionItem {
* an icon is chosen by the editor. The standardized set
* of available values is defined in `CompletionItemKind`.
*/
- int kind;
+ int kind = 0;
/**
* A human-readable string with additional information
@@ -891,7 +891,7 @@ struct CompletionItem {
* The format of the insert text. The format applies to both the `insertText` property
* and the `newText` property of a provided `textEdit`.
*/
- int insertTextFormat;
+ int insertTextFormat = 0;
/**
* An edit which is applied to a document when selecting this completion. When an edit is provided the value of
@@ -1003,7 +1003,7 @@ struct CompletionList {
* This list it not complete. Further typing should result in recomputing
* this list.
*/
- bool isIncomplete;
+ bool isIncomplete = false;
/**
* The completion items.
diff --git a/modules/gltf/gltf_camera.h b/modules/gltf/gltf_camera.h
index e5c2041793..bf94b80bef 100644
--- a/modules/gltf/gltf_camera.h
+++ b/modules/gltf/gltf_camera.h
@@ -38,8 +38,8 @@ class GLTFCamera : public Resource {
private:
bool perspective = true;
- float fov_size = 75;
- float zfar = 4000;
+ float fov_size = 75.0;
+ float zfar = 4000.0;
float znear = 0.05;
protected:
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index ebf30b13f2..4868347a74 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -57,8 +57,12 @@
#include "core/version_hash.gen.h"
#include "drivers/png/png_driver_common.h"
#include "editor/import/resource_importer_scene.h"
+#ifdef MODULE_CSG_ENABLED
#include "modules/csg/csg_shape.h"
+#endif // MODULE_CSG_ENABLED
+#ifdef MODULE_GRIDMAP_ENABLED
#include "modules/gridmap/grid_map.h"
+#endif // MODULE_GRIDMAP_ENABLED
#include "modules/regex/regex.h"
#include "scene/2d/node_2d.h"
#include "scene/3d/bone_attachment_3d.h"
@@ -2387,7 +2391,7 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) {
e["targetNames"] = target_names;
for (int j = 0; j < target_names.size(); j++) {
- real_t weight = 0;
+ real_t weight = 0.0;
if (j < state->meshes.write[gltf_mesh_i]->get_blend_weights().size()) {
weight = state->meshes.write[gltf_mesh_i]->get_blend_weights()[j];
}
@@ -5101,7 +5105,6 @@ Node3D *GLTFDocument::_generate_spatial(Ref<GLTFState> state, Node *scene_parent
}
void GLTFDocument::_convert_scene_node(Ref<GLTFState> state, Node *p_current, Node *p_root, const GLTFNodeIndex p_gltf_parent, const GLTFNodeIndex p_gltf_root) {
bool retflag = true;
- Node3D *spatial = cast_to<Node3D>(p_current);
_check_visibility(p_current, retflag);
if (retflag) {
return;
@@ -5110,9 +5113,11 @@ void GLTFDocument::_convert_scene_node(Ref<GLTFState> state, Node *p_current, No
gltf_node.instance();
gltf_node->set_name(_gen_unique_name(state, p_current->get_name()));
if (cast_to<Node3D>(p_current)) {
+ Node3D *spatial = cast_to<Node3D>(p_current);
_convert_spatial(state, spatial, gltf_node);
}
if (cast_to<MeshInstance3D>(p_current)) {
+ Node3D *spatial = cast_to<Node3D>(p_current);
_convert_mesh_to_gltf(p_current, state, spatial, gltf_node);
} else if (cast_to<BoneAttachment3D>(p_current)) {
_convert_bone_attachment_to_gltf(p_current, state, gltf_node, retflag);
@@ -5124,18 +5129,22 @@ void GLTFDocument::_convert_scene_node(Ref<GLTFState> state, Node *p_current, No
return;
} else if (cast_to<MultiMeshInstance3D>(p_current)) {
_convert_mult_mesh_instance_to_gltf(p_current, p_gltf_parent, p_gltf_root, gltf_node, state, p_root);
+#ifdef MODULE_CSG_ENABLED
} else if (cast_to<CSGShape3D>(p_current)) {
if (p_current->get_parent() && cast_to<CSGShape3D>(p_current)->is_root_shape()) {
_convert_csg_shape_to_gltf(p_current, p_gltf_parent, gltf_node, state);
}
+#endif // MODULE_CSG_ENABLED
+#ifdef MODULE_GRIDMAP_ENABLED
} else if (cast_to<GridMap>(p_current)) {
_convert_grid_map_to_gltf(p_current, p_gltf_parent, p_gltf_root, gltf_node, state, p_root);
+#endif // MODULE_GRIDMAP_ENABLED
} else if (cast_to<Camera3D>(p_current)) {
Camera3D *camera = Object::cast_to<Camera3D>(p_current);
- _convert_camera_to_gltf(camera, state, spatial, gltf_node);
+ _convert_camera_to_gltf(camera, state, camera, gltf_node);
} else if (cast_to<Light3D>(p_current)) {
Light3D *light = Object::cast_to<Light3D>(p_current);
- _convert_light_to_gltf(light, state, spatial, gltf_node);
+ _convert_light_to_gltf(light, state, light, gltf_node);
} else if (cast_to<AnimationPlayer>(p_current)) {
AnimationPlayer *animation_player = Object::cast_to<AnimationPlayer>(p_current);
_convert_animation_player_to_gltf(animation_player, state, p_gltf_parent, p_gltf_root, gltf_node, p_current, p_root);
@@ -5154,6 +5163,7 @@ void GLTFDocument::_convert_scene_node(Ref<GLTFState> state, Node *p_current, No
}
}
+#ifdef MODULE_CSG_ENABLED
void GLTFDocument::_convert_csg_shape_to_gltf(Node *p_current, GLTFNodeIndex p_gltf_parent, Ref<GLTFNode> gltf_node, Ref<GLTFState> state) {
CSGShape3D *csg = Object::cast_to<CSGShape3D>(p_current);
csg->call("_update_shape");
@@ -5180,6 +5190,7 @@ void GLTFDocument::_convert_csg_shape_to_gltf(Node *p_current, GLTFNodeIndex p_g
gltf_node->xform = csg->get_meshes()[0];
gltf_node->set_name(_gen_unique_name(state, csg->get_name()));
}
+#endif // MODULE_CSG_ENABLED
void GLTFDocument::_create_gltf_node(Ref<GLTFState> state, Node *p_scene_parent, GLTFNodeIndex current_node_i,
GLTFNodeIndex p_parent_node_index, GLTFNodeIndex p_root_gltf_node, Ref<GLTFNode> gltf_node) {
@@ -5229,6 +5240,7 @@ void GLTFDocument::_convert_light_to_gltf(Light3D *light, Ref<GLTFState> state,
}
}
+#ifdef MODULE_GRIDMAP_ENABLED
void GLTFDocument::_convert_grid_map_to_gltf(Node *p_scene_parent, const GLTFNodeIndex &p_parent_node_index, const GLTFNodeIndex &p_root_node_index, Ref<GLTFNode> gltf_node, Ref<GLTFState> state, Node *p_root_node) {
GridMap *grid_map = Object::cast_to<GridMap>(p_scene_parent);
ERR_FAIL_COND(!grid_map);
@@ -5260,6 +5272,7 @@ void GLTFDocument::_convert_grid_map_to_gltf(Node *p_scene_parent, const GLTFNod
new_gltf_node->set_name(_gen_unique_name(state, grid_map->get_mesh_library()->get_item_name(cell)));
}
}
+#endif // MODULE_GRIDMAP_ENABLED
void GLTFDocument::_convert_mult_mesh_instance_to_gltf(Node *p_scene_parent, const GLTFNodeIndex &p_parent_node_index, const GLTFNodeIndex &p_root_node_index, Ref<GLTFNode> gltf_node, Ref<GLTFState> state, Node *p_root_node) {
MultiMeshInstance3D *multi_mesh_instance = Object::cast_to<MultiMeshInstance3D>(p_scene_parent);
@@ -5275,8 +5288,7 @@ void GLTFDocument::_convert_mult_mesh_instance_to_gltf(Node *p_scene_parent, con
transform.origin =
Vector3(xform_2d.get_origin().x, 0, xform_2d.get_origin().y);
real_t rotation = xform_2d.get_rotation();
- Quat quat;
- quat.set_axis_angle(Vector3(0, 1, 0), rotation);
+ Quat quat(Vector3(0, 1, 0), rotation);
Size2 scale = xform_2d.get_scale();
transform.basis.set_quat_scale(quat,
Vector3(scale.x, 0, scale.y));
@@ -5557,7 +5569,7 @@ void GLTFDocument::_import_animation(Ref<GLTFState> state, AnimationPlayer *ap,
animation->set_loop(true);
}
- float length = 0;
+ float length = 0.0;
for (Map<int, GLTFAnimation::Track>::Element *track_i = anim->get_tracks().front(); track_i; track_i = track_i->next()) {
const GLTFAnimation::Track &track = track_i->get();
@@ -6028,14 +6040,12 @@ GLTFAnimation::Track GLTFDocument::_convert_animation_track(Ref<GLTFState> state
p_track.rotation_track.interpolation = gltf_interpolation;
for (int32_t key_i = 0; key_i < key_count; key_i++) {
- Quat rotation;
Vector3 rotation_degrees = p_animation->track_get_key_value(p_track_i, key_i);
Vector3 rotation_radian;
rotation_radian.x = Math::deg2rad(rotation_degrees.x);
rotation_radian.y = Math::deg2rad(rotation_degrees.y);
rotation_radian.z = Math::deg2rad(rotation_degrees.z);
- rotation.set_euler(rotation_radian);
- p_track.rotation_track.values.write[key_i] = rotation;
+ p_track.rotation_track.values.write[key_i] = Quat(rotation_radian);
}
} else if (path.find(":scale") != -1) {
p_track.scale_track.times = times;
@@ -6287,18 +6297,22 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap,
}
}
} else if (String(orig_track_path).find(":") == -1) {
- const Node *node = ap->get_parent()->get_node_or_null(orig_track_path);
- for (Map<GLTFNodeIndex, Node *>::Element *scene_node_i = state->scene_nodes.front(); scene_node_i; scene_node_i = scene_node_i->next()) {
- if (scene_node_i->get() == node) {
- GLTFNodeIndex node_index = scene_node_i->key();
- Map<int, GLTFAnimation::Track>::Element *node_track_i = gltf_animation->get_tracks().find(node_index);
- GLTFAnimation::Track track;
- if (node_track_i) {
- track = node_track_i->get();
+ ERR_CONTINUE(!ap->get_parent());
+ for (int32_t node_i = 0; node_i < ap->get_parent()->get_child_count(); node_i++) {
+ const Node *child = ap->get_parent()->get_child(node_i);
+ const Node *node = child->get_node_or_null(orig_track_path);
+ for (Map<GLTFNodeIndex, Node *>::Element *scene_node_i = state->scene_nodes.front(); scene_node_i; scene_node_i = scene_node_i->next()) {
+ if (scene_node_i->get() == node) {
+ GLTFNodeIndex node_index = scene_node_i->key();
+ Map<int, GLTFAnimation::Track>::Element *node_track_i = gltf_animation->get_tracks().find(node_index);
+ GLTFAnimation::Track track;
+ if (node_track_i) {
+ track = node_track_i->get();
+ }
+ track = _convert_animation_track(state, track, animation, Transform(), track_i, node_index);
+ gltf_animation->get_tracks().insert(node_index, track);
+ break;
}
- track = _convert_animation_track(state, track, animation, Transform(), track_i, node_index);
- gltf_animation->get_tracks().insert(node_index, track);
- break;
}
}
}
diff --git a/modules/gltf/gltf_document.h b/modules/gltf/gltf_document.h
index 111324d1e6..ddf307e6a7 100644
--- a/modules/gltf/gltf_document.h
+++ b/modules/gltf/gltf_document.h
@@ -34,6 +34,7 @@
#include "editor/import/resource_importer_scene.h"
#include "editor/import/scene_importer_mesh_node_3d.h"
#include "gltf_animation.h"
+#include "modules/modules_enabled.gen.h"
#include "scene/2d/node_2d.h"
#include "scene/3d/bone_attachment_3d.h"
#include "scene/3d/light_3d.h"
@@ -377,7 +378,9 @@ public:
const GLTFNodeIndex p_gltf_current,
const GLTFNodeIndex p_gltf_root);
+#ifdef MODULE_CSG_ENABLED
void _convert_csg_shape_to_gltf(Node *p_current, GLTFNodeIndex p_gltf_parent, Ref<GLTFNode> gltf_node, Ref<GLTFState> state);
+#endif // MODULE_CSG_ENABLED
void _create_gltf_node(Ref<GLTFState> state,
Node *p_scene_parent,
@@ -395,12 +398,14 @@ public:
void _convert_camera_to_gltf(Camera3D *camera, Ref<GLTFState> state,
Node3D *spatial,
Ref<GLTFNode> gltf_node);
+#ifdef MODULE_GRIDMAP_ENABLED
void _convert_grid_map_to_gltf(
Node *p_scene_parent,
const GLTFNodeIndex &p_parent_node_index,
const GLTFNodeIndex &p_root_node_index,
Ref<GLTFNode> gltf_node, Ref<GLTFState> state,
Node *p_root_node);
+#endif // MODULE_GRIDMAP_ENABLED
void _convert_mult_mesh_instance_to_gltf(
Node *p_scene_parent,
const GLTFNodeIndex &p_parent_node_index,
diff --git a/modules/gltf/gltf_skin.cpp b/modules/gltf/gltf_skin.cpp
index fd39e4f45a..5a61e5778c 100644
--- a/modules/gltf/gltf_skin.cpp
+++ b/modules/gltf/gltf_skin.cpp
@@ -142,7 +142,7 @@ void GLTFSkin::set_joint_i_to_name(Dictionary p_joint_i_to_name) {
joint_i_to_name = Map<int, StringName>();
Array keys = p_joint_i_to_name.keys();
for (int i = 0; i < keys.size(); i++) {
- joint_i_to_name[keys[i]] = joint_i_to_name[keys[i]];
+ joint_i_to_name[keys[i]] = p_joint_i_to_name[keys[i]];
}
}
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index 4dccb03369..134aadb75e 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -8,6 +8,7 @@
GridMaps use a [MeshLibrary] which contains a list of tiles. Each tile is a mesh with materials plus optional collision and navigation shapes.
A GridMap contains a collection of cells. Each grid cell refers to a tile in the [MeshLibrary]. All cells in the map have the same dimensions.
Internally, a GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells.
+ [b]Note:[/b] GridMap doesn't extend [VisualInstance3D] and therefore can't be hidden or cull masked based on [member VisualInstance3D.layers]. If you make a light not affect the first layer, the whole GridMap won't be lit by the light in question.
</description>
<tutorials>
<link title="Using gridmaps">https://docs.godotengine.org/en/latest/tutorials/3d/using_gridmaps.html</link>
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index 5a17541075..e7c252dc53 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -189,7 +189,6 @@ void GridMap::set_mesh_library(const Ref<MeshLibrary> &p_mesh_library) {
}
_recreate_octant_data();
- _change_notify("mesh_library");
}
Ref<MeshLibrary> GridMap::get_mesh_library() const {
@@ -286,7 +285,8 @@ void GridMap::set_cell_item(const Vector3i &p_position, int p_item, int p_rot) {
//create octant because it does not exist
Octant *g = memnew(Octant);
g->dirty = true;
- g->static_body = PhysicsServer3D::get_singleton()->body_create(PhysicsServer3D::BODY_MODE_STATIC);
+ g->static_body = PhysicsServer3D::get_singleton()->body_create();
+ PhysicsServer3D::get_singleton()->body_set_mode(g->static_body, PhysicsServer3D::BODY_MODE_STATIC);
PhysicsServer3D::get_singleton()->body_attach_object_instance_id(g->static_body, get_instance_id());
PhysicsServer3D::get_singleton()->body_set_collision_layer(g->static_body, collision_layer);
PhysicsServer3D::get_singleton()->body_set_collision_mask(g->static_body, collision_mask);
@@ -491,7 +491,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
Octant::MultimeshInstance mmi;
RID mm = RS::get_singleton()->multimesh_create();
- RS::get_singleton()->multimesh_allocate(mm, E->get().size(), RS::MULTIMESH_TRANSFORM_3D);
+ RS::get_singleton()->multimesh_allocate_data(mm, E->get().size(), RS::MULTIMESH_TRANSFORM_3D);
RS::get_singleton()->multimesh_set_mesh(mm, mesh_library->get_item_mesh(E->key())->get_rid());
int idx = 0;
@@ -700,8 +700,6 @@ void GridMap::_update_visibility() {
return;
}
- _change_notify("visible");
-
for (Map<OctantKey, Octant *>::Element *e = octant_map.front(); e; e = e->next()) {
Octant *octant = e->value();
for (int i = 0; i < octant->multimesh_instances.size(); i++) {
@@ -1046,26 +1044,7 @@ RID GridMap::get_bake_mesh_instance(int p_idx) {
}
GridMap::GridMap() {
- collision_layer = 1;
- collision_mask = 1;
-
- cell_size = Vector3(2, 2, 2);
- octant_size = 8;
- awaiting_update = false;
- _in_tree = false;
- center_x = true;
- center_y = true;
- center_z = true;
-
- clip = false;
- clip_floor = 0;
- clip_axis = Vector3::AXIS_Z;
- clip_above = true;
- cell_scale = 1.0;
-
- navigation = nullptr;
set_notify_transform(true);
- recreating_octants = false;
}
GridMap::~GridMap() {
diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h
index 48ad95f9ff..e5ec4bb602 100644
--- a/modules/gridmap/grid_map.h
+++ b/modules/gridmap/grid_map.h
@@ -53,7 +53,7 @@ class GridMap : public Node3D {
int16_t y;
int16_t z;
};
- uint64_t key;
+ uint64_t key = 0;
_FORCE_INLINE_ bool operator<(const IndexKey &p_key) const {
return key < p_key.key;
@@ -68,7 +68,7 @@ class GridMap : public Node3D {
y = (int16_t)p_vector.y;
z = (int16_t)p_vector.z;
}
- IndexKey() { key = 0; }
+ IndexKey() {}
};
/**
@@ -80,13 +80,7 @@ class GridMap : public Node3D {
unsigned int rot : 5;
unsigned int layer : 8;
};
- uint32_t cell;
-
- Cell() {
- item = 0;
- rot = 0;
- layer = 0;
- }
+ uint32_t cell = 0;
};
/**
@@ -103,7 +97,7 @@ class GridMap : public Node3D {
RID instance;
RID multimesh;
struct Item {
- int index;
+ int index = 0;
Transform transform;
IndexKey key;
};
@@ -116,7 +110,7 @@ class GridMap : public Node3D {
RID collision_debug;
RID collision_debug_instance;
- bool dirty;
+ bool dirty = false;
RID static_body;
Map<IndexKey, NavMesh> navmesh_ids;
};
@@ -129,35 +123,37 @@ class GridMap : public Node3D {
int16_t empty;
};
- uint64_t key;
+ uint64_t key = 0;
_FORCE_INLINE_ bool operator<(const OctantKey &p_key) const {
return key < p_key.key;
}
//OctantKey(const IndexKey& p_k, int p_item) { indexkey=p_k.key; item=p_item; }
- OctantKey() { key = 0; }
+ OctantKey() {}
};
- uint32_t collision_layer;
- uint32_t collision_mask;
+ uint32_t collision_layer = 1;
+ uint32_t collision_mask = 1;
Transform last_transform;
- bool _in_tree;
- Vector3 cell_size;
- int octant_size;
- bool center_x, center_y, center_z;
- float cell_scale;
- Navigation3D *navigation;
+ bool _in_tree = false;
+ Vector3 cell_size = Vector3(2, 2, 2);
+ int octant_size = 8;
+ bool center_x = true;
+ bool center_y = true;
+ bool center_z = true;
+ float cell_scale = 1.0;
+ Navigation3D *navigation = nullptr;
- bool clip;
- bool clip_above;
- int clip_floor;
+ bool clip = false;
+ bool clip_above = true;
+ int clip_floor = 0;
- bool recreating_octants;
+ bool recreating_octants = false;
- Vector3::Axis clip_axis;
+ Vector3::Axis clip_axis = Vector3::AXIS_Z;
Ref<MeshLibrary> mesh_library;
@@ -167,10 +163,10 @@ class GridMap : public Node3D {
void _recreate_octant_data();
struct BakeLight {
- RS::LightType type;
+ RS::LightType type = RS::LightType::LIGHT_DIRECTIONAL;
Vector3 pos;
Vector3 dir;
- float param[RS::LIGHT_PARAM_MAX];
+ float param[RS::LIGHT_PARAM_MAX] = {};
};
_FORCE_INLINE_ Vector3 _octant_get_offset(const OctantKey &p_key) const {
@@ -183,7 +179,7 @@ class GridMap : public Node3D {
bool _octant_update(const OctantKey &p_key);
void _octant_clean_up(const OctantKey &p_key);
void _octant_transform(const OctantKey &p_key);
- bool awaiting_update;
+ bool awaiting_update = false;
void _queue_octants_dirty();
void _update_octants_callback();
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 4732a3f62d..da9cdb9bc5 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -769,7 +769,7 @@ bool GridMapEditor::forward_spatial_input_event(Camera3D *p_camera, const Ref<In
struct _CGMEItemSort {
String name;
- int id;
+ int id = 0;
_FORCE_INLINE_ bool operator<(const _CGMEItemSort &r_it) const { return name < r_it.name; }
};
@@ -1151,7 +1151,6 @@ void GridMapEditor::_bind_methods() {
}
GridMapEditor::GridMapEditor(EditorNode *p_editor) {
- input_action = INPUT_NONE;
editor = p_editor;
undo_redo = p_editor->get_undo_redo();
@@ -1173,7 +1172,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
floor->set_min(-32767);
floor->set_max(32767);
floor->set_step(1);
- floor->get_line_edit()->add_theme_constant_override("minimum_spaces", 16);
+ floor->get_line_edit()->add_theme_constant_override("minimum_character_width", 16);
spatial_editor_hb->add_child(floor);
floor->connect("value_changed", callable_mp(this, &GridMapEditor::_floor_changed));
@@ -1234,7 +1233,6 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
settings_pick_distance->set_value(EDITOR_DEF("editors/grid_map/pick_distance", 5000.0));
settings_vbc->add_margin_child(TTR("Pick Distance:"), settings_pick_distance);
- clip_mode = CLIP_DISABLED;
options->get_popup()->connect("id_pressed", callable_mp(this, &GridMapEditor::_menu_option));
HBoxContainer *hb = memnew(HBoxContainer);
@@ -1275,8 +1273,6 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
EDITOR_DEF("editors/grid_map/preview_size", 64);
- display_mode = DISPLAY_THUMBNAIL;
-
mesh_library_palette = memnew(ItemList);
add_child(mesh_library_palette);
mesh_library_palette->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1296,11 +1292,6 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
edit_floor[1] = -1;
edit_floor[2] = -1;
- cursor_visible = false;
- selected_palette = -1;
- lock_view = false;
- cursor_rot = 0;
-
selection_mesh = RenderingServer::get_singleton()->mesh_create();
paste_mesh = RenderingServer::get_singleton()->mesh_create();
@@ -1418,8 +1409,6 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
}
_set_selection(false);
- updating = false;
- accumulated_floor_delta = 0.0;
indicator_mat.instance();
indicator_mat->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h
index 0c0ec64680..6c7f0bedf6 100644
--- a/modules/gridmap/grid_map_editor_plugin.h
+++ b/modules/gridmap/grid_map_editor_plugin.h
@@ -65,11 +65,11 @@ class GridMapEditor : public VBoxContainer {
};
UndoRedo *undo_redo;
- InputAction input_action;
+ InputAction input_action = INPUT_NONE;
Panel *panel;
MenuButton *options;
SpinBox *floor;
- double accumulated_floor_delta;
+ double accumulated_floor_delta = 0.0;
Button *mode_thumbnail;
Button *mode_list;
LineEdit *search_box;
@@ -82,19 +82,19 @@ class GridMapEditor : public VBoxContainer {
struct SetItem {
Vector3i position;
- int new_value;
- int new_orientation;
- int old_value;
- int old_orientation;
+ int new_value = 0;
+ int new_orientation = 0;
+ int old_value = 0;
+ int old_orientation = 0;
};
List<SetItem> set_items;
GridMap *node = nullptr;
MeshLibrary *last_mesh_library;
- ClipMode clip_mode;
+ ClipMode clip_mode = CLIP_DISABLED;
- bool lock_view;
+ bool lock_view = false;
Transform grid_xform;
Transform edit_grid_xform;
Vector3::Axis edit_axis;
@@ -112,9 +112,9 @@ class GridMapEditor : public VBoxContainer {
RID paste_instance;
struct ClipboardItem {
- int cell_item;
+ int cell_item = 0;
Vector3 grid_offset;
- int orientation;
+ int orientation = 0;
RID instance;
};
@@ -125,14 +125,14 @@ class GridMapEditor : public VBoxContainer {
Ref<StandardMaterial3D> outer_mat;
Ref<StandardMaterial3D> selection_floor_mat;
- bool updating;
+ bool updating = false;
struct Selection {
Vector3 click;
Vector3 current;
Vector3 begin;
Vector3 end;
- bool active;
+ bool active = false;
} selection;
Selection last_selection;
@@ -141,18 +141,18 @@ class GridMapEditor : public VBoxContainer {
Vector3 current;
Vector3 begin;
Vector3 end;
- int orientation;
+ int orientation = 0;
};
PasteIndicator paste_indicator;
- bool cursor_visible;
+ bool cursor_visible = false;
Transform cursor_transform;
Vector3 cursor_origin;
- int display_mode;
- int selected_palette;
- int cursor_rot;
+ int display_mode = DISPLAY_THUMBNAIL;
+ int selected_palette = -1;
+ int cursor_rot = 0;
enum Menu {
MENU_OPTION_NEXT_LEVEL,
diff --git a/modules/icloud/SCsub b/modules/icloud/SCsub
deleted file mode 100644
index 805a484600..0000000000
--- a/modules/icloud/SCsub
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-Import("env_modules")
-
-env_icloud = env_modules.Clone()
-
-# (iOS) Enable module support
-env_icloud.Append(CCFLAGS=["-fmodules", "-fcxx-modules"])
-
-# (iOS) Build as separate static library
-modules_sources = []
-env_icloud.add_source_files(modules_sources, "*.cpp")
-env_icloud.add_source_files(modules_sources, "*.mm")
-mod_lib = env_modules.add_library("#bin/libgodot_icloud_module" + env["LIBSUFFIX"], modules_sources)
diff --git a/modules/icloud/config.py b/modules/icloud/config.py
deleted file mode 100644
index e68603fc93..0000000000
--- a/modules/icloud/config.py
+++ /dev/null
@@ -1,6 +0,0 @@
-def can_build(env, platform):
- return platform == "iphone"
-
-
-def configure(env):
- pass
diff --git a/modules/icloud/icloud.gdip b/modules/icloud/icloud.gdip
deleted file mode 100644
index 9f81be8a34..0000000000
--- a/modules/icloud/icloud.gdip
+++ /dev/null
@@ -1,17 +0,0 @@
-[config]
-name="iCloud"
-binary="icloud_lib.a"
-
-initialization="register_icloud_types"
-deinitialization="unregister_icloud_types"
-
-[dependencies]
-linked=[]
-embedded=[]
-system=[]
-
-capabilities=[]
-
-files=[]
-
-[plist]
diff --git a/modules/icloud/icloud.h b/modules/icloud/icloud.h
deleted file mode 100644
index 7b7aa52b63..0000000000
--- a/modules/icloud/icloud.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************/
-/* icloud.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 ICLOUD_H
-#define ICLOUD_H
-
-#include "core/object/class_db.h"
-
-class ICloud : public Object {
- GDCLASS(ICloud, Object);
-
- static ICloud *instance;
- static void _bind_methods();
-
- List<Variant> pending_events;
-
-public:
- Error remove_key(String p_param);
- Array set_key_values(Dictionary p_params);
- Variant get_key_value(String p_param);
- Error synchronize_key_values();
- Variant get_all_key_values();
-
- int get_pending_event_count();
- Variant pop_pending_event();
-
- static ICloud *get_singleton();
-
- ICloud();
- ~ICloud();
-};
-
-#endif
diff --git a/modules/icloud/icloud.mm b/modules/icloud/icloud.mm
deleted file mode 100644
index 937ef38018..0000000000
--- a/modules/icloud/icloud.mm
+++ /dev/null
@@ -1,345 +0,0 @@
-/*************************************************************************/
-/* icloud.mm */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "icloud.h"
-
-#import "platform/iphone/app_delegate.h"
-
-#import <Foundation/Foundation.h>
-
-ICloud *ICloud::instance = NULL;
-
-void ICloud::_bind_methods() {
- ClassDB::bind_method(D_METHOD("remove_key"), &ICloud::remove_key);
-
- ClassDB::bind_method(D_METHOD("set_key_values"), &ICloud::set_key_values);
- ClassDB::bind_method(D_METHOD("get_key_value"), &ICloud::get_key_value);
-
- ClassDB::bind_method(D_METHOD("synchronize_key_values"), &ICloud::synchronize_key_values);
- ClassDB::bind_method(D_METHOD("get_all_key_values"), &ICloud::get_all_key_values);
-
- ClassDB::bind_method(D_METHOD("get_pending_event_count"), &ICloud::get_pending_event_count);
- ClassDB::bind_method(D_METHOD("pop_pending_event"), &ICloud::pop_pending_event);
-};
-
-int ICloud::get_pending_event_count() {
- return pending_events.size();
-};
-
-Variant ICloud::pop_pending_event() {
- Variant front = pending_events.front()->get();
- pending_events.pop_front();
-
- return front;
-};
-
-ICloud *ICloud::get_singleton() {
- return instance;
-};
-
-//convert from apple's abstract type to godot's abstract type....
-Variant nsobject_to_variant(NSObject *object) {
- if ([object isKindOfClass:[NSString class]]) {
- const char *str = [(NSString *)object UTF8String];
- return String::utf8(str != NULL ? str : "");
- } else if ([object isKindOfClass:[NSData class]]) {
- PackedByteArray ret;
- NSData *data = (NSData *)object;
- if ([data length] > 0) {
- ret.resize([data length]);
- {
- // PackedByteArray::Write w = ret.write();
- copymem((void *)ret.ptr(), [data bytes], [data length]);
- }
- }
- return ret;
- } else if ([object isKindOfClass:[NSArray class]]) {
- Array result;
- NSArray *array = (NSArray *)object;
- for (NSUInteger i = 0; i < [array count]; ++i) {
- NSObject *value = [array objectAtIndex:i];
- result.push_back(nsobject_to_variant(value));
- }
- return result;
- } else if ([object isKindOfClass:[NSDictionary class]]) {
- Dictionary result;
- NSDictionary *dic = (NSDictionary *)object;
-
- NSArray *keys = [dic allKeys];
- int count = [keys count];
- for (int i = 0; i < count; ++i) {
- NSObject *k = [keys objectAtIndex:i];
- NSObject *v = [dic objectForKey:k];
-
- result[nsobject_to_variant(k)] = nsobject_to_variant(v);
- }
- return result;
- } else if ([object isKindOfClass:[NSNumber class]]) {
- //Every type except numbers can reliably identify its type. The following is comparing to the *internal* representation, which isn't guaranteed to match the type that was used to create it, and is not advised, particularly when dealing with potential platform differences (ie, 32/64 bit)
- //To avoid errors, we'll cast as broadly as possible, and only return int or float.
- //bool, char, int, uint, longlong -> int
- //float, double -> float
- NSNumber *num = (NSNumber *)object;
- if (strcmp([num objCType], @encode(BOOL)) == 0) {
- return Variant((int)[num boolValue]);
- } else if (strcmp([num objCType], @encode(char)) == 0) {
- return Variant((int)[num charValue]);
- } else if (strcmp([num objCType], @encode(int)) == 0) {
- return Variant([num intValue]);
- } else if (strcmp([num objCType], @encode(unsigned int)) == 0) {
- return Variant((int)[num unsignedIntValue]);
- } else if (strcmp([num objCType], @encode(long long)) == 0) {
- return Variant((int)[num longValue]);
- } else if (strcmp([num objCType], @encode(float)) == 0) {
- return Variant([num floatValue]);
- } else if (strcmp([num objCType], @encode(double)) == 0) {
- return Variant((float)[num doubleValue]);
- } else {
- return Variant();
- }
- } else if ([object isKindOfClass:[NSDate class]]) {
- //this is a type that icloud supports...but how did you submit it in the first place?
- //I guess this is a type that *might* show up, if you were, say, trying to make your game
- //compatible with existing cloud data written by another engine's version of your game
- WARN_PRINT("NSDate unsupported, returning null Variant");
- return Variant();
- } else if ([object isKindOfClass:[NSNull class]] or object == nil) {
- return Variant();
- } else {
- WARN_PRINT("Trying to convert unknown NSObject type to Variant");
- return Variant();
- }
-}
-
-NSObject *variant_to_nsobject(Variant v) {
- if (v.get_type() == Variant::STRING) {
- return [[NSString alloc] initWithUTF8String:((String)v).utf8().get_data()];
- } else if (v.get_type() == Variant::FLOAT) {
- return [NSNumber numberWithDouble:(double)v];
- } else if (v.get_type() == Variant::INT) {
- return [NSNumber numberWithLongLong:(long)(int)v];
- } else if (v.get_type() == Variant::BOOL) {
- return [NSNumber numberWithBool:BOOL((bool)v)];
- } else if (v.get_type() == Variant::DICTIONARY) {
- NSMutableDictionary *result = [[NSMutableDictionary alloc] init];
- Dictionary dic = v;
- Array keys = dic.keys();
- for (int i = 0; i < keys.size(); ++i) {
- NSString *key = [[NSString alloc] initWithUTF8String:((String)(keys[i])).utf8().get_data()];
- NSObject *value = variant_to_nsobject(dic[keys[i]]);
-
- if (key == NULL || value == NULL) {
- return NULL;
- }
-
- [result setObject:value forKey:key];
- }
- return result;
- } else if (v.get_type() == Variant::ARRAY) {
- NSMutableArray *result = [[NSMutableArray alloc] init];
- Array arr = v;
- for (int i = 0; i < arr.size(); ++i) {
- NSObject *value = variant_to_nsobject(arr[i]);
- if (value == NULL) {
- //trying to add something unsupported to the array. cancel the whole array
- return NULL;
- }
- [result addObject:value];
- }
- return result;
- } else if (v.get_type() == Variant::PACKED_BYTE_ARRAY) {
- PackedByteArray arr = v;
- // PackedByteArray::Read r = arr.read();
- NSData *result = [NSData dataWithBytes:arr.ptr() length:arr.size()];
- return result;
- }
- WARN_PRINT(String("Could not add unsupported type to iCloud: '" + Variant::get_type_name(v.get_type()) + "'").utf8().get_data());
- return NULL;
-}
-
-Error ICloud::remove_key(String p_param) {
- NSString *key = [[NSString alloc] initWithUTF8String:p_param.utf8().get_data()];
-
- NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore];
-
- if (![[store dictionaryRepresentation] objectForKey:key]) {
- return ERR_INVALID_PARAMETER;
- }
-
- [store removeObjectForKey:key];
- return OK;
-}
-
-//return an array of the keys that could not be set
-Array ICloud::set_key_values(Dictionary p_params) {
- Array keys = p_params.keys();
-
- Array error_keys;
-
- for (int i = 0; i < keys.size(); ++i) {
- String variant_key = keys[i];
- Variant variant_value = p_params[variant_key];
-
- NSString *key = [[NSString alloc] initWithUTF8String:variant_key.utf8().get_data()];
- if (key == NULL) {
- error_keys.push_back(variant_key);
- continue;
- }
-
- NSObject *value = variant_to_nsobject(variant_value);
-
- if (value == NULL) {
- error_keys.push_back(variant_key);
- continue;
- }
-
- NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore];
- [store setObject:value forKey:key];
- }
-
- return error_keys;
-}
-
-Variant ICloud::get_key_value(String p_param) {
- NSString *key = [[NSString alloc] initWithUTF8String:p_param.utf8().get_data()];
- NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore];
-
- if (![[store dictionaryRepresentation] objectForKey:key]) {
- return Variant();
- }
-
- Variant result = nsobject_to_variant([[store dictionaryRepresentation] objectForKey:key]);
-
- return result;
-}
-
-Variant ICloud::get_all_key_values() {
- Dictionary result;
-
- NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore];
- NSDictionary *store_dictionary = [store dictionaryRepresentation];
-
- NSArray *keys = [store_dictionary allKeys];
- int count = [keys count];
- for (int i = 0; i < count; ++i) {
- NSString *k = [keys objectAtIndex:i];
- NSObject *v = [store_dictionary objectForKey:k];
-
- const char *str = [k UTF8String];
- if (str != NULL) {
- result[String::utf8(str)] = nsobject_to_variant(v);
- }
- }
-
- return result;
-}
-
-Error ICloud::synchronize_key_values() {
- NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore];
- BOOL result = [store synchronize];
- if (result == YES) {
- return OK;
- } else {
- return FAILED;
- }
-}
-
-/*
-Error ICloud::initial_sync() {
- //you sometimes have to write something to the store to get it to download new data. go apple!
- NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore];
- if ([store boolForKey:@"isb"])
- {
- [store setBool:NO forKey:@"isb"];
- }
- else
- {
- [store setBool:YES forKey:@"isb"];
- }
- return synchronize();
-}
-
-*/
-ICloud::ICloud() {
- ERR_FAIL_COND(instance != NULL);
- instance = this;
- //connected = false;
-
- [[NSNotificationCenter defaultCenter]
- addObserverForName:NSUbiquitousKeyValueStoreDidChangeExternallyNotification
- object:[NSUbiquitousKeyValueStore defaultStore]
- queue:nil
- usingBlock:^(NSNotification *notification) {
- NSDictionary *userInfo = [notification userInfo];
- NSInteger change = [[userInfo objectForKey:NSUbiquitousKeyValueStoreChangeReasonKey] integerValue];
-
- Dictionary ret;
- ret["type"] = "key_value_changed";
-
- //PackedStringArray result_keys;
- //Array result_values;
- Dictionary keyValues;
- String reason = "";
-
- if (change == NSUbiquitousKeyValueStoreServerChange) {
- reason = "server";
- } else if (change == NSUbiquitousKeyValueStoreInitialSyncChange) {
- reason = "initial_sync";
- } else if (change == NSUbiquitousKeyValueStoreQuotaViolationChange) {
- reason = "quota_violation";
- } else if (change == NSUbiquitousKeyValueStoreAccountChange) {
- reason = "account";
- }
-
- ret["reason"] = reason;
-
- NSUbiquitousKeyValueStore *store = [NSUbiquitousKeyValueStore defaultStore];
-
- NSArray *keys = [userInfo objectForKey:NSUbiquitousKeyValueStoreChangedKeysKey];
- for (NSString *key in keys) {
- const char *str = [key UTF8String];
- if (str == NULL) {
- continue;
- }
-
- NSObject *object = [store objectForKey:key];
-
- //figure out what kind of object it is
- Variant value = nsobject_to_variant(object);
-
- keyValues[String::utf8(str)] = value;
- }
-
- ret["changed_values"] = keyValues;
- pending_events.push_back(ret);
- }];
-}
-
-ICloud::~ICloud() {}
diff --git a/modules/icloud/icloud_module.h b/modules/icloud/icloud_module.h
deleted file mode 100644
index fb8b5fe66e..0000000000
--- a/modules/icloud/icloud_module.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************************************/
-/* icloud_module.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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. */
-/*************************************************************************/
-
-void register_icloud_types();
-void unregister_icloud_types();
diff --git a/modules/inappstore/SCsub b/modules/inappstore/SCsub
deleted file mode 100644
index cee6a256d5..0000000000
--- a/modules/inappstore/SCsub
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-Import("env_modules")
-
-env_inappstore = env_modules.Clone()
-
-# (iOS) Enable module support
-env_inappstore.Append(CCFLAGS=["-fmodules", "-fcxx-modules"])
-
-# (iOS) Build as separate static library
-modules_sources = []
-env_inappstore.add_source_files(modules_sources, "*.cpp")
-env_inappstore.add_source_files(modules_sources, "*.mm")
-mod_lib = env_modules.add_library("#bin/libgodot_inappstore_module" + env["LIBSUFFIX"], modules_sources)
diff --git a/modules/inappstore/config.py b/modules/inappstore/config.py
deleted file mode 100644
index e68603fc93..0000000000
--- a/modules/inappstore/config.py
+++ /dev/null
@@ -1,6 +0,0 @@
-def can_build(env, platform):
- return platform == "iphone"
-
-
-def configure(env):
- pass
diff --git a/modules/inappstore/in_app_store.h b/modules/inappstore/in_app_store.h
deleted file mode 100644
index c66c306319..0000000000
--- a/modules/inappstore/in_app_store.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*************************************************************************/
-/* in_app_store.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 IN_APP_STORE_H
-#define IN_APP_STORE_H
-
-#include "core/object/class_db.h"
-
-#ifdef __OBJC__
-@class GodotProductsDelegate;
-@class GodotTransactionsObserver;
-
-typedef GodotProductsDelegate InAppStoreProductDelegate;
-typedef GodotTransactionsObserver InAppStoreTransactionObserver;
-#else
-typedef void InAppStoreProductDelegate;
-typedef void InAppStoreTransactionObserver;
-#endif
-
-class InAppStore : public Object {
- GDCLASS(InAppStore, Object);
-
- static InAppStore *instance;
- static void _bind_methods();
-
- List<Variant> pending_events;
-
- InAppStoreProductDelegate *products_request_delegate;
- InAppStoreTransactionObserver *transactions_observer;
-
-public:
- Error request_product_info(Dictionary p_params);
- Error restore_purchases();
- Error purchase(Dictionary p_params);
-
- int get_pending_event_count();
- Variant pop_pending_event();
- void finish_transaction(String product_id);
- void set_auto_finish_transaction(bool b);
-
- void _post_event(Variant p_event);
- void _record_purchase(String product_id);
-
- static InAppStore *get_singleton();
-
- InAppStore();
- ~InAppStore();
-};
-
-#endif
diff --git a/modules/inappstore/in_app_store.mm b/modules/inappstore/in_app_store.mm
deleted file mode 100644
index 427808ae75..0000000000
--- a/modules/inappstore/in_app_store.mm
+++ /dev/null
@@ -1,411 +0,0 @@
-/*************************************************************************/
-/* in_app_store.mm */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "in_app_store.h"
-
-#import <Foundation/Foundation.h>
-#import <StoreKit/StoreKit.h>
-
-InAppStore *InAppStore::instance = NULL;
-
-@interface SKProduct (LocalizedPrice)
-
-@property(nonatomic, readonly) NSString *localizedPrice;
-
-@end
-
-//----------------------------------//
-// SKProduct extension
-//----------------------------------//
-@implementation SKProduct (LocalizedPrice)
-
-- (NSString *)localizedPrice {
- NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
- [numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
- [numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
- [numberFormatter setLocale:self.priceLocale];
- NSString *formattedString = [numberFormatter stringFromNumber:self.price];
- return formattedString;
-}
-
-@end
-
-@interface GodotProductsDelegate : NSObject <SKProductsRequestDelegate>
-
-@property(nonatomic, strong) NSMutableArray *loadedProducts;
-@property(nonatomic, strong) NSMutableArray *pendingRequests;
-
-- (void)performRequestWithProductIDs:(NSSet *)productIDs;
-- (Error)purchaseProductWithProductID:(NSString *)productID;
-- (void)reset;
-
-@end
-
-@implementation GodotProductsDelegate
-
-- (instancetype)init {
- self = [super init];
-
- if (self) {
- [self godot_commonInit];
- }
-
- return self;
-}
-
-- (void)godot_commonInit {
- self.loadedProducts = [NSMutableArray new];
- self.pendingRequests = [NSMutableArray new];
-}
-
-- (void)performRequestWithProductIDs:(NSSet *)productIDs {
- SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:productIDs];
-
- request.delegate = self;
- [self.pendingRequests addObject:request];
- [request start];
-}
-
-- (Error)purchaseProductWithProductID:(NSString *)productID {
- SKProduct *product = nil;
-
- NSLog(@"searching for product!");
-
- if (self.loadedProducts) {
- for (SKProduct *storedProduct in self.loadedProducts) {
- if ([storedProduct.productIdentifier isEqualToString:productID]) {
- product = storedProduct;
- break;
- }
- }
- }
-
- if (!product) {
- return ERR_INVALID_PARAMETER;
- }
-
- NSLog(@"product found!");
-
- SKPayment *payment = [SKPayment paymentWithProduct:product];
- [[SKPaymentQueue defaultQueue] addPayment:payment];
-
- NSLog(@"purchase sent!");
-
- return OK;
-}
-
-- (void)reset {
- [self.loadedProducts removeAllObjects];
- [self.pendingRequests removeAllObjects];
-}
-
-- (void)request:(SKRequest *)request didFailWithError:(NSError *)error {
- [self.pendingRequests removeObject:request];
-
- Dictionary ret;
- ret["type"] = "product_info";
- ret["result"] = "error";
- ret["error"] = String::utf8([error.localizedDescription UTF8String]);
-
- InAppStore::get_singleton()->_post_event(ret);
-}
-
-- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
- [self.pendingRequests removeObject:request];
-
- NSArray *products = response.products;
- [self.loadedProducts addObjectsFromArray:products];
-
- Dictionary ret;
- ret["type"] = "product_info";
- ret["result"] = "ok";
- PackedStringArray titles;
- PackedStringArray descriptions;
- PackedFloat32Array prices;
- PackedStringArray ids;
- PackedStringArray localized_prices;
- PackedStringArray currency_codes;
-
- for (NSUInteger i = 0; i < [products count]; i++) {
- SKProduct *product = [products objectAtIndex:i];
-
- const char *str = [product.localizedTitle UTF8String];
- titles.push_back(String::utf8(str != NULL ? str : ""));
-
- str = [product.localizedDescription UTF8String];
- descriptions.push_back(String::utf8(str != NULL ? str : ""));
- prices.push_back([product.price doubleValue]);
- ids.push_back(String::utf8([product.productIdentifier UTF8String]));
- localized_prices.push_back(String::utf8([product.localizedPrice UTF8String]));
- currency_codes.push_back(String::utf8([[[product priceLocale] objectForKey:NSLocaleCurrencyCode] UTF8String]));
- }
-
- ret["titles"] = titles;
- ret["descriptions"] = descriptions;
- ret["prices"] = prices;
- ret["ids"] = ids;
- ret["localized_prices"] = localized_prices;
- ret["currency_codes"] = currency_codes;
-
- PackedStringArray invalid_ids;
-
- for (NSString *ipid in response.invalidProductIdentifiers) {
- invalid_ids.push_back(String::utf8([ipid UTF8String]));
- }
-
- ret["invalid_ids"] = invalid_ids;
-
- InAppStore::get_singleton()->_post_event(ret);
-}
-
-@end
-
-@interface GodotTransactionsObserver : NSObject <SKPaymentTransactionObserver>
-
-@property(nonatomic, assign) BOOL shouldAutoFinishTransactions;
-@property(nonatomic, strong) NSMutableDictionary *pendingTransactions;
-
-- (void)finishTransactionWithProductID:(NSString *)productID;
-- (void)reset;
-
-@end
-
-@implementation GodotTransactionsObserver
-
-- (instancetype)init {
- self = [super init];
-
- if (self) {
- [self godot_commonInit];
- }
-
- return self;
-}
-
-- (void)godot_commonInit {
- self.pendingTransactions = [NSMutableDictionary new];
-}
-
-- (void)finishTransactionWithProductID:(NSString *)productID {
- SKPaymentTransaction *transaction = self.pendingTransactions[productID];
-
- if (transaction) {
- [[SKPaymentQueue defaultQueue] finishTransaction:transaction];
- }
-
- self.pendingTransactions[productID] = nil;
-}
-
-- (void)reset {
- [self.pendingTransactions removeAllObjects];
-}
-
-- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions {
- printf("transactions updated!\n");
- for (SKPaymentTransaction *transaction in transactions) {
- switch (transaction.transactionState) {
- case SKPaymentTransactionStatePurchased: {
- printf("status purchased!\n");
- String pid = String::utf8([transaction.payment.productIdentifier UTF8String]);
- String transactionId = String::utf8([transaction.transactionIdentifier UTF8String]);
- InAppStore::get_singleton()->_record_purchase(pid);
- Dictionary ret;
- ret["type"] = "purchase";
- ret["result"] = "ok";
- ret["product_id"] = pid;
- ret["transaction_id"] = transactionId;
-
- NSData *receipt = nil;
- int sdk_version = [[[UIDevice currentDevice] systemVersion] intValue];
-
- NSBundle *bundle = [NSBundle mainBundle];
- // Get the transaction receipt file path location in the app bundle.
- NSURL *receiptFileURL = [bundle appStoreReceiptURL];
-
- // Read in the contents of the transaction file.
- receipt = [NSData dataWithContentsOfURL:receiptFileURL];
-
- NSString *receipt_to_send = nil;
-
- if (receipt != nil) {
- receipt_to_send = [receipt base64EncodedStringWithOptions:0];
- }
- Dictionary receipt_ret;
- receipt_ret["receipt"] = String::utf8(receipt_to_send != nil ? [receipt_to_send UTF8String] : "");
- receipt_ret["sdk"] = sdk_version;
- ret["receipt"] = receipt_ret;
-
- InAppStore::get_singleton()->_post_event(ret);
-
- if (self.shouldAutoFinishTransactions) {
- [[SKPaymentQueue defaultQueue] finishTransaction:transaction];
- } else {
- self.pendingTransactions[transaction.payment.productIdentifier] = transaction;
- }
-
- } break;
- case SKPaymentTransactionStateFailed: {
- printf("status transaction failed!\n");
- String pid = String::utf8([transaction.payment.productIdentifier UTF8String]);
- Dictionary ret;
- ret["type"] = "purchase";
- ret["result"] = "error";
- ret["product_id"] = pid;
- ret["error"] = String::utf8([transaction.error.localizedDescription UTF8String]);
- InAppStore::get_singleton()->_post_event(ret);
- [[SKPaymentQueue defaultQueue] finishTransaction:transaction];
- } break;
- case SKPaymentTransactionStateRestored: {
- printf("status transaction restored!\n");
- String pid = String::utf8([transaction.originalTransaction.payment.productIdentifier UTF8String]);
- InAppStore::get_singleton()->_record_purchase(pid);
- Dictionary ret;
- ret["type"] = "restore";
- ret["result"] = "ok";
- ret["product_id"] = pid;
- InAppStore::get_singleton()->_post_event(ret);
- [[SKPaymentQueue defaultQueue] finishTransaction:transaction];
- } break;
- default: {
- printf("status default %i!\n", (int)transaction.transactionState);
- } break;
- }
- }
-}
-
-@end
-
-void InAppStore::_bind_methods() {
- ClassDB::bind_method(D_METHOD("request_product_info"), &InAppStore::request_product_info);
- ClassDB::bind_method(D_METHOD("restore_purchases"), &InAppStore::restore_purchases);
- ClassDB::bind_method(D_METHOD("purchase"), &InAppStore::purchase);
-
- ClassDB::bind_method(D_METHOD("get_pending_event_count"), &InAppStore::get_pending_event_count);
- ClassDB::bind_method(D_METHOD("pop_pending_event"), &InAppStore::pop_pending_event);
- ClassDB::bind_method(D_METHOD("finish_transaction"), &InAppStore::finish_transaction);
- ClassDB::bind_method(D_METHOD("set_auto_finish_transaction"), &InAppStore::set_auto_finish_transaction);
-}
-
-Error InAppStore::request_product_info(Dictionary p_params) {
- ERR_FAIL_COND_V(!p_params.has("product_ids"), ERR_INVALID_PARAMETER);
-
- PackedStringArray pids = p_params["product_ids"];
- printf("************ request product info! %i\n", pids.size());
-
- NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:pids.size()];
- for (int i = 0; i < pids.size(); i++) {
- printf("******** adding %s to product list\n", pids[i].utf8().get_data());
- NSString *pid = [[NSString alloc] initWithUTF8String:pids[i].utf8().get_data()];
- [array addObject:pid];
- };
-
- NSSet *products = [[NSSet alloc] initWithArray:array];
-
- [products_request_delegate performRequestWithProductIDs:products];
-
- return OK;
-}
-
-Error InAppStore::restore_purchases() {
- printf("restoring purchases!\n");
- [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
-
- return OK;
-}
-
-Error InAppStore::purchase(Dictionary p_params) {
- ERR_FAIL_COND_V(![SKPaymentQueue canMakePayments], ERR_UNAVAILABLE);
- if (![SKPaymentQueue canMakePayments]) {
- return ERR_UNAVAILABLE;
- }
-
- printf("purchasing!\n");
- Dictionary params = p_params;
- ERR_FAIL_COND_V(!params.has("product_id"), ERR_INVALID_PARAMETER);
-
- NSString *pid = [[NSString alloc] initWithUTF8String:String(params["product_id"]).utf8().get_data()];
-
- return [products_request_delegate purchaseProductWithProductID:pid];
-}
-
-int InAppStore::get_pending_event_count() {
- return pending_events.size();
-}
-
-Variant InAppStore::pop_pending_event() {
- Variant front = pending_events.front()->get();
- pending_events.pop_front();
-
- return front;
-}
-
-void InAppStore::_post_event(Variant p_event) {
- pending_events.push_back(p_event);
-}
-
-void InAppStore::_record_purchase(String product_id) {
- String skey = "purchased/" + product_id;
- NSString *key = [[NSString alloc] initWithUTF8String:skey.utf8().get_data()];
- [[NSUserDefaults standardUserDefaults] setBool:YES forKey:key];
- [[NSUserDefaults standardUserDefaults] synchronize];
-}
-
-InAppStore *InAppStore::get_singleton() {
- return instance;
-}
-
-InAppStore::InAppStore() {
- ERR_FAIL_COND(instance != NULL);
- instance = this;
-
- products_request_delegate = [[GodotProductsDelegate alloc] init];
- transactions_observer = [[GodotTransactionsObserver alloc] init];
-
- [[SKPaymentQueue defaultQueue] addTransactionObserver:transactions_observer];
-}
-
-void InAppStore::finish_transaction(String product_id) {
- NSString *prod_id = [NSString stringWithCString:product_id.utf8().get_data() encoding:NSUTF8StringEncoding];
-
- [transactions_observer finishTransactionWithProductID:prod_id];
-}
-
-void InAppStore::set_auto_finish_transaction(bool b) {
- transactions_observer.shouldAutoFinishTransactions = b;
-}
-
-InAppStore::~InAppStore() {
- [products_request_delegate reset];
- [transactions_observer reset];
-
- products_request_delegate = nil;
- [[SKPaymentQueue defaultQueue] removeTransactionObserver:transactions_observer];
- transactions_observer = nil;
-}
diff --git a/modules/inappstore/in_app_store_module.cpp b/modules/inappstore/in_app_store_module.cpp
deleted file mode 100644
index c89735cd1c..0000000000
--- a/modules/inappstore/in_app_store_module.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************************************/
-/* in_app_store_module.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "in_app_store_module.h"
-
-#include "core/config/engine.h"
-
-#include "in_app_store.h"
-
-InAppStore *store_kit;
-
-void register_inappstore_types() {
- store_kit = memnew(InAppStore);
- Engine::get_singleton()->add_singleton(Engine::Singleton("InAppStore", store_kit));
-}
-
-void unregister_inappstore_types() {
- if (store_kit) {
- memdelete(store_kit);
- }
-}
diff --git a/modules/inappstore/in_app_store_module.h b/modules/inappstore/in_app_store_module.h
deleted file mode 100644
index dc38969825..0000000000
--- a/modules/inappstore/in_app_store_module.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************************************/
-/* in_app_store_module.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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. */
-/*************************************************************************/
-
-void register_inappstore_types();
-void unregister_inappstore_types();
diff --git a/modules/inappstore/inappstore.gdip b/modules/inappstore/inappstore.gdip
deleted file mode 100644
index 7a5efb8ad3..0000000000
--- a/modules/inappstore/inappstore.gdip
+++ /dev/null
@@ -1,17 +0,0 @@
-[config]
-name="InAppStore"
-binary="inappstore_lib.a"
-
-initialization="register_inappstore_types"
-deinitialization="unregister_inappstore_types"
-
-[dependencies]
-linked=[]
-embedded=[]
-system=["StoreKit.framework"]
-
-capabilities=[]
-
-files=[]
-
-[plist]
diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp
index 3067e002d8..61ebabdfb6 100644
--- a/modules/lightmapper_rd/lightmapper_rd.cpp
+++ b/modules/lightmapper_rd/lightmapper_rd.cpp
@@ -93,8 +93,8 @@ void LightmapperRD::add_spot_light(bool p_static, const Vector3 &p_position, con
l.direction[2] = p_direction.z;
l.range = p_range;
l.attenuation = p_attenuation;
- l.spot_angle = Math::deg2rad(p_spot_angle);
- l.spot_attenuation = p_spot_attenuation;
+ l.cos_spot_angle = Math::cos(Math::deg2rad(p_spot_angle));
+ l.inv_spot_attenuation = 1.0f / p_spot_attenuation;
l.color[0] = p_color.r;
l.color[1] = p_color.g;
l.color[2] = p_color.b;
@@ -1225,23 +1225,23 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
switch (p_quality) {
case BAKE_QUALITY_LOW: {
- push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/low_quality_ray_count");
+ push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/low_quality_ray_count");
} break;
case BAKE_QUALITY_MEDIUM: {
- push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/medium_quality_ray_count");
+ push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/medium_quality_ray_count");
} break;
case BAKE_QUALITY_HIGH: {
- push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/high_quality_ray_count");
+ push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/high_quality_ray_count");
} break;
case BAKE_QUALITY_ULTRA: {
- push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/ultra_quality_ray_count");
+ push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/ultra_quality_ray_count");
} break;
}
push_constant.ray_count = CLAMP(push_constant.ray_count, 16, 8192);
- int max_region_size = nearest_power_of_2_templated(int(GLOBAL_GET("rendering/gpu_lightmapper/performance/region_size")));
- int max_rays = GLOBAL_GET("rendering/gpu_lightmapper/performance/max_rays_per_pass");
+ int max_region_size = nearest_power_of_2_templated(int(GLOBAL_GET("rendering/lightmapping/bake_performance/region_size")));
+ int max_rays = GLOBAL_GET("rendering/lightmapping/bake_performance/max_rays_per_pass");
int x_regions = (atlas_size.width - 1) / max_region_size + 1;
int y_regions = (atlas_size.height - 1) / max_region_size + 1;
@@ -1347,23 +1347,23 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
switch (p_quality) {
case BAKE_QUALITY_LOW: {
- push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/low_quality_probe_ray_count");
+ push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/low_quality_probe_ray_count");
} break;
case BAKE_QUALITY_MEDIUM: {
- push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/medium_quality_probe_ray_count");
+ push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/medium_quality_probe_ray_count");
} break;
case BAKE_QUALITY_HIGH: {
- push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/high_quality_probe_ray_count");
+ push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/high_quality_probe_ray_count");
} break;
case BAKE_QUALITY_ULTRA: {
- push_constant.ray_count = GLOBAL_GET("rendering/gpu_lightmapper/quality/ultra_quality_probe_ray_count");
+ push_constant.ray_count = GLOBAL_GET("rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count");
} break;
}
push_constant.atlas_size[0] = probe_positions.size();
push_constant.ray_count = CLAMP(push_constant.ray_count, 16, 8192);
- int max_rays = GLOBAL_GET("rendering/gpu_lightmapper/performance/max_rays_per_probe_pass");
+ int max_rays = GLOBAL_GET("rendering/lightmapping/bake_performance/max_rays_per_probe_pass");
int ray_iterations = (push_constant.ray_count - 1) / max_rays + 1;
for (int i = 0; i < ray_iterations; i++) {
@@ -1436,7 +1436,7 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
dst[j + 3] = src[j + 3];
}
}
- rd->texture_update(light_accum_tex, i, ds, true);
+ rd->texture_update(light_accum_tex, i, ds);
}
}
}
@@ -1537,7 +1537,7 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d
{
//pre copy
for (int i = 0; i < atlas_slices * (p_bake_sh ? 4 : 1); i++) {
- rd->texture_copy(light_accum_tex, light_accum_tex2, Vector3(), Vector3(), Vector3(atlas_size.width, atlas_size.height, 1), 0, 0, i, i, true);
+ rd->texture_copy(light_accum_tex, light_accum_tex2, Vector3(), Vector3(), Vector3(atlas_size.width, atlas_size.height, 1), 0, 0, i, i);
}
Vector<RID> framebuffers;
diff --git a/modules/lightmapper_rd/lightmapper_rd.h b/modules/lightmapper_rd/lightmapper_rd.h
index bb735baf6c..f2a826a447 100644
--- a/modules/lightmapper_rd/lightmapper_rd.h
+++ b/modules/lightmapper_rd/lightmapper_rd.h
@@ -46,18 +46,18 @@ class LightmapperRD : public Lightmapper {
};
struct Light {
- float position[3];
+ float position[3] = {};
uint32_t type = LIGHT_TYPE_DIRECTIONAL;
- float direction[3];
- float energy;
- float color[3];
- float size;
- float range;
- float attenuation;
- float spot_angle;
- float spot_attenuation;
- uint32_t static_bake;
- uint32_t pad[3];
+ float direction[3] = {};
+ float energy = 0.0;
+ float color[3] = {};
+ float size = 0.0;
+ float range = 0.0;
+ float attenuation = 0.0;
+ float cos_spot_angle = 0.0;
+ float inv_spot_attenuation = 0.0;
+ uint32_t static_bake = 0;
+ uint32_t pad[3] = {};
bool operator<(const Light &p_light) const {
return type < p_light.type;
@@ -65,10 +65,10 @@ class LightmapperRD : public Lightmapper {
};
struct Vertex {
- float position[3];
- float normal_z;
- float uv[2];
- float normal_xy[2];
+ float position[3] = {};
+ float normal_z = 0.0;
+ float uv[2] = {};
+ float normal_xy[2] = {};
bool operator==(const Vertex &p_vtx) const {
return (position[0] == p_vtx.position[0]) &&
@@ -102,7 +102,7 @@ class LightmapperRD : public Lightmapper {
};
struct Probe {
- float position[4];
+ float position[4] = {};
};
Vector<Probe> probe_positions;
@@ -158,15 +158,15 @@ class LightmapperRD : public Lightmapper {
};
struct Box {
- float min_bounds[3];
- float pad0;
- float max_bounds[3];
- float pad1;
+ float min_bounds[3] = {};
+ float pad0 = 0.0;
+ float max_bounds[3] = {};
+ float pad1 = 0.0;
};
struct Triangle {
- uint32_t indices[3];
- uint32_t slice;
+ uint32_t indices[3] = {};
+ uint32_t slice = 0;
bool operator<(const Triangle &p_triangle) const {
return slice < p_triangle.slice;
}
@@ -177,8 +177,8 @@ class LightmapperRD : public Lightmapper {
Vector<Light> lights;
struct TriangleSort {
- uint32_t cell_index;
- uint32_t triangle_index;
+ uint32_t cell_index = 0;
+ uint32_t triangle_index = 0;
bool operator<(const TriangleSort &p_triangle_sort) const {
return cell_index < p_triangle_sort.cell_index; //sorting by triangle index in this case makes no sense
}
@@ -187,44 +187,44 @@ class LightmapperRD : public Lightmapper {
void _plot_triangle_into_triangle_index_list(int p_size, const Vector3i &p_ofs, const AABB &p_bounds, const Vector3 p_points[], uint32_t p_triangle_index, LocalVector<TriangleSort> &triangles, uint32_t p_grid_size);
struct RasterPushConstant {
- float atlas_size[2];
- float uv_offset[2];
- float to_cell_size[3];
- uint32_t base_triangle;
- float to_cell_offset[3];
- float bias;
- int32_t grid_size[3];
- uint32_t pad2;
+ float atlas_size[2] = {};
+ float uv_offset[2] = {};
+ float to_cell_size[3] = {};
+ uint32_t base_triangle = 0;
+ float to_cell_offset[3] = {};
+ float bias = 0.0;
+ int32_t grid_size[3] = {};
+ uint32_t pad2 = 0;
};
struct RasterSeamsPushConstant {
- uint32_t base_index;
- uint32_t slice;
- float uv_offset[2];
- uint32_t debug;
- float blend;
- uint32_t pad[2];
+ uint32_t base_index = 0;
+ uint32_t slice = 0;
+ float uv_offset[2] = {};
+ uint32_t debug = 0;
+ float blend = 0.0;
+ uint32_t pad[2] = {};
};
struct PushConstant {
- int32_t atlas_size[2];
- uint32_t ray_count;
- uint32_t ray_to;
+ int32_t atlas_size[2] = {};
+ uint32_t ray_count = 0;
+ uint32_t ray_to = 0;
- float world_size[3];
- float bias;
+ float world_size[3] = {};
+ float bias = 0.0;
- float to_cell_offset[3];
- uint32_t ray_from;
+ float to_cell_offset[3] = {};
+ uint32_t ray_from = 0;
- float to_cell_size[3];
- uint32_t light_count;
+ float to_cell_size[3] = {};
+ uint32_t light_count = 0;
- int32_t grid_size;
- int32_t atlas_slice;
- int32_t region_ofs[2];
+ int32_t grid_size = 0;
+ int32_t atlas_slice = 0;
+ int32_t region_ofs[2] = {};
- float environment_xform[12];
+ float environment_xform[12] = {};
};
Vector<Ref<Image>> bake_textures;
diff --git a/modules/lightmapper_rd/lm_common_inc.glsl b/modules/lightmapper_rd/lm_common_inc.glsl
index 0ff455936e..f8a0cd16de 100644
--- a/modules/lightmapper_rd/lm_common_inc.glsl
+++ b/modules/lightmapper_rd/lm_common_inc.glsl
@@ -56,8 +56,8 @@ struct Light {
float range;
float attenuation;
- float spot_angle;
- float spot_attenuation;
+ float cos_spot_angle;
+ float inv_spot_attenuation;
bool static_bake;
uint pad[3];
diff --git a/modules/lightmapper_rd/lm_compute.glsl b/modules/lightmapper_rd/lm_compute.glsl
index 8a9adbc5cc..eb9d817f99 100644
--- a/modules/lightmapper_rd/lm_compute.glsl
+++ b/modules/lightmapper_rd/lm_compute.glsl
@@ -313,13 +313,16 @@ void main() {
if (lights.data[i].type == LIGHT_TYPE_SPOT) {
vec3 rel = normalize(position - light_pos);
- float angle = acos(dot(rel, lights.data[i].direction));
- if (angle > lights.data[i].spot_angle) {
+ float cos_spot_angle = lights.data[i].cos_spot_angle;
+ float cos_angle = dot(rel, lights.data[i].direction);
+
+ if (cos_angle < cos_spot_angle) {
continue; //invisible, dont try
}
- float d = clamp(angle / lights.data[i].spot_angle, 0, 1);
- attenuation *= pow(1.0 - d, lights.data[i].spot_attenuation);
+ float scos = max(cos_angle, cos_spot_angle);
+ float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - cos_spot_angle));
+ attenuation *= 1.0 - pow(spot_rim, lights.data[i].inv_spot_attenuation);
}
}
diff --git a/modules/lightmapper_rd/register_types.cpp b/modules/lightmapper_rd/register_types.cpp
index a7b8c063fd..191bb3d765 100644
--- a/modules/lightmapper_rd/register_types.cpp
+++ b/modules/lightmapper_rd/register_types.cpp
@@ -41,18 +41,18 @@ static Lightmapper *create_lightmapper_rd() {
#endif
void register_lightmapper_rd_types() {
- GLOBAL_DEF("rendering/gpu_lightmapper/quality/low_quality_ray_count", 16);
- GLOBAL_DEF("rendering/gpu_lightmapper/quality/medium_quality_ray_count", 64);
- GLOBAL_DEF("rendering/gpu_lightmapper/quality/high_quality_ray_count", 256);
- GLOBAL_DEF("rendering/gpu_lightmapper/quality/ultra_quality_ray_count", 1024);
- GLOBAL_DEF("rendering/gpu_lightmapper/performance/max_rays_per_pass", 32);
- GLOBAL_DEF("rendering/gpu_lightmapper/performance/region_size", 512);
+ GLOBAL_DEF("rendering/lightmapping/bake_quality/low_quality_ray_count", 16);
+ GLOBAL_DEF("rendering/lightmapping/bake_quality/medium_quality_ray_count", 64);
+ GLOBAL_DEF("rendering/lightmapping/bake_quality/high_quality_ray_count", 256);
+ GLOBAL_DEF("rendering/lightmapping/bake_quality/ultra_quality_ray_count", 1024);
+ GLOBAL_DEF("rendering/lightmapping/bake_performance/max_rays_per_pass", 32);
+ GLOBAL_DEF("rendering/lightmapping/bake_performance/region_size", 512);
- GLOBAL_DEF("rendering/gpu_lightmapper/quality/low_quality_probe_ray_count", 64);
- GLOBAL_DEF("rendering/gpu_lightmapper/quality/medium_quality_probe_ray_count", 256);
- GLOBAL_DEF("rendering/gpu_lightmapper/quality/high_quality_probe_ray_count", 512);
- GLOBAL_DEF("rendering/gpu_lightmapper/quality/ultra_quality_probe_ray_count", 2048);
- GLOBAL_DEF("rendering/gpu_lightmapper/performance/max_rays_per_probe_pass", 64);
+ GLOBAL_DEF("rendering/lightmapping/bake_quality/low_quality_probe_ray_count", 64);
+ GLOBAL_DEF("rendering/lightmapping/bake_quality/medium_quality_probe_ray_count", 256);
+ GLOBAL_DEF("rendering/lightmapping/bake_quality/high_quality_probe_ray_count", 512);
+ GLOBAL_DEF("rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count", 2048);
+ GLOBAL_DEF("rendering/lightmapping/bake_performance/max_rays_per_probe_pass", 64);
#ifndef _3D_DISABLED
ClassDB::register_class<LightmapperRD>();
Lightmapper::create_gpu = create_lightmapper_rd;
diff --git a/modules/mbedtls/packet_peer_mbed_dtls.cpp b/modules/mbedtls/packet_peer_mbed_dtls.cpp
index b2f8d668bf..8a6cdfb131 100644
--- a/modules/mbedtls/packet_peer_mbed_dtls.cpp
+++ b/modules/mbedtls/packet_peer_mbed_dtls.cpp
@@ -246,7 +246,6 @@ int PacketPeerMbedDTLS::get_max_packet_size() const {
PacketPeerMbedDTLS::PacketPeerMbedDTLS() {
ssl_ctx.instance();
- status = STATUS_DISCONNECTED;
}
PacketPeerMbedDTLS::~PacketPeerMbedDTLS() {
diff --git a/modules/mbedtls/packet_peer_mbed_dtls.h b/modules/mbedtls/packet_peer_mbed_dtls.h
index 0feec04c6e..6554c74a21 100644
--- a/modules/mbedtls/packet_peer_mbed_dtls.h
+++ b/modules/mbedtls/packet_peer_mbed_dtls.h
@@ -44,7 +44,7 @@ private:
uint8_t packet_buffer[PACKET_BUFFER_SIZE];
- Status status;
+ Status status = STATUS_DISCONNECTED;
String hostname;
Ref<PacketPeerUDP> base;
diff --git a/modules/mbedtls/ssl_context_mbedtls.cpp b/modules/mbedtls/ssl_context_mbedtls.cpp
index 046f30588a..cbb532587f 100644
--- a/modules/mbedtls/ssl_context_mbedtls.cpp
+++ b/modules/mbedtls/ssl_context_mbedtls.cpp
@@ -76,7 +76,6 @@ void CookieContextMbedTLS::clear() {
}
CookieContextMbedTLS::CookieContextMbedTLS() {
- inited = false;
}
CookieContextMbedTLS::~CookieContextMbedTLS() {
@@ -205,7 +204,6 @@ mbedtls_ssl_context *SSLContextMbedTLS::get_context() {
}
SSLContextMbedTLS::SSLContextMbedTLS() {
- inited = false;
}
SSLContextMbedTLS::~SSLContextMbedTLS() {
diff --git a/modules/mbedtls/ssl_context_mbedtls.h b/modules/mbedtls/ssl_context_mbedtls.h
index d243185726..30632018a8 100644
--- a/modules/mbedtls/ssl_context_mbedtls.h
+++ b/modules/mbedtls/ssl_context_mbedtls.h
@@ -50,7 +50,7 @@ class CookieContextMbedTLS : public Reference {
friend class SSLContextMbedTLS;
protected:
- bool inited;
+ bool inited = false;
mbedtls_entropy_context entropy;
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_cookie_ctx cookie_ctx;
@@ -65,7 +65,7 @@ public:
class SSLContextMbedTLS : public Reference {
protected:
- bool inited;
+ bool inited = false;
static PackedByteArray _read_file(String p_path);
diff --git a/modules/mbedtls/stream_peer_mbedtls.cpp b/modules/mbedtls/stream_peer_mbedtls.cpp
index 1332d0923c..d7597aa435 100644
--- a/modules/mbedtls/stream_peer_mbedtls.cpp
+++ b/modules/mbedtls/stream_peer_mbedtls.cpp
@@ -274,7 +274,6 @@ int StreamPeerMbedTLS::get_available_bytes() const {
StreamPeerMbedTLS::StreamPeerMbedTLS() {
ssl_ctx.instance();
- status = STATUS_DISCONNECTED;
}
StreamPeerMbedTLS::~StreamPeerMbedTLS() {
diff --git a/modules/mbedtls/stream_peer_mbedtls.h b/modules/mbedtls/stream_peer_mbedtls.h
index ccbbebe4f8..b89d7fb238 100644
--- a/modules/mbedtls/stream_peer_mbedtls.h
+++ b/modules/mbedtls/stream_peer_mbedtls.h
@@ -36,7 +36,7 @@
class StreamPeerMbedTLS : public StreamPeerSSL {
private:
- Status status;
+ Status status = STATUS_DISCONNECTED;
String hostname;
Ref<StreamPeer> base;
diff --git a/modules/minimp3/audio_stream_mp3.cpp b/modules/minimp3/audio_stream_mp3.cpp
index 8627f71987..b128b81000 100644
--- a/modules/minimp3/audio_stream_mp3.cpp
+++ b/modules/minimp3/audio_stream_mp3.cpp
@@ -159,7 +159,8 @@ void AudioStreamMP3::set_data(const Vector<uint8_t> &p_data) {
const uint8_t *src_datar = p_data.ptr();
mp3dec_ex_t mp3d;
- mp3dec_ex_open_buf(&mp3d, src_datar, src_data_len, MP3D_SEEK_TO_SAMPLE);
+ int err = mp3dec_ex_open_buf(&mp3d, src_datar, src_data_len, MP3D_SEEK_TO_SAMPLE);
+ ERR_FAIL_COND(err != 0);
channels = mp3d.info.channels;
sample_rate = mp3d.info.hz;
diff --git a/modules/minimp3/audio_stream_mp3.h b/modules/minimp3/audio_stream_mp3.h
index de02ba6003..ce001fc418 100644
--- a/modules/minimp3/audio_stream_mp3.h
+++ b/modules/minimp3/audio_stream_mp3.h
@@ -78,11 +78,11 @@ class AudioStreamMP3 : public AudioStream {
void *data = nullptr;
uint32_t data_len = 0;
- float sample_rate = 1;
+ float sample_rate = 1.0;
int channels = 1;
- float length = 0;
+ float length = 0.0;
bool loop = false;
- float loop_offset = 0;
+ float loop_offset = 0.0;
void clear_data();
protected:
diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp
index a9073ea4a0..25b110dc62 100644
--- a/modules/mobile_vr/mobile_vr_interface.cpp
+++ b/modules/mobile_vr/mobile_vr_interface.cpp
@@ -448,19 +448,7 @@ void MobileVRInterface::process() {
};
};
-MobileVRInterface::MobileVRInterface() {
- initialized = false;
-
- // Just set some defaults for these. At some point we need to look at adding a lookup table for common device + headset combos and/or support reading cardboard QR codes
- eye_height = 1.85;
- intraocular_dist = 6.0;
- display_width = 14.5;
- display_to_lens = 4.0;
- oversample = 1.5;
- k1 = 0.215;
- k2 = 0.215;
- last_ticks = 0;
-};
+MobileVRInterface::MobileVRInterface() {}
MobileVRInterface::~MobileVRInterface() {
// and make sure we cleanup if we haven't already
diff --git a/modules/mobile_vr/mobile_vr_interface.h b/modules/mobile_vr/mobile_vr_interface.h
index 1afa6c39b6..d28c2196af 100644
--- a/modules/mobile_vr/mobile_vr_interface.h
+++ b/modules/mobile_vr/mobile_vr_interface.h
@@ -51,19 +51,21 @@ class MobileVRInterface : public XRInterface {
GDCLASS(MobileVRInterface, XRInterface);
private:
- bool initialized;
+ bool initialized = false;
Basis orientation;
- float eye_height;
- uint64_t last_ticks;
- real_t intraocular_dist;
- real_t display_width;
- real_t display_to_lens;
- real_t oversample;
+ // Just set some defaults for these. At some point we need to look at adding a lookup table for common device + headset combos and/or support reading cardboard QR codes
+ float eye_height = 1.85;
+ uint64_t last_ticks = 0;
+
+ real_t intraocular_dist = 6.0;
+ real_t display_width = 14.5;
+ real_t display_to_lens = 4.0;
+ real_t oversample = 1.5;
//@TODO not yet used, these are needed in our distortion shader...
- real_t k1;
- real_t k2;
+ real_t k1 = 0.215;
+ real_t k2 = 0.215;
/*
logic for processing our sensor data, this was originally in our positional tracker logic but I think
@@ -73,9 +75,9 @@ private:
Vector3 scale_magneto(const Vector3 &p_magnetometer);
Basis combine_acc_mag(const Vector3 &p_grav, const Vector3 &p_magneto);
- int mag_count;
- bool has_gyro;
- bool sensor_first;
+ int mag_count = 0;
+ bool has_gyro = false;
+ bool sensor_first = false;
Vector3 last_accerometer_data;
Vector3 last_magnetometer_data;
Vector3 mag_current_min;
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index bd29dc1876..25cc64393a 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -3644,7 +3644,7 @@ void CSharpScript::get_members(Set<StringName> *p_members) {
/*************** RESOURCE ***************/
-RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_FILE_CANT_OPEN;
}
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index 85edd8b9c6..a31135cd32 100644
--- a/modules/mono/csharp_script.h
+++ b/modules/mono/csharp_script.h
@@ -542,7 +542,7 @@ public:
class ResourceFormatLoaderCSharpScript : public ResourceFormatLoader {
public:
- RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false) override;
+ RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE) override;
void get_recognized_extensions(List<String> *p_extensions) const override;
bool handles_type(const String &p_type) const override;
String get_resource_type(const String &p_path) const override;
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs b/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs
index 5ef55fea49..774c49e705 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/MsBuildFinder.cs
@@ -86,7 +86,7 @@ namespace GodotTools.Build
{
case BuildTool.DotnetCli:
{
- string dotnetCliPath = OS.PathWhich("dotnet");
+ string dotnetCliPath = FindBuildEngineOnUnix("dotnet");
if (!string.IsNullOrEmpty(dotnetCliPath))
return (dotnetCliPath, BuildTool.DotnetCli);
GD.PushError($"Cannot find executable for '{BuildManager.PropNameDotnetCli}'. Fallback to MSBuild from Mono.");
@@ -122,7 +122,11 @@ namespace GodotTools.Build
if (OS.IsMacOS)
{
result.Add("/Library/Frameworks/Mono.framework/Versions/Current/bin/");
+ result.Add("/opt/local/bin/");
result.Add("/usr/local/var/homebrew/linked/mono/bin/");
+ result.Add("/usr/local/bin/");
+ result.Add("/usr/local/bin/dotnet/");
+ result.Add("/usr/local/share/dotnet/");
}
result.Add("/opt/novell/mono/bin/");
diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
index 16f91a0925..ed25cdaa63 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
@@ -104,7 +104,7 @@ namespace GodotTools.Ides.Rider
if (line >= 0)
{
args.Add("--line");
- args.Add(line.ToString());
+ args.Add((line + 1).ToString()); // https://github.com/JetBrains/godot-support/issues/61
}
args.Add(scriptPath);
try
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 38e403b2e1..ea1a2053df 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -1479,6 +1479,12 @@ Error BindingsGenerator::_generate_cs_property(const BindingsGenerator::TypeInte
ERR_FAIL_COND_V_MSG(prop_itype->is_singleton, ERR_BUG,
"Property type is a singleton: '" + p_itype.name + "." + String(p_iprop.cname) + "'.");
+ if (p_itype.api_type == ClassDB::API_CORE) {
+ ERR_FAIL_COND_V_MSG(prop_itype->api_type == ClassDB::API_EDITOR, ERR_BUG,
+ "Property '" + p_itype.name + "." + String(p_iprop.cname) + "' has type '" + prop_itype->name +
+ "' from the editor API. Core API cannot have dependencies on the editor API.");
+ }
+
if (p_iprop.prop_doc && p_iprop.prop_doc->description.size()) {
String xml_summary = bbcode_to_xml(fix_doc_description(p_iprop.prop_doc->description), &p_itype);
Vector<String> summary_lines = xml_summary.length() ? xml_summary.split("\n") : Vector<String>();
@@ -1575,6 +1581,12 @@ Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterf
ERR_FAIL_COND_V_MSG(return_type->is_singleton, ERR_BUG,
"Method return type is a singleton: '" + p_itype.name + "." + p_imethod.name + "'.");
+ if (p_itype.api_type == ClassDB::API_CORE) {
+ ERR_FAIL_COND_V_MSG(return_type->api_type == ClassDB::API_EDITOR, ERR_BUG,
+ "Method '" + p_itype.name + "." + p_imethod.name + "' has return type '" + return_type->name +
+ "' from the editor API. Core API cannot have dependencies on the editor API.");
+ }
+
String method_bind_field = "__method_bind_" + itos(p_method_bind_count);
String arguments_sig;
@@ -1593,6 +1605,12 @@ Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterf
ERR_FAIL_COND_V_MSG(arg_type->is_singleton, ERR_BUG,
"Argument type is a singleton: '" + iarg.name + "' of method '" + p_itype.name + "." + p_imethod.name + "'.");
+ if (p_itype.api_type == ClassDB::API_CORE) {
+ ERR_FAIL_COND_V_MSG(arg_type->api_type == ClassDB::API_EDITOR, ERR_BUG,
+ "Argument '" + iarg.name + "' of method '" + p_itype.name + "." + p_imethod.name + "' has type '" +
+ arg_type->name + "' from the editor API. Core API cannot have dependencies on the editor API.");
+ }
+
if (iarg.default_argument.size()) {
CRASH_COND_MSG(!_arg_default_value_is_assignable_to_type(iarg.def_param_value, *arg_type),
"Invalid default value for parameter '" + iarg.name + "' of method '" + p_itype.name + "." + p_imethod.name + "'.");
@@ -1806,7 +1824,13 @@ Error BindingsGenerator::_generate_cs_signal(const BindingsGenerator::TypeInterf
const TypeInterface *arg_type = _get_type_or_placeholder(iarg.type);
ERR_FAIL_COND_V_MSG(arg_type->is_singleton, ERR_BUG,
- "Argument type is a singleton: '" + iarg.name + "' of signal" + p_itype.name + "." + p_isignal.name + "'.");
+ "Argument type is a singleton: '" + iarg.name + "' of signal '" + p_itype.name + "." + p_isignal.name + "'.");
+
+ if (p_itype.api_type == ClassDB::API_CORE) {
+ ERR_FAIL_COND_V_MSG(arg_type->api_type == ClassDB::API_EDITOR, ERR_BUG,
+ "Argument '" + iarg.name + "' of signal '" + p_itype.name + "." + p_isignal.name + "' has type '" +
+ arg_type->name + "' from the editor API. Core API cannot have dependencies on the editor API.");
+ }
// Add the current arguments to the signature
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
index 90141928ca..0c333d06ef 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
@@ -104,7 +104,7 @@ namespace Godot
/// <summary>
/// The HSV hue of this color, on the range 0 to 1.
/// </summary>
- /// <value>Getting is a long process, refer to the source code for details. Setting uses <see cref="FromHsv"/>.</value>
+ /// <value>Getting is a long process, refer to the source code for details. Setting uses <see cref="FromHSV"/>.</value>
public float h
{
get
@@ -145,14 +145,14 @@ namespace Godot
}
set
{
- this = FromHsv(value, s, v, a);
+ this = FromHSV(value, s, v, a);
}
}
/// <summary>
/// The HSV saturation of this color, on the range 0 to 1.
/// </summary>
- /// <value>Getting is equivalent to the ratio between the min and max RGB value. Setting uses <see cref="FromHsv"/>.</value>
+ /// <value>Getting is equivalent to the ratio between the min and max RGB value. Setting uses <see cref="FromHSV"/>.</value>
public float s
{
get
@@ -166,14 +166,14 @@ namespace Godot
}
set
{
- this = FromHsv(h, value, v, a);
+ this = FromHSV(h, value, v, a);
}
}
/// <summary>
/// The HSV value (brightness) of this color, on the range 0 to 1.
/// </summary>
- /// <value>Getting is equivalent to using `Max()` on the RGB components. Setting uses <see cref="FromHsv"/>.</value>
+ /// <value>Getting is equivalent to using `Max()` on the RGB components. Setting uses <see cref="FromHSV"/>.</value>
public float v
{
get
@@ -182,7 +182,7 @@ namespace Godot
}
set
{
- this = FromHsv(h, s, value, a);
+ this = FromHSV(h, s, value, a);
}
}
@@ -455,7 +455,7 @@ namespace Godot
/// </summary>
/// <param name="includeAlpha">Whether or not to include alpha. If false, the color is RGB instead of RGBA.</param>
/// <returns>A string for the HTML hexadecimal representation of this color.</returns>
- public string ToHtml(bool includeAlpha = true)
+ public string ToHTML(bool includeAlpha = true)
{
var txt = string.Empty;
@@ -532,18 +532,50 @@ namespace Godot
}
/// <summary>
+ /// Constructs a color either from an HTML color code or from a
+ /// standardized color name. Supported
+ /// color names are the same as the <see cref="Colors"/> constants.
+ /// </summary>
+ /// <param name="code">The HTML color code or color name to construct from.</param>
+ public Color(string code)
+ {
+ if (HtmlIsValid(code))
+ {
+ this = FromHTML(code);
+ }
+ else
+ {
+ this = Named(code);
+ }
+ }
+
+ /// <summary>
+ /// Constructs a color either from an HTML color code or from a
+ /// standardized color name, with `alpha` on the range of 0 to 1. Supported
+ /// color names are the same as the <see cref="Colors"/> constants.
+ /// </summary>
+ /// <param name="code">The HTML color code or color name to construct from.</param>
+ /// <param name="alpha">The alpha (transparency) value, typically on the range of 0 to 1.</param>
+ public Color(string code, float alpha)
+ {
+ this = new Color(code);
+ a = alpha;
+ }
+
+ /// <summary>
/// Constructs a color from the HTML hexadecimal color string in RGBA format.
/// </summary>
/// <param name="rgba">A string for the HTML hexadecimal representation of this color.</param>
- public Color(string rgba)
+ private static Color FromHTML(string rgba)
{
+ Color c;
if (rgba.Length == 0)
{
- r = 0f;
- g = 0f;
- b = 0f;
- a = 1.0f;
- return;
+ c.r = 0f;
+ c.g = 0f;
+ c.b = 0f;
+ c.a = 1.0f;
+ return c;
}
if (rgba[0] == '#')
@@ -577,47 +609,48 @@ namespace Godot
throw new ArgumentOutOfRangeException("Invalid color code. Length is " + rgba.Length + " but a length of 6 or 8 is expected: " + rgba);
}
- a = 1.0f;
+ c.a = 1.0f;
if (isShorthand)
{
- r = ParseCol4(rgba, 0) / 15f;
- g = ParseCol4(rgba, 1) / 15f;
- b = ParseCol4(rgba, 2) / 15f;
+ c.r = ParseCol4(rgba, 0) / 15f;
+ c.g = ParseCol4(rgba, 1) / 15f;
+ c.b = ParseCol4(rgba, 2) / 15f;
if (alpha)
{
- a = ParseCol4(rgba, 3) / 15f;
+ c.a = ParseCol4(rgba, 3) / 15f;
}
}
else
{
- r = ParseCol8(rgba, 0) / 255f;
- g = ParseCol8(rgba, 2) / 255f;
- b = ParseCol8(rgba, 4) / 255f;
+ c.r = ParseCol8(rgba, 0) / 255f;
+ c.g = ParseCol8(rgba, 2) / 255f;
+ c.b = ParseCol8(rgba, 4) / 255f;
if (alpha)
{
- a = ParseCol8(rgba, 6) / 255f;
+ c.a = ParseCol8(rgba, 6) / 255f;
}
}
- if (r < 0)
+ if (c.r < 0)
{
throw new ArgumentOutOfRangeException("Invalid color code. Red part is not valid hexadecimal: " + rgba);
}
- if (g < 0)
+ if (c.g < 0)
{
throw new ArgumentOutOfRangeException("Invalid color code. Green part is not valid hexadecimal: " + rgba);
}
- if (b < 0)
+ if (c.b < 0)
{
throw new ArgumentOutOfRangeException("Invalid color code. Blue part is not valid hexadecimal: " + rgba);
}
- if (a < 0)
+ if (c.a < 0)
{
throw new ArgumentOutOfRangeException("Invalid color code. Alpha part is not valid hexadecimal: " + rgba);
}
+ return c;
}
/// <summary>
@@ -640,9 +673,8 @@ namespace Godot
/// the constants defined in <see cref="Colors"/>.
/// </summary>
/// <param name="name">The name of the color.</param>
- /// <param name="alpha">The alpha (transparency) component represented on the range of 0 to 1. Default: 1.</param>
/// <returns>The constructed color.</returns>
- public static Color ColorN(string name, float alpha = 1f)
+ private static Color Named(string name)
{
name = name.Replace(" ", String.Empty);
name = name.Replace("-", String.Empty);
@@ -656,9 +688,7 @@ namespace Godot
throw new ArgumentOutOfRangeException($"Invalid Color Name: {name}");
}
- Color color = Colors.namedColors[name];
- color.a = alpha;
- return color;
+ return Colors.namedColors[name];
}
/// <summary>
@@ -671,11 +701,11 @@ namespace Godot
/// <param name="value">The HSV value (brightness), typically on the range of 0 to 1.</param>
/// <param name="alpha">The alpha (transparency) value, typically on the range of 0 to 1.</param>
/// <returns>The constructed color.</returns>
- public static Color FromHsv(float hue, float saturation, float value, float alpha = 1.0f)
+ public static Color FromHSV(float hue, float saturation, float value, float alpha = 1.0f)
{
if (saturation == 0)
{
- // acp_hromatic (grey)
+ // Achromatic (grey)
return new Color(value, value, value, alpha);
}
@@ -715,7 +745,7 @@ namespace Godot
/// <param name="hue">Output parameter for the HSV hue.</param>
/// <param name="saturation">Output parameter for the HSV saturation.</param>
/// <param name="value">Output parameter for the HSV value.</param>
- public void ToHsv(out float hue, out float saturation, out float value)
+ public void ToHSV(out float hue, out float saturation, out float value)
{
float max = (float)Mathf.Max(r, Mathf.Max(g, b));
float min = (float)Mathf.Min(r, Mathf.Min(g, b));
@@ -803,7 +833,8 @@ namespace Godot
}
// Check if each hex digit is valid.
- for (int i = 0; i < len; i++) {
+ for (int i = 0; i < len; i++)
+ {
if (ParseCol4(color, i) == -1)
{
return false;
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs
index 5f64c09a89..74fa05d1fd 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/ResourceLoaderExtensions.cs
@@ -2,7 +2,7 @@ namespace Godot
{
public static partial class ResourceLoader
{
- public static T Load<T>(string path, string typeHint = null, bool noCache = false) where T : class
+ public static T Load<T>(string path, string typeHint = null, CacheMode noCache = CacheMode.Reuse) where T : class
{
return (T)(object)Load(path, typeHint, noCache);
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
index 0700f197ff..98efa89ef0 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
@@ -97,6 +97,36 @@ namespace Godot
return b;
}
+ /// <summary>
+ /// Converts a string containing a binary number into an integer.
+ /// Binary strings can either be prefixed with `0b` or not,
+ /// and they can also start with a `-` before the optional prefix.
+ /// </summary>
+ /// <param name="instance">The string to convert.</param>
+ /// <returns>The converted string.</returns>
+ public static int BinToInt(this string instance)
+ {
+ if (instance.Length == 0)
+ {
+ return 0;
+ }
+
+ int sign = 1;
+
+ if (instance[0] == '-')
+ {
+ sign = -1;
+ instance = instance.Substring(1);
+ }
+
+ if (instance.StartsWith("0b"))
+ {
+ instance = instance.Substring(2);
+ }
+
+ return sign * Convert.ToInt32(instance, 2);;
+ }
+
// <summary>
// Return the amount of substrings in string.
// </summary>
@@ -432,24 +462,24 @@ namespace Godot
}
// <summary>
- // Hash the string and return a 32 bits integer.
+ // Hash the string and return a 32 bits unsigned integer.
// </summary>
- public static int Hash(this string instance)
+ public static uint Hash(this string instance)
{
- int index = 0;
- int hashv = 5381;
- int c;
+ uint hash = 5381;
- while ((c = instance[index++]) != 0)
- hashv = (hashv << 5) + hashv + c; // hash * 33 + c
+ foreach(uint c in instance)
+ {
+ hash = (hash << 5) + hash + c; // hash * 33 + c
+ }
- return hashv;
+ return hash;
}
/// <summary>
/// Returns a hexadecimal representation of this byte as a string.
/// </summary>
- /// <param name="bytes">The byte to encode.</param>
+ /// <param name="b">The byte to encode.</param>
/// <returns>The hexadecimal representation of this byte.</returns>
internal static string HexEncode(this byte b)
{
@@ -493,11 +523,20 @@ namespace Godot
return ret;
}
- // <summary>
- // Convert a string containing an hexadecimal number into an int.
- // </summary>
+ /// <summary>
+ /// Converts a string containing a hexadecimal number into an integer.
+ /// Hexadecimal strings can either be prefixed with `0x` or not,
+ /// and they can also start with a `-` before the optional prefix.
+ /// </summary>
+ /// <param name="instance">The string to convert.</param>
+ /// <returns>The converted string.</returns>
public static int HexToInt(this string instance)
{
+ if (instance.Length == 0)
+ {
+ return 0;
+ }
+
int sign = 1;
if (instance[0] == '-')
@@ -506,10 +545,12 @@ namespace Godot
instance = instance.Substring(1);
}
- if (!instance.StartsWith("0x"))
- return 0;
+ if (instance.StartsWith("0x"))
+ {
+ instance = instance.Substring(2);
+ }
- return sign * int.Parse(instance.Substring(2), NumberStyles.HexNumber);
+ return sign * int.Parse(instance, NumberStyles.HexNumber);
}
// <summary>
@@ -892,22 +933,6 @@ namespace Godot
}
// <summary>
- // Decode a percent-encoded string. See [method percent_encode].
- // </summary>
- public static string PercentDecode(this string instance)
- {
- return Uri.UnescapeDataString(instance);
- }
-
- // <summary>
- // Percent-encode a string. This is meant to encode parameters in a URL when sending a HTTP GET request and bodies of form-urlencoded POST request.
- // </summary>
- public static string PercentEncode(this string instance)
- {
- return Uri.EscapeDataString(instance);
- }
-
- // <summary>
// If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code].
// </summary>
public static string PlusFile(this string instance, string file)
@@ -1169,6 +1194,33 @@ namespace Godot
return Encoding.UTF8.GetBytes(instance);
}
+ /// <summary>
+ /// Decodes a string in URL encoded format. This is meant to
+ /// decode parameters in a URL when receiving an HTTP request.
+ /// This mostly wraps around `System.Uri.UnescapeDataString()`,
+ /// but also handles `+`.
+ /// See <see cref="URIEncode"/> for encoding.
+ /// </summary>
+ /// <param name="instance">The string to decode.</param>
+ /// <returns>The unescaped string.</returns>
+ public static string URIDecode(this string instance)
+ {
+ return Uri.UnescapeDataString(instance.Replace("+", "%20"));
+ }
+
+ /// <summary>
+ /// Encodes a string to URL friendly format. This is meant to
+ /// encode parameters in a URL when sending an HTTP request.
+ /// This wraps around `System.Uri.EscapeDataString()`.
+ /// See <see cref="URIDecode"/> for decoding.
+ /// </summary>
+ /// <param name="instance">The string to encode.</param>
+ /// <returns>The escaped string.</returns>
+ public static string URIEncode(this string instance)
+ {
+ return Uri.EscapeDataString(instance);
+ }
+
// <summary>
// Return a copy of the string with special characters escaped using the XML standard.
// </summary>
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs
index 42dbdf25c3..3b895bbbf6 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector3.cs
@@ -111,10 +111,10 @@ namespace Godot
}
/// <summary>
- /// Returns the minimum angle to the given vector, in radians.
+ /// Returns the unsigned minimum angle to the given vector, in radians.
/// </summary>
/// <param name="to">The other vector to compare this vector to.</param>
- /// <returns>The angle between the two vectors, in radians.</returns>
+ /// <returns>The unsigned angle between the two vectors, in radians.</returns>
public real_t AngleTo(Vector3 to)
{
return Mathf.Atan2(Cross(to).Length(), Dot(to));
@@ -469,6 +469,23 @@ namespace Godot
}
/// <summary>
+ /// Returns the signed angle to the given vector, in radians.
+ /// The sign of the angle is positive in a counter-clockwise
+ /// direction and negative in a clockwise direction when viewed
+ /// from the side specified by the `axis`.
+ /// </summary>
+ /// <param name="to">The other vector to compare this vector to.</param>
+ /// <param name="axis">The reference axis to use for the angle sign.</param>
+ /// <returns>The signed angle between the two vectors, in radians.</returns>
+ public real_t SignedAngleTo(Vector3 to, Vector3 axis)
+ {
+ Vector3 crossTo = Cross(to);
+ real_t unsignedAngle = Mathf.Atan2(crossTo.Length(), Dot(to));
+ real_t sign = crossTo.Dot(axis);
+ return (sign < 0) ? -unsignedAngle : unsignedAngle;
+ }
+
+ /// <summary>
/// Returns the result of the spherical linear interpolation between
/// this vector and `to` by amount `weight`.
///
diff --git a/modules/mono/mono_gd/gd_mono_log.cpp b/modules/mono/mono_gd/gd_mono_log.cpp
index e1d283242c..dafd36c36b 100644
--- a/modules/mono/mono_gd/gd_mono_log.cpp
+++ b/modules/mono/mono_gd/gd_mono_log.cpp
@@ -189,8 +189,6 @@ void GDMonoLog::initialize() {
GDMonoLog::GDMonoLog() {
singleton = this;
-
- log_level_id = -1;
}
GDMonoLog::~GDMonoLog() {
diff --git a/modules/mono/mono_gd/gd_mono_log.h b/modules/mono/mono_gd/gd_mono_log.h
index 9a95e3cb0a..f7a53156ab 100644
--- a/modules/mono/mono_gd/gd_mono_log.h
+++ b/modules/mono/mono_gd/gd_mono_log.h
@@ -46,9 +46,9 @@
class GDMonoLog {
#ifdef GD_MONO_LOG_ENABLED
- int log_level_id;
+ int log_level_id = -1;
- FileAccess *log_file;
+ FileAccess *log_file = nullptr;
String log_file_path;
bool _try_create_logs_dir(const String &p_logs_dir);
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index 286858bff1..359f6bba4d 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -1204,7 +1204,7 @@ Variant mono_object_to_variant_impl(MonoObject *p_obj, const ManagedType &p_type
if (GDMonoUtils::Marshal::type_is_system_generic_list(reftype)) {
MonoReflectionType *elem_reftype = nullptr;
GDMonoUtils::Marshal::array_get_element_type(reftype, &elem_reftype);
- return system_generic_list_to_Array(p_obj, p_type.type_class, elem_reftype);
+ return system_generic_list_to_Array_variant(p_obj, p_type.type_class, elem_reftype);
}
} break;
}
@@ -1333,15 +1333,22 @@ MonoObject *Array_to_system_generic_list(const Array &p_array, GDMonoClass *p_cl
return mono_object;
}
-Array system_generic_list_to_Array(MonoObject *p_obj, GDMonoClass *p_class, [[maybe_unused]] MonoReflectionType *p_elem_reftype) {
+Variant system_generic_list_to_Array_variant(MonoObject *p_obj, GDMonoClass *p_class, [[maybe_unused]] MonoReflectionType *p_elem_reftype) {
GDMonoMethod *to_array = p_class->get_method("ToArray", 0);
CRASH_COND(to_array == nullptr);
MonoException *exc = nullptr;
- MonoArray *mono_array = (MonoArray *)to_array->invoke_raw(p_obj, nullptr, &exc);
+ MonoObject *array = to_array->invoke_raw(p_obj, nullptr, &exc);
UNHANDLED_EXCEPTION(exc);
- return mono_array_to_Array(mono_array);
+ ERR_FAIL_NULL_V(array, Variant());
+
+ ManagedType type = ManagedType::from_class(mono_object_get_class(array));
+
+ bool result_is_array = type.type_encoding != MONO_TYPE_SZARRAY && type.type_encoding != MONO_TYPE_ARRAY;
+ ERR_FAIL_COND_V(result_is_array, Variant());
+
+ return mono_object_to_variant(array, type);
}
MonoArray *Array_to_mono_array(const Array &p_array) {
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index 7d0036a1d8..668809ae5d 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -140,7 +140,7 @@ MonoObject *Dictionary_to_system_generic_dict(const Dictionary &p_dict, GDMonoCl
Dictionary system_generic_dict_to_Dictionary(MonoObject *p_obj, GDMonoClass *p_class, MonoReflectionType *p_key_reftype, MonoReflectionType *p_value_reftype);
MonoObject *Array_to_system_generic_list(const Array &p_array, GDMonoClass *p_class, MonoReflectionType *p_elem_reftype);
-Array system_generic_list_to_Array(MonoObject *p_obj, GDMonoClass *p_class, MonoReflectionType *p_elem_reftype);
+Variant system_generic_list_to_Array_variant(MonoObject *p_obj, GDMonoClass *p_class, MonoReflectionType *p_elem_reftype);
// Array
diff --git a/modules/mono/mono_gd/support/android_support.cpp b/modules/mono/mono_gd/support/android_support.cpp
index 59e1385e7e..cba29d63cd 100644
--- a/modules/mono/mono_gd/support/android_support.cpp
+++ b/modules/mono/mono_gd/support/android_support.cpp
@@ -109,7 +109,7 @@ bool jni_exception_check(JNIEnv *p_env) {
String app_native_lib_dir_cache;
String determine_app_native_lib_dir() {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
ScopedLocalRef<jclass> activityThreadClass(env, env->FindClass("android/app/ActivityThread"));
jmethodID currentActivityThread = env->GetStaticMethodID(activityThreadClass, "currentActivityThread", "()Landroid/app/ActivityThread;");
@@ -253,7 +253,7 @@ int32_t get_build_version_sdk_int() {
// android.os.Build.VERSION.SDK_INT
if (build_version_sdk_int == 0) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jclass versionClass = env->FindClass("android/os/Build$VERSION");
ERR_FAIL_NULL_V(versionClass, 0);
@@ -281,7 +281,7 @@ MonoBoolean _gd_mono_init_cert_store() {
// return false;
// }
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
ScopedLocalRef<jclass> keyStoreClass(env, env->FindClass("java/security/KeyStore"));
@@ -322,7 +322,7 @@ MonoArray *_gd_mono_android_cert_store_lookup(MonoString *p_alias) {
return nullptr;
}
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
ScopedLocalRef<jstring> js_alias(env, env->NewStringUTF(alias_utf8));
mono_free(alias_utf8);
@@ -380,7 +380,7 @@ void cleanup() {
if (godot_dl_handle)
gd_mono_android_dlclose(godot_dl_handle, nullptr);
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
if (certStore) {
env->DeleteGlobalRef(certStore);
@@ -437,7 +437,7 @@ GD_PINVOKE_EXPORT mono_bool _monodroid_get_network_interface_up_state(const char
*r_is_up = 0;
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jclass networkInterfaceClass = env->FindClass("java/net/NetworkInterface");
ERR_FAIL_NULL_V(networkInterfaceClass, 0);
@@ -469,7 +469,7 @@ GD_PINVOKE_EXPORT mono_bool _monodroid_get_network_interface_supports_multicast(
*r_supports_multicast = 0;
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jclass networkInterfaceClass = env->FindClass("java/net/NetworkInterface");
ERR_FAIL_NULL_V(networkInterfaceClass, 0);
@@ -507,7 +507,7 @@ static void interop_get_active_network_dns_servers(char **r_dns_servers, int *dn
CRASH_COND(get_build_version_sdk_int() < 23);
#endif
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
GodotJavaWrapper *godot_java = ((OS_Android *)OS::get_singleton())->get_godot_java();
jobject activity = godot_java->get_activity();
@@ -648,7 +648,7 @@ GD_PINVOKE_EXPORT const char *_monodroid_timezone_get_default_id() {
//
// TimeZone.getDefault().getID()
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
ScopedLocalRef<jclass> timeZoneClass(env, env->FindClass("java/util/TimeZone"));
ERR_FAIL_NULL_V(timeZoneClass, nullptr);
diff --git a/modules/opensimplex/noise_texture.cpp b/modules/opensimplex/noise_texture.cpp
index 1d75e46747..f5d401b058 100644
--- a/modules/opensimplex/noise_texture.cpp
+++ b/modules/opensimplex/noise_texture.cpp
@@ -33,16 +33,6 @@
#include "core/core_string_names.h"
NoiseTexture::NoiseTexture() {
- update_queued = false;
- noise_thread = nullptr;
- regen_queued = false;
- first_time = true;
-
- size = Vector2i(512, 512);
- seamless = false;
- as_normal_map = false;
- bump_strength = 8.0;
-
noise = Ref<OpenSimplexNoise>();
_queue_update();
@@ -52,10 +42,7 @@ NoiseTexture::~NoiseTexture() {
if (texture.is_valid()) {
RS::get_singleton()->free(texture);
}
- if (noise_thread) {
- Thread::wait_to_finish(noise_thread);
- memdelete(noise_thread);
- }
+ noise_thread.wait_to_finish();
}
void NoiseTexture::_bind_methods() {
@@ -109,11 +96,9 @@ void NoiseTexture::_set_texture_data(const Ref<Image> &p_image) {
void NoiseTexture::_thread_done(const Ref<Image> &p_image) {
_set_texture_data(p_image);
- Thread::wait_to_finish(noise_thread);
- memdelete(noise_thread);
- noise_thread = nullptr;
+ noise_thread.wait_to_finish();
if (regen_queued) {
- noise_thread = Thread::create(_thread_function, this);
+ noise_thread.start(_thread_function, this);
regen_queued = false;
}
}
@@ -165,8 +150,8 @@ void NoiseTexture::_update_texture() {
use_thread = false;
#endif
if (use_thread) {
- if (!noise_thread) {
- noise_thread = Thread::create(_thread_function, this);
+ if (!noise_thread.is_started()) {
+ noise_thread.start(_thread_function, this);
regen_queued = false;
} else {
regen_queued = true;
@@ -231,7 +216,7 @@ void NoiseTexture::set_as_normal_map(bool p_as_normal_map) {
}
as_normal_map = p_as_normal_map;
_queue_update();
- _change_notify();
+ notify_property_list_changed();
}
bool NoiseTexture::is_normal_map() {
diff --git a/modules/opensimplex/noise_texture.h b/modules/opensimplex/noise_texture.h
index 9f6e2cbf43..e89479d962 100644
--- a/modules/opensimplex/noise_texture.h
+++ b/modules/opensimplex/noise_texture.h
@@ -45,20 +45,20 @@ class NoiseTexture : public Texture2D {
private:
Ref<Image> data;
- Thread *noise_thread;
+ Thread noise_thread;
- bool first_time;
- bool update_queued;
- bool regen_queued;
+ bool first_time = true;
+ bool update_queued = false;
+ bool regen_queued = false;
mutable RID texture;
- uint32_t flags;
+ uint32_t flags = 0;
Ref<OpenSimplexNoise> noise;
- Vector2i size;
- bool seamless;
- bool as_normal_map;
- float bump_strength;
+ Vector2i size = Vector2i(512, 512);
+ bool seamless = false;
+ bool as_normal_map = false;
+ float bump_strength = 8.0;
void _thread_done(const Ref<Image> &p_image);
static void _thread_function(void *p_ud);
diff --git a/modules/opensimplex/open_simplex_noise.cpp b/modules/opensimplex/open_simplex_noise.cpp
index e4e2e0613a..3773946112 100644
--- a/modules/opensimplex/open_simplex_noise.cpp
+++ b/modules/opensimplex/open_simplex_noise.cpp
@@ -33,12 +33,6 @@
#include "core/core_string_names.h"
OpenSimplexNoise::OpenSimplexNoise() {
- seed = 0;
- persistence = 0.5;
- octaves = 3;
- period = 64;
- lacunarity = 2.0;
-
_init_seeds();
}
@@ -131,10 +125,10 @@ Ref<Image> OpenSimplexNoise::get_seamless_image(int p_size) const {
float ii = (float)i / (float)p_size;
float jj = (float)j / (float)p_size;
- ii *= 2.0 * Math_PI;
- jj *= 2.0 * Math_PI;
+ ii *= Math_TAU;
+ jj *= Math_TAU;
- float radius = p_size / (2.0 * Math_PI);
+ float radius = p_size / Math_TAU;
float x = radius * Math::sin(jj);
float y = radius * Math::cos(jj);
diff --git a/modules/opensimplex/open_simplex_noise.h b/modules/opensimplex/open_simplex_noise.h
index f18dd4d798..847c157409 100644
--- a/modules/opensimplex/open_simplex_noise.h
+++ b/modules/opensimplex/open_simplex_noise.h
@@ -48,11 +48,11 @@ class OpenSimplexNoise : public Resource {
osn_context contexts[MAX_OCTAVES];
- int seed;
- float persistence; // Controls details, value in [0,1]. Higher increases grain, lower increases smoothness.
- int octaves; // Number of noise layers
- float period; // Distance above which we start to see similarities. The higher, the longer "hills" will be on a terrain.
- float lacunarity; // Controls period change across octaves. 2 is usually a good value to address all detail levels.
+ int seed = 0;
+ float persistence = 0.5; // Controls details, value in [0,1]. Higher increases grain, lower increases smoothness.
+ int octaves = 3; // Number of noise layers
+ float period = 64.0; // Distance above which we start to see similarities. The higher, the longer "hills" will be on a terrain.
+ float lacunarity = 2.0; // Controls period change across octaves. 2 is usually a good value to address all detail levels.
public:
OpenSimplexNoise();
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index 70a3c8b5a9..83f032ca2b 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -46,7 +46,7 @@ enum PVRFLags {
PVR_VFLIP = 0x00010000
};
-RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_CANT_OPEN;
}
@@ -207,7 +207,7 @@ ResourceFormatPVR::ResourceFormatPVR() {
struct PVRTCBlock {
//blocks are 64 bits
- uint32_t data[2];
+ uint32_t data[2] = {};
};
_FORCE_INLINE_ bool is_po2(uint32_t p_input) {
diff --git a/modules/pvr/texture_loader_pvr.h b/modules/pvr/texture_loader_pvr.h
index da425c3237..26071ce30f 100644
--- a/modules/pvr/texture_loader_pvr.h
+++ b/modules/pvr/texture_loader_pvr.h
@@ -36,7 +36,7 @@
class ResourceFormatPVR : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path, Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path, Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp
index fe8136ef35..6bae12e7e6 100644
--- a/modules/regex/regex.cpp
+++ b/modules/regex/regex.cpp
@@ -365,12 +365,10 @@ Array RegEx::get_names() const {
RegEx::RegEx() {
general_ctx = pcre2_general_context_create_32(&_regex_malloc, &_regex_free, nullptr);
- code = nullptr;
}
RegEx::RegEx(const String &p_pattern) {
general_ctx = pcre2_general_context_create_32(&_regex_malloc, &_regex_free, nullptr);
- code = nullptr;
compile(p_pattern);
}
diff --git a/modules/regex/regex.h b/modules/regex/regex.h
index 46505855d7..f5773042fb 100644
--- a/modules/regex/regex.h
+++ b/modules/regex/regex.h
@@ -42,8 +42,8 @@ class RegExMatch : public Reference {
GDCLASS(RegExMatch, Reference);
struct Range {
- int start;
- int end;
+ int start = 0;
+ int end = 0;
};
String subject;
@@ -72,7 +72,7 @@ class RegEx : public Reference {
GDCLASS(RegEx, Reference);
void *general_ctx;
- void *code;
+ void *code = nullptr;
String pattern;
void _pattern_info(uint32_t what, void *where) const;
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index 4b2be47e74..6732078efc 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -47,7 +47,7 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra
int mixed = stb_vorbis_get_samples_float_interleaved(ogg_stream, 2, buffer, todo * 2);
if (vorbis_stream->channels == 1 && mixed > 0) {
//mix mono to stereo
- for (int i = start_buffer; i < mixed; i++) {
+ for (int i = start_buffer; i < start_buffer + mixed; i++) {
p_buffer[i].r = p_buffer[i].l;
}
}
@@ -263,16 +263,7 @@ void AudioStreamOGGVorbis::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "loop_offset"), "set_loop_offset", "get_loop_offset");
}
-AudioStreamOGGVorbis::AudioStreamOGGVorbis() {
- data = nullptr;
- data_len = 0;
- length = 0;
- sample_rate = 1;
- channels = 1;
- loop_offset = 0;
- decode_mem_size = 0;
- loop = false;
-}
+AudioStreamOGGVorbis::AudioStreamOGGVorbis() {}
AudioStreamOGGVorbis::~AudioStreamOGGVorbis() {
clear_data();
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
index efc8fc6c27..2bd70a2722 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
@@ -41,11 +41,11 @@ class AudioStreamOGGVorbis;
class AudioStreamPlaybackOGGVorbis : public AudioStreamPlaybackResampled {
GDCLASS(AudioStreamPlaybackOGGVorbis, AudioStreamPlaybackResampled);
- stb_vorbis *ogg_stream;
+ stb_vorbis *ogg_stream = nullptr;
stb_vorbis_alloc ogg_alloc;
- uint32_t frames_mixed;
- bool active;
- int loops;
+ uint32_t frames_mixed = 0;
+ bool active = false;
+ int loops = 0;
friend class AudioStreamOGGVorbis;
@@ -76,15 +76,15 @@ class AudioStreamOGGVorbis : public AudioStream {
friend class AudioStreamPlaybackOGGVorbis;
- void *data;
- uint32_t data_len;
+ void *data = nullptr;
+ uint32_t data_len = 0;
- int decode_mem_size;
- float sample_rate;
- int channels;
- float length;
- bool loop;
- float loop_offset;
+ int decode_mem_size = 0;
+ float sample_rate = 1.0;
+ int channels = 1;
+ float length = 0.0;
+ bool loop = false;
+ float loop_offset = 0.0;
void clear_data();
protected:
diff --git a/modules/text_server_adv/bitmap_font_adv.cpp b/modules/text_server_adv/bitmap_font_adv.cpp
index 01fa94aa7c..df771301e6 100644
--- a/modules/text_server_adv/bitmap_font_adv.cpp
+++ b/modules/text_server_adv/bitmap_font_adv.cpp
@@ -36,7 +36,7 @@
struct hb_bmp_font_t {
BitmapFontDataAdvanced *face = nullptr;
- float font_size = 0;
+ float font_size = 0.0;
bool unref = false; /* Whether to destroy bm_face when done. */
};
@@ -340,7 +340,7 @@ Error BitmapFontDataAdvanced::load_from_file(const String &p_filename, int p_bas
char_map[idx] = c;
} else if (type == "kerning") {
KerningPairKey kpk;
- float k = 0;
+ float k = 0.0;
if (keys.has("first")) {
kpk.A = keys["first"].to_int();
}
@@ -540,7 +540,7 @@ Vector2 BitmapFontDataAdvanced::draw_glyph(RID p_canvas, int p_size, const Vecto
ERR_FAIL_COND_V(c == nullptr, Vector2());
ERR_FAIL_COND_V(c->texture_idx < -1 || c->texture_idx >= textures.size(), Vector2());
if (c->texture_idx != -1) {
- Point2 cpos = p_pos;
+ Point2i cpos = p_pos;
cpos += c->align * (float(p_size) / float(base_size));
cpos.y -= ascent * (float(p_size) / float(base_size));
if (RenderingServer::get_singleton() != nullptr) {
diff --git a/modules/text_server_adv/dynamic_font_adv.cpp b/modules/text_server_adv/dynamic_font_adv.cpp
index fcefa60d98..fd47f58480 100644
--- a/modules/text_server_adv/dynamic_font_adv.cpp
+++ b/modules/text_server_adv/dynamic_font_adv.cpp
@@ -124,8 +124,8 @@ DynamicFontDataAdvanced::DataAtSize *DynamicFontDataAdvanced::get_data_for_size(
fds->size = p_size;
fds->ascent = (fds->face->size->metrics.ascender / 64.0) / oversampling * fds->scale_color_font;
fds->descent = (-fds->face->size->metrics.descender / 64.0) / oversampling * fds->scale_color_font;
- fds->underline_position = -fds->face->underline_position / 64.0 / oversampling * fds->scale_color_font;
- fds->underline_thickness = fds->face->underline_thickness / 64.0 / oversampling * fds->scale_color_font;
+ fds->underline_position = (-FT_MulFix(fds->face->underline_position, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
+ fds->underline_thickness = (FT_MulFix(fds->face->underline_thickness, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
//Load os2 TTF pable
fds->os2 = (TT_OS2 *)FT_Get_Sfnt_Table(fds->face, FT_SFNT_OS2);
@@ -946,7 +946,7 @@ Vector2 DynamicFontDataAdvanced::draw_glyph(RID p_canvas, int p_size, const Vect
ERR_FAIL_COND_V(ch.texture_idx < -1 || ch.texture_idx >= fds->textures.size(), Vector2());
if (ch.texture_idx != -1) {
- Point2 cpos = p_pos;
+ Point2i cpos = p_pos;
cpos += ch.align;
Color modulate = p_color;
if (FT_HAS_COLOR(fds->face)) {
@@ -977,7 +977,7 @@ Vector2 DynamicFontDataAdvanced::draw_glyph_outline(RID p_canvas, int p_size, in
ERR_FAIL_COND_V(ch.texture_idx < -1 || ch.texture_idx >= fds->textures.size(), Vector2());
if (ch.texture_idx != -1) {
- Point2 cpos = p_pos;
+ Point2i cpos = p_pos;
cpos += ch.align;
Color modulate = p_color;
if (FT_HAS_COLOR(fds->face)) {
diff --git a/modules/text_server_adv/dynamic_font_adv.h b/modules/text_server_adv/dynamic_font_adv.h
index c35dd9390b..cd538cb8e1 100644
--- a/modules/text_server_adv/dynamic_font_adv.h
+++ b/modules/text_server_adv/dynamic_font_adv.h
@@ -74,14 +74,11 @@ private:
uint32_t size : 16;
uint32_t outline_size : 16;
};
- uint32_t key;
+ uint32_t key = 0;
};
bool operator<(CacheID right) const {
return key < right.key;
}
- CacheID() {
- key = 0;
- }
};
struct DataAtSize {
@@ -91,10 +88,10 @@ private:
int size = 0;
float scale_color_font = 1.f;
- float ascent = 0;
- float descent = 0;
- float underline_position = 0;
- float underline_thickness = 0;
+ float ascent = 0.0;
+ float descent = 0.0;
+ float underline_position = 0.0;
+ float underline_thickness = 0.0;
Vector<CharTexture> textures;
HashMap<uint32_t, Character> glyph_map;
diff --git a/modules/text_server_adv/font_adv.h b/modules/text_server_adv/font_adv.h
index 4bbd2dd4bf..2bb09c11ad 100644
--- a/modules/text_server_adv/font_adv.h
+++ b/modules/text_server_adv/font_adv.h
@@ -39,6 +39,8 @@ struct FontDataAdvanced {
Map<String, bool> lang_support_overrides;
Map<String, bool> script_support_overrides;
bool valid = false;
+ int spacing_space = 0;
+ int spacing_glyph = 0;
virtual void clear_cache() = 0;
@@ -58,6 +60,18 @@ struct FontDataAdvanced {
virtual float get_underline_position(int p_size) const = 0;
virtual float get_underline_thickness(int p_size) const = 0;
+ virtual int get_spacing_space() const { return spacing_space; };
+ virtual void set_spacing_space(int p_value) {
+ spacing_space = p_value;
+ clear_cache();
+ };
+
+ virtual int get_spacing_glyph() const { return spacing_glyph; };
+ virtual void set_spacing_glyph(int p_value) {
+ spacing_glyph = p_value;
+ clear_cache();
+ };
+
virtual void set_antialiased(bool p_antialiased) = 0;
virtual bool get_antialiased() const = 0;
diff --git a/modules/text_server_adv/script_iterator.h b/modules/text_server_adv/script_iterator.h
index ad476f7c75..896a0e5c15 100644
--- a/modules/text_server_adv/script_iterator.h
+++ b/modules/text_server_adv/script_iterator.h
@@ -45,9 +45,9 @@
class ScriptIterator {
public:
struct ScriptRange {
- int start;
- int end;
- hb_script_t script;
+ int start = 0;
+ int end = 0;
+ hb_script_t script = HB_SCRIPT_COMMON;
};
Vector<ScriptRange> script_ranges;
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp
index 8b05611089..1e015db210 100644
--- a/modules/text_server_adv/text_server_adv.cpp
+++ b/modules/text_server_adv/text_server_adv.cpp
@@ -601,6 +601,34 @@ float TextServerAdvanced::font_get_underline_thickness(RID p_font, int p_size) c
return fd->get_underline_thickness(p_size);
}
+int TextServerAdvanced::font_get_spacing_space(RID p_font) const {
+ _THREAD_SAFE_METHOD_
+ const FontDataAdvanced *fd = font_owner.getornull(p_font);
+ ERR_FAIL_COND_V(!fd, 0);
+ return fd->get_spacing_space();
+}
+
+void TextServerAdvanced::font_set_spacing_space(RID p_font, int p_value) {
+ _THREAD_SAFE_METHOD_
+ FontDataAdvanced *fd = font_owner.getornull(p_font);
+ ERR_FAIL_COND(!fd);
+ fd->set_spacing_space(p_value);
+}
+
+int TextServerAdvanced::font_get_spacing_glyph(RID p_font) const {
+ _THREAD_SAFE_METHOD_
+ const FontDataAdvanced *fd = font_owner.getornull(p_font);
+ ERR_FAIL_COND_V(!fd, 0);
+ return fd->get_spacing_glyph();
+}
+
+void TextServerAdvanced::font_set_spacing_glyph(RID p_font, int p_value) {
+ _THREAD_SAFE_METHOD_
+ FontDataAdvanced *fd = font_owner.getornull(p_font);
+ ERR_FAIL_COND(!fd);
+ fd->set_spacing_glyph(p_value);
+}
+
void TextServerAdvanced::font_set_antialiased(RID p_font, bool p_antialiased) {
_THREAD_SAFE_METHOD_
FontDataAdvanced *fd = font_owner.getornull(p_font);
@@ -1602,11 +1630,18 @@ bool TextServerAdvanced::shaped_text_update_breaks(RID p_shaped) {
HashMap<int, bool> breaks;
UErrorCode err = U_ZERO_ERROR;
- for (int i = 0; i < sd->spans.size(); i++) {
- UBreakIterator *bi = ubrk_open(UBRK_LINE, sd->spans[i].language.ascii().get_data(), data + _convert_pos_inv(sd, sd->spans[i].start), _convert_pos_inv(sd, sd->spans[i].end - sd->spans[i].start), &err);
+ int i = 0;
+ while (i < sd->spans.size()) {
+ String language = sd->spans[i].language;
+ int r_start = sd->spans[i].start;
+ while (i + 1 < sd->spans.size() && language == sd->spans[i + 1].language) {
+ i++;
+ }
+ int r_end = sd->spans[i].end;
+ UBreakIterator *bi = ubrk_open(UBRK_LINE, language.ascii().get_data(), data + _convert_pos_inv(sd, r_start), _convert_pos_inv(sd, r_end - r_start), &err);
if (U_FAILURE(err)) {
//No data loaded - use fallback.
- for (int j = sd->spans[i].start; j < sd->spans[i].end; j++) {
+ for (int j = r_start; j < r_end; j++) {
char32_t c = sd->text[j - sd->start];
if (is_whitespace(c)) {
breaks[j] = false;
@@ -1617,8 +1652,8 @@ bool TextServerAdvanced::shaped_text_update_breaks(RID p_shaped) {
}
} else {
while (ubrk_next(bi) != UBRK_DONE) {
- int pos = _convert_pos(sd, ubrk_current(bi)) + sd->spans[i].start - 1;
- if (pos != sd->spans[i].end) {
+ int pos = _convert_pos(sd, ubrk_current(bi)) + r_start - 1;
+ if (pos != r_end) {
if ((ubrk_getRuleStatus(bi) >= UBRK_LINE_HARD) && (ubrk_getRuleStatus(bi) < UBRK_LINE_HARD_LIMIT)) {
breaks[pos] = true;
} else if ((ubrk_getRuleStatus(bi) >= UBRK_LINE_SOFT) && (ubrk_getRuleStatus(bi) < UBRK_LINE_SOFT_LIMIT)) {
@@ -1628,6 +1663,7 @@ bool TextServerAdvanced::shaped_text_update_breaks(RID p_shaped) {
}
}
ubrk_close(bi);
+ i++;
}
sd->sort_valid = false;
@@ -1636,7 +1672,7 @@ bool TextServerAdvanced::shaped_text_update_breaks(RID p_shaped) {
const char32_t *ch = sd->text.ptr();
Glyph *sd_glyphs = sd->glyphs.ptrw();
- for (int i = 0; i < sd_size; i++) {
+ for (i = 0; i < sd_size; i++) {
if (sd_glyphs[i].count > 0) {
char32_t c = ch[sd_glyphs[i].start - sd->start];
if (c == 0xfffc) {
@@ -2041,6 +2077,11 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int32_t p_star
gl.x_off = Math::round(glyph_pos[i].x_offset / (64.0 / fd->get_font_scale(fs)));
gl.y_off = -Math::round(glyph_pos[i].y_offset / (64.0 / fd->get_font_scale(fs)));
}
+ if (fd->get_spacing_space() && is_whitespace(p_sd->text[glyph_info[i].cluster])) {
+ gl.advance += fd->get_spacing_space();
+ } else {
+ gl.advance += fd->get_spacing_glyph();
+ }
if (p_sd->preserve_control) {
last_cluster_valid = last_cluster_valid && ((glyph_info[i].codepoint != 0) || is_whitespace(p_sd->text[glyph_info[i].cluster]) || is_linebreak(p_sd->text[glyph_info[i].cluster]));
diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h
index 89fae477f9..c5ebe61bc3 100644
--- a/modules/text_server_adv/text_server_adv.h
+++ b/modules/text_server_adv/text_server_adv.h
@@ -134,6 +134,12 @@ public:
virtual float font_get_underline_position(RID p_font, int p_size) const override;
virtual float font_get_underline_thickness(RID p_font, int p_size) const override;
+ virtual int font_get_spacing_space(RID p_font) const override;
+ virtual void font_set_spacing_space(RID p_font, int p_value) override;
+
+ virtual int font_get_spacing_glyph(RID p_font) const override;
+ virtual void font_set_spacing_glyph(RID p_font, int p_value) override;
+
virtual void font_set_antialiased(RID p_font, bool p_antialiased) override;
virtual bool font_get_antialiased(RID p_font) const override;
diff --git a/modules/text_server_fb/bitmap_font_fb.cpp b/modules/text_server_fb/bitmap_font_fb.cpp
index 5c691b7bbd..c9a9cc6eba 100644
--- a/modules/text_server_fb/bitmap_font_fb.cpp
+++ b/modules/text_server_fb/bitmap_font_fb.cpp
@@ -148,7 +148,7 @@ Error BitmapFontDataFallback::load_from_file(const String &p_filename, int p_bas
char_map[idx] = c;
} else if (type == "kerning") {
KerningPairKey kpk;
- float k = 0;
+ float k = 0.0;
if (keys.has("first")) {
kpk.A = keys["first"].to_int();
}
@@ -321,7 +321,7 @@ Vector2 BitmapFontDataFallback::draw_glyph(RID p_canvas, int p_size, const Vecto
ERR_FAIL_COND_V(c == nullptr, Vector2());
ERR_FAIL_COND_V(c->texture_idx < -1 || c->texture_idx >= textures.size(), Vector2());
if (c->texture_idx != -1) {
- Point2 cpos = p_pos;
+ Point2i cpos = p_pos;
cpos += c->align * (float(p_size) / float(base_size));
cpos.y -= ascent * (float(p_size) / float(base_size));
diff --git a/modules/text_server_fb/dynamic_font_fb.cpp b/modules/text_server_fb/dynamic_font_fb.cpp
index 4eecba6ae8..6836d2b9e2 100644
--- a/modules/text_server_fb/dynamic_font_fb.cpp
+++ b/modules/text_server_fb/dynamic_font_fb.cpp
@@ -124,8 +124,9 @@ DynamicFontDataFallback::DataAtSize *DynamicFontDataFallback::get_data_for_size(
fds->size = p_size;
fds->ascent = (fds->face->size->metrics.ascender / 64.0) / oversampling * fds->scale_color_font;
fds->descent = (-fds->face->size->metrics.descender / 64.0) / oversampling * fds->scale_color_font;
- fds->underline_position = -fds->face->underline_position / 64.0 / oversampling * fds->scale_color_font;
- fds->underline_thickness = fds->face->underline_thickness / 64.0 / oversampling * fds->scale_color_font;
+ fds->underline_position = (-FT_MulFix(fds->face->underline_position, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
+ fds->underline_thickness = (FT_MulFix(fds->face->underline_thickness, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
+
if (p_outline_size != 0) {
size_cache_outline[id] = fds;
} else {
@@ -626,7 +627,7 @@ Vector2 DynamicFontDataFallback::draw_glyph(RID p_canvas, int p_size, const Vect
ERR_FAIL_COND_V(ch.texture_idx < -1 || ch.texture_idx >= fds->textures.size(), Vector2());
if (ch.texture_idx != -1) {
- Point2 cpos = p_pos;
+ Point2i cpos = p_pos;
cpos += ch.align;
Color modulate = p_color;
@@ -658,7 +659,7 @@ Vector2 DynamicFontDataFallback::draw_glyph_outline(RID p_canvas, int p_size, in
ERR_FAIL_COND_V(ch.texture_idx < -1 || ch.texture_idx >= fds->textures.size(), Vector2());
if (ch.texture_idx != -1) {
- Point2 cpos = p_pos;
+ Point2i cpos = p_pos;
cpos += ch.align;
Color modulate = p_color;
diff --git a/modules/text_server_fb/dynamic_font_fb.h b/modules/text_server_fb/dynamic_font_fb.h
index f1cd758f2c..81b18f6af3 100644
--- a/modules/text_server_fb/dynamic_font_fb.h
+++ b/modules/text_server_fb/dynamic_font_fb.h
@@ -70,14 +70,11 @@ private:
uint32_t size : 16;
uint32_t outline_size : 16;
};
- uint32_t key;
+ uint32_t key = 0;
};
bool operator<(CacheID right) const {
return key < right.key;
}
- CacheID() {
- key = 0;
- }
};
struct DataAtSize {
@@ -86,10 +83,10 @@ private:
int size = 0;
float scale_color_font = 1.f;
- float ascent = 0;
- float descent = 0;
- float underline_position = 0;
- float underline_thickness = 0;
+ float ascent = 0.0;
+ float descent = 0.0;
+ float underline_position = 0.0;
+ float underline_thickness = 0.0;
Vector<CharTexture> textures;
HashMap<char32_t, Character> char_map;
diff --git a/modules/text_server_fb/font_fb.h b/modules/text_server_fb/font_fb.h
index cc72919542..7fccbe06b5 100644
--- a/modules/text_server_fb/font_fb.h
+++ b/modules/text_server_fb/font_fb.h
@@ -37,6 +37,8 @@ struct FontDataFallback {
Map<String, bool> lang_support_overrides;
Map<String, bool> script_support_overrides;
bool valid = false;
+ int spacing_space = 0;
+ int spacing_glyph = 0;
virtual void clear_cache() = 0;
@@ -50,6 +52,18 @@ struct FontDataFallback {
virtual float get_underline_position(int p_size) const = 0;
virtual float get_underline_thickness(int p_size) const = 0;
+ virtual int get_spacing_space() const { return spacing_space; };
+ virtual void set_spacing_space(int p_value) {
+ spacing_space = p_value;
+ clear_cache();
+ };
+
+ virtual int get_spacing_glyph() const { return spacing_glyph; };
+ virtual void set_spacing_glyph(int p_value) {
+ spacing_glyph = p_value;
+ clear_cache();
+ };
+
virtual void set_antialiased(bool p_antialiased) = 0;
virtual bool get_antialiased() const = 0;
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp
index e60d269408..5cbe0f8277 100644
--- a/modules/text_server_fb/text_server_fb.cpp
+++ b/modules/text_server_fb/text_server_fb.cpp
@@ -179,6 +179,34 @@ float TextServerFallback::font_get_underline_thickness(RID p_font, int p_size) c
return fd->get_underline_thickness(p_size);
}
+int TextServerFallback::font_get_spacing_space(RID p_font) const {
+ _THREAD_SAFE_METHOD_
+ const FontDataFallback *fd = font_owner.getornull(p_font);
+ ERR_FAIL_COND_V(!fd, 0);
+ return fd->get_spacing_space();
+}
+
+void TextServerFallback::font_set_spacing_space(RID p_font, int p_value) {
+ _THREAD_SAFE_METHOD_
+ FontDataFallback *fd = font_owner.getornull(p_font);
+ ERR_FAIL_COND(!fd);
+ fd->set_spacing_space(p_value);
+}
+
+int TextServerFallback::font_get_spacing_glyph(RID p_font) const {
+ _THREAD_SAFE_METHOD_
+ const FontDataFallback *fd = font_owner.getornull(p_font);
+ ERR_FAIL_COND_V(!fd, 0);
+ return fd->get_spacing_glyph();
+}
+
+void TextServerFallback::font_set_spacing_glyph(RID p_font, int p_value) {
+ _THREAD_SAFE_METHOD_
+ FontDataFallback *fd = font_owner.getornull(p_font);
+ ERR_FAIL_COND(!fd);
+ fd->set_spacing_glyph(p_value);
+}
+
void TextServerFallback::font_set_antialiased(RID p_font, bool p_antialiased) {
_THREAD_SAFE_METHOD_
FontDataFallback *fd = font_owner.getornull(p_font);
@@ -1184,6 +1212,11 @@ bool TextServerFallback::shaped_text_shape(RID p_shaped) {
sd->descent = MAX(sd->descent, Math::round(fd->get_advance(gl.index, gl.font_size).x * 0.5));
}
}
+ if (fd->get_spacing_space() && is_whitespace(sd->text[j])) {
+ gl.advance += fd->get_spacing_space();
+ } else {
+ gl.advance += fd->get_spacing_glyph();
+ }
sd->upos = MAX(sd->upos, fd->get_underline_position(gl.font_size));
sd->uthk = MAX(sd->uthk, fd->get_underline_thickness(gl.font_size));
diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h
index d142b320e4..c14a444872 100644
--- a/modules/text_server_fb/text_server_fb.h
+++ b/modules/text_server_fb/text_server_fb.h
@@ -89,6 +89,12 @@ public:
virtual float font_get_underline_position(RID p_font, int p_size) const override;
virtual float font_get_underline_thickness(RID p_font, int p_size) const override;
+ virtual int font_get_spacing_space(RID p_font) const override;
+ virtual void font_set_spacing_space(RID p_font, int p_value) override;
+
+ virtual int font_get_spacing_glyph(RID p_font) const override;
+ virtual void font_set_spacing_glyph(RID p_font, int p_value) override;
+
virtual void font_set_antialiased(RID p_font, bool p_antialiased) override;
virtual bool font_get_antialiased(RID p_font) const override;
diff --git a/modules/tga/image_loader_tga.cpp b/modules/tga/image_loader_tga.cpp
index 2da9159228..ef53661557 100644
--- a/modules/tga/image_loader_tga.cpp
+++ b/modules/tga/image_loader_tga.cpp
@@ -56,6 +56,10 @@ Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t
compressed_pos += 1;
count = (c & 0x7f) + 1;
+ if (output_pos + count * p_pixel_size > output_pos) {
+ return ERR_PARSE_ERROR;
+ }
+
if (c & 0x80) {
for (size_t i = 0; i < p_pixel_size; i++) {
pixels_w[i] = p_compressed_buffer[compressed_pos];
@@ -79,7 +83,7 @@ Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t
return OK;
}
-Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buffer, const tga_header_s &p_header, const uint8_t *p_palette, const bool p_is_monochrome) {
+Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buffer, const tga_header_s &p_header, const uint8_t *p_palette, const bool p_is_monochrome, size_t p_output_size) {
#define TGA_PUT_PIXEL(r, g, b, a) \
int image_data_ofs = ((y * width) + x); \
image_data_w[image_data_ofs * 4 + 0] = r; \
@@ -130,6 +134,9 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff
if (p_is_monochrome) {
while (y != y_end) {
while (x != x_end) {
+ if (i > p_output_size) {
+ return ERR_PARSE_ERROR;
+ }
uint8_t shade = p_buffer[i];
TGA_PUT_PIXEL(shade, shade, shade, 0xff)
@@ -143,6 +150,9 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff
} else {
while (y != y_end) {
while (x != x_end) {
+ if (i > p_output_size) {
+ return ERR_PARSE_ERROR;
+ }
uint8_t index = p_buffer[i];
uint8_t r = 0x00;
uint8_t g = 0x00;
@@ -171,6 +181,10 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff
} else if (p_header.pixel_depth == 24) {
while (y != y_end) {
while (x != x_end) {
+ if (i + 2 > p_output_size) {
+ return ERR_PARSE_ERROR;
+ }
+
uint8_t r = p_buffer[i + 2];
uint8_t g = p_buffer[i + 1];
uint8_t b = p_buffer[i + 0];
@@ -186,6 +200,10 @@ Error ImageLoaderTGA::convert_to_image(Ref<Image> p_image, const uint8_t *p_buff
} else if (p_header.pixel_depth == 32) {
while (y != y_end) {
while (x != x_end) {
+ if (i + 3 > p_output_size) {
+ return ERR_PARSE_ERROR;
+ }
+
uint8_t a = p_buffer[i + 3];
uint8_t r = p_buffer[i + 2];
uint8_t g = p_buffer[i + 1];
@@ -279,7 +297,7 @@ Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
const uint8_t *src_image_r = src_image.ptr();
const size_t pixel_size = tga_header.pixel_depth >> 3;
- const size_t buffer_size = (tga_header.image_width * tga_header.image_height) * pixel_size;
+ size_t buffer_size = (tga_header.image_width * tga_header.image_height) * pixel_size;
Vector<uint8_t> uncompressed_buffer;
uncompressed_buffer.resize(buffer_size);
@@ -297,11 +315,12 @@ Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
}
} else {
buffer = src_image_r;
+ buffer_size = src_image_len;
};
if (err == OK) {
const uint8_t *palette_r = palette.ptr();
- err = convert_to_image(p_image, buffer, tga_header, palette_r, is_monochrome);
+ err = convert_to_image(p_image, buffer, tga_header, palette_r, is_monochrome, buffer_size);
}
}
diff --git a/modules/tga/image_loader_tga.h b/modules/tga/image_loader_tga.h
index 249e33411e..cb2ce07edd 100644
--- a/modules/tga/image_loader_tga.h
+++ b/modules/tga/image_loader_tga.h
@@ -57,23 +57,23 @@ class ImageLoaderTGA : public ImageFormatLoader {
};
struct tga_header_s {
- uint8_t id_length;
- uint8_t color_map_type;
+ uint8_t id_length = 0;
+ uint8_t color_map_type = 0;
tga_type_e image_type;
- uint16_t first_color_entry;
- uint16_t color_map_length;
- uint8_t color_map_depth;
+ uint16_t first_color_entry = 0;
+ uint16_t color_map_length = 0;
+ uint8_t color_map_depth = 0;
- uint16_t x_origin;
- uint16_t y_origin;
- uint16_t image_width;
- uint16_t image_height;
- uint8_t pixel_depth;
- uint8_t image_descriptor;
+ uint16_t x_origin = 0;
+ uint16_t y_origin = 0;
+ uint16_t image_width = 0;
+ uint16_t image_height = 0;
+ uint8_t pixel_depth = 0;
+ uint8_t image_descriptor = 0;
};
static Error decode_tga_rle(const uint8_t *p_compressed_buffer, size_t p_pixel_size, uint8_t *p_uncompressed_buffer, size_t p_output_size);
- static Error convert_to_image(Ref<Image> p_image, const uint8_t *p_buffer, const tga_header_s &p_header, const uint8_t *p_palette, const bool p_is_monochrome);
+ static Error convert_to_image(Ref<Image> p_image, const uint8_t *p_buffer, const tga_header_s &p_header, const uint8_t *p_palette, const bool p_is_monochrome, size_t p_output_size);
public:
virtual Error load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale);
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index 243265769e..c5f6dc0d99 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -140,9 +140,7 @@ void VideoStreamPlaybackTheora::clear() {
#ifdef THEORA_USE_THREAD_STREAMING
thread_exit = true;
thread_sem->post(); //just in case
- Thread::wait_to_finish(thread);
- memdelete(thread);
- thread = nullptr;
+ thread.wait_to_finish();
ring_buffer.clear();
#endif
@@ -181,7 +179,7 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) {
int read = file->get_buffer(read_buffer.ptr(), to_read);
ring_buffer.write(read_buffer.ptr(), read);
- thread = Thread::create(_streaming_thread, this);
+ thread.start(_streaming_thread, this);
#endif
@@ -556,7 +554,7 @@ void VideoStreamPlaybackTheora::play() {
}
playing = true;
- delay_compensation = ProjectSettings::get_singleton()->get("audio/video_delay_compensation_ms");
+ delay_compensation = ProjectSettings::get_singleton()->get("audio/video/video_delay_compensation_ms");
delay_compensation /= 1000.0;
};
@@ -647,31 +645,13 @@ void VideoStreamPlaybackTheora::_streaming_thread(void *ud) {
#endif
VideoStreamPlaybackTheora::VideoStreamPlaybackTheora() {
- file = nullptr;
- theora_p = 0;
- vorbis_p = 0;
- videobuf_ready = 0;
- playing = false;
- frames_pending = 0;
- videobuf_time = 0;
- paused = false;
-
- buffering = false;
texture = Ref<ImageTexture>(memnew(ImageTexture));
- mix_callback = nullptr;
- mix_udata = nullptr;
- audio_track = 0;
- delay_compensation = 0;
- audio_frames_wrote = 0;
#ifdef THEORA_USE_THREAD_STREAMING
int rb_power = nearest_shift(RB_SIZE_KB * 1024);
ring_buffer.resize(rb_power);
read_buffer.resize(RB_SIZE_KB * 1024);
thread_sem = Semaphore::create();
- thread = nullptr;
- thread_exit = false;
- thread_eof = false;
#endif
};
@@ -697,7 +677,7 @@ void VideoStreamTheora::_bind_methods() {
////////////
-RES ResourceFormatLoaderTheora::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderTheora::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
if (!f) {
if (r_error) {
diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h
index d2036b5cb4..2685a8a013 100644
--- a/modules/theora/video_stream_theora.h
+++ b/modules/theora/video_stream_theora.h
@@ -36,6 +36,7 @@
#include "core/os/semaphore.h"
#include "core/os/thread.h"
#include "core/templates/ring_buffer.h"
+#include "core/templates/safe_refcount.h"
#include "scene/resources/video_stream.h"
#include "servers/audio_server.h"
@@ -52,12 +53,12 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback {
};
//Image frames[MAX_FRAMES];
- Image::Format format;
+ Image::Format format = Image::Format::FORMAT_L8;
Vector<uint8_t> frame_data;
- int frames_pending;
- FileAccess *file;
+ int frames_pending = 0;
+ FileAccess *file = nullptr;
String file_name;
- int audio_frames_wrote;
+ int audio_frames_wrote = 0;
Point2i size;
int buffer_data();
@@ -65,8 +66,8 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback {
void video_write();
float get_time() const;
- bool theora_eos;
- bool vorbis_eos;
+ bool theora_eos = false;
+ bool vorbis_eos = false;
ogg_sync_state oy;
ogg_page og;
@@ -74,33 +75,33 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback {
ogg_stream_state to;
th_info ti;
th_comment tc;
- th_dec_ctx *td;
+ th_dec_ctx *td = nullptr;
vorbis_info vi;
vorbis_dsp_state vd;
vorbis_block vb;
vorbis_comment vc;
th_pixel_fmt px_fmt;
- double videobuf_time;
- int pp_inc;
+ double videobuf_time = 0;
+ int pp_inc = 0;
- int theora_p;
- int vorbis_p;
- int pp_level_max;
- int pp_level;
- int videobuf_ready;
+ int theora_p = 0;
+ int vorbis_p = 0;
+ int pp_level_max = 0;
+ int pp_level = 0;
+ int videobuf_ready = 0;
- bool playing;
- bool buffering;
+ bool playing = false;
+ bool buffering = false;
- double last_update_time;
- double time;
- double delay_compensation;
+ double last_update_time = 0;
+ double time = 0;
+ double delay_compensation = 0;
Ref<ImageTexture> texture;
AudioMixCallback mix_callback;
- void *mix_udata;
- bool paused;
+ void *mix_udata = nullptr;
+ bool paused = false;
#ifdef THEORA_USE_THREAD_STREAMING
@@ -110,16 +111,16 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback {
RingBuffer<uint8_t> ring_buffer;
Vector<uint8_t> read_buffer;
- bool thread_eof;
+ bool thread_eof = false;
Semaphore *thread_sem;
- Thread *thread;
- volatile bool thread_exit;
+ Thread thread;
+ SafeFlag thread_exit;
static void _streaming_thread(void *ud);
#endif
- int audio_track;
+ int audio_track = 0;
protected:
void clear();
@@ -185,7 +186,7 @@ public:
class ResourceFormatLoaderTheora : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/modules/upnp/upnp.cpp b/modules/upnp/upnp.cpp
index 8c3be884bd..cff13251ce 100644
--- a/modules/upnp/upnp.cpp
+++ b/modules/upnp/upnp.cpp
@@ -393,9 +393,6 @@ void UPNP::_bind_methods() {
}
UPNP::UPNP() {
- discover_multicast_if = "";
- discover_local_port = 0;
- discover_ipv6 = false;
}
UPNP::~UPNP() {
diff --git a/modules/upnp/upnp.h b/modules/upnp/upnp.h
index 9dfa907476..a0cca96bc8 100644
--- a/modules/upnp/upnp.h
+++ b/modules/upnp/upnp.h
@@ -41,9 +41,9 @@ class UPNP : public Reference {
GDCLASS(UPNP, Reference);
private:
- String discover_multicast_if;
- int discover_local_port;
- bool discover_ipv6;
+ String discover_multicast_if = "";
+ int discover_local_port = 0;
+ bool discover_ipv6 = false;
Vector<Ref<UPNPDevice>> devices;
diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
index 4004f1a04c..219ffd01d3 100644
--- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
@@ -202,24 +202,20 @@
<constant name="BYTES_TO_VAR" value="62" enum="BuiltinFunc">
Deserialize a [Variant] from a [PackedByteArray] serialized using [constant VAR_TO_BYTES].
</constant>
- <constant name="COLORN" value="63" enum="BuiltinFunc">
- Return the [Color] with the given name and alpha ranging from 0 to 1.
- [b]Note:[/b] Names are defined in [code]color_names.inc[/code].
- </constant>
- <constant name="MATH_SMOOTHSTEP" value="64" enum="BuiltinFunc">
+ <constant name="MATH_SMOOTHSTEP" value="63" enum="BuiltinFunc">
Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to [constant MATH_LERP], but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula:
[codeblock]
var t = clamp((weight - from) / (to - from), 0.0, 1.0)
return t * t * (3.0 - 2.0 * t)
[/codeblock]
</constant>
- <constant name="MATH_POSMOD" value="65" enum="BuiltinFunc">
+ <constant name="MATH_POSMOD" value="64" enum="BuiltinFunc">
</constant>
- <constant name="MATH_LERP_ANGLE" value="66" enum="BuiltinFunc">
+ <constant name="MATH_LERP_ANGLE" value="65" enum="BuiltinFunc">
</constant>
- <constant name="TEXT_ORD" value="67" enum="BuiltinFunc">
+ <constant name="TEXT_ORD" value="66" enum="BuiltinFunc">
</constant>
- <constant name="FUNC_MAX" value="68" enum="BuiltinFunc">
+ <constant name="FUNC_MAX" value="67" enum="BuiltinFunc">
Represents the size of the [enum BuiltinFunc] enum.
</constant>
</constants>
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index fe92f59179..2517b17168 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -137,7 +137,6 @@ Ref<VisualScript> VisualScriptNode::get_visual_script() const {
}
VisualScriptNode::VisualScriptNode() {
- breakpoint = false;
}
////////////////
@@ -145,8 +144,6 @@ VisualScriptNode::VisualScriptNode() {
/////////////////////
VisualScriptNodeInstance::VisualScriptNodeInstance() {
- sequence_outputs = nullptr;
- input_ports = nullptr;
}
VisualScriptNodeInstance::~VisualScriptNodeInstance() {
@@ -2623,14 +2620,8 @@ void VisualScriptLanguage::get_registered_node_names(List<String> *r_names) {
}
VisualScriptLanguage::VisualScriptLanguage() {
- notification = "_notification";
- _step = "_step";
- _subcall = "_subcall";
singleton = this;
- _debug_parse_err_node = -1;
- _debug_parse_err_file = "";
- _debug_call_stack_pos = 0;
int dmcs = GLOBAL_DEF("debug/settings/visual_script/max_call_stack", 1024);
ProjectSettings::get_singleton()->set_custom_property_info("debug/settings/visual_script/max_call_stack", PropertyInfo(Variant::INT, "debug/settings/visual_script/max_call_stack", PROPERTY_HINT_RANGE, "1024,4096,1,or_greater")); //minimum is 1024
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index bdb3c3a16b..72362e0ef4 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -49,7 +49,7 @@ class VisualScriptNode : public Resource {
Ref<VisualScript> script_used;
Array default_input_values;
- bool breakpoint;
+ bool breakpoint = false;
void _set_default_input_values(Array p_values);
Array _get_default_input_values() const;
@@ -90,13 +90,9 @@ public:
virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance) = 0;
struct TypeGuess {
- Variant::Type type;
+ Variant::Type type = Variant::NIL;
StringName gdclass;
Ref<Script> script;
-
- TypeGuess() {
- type = Variant::NIL;
- }
};
virtual TypeGuess guess_output_type(TypeGuess *p_inputs, int p_output) const;
@@ -114,19 +110,19 @@ class VisualScriptNodeInstance {
INPUT_DEFAULT_VALUE_BIT = INPUT_SHIFT, // from unassigned input port, using default value (edited by user)
};
- int id;
- int sequence_index;
- VisualScriptNodeInstance **sequence_outputs;
- int sequence_output_count;
+ int id = 0;
+ int sequence_index = 0;
+ VisualScriptNodeInstance **sequence_outputs = nullptr;
+ int sequence_output_count = 0;
Vector<VisualScriptNodeInstance *> dependencies;
- int *input_ports;
- int input_port_count;
- int *output_ports;
- int output_port_count;
- int working_mem_idx;
- int pass_idx;
+ int *input_ports = nullptr;
+ int input_port_count = 0;
+ int *output_ports = nullptr;
+ int output_port_count = 0;
+ int working_mem_idx = 0;
+ int pass_idx = 0;
- VisualScriptNode *base;
+ VisualScriptNode *base = nullptr;
public:
enum StartMode {
@@ -178,7 +174,7 @@ public:
uint64_t from_output : 16;
uint64_t to_node : 24;
};
- uint64_t id;
+ uint64_t id = 0;
};
bool operator<(const SequenceConnection &p_connection) const {
@@ -194,7 +190,7 @@ public:
uint64_t to_node : 24;
uint64_t to_port : 8;
};
- uint64_t id;
+ uint64_t id = 0;
};
bool operator<(const DataConnection &p_connection) const {
@@ -208,7 +204,7 @@ private:
StringName base_type;
struct Argument {
String name;
- Variant::Type type;
+ Variant::Type type = Variant::Type::NIL;
};
struct NodeData {
@@ -231,7 +227,7 @@ private:
struct Variable {
PropertyInfo info;
Variant default_value;
- bool _export;
+ bool _export = false;
// Add getter & setter options here.
};
@@ -388,26 +384,27 @@ public:
};
class VisualScriptInstance : public ScriptInstance {
- Object *owner;
+ Object *owner = nullptr;
Ref<VisualScript> script;
Map<StringName, Variant> variables; // Using variable path, not script.
Map<int, VisualScriptNodeInstance *> instances;
struct Function {
- int node;
- int max_stack;
- int trash_pos;
- int flow_stack_size;
- int pass_stack_size;
- int node_count;
- int argument_count;
+ int node = 0;
+ int max_stack = 0;
+ int trash_pos = 0;
+ int flow_stack_size = 0;
+ int pass_stack_size = 0;
+ int node_count = 0;
+ int argument_count = 0;
};
Map<StringName, Function> functions;
Vector<Variant> default_values;
- int max_input_args, max_output_args;
+ int max_input_args = 0;
+ int max_output_args = 0;
StringName source;
@@ -479,14 +476,14 @@ class VisualScriptFunctionState : public Reference {
ObjectID instance_id;
ObjectID script_id;
- VisualScriptInstance *instance;
+ VisualScriptInstance *instance = nullptr;
StringName function;
Vector<uint8_t> stack;
- int working_mem_index;
- int variant_stack_size;
- VisualScriptNodeInstance *node;
- int flow_stack_pos;
- int pass;
+ int working_mem_index = 0;
+ int variant_stack_size = 0;
+ VisualScriptNodeInstance *node = nullptr;
+ int flow_stack_pos = 0;
+ int pass = 0;
Variant _signal_callback(const Variant **p_args, int p_argcount, Callable::CallError &r_error);
@@ -507,25 +504,25 @@ class VisualScriptLanguage : public ScriptLanguage {
Map<String, VisualScriptNodeRegisterFunc> register_funcs;
struct CallLevel {
- Variant *stack;
- Variant **work_mem;
- const StringName *function;
- VisualScriptInstance *instance;
- int *current_id;
+ Variant *stack = nullptr;
+ Variant **work_mem = nullptr;
+ const StringName *function = nullptr;
+ VisualScriptInstance *instance = nullptr;
+ int *current_id = nullptr;
};
- int _debug_parse_err_node;
- String _debug_parse_err_file;
+ int _debug_parse_err_node = -1;
+ String _debug_parse_err_file = "";
String _debug_error;
- int _debug_call_stack_pos;
+ int _debug_call_stack_pos = 0;
int _debug_max_call_stack;
CallLevel *_call_stack;
public:
- StringName notification;
+ StringName notification = "_notification";
StringName _get_output_port_unsequenced;
- StringName _step;
- StringName _subcall;
+ StringName _step = "_step";
+ StringName _subcall = "_subcall";
static VisualScriptLanguage *singleton;
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index 2558c1d7ec..7ca14fbca8 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -101,7 +101,6 @@ const char *VisualScriptBuiltinFunc::func_name[VisualScriptBuiltinFunc::FUNC_MAX
"str2var",
"var2bytes",
"bytes2var",
- "color_named",
"smoothstep",
"posmod",
"lerp_angle",
@@ -200,7 +199,6 @@ int VisualScriptBuiltinFunc::get_func_argument_count(BuiltinFunc p_func) {
case LOGIC_MAX:
case LOGIC_MIN:
case TYPE_CONVERT:
- case COLORN:
return 2;
case MATH_LERP:
case MATH_LERP_ANGLE:
@@ -476,13 +474,6 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
return PropertyInfo(Variant::BOOL, "allow_objects");
}
} break;
- case COLORN: {
- if (p_idx == 0) {
- return PropertyInfo(Variant::STRING, "name");
- } else {
- return PropertyInfo(Variant::FLOAT, "alpha");
- }
- } break;
case FUNC_MAX: {
}
}
@@ -635,9 +626,6 @@ PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) cons
t = Variant::BOOL;
}
} break;
- case COLORN: {
- t = Variant::COLOR;
- } break;
case FUNC_MAX: {
}
}
@@ -659,7 +647,7 @@ String VisualScriptBuiltinFunc::get_caption() const {
void VisualScriptBuiltinFunc::set_func(BuiltinFunc p_which) {
ERR_FAIL_INDEX(p_which, FUNC_MAX);
func = p_which;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1176,15 +1164,6 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
*r_return = ret;
} break;
- case VisualScriptBuiltinFunc::COLORN: {
- VALIDATE_ARG_NUM(1);
-
- Color color = Color::named(*p_inputs[0]);
- color.a = *p_inputs[1];
-
- *r_return = String(color);
-
- } break;
default: {
}
}
@@ -1292,7 +1271,6 @@ void VisualScriptBuiltinFunc::_bind_methods() {
BIND_ENUM_CONSTANT(STR_TO_VAR);
BIND_ENUM_CONSTANT(VAR_TO_BYTES);
BIND_ENUM_CONSTANT(BYTES_TO_VAR);
- BIND_ENUM_CONSTANT(COLORN);
BIND_ENUM_CONSTANT(MATH_SMOOTHSTEP);
BIND_ENUM_CONSTANT(MATH_POSMOD);
BIND_ENUM_CONSTANT(MATH_LERP_ANGLE);
@@ -1388,5 +1366,4 @@ void register_visual_script_builtin_func_node() {
VisualScriptLanguage::singleton->add_register_func("functions/built_in/str2var", create_builtin_func_node<VisualScriptBuiltinFunc::STR_TO_VAR>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/var2bytes", create_builtin_func_node<VisualScriptBuiltinFunc::VAR_TO_BYTES>);
VisualScriptLanguage::singleton->add_register_func("functions/built_in/bytes2var", create_builtin_func_node<VisualScriptBuiltinFunc::BYTES_TO_VAR>);
- VisualScriptLanguage::singleton->add_register_func("functions/built_in/color_named", create_builtin_func_node<VisualScriptBuiltinFunc::COLORN>);
}
diff --git a/modules/visual_script/visual_script_builtin_funcs.h b/modules/visual_script/visual_script_builtin_funcs.h
index eaa2ef41e2..1fafaf1d98 100644
--- a/modules/visual_script/visual_script_builtin_funcs.h
+++ b/modules/visual_script/visual_script_builtin_funcs.h
@@ -101,7 +101,6 @@ public:
STR_TO_VAR,
VAR_TO_BYTES,
BYTES_TO_VAR,
- COLORN,
MATH_SMOOTHSTEP,
MATH_POSMOD,
MATH_LERP_ANGLE,
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 1e82259e59..fcd55b3049 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -61,7 +61,7 @@ protected:
}
void _sig_changed() {
- _change_notify();
+ notify_property_list_changed();
emit_signal("changed");
}
@@ -172,7 +172,7 @@ protected:
public:
void edit(const StringName &p_sig) {
sig = p_sig;
- _change_notify();
+ notify_property_list_changed();
}
VisualScriptEditorSignalEdit() { undo_redo = nullptr; }
@@ -195,11 +195,10 @@ protected:
}
void _var_changed() {
- _change_notify();
+ notify_property_list_changed();
emit_signal("changed");
}
void _var_value_changed() {
- _change_notify("value"); // So the whole tree is not redrawn, makes editing smoother in general.
emit_signal("changed");
}
@@ -331,7 +330,7 @@ protected:
public:
void edit(const StringName &p_var) {
var = p_var;
- _change_notify();
+ notify_property_list_changed();
}
VisualScriptEditorVariableEdit() { undo_redo = nullptr; }
@@ -981,6 +980,10 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
}
_update_graph_connections();
+
+ float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
+ graph->set_minimap_opacity(graph_minimap_opacity);
+
// Use default_func instead of default_func for now I think that should be good stop gap solution to ensure not breaking anything.
graph->call_deferred("set_scroll_ofs", script->get_scroll() * EDSCALE);
updating_graph = false;
@@ -3685,16 +3688,23 @@ void VisualScriptEditor::_comment_node_resized(const Vector2 &p_new_size, int p_
return;
}
+ Vector2 new_size = p_new_size;
+ if (graph->is_using_snap()) {
+ Vector2 snap = Vector2(graph->get_snap(), graph->get_snap());
+ Vector2 min_size = (gn->get_minimum_size() + (snap * 0.5)).snapped(snap);
+ new_size = new_size.snapped(snap).max(min_size);
+ }
+
updating_graph = true;
graph->set_block_minimum_size_adjust(true); //faster resize
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_do_method(vsc.ptr(), "set_size", new_size / EDSCALE);
undo_redo->add_undo_method(vsc.ptr(), "set_size", vsc->get_size());
undo_redo->commit_action();
- gn->set_custom_minimum_size(p_new_size);
+ gn->set_custom_minimum_size(new_size);
gn->set_size(Size2(1, 1));
graph->set_block_minimum_size_adjust(false);
updating_graph = false;
@@ -4264,13 +4274,13 @@ VisualScriptEditor::VisualScriptEditor() {
edit_menu->set_shortcut_context(this);
edit_menu->set_text(TTR("Edit"));
edit_menu->set_switch_on_hover(true);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/delete_selected"), EDIT_DELETE_NODES);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_graph_delete"), EDIT_DELETE_NODES);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/toggle_breakpoint"), EDIT_TOGGLE_BREAKPOINT);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/find_node_type"), EDIT_FIND_NODE_TYPE);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/copy_nodes"), EDIT_COPY_NODES);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/cut_nodes"), EDIT_CUT_NODES);
- edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/paste_nodes"), EDIT_PASTE_NODES);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_copy"), EDIT_COPY_NODES);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_cut"), EDIT_CUT_NODES);
+ edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_paste"), EDIT_PASTE_NODES);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/create_function"), EDIT_CREATE_FUNCTION);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/refresh_nodes"), REFRESH_GRAPH);
@@ -4326,6 +4336,8 @@ VisualScriptEditor::VisualScriptEditor() {
graph->connect("duplicate_nodes_request", callable_mp(this, &VisualScriptEditor::_on_nodes_duplicate));
graph->connect("gui_input", callable_mp(this, &VisualScriptEditor::_graph_gui_input));
graph->set_drag_forwarding(this);
+ float graph_minimap_opacity = EditorSettings::get_singleton()->get("editors/visual_editors/minimap_opacity");
+ graph->set_minimap_opacity(graph_minimap_opacity);
graph->hide();
graph->connect("scroll_offset_changed", callable_mp(this, &VisualScriptEditor::_graph_ofs_changed));
@@ -4508,12 +4520,8 @@ void VisualScriptEditor::free_clipboard() {
static void register_editor_callback() {
ScriptEditor::register_create_script_editor_function(create_editor);
- ED_SHORTCUT("visual_script_editor/delete_selected", TTR("Delete Selected"), KEY_DELETE);
ED_SHORTCUT("visual_script_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_F9);
ED_SHORTCUT("visual_script_editor/find_node_type", TTR("Find Node Type"), KEY_MASK_CMD + KEY_F);
- ED_SHORTCUT("visual_script_editor/copy_nodes", TTR("Copy Nodes"), KEY_MASK_CMD + KEY_C);
- ED_SHORTCUT("visual_script_editor/cut_nodes", TTR("Cut Nodes"), KEY_MASK_CMD + KEY_X);
- ED_SHORTCUT("visual_script_editor/paste_nodes", TTR("Paste Nodes"), KEY_MASK_CMD + KEY_V);
ED_SHORTCUT("visual_script_editor/create_function", TTR("Make Function"), KEY_MASK_CMD + KEY_G);
ED_SHORTCUT("visual_script_editor/refresh_nodes", TTR("Refresh Graph"), KEY_MASK_CMD + KEY_R);
ED_SHORTCUT("visual_script_editor/edit_member", TTR("Edit Member"), KEY_MASK_CMD + KEY_E);
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp
index 9596fda95c..f673cbb06d 100644
--- a/modules/visual_script/visual_script_expression.cpp
+++ b/modules/visual_script/visual_script_expression.cpp
@@ -63,7 +63,7 @@ bool VisualScriptExpression::_set(const StringName &p_name, const Variant &p_val
}
expression_dirty = true;
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
return true;
}
@@ -1506,13 +1506,20 @@ VisualScriptNodeInstance *VisualScriptExpression::instance(VisualScriptInstance
return instance;
}
+void VisualScriptExpression::reset_state() {
+ if (nodes) {
+ memdelete(nodes);
+ nodes = nullptr;
+ root = nullptr;
+ }
+
+ error_str = String();
+ error_set = false;
+ str_ofs = 0;
+ inputs.clear();
+}
+
VisualScriptExpression::VisualScriptExpression() {
- output_type = Variant::NIL;
- expression_dirty = true;
- error_set = true;
- root = nullptr;
- nodes = nullptr;
- sequenced = false;
}
VisualScriptExpression::~VisualScriptExpression() {
diff --git a/modules/visual_script/visual_script_expression.h b/modules/visual_script/visual_script_expression.h
index 7fe665769d..c35075ea53 100644
--- a/modules/visual_script/visual_script_expression.h
+++ b/modules/visual_script/visual_script_expression.h
@@ -39,20 +39,18 @@ class VisualScriptExpression : public VisualScriptNode {
friend class VisualScriptNodeInstanceExpression;
struct Input {
- Variant::Type type;
+ Variant::Type type = Variant::NIL;
String name;
-
- Input() { type = Variant::NIL; }
};
Vector<Input> inputs;
- Variant::Type output_type;
+ Variant::Type output_type = Variant::NIL;
String expression;
- bool sequenced;
- int str_ofs;
- bool expression_dirty;
+ bool sequenced = false;
+ int str_ofs = 0;
+ bool expression_dirty = true;
bool _compile_expression();
@@ -114,7 +112,7 @@ class VisualScriptExpression : public VisualScriptNode {
Error _get_token(Token &r_token);
String error_str;
- bool error_set;
+ bool error_set = true;
struct ENode {
enum Type {
@@ -131,11 +129,10 @@ class VisualScriptExpression : public VisualScriptNode {
TYPE_CALL
};
- ENode *next;
+ ENode *next = nullptr;
- Type type;
+ Type type = Type::TYPE_SELF;
- ENode() { next = nullptr; }
virtual ~ENode() {
if (next) {
memdelete(next);
@@ -144,17 +141,17 @@ class VisualScriptExpression : public VisualScriptNode {
};
struct Expression {
- bool is_op;
+ bool is_op = false;
union {
Variant::Operator op;
- ENode *node;
+ ENode *node = nullptr;
};
};
ENode *_parse_expression();
struct InputNode : public ENode {
- int index;
+ int index = 0;
InputNode() {
type = TYPE_INPUT;
}
@@ -168,9 +165,9 @@ class VisualScriptExpression : public VisualScriptNode {
};
struct OperatorNode : public ENode {
- Variant::Operator op;
+ Variant::Operator op = Variant::Operator::OP_ADD;
- ENode *nodes[2];
+ ENode *nodes[2] = { nullptr, nullptr };
OperatorNode() {
type = TYPE_OPERATOR;
@@ -184,8 +181,8 @@ class VisualScriptExpression : public VisualScriptNode {
};
struct IndexNode : public ENode {
- ENode *base;
- ENode *index;
+ ENode *base = nullptr;
+ ENode *index = nullptr;
IndexNode() {
type = TYPE_INDEX;
@@ -193,7 +190,7 @@ class VisualScriptExpression : public VisualScriptNode {
};
struct NamedIndexNode : public ENode {
- ENode *base;
+ ENode *base = nullptr;
StringName name;
NamedIndexNode() {
@@ -202,7 +199,7 @@ class VisualScriptExpression : public VisualScriptNode {
};
struct ConstructorNode : public ENode {
- Variant::Type data_type;
+ Variant::Type data_type = Variant::Type::NIL;
Vector<ENode *> arguments;
ConstructorNode() {
@@ -211,7 +208,7 @@ class VisualScriptExpression : public VisualScriptNode {
};
struct CallNode : public ENode {
- ENode *base;
+ ENode *base = nullptr;
StringName method;
Vector<ENode *> arguments;
@@ -235,7 +232,7 @@ class VisualScriptExpression : public VisualScriptNode {
};
struct BuiltinFuncNode : public ENode {
- VisualScriptBuiltinFunc::BuiltinFunc func;
+ VisualScriptBuiltinFunc::BuiltinFunc func = VisualScriptBuiltinFunc::BuiltinFunc::BYTES_TO_VAR;
Vector<ENode *> arguments;
BuiltinFuncNode() {
type = TYPE_BUILTIN_FUNC;
@@ -250,8 +247,8 @@ class VisualScriptExpression : public VisualScriptNode {
return node;
}
- ENode *root;
- ENode *nodes;
+ ENode *root = nullptr;
+ ENode *nodes = nullptr;
protected:
bool _set(const StringName &p_name, const Variant &p_value);
@@ -259,6 +256,8 @@ protected:
void _get_property_list(List<PropertyInfo> *p_list) const;
public:
+ virtual void reset_state() override;
+
virtual int get_output_sequence_port_count() const override;
virtual bool has_input_sequence_port() const override;
diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp
index 0049e254c4..e2a8323509 100644
--- a/modules/visual_script/visual_script_flow_control.cpp
+++ b/modules/visual_script/visual_script_flow_control.cpp
@@ -628,7 +628,7 @@ VisualScriptNodeInstance *VisualScriptSwitch::instance(VisualScriptInstance *p_i
bool VisualScriptSwitch::_set(const StringName &p_name, const Variant &p_value) {
if (String(p_name) == "case_count") {
case_values.resize(p_value);
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
return true;
}
@@ -638,7 +638,7 @@ bool VisualScriptSwitch::_set(const StringName &p_name, const Variant &p_value)
ERR_FAIL_INDEX_V(idx, case_values.size(), false);
case_values.write[idx].type = Variant::Type(int(p_value));
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
return true;
@@ -677,6 +677,10 @@ void VisualScriptSwitch::_get_property_list(List<PropertyInfo> *p_list) const {
}
}
+void VisualScriptSwitch::reset_state() {
+ case_values.clear();
+}
+
void VisualScriptSwitch::_bind_methods() {
}
@@ -733,7 +737,7 @@ void VisualScriptTypeCast::set_base_type(const StringName &p_type) {
}
base_type = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -747,7 +751,7 @@ void VisualScriptTypeCast::set_base_script(const String &p_path) {
}
script = p_path;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
diff --git a/modules/visual_script/visual_script_flow_control.h b/modules/visual_script/visual_script_flow_control.h
index 46a72bb92d..d9c4dedafd 100644
--- a/modules/visual_script/visual_script_flow_control.h
+++ b/modules/visual_script/visual_script_flow_control.h
@@ -202,6 +202,8 @@ protected:
static void _bind_methods();
public:
+ virtual void reset_state() override;
+
virtual int get_output_sequence_port_count() const override;
virtual bool has_input_sequence_port() const override;
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index d016b938de..b5aacb0506 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -281,7 +281,7 @@ void VisualScriptFunctionCall::set_basic_type(Variant::Type p_type) {
}
basic_type = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -295,7 +295,7 @@ void VisualScriptFunctionCall::set_base_type(const StringName &p_type) {
}
base_type = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -309,7 +309,7 @@ void VisualScriptFunctionCall::set_base_script(const String &p_path) {
}
base_script = p_path;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -328,7 +328,7 @@ void VisualScriptFunctionCall::set_singleton(const StringName &p_type) {
base_type = obj->get_class();
}
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -425,7 +425,7 @@ void VisualScriptFunctionCall::set_function(const StringName &p_type) {
_update_method_cache();
}
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -439,7 +439,7 @@ void VisualScriptFunctionCall::set_base_path(const NodePath &p_type) {
}
base_path = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -453,7 +453,7 @@ void VisualScriptFunctionCall::set_call_mode(CallMode p_mode) {
}
call_mode = p_mode;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -476,7 +476,7 @@ void VisualScriptFunctionCall::set_rpc_call_mode(VisualScriptFunctionCall::RPCCa
}
rpc_call_mode = p_mode;
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
VisualScriptFunctionCall::RPCCallMode VisualScriptFunctionCall::get_rpc_call_mode() const {
@@ -1067,7 +1067,7 @@ void VisualScriptPropertySet::set_basic_type(Variant::Type p_type) {
}
basic_type = p_type;
- _change_notify();
+ notify_property_list_changed();
_update_base_type();
ports_changed_notify();
}
@@ -1082,7 +1082,7 @@ void VisualScriptPropertySet::set_base_type(const StringName &p_type) {
}
base_type = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1096,7 +1096,7 @@ void VisualScriptPropertySet::set_base_script(const String &p_path) {
}
base_script = p_path;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1191,7 +1191,7 @@ void VisualScriptPropertySet::set_property(const StringName &p_type) {
property = p_type;
index = StringName();
_update_cache();
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1206,7 +1206,7 @@ void VisualScriptPropertySet::set_base_path(const NodePath &p_type) {
base_path = p_type;
_update_base_type();
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1221,7 +1221,7 @@ void VisualScriptPropertySet::set_call_mode(CallMode p_mode) {
call_mode = p_mode;
_update_base_type();
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1243,7 +1243,7 @@ void VisualScriptPropertySet::set_index(const StringName &p_type) {
}
index = p_type;
_update_cache();
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1259,7 +1259,7 @@ void VisualScriptPropertySet::set_assign_op(AssignOp p_op) {
assign_op = p_op;
_update_cache();
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1760,7 +1760,7 @@ void VisualScriptPropertyGet::set_base_type(const StringName &p_type) {
}
base_type = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1774,7 +1774,7 @@ void VisualScriptPropertyGet::set_base_script(const String &p_path) {
}
base_script = p_path;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1871,7 +1871,7 @@ void VisualScriptPropertyGet::set_property(const StringName &p_type) {
property = p_type;
_update_cache();
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1885,7 +1885,7 @@ void VisualScriptPropertyGet::set_base_path(const NodePath &p_type) {
}
base_path = p_type;
- _change_notify();
+ notify_property_list_changed();
_update_base_type();
ports_changed_notify();
}
@@ -1900,7 +1900,7 @@ void VisualScriptPropertyGet::set_call_mode(CallMode p_mode) {
}
call_mode = p_mode;
- _change_notify();
+ notify_property_list_changed();
_update_base_type();
ports_changed_notify();
}
@@ -1915,7 +1915,7 @@ void VisualScriptPropertyGet::set_basic_type(Variant::Type p_type) {
}
basic_type = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1937,7 +1937,7 @@ void VisualScriptPropertyGet::set_index(const StringName &p_type) {
}
index = p_type;
_update_cache();
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -2261,7 +2261,7 @@ void VisualScriptEmitSignal::set_signal(const StringName &p_type) {
name = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index ae2b548f21..fed6637acb 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -57,7 +57,7 @@ bool VisualScriptFunction::_set(const StringName &p_name, const Variant &p_value
arguments.write[i].type = Variant::NIL;
}
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
return true;
}
if (String(p_name).begins_with("argument_")) {
@@ -303,6 +303,14 @@ VisualScriptNodeInstance *VisualScriptFunction::instance(VisualScriptInstance *p
return instance;
}
+void VisualScriptFunction::reset_state() {
+ arguments.clear();
+ stack_size = 256;
+ stack_less = false;
+ sequenced = true;
+ rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED;
+}
+
VisualScriptFunction::VisualScriptFunction() {
stack_size = 256;
stack_less = false;
@@ -312,7 +320,7 @@ VisualScriptFunction::VisualScriptFunction() {
void VisualScriptFunction::set_stack_less(bool p_enable) {
stack_less = p_enable;
- _change_notify();
+ notify_property_list_changed();
}
bool VisualScriptFunction::is_stack_less() const {
@@ -421,7 +429,7 @@ bool VisualScriptLists::_set(const StringName &p_name, const Variant &p_value) {
inputports.write[i].type = Variant::NIL;
}
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
return true;
}
if (String(p_name).begins_with("input_") && is_input_port_editable()) {
@@ -457,7 +465,7 @@ bool VisualScriptLists::_set(const StringName &p_name, const Variant &p_value) {
outputports.write[i].type = Variant::NIL;
}
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
return true;
}
if (String(p_name).begins_with("output_") && is_output_port_editable()) {
@@ -578,7 +586,7 @@ void VisualScriptLists::add_input_data_port(Variant::Type p_type, const String &
}
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
void VisualScriptLists::set_input_data_port_type(int p_idx, Variant::Type p_type) {
@@ -590,7 +598,7 @@ void VisualScriptLists::set_input_data_port_type(int p_idx, Variant::Type p_type
inputports.write[p_idx].type = p_type;
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
void VisualScriptLists::set_input_data_port_name(int p_idx, const String &p_name) {
@@ -602,7 +610,7 @@ void VisualScriptLists::set_input_data_port_name(int p_idx, const String &p_name
inputports.write[p_idx].name = p_name;
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
void VisualScriptLists::remove_input_data_port(int p_argidx) {
@@ -615,7 +623,7 @@ void VisualScriptLists::remove_input_data_port(int p_argidx) {
inputports.remove(p_argidx);
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
// output data port interaction
@@ -634,7 +642,7 @@ void VisualScriptLists::add_output_data_port(Variant::Type p_type, const String
}
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
void VisualScriptLists::set_output_data_port_type(int p_idx, Variant::Type p_type) {
@@ -646,7 +654,7 @@ void VisualScriptLists::set_output_data_port_type(int p_idx, Variant::Type p_typ
outputports.write[p_idx].type = p_type;
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
void VisualScriptLists::set_output_data_port_name(int p_idx, const String &p_name) {
@@ -658,7 +666,7 @@ void VisualScriptLists::set_output_data_port_name(int p_idx, const String &p_nam
outputports.write[p_idx].name = p_name;
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
void VisualScriptLists::remove_output_data_port(int p_argidx) {
@@ -671,7 +679,7 @@ void VisualScriptLists::remove_output_data_port(int p_argidx) {
outputports.remove(p_argidx);
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
// sequences
@@ -687,6 +695,13 @@ bool VisualScriptLists::is_sequenced() const {
return sequenced;
}
+void VisualScriptLists::reset_state() {
+ inputports.clear();
+ outputports.clear();
+ sequenced = false;
+ flags = 0;
+}
+
VisualScriptLists::VisualScriptLists() {
// initialize
sequenced = false;
@@ -1433,7 +1448,7 @@ void VisualScriptConstant::set_constant_type(Variant::Type p_type) {
Callable::CallError ce;
Variant::construct(type, value, nullptr, 0, ce);
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
Variant::Type VisualScriptConstant::get_constant_type() const {
@@ -1764,7 +1779,7 @@ String VisualScriptGlobalConstant::get_caption() const {
void VisualScriptGlobalConstant::set_global_constant(int p_which) {
index = p_which;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1850,7 +1865,7 @@ String VisualScriptClassConstant::get_caption() const {
void VisualScriptClassConstant::set_class_constant(const StringName &p_which) {
name = p_which;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1876,7 +1891,7 @@ void VisualScriptClassConstant::set_base_type(const StringName &p_which) {
} else {
name = "";
}
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -1983,7 +1998,7 @@ String VisualScriptBasicTypeConstant::get_text() const {
void VisualScriptBasicTypeConstant::set_basic_type_constant(const StringName &p_which) {
name = p_which;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -2010,7 +2025,7 @@ void VisualScriptBasicTypeConstant::set_basic_type(Variant::Type p_which) {
} else {
name = "";
}
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -2140,7 +2155,7 @@ String VisualScriptMathConstant::get_caption() const {
void VisualScriptMathConstant::set_math_constant(MathConstant p_which) {
constant = p_which;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -2233,7 +2248,7 @@ String VisualScriptEngineSingleton::get_caption() const {
void VisualScriptEngineSingleton::set_singleton(const String &p_string) {
singleton = p_string;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -2342,7 +2357,7 @@ String VisualScriptSceneNode::get_caption() const {
void VisualScriptSceneNode::set_node_path(const NodePath &p_path) {
path = p_path;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -2620,7 +2635,7 @@ String VisualScriptResourcePath::get_caption() const {
void VisualScriptResourcePath::set_resource_path(const String &p_path) {
path = p_path;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -3748,7 +3763,7 @@ void VisualScriptDeconstruct::set_deconstruct_type(Variant::Type p_type) {
type = p_type;
_update_elements();
ports_changed_notify();
- _change_notify(); //to make input appear/disappear
+ notify_property_list_changed(); //to make input appear/disappear
}
Variant::Type VisualScriptDeconstruct::get_deconstruct_type() const {
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h
index ae5e04d096..7392443e4e 100644
--- a/modules/visual_script/visual_script_nodes.h
+++ b/modules/visual_script/visual_script_nodes.h
@@ -99,6 +99,8 @@ public:
virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance) override;
+ virtual void reset_state() override;
+
VisualScriptFunction();
};
@@ -134,6 +136,8 @@ protected:
static void _bind_methods();
public:
+ virtual void reset_state() override;
+
virtual bool is_output_port_editable() const;
virtual bool is_output_port_name_editable() const;
virtual bool is_output_port_type_editable() const;
diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp
index 6c9af4e600..25fabd7b87 100644
--- a/modules/visual_script/visual_script_yield_nodes.cpp
+++ b/modules/visual_script/visual_script_yield_nodes.cpp
@@ -152,7 +152,7 @@ void VisualScriptYield::set_yield_mode(YieldMode p_mode) {
}
yield_mode = p_mode;
ports_changed_notify();
- _change_notify();
+ notify_property_list_changed();
}
VisualScriptYield::YieldMode VisualScriptYield::get_yield_mode() {
@@ -359,7 +359,7 @@ void VisualScriptYieldSignal::set_base_type(const StringName &p_type) {
base_type = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -374,7 +374,7 @@ void VisualScriptYieldSignal::set_signal(const StringName &p_type) {
signal = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -389,7 +389,7 @@ void VisualScriptYieldSignal::set_base_path(const NodePath &p_type) {
base_path = p_type;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
@@ -404,7 +404,7 @@ void VisualScriptYieldSignal::set_call_mode(CallMode p_mode) {
call_mode = p_mode;
- _change_notify();
+ notify_property_list_changed();
ports_changed_notify();
}
diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp
index 5d8245c64c..101001cba0 100644
--- a/modules/webm/video_stream_webm.cpp
+++ b/modules/webm/video_stream_webm.cpp
@@ -156,7 +156,7 @@ void VideoStreamPlaybackWebm::stop() {
void VideoStreamPlaybackWebm::play() {
stop();
- delay_compensation = ProjectSettings::get_singleton()->get("audio/video_delay_compensation_ms");
+ delay_compensation = ProjectSettings::get_singleton()->get("audio/video/video_delay_compensation_ms");
delay_compensation /= 1000.0;
playing = true;
@@ -429,7 +429,7 @@ void VideoStreamWebm::set_audio_track(int p_track) {
////////////
-RES ResourceFormatLoaderWebm::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderWebm::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
if (!f) {
if (r_error) {
diff --git a/modules/webm/video_stream_webm.h b/modules/webm/video_stream_webm.h
index cb3cf58850..60e02ab38b 100644
--- a/modules/webm/video_stream_webm.h
+++ b/modules/webm/video_stream_webm.h
@@ -126,7 +126,7 @@ public:
class ResourceFormatLoaderWebm : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/modules/webrtc/webrtc_data_channel_js.cpp b/modules/webrtc/webrtc_data_channel_js.cpp
index 9f2b084cb1..dfbec80c86 100644
--- a/modules/webrtc/webrtc_data_channel_js.cpp
+++ b/modules/webrtc/webrtc_data_channel_js.cpp
@@ -182,16 +182,9 @@ bool WebRTCDataChannelJS::is_negotiated() const {
}
WebRTCDataChannelJS::WebRTCDataChannelJS() {
- queue_count = 0;
- _was_string = false;
- _write_mode = WRITE_MODE_BINARY;
- _js_id = 0;
}
WebRTCDataChannelJS::WebRTCDataChannelJS(int js_id) {
- queue_count = 0;
- _was_string = false;
- _write_mode = WRITE_MODE_BINARY;
_js_id = js_id;
godot_js_rtc_datachannel_connect(js_id, this, &_on_open, &_on_message, &_on_error, &_on_close);
diff --git a/modules/webrtc/webrtc_data_channel_js.h b/modules/webrtc/webrtc_data_channel_js.h
index 8c56b62303..db58ebccff 100644
--- a/modules/webrtc/webrtc_data_channel_js.h
+++ b/modules/webrtc/webrtc_data_channel_js.h
@@ -42,16 +42,16 @@ private:
String _label;
String _protocol;
- bool _was_string;
- WriteMode _write_mode;
+ bool _was_string = false;
+ WriteMode _write_mode = WRITE_MODE_BINARY;
enum {
PACKET_BUFFER_SIZE = 65536 - 5 // 4 bytes for the size, 1 for for type
};
- int _js_id;
+ int _js_id = 0;
RingBuffer<uint8_t> in_buffer;
- int queue_count;
+ int queue_count = 0;
uint8_t packet_buffer[PACKET_BUFFER_SIZE];
static void _on_open(void *p_obj);
diff --git a/modules/websocket/emws_client.cpp b/modules/websocket/emws_client.cpp
index aec01a1eea..25b6d6ef0e 100644
--- a/modules/websocket/emws_client.cpp
+++ b/modules/websocket/emws_client.cpp
@@ -140,11 +140,7 @@ Error EMWSClient::set_buffers(int p_in_buffer, int p_in_packets, int p_out_buffe
}
EMWSClient::EMWSClient() {
- _in_buf_size = DEF_BUF_SHIFT;
- _in_pkt_size = DEF_PKT_SHIFT;
- _is_connecting = false;
_peer = Ref<EMWSPeer>(memnew(EMWSPeer));
- _js_id = 0;
}
EMWSClient::~EMWSClient() {
diff --git a/modules/websocket/emws_client.h b/modules/websocket/emws_client.h
index fdf7a231d2..2ab7dc83d0 100644
--- a/modules/websocket/emws_client.h
+++ b/modules/websocket/emws_client.h
@@ -41,10 +41,10 @@ class EMWSClient : public WebSocketClient {
GDCIIMPL(EMWSClient, WebSocketClient);
private:
- int _js_id;
- bool _is_connecting;
- int _in_buf_size;
- int _in_pkt_size;
+ int _js_id = 0;
+ bool _is_connecting = false;
+ int _in_buf_size = DEF_BUF_SHIFT;
+ int _in_pkt_size = DEF_PKT_SHIFT;
static void _esws_on_connect(void *obj, char *proto);
static void _esws_on_message(void *obj, const uint8_t *p_data, int p_data_size, int p_is_string);
diff --git a/modules/websocket/emws_peer.cpp b/modules/websocket/emws_peer.cpp
index 496c1edc04..5e75e10d68 100644
--- a/modules/websocket/emws_peer.cpp
+++ b/modules/websocket/emws_peer.cpp
@@ -106,8 +106,6 @@ void EMWSPeer::set_no_delay(bool p_enabled) {
}
EMWSPeer::EMWSPeer() {
- peer_sock = -1;
- write_mode = WRITE_MODE_BINARY;
close();
};
diff --git a/modules/websocket/emws_peer.h b/modules/websocket/emws_peer.h
index 07f61b62a0..abe5bf2bdb 100644
--- a/modules/websocket/emws_peer.h
+++ b/modules/websocket/emws_peer.h
@@ -56,12 +56,12 @@ class EMWSPeer : public WebSocketPeer {
GDCIIMPL(EMWSPeer, WebSocketPeer);
private:
- int peer_sock;
- WriteMode write_mode;
+ int peer_sock = -1;
+ WriteMode write_mode = WRITE_MODE_BINARY;
Vector<uint8_t> _packet_buffer;
PacketBuffer<uint8_t> _in_buffer;
- uint8_t _is_string;
+ uint8_t _is_string = 0;
public:
Error read_msg(const uint8_t *p_data, uint32_t p_size, bool p_is_string);
diff --git a/modules/websocket/websocket_client.cpp b/modules/websocket/websocket_client.cpp
index eb0252e6d1..425013f811 100644
--- a/modules/websocket/websocket_client.cpp
+++ b/modules/websocket/websocket_client.cpp
@@ -33,7 +33,6 @@
GDCINULL(WebSocketClient);
WebSocketClient::WebSocketClient() {
- verify_ssl = true;
}
WebSocketClient::~WebSocketClient() {
diff --git a/modules/websocket/websocket_client.h b/modules/websocket/websocket_client.h
index 78b77b89cd..0225c9b3d3 100644
--- a/modules/websocket/websocket_client.h
+++ b/modules/websocket/websocket_client.h
@@ -42,7 +42,7 @@ class WebSocketClient : public WebSocketMultiplayerPeer {
protected:
Ref<WebSocketPeer> _peer;
- bool verify_ssl;
+ bool verify_ssl = true;
Ref<X509Certificate> ssl_cert;
static void _bind_methods();
diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp
index f94642475c..011cb86535 100644
--- a/modules/websocket/websocket_multiplayer_peer.cpp
+++ b/modules/websocket/websocket_multiplayer_peer.cpp
@@ -33,15 +33,6 @@
#include "core/os/os.h"
WebSocketMultiplayerPeer::WebSocketMultiplayerPeer() {
- _is_multiplayer = false;
- _peer_id = 0;
- _target_peer = 0;
- _refusing = false;
-
- _current_packet.source = 0;
- _current_packet.destination = 0;
- _current_packet.size = 0;
- _current_packet.data = nullptr;
}
WebSocketMultiplayerPeer::~WebSocketMultiplayerPeer() {
diff --git a/modules/websocket/websocket_multiplayer_peer.h b/modules/websocket/websocket_multiplayer_peer.h
index e593163b7c..48a6607d89 100644
--- a/modules/websocket/websocket_multiplayer_peer.h
+++ b/modules/websocket/websocket_multiplayer_peer.h
@@ -55,20 +55,20 @@ protected:
};
struct Packet {
- int source;
- int destination;
- uint8_t *data;
- uint32_t size;
+ int source = 0;
+ int destination = 0;
+ uint8_t *data = nullptr;
+ uint32_t size = 0;
};
List<Packet> _incoming_packets;
Map<int, Ref<WebSocketPeer>> _peer_map;
Packet _current_packet;
- bool _is_multiplayer;
- int _target_peer;
- int _peer_id;
- int _refusing;
+ bool _is_multiplayer = false;
+ int _target_peer = 0;
+ int _peer_id = 0;
+ int _refusing = false;
static void _bind_methods();
diff --git a/modules/websocket/wsl_client.cpp b/modules/websocket/wsl_client.cpp
index 3e2f48e9b3..a075ae3982 100644
--- a/modules/websocket/wsl_client.cpp
+++ b/modules/websocket/wsl_client.cpp
@@ -337,11 +337,6 @@ Error WSLClient::set_buffers(int p_in_buffer, int p_in_packets, int p_out_buffer
}
WSLClient::WSLClient() {
- _in_buf_size = DEF_BUF_SHIFT;
- _in_pkt_size = DEF_PKT_SHIFT;
- _out_buf_size = DEF_BUF_SHIFT;
- _out_pkt_size = DEF_PKT_SHIFT;
-
_peer.instance();
_tcp.instance();
disconnect_from_host();
diff --git a/modules/websocket/wsl_client.h b/modules/websocket/wsl_client.h
index 8712b57f2c..e7c91ed333 100644
--- a/modules/websocket/wsl_client.h
+++ b/modules/websocket/wsl_client.h
@@ -44,27 +44,27 @@ class WSLClient : public WebSocketClient {
GDCIIMPL(WSLClient, WebSocketClient);
private:
- int _in_buf_size;
- int _in_pkt_size;
- int _out_buf_size;
- int _out_pkt_size;
+ int _in_buf_size = DEF_BUF_SHIFT;
+ int _in_pkt_size = DEF_PKT_SHIFT;
+ int _out_buf_size = DEF_BUF_SHIFT;
+ int _out_pkt_size = DEF_PKT_SHIFT;
Ref<WSLPeer> _peer;
Ref<StreamPeerTCP> _tcp;
Ref<StreamPeer> _connection;
CharString _request;
- int _requested;
+ int _requested = 0;
uint8_t _resp_buf[WSL_MAX_HEADER_SIZE];
- int _resp_pos;
+ int _resp_pos = 0;
String _response;
String _key;
String _host;
Vector<String> _protocols;
- bool _use_ssl;
+ bool _use_ssl = false;
void _do_handshake();
bool _verify_headers(String &r_protocol);
diff --git a/modules/websocket/wsl_peer.cpp b/modules/websocket/wsl_peer.cpp
index 9d016e1139..dbbf86d0da 100644
--- a/modules/websocket/wsl_peer.cpp
+++ b/modules/websocket/wsl_peer.cpp
@@ -329,10 +329,6 @@ void WSLPeer::invalidate() {
}
WSLPeer::WSLPeer() {
- _data = nullptr;
- _is_string = 0;
- close_code = -1;
- write_mode = WRITE_MODE_BINARY;
}
WSLPeer::~WSLPeer() {
diff --git a/modules/websocket/wsl_peer.h b/modules/websocket/wsl_peer.h
index 01efa4b21e..5e6a7e8554 100644
--- a/modules/websocket/wsl_peer.h
+++ b/modules/websocket/wsl_peer.h
@@ -48,29 +48,17 @@ class WSLPeer : public WebSocketPeer {
public:
struct PeerData {
- bool polling;
- bool destroy;
- bool valid;
- bool is_server;
- bool closing;
- void *obj;
- void *peer;
+ bool polling = false;
+ bool destroy = false;
+ bool valid = false;
+ bool is_server = false;
+ bool closing = false;
+ void *obj = nullptr;
+ void *peer = nullptr;
Ref<StreamPeer> conn;
Ref<StreamPeerTCP> tcp;
- int id;
- wslay_event_context_ptr ctx;
-
- PeerData() {
- polling = false;
- destroy = false;
- valid = false;
- is_server = false;
- id = 1;
- ctx = nullptr;
- obj = nullptr;
- closing = false;
- peer = nullptr;
- }
+ int id = 1;
+ wslay_event_context_ptr ctx = nullptr;
};
static String compute_key_response(String p_key);
@@ -80,17 +68,17 @@ private:
static bool _wsl_poll(struct PeerData *p_data);
static void _wsl_destroy(struct PeerData **p_data);
- struct PeerData *_data;
- uint8_t _is_string;
+ struct PeerData *_data = nullptr;
+ uint8_t _is_string = 0;
// Our packet info is just a boolean (is_string), using uint8_t for it.
PacketBuffer<uint8_t> _in_buffer;
Vector<uint8_t> _packet_buffer;
- WriteMode write_mode;
+ WriteMode write_mode = WRITE_MODE_BINARY;
public:
- int close_code;
+ int close_code = -1;
String close_reason;
void poll(); // Used by client and server.
diff --git a/modules/websocket/wsl_server.cpp b/modules/websocket/wsl_server.cpp
index 9df076bf3f..437eb2061b 100644
--- a/modules/websocket/wsl_server.cpp
+++ b/modules/websocket/wsl_server.cpp
@@ -34,15 +34,6 @@
#include "core/config/project_settings.h"
#include "core/os/os.h"
-WSLServer::PendingPeer::PendingPeer() {
- use_ssl = false;
- time = 0;
- has_request = false;
- response_sent = 0;
- req_pos = 0;
- memset(req_buf, 0, sizeof(req_buf));
-}
-
bool WSLServer::PendingPeer::_parse_request(const Vector<String> p_protocols) {
Vector<String> psa = String((char *)req_buf).split("\r\n");
int len = psa.size();
@@ -310,10 +301,6 @@ Error WSLServer::set_buffers(int p_in_buffer, int p_in_packets, int p_out_buffer
}
WSLServer::WSLServer() {
- _in_buf_size = DEF_BUF_SHIFT;
- _in_pkt_size = DEF_PKT_SHIFT;
- _out_buf_size = DEF_BUF_SHIFT;
- _out_pkt_size = DEF_PKT_SHIFT;
_server.instance();
}
diff --git a/modules/websocket/wsl_server.h b/modules/websocket/wsl_server.h
index 8b2d4d3a04..75669e12ee 100644
--- a/modules/websocket/wsl_server.h
+++ b/modules/websocket/wsl_server.h
@@ -53,26 +53,24 @@ private:
public:
Ref<StreamPeerTCP> tcp;
Ref<StreamPeer> connection;
- bool use_ssl;
+ bool use_ssl = false;
- int time;
- uint8_t req_buf[WSL_MAX_HEADER_SIZE];
- int req_pos;
+ int time = 0;
+ uint8_t req_buf[WSL_MAX_HEADER_SIZE] = {};
+ int req_pos = 0;
String key;
String protocol;
- bool has_request;
+ bool has_request = false;
CharString response;
- int response_sent;
-
- PendingPeer();
+ int response_sent = 0;
Error do_handshake(const Vector<String> p_protocols);
};
- int _in_buf_size;
- int _in_pkt_size;
- int _out_buf_size;
- int _out_pkt_size;
+ int _in_buf_size = DEF_BUF_SHIFT;
+ int _in_pkt_size = DEF_PKT_SHIFT;
+ int _out_buf_size = DEF_BUF_SHIFT;
+ int _out_pkt_size = DEF_PKT_SHIFT;
List<Ref<PendingPeer>> _pending;
Ref<TCP_Server> _server;
diff --git a/modules/webxr/doc_classes/WebXRInterface.xml b/modules/webxr/doc_classes/WebXRInterface.xml
index bddffd910e..2407d44496 100644
--- a/modules/webxr/doc_classes/WebXRInterface.xml
+++ b/modules/webxr/doc_classes/WebXRInterface.xml
@@ -10,75 +10,79 @@
Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that [WebXRInterface] is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes [WebXRInterface] quite a bit more complicated to intialize than other AR/VR interfaces.
Here's the minimum code required to start an immersive VR session:
[codeblock]
- var webxr_interface
- var vr_supported = false
+ extends Node3D
- func _ready():
- # We assume this node has a canvas layer with a button on it as a child.
- # This button is for the user to consent to entering immersive VR mode.
- $CanvasLayer/Button.connect("pressed", self, "_on_Button_pressed")
+ var webxr_interface
+ var vr_supported = false
- webxr_interface = XRServer.find_interface("WebXR")
- if webxr_interface:
- # WebXR uses a lot of asynchronous callbacks, so we connect to various
- # signals in order to receive them.
- webxr_interface.connect("session_supported", self, "_webxr_session_supported")
- webxr_interface.connect("session_started", self, "_webxr_session_started")
- webxr_interface.connect("session_ended", self, "_webxr_session_ended")
- webxr_interface.connect("session_failed", self, "_webxr_session_failed")
+ func _ready():
+ # We assume this node has a button as a child.
+ # This button is for the user to consent to entering immersive VR mode.
+ $Button.connect("pressed", self, "_on_Button_pressed")
- # This returns immediately - our _webxr_session_supported() method
- # (which we connected to the "session_supported" signal above) will
- # be called sometime later to let us know if it's supported or not.
- webxr_interface.is_session_supported("immersive-vr")
+ webxr_interface = XRServer.find_interface("WebXR")
+ if webxr_interface:
+ # WebXR uses a lot of asynchronous callbacks, so we connect to various
+ # signals in order to receive them.
+ webxr_interface.connect("session_supported", self, "_webxr_session_supported")
+ webxr_interface.connect("session_started", self, "_webxr_session_started")
+ webxr_interface.connect("session_ended", self, "_webxr_session_ended")
+ webxr_interface.connect("session_failed", self, "_webxr_session_failed")
- func _webxr_session_supported(session_mode, supported):
- if session_mode == 'immersive-vr':
- vr_supported = supported
+ # This returns immediately - our _webxr_session_supported() method
+ # (which we connected to the "session_supported" signal above) will
+ # be called sometime later to let us know if it's supported or not.
+ webxr_interface.is_session_supported("immersive-vr")
- func _on_Button_pressed():
- if not vr_supported:
- OS.alert("Your browser doesn't support VR")
- return
+ func _webxr_session_supported(session_mode, supported):
+ if session_mode == 'immersive-vr':
+ vr_supported = supported
- # We want an immersive VR session, as opposed to AR ('immersive-ar') or a
- # simple 3DoF viewer ('viewer').
- webxr_interface.session_mode = 'immersive-vr'
- # 'bounded-floor' is room scale, 'local-floor' is a standing or sitting
- # experience (it puts you 1.6m above the ground if you have 3DoF headset),
- # whereas as 'local' puts you down at the XROrigin.
- # This list means it'll first try to request 'bounded-floor', then
- # fallback on 'local-floor' and ultimately 'local', if nothing else is
- # supported.
- webxr_interface.requested_reference_space_types = 'bounded-floor, local-floor, local'
- # In order to use 'local-floor' or 'bounded-floor' we must also
- # mark the features as required or optional.
- webxr_interface.required_features = 'local-floor'
- webxr_interface.optional_features = 'bounded-floor'
+ func _on_Button_pressed():
+ if not vr_supported:
+ OS.alert("Your browser doesn't support VR")
+ return
- # This will return false if we're unable to even request the session,
- # however, it can still fail asynchronously later in the process, so we
- # only know if it's really succeeded or failed when our
- # _webxr_session_started() or _webxr_session_failed() methods are called.
- if not webxr_interface.initialize():
- OS.alert("Failed to initialize")
- return
+ # We want an immersive VR session, as opposed to AR ('immersive-ar') or a
+ # simple 3DoF viewer ('viewer').
+ webxr_interface.session_mode = 'immersive-vr'
+ # 'bounded-floor' is room scale, 'local-floor' is a standing or sitting
+ # experience (it puts you 1.6m above the ground if you have 3DoF headset),
+ # whereas as 'local' puts you down at the XROrigin.
+ # This list means it'll first try to request 'bounded-floor', then
+ # fallback on 'local-floor' and ultimately 'local', if nothing else is
+ # supported.
+ webxr_interface.requested_reference_space_types = 'bounded-floor, local-floor, local'
+ # In order to use 'local-floor' or 'bounded-floor' we must also
+ # mark the features as required or optional.
+ webxr_interface.required_features = 'local-floor'
+ webxr_interface.optional_features = 'bounded-floor'
- func _webxr_session_started():
- # This tells Godot to start rendering to the headset.
- get_viewport().xr = true
- # This will be the reference space type you ultimately got, out of the
- # types that you requested above. This is useful if you want the game to
- # work a little differently in 'bounded-floor' versus 'local-floor'.
- print ("Reference space type: " + webxr_interface.reference_space_type)
+ # This will return false if we're unable to even request the session,
+ # however, it can still fail asynchronously later in the process, so we
+ # only know if it's really succeeded or failed when our
+ # _webxr_session_started() or _webxr_session_failed() methods are called.
+ if not webxr_interface.initialize():
+ OS.alert("Failed to initialize")
+ return
- func _webxr_session_ended():
- # If the user exits immersive mode, then we tell Godot to render to the web
- # page again.
- get_viewport().xr = false
+ func _webxr_session_started():
+ $Button.visible = false
+ # This tells Godot to start rendering to the headset.
+ get_viewport().xr = true
+ # This will be the reference space type you ultimately got, out of the
+ # types that you requested above. This is useful if you want the game to
+ # work a little differently in 'bounded-floor' versus 'local-floor'.
+ print ("Reference space type: " + webxr_interface.reference_space_type)
- func _webxr_session_failed(message):
- OS.alert("Failed to initialize: " + message)
+ func _webxr_session_ended():
+ $Button.visible = true
+ # If the user exits immersive mode, then we tell Godot to render to the web
+ # page again.
+ get_viewport().xr = false
+
+ func _webxr_session_failed(message):
+ OS.alert("Failed to initialize: " + message)
[/codeblock]
There are several ways to handle "controller" input:
- Using [XRController3D] nodes and their [signal XRController3D.button_pressed] and [signal XRController3D.button_released] signals. This is how controllers are typically handled in AR/VR apps in Godot, however, this will only work with advanced VR controllers like the Oculus Touch or Index controllers, for example. The buttons codes are defined by [url=https://immersive-web.github.io/webxr-gamepads-module/#xr-standard-gamepad-mapping]Section 3.3 of the WebXR Gamepads Module[/url].
diff --git a/modules/webxr/godot_webxr.h b/modules/webxr/godot_webxr.h
index 5e50ffde28..41a690f473 100644
--- a/modules/webxr/godot_webxr.h
+++ b/modules/webxr/godot_webxr.h
@@ -61,6 +61,7 @@ extern void godot_webxr_initialize(
GodotWebXRSimpleEventCallback p_on_simple_event);
extern void godot_webxr_uninitialize();
+extern int godot_webxr_get_view_count();
extern int *godot_webxr_get_render_targetsize();
extern float *godot_webxr_get_transform_for_eye(int p_eye);
extern float *godot_webxr_get_projection_for_eye(int p_eye);
diff --git a/modules/webxr/native/library_godot_webxr.js b/modules/webxr/native/library_godot_webxr.js
index 3041c16c79..8e9ef8a73c 100644
--- a/modules/webxr/native/library_godot_webxr.js
+++ b/modules/webxr/native/library_godot_webxr.js
@@ -380,6 +380,11 @@ const GodotWebXR = {
gl.deleteTexture(texture);
}
GodotWebXR.textures[i] = null;
+
+ const texture_id = GodotWebXR.texture_ids[i];
+ if (texture_id !== null) {
+ GL.textures[texture_id] = null;
+ }
GodotWebXR.texture_ids[i] = null;
}
@@ -394,6 +399,15 @@ const GodotWebXR = {
GodotWebXR.pauseResumeMainLoop();
},
+ godot_webxr_get_view_count__proxy: 'sync',
+ godot_webxr_get_view_count__sig: 'i',
+ godot_webxr_get_view_count: function () {
+ if (!GodotWebXR.session || !GodotWebXR.pose) {
+ return 0;
+ }
+ return GodotWebXR.pose.views.length;
+ },
+
godot_webxr_get_render_targetsize__proxy: 'sync',
godot_webxr_get_render_targetsize__sig: 'i',
godot_webxr_get_render_targetsize: function () {
@@ -451,7 +465,7 @@ const GodotWebXR = {
godot_webxr_get_external_texture_for_eye__proxy: 'sync',
godot_webxr_get_external_texture_for_eye__sig: 'ii',
godot_webxr_get_external_texture_for_eye: function (p_eye) {
- if (!GodotWebXR.session || !GodotWebXR.pose) {
+ if (!GodotWebXR.session) {
return 0;
}
@@ -460,6 +474,13 @@ const GodotWebXR = {
return GodotWebXR.texture_ids[view_index];
}
+ // Check pose separately and after returning the cached texture id,
+ // because we won't get a pose in some cases if we lose tracking, and
+ // we don't want to return 0 just because tracking was lost.
+ if (!GodotWebXR.pose) {
+ return 0;
+ }
+
const glLayer = GodotWebXR.session.renderState.baseLayer;
const view = GodotWebXR.pose.views[view_index];
const viewport = glLayer.getViewport(view);
diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp
index 6594553146..74789fc98e 100644
--- a/modules/webxr/webxr_interface_js.cpp
+++ b/modules/webxr/webxr_interface_js.cpp
@@ -78,6 +78,8 @@ void _emwebxr_on_session_failed(char *p_message) {
Ref<XRInterface> interface = xr_server->find_interface("WebXR");
ERR_FAIL_COND(interface.is_null());
+ interface->uninitialize();
+
String message = String(p_message);
interface->emit_signal("session_failed", message);
}
@@ -197,12 +199,11 @@ StringName WebXRInterfaceJS::get_name() const {
};
int WebXRInterfaceJS::get_capabilities() const {
- return XRInterface::XR_STEREO;
+ return XRInterface::XR_STEREO | XRInterface::XR_MONO;
};
bool WebXRInterfaceJS::is_stereo() {
- // @todo WebXR can be mono! So, how do we know? Count the views in the frame?
- return true;
+ return godot_webxr_get_view_count() == 2;
};
bool WebXRInterfaceJS::is_initialized() const {
@@ -225,6 +226,12 @@ bool WebXRInterfaceJS::initialize() {
// make this our primary interface
xr_server->set_primary_interface(this);
+ // Clear render_targetsize to make sure it gets reset to the new size.
+ // Clearing in uninitialize() doesn't work because a frame can still be
+ // rendered after it's called, which will fill render_targetsize again.
+ render_targetsize.width = 0;
+ render_targetsize.height = 0;
+
initialized = true;
godot_webxr_initialize(
@@ -278,22 +285,24 @@ Transform WebXRInterfaceJS::_js_matrix_to_transform(float *p_js_matrix) {
}
Size2 WebXRInterfaceJS::get_render_targetsize() {
- Size2 target_size;
+ if (render_targetsize.width != 0 && render_targetsize.height != 0) {
+ return render_targetsize;
+ }
int *js_size = godot_webxr_get_render_targetsize();
if (!initialized || js_size == nullptr) {
- // As a default, use half the window size.
- target_size = DisplayServer::get_singleton()->window_get_size();
- target_size.width /= 2.0;
- return target_size;
+ // As a temporary default (until WebXR is fully initialized), use half the window size.
+ Size2 temp = DisplayServer::get_singleton()->window_get_size();
+ temp.width /= 2.0;
+ return temp;
}
- target_size.width = js_size[0];
- target_size.height = js_size[1];
+ render_targetsize.width = js_size[0];
+ render_targetsize.height = js_size[1];
free(js_size);
- return target_size;
+ return render_targetsize;
};
Transform WebXRInterfaceJS::get_transform_for_eye(XRInterface::Eyes p_eye, const Transform &p_cam_transform) {
diff --git a/modules/webxr/webxr_interface_js.h b/modules/webxr/webxr_interface_js.h
index 93da9a6d12..49299b252f 100644
--- a/modules/webxr/webxr_interface_js.h
+++ b/modules/webxr/webxr_interface_js.h
@@ -47,7 +47,6 @@ class WebXRInterfaceJS : public WebXRInterface {
private:
bool initialized;
- // @todo Should these really use enums instead of strings?
String session_mode;
String required_features;
String optional_features;
@@ -55,6 +54,7 @@ private:
String reference_space_type;
bool controllers_state[2];
+ Size2 render_targetsize;
Transform _js_matrix_to_transform(float *p_js_matrix);
void _update_tracker(int p_controller_id);
diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp
index 9f6e7efb27..fb4df10904 100644
--- a/modules/xatlas_unwrap/register_types.cpp
+++ b/modules/xatlas_unwrap/register_types.cpp
@@ -154,6 +154,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
float h = *r_size_hint_y;
if (w == 0 || h == 0) {
+ xatlas::Destroy(atlas);
return false; //could not bake because there is no area
}
@@ -163,8 +164,8 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
*r_uvs = (float *)malloc(sizeof(float) * output.vertexCount * 2);
*r_indices = (int *)malloc(sizeof(int) * output.indexCount);
- float max_x = 0;
- float max_y = 0;
+ float max_x = 0.0;
+ float max_y = 0.0;
for (uint32_t i = 0; i < output.vertexCount; i++) {
(*r_vertices)[i] = output.vertexArray[i].xref;
(*r_uvs)[i * 2 + 0] = output.vertexArray[i].uv[0] / w;
diff --git a/platform/android/api/jni_singleton.h b/platform/android/api/jni_singleton.h
index 49c0104e67..965eaabf81 100644
--- a/platform/android/api/jni_singleton.h
+++ b/platform/android/api/jni_singleton.h
@@ -83,7 +83,7 @@ public:
v = (jvalue *)alloca(sizeof(jvalue) * p_argcount);
}
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
int res = env->PushLocalFrame(16);
diff --git a/platform/android/audio_driver_jandroid.cpp b/platform/android/audio_driver_jandroid.cpp
index 825132ac8c..3a2ccac481 100644
--- a/platform/android/audio_driver_jandroid.cpp
+++ b/platform/android/audio_driver_jandroid.cpp
@@ -72,10 +72,10 @@ Error AudioDriverAndroid::init() {
// __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device");
- JNIEnv *env = ThreadAndroid::get_env();
- int mix_rate = GLOBAL_GET("audio/mix_rate");
+ JNIEnv *env = get_jni_env();
+ int mix_rate = GLOBAL_GET("audio/driver/mix_rate");
- int latency = GLOBAL_GET("audio/output_latency");
+ int latency = GLOBAL_GET("audio/driver/output_latency");
unsigned int buffer_size = next_power_of_2(latency * mix_rate / 1000);
print_verbose("Audio buffer size: " + itos(buffer_size));
@@ -98,7 +98,7 @@ void AudioDriverAndroid::start() {
}
void AudioDriverAndroid::setup(jobject p_io) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
io = p_io;
jclass c = env->GetObjectClass(io);
@@ -162,7 +162,7 @@ void AudioDriverAndroid::unlock() {
}
void AudioDriverAndroid::finish() {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(io, _quit);
if (audioBuffer) {
@@ -175,7 +175,7 @@ void AudioDriverAndroid::finish() {
}
void AudioDriverAndroid::set_pause(bool p_pause) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(io, _pause, p_pause);
}
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 650606ff8b..5f0fcc9b77 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -13,7 +13,7 @@ def get_name():
def can_build():
- return "ANDROID_NDK_ROOT" in os.environ
+ return ("ANDROID_SDK_ROOT" in os.environ) or ("ANDROID_HOME" in os.environ)
def get_platform(platform):
@@ -24,13 +24,33 @@ def get_opts():
from SCons.Variables import BoolVariable, EnumVariable
return [
- ("ANDROID_NDK_ROOT", "Path to the Android NDK", os.environ.get("ANDROID_NDK_ROOT", 0)),
+ ("ANDROID_NDK_ROOT", "Path to the Android NDK", get_android_ndk_root()),
+ ("ANDROID_SDK_ROOT", "Path to the Android SDK", get_android_sdk_root()),
("ndk_platform", 'Target platform (android-<api>, e.g. "android-24")', "android-24"),
EnumVariable("android_arch", "Target architecture", "armv7", ("armv7", "arm64v8", "x86", "x86_64")),
BoolVariable("android_neon", "Enable NEON support (armv7 only)", True),
]
+# Return the ANDROID_SDK_ROOT environment variable.
+# While ANDROID_HOME has been deprecated, it's used as a fallback for backward
+# compatibility purposes.
+def get_android_sdk_root():
+ if "ANDROID_SDK_ROOT" in os.environ:
+ return os.environ.get("ANDROID_SDK_ROOT", 0)
+ else:
+ return os.environ.get("ANDROID_HOME", 0)
+
+
+# Return the ANDROID_NDK_ROOT environment variable.
+# We generate one for this build using the ANDROID_SDK_ROOT env
+# variable and the project ndk version.
+# If the env variable is already defined, we override it with
+# our own to match what the project expects.
+def get_android_ndk_root():
+ return get_android_sdk_root() + "/ndk/" + get_project_ndk_version()
+
+
def get_flags():
return [
("tools", False),
@@ -47,7 +67,31 @@ def create(env):
return env.Clone(tools=tools)
+# Check if ANDROID_NDK_ROOT is valid.
+# If not, install the ndk using ANDROID_SDK_ROOT and sdkmanager.
+def install_ndk_if_needed(env):
+ print("Checking for Android NDK...")
+ env_ndk_version = get_env_ndk_version(env["ANDROID_NDK_ROOT"])
+ if env_ndk_version is None:
+ # Reinstall the ndk and update ANDROID_NDK_ROOT.
+ print("Installing Android NDK...")
+ if env["ANDROID_SDK_ROOT"] is None:
+ raise Exception("Invalid ANDROID_SDK_ROOT environment variable.")
+
+ import subprocess
+
+ extension = ".bat" if os.name == "nt" else ""
+ sdkmanager_path = env["ANDROID_SDK_ROOT"] + "/cmdline-tools/latest/bin/sdkmanager" + extension
+ ndk_download_args = "ndk;" + get_project_ndk_version()
+ subprocess.check_call([sdkmanager_path, ndk_download_args])
+
+ env["ANDROID_NDK_ROOT"] = env["ANDROID_SDK_ROOT"] + "/ndk/" + get_project_ndk_version()
+ print("ANDROID_NDK_ROOT: " + env["ANDROID_NDK_ROOT"])
+
+
def configure(env):
+ install_ndk_if_needed(env)
+
# Workaround for MinGW. See:
# http://www.scons.org/wiki/LongCmdLinesOnWin32
if os.name == "nt":
@@ -270,7 +314,7 @@ def configure(env):
# Link flags
- ndk_version = get_ndk_version(env["ANDROID_NDK_ROOT"])
+ ndk_version = get_env_ndk_version(env["ANDROID_NDK_ROOT"])
if ndk_version != None and LooseVersion(ndk_version) >= LooseVersion("17.1.4828580"):
env.Append(LINKFLAGS=["-Wl,--exclude-libs,libgcc.a", "-Wl,--exclude-libs,libatomic.a", "-nostdlib++"])
else:
@@ -323,8 +367,14 @@ def configure(env):
env.Append(LIBS=["OpenSLES", "EGL", "GLESv2", "vulkan", "android", "log", "z", "dl"])
+# Return the project NDK version.
+# This is kept in sync with the value in 'platform/android/java/app/config.gradle'.
+def get_project_ndk_version():
+ return "21.4.7075529"
+
+
# Return NDK version string in source.properties (adapted from the Chromium project).
-def get_ndk_version(path):
+def get_env_ndk_version(path):
if path is None:
return None
prop_file_path = os.path.join(path, "source.properties")
diff --git a/platform/android/dir_access_jandroid.cpp b/platform/android/dir_access_jandroid.cpp
index 78685991a8..f8ac29c738 100644
--- a/platform/android/dir_access_jandroid.cpp
+++ b/platform/android/dir_access_jandroid.cpp
@@ -47,7 +47,7 @@ DirAccess *DirAccessJAndroid::create_fs() {
Error DirAccessJAndroid::list_dir_begin() {
list_dir_end();
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring js = env->NewStringUTF(current_dir.utf8().get_data());
int res = env->CallIntMethod(io, _dir_open, js);
@@ -62,7 +62,7 @@ Error DirAccessJAndroid::list_dir_begin() {
String DirAccessJAndroid::get_next() {
ERR_FAIL_COND_V(id == 0, "");
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring str = (jstring)env->CallObjectMethod(io, _dir_next, id);
if (!str)
return "";
@@ -73,7 +73,7 @@ String DirAccessJAndroid::get_next() {
}
bool DirAccessJAndroid::current_is_dir() const {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
return env->CallBooleanMethod(io, _dir_is_dir, id);
}
@@ -86,7 +86,7 @@ void DirAccessJAndroid::list_dir_end() {
if (id == 0)
return;
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(io, _dir_close, id);
id = 0;
}
@@ -100,7 +100,7 @@ String DirAccessJAndroid::get_drive(int p_drive) {
}
Error DirAccessJAndroid::change_dir(String p_dir) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
if (p_dir == "" || p_dir == "." || (p_dir == ".." && current_dir == ""))
return OK;
@@ -154,7 +154,7 @@ bool DirAccessJAndroid::file_exists(String p_file) {
}
bool DirAccessJAndroid::dir_exists(String p_dir) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
String sd;
@@ -207,7 +207,7 @@ size_t DirAccessJAndroid::get_space_left() {
}
void DirAccessJAndroid::setup(jobject p_io) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
io = p_io;
jclass c = env->GetObjectClass(io);
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 62720e8249..888b1546e4 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -37,6 +37,7 @@
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
#include "core/os/os.h"
+#include "core/templates/safe_refcount.h"
#include "core/version.h"
#include "drivers/png/png_driver_common.h"
#include "editor/editor_export.h"
@@ -202,6 +203,19 @@ static const char *android_perms[] = {
static const char *SPLASH_IMAGE_EXPORT_PATH = "res/drawable/splash.png";
static const char *SPLASH_BG_COLOR_PATH = "res/drawable/splash_bg_color.png";
+static const char *SPLASH_CONFIG_PATH = "res://android/build/res/drawable/splash_drawable.xml";
+
+const String SPLASH_CONFIG_XML_CONTENT = R"SPLASH(<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/splash_bg_color" />
+ <item>
+ <bitmap
+ android:gravity="%s"
+ android:filter="%s"
+ android:src="@drawable/splash" />
+ </item>
+</layer-list>
+)SPLASH";
struct LauncherIcon {
const char *export_path;
@@ -264,38 +278,38 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
Vector<PluginConfigAndroid> plugins;
String last_plugin_names;
uint64_t last_custom_build_time = 0;
- volatile bool plugins_changed;
+ SafeFlag plugins_changed;
Mutex plugins_lock;
Vector<Device> devices;
- volatile bool devices_changed;
+ SafeFlag devices_changed;
Mutex device_lock;
- Thread *check_for_changes_thread;
- volatile bool quit_request;
+ Thread check_for_changes_thread;
+ SafeFlag quit_request;
static void _check_for_changes_poll_thread(void *ud) {
EditorExportPlatformAndroid *ea = (EditorExportPlatformAndroid *)ud;
- while (!ea->quit_request) {
+ while (!ea->quit_request.is_set()) {
// Check for plugins updates
{
// Nothing to do if we already know the plugins have changed.
- if (!ea->plugins_changed) {
+ if (!ea->plugins_changed.is_set()) {
Vector<PluginConfigAndroid> loaded_plugins = get_plugins();
MutexLock lock(ea->plugins_lock);
if (ea->plugins.size() != loaded_plugins.size()) {
- ea->plugins_changed = true;
+ ea->plugins_changed.set();
} else {
for (int i = 0; i < ea->plugins.size(); i++) {
if (ea->plugins[i].name != loaded_plugins[i].name) {
- ea->plugins_changed = true;
+ ea->plugins_changed.set();
break;
}
}
}
- if (ea->plugins_changed) {
+ if (ea->plugins_changed.is_set()) {
ea->plugins = loaded_plugins;
}
}
@@ -409,7 +423,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
}
ea->devices = ndevices;
- ea->devices_changed = true;
+ ea->devices_changed.set();
}
}
@@ -418,7 +432,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
uint64_t time = OS::get_singleton()->get_ticks_usec();
while (OS::get_singleton()->get_ticks_usec() - time < wait) {
OS::get_singleton()->delay_usec(1000 * sleep);
- if (ea->quit_request) {
+ if (ea->quit_request.is_set()) {
break;
}
}
@@ -775,6 +789,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
}
void _write_tmp_manifest(const Ref<EditorExportPreset> &p_preset, bool p_give_internet, bool p_debug) {
+ print_verbose("Building temporary manifest..");
String manifest_text =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n"
@@ -795,6 +810,8 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
manifest_text += _get_application_tag(p_preset, plugins_names);
manifest_text += "</manifest>\n";
String manifest_path = vformat("res://android/build/src/%s/AndroidManifest.xml", (p_debug ? "debug" : "release"));
+
+ print_verbose("Storing manifest into " + manifest_path + ": " + "\n" + manifest_text);
store_string_at_path(manifest_path, manifest_text);
}
@@ -1470,20 +1487,26 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
}
}
- void load_splash_refs(Ref<Image> &splash_image, Ref<Image> &splash_bg_color_image) {
- // TODO: Figure out how to handle remaining boot splash parameters (e.g: fullsize, filter)
+ String load_splash_refs(Ref<Image> &splash_image, Ref<Image> &splash_bg_color_image) {
+ bool scale_splash = ProjectSettings::get_singleton()->get("application/boot_splash/fullsize");
+ bool apply_filter = ProjectSettings::get_singleton()->get("application/boot_splash/use_filter");
String project_splash_path = ProjectSettings::get_singleton()->get("application/boot_splash/image");
if (!project_splash_path.is_empty()) {
splash_image.instance();
+ print_verbose("Loading splash image: " + project_splash_path);
const Error err = ImageLoader::load_image(project_splash_path, splash_image);
if (err) {
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ print_error("- unable to load splash image from " + project_splash_path + " (" + itos(err) + ")");
+ }
splash_image.unref();
}
}
if (splash_image.is_null()) {
// Use the default
+ print_verbose("Using default splash image.");
splash_image = Ref<Image>(memnew(Image(boot_splash_png)));
}
@@ -1494,9 +1517,14 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
bg_color = boot_splash_bg_color;
}
+ print_verbose("Creating splash background color image.");
splash_bg_color_image.instance();
splash_bg_color_image->create(splash_image->get_width(), splash_image->get_height(), false, splash_image->get_format());
splash_bg_color_image->fill(bg_color);
+
+ String gravity = scale_splash ? "fill" : "center";
+ String processed_splash_config_xml = vformat(SPLASH_CONFIG_XML_CONTENT, gravity, bool_to_string(apply_filter));
+ return processed_splash_config_xml;
}
void load_icon_refs(const Ref<EditorExportPreset> &p_preset, Ref<Image> &icon, Ref<Image> &foreground, Ref<Image> &background) {
@@ -1508,19 +1536,24 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
// Regular icon: user selection -> project icon -> default.
String path = static_cast<String>(p_preset->get(launcher_icon_option)).strip_edges();
+ print_verbose("Loading regular icon from " + path);
if (path.is_empty() || ImageLoader::load_image(path, icon) != OK) {
+ print_verbose("- falling back to project icon: " + project_icon_path);
ImageLoader::load_image(project_icon_path, icon);
}
// Adaptive foreground: user selection -> regular icon (user selection -> project icon -> default).
path = static_cast<String>(p_preset->get(launcher_adaptive_icon_foreground_option)).strip_edges();
+ print_verbose("Loading adaptive foreground icon from " + path);
if (path.is_empty() || ImageLoader::load_image(path, foreground) != OK) {
+ print_verbose("- falling back to using the regular icon");
foreground = icon;
}
// Adaptive background: user selection -> default.
path = static_cast<String>(p_preset->get(launcher_adaptive_icon_background_option)).strip_edges();
if (!path.is_empty()) {
+ print_verbose("Loading adaptive background icon from " + path);
ImageLoader::load_image(path, background);
}
}
@@ -1535,13 +1568,21 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
}
void _copy_icons_to_gradle_project(const Ref<EditorExportPreset> &p_preset,
+ const String &processed_splash_config_xml,
const Ref<Image> &splash_image,
const Ref<Image> &splash_bg_color_image,
const Ref<Image> &main_image,
const Ref<Image> &foreground,
const Ref<Image> &background) {
+ // Store the splash configuration
+ if (!processed_splash_config_xml.is_empty()) {
+ print_verbose("Storing processed splash configuration: " + String("\n") + processed_splash_config_xml);
+ store_string_at_path(SPLASH_CONFIG_PATH, processed_splash_config_xml);
+ }
+
// Store the splash image
if (splash_image.is_valid() && !splash_image->is_empty()) {
+ print_verbose("Storing splash image in " + String(SPLASH_IMAGE_EXPORT_PATH));
Vector<uint8_t> data;
_load_image_data(splash_image, data);
store_image(SPLASH_IMAGE_EXPORT_PATH, data);
@@ -1549,6 +1590,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
// Store the splash bg color image
if (splash_bg_color_image.is_valid() && !splash_bg_color_image->is_empty()) {
+ print_verbose("Storing splash background image in " + String(SPLASH_BG_COLOR_PATH));
Vector<uint8_t> data;
_load_image_data(splash_bg_color_image, data);
store_image(SPLASH_BG_COLOR_PATH, data);
@@ -1559,12 +1601,14 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
for (int i = 0; i < icon_densities_count; ++i) {
if (main_image.is_valid() && !main_image->is_empty()) {
+ print_verbose("Processing launcher icon for dimension " + itos(launcher_icons[i].dimensions) + " into " + launcher_icons[i].export_path);
Vector<uint8_t> data;
_process_launcher_icons(launcher_icons[i].export_path, main_image, launcher_icons[i].dimensions, data);
store_image(launcher_icons[i], data);
}
if (foreground.is_valid() && !foreground->is_empty()) {
+ print_verbose("Processing launcher adaptive icon foreground for dimension " + itos(launcher_adaptive_icon_foregrounds[i].dimensions) + " into " + launcher_adaptive_icon_foregrounds[i].export_path);
Vector<uint8_t> data;
_process_launcher_icons(launcher_adaptive_icon_foregrounds[i].export_path, foreground,
launcher_adaptive_icon_foregrounds[i].dimensions, data);
@@ -1572,6 +1616,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
}
if (background.is_valid() && !background->is_empty()) {
+ print_verbose("Processing launcher adaptive icon background for dimension " + itos(launcher_adaptive_icon_backgrounds[i].dimensions) + " into " + launcher_adaptive_icon_backgrounds[i].export_path);
Vector<uint8_t> data;
_process_launcher_icons(launcher_adaptive_icon_backgrounds[i].export_path, background,
launcher_adaptive_icon_backgrounds[i].dimensions, data);
@@ -1597,7 +1642,7 @@ public:
public:
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override {
- String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
+ String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
if (driver == "GLES2") {
r_features->push_back("etc");
}
@@ -1623,7 +1668,7 @@ public:
print_verbose("Found Android plugin " + plugins_configs[i].name);
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "plugins/" + plugins_configs[i].name), false));
}
- plugins_changed = false;
+ plugins_changed.clear();
Vector<String> abis = get_abis();
for (int i = 0; i < abis.size(); ++i) {
@@ -1693,19 +1738,19 @@ public:
}
virtual bool should_update_export_options() override {
- bool export_options_changed = plugins_changed;
+ bool export_options_changed = plugins_changed.is_set();
if (export_options_changed) {
// don't clear unless we're reporting true, to avoid race
- plugins_changed = false;
+ plugins_changed.clear();
}
return export_options_changed;
}
virtual bool poll_export() override {
- bool dc = devices_changed;
+ bool dc = devices_changed.is_set();
if (dc) {
// don't clear unless we're reporting true, to avoid race
- devices_changed = false;
+ devices_changed.clear();
}
return dc;
}
@@ -2239,6 +2284,7 @@ public:
String release_password = p_preset->get("keystore/release_password");
String apksigner = get_apksigner_path();
+ print_verbose("Starting signing of the " + export_label + " binary using " + apksigner);
if (!FileAccess::exists(apksigner)) {
EditorNode::add_io_error("'apksigner' could not be found.\nPlease check the command is available in the Android SDK build-tools directory.\nThe resulting " + export_label + " is unsigned.");
return OK;
@@ -2287,6 +2333,10 @@ public:
args.push_back("--ks-key-alias");
args.push_back(user);
args.push_back(export_path);
+ if (p_debug) {
+ // We only print verbose logs for debug builds to avoid leaking release keystore credentials.
+ print_verbose("Signing debug binary using: " + String("\n") + apksigner + " " + join_list(args, String(" ")));
+ }
int retval;
OS::get_singleton()->execute(apksigner, args, nullptr, &retval);
if (retval) {
@@ -2302,24 +2352,41 @@ public:
args.push_back("verify");
args.push_back("--verbose");
args.push_back(export_path);
+ if (p_debug) {
+ print_verbose("Verifying signed build using: " + String("\n") + apksigner + " " + join_list(args, String(" ")));
+ }
OS::get_singleton()->execute(apksigner, args, nullptr, &retval);
if (retval) {
EditorNode::add_io_error("'apksigner' verification of " + export_label + " failed.");
return ERR_CANT_CREATE;
}
+
+ print_verbose("Successfully completed signing build.");
return OK;
}
void _clear_assets_directory() {
DirAccessRef da_res = DirAccess::create(DirAccess::ACCESS_RESOURCES);
if (da_res->dir_exists("res://android/build/assets")) {
+ print_verbose("Clearing assets directory..");
DirAccessRef da_assets = DirAccess::open("res://android/build/assets");
da_assets->erase_contents_recursive();
da_res->remove("res://android/build/assets");
}
}
+ String join_list(List<String> parts, const String &separator) const {
+ String ret;
+ for (int i = 0; i < parts.size(); ++i) {
+ if (i > 0) {
+ ret += separator;
+ }
+ ret += parts[i];
+ }
+ return ret;
+ }
+
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override {
int export_format = int(p_preset->get("custom_template/export_format"));
bool should_sign = p_preset->get("package/signed");
@@ -2339,9 +2406,18 @@ public:
bool apk_expansion = p_preset->get("apk_expansion/enable");
Vector<String> enabled_abis = get_enabled_abis(p_preset);
+ print_verbose("Exporting for Android...");
+ print_verbose("- debug build: " + bool_to_string(p_debug));
+ print_verbose("- export path: " + p_path);
+ print_verbose("- export format: " + itos(export_format));
+ print_verbose("- sign build: " + bool_to_string(should_sign));
+ print_verbose("- custom build enabled: " + bool_to_string(use_custom_build));
+ print_verbose("- apk expansion enabled: " + bool_to_string(apk_expansion));
+ print_verbose("- enabled abis: " + String(",").join(enabled_abis));
+
Ref<Image> splash_image;
Ref<Image> splash_bg_color_image;
- load_splash_refs(splash_image, splash_bg_color_image);
+ String processed_splash_config_xml = load_splash_refs(splash_image, splash_bg_color_image);
Ref<Image> main_image;
Ref<Image> foreground;
@@ -2374,14 +2450,17 @@ public:
}
if (use_custom_build) {
+ print_verbose("Starting custom build..");
//test that installed build version is alright
{
+ print_verbose("Checking build version..");
FileAccessRef f = FileAccess::open("res://android/.build_version", FileAccess::READ);
if (!f) {
EditorNode::get_singleton()->show_warning(TTR("Trying to build from a custom built template, but no version info for it exists. Please reinstall from the 'Project' menu."));
return ERR_UNCONFIGURED;
}
String version = f->get_line().strip_edges();
+ print_verbose("- build version: " + version);
f->close();
if (version != VERSION_FULL_CONFIG) {
EditorNode::get_singleton()->show_warning(vformat(TTR("Android build version mismatch:\n Template installed: %s\n Godot Version: %s\nPlease reinstall Android build template from 'Project' menu."), version, VERSION_FULL_CONFIG));
@@ -2389,7 +2468,8 @@ public:
}
}
String sdk_path = EDITOR_GET("export/android/android_sdk_path");
- ERR_FAIL_COND_V_MSG(sdk_path == "", ERR_UNCONFIGURED, "Android SDK path must be configured in Editor Settings at 'export/android/android_sdk_path'.");
+ ERR_FAIL_COND_V_MSG(sdk_path.is_empty(), ERR_UNCONFIGURED, "Android SDK path must be configured in Editor Settings at 'export/android/android_sdk_path'.");
+ print_verbose("Android sdk path: " + sdk_path);
// TODO: should we use "package/name" or "application/config/name"?
String project_name = get_project_name(p_preset->get("package/name"));
@@ -2398,27 +2478,31 @@ public:
EditorNode::add_io_error("Unable to overwrite res://android/build/res/*.xml files with project name");
}
// Copies the project icon files into the appropriate Gradle project directory.
- _copy_icons_to_gradle_project(p_preset, splash_image, splash_bg_color_image, main_image, foreground, background);
+ _copy_icons_to_gradle_project(p_preset, processed_splash_config_xml, splash_image, splash_bg_color_image, main_image, foreground, background);
// Write an AndroidManifest.xml file into the Gradle project directory.
_write_tmp_manifest(p_preset, p_give_internet, p_debug);
//stores all the project files inside the Gradle project directory. Also includes all ABIs
_clear_assets_directory();
if (!apk_expansion) {
+ print_verbose("Exporting project files..");
err = export_project_files(p_preset, rename_and_store_file_in_gradle_project, NULL, ignore_so_file);
if (err != OK) {
EditorNode::add_io_error("Could not export project files to gradle project\n");
return err;
}
} else {
+ print_verbose("Saving apk expansion file..");
err = save_apk_expansion_file(p_preset, p_path);
if (err != OK) {
EditorNode::add_io_error("Could not write expansion package file!");
return err;
}
}
+ print_verbose("Storing command line flags..");
store_file_at_path("res://android/build/assets/_cl_", command_line_flags);
+ print_verbose("Updating ANDROID_HOME environment to " + sdk_path);
OS::get_singleton()->set_environment("ANDROID_HOME", sdk_path); //set and overwrite if required
String build_command;
@@ -2458,6 +2542,8 @@ public:
cmdline.push_back(apk_build_command);
}
+ cmdline.push_back("-p"); // argument to specify the start directory.
+ cmdline.push_back(build_path); // start directory.
cmdline.push_back("-Pexport_package_name=" + package_name); // argument to specify the package name.
cmdline.push_back("-Pexport_version_code=" + version_code); // argument to specify the version code.
cmdline.push_back("-Pexport_version_name=" + version_name); // argument to specify the version name.
@@ -2467,6 +2553,13 @@ public:
cmdline.push_back("-Pplugins_maven_repos=" + custom_maven_repos); // argument to specify the list of custom maven repos for the plugins dependencies.
cmdline.push_back("-Pperform_zipalign=" + zipalign_flag); // argument to specify whether the build should be zipaligned.
cmdline.push_back("-Pperform_signing=" + sign_flag); // argument to specify whether the build should be signed.
+
+ // NOTE: The release keystore is not included in the verbose logging
+ // to avoid accidentally leaking sensitive information when sharing verbose logs for troubleshooting.
+ // Any non-sensitive additions to the command line arguments must be done above this section.
+ // Sensitive additions must be done below the logging statement.
+ print_verbose("Build Android project using gradle command: " + String("\n") + build_command + " " + join_list(cmdline, String(" ")));
+
if (should_sign && !p_debug) {
// Pass the release keystore info as well
String release_keystore = p_preset->get("keystore/release");
@@ -2481,8 +2574,6 @@ public:
cmdline.push_back("-Prelease_keystore_alias=" + release_username); // argument to specify the release keystore alias.
cmdline.push_back("-Prelease_keystore_password=" + release_password); // argument to specity the release keystore password.
}
- cmdline.push_back("-p"); // argument to specify the start directory.
- cmdline.push_back(build_path); // start directory.
int result = EditorNode::get_singleton()->execute_and_show_output(TTR("Building Android Project (gradle)"), build_command, cmdline);
if (result != 0) {
@@ -2513,15 +2604,18 @@ public:
copy_args.push_back("-Pexport_path=file:" + export_path);
copy_args.push_back("-Pexport_filename=" + export_filename);
+ print_verbose("Copying Android binary using gradle command: " + String("\n") + build_command + " " + join_list(copy_args, String(" ")));
int copy_result = EditorNode::get_singleton()->execute_and_show_output(TTR("Moving output"), build_command, copy_args);
if (copy_result != 0) {
EditorNode::get_singleton()->show_warning(TTR("Unable to copy and rename export file, check gradle project directory for outputs."));
return ERR_CANT_CREATE;
}
+ print_verbose("Successfully completed Android custom build.");
return OK;
}
// This is the start of the Legacy build system
+ print_verbose("Starting legacy build system..");
if (p_debug)
src_apk = p_preset->get("custom_template/debug");
else
@@ -2845,16 +2939,14 @@ public:
run_icon.instance();
run_icon->create_from_image(img);
- devices_changed = true;
- plugins_changed = true;
- quit_request = false;
- check_for_changes_thread = Thread::create(_check_for_changes_poll_thread, this);
+ devices_changed.set();
+ plugins_changed.set();
+ check_for_changes_thread.start(_check_for_changes_poll_thread, this);
}
~EditorExportPlatformAndroid() {
- quit_request = true;
- Thread::wait_to_finish(check_for_changes_thread);
- memdelete(check_for_changes_thread);
+ quit_request.set();
+ check_for_changes_thread.wait_to_finish();
}
};
diff --git a/platform/android/export/gradle_export_util.h b/platform/android/export/gradle_export_util.h
index fc54b65d26..ce6a3c96db 100644
--- a/platform/android/export/gradle_export_util.h
+++ b/platform/android/export/gradle_export_util.h
@@ -146,6 +146,9 @@ Error store_string_at_path(const String &p_path, const String &p_data) {
String dir = p_path.get_base_dir();
Error err = create_directory(dir);
if (err != OK) {
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ print_error("Unable to write data into " + p_path);
+ }
return err;
}
FileAccess *fa = FileAccess::open(p_path, FileAccess::WRITE);
@@ -162,12 +165,14 @@ Error store_string_at_path(const String &p_path, const String &p_data) {
// This method will be called ONLY when custom build is enabled.
Error rename_and_store_file_in_gradle_project(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key) {
String dst_path = p_path.replace_first("res://", "res://android/build/assets/");
+ print_verbose("Saving project files from " + p_path + " into " + dst_path);
Error err = store_file_at_path(dst_path, p_data);
return err;
}
// Creates strings.xml files inside the gradle project for different locales.
Error _create_project_name_strings_files(const Ref<EditorExportPreset> &p_preset, const String &project_name) {
+ print_verbose("Creating strings resources for supported locales for project " + project_name);
// Stores the string into the default values directory.
String processed_default_xml_string = vformat(godot_project_name_xml_string, project_name.xml_escape(true));
store_string_at_path("res://android/build/res/values/godot_project_name_string.xml", processed_default_xml_string);
@@ -175,6 +180,9 @@ Error _create_project_name_strings_files(const Ref<EditorExportPreset> &p_preset
// Searches the Gradle project res/ directory to find all supported locales
DirAccessRef da = DirAccess::open("res://android/build/res");
if (!da) {
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ print_error("Unable to open Android resources directory.");
+ }
return ERR_CANT_OPEN;
}
da->list_dir_begin();
@@ -193,6 +201,7 @@ Error _create_project_name_strings_files(const Ref<EditorExportPreset> &p_preset
if (ProjectSettings::get_singleton()->has_setting(property_name)) {
String locale_project_name = ProjectSettings::get_singleton()->get(property_name);
String processed_xml_string = vformat(godot_project_name_xml_string, locale_project_name.xml_escape(true));
+ print_verbose("Storing project name for locale " + locale + " under " + locale_directory);
store_string_at_path(locale_directory, processed_xml_string);
} else {
// TODO: Once the legacy build system is deprecated we don't need to have xml files for this else branch
@@ -208,8 +217,8 @@ String bool_to_string(bool v) {
}
String _get_gles_tag() {
- bool min_gles3 = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name") == "GLES3" &&
- !ProjectSettings::get_singleton()->get("rendering/quality/driver/fallback_to_gles2");
+ bool min_gles3 = ProjectSettings::get_singleton()->get("rendering/driver/driver_name") == "GLES3" &&
+ !ProjectSettings::get_singleton()->get("rendering/driver/fallback_to_gles2");
return min_gles3 ? " <uses-feature android:glEsVersion=\"0x00030000\" android:required=\"true\" />\n" : "";
}
diff --git a/platform/android/java/app/build.gradle b/platform/android/java/app/build.gradle
index 53d11fda5b..814cc30613 100644
--- a/platform/android/java/app/build.gradle
+++ b/platform/android/java/app/build.gradle
@@ -98,6 +98,8 @@ android {
disable 'MissingTranslation', 'UnusedResources'
}
+ ndkVersion versions.ndkVersion
+
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle
index 80cf6f7ede..202b3c35c0 100644
--- a/platform/android/java/app/config.gradle
+++ b/platform/android/java/app/config.gradle
@@ -1,5 +1,5 @@
ext.versions = [
- androidGradlePlugin: '4.1.0',
+ androidGradlePlugin: '4.0.1',
compileSdk : 29,
minSdk : 18,
targetSdk : 29,
@@ -7,7 +7,8 @@ ext.versions = [
supportCoreUtils : '1.0.0',
kotlinVersion : '1.4.10',
v4Support : '1.0.0',
- javaVersion : 1.8
+ javaVersion : 1.8,
+ ndkVersion : '21.4.7075529' // Also update 'platform/android/detect.py#get_project_ndk_version()' when this is updated.
]
diff --git a/platform/android/java/app/res/drawable/splash_drawable.xml b/platform/android/java/app/res/drawable/splash_drawable.xml
index 2794a40817..30627b998c 100644
--- a/platform/android/java/app/res/drawable/splash_drawable.xml
+++ b/platform/android/java/app/res/drawable/splash_drawable.xml
@@ -6,7 +6,7 @@
<item>
<bitmap
android:gravity="center"
+ android:filter="false"
android:src="@drawable/splash" />
</item>
-
</layer-list>
diff --git a/platform/android/java/lib/build.gradle b/platform/android/java/lib/build.gradle
index 89ce3d15e6..ca5153f7f6 100644
--- a/platform/android/java/lib/build.gradle
+++ b/platform/android/java/lib/build.gradle
@@ -13,6 +13,8 @@ android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
+ ndkVersion versions.ndkVersion
+
defaultConfig {
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
@@ -68,7 +70,7 @@ android {
File sconsExecutableFile = null
def sconsName = "scons"
def sconsExts = (org.gradle.internal.os.OperatingSystem.current().isWindows()
- ? [".bat", ".exe"]
+ ? [".bat", ".cmd", ".ps1", ".exe"]
: [""])
logger.lifecycle("Looking for $sconsName executable path")
for (ext in sconsExts) {
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
index 3368363ce7..435b8b325f 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
@@ -38,6 +38,8 @@ import org.godotengine.godot.input.InputManagerCompat.InputDeviceListener;
import android.os.Build;
import android.util.Log;
+import android.util.SparseArray;
+import android.util.SparseIntArray;
import android.view.InputDevice;
import android.view.InputDevice.MotionRange;
import android.view.KeyEvent;
@@ -46,17 +48,24 @@ import android.view.MotionEvent;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
/**
* Handles input related events for the {@link GodotRenderView} view.
*/
public class GodotInputHandler implements InputDeviceListener {
- private final ArrayList<Joystick> mJoysticksDevices = new ArrayList<Joystick>();
-
private final GodotRenderView mRenderView;
private final InputManagerCompat mInputManager;
+ private final String tag = this.getClass().getSimpleName();
+
+ private final SparseIntArray mJoystickIds = new SparseIntArray(4);
+ private final SparseArray<Joystick> mJoysticksDevices = new SparseArray<Joystick>(4);
+
public GodotInputHandler(GodotRenderView godotView) {
mRenderView = godotView;
mInputManager = InputManagerCompat.Factory.getInputManager(mRenderView.getView().getContext());
@@ -82,19 +91,20 @@ public class GodotInputHandler implements InputDeviceListener {
if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
return false;
- };
+ }
int source = event.getSource();
if (isKeyEvent_GameDevice(source)) {
- final int button = getGodotButton(keyCode);
- final int device_id = findJoystickDevice(event.getDeviceId());
-
// Check if the device exists
- if (device_id > -1) {
+ final int deviceId = event.getDeviceId();
+ if (mJoystickIds.indexOfKey(deviceId) >= 0) {
+ final int button = getGodotButton(keyCode);
+ final int godotJoyId = mJoystickIds.get(deviceId);
+
queueEvent(new Runnable() {
@Override
public void run() {
- GodotLib.joybutton(device_id, button, false);
+ GodotLib.joybutton(godotJoyId, button, false);
}
});
}
@@ -107,7 +117,7 @@ public class GodotInputHandler implements InputDeviceListener {
GodotLib.key(keyCode, scanCode, chr, false);
}
});
- };
+ }
return true;
}
@@ -122,24 +132,25 @@ public class GodotInputHandler implements InputDeviceListener {
if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
return false;
- };
+ }
int source = event.getSource();
//Log.e(TAG, String.format("Key down! source %d, device %d, joystick %d, %d, %d", event.getDeviceId(), source, (source & InputDevice.SOURCE_JOYSTICK), (source & InputDevice.SOURCE_DPAD), (source & InputDevice.SOURCE_GAMEPAD)));
+ final int deviceId = event.getDeviceId();
+ // Check if source is a game device and that the device is a registered gamepad
if (isKeyEvent_GameDevice(source)) {
if (event.getRepeatCount() > 0) // ignore key echo
return true;
- final int button = getGodotButton(keyCode);
- final int device_id = findJoystickDevice(event.getDeviceId());
+ if (mJoystickIds.indexOfKey(deviceId) >= 0) {
+ final int button = getGodotButton(keyCode);
+ final int godotJoyId = mJoystickIds.get(deviceId);
- // Check if the device exists
- if (device_id > -1) {
queueEvent(new Runnable() {
@Override
public void run() {
- GodotLib.joybutton(device_id, button, true);
+ GodotLib.joybutton(godotJoyId, button, true);
}
});
}
@@ -152,7 +163,7 @@ public class GodotInputHandler implements InputDeviceListener {
GodotLib.key(keyCode, scanCode, chr, true);
}
});
- };
+ }
return true;
}
@@ -203,38 +214,52 @@ public class GodotInputHandler implements InputDeviceListener {
}
public boolean onGenericMotionEvent(MotionEvent event) {
- if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK && event.getAction() == MotionEvent.ACTION_MOVE) {
- final int device_id = findJoystickDevice(event.getDeviceId());
-
+ if (event.isFromSource(InputDevice.SOURCE_JOYSTICK) && event.getAction() == MotionEvent.ACTION_MOVE) {
// Check if the device exists
- if (device_id > -1) {
- Joystick joy = mJoysticksDevices.get(device_id);
-
- for (int i = 0; i < joy.axes.size(); i++) {
- InputDevice.MotionRange range = joy.axes.get(i);
- final float value = (event.getAxisValue(range.getAxis()) - range.getMin()) / range.getRange() * 2.0f - 1.0f;
- final int idx = i;
- queueEvent(new Runnable() {
- @Override
- public void run() {
- GodotLib.joyaxis(device_id, idx, value);
- }
- });
+ final int deviceId = event.getDeviceId();
+ if (mJoystickIds.indexOfKey(deviceId) >= 0) {
+ final int godotJoyId = mJoystickIds.get(deviceId);
+ Joystick joystick = mJoysticksDevices.get(deviceId);
+
+ for (int i = 0; i < joystick.axes.size(); i++) {
+ final int axis = joystick.axes.get(i);
+ final float value = event.getAxisValue(axis);
+ /**
+ * As all axes are polled for each event, only fire an axis event if the value has actually changed.
+ * Prevents flooding Godot with repeated events.
+ */
+ if (joystick.axesValues.indexOfKey(axis) < 0 || (float)joystick.axesValues.get(axis) != value) {
+ // save value to prevent repeats
+ joystick.axesValues.put(axis, value);
+ final int godotAxisIdx = i;
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.joyaxis(godotJoyId, godotAxisIdx, value);
+ //Log.i(tag, "GodotLib.joyaxis("+godotJoyId+", "+godotAxisIdx+", "+value+");");
+ }
+ });
+ }
}
- for (int i = 0; i < joy.hats.size(); i += 2) {
- final int hatX = Math.round(event.getAxisValue(joy.hats.get(i).getAxis()));
- final int hatY = Math.round(event.getAxisValue(joy.hats.get(i + 1).getAxis()));
- queueEvent(new Runnable() {
- @Override
- public void run() {
- GodotLib.joyhat(device_id, hatX, hatY);
- }
- });
+ if (joystick.hasAxisHat) {
+ final int hatX = Math.round(event.getAxisValue(MotionEvent.AXIS_HAT_X));
+ final int hatY = Math.round(event.getAxisValue(MotionEvent.AXIS_HAT_Y));
+ if (joystick.hatX != hatX || joystick.hatY != hatY) {
+ joystick.hatX = hatX;
+ joystick.hatY = hatY;
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.joyhat(godotJoyId, hatX, hatY);
+ //Log.i(tag, "GodotLib.joyhat("+godotJoyId+", "+hatX+", "+hatY+");");
+ }
+ });
+ }
}
return true;
}
- } else if ((event.getSource() & InputDevice.SOURCE_STYLUS) == InputDevice.SOURCE_STYLUS) {
+ } else if (event.isFromSource(InputDevice.SOURCE_STYLUS)) {
final float x = event.getX();
final float y = event.getY();
final int type = event.getAction();
@@ -245,6 +270,7 @@ public class GodotInputHandler implements InputDeviceListener {
}
});
return true;
+
} else if (event.isFromSource(InputDevice.SOURCE_MOUSE) || event.isFromSource(InputDevice.SOURCE_MOUSE_RELATIVE)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
return handleMouseEvent(event);
@@ -266,67 +292,98 @@ public class GodotInputHandler implements InputDeviceListener {
}
}
+ private int assignJoystickIdNumber(int deviceId) {
+ int godotJoyId = 0;
+ while (mJoystickIds.indexOfValue(godotJoyId) >= 0) {
+ godotJoyId++;
+ }
+ mJoystickIds.put(deviceId, godotJoyId);
+ return godotJoyId;
+ }
+
@Override
public void onInputDeviceAdded(int deviceId) {
- int id = findJoystickDevice(deviceId);
-
// Check if the device has not been already added
- if (id < 0) {
- InputDevice device = mInputManager.getInputDevice(deviceId);
- //device can be null if deviceId is not found
- if (device != null) {
- int sources = device.getSources();
- if (((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) ||
- ((sources & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK)) {
- id = mJoysticksDevices.size();
-
- Joystick joy = new Joystick();
- joy.device_id = deviceId;
- joy.name = device.getName();
- joy.axes = new ArrayList<InputDevice.MotionRange>();
- joy.hats = new ArrayList<InputDevice.MotionRange>();
-
- List<InputDevice.MotionRange> ranges = device.getMotionRanges();
- Collections.sort(ranges, new RangeComparator());
-
- for (InputDevice.MotionRange range : ranges) {
- if (range.getAxis() == MotionEvent.AXIS_HAT_X || range.getAxis() == MotionEvent.AXIS_HAT_Y) {
- joy.hats.add(range);
- } else {
- joy.axes.add(range);
- }
- }
- mJoysticksDevices.add(joy);
+ if (mJoystickIds.indexOfKey(deviceId) >= 0) {
+ return;
+ }
+
+ InputDevice device = mInputManager.getInputDevice(deviceId);
+ //device can be null if deviceId is not found
+ if (device == null) {
+ return;
+ }
+
+ int sources = device.getSources();
+
+ // Device may not be a joystick or gamepad
+ if ((sources & InputDevice.SOURCE_GAMEPAD) != InputDevice.SOURCE_GAMEPAD &&
+ (sources & InputDevice.SOURCE_JOYSTICK) != InputDevice.SOURCE_JOYSTICK) {
+ return;
+ }
+
+ // Assign first available number. Re-use numbers where possible.
+ final int id = assignJoystickIdNumber(deviceId);
+
+ final Joystick joystick = new Joystick();
+ joystick.device_id = deviceId;
+ joystick.name = device.getName();
+
+ //Helps with creating new joypad mappings.
+ Log.i(tag, "=== New Input Device: " + joystick.name);
- final int device_id = id;
- final String name = joy.name;
- queueEvent(new Runnable() {
- @Override
- public void run() {
- GodotLib.joyconnectionchanged(device_id, true, name);
- }
- });
+ Set<Integer> already = new HashSet<Integer>();
+ for (InputDevice.MotionRange range : device.getMotionRanges()) {
+ boolean isJoystick = range.isFromSource(InputDevice.SOURCE_JOYSTICK);
+ boolean isGamepad = range.isFromSource(InputDevice.SOURCE_GAMEPAD);
+ //Log.i(tag, "axis: "+range.getAxis()+ ", isJoystick: "+isJoystick+", isGamepad: "+isGamepad);
+ if (!isJoystick && !isGamepad) {
+ continue;
+ }
+ final int axis = range.getAxis();
+ if (axis == MotionEvent.AXIS_HAT_X || axis == MotionEvent.AXIS_HAT_Y) {
+ joystick.hasAxisHat = true;
+ } else {
+ if (!already.contains(axis)) {
+ already.add(axis);
+ joystick.axes.add(axis);
+ } else {
+ Log.w(tag, " - DUPLICATE AXIS VALUE IN LIST: " + axis);
}
}
}
+ Collections.sort(joystick.axes);
+ for (int idx = 0; idx < joystick.axes.size(); idx++) {
+ //Helps with creating new joypad mappings.
+ Log.i(tag, " - Mapping Android axis " + joystick.axes.get(idx) + " to Godot axis " + idx);
+ }
+ mJoysticksDevices.put(deviceId, joystick);
+
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.joyconnectionchanged(id, true, joystick.name);
+ }
+ });
}
@Override
public void onInputDeviceRemoved(int deviceId) {
- final int device_id = findJoystickDevice(deviceId);
-
- // Check if the evice has not been already removed
- if (device_id > -1) {
- mJoysticksDevices.remove(device_id);
-
- queueEvent(new Runnable() {
- @Override
- public void run() {
- GodotLib.joyconnectionchanged(device_id, false, "");
- }
- });
+ // Check if the device has not been already removed
+ if (mJoystickIds.indexOfKey(deviceId) < 0) {
+ return;
}
+ final int godotJoyId = mJoystickIds.get(deviceId);
+ mJoystickIds.delete(deviceId);
+ mJoysticksDevices.delete(deviceId);
+
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.joyconnectionchanged(godotJoyId, false, "");
+ }
+ });
}
@Override
@@ -407,16 +464,6 @@ public class GodotInputHandler implements InputDeviceListener {
return button;
}
- private int findJoystickDevice(int device_id) {
- for (int i = 0; i < mJoysticksDevices.size(); i++) {
- if (mJoysticksDevices.get(i).device_id == device_id) {
- return i;
- }
- }
-
- return -1;
- }
-
private boolean handleMouseEvent(final MotionEvent event) {
switch (event.getActionMasked()) {
case MotionEvent.ACTION_HOVER_ENTER:
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java b/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java
index 82bd45ee3f..4b7318c718 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java
@@ -30,9 +30,10 @@
package org.godotengine.godot.input;
-import android.view.InputDevice.MotionRange;
+import android.util.SparseArray;
import java.util.ArrayList;
+import java.util.List;
/**
* POJO class to represent a Joystick input device.
@@ -40,6 +41,12 @@ import java.util.ArrayList;
class Joystick {
int device_id;
String name;
- ArrayList<MotionRange> axes;
- ArrayList<MotionRange> hats;
+ List<Integer> axes = new ArrayList<Integer>();
+ protected boolean hasAxisHat = false;
+ /*
+ * Keep track of values so we can prevent flooding the engine with useless events.
+ */
+ protected final SparseArray axesValues = new SparseArray<Float>(4);
+ protected int hatX;
+ protected int hatY;
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
index a22b80761d..993f0e9127 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPlugin.java
@@ -46,7 +46,9 @@ import androidx.annotation.Nullable;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -107,14 +109,47 @@ public abstract class GodotPlugin {
* This method is invoked on the render thread.
*/
public final void onRegisterPluginWithGodotNative() {
- nativeRegisterSingleton(getPluginName());
+ registeredSignals.putAll(registerPluginWithGodotNative(this, new GodotPluginInfoProvider() {
+ @NonNull
+ @Override
+ public String getPluginName() {
+ return GodotPlugin.this.getPluginName();
+ }
+
+ @NonNull
+ @Override
+ public List<String> getPluginMethods() {
+ return GodotPlugin.this.getPluginMethods();
+ }
+
+ @NonNull
+ @Override
+ public Set<SignalInfo> getPluginSignals() {
+ return GodotPlugin.this.getPluginSignals();
+ }
+
+ @NonNull
+ @Override
+ public Set<String> getPluginGDNativeLibrariesPaths() {
+ return GodotPlugin.this.getPluginGDNativeLibrariesPaths();
+ }
+ }));
+ }
- Class clazz = getClass();
+ /**
+ * Register the plugin with Godot native code.
+ *
+ * This method must be invoked on the render thread.
+ */
+ public static Map<String, SignalInfo> registerPluginWithGodotNative(Object pluginObject, GodotPluginInfoProvider pluginInfoProvider) {
+ nativeRegisterSingleton(pluginInfoProvider.getPluginName(), pluginObject);
+
+ Class clazz = pluginObject.getClass();
Method[] methods = clazz.getDeclaredMethods();
for (Method method : methods) {
boolean found = false;
- for (String s : getPluginMethods()) {
+ for (String s : pluginInfoProvider.getPluginMethods()) {
if (s.equals(method.getName())) {
found = true;
break;
@@ -123,7 +158,7 @@ public abstract class GodotPlugin {
if (!found)
continue;
- List<String> ptr = new ArrayList<String>();
+ List<String> ptr = new ArrayList<>();
Class[] paramTypes = method.getParameterTypes();
for (Class c : paramTypes) {
@@ -133,26 +168,29 @@ public abstract class GodotPlugin {
String[] pt = new String[ptr.size()];
ptr.toArray(pt);
- nativeRegisterMethod(getPluginName(), method.getName(), method.getReturnType().getName(), pt);
+ nativeRegisterMethod(pluginInfoProvider.getPluginName(), method.getName(), method.getReturnType().getName(), pt);
}
// Register the signals for this plugin.
- for (SignalInfo signalInfo : getPluginSignals()) {
+ Map<String, SignalInfo> registeredSignals = new HashMap<>();
+ for (SignalInfo signalInfo : pluginInfoProvider.getPluginSignals()) {
String signalName = signalInfo.getName();
- nativeRegisterSignal(getPluginName(), signalName, signalInfo.getParamTypesNames());
+ nativeRegisterSignal(pluginInfoProvider.getPluginName(), signalName, signalInfo.getParamTypesNames());
registeredSignals.put(signalName, signalInfo);
}
// Get the list of gdnative libraries to register.
- Set<String> gdnativeLibrariesPaths = getPluginGDNativeLibrariesPaths();
+ Set<String> gdnativeLibrariesPaths = pluginInfoProvider.getPluginGDNativeLibrariesPaths();
if (!gdnativeLibrariesPaths.isEmpty()) {
nativeRegisterGDNativeLibraries(gdnativeLibrariesPaths.toArray(new String[0]));
}
+
+ return registeredSignals;
}
/**
* Invoked once during the Godot Android initialization process after creation of the
- * {@link org.godotengine.godot.GodotView} view.
+ * {@link org.godotengine.godot.GodotRenderView} view.
* <p>
* The plugin can return a non-null {@link View} layout in order to add it to the Godot view
* hierarchy.
@@ -290,8 +328,8 @@ public abstract class GodotPlugin {
/**
* Emit a registered Godot signal.
- * @param signalName
- * @param signalArgs
+ * @param signalName Name of the signal to emit. It will be validated against the set of registered signals.
+ * @param signalArgs Arguments used to populate the emitted signal. The arguments will be validated against the {@link SignalInfo} matching the registered signalName parameter.
*/
protected void emitSignal(final String signalName, final Object... signalArgs) {
try {
@@ -301,6 +339,27 @@ public abstract class GodotPlugin {
throw new IllegalArgumentException(
"Signal " + signalName + " is not registered for this plugin.");
}
+ emitSignal(getGodot(), getPluginName(), signalInfo, signalArgs);
+ } catch (IllegalArgumentException exception) {
+ Log.w(TAG, exception.getMessage());
+ if (BuildConfig.DEBUG) {
+ throw exception;
+ }
+ }
+ }
+
+ /**
+ * Emit a Godot signal.
+ * @param godot
+ * @param pluginName Name of the Godot plugin the signal will be emitted from. The plugin must already be registered with the Godot engine.
+ * @param signalInfo Information about the signal to emit.
+ * @param signalArgs Arguments used to populate the emitted signal. The arguments will be validated against the given {@link SignalInfo} parameter.
+ */
+ public static void emitSignal(Godot godot, String pluginName, SignalInfo signalInfo, final Object... signalArgs) {
+ try {
+ if (signalInfo == null) {
+ throw new IllegalArgumentException("Signal must be non null.");
+ }
// Validate the arguments count.
Class<?>[] signalParamTypes = signalInfo.getParamTypes();
@@ -317,12 +376,8 @@ public abstract class GodotPlugin {
}
}
- runOnRenderThread(new Runnable() {
- @Override
- public void run() {
- nativeEmitSignal(getPluginName(), signalName, signalArgs);
- }
- });
+ godot.runOnRenderThread(() -> nativeEmitSignal(pluginName, signalInfo.getName(), signalArgs));
+
} catch (IllegalArgumentException exception) {
Log.w(TAG, exception.getMessage());
if (BuildConfig.DEBUG) {
@@ -335,7 +390,7 @@ public abstract class GodotPlugin {
* Used to setup a {@link GodotPlugin} instance.
* @param p_name Name of the instance.
*/
- private native void nativeRegisterSingleton(String p_name);
+ private static native void nativeRegisterSingleton(String p_name, Object object);
/**
* Used to complete registration of the {@link GodotPlugin} instance's methods.
@@ -344,13 +399,13 @@ public abstract class GodotPlugin {
* @param p_ret Return type of the registered method
* @param p_params Method parameters types
*/
- private native void nativeRegisterMethod(String p_sname, String p_name, String p_ret, String[] p_params);
+ private static native void nativeRegisterMethod(String p_sname, String p_name, String p_ret, String[] p_params);
/**
* Used to register gdnative libraries bundled by the plugin.
* @param gdnlibPaths Paths to the libraries relative to the 'assets' directory.
*/
- private native void nativeRegisterGDNativeLibraries(String[] gdnlibPaths);
+ private static native void nativeRegisterGDNativeLibraries(String[] gdnlibPaths);
/**
* Used to complete registration of the {@link GodotPlugin} instance's methods.
@@ -358,7 +413,7 @@ public abstract class GodotPlugin {
* @param signalName Name of the signal to register
* @param signalParamTypes Signal parameters types
*/
- private native void nativeRegisterSignal(String pluginName, String signalName, String[] signalParamTypes);
+ private static native void nativeRegisterSignal(String pluginName, String signalName, String[] signalParamTypes);
/**
* Used to emit signal by {@link GodotPlugin} instance.
@@ -366,5 +421,5 @@ public abstract class GodotPlugin {
* @param signalName Name of the signal to emit
* @param signalParams Signal parameters
*/
- private native void nativeEmitSignal(String pluginName, String signalName, Object[] signalParams);
+ private static native void nativeEmitSignal(String pluginName, String signalName, Object[] signalParams);
}
diff --git a/modules/arkit/arkit_session_delegate.h b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java
index f227d50b35..c3084b036e 100644
--- a/modules/arkit/arkit_session_delegate.h
+++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginInfoProvider.java
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* arkit_session_delegate.h */
+/* GodotPluginInfoProvider.java */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,23 +28,40 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef ARKIT_SESSION_DELEGATE_H
-#define ARKIT_SESSION_DELEGATE_H
+package org.godotengine.godot.plugin;
-#import <ARKit/ARKit.h>
-#import <UIKit/UIKit.h>
+import androidx.annotation.NonNull;
-class ARKitInterface;
+import java.util.List;
+import java.util.Set;
-@interface ARKitSessionDelegate : NSObject <ARSessionDelegate> {
- ARKitInterface *arkit_interface;
-}
+/**
+ * Provides the set of information expected from a Godot plugin.
+ */
+public interface GodotPluginInfoProvider {
+ /**
+ * Returns the name of the plugin.
+ */
+ @NonNull
+ String getPluginName();
-@property(nonatomic) ARKitInterface *arkit_interface;
+ /**
+ * Returns the list of methods to be exposed to Godot.
+ */
+ @NonNull
+ List<String> getPluginMethods();
-- (void)session:(ARSession *)session didAddAnchors:(NSArray<ARAnchor *> *)anchors API_AVAILABLE(ios(11.0));
-- (void)session:(ARSession *)session didRemoveAnchors:(NSArray<ARAnchor *> *)anchors API_AVAILABLE(ios(11.0));
-- (void)session:(ARSession *)session didUpdateAnchors:(NSArray<ARAnchor *> *)anchors API_AVAILABLE(ios(11.0));
-@end
+ /**
+ * Returns the list of signals to be exposed to Godot.
+ */
+ @NonNull
+ Set<SignalInfo> getPluginSignals();
-#endif /* !ARKIT_SESSION_DELEGATE_H */
+ /**
+ * Returns the paths for the plugin's gdnative libraries (if any).
+ *
+ * The paths must be relative to the 'assets' directory and point to a '*.gdnlib' file.
+ */
+ @NonNull
+ Set<String> getPluginGDNativeLibrariesPaths();
+}
diff --git a/platform/android/java/nativeSrcsConfigs/build.gradle b/platform/android/java/nativeSrcsConfigs/build.gradle
index 65b7bb9dc9..66077060ea 100644
--- a/platform/android/java/nativeSrcsConfigs/build.gradle
+++ b/platform/android/java/nativeSrcsConfigs/build.gradle
@@ -31,6 +31,8 @@ android {
}
}
+ ndkVersion versions.ndkVersion
+
externalNativeBuild {
cmake {
path "CMakeLists.txt"
diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp
index 2b5ca530da..ab03599dc3 100644
--- a/platform/android/java_class_wrapper.cpp
+++ b/platform/android/java_class_wrapper.cpp
@@ -37,7 +37,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
if (!M)
return false;
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
MethodInfo *method = nullptr;
for (List<MethodInfo>::Element *E = M->get().front(); E; E = E->next()) {
@@ -964,7 +964,7 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
if (class_cache.has(p_class))
return class_cache[p_class];
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jclass bclass = env->FindClass(p_class.utf8().get_data());
ERR_FAIL_COND_V(!bclass, Ref<JavaClass>());
@@ -1148,7 +1148,7 @@ JavaClassWrapper *JavaClassWrapper::singleton = nullptr;
JavaClassWrapper::JavaClassWrapper(jobject p_activity) {
singleton = this;
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jclass activityClass = env->FindClass("android/app/Activity");
jmethodID getClassLoader = env->GetMethodID(activityClass, "getClassLoader", "()Ljava/lang/ClassLoader;");
diff --git a/platform/android/java_godot_io_wrapper.cpp b/platform/android/java_godot_io_wrapper.cpp
index 8f8275826d..41201db32b 100644
--- a/platform/android/java_godot_io_wrapper.cpp
+++ b/platform/android/java_godot_io_wrapper.cpp
@@ -34,7 +34,7 @@
// JNIEnv is only valid within the thread it belongs to, in a multi threading environment
// we can't cache it.
// For GodotIO we call all access methods from our thread and we thus get a valid JNIEnv
-// from ThreadAndroid.
+// from get_jni_env().
GodotIOJavaWrapper::GodotIOJavaWrapper(JNIEnv *p_env, jobject p_godot_io_instance) {
godot_io_instance = p_env->NewGlobalRef(p_godot_io_instance);
@@ -72,7 +72,7 @@ jobject GodotIOJavaWrapper::get_instance() {
Error GodotIOJavaWrapper::open_uri(const String &p_uri) {
if (_open_URI) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring jStr = env->NewStringUTF(p_uri.utf8().get_data());
return env->CallIntMethod(godot_io_instance, _open_URI, jStr) ? ERR_CANT_OPEN : OK;
} else {
@@ -82,7 +82,7 @@ Error GodotIOJavaWrapper::open_uri(const String &p_uri) {
String GodotIOJavaWrapper::get_user_data_dir() {
if (_get_data_dir) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring s = (jstring)env->CallObjectMethod(godot_io_instance, _get_data_dir);
return jstring_to_string(s, env);
} else {
@@ -92,7 +92,7 @@ String GodotIOJavaWrapper::get_user_data_dir() {
String GodotIOJavaWrapper::get_locale() {
if (_get_locale) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring s = (jstring)env->CallObjectMethod(godot_io_instance, _get_locale);
return jstring_to_string(s, env);
} else {
@@ -102,7 +102,7 @@ String GodotIOJavaWrapper::get_locale() {
String GodotIOJavaWrapper::get_model() {
if (_get_model) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring s = (jstring)env->CallObjectMethod(godot_io_instance, _get_model);
return jstring_to_string(s, env);
} else {
@@ -112,7 +112,7 @@ String GodotIOJavaWrapper::get_model() {
int GodotIOJavaWrapper::get_screen_dpi() {
if (_get_screen_DPI) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
return env->CallIntMethod(godot_io_instance, _get_screen_DPI);
} else {
return 160;
@@ -121,7 +121,7 @@ int GodotIOJavaWrapper::get_screen_dpi() {
void GodotIOJavaWrapper::screen_get_usable_rect(int (&p_rect_xywh)[4]) {
if (_screen_get_usable_rect) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jintArray returnArray = (jintArray)env->CallObjectMethod(godot_io_instance, _screen_get_usable_rect);
ERR_FAIL_COND(env->GetArrayLength(returnArray) != 4);
jint *arrayBody = env->GetIntArrayElements(returnArray, JNI_FALSE);
@@ -134,7 +134,7 @@ void GodotIOJavaWrapper::screen_get_usable_rect(int (&p_rect_xywh)[4]) {
String GodotIOJavaWrapper::get_unique_id() {
if (_get_unique_id) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring s = (jstring)env->CallObjectMethod(godot_io_instance, _get_unique_id);
return jstring_to_string(s, env);
} else {
@@ -148,7 +148,7 @@ bool GodotIOJavaWrapper::has_vk() {
void GodotIOJavaWrapper::show_vk(const String &p_existing, bool p_multiline, int p_max_input_length, int p_cursor_start, int p_cursor_end) {
if (_show_keyboard) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring jStr = env->NewStringUTF(p_existing.utf8().get_data());
env->CallVoidMethod(godot_io_instance, _show_keyboard, jStr, p_multiline, p_max_input_length, p_cursor_start, p_cursor_end);
}
@@ -156,21 +156,21 @@ void GodotIOJavaWrapper::show_vk(const String &p_existing, bool p_multiline, int
void GodotIOJavaWrapper::hide_vk() {
if (_hide_keyboard) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(godot_io_instance, _hide_keyboard);
}
}
void GodotIOJavaWrapper::set_screen_orientation(int p_orient) {
if (_set_screen_orientation) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(godot_io_instance, _set_screen_orientation, p_orient);
}
}
int GodotIOJavaWrapper::get_screen_orientation() {
if (_get_screen_orientation) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
return env->CallIntMethod(godot_io_instance, _get_screen_orientation);
} else {
return 0;
@@ -179,7 +179,7 @@ int GodotIOJavaWrapper::get_screen_orientation() {
String GodotIOJavaWrapper::get_system_dir(int p_dir) {
if (_get_system_dir) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring s = (jstring)env->CallObjectMethod(godot_io_instance, _get_system_dir, p_dir);
return jstring_to_string(s, env);
} else {
@@ -187,14 +187,14 @@ String GodotIOJavaWrapper::get_system_dir(int p_dir) {
}
}
-// volatile because it can be changed from non-main thread and we need to
+// SafeNumeric 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;
+static SafeNumeric<int> virtual_keyboard_height;
int GodotIOJavaWrapper::get_vk_height() {
- return virtual_keyboard_height;
+ return virtual_keyboard_height.get();
}
void GodotIOJavaWrapper::set_vk_height(int p_height) {
- virtual_keyboard_height = p_height;
+ virtual_keyboard_height.set(p_height);
}
diff --git a/platform/android/java_godot_lib_jni.cpp b/platform/android/java_godot_lib_jni.cpp
index e3a4ce63ef..bb22162879 100644
--- a/platform/android/java_godot_lib_jni.cpp
+++ b/platform/android/java_godot_lib_jni.cpp
@@ -87,7 +87,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
godot_java = new GodotJavaWrapper(env, activity, godot_instance);
godot_io_java = new GodotIOJavaWrapper(env, godot_java->get_member_object("io", "Lorg/godotengine/godot/GodotIO;", env));
- ThreadAndroid::make_default(jvm);
+ init_thread_jandroid(jvm, env);
jobject amgr = env->NewGlobalRef(p_asset_manager);
@@ -119,7 +119,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_ondestroy(JNIEnv *env
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jclass clazz, jobjectArray p_cmdline) {
- ThreadAndroid::setup_thread();
+ setup_android_thread();
const char **cmdline = nullptr;
jstring *j_cmdline = nullptr;
@@ -206,7 +206,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jcl
return;
if (step == 0) {
- // Since Godot is initialized on the UI thread, _main_thread_id was set to that thread's id,
+ // Since Godot is initialized on the UI thread, main_thread_id was set to that thread's id,
// but for Godot purposes, the main thread is the one running the game loop
Main::setup2(Thread::get_caller_id());
++step;
@@ -382,7 +382,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusout(JNIEnv *env,
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_audio(JNIEnv *env, jclass clazz) {
- ThreadAndroid::setup_thread();
+ setup_android_thread();
AudioDriverAndroid::thread_func(env);
}
diff --git a/platform/android/java_godot_view_wrapper.cpp b/platform/android/java_godot_view_wrapper.cpp
index cb26c7b8c5..5b638300ef 100644
--- a/platform/android/java_godot_view_wrapper.cpp
+++ b/platform/android/java_godot_view_wrapper.cpp
@@ -33,7 +33,7 @@
#include "thread_jandroid.h"
GodotJavaViewWrapper::GodotJavaViewWrapper(jobject godot_view) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
_godot_view = env->NewGlobalRef(godot_view);
@@ -47,20 +47,20 @@ GodotJavaViewWrapper::GodotJavaViewWrapper(jobject godot_view) {
void GodotJavaViewWrapper::request_pointer_capture() {
if (_request_pointer_capture != 0) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(_godot_view, _request_pointer_capture);
}
}
void GodotJavaViewWrapper::release_pointer_capture() {
if (_request_pointer_capture != 0) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(_godot_view, _release_pointer_capture);
}
}
GodotJavaViewWrapper::~GodotJavaViewWrapper() {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->DeleteGlobalRef(_godot_view);
env->DeleteGlobalRef(_cls);
}
diff --git a/platform/android/java_godot_wrapper.cpp b/platform/android/java_godot_wrapper.cpp
index c4e7f272d3..759980373a 100644
--- a/platform/android/java_godot_wrapper.cpp
+++ b/platform/android/java_godot_wrapper.cpp
@@ -33,7 +33,7 @@
// JNIEnv is only valid within the thread it belongs to, in a multi threading environment
// we can't cache it.
// For Godot we call most access methods from our thread and we thus get a valid JNIEnv
-// from ThreadAndroid. For one or two we expect to pass the environment
+// from get_jni_env(). For one or two we expect to pass the environment
// TODO we could probably create a base class for this...
@@ -91,7 +91,7 @@ jobject GodotJavaWrapper::get_activity() {
jobject GodotJavaWrapper::get_member_object(const char *p_name, const char *p_class, JNIEnv *p_env) {
if (godot_class) {
if (p_env == nullptr)
- p_env = ThreadAndroid::get_env();
+ p_env = get_jni_env();
jfieldID fid = p_env->GetStaticFieldID(godot_class, p_name, p_class);
return p_env->GetStaticObjectField(godot_class, fid);
@@ -102,7 +102,7 @@ jobject GodotJavaWrapper::get_member_object(const char *p_name, const char *p_cl
jobject GodotJavaWrapper::get_class_loader() {
if (_get_class_loader) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
return env->CallObjectMethod(activity, _get_class_loader);
} else {
return nullptr;
@@ -113,7 +113,7 @@ GodotJavaViewWrapper *GodotJavaWrapper::get_godot_view() {
if (_godot_view != nullptr) {
return _godot_view;
}
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jmethodID godot_view_getter = env->GetMethodID(godot_class, "getRenderView", "()Lorg/godotengine/godot/GodotRenderView;");
_godot_view = new GodotJavaViewWrapper(env->CallObjectMethod(godot_instance, godot_view_getter));
return _godot_view;
@@ -122,7 +122,7 @@ GodotJavaViewWrapper *GodotJavaWrapper::get_godot_view() {
void GodotJavaWrapper::on_video_init(JNIEnv *p_env) {
if (_on_video_init)
if (p_env == nullptr)
- p_env = ThreadAndroid::get_env();
+ p_env = get_jni_env();
p_env->CallVoidMethod(godot_instance, _on_video_init);
}
@@ -130,7 +130,7 @@ void GodotJavaWrapper::on_video_init(JNIEnv *p_env) {
void GodotJavaWrapper::on_godot_main_loop_started(JNIEnv *p_env) {
if (_on_godot_main_loop_started) {
if (p_env == nullptr) {
- p_env = ThreadAndroid::get_env();
+ p_env = get_jni_env();
}
}
p_env->CallVoidMethod(godot_instance, _on_godot_main_loop_started);
@@ -139,7 +139,7 @@ void GodotJavaWrapper::on_godot_main_loop_started(JNIEnv *p_env) {
void GodotJavaWrapper::restart(JNIEnv *p_env) {
if (_restart)
if (p_env == nullptr)
- p_env = ThreadAndroid::get_env();
+ p_env = get_jni_env();
p_env->CallVoidMethod(godot_instance, _restart);
}
@@ -147,21 +147,21 @@ void GodotJavaWrapper::restart(JNIEnv *p_env) {
void GodotJavaWrapper::force_quit(JNIEnv *p_env) {
if (_finish)
if (p_env == nullptr)
- p_env = ThreadAndroid::get_env();
+ p_env = get_jni_env();
p_env->CallVoidMethod(godot_instance, _finish);
}
void GodotJavaWrapper::set_keep_screen_on(bool p_enabled) {
if (_set_keep_screen_on) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(godot_instance, _set_keep_screen_on, p_enabled);
}
}
void GodotJavaWrapper::alert(const String &p_message, const String &p_title) {
if (_alert) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring jStrMessage = env->NewStringUTF(p_message.utf8().get_data());
jstring jStrTitle = env->NewStringUTF(p_title.utf8().get_data());
env->CallVoidMethod(godot_instance, _alert, jStrMessage, jStrTitle);
@@ -169,7 +169,7 @@ void GodotJavaWrapper::alert(const String &p_message, const String &p_title) {
}
int GodotJavaWrapper::get_gles_version_code() {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
if (_get_GLES_version_code) {
return env->CallIntMethod(godot_instance, _get_GLES_version_code);
}
@@ -183,7 +183,7 @@ bool GodotJavaWrapper::has_get_clipboard() {
String GodotJavaWrapper::get_clipboard() {
if (_get_clipboard) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring s = (jstring)env->CallObjectMethod(godot_instance, _get_clipboard);
return jstring_to_string(s, env);
} else {
@@ -193,7 +193,7 @@ String GodotJavaWrapper::get_clipboard() {
String GodotJavaWrapper::get_input_fallback_mapping() {
if (_get_input_fallback_mapping) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring fallback_mapping = (jstring)env->CallObjectMethod(godot_instance, _get_input_fallback_mapping);
return jstring_to_string(fallback_mapping, env);
} else {
@@ -207,7 +207,7 @@ bool GodotJavaWrapper::has_set_clipboard() {
void GodotJavaWrapper::set_clipboard(const String &p_text) {
if (_set_clipboard) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring jStr = env->NewStringUTF(p_text.utf8().get_data());
env->CallVoidMethod(godot_instance, _set_clipboard, jStr);
}
@@ -215,7 +215,7 @@ void GodotJavaWrapper::set_clipboard(const String &p_text) {
bool GodotJavaWrapper::request_permission(const String &p_name) {
if (_request_permission) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jstring jStrName = env->NewStringUTF(p_name.utf8().get_data());
return env->CallBooleanMethod(godot_instance, _request_permission, jStrName);
} else {
@@ -225,7 +225,7 @@ bool GodotJavaWrapper::request_permission(const String &p_name) {
bool GodotJavaWrapper::request_permissions() {
if (_request_permissions) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
return env->CallBooleanMethod(godot_instance, _request_permissions);
} else {
return false;
@@ -235,7 +235,7 @@ bool GodotJavaWrapper::request_permissions() {
Vector<String> GodotJavaWrapper::get_granted_permissions() const {
Vector<String> permissions_list;
if (_get_granted_permissions) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
jobject permissions_object = env->CallObjectMethod(godot_instance, _get_granted_permissions);
jobjectArray *arr = reinterpret_cast<jobjectArray *>(&permissions_object);
@@ -253,14 +253,14 @@ Vector<String> GodotJavaWrapper::get_granted_permissions() const {
void GodotJavaWrapper::init_input_devices() {
if (_init_input_devices) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(godot_instance, _init_input_devices);
}
}
jobject GodotJavaWrapper::get_surface() {
if (_get_surface) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
return env->CallObjectMethod(godot_instance, _get_surface);
} else {
return nullptr;
@@ -269,7 +269,7 @@ jobject GodotJavaWrapper::get_surface() {
bool GodotJavaWrapper::is_activity_resumed() {
if (_is_activity_resumed) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
return env->CallBooleanMethod(godot_instance, _is_activity_resumed);
} else {
return false;
@@ -278,7 +278,7 @@ bool GodotJavaWrapper::is_activity_resumed() {
void GodotJavaWrapper::vibrate(int p_duration_ms) {
if (_vibrate) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(godot_instance, _vibrate, p_duration_ms);
}
}
diff --git a/platform/android/net_socket_android.cpp b/platform/android/net_socket_android.cpp
index ba7b3d3775..ddc2368793 100644
--- a/platform/android/net_socket_android.cpp
+++ b/platform/android/net_socket_android.cpp
@@ -38,7 +38,7 @@ jmethodID NetSocketAndroid::_multicast_lock_acquire = 0;
jmethodID NetSocketAndroid::_multicast_lock_release = 0;
void NetSocketAndroid::setup(jobject p_net_utils) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
net_utils = env->NewGlobalRef(p_net_utils);
@@ -51,14 +51,14 @@ void NetSocketAndroid::setup(jobject p_net_utils) {
void NetSocketAndroid::multicast_lock_acquire() {
if (_multicast_lock_acquire) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(net_utils, _multicast_lock_acquire);
}
}
void NetSocketAndroid::multicast_lock_release() {
if (_multicast_lock_release) {
- JNIEnv *env = ThreadAndroid::get_env();
+ JNIEnv *env = get_jni_env();
env->CallVoidMethod(net_utils, _multicast_lock_release);
}
}
diff --git a/platform/android/plugin/godot_plugin_jni.cpp b/platform/android/plugin/godot_plugin_jni.cpp
index f602e99e61..ba3e9fa20f 100644
--- a/platform/android/plugin/godot_plugin_jni.cpp
+++ b/platform/android/plugin/godot_plugin_jni.cpp
@@ -41,7 +41,7 @@ static HashMap<String, JNISingleton *> jni_singletons;
extern "C" {
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSingleton(JNIEnv *env, jobject obj, jstring name) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSingleton(JNIEnv *env, jclass clazz, jstring name, jobject obj) {
String singname = jstring_to_string(name, env);
JNISingleton *s = (JNISingleton *)ClassDB::instance("JNISingleton");
s->set_instance(env->NewGlobalRef(obj));
@@ -51,7 +51,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis
ProjectSettings::get_singleton()->set(singname, s);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterMethod(JNIEnv *env, jobject obj, jstring sname, jstring name, jstring ret, jobjectArray args) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterMethod(JNIEnv *env, jclass clazz, jstring sname, jstring name, jstring ret, jobjectArray args) {
String singname = jstring_to_string(sname, env);
ERR_FAIL_COND(!jni_singletons.has(singname));
@@ -83,7 +83,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis
s->add_method(mname, mid, types, get_jni_type(retval));
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSignal(JNIEnv *env, jobject obj, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_param_types) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSignal(JNIEnv *env, jclass clazz, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_param_types) {
String singleton_name = jstring_to_string(j_plugin_name, env);
ERR_FAIL_COND(!jni_singletons.has(singleton_name));
@@ -104,7 +104,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis
singleton->add_signal(signal_name, types);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitSignal(JNIEnv *env, jobject obj, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_params) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitSignal(JNIEnv *env, jclass clazz, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_params) {
String singleton_name = jstring_to_string(j_plugin_name, env);
ERR_FAIL_COND(!jni_singletons.has(singleton_name));
@@ -129,7 +129,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitS
singleton->emit_signal(signal_name, args, count);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jobject obj, jobjectArray gdnlib_paths) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jclass clazz, jobjectArray gdnlib_paths) {
int gdnlib_count = env->GetArrayLength(gdnlib_paths);
if (gdnlib_count == 0) {
return;
diff --git a/platform/android/plugin/godot_plugin_jni.h b/platform/android/plugin/godot_plugin_jni.h
index 8a08ec3709..b87f922e03 100644
--- a/platform/android/plugin/godot_plugin_jni.h
+++ b/platform/android/plugin/godot_plugin_jni.h
@@ -35,11 +35,11 @@
#include <jni.h>
extern "C" {
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSingleton(JNIEnv *env, jobject obj, jstring name);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterMethod(JNIEnv *env, jobject obj, jstring sname, jstring name, jstring ret, jobjectArray args);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSignal(JNIEnv *env, jobject obj, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_param_types);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitSignal(JNIEnv *env, jobject obj, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_params);
-JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jobject obj, jobjectArray gdnlib_paths);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSingleton(JNIEnv *env, jclass clazz, jstring name, jobject obj);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterMethod(JNIEnv *env, jclass clazz, jstring sname, jstring name, jstring ret, jobjectArray args);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSignal(JNIEnv *env, jclass clazz, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_param_types);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitSignal(JNIEnv *env, jclass clazz, jstring j_plugin_name, jstring j_signal_name, jobjectArray j_signal_params);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jclass clazz, jobjectArray gdnlib_paths);
}
#endif // GODOT_PLUGIN_JNI_H
diff --git a/platform/android/string_android.h b/platform/android/string_android.h
index 25c6f749d4..3721315d3f 100644
--- a/platform/android/string_android.h
+++ b/platform/android/string_android.h
@@ -37,14 +37,14 @@
/**
* 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().
+ * @param env JNI environment instance. If null obtained by get_jni_env().
* @return Godot string instance.
*/
static inline String jstring_to_string(jstring source, JNIEnv *env = nullptr) {
String result;
if (source) {
if (!env) {
- env = ThreadAndroid::get_env();
+ env = get_jni_env();
}
const char *const source_utf8 = env->GetStringUTFChars(source, nullptr);
if (source_utf8) {
diff --git a/platform/android/thread_jandroid.cpp b/platform/android/thread_jandroid.cpp
index cb3527067f..afcc7294f2 100644
--- a/platform/android/thread_jandroid.cpp
+++ b/platform/android/thread_jandroid.cpp
@@ -30,116 +30,29 @@
#include "thread_jandroid.h"
-#include "core/object/script_language.h"
-#include "core/os/memory.h"
-#include "core/templates/safe_refcount.h"
+#include "core/os/thread.h"
-static void _thread_id_key_destr_callback(void *p_value) {
- memdelete(static_cast<Thread::ID *>(p_value));
-}
-
-static pthread_key_t _create_thread_id_key() {
- pthread_key_t key;
- pthread_key_create(&key, &_thread_id_key_destr_callback);
- return key;
-}
-
-pthread_key_t ThreadAndroid::thread_id_key = _create_thread_id_key();
-Thread::ID ThreadAndroid::next_thread_id = 0;
-
-Thread::ID ThreadAndroid::get_id() const {
- return id;
-}
-
-Thread *ThreadAndroid::create_thread_jandroid() {
- return memnew(ThreadAndroid);
-}
-
-void *ThreadAndroid::thread_callback(void *userdata) {
- ThreadAndroid *t = reinterpret_cast<ThreadAndroid *>(userdata);
- setup_thread();
- ScriptServer::thread_enter(); //scripts may need to attach a stack
- t->id = atomic_increment(&next_thread_id);
- pthread_setspecific(thread_id_key, (void *)memnew(ID(t->id)));
- t->callback(t->user);
- ScriptServer::thread_exit();
- return nullptr;
-}
-
-Thread *ThreadAndroid::create_func_jandroid(ThreadCreateCallback p_callback, void *p_user, const Settings &) {
- ThreadAndroid *tr = memnew(ThreadAndroid);
- tr->callback = p_callback;
- tr->user = p_user;
- pthread_attr_init(&tr->pthread_attr);
- pthread_attr_setdetachstate(&tr->pthread_attr, PTHREAD_CREATE_JOINABLE);
-
- pthread_create(&tr->pthread, &tr->pthread_attr, thread_callback, tr);
-
- return tr;
-}
+static JavaVM *java_vm = nullptr;
+static thread_local JNIEnv *env = nullptr;
-Thread::ID ThreadAndroid::get_thread_id_func_jandroid() {
- void *value = pthread_getspecific(thread_id_key);
-
- if (value)
- return *static_cast<ID *>(value);
-
- ID new_id = atomic_increment(&next_thread_id);
- pthread_setspecific(thread_id_key, (void *)memnew(ID(new_id)));
- return new_id;
-}
-
-void ThreadAndroid::wait_to_finish_func_jandroid(Thread *p_thread) {
- ThreadAndroid *tp = static_cast<ThreadAndroid *>(p_thread);
- ERR_FAIL_COND(!tp);
- ERR_FAIL_COND(tp->pthread == 0);
-
- pthread_join(tp->pthread, nullptr);
- tp->pthread = 0;
-}
-
-void ThreadAndroid::_thread_destroyed(void *value) {
- /* The thread is being destroyed, detach it from the Java VM and set the mThreadKey value to NULL as required */
- JNIEnv *env = (JNIEnv *)value;
- if (env != nullptr) {
- java_vm->DetachCurrentThread();
- pthread_setspecific(jvm_key, nullptr);
- }
-}
-
-pthread_key_t ThreadAndroid::jvm_key;
-JavaVM *ThreadAndroid::java_vm = nullptr;
-
-void ThreadAndroid::setup_thread() {
- if (pthread_getspecific(jvm_key))
- return; //already setup
- JNIEnv *env;
+static void init_thread() {
java_vm->AttachCurrentThread(&env, nullptr);
- pthread_setspecific(jvm_key, (void *)env);
}
-void ThreadAndroid::make_default(JavaVM *p_java_vm) {
- java_vm = p_java_vm;
- create_func = create_func_jandroid;
- get_thread_id_func = get_thread_id_func_jandroid;
- wait_to_finish_func = wait_to_finish_func_jandroid;
- pthread_key_create(&jvm_key, _thread_destroyed);
- setup_thread();
+static void term_thread() {
+ java_vm->DetachCurrentThread();
}
-JNIEnv *ThreadAndroid::get_env() {
- if (!pthread_getspecific(jvm_key)) {
- setup_thread();
- }
-
- JNIEnv *env = nullptr;
- java_vm->AttachCurrentThread(&env, nullptr);
- return env;
+void init_thread_jandroid(JavaVM *p_jvm, JNIEnv *p_env) {
+ java_vm = p_jvm;
+ env = p_env;
+ Thread::_set_platform_funcs(nullptr, nullptr, &init_thread, &term_thread);
}
-ThreadAndroid::ThreadAndroid() {
- pthread = 0;
+void setup_android_thread() {
+ init_thread();
}
-ThreadAndroid::~ThreadAndroid() {
+JNIEnv *get_jni_env() {
+ return env;
}
diff --git a/platform/android/thread_jandroid.h b/platform/android/thread_jandroid.h
index c37e2d740e..ff13ae911f 100644
--- a/platform/android/thread_jandroid.h
+++ b/platform/android/thread_jandroid.h
@@ -28,46 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef THREAD_POSIX_H
-#define THREAD_POSIX_H
+#ifndef THREAD_JANDROID_H
+#define THREAD_JANDROID_H
-#include "core/os/thread.h"
#include <jni.h>
-#include <pthread.h>
-#include <sys/types.h>
-class ThreadAndroid : public Thread {
- static pthread_key_t thread_id_key;
- static ID next_thread_id;
+void init_thread_jandroid(JavaVM *p_jvm, JNIEnv *p_env);
- pthread_t pthread;
- pthread_attr_t pthread_attr;
- ThreadCreateCallback callback;
- void *user;
- ID id;
-
- static Thread *create_thread_jandroid();
-
- static void *thread_callback(void *userdata);
-
- static Thread *create_func_jandroid(ThreadCreateCallback p_callback, void *, const Settings &);
- static ID get_thread_id_func_jandroid();
- static void wait_to_finish_func_jandroid(Thread *p_thread);
-
- static void _thread_destroyed(void *value);
- ThreadAndroid();
-
- static pthread_key_t jvm_key;
- static JavaVM *java_vm;
-
-public:
- virtual ID get_id() const;
-
- static void make_default(JavaVM *p_java_vm);
- static void setup_thread();
- static JNIEnv *get_env();
-
- ~ThreadAndroid();
-};
+void setup_android_thread();
+JNIEnv *get_jni_env();
#endif
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index ad4af9ba6a..17796beb6f 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -34,6 +34,7 @@ def get_opts():
" validation layers)",
False,
),
+ BoolVariable("ios_simulator", "Build for iOS Simulator", False),
BoolVariable("ios_exceptions", "Enable exceptions", False),
("ios_triple", "Triple for ios toolchain", ""),
]
@@ -107,8 +108,17 @@ def configure(env):
## Compile flags
- if env["arch"] == "x86" or env["arch"] == "x86_64":
+ if env["ios_simulator"]:
detect_darwin_sdk_path("iphonesimulator", env)
+ env.Append(CCFLAGS=["-mios-simulator-version-min=13.0"])
+ env.Append(LINKFLAGS=["-mios-simulator-version-min=13.0"])
+ env.extra_suffix = ".simulator" + env.extra_suffix
+ else:
+ detect_darwin_sdk_path("iphone", env)
+ env.Append(CCFLAGS=["-miphoneos-version-min=11.0"])
+ env.Append(LINKFLAGS=["-miphoneos-version-min=11.0"])
+
+ if env["arch"] == "x86" or env["arch"] == "x86_64":
env["ENV"]["MACOSX_DEPLOYMENT_TARGET"] = "10.9"
arch_flag = "i386" if env["arch"] == "x86" else env["arch"]
env.Append(
@@ -116,11 +126,10 @@ def configure(env):
"-fobjc-arc -arch "
+ arch_flag
+ " -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fblocks"
- " -fasm-blocks -isysroot $IPHONESDK -mios-simulator-version-min=13.0"
+ " -fasm-blocks -isysroot $IPHONESDK"
).split()
)
elif env["arch"] == "arm":
- detect_darwin_sdk_path("iphone", env)
env.Append(
CCFLAGS=(
"-fobjc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing"
@@ -128,16 +137,15 @@ def configure(env):
" -fpascal-strings -fblocks -isysroot $IPHONESDK -fvisibility=hidden -mthumb"
' "-DIBOutlet=__attribute__((iboutlet))"'
' "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))"'
- ' "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=11.0 -MMD -MT dependencies'.split()
+ ' "-DIBAction=void)__attribute__((ibaction)" -MMD -MT dependencies'.split()
)
)
elif env["arch"] == "arm64":
- detect_darwin_sdk_path("iphone", env)
env.Append(
CCFLAGS=(
"-fobjc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing"
" -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits"
- " -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -miphoneos-version-min=11.0"
+ " -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies"
" -isysroot $IPHONESDK".split()
)
)
@@ -162,7 +170,6 @@ def configure(env):
LINKFLAGS=[
"-arch",
arch_flag,
- "-mios-simulator-version-min=13.0",
"-isysroot",
"$IPHONESDK",
"-Xlinker",
@@ -173,46 +180,14 @@ def configure(env):
]
)
elif env["arch"] == "arm":
- env.Append(LINKFLAGS=["-arch", "armv7", "-Wl,-dead_strip", "-miphoneos-version-min=11.0"])
+ env.Append(LINKFLAGS=["-arch", "armv7", "-Wl,-dead_strip"])
if env["arch"] == "arm64":
- env.Append(LINKFLAGS=["-arch", "arm64", "-Wl,-dead_strip", "-miphoneos-version-min=11.0"])
+ env.Append(LINKFLAGS=["-arch", "arm64", "-Wl,-dead_strip"])
env.Append(
LINKFLAGS=[
"-isysroot",
"$IPHONESDK",
- "-framework",
- "AudioToolbox",
- "-framework",
- "AVFoundation",
- "-framework",
- "CoreAudio",
- "-framework",
- "CoreGraphics",
- "-framework",
- "CoreMedia",
- "-framework",
- "CoreVideo",
- "-framework",
- "CoreMotion",
- "-framework",
- "Foundation",
- "-framework",
- "GameController",
- "-framework",
- "MediaPlayer",
- "-framework",
- "Metal",
- "-framework",
- "QuartzCore",
- "-framework",
- "Security",
- "-framework",
- "SystemConfiguration",
- "-framework",
- "UIKit",
- "-framework",
- "ARKit",
]
)
diff --git a/platform/iphone/display_layer.mm b/platform/iphone/display_layer.mm
index fb57db4518..b8df81b89a 100644
--- a/platform/iphone/display_layer.mm
+++ b/platform/iphone/display_layer.mm
@@ -89,7 +89,7 @@
// FIXME: Add Vulkan support via MoltenVK. Add fallback code back?
// Create GL ES 2 context
- if (GLOBAL_GET("rendering/quality/driver/driver_name") == "GLES2") {
+ if (GLOBAL_GET("rendering/driver/driver_name") == "GLES2") {
context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
NSLog(@"Setting up an OpenGL ES 2.0 context.");
if (!context) {
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp
index d0c0ef7a4b..c585c2afbe 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/iphone/export/export.cpp
@@ -37,6 +37,7 @@
#include "core/io/zip_io.h"
#include "core/os/file_access.h"
#include "core/os/os.h"
+#include "core/templates/safe_refcount.h"
#include "core/version.h"
#include "editor/editor_export.h"
#include "editor/editor_node.h"
@@ -56,9 +57,9 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
Ref<ImageTexture> logo;
// Plugins
- volatile bool plugins_changed;
- Thread *check_for_changes_thread;
- volatile bool quit_request;
+ SafeFlag plugins_changed;
+ Thread check_for_changes_thread;
+ SafeFlag quit_request;
Mutex plugins_lock;
Vector<PluginConfigIOS> plugins;
@@ -141,19 +142,19 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
static void _check_for_changes_poll_thread(void *ud) {
EditorExportPlatformIOS *ea = (EditorExportPlatformIOS *)ud;
- while (!ea->quit_request) {
+ while (!ea->quit_request.is_set()) {
// Nothing to do if we already know the plugins have changed.
- if (!ea->plugins_changed) {
+ if (!ea->plugins_changed.is_set()) {
MutexLock lock(ea->plugins_lock);
Vector<PluginConfigIOS> loaded_plugins = get_plugins();
if (ea->plugins.size() != loaded_plugins.size()) {
- ea->plugins_changed = true;
+ ea->plugins_changed.set();
} else {
for (int i = 0; i < ea->plugins.size(); i++) {
if (ea->plugins[i].name != loaded_plugins[i].name || ea->plugins[i].last_updated != loaded_plugins[i].last_updated) {
- ea->plugins_changed = true;
+ ea->plugins_changed.set();
break;
}
}
@@ -165,7 +166,7 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
while (OS::get_singleton()->get_ticks_usec() - time < wait) {
OS::get_singleton()->delay_usec(300000);
- if (ea->quit_request) {
+ if (ea->quit_request.is_set()) {
break;
}
}
@@ -182,10 +183,10 @@ public:
virtual Ref<Texture2D> get_logo() const override { return logo; }
virtual bool should_update_export_options() override {
- bool export_options_changed = plugins_changed;
+ bool export_options_changed = plugins_changed.is_set();
if (export_options_changed) {
// don't clear unless we're reporting true, to avoid race
- plugins_changed = false;
+ plugins_changed.clear();
}
return export_options_changed;
}
@@ -291,7 +292,7 @@ public:
};
void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
- String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
+ String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
r_features->push_back("pvrtc");
if (driver == "Vulkan") {
// FIXME: Review if this is correct.
@@ -364,7 +365,7 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options)
for (int i = 0; i < found_plugins.size(); i++) {
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "plugins/" + found_plugins[i].name), false));
}
- plugins_changed = false;
+ plugins_changed.clear();
plugins = found_plugins;
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "capabilities/access_wifi"), false));
@@ -1351,6 +1352,8 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset>
Vector<String> added_embedded_dependenciy_names;
HashMap<String, String> plist_values;
+ Set<String> plugin_linker_flags;
+
Error err;
for (int i = 0; i < enabled_plugins.size(); i++) {
@@ -1417,6 +1420,13 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset>
p_config_data.capabilities.push_back(capability);
}
+ // Linker flags
+ // Checking duplicates
+ for (int j = 0; j < plugin.linker_flags.size(); j++) {
+ String linker_flag = plugin.linker_flags[j];
+ plugin_linker_flags.insert(linker_flag);
+ }
+
// Plist
// Using hash map container to remove duplicates
const String *K = nullptr;
@@ -1497,6 +1507,27 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset>
p_config_data.cpp_code += plugin_cpp_code.format(plugin_format, "$_");
}
+
+ // Update Linker Flag Values
+ {
+ String result_linker_flags = " ";
+ for (Set<String>::Element *E = plugin_linker_flags.front(); E; E = E->next()) {
+ const String &flag = E->get();
+
+ if (flag.length() == 0) {
+ continue;
+ }
+
+ if (result_linker_flags.length() > 0) {
+ result_linker_flags += ' ';
+ }
+
+ result_linker_flags += flag;
+ }
+ result_linker_flags = result_linker_flags.replace("\"", "\\\"");
+ p_config_data.linker_flags += result_linker_flags;
+ }
+
return OK;
}
@@ -1570,9 +1601,9 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
return ERR_SKIP;
}
- String library_to_use = "libgodot.iphone." + String(p_debug ? "debug" : "release") + ".fat.a";
+ String library_to_use = "libgodot.iphone." + String(p_debug ? "debug" : "release") + ".xcframework";
- print_line("Static library: " + library_to_use);
+ print_line("Static framework: " + library_to_use);
String pkg_name;
if (p_preset->get("application/name") != "") {
pkg_name = p_preset->get("application/name"); // app_name
@@ -1658,7 +1689,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
if (files_to_parse.has(file)) {
_fix_config_file(p_preset, data, config_data, p_debug);
} else if (file.begins_with("libgodot.iphone")) {
- if (file != library_to_use) {
+ if (!file.begins_with(library_to_use) || file.ends_with(String("/empty"))) {
ret = unzGoToNextFile(src_pkg_zip);
continue; //ignore!
}
@@ -1666,7 +1697,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
#if defined(OSX_ENABLED) || defined(X11_ENABLED)
is_execute = true;
#endif
- file = "godot_ios.a";
+ file = file.replace(library_to_use, binary_name + ".xcframework");
}
if (file == project_file) {
@@ -1937,16 +1968,14 @@ EditorExportPlatformIOS::EditorExportPlatformIOS() {
logo.instance();
logo->create_from_image(img);
- plugins_changed = true;
- quit_request = false;
+ plugins_changed.set();
- check_for_changes_thread = Thread::create(_check_for_changes_poll_thread, this);
+ check_for_changes_thread.start(_check_for_changes_poll_thread, this);
}
EditorExportPlatformIOS::~EditorExportPlatformIOS() {
- quit_request = true;
- Thread::wait_to_finish(check_for_changes_thread);
- memdelete(check_for_changes_thread);
+ quit_request.set();
+ check_for_changes_thread.wait_to_finish();
}
void register_iphone_exporter() {
diff --git a/platform/iphone/godot_app_delegate.m b/platform/iphone/godot_app_delegate.m
index 7b9cf7893c..3ce9bffc79 100644
--- a/platform/iphone/godot_app_delegate.m
+++ b/platform/iphone/godot_app_delegate.m
@@ -302,37 +302,7 @@ static NSMutableArray<ApplicationDelegateService *> *services = nil;
// MARK: Remote Notification
-- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
- for (ApplicationDelegateService *service in services) {
- if (![service respondsToSelector:_cmd]) {
- continue;
- }
-
- [service application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
- }
-}
-
-- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
- for (ApplicationDelegateService *service in services) {
- if (![service respondsToSelector:_cmd]) {
- continue;
- }
-
- [service application:application didFailToRegisterForRemoteNotificationsWithError:error];
- }
-}
-
-- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
- for (ApplicationDelegateService *service in services) {
- if (![service respondsToSelector:_cmd]) {
- continue;
- }
-
- [service application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
- }
-
- completionHandler(UIBackgroundFetchResultNoData);
-}
+// Moved to the iOS Plugin
// MARK: User Activity and Handling Quick Actions
diff --git a/platform/iphone/godot_view.h b/platform/iphone/godot_view.h
index 29960c47a8..265f826173 100644
--- a/platform/iphone/godot_view.h
+++ b/platform/iphone/godot_view.h
@@ -32,12 +32,20 @@
class String;
+@class GodotView;
@protocol DisplayLayer;
@protocol GodotViewRendererProtocol;
+@protocol GodotViewDelegate
+
+- (BOOL)godotViewFinishedSetup:(GodotView *)view;
+
+@end
+
@interface GodotView : UIView
@property(assign, nonatomic) id<GodotViewRendererProtocol> renderer;
+@property(assign, nonatomic) id<GodotViewDelegate> delegate;
@property(assign, readonly, nonatomic) BOOL isActive;
diff --git a/platform/iphone/godot_view.mm b/platform/iphone/godot_view.mm
index bf073ae295..887297848e 100644
--- a/platform/iphone/godot_view.mm
+++ b/platform/iphone/godot_view.mm
@@ -120,6 +120,7 @@ static const int max_touches = 8;
[self stopRendering];
self.renderer = nil;
+ self.delegate = nil;
if (self.renderingLayer) {
[self.renderingLayer removeFromSuperlayer];
@@ -241,6 +242,14 @@ static const int max_touches = 8;
return;
}
+ if (self.delegate) {
+ BOOL delegateFinishedSetup = [self.delegate godotViewFinishedSetup:self];
+
+ if (!delegateFinishedSetup) {
+ return;
+ }
+ }
+
[self handleMotion];
[self.renderer renderOnView:self];
}
diff --git a/platform/iphone/os_iphone.mm b/platform/iphone/os_iphone.mm
index 625cbf178e..51c4da2960 100644
--- a/platform/iphone/os_iphone.mm
+++ b/platform/iphone/os_iphone.mm
@@ -144,8 +144,6 @@ void OSIPhone::deinitialize_modules() {
}
void OSIPhone::set_main_loop(MainLoop *p_main_loop) {
- godot_ios_plugins_initialize();
-
main_loop = p_main_loop;
if (main_loop) {
@@ -179,6 +177,8 @@ bool OSIPhone::iterate() {
}
void OSIPhone::start() {
+ godot_ios_plugins_initialize();
+
Main::start();
if (joypad_iphone) {
diff --git a/platform/iphone/plugin/godot_plugin_config.h b/platform/iphone/plugin/godot_plugin_config.h
index 72fab13600..f4e30c8349 100644
--- a/platform/iphone/plugin/godot_plugin_config.h
+++ b/platform/iphone/plugin/godot_plugin_config.h
@@ -66,6 +66,7 @@ struct PluginConfigIOS {
inline static const char *DEPENDENCIES_SYSTEM_KEY = "system";
inline static const char *DEPENDENCIES_CAPABILITIES_KEY = "capabilities";
inline static const char *DEPENDENCIES_FILES_KEY = "files";
+ inline static const char *DEPENDENCIES_LINKER_FLAGS = "linker_flags";
inline static const char *PLIST_SECTION = "plist";
@@ -89,6 +90,8 @@ struct PluginConfigIOS {
Vector<String> files_to_copy;
Vector<String> capabilities;
+ Vector<String> linker_flags;
+
// Optional plist section
// Supports only string types for now
HashMap<String, String> plist;
@@ -260,6 +263,8 @@ static inline PluginConfigIOS load_plugin_config(Ref<ConfigFile> config_file, co
plugin_config.files_to_copy = resolve_local_dependencies(config_base_dir, files);
plugin_config.capabilities = config_file->get_value(PluginConfigIOS::DEPENDENCIES_SECTION, PluginConfigIOS::DEPENDENCIES_CAPABILITIES_KEY, Vector<String>());
+
+ plugin_config.linker_flags = config_file->get_value(PluginConfigIOS::DEPENDENCIES_SECTION, PluginConfigIOS::DEPENDENCIES_LINKER_FLAGS, Vector<String>());
}
if (config_file->has_section(PluginConfigIOS::PLIST_SECTION)) {
diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm
index c41aa13bb7..6cef244567 100644
--- a/platform/iphone/view_controller.mm
+++ b/platform/iphone/view_controller.mm
@@ -40,12 +40,14 @@
#import <AVFoundation/AVFoundation.h>
#import <GameController/GameController.h>
-@interface ViewController ()
+@interface ViewController () <GodotViewDelegate>
@property(strong, nonatomic) GodotViewRenderer *renderer;
@property(strong, nonatomic) GodotNativeVideoView *videoView;
@property(strong, nonatomic) GodotKeyboardInputView *keyboardView;
+@property(strong, nonatomic) UIView *godotLoadingOverlay;
+
@end
@implementation ViewController
@@ -62,6 +64,7 @@
self.view = view;
view.renderer = self.renderer;
+ view.delegate = self;
}
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
@@ -97,6 +100,7 @@
[super viewDidLoad];
[self observeKeyboard];
+ [self displayLoadingOverlay];
if (@available(iOS 11.0, *)) {
[self setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
@@ -121,6 +125,31 @@
object:nil];
}
+- (void)displayLoadingOverlay {
+ NSBundle *bundle = [NSBundle mainBundle];
+ NSString *storyboardName = @"Launch Screen";
+
+ if ([bundle pathForResource:storyboardName ofType:@"storyboardc"] == nil) {
+ return;
+ }
+
+ UIStoryboard *launchStoryboard = [UIStoryboard storyboardWithName:storyboardName bundle:bundle];
+
+ UIViewController *controller = [launchStoryboard instantiateInitialViewController];
+ self.godotLoadingOverlay = controller.view;
+ self.godotLoadingOverlay.frame = self.view.bounds;
+ self.godotLoadingOverlay.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
+
+ [self.view addSubview:self.godotLoadingOverlay];
+}
+
+- (BOOL)godotViewFinishedSetup:(GodotView *)view {
+ [self.godotLoadingOverlay removeFromSuperview];
+ self.godotLoadingOverlay = nil;
+
+ return YES;
+}
+
- (void)dealloc {
[self.videoView stopVideo];
@@ -130,6 +159,11 @@
self.renderer = nil;
+ if (self.godotLoadingOverlay) {
+ [self.godotLoadingOverlay removeFromSuperview];
+ self.godotLoadingOverlay = nil;
+ }
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
diff --git a/platform/javascript/SCsub b/platform/javascript/SCsub
index b0302a5f88..11a45d2811 100644
--- a/platform/javascript/SCsub
+++ b/platform/javascript/SCsub
@@ -42,8 +42,6 @@ if env["gdnative_enabled"]:
sys_env["LIBS"] = []
# We use IDBFS. Since Emscripten 1.39.1 it needs to be linked explicitly.
sys_env.Append(LIBS=["idbfs.js"])
- # JS prepended to the module code loading the side library.
- sys_env.Append(LINKFLAGS=["--pre-js", sys_env.File("js/dynlink.pre.js")])
# Configure it as a main module (dynamic linking support).
sys_env.Append(CCFLAGS=["-s", "MAIN_MODULE=1"])
sys_env.Append(LINKFLAGS=["-s", "MAIN_MODULE=1"])
@@ -53,7 +51,6 @@ if env["gdnative_enabled"]:
sys_env["ENV"]["EMCC_FORCE_STDLIBS"] = "libc,libc++,libc++abi"
# The main emscripten runtime, with exported standard libraries.
sys = sys_env.Program(build_targets, ["javascript_runtime.cpp"])
- sys_env.Depends(sys, "js/dynlink.pre.js")
# The side library, containing all Godot code.
wasm_env = env.Clone()
@@ -97,7 +94,13 @@ out_files = [
zip_dir.File(binary_name + ".html"),
zip_dir.File(binary_name + ".audio.worklet.js"),
]
-html_file = "#misc/dist/html/editor.html" if env["tools"] else "#misc/dist/html/full-size.html"
+html_file = "#misc/dist/html/full-size.html"
+if env["tools"]:
+ subst_dict = {"\$GODOT_VERSION": env.GetBuildVersion()}
+ html_file = env.Substfile(
+ target="#bin/godot${PROGSUFFIX}.html", source="#misc/dist/html/editor.html", SUBST_DICT=subst_dict
+ )
+
in_files = [js_wrapped, build[1], html_file, "#platform/javascript/js/libs/audio.worklet.js"]
if env["gdnative_enabled"]:
in_files.append(build[2]) # Runtime
diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp
index 6395fdf721..478e848675 100644
--- a/platform/javascript/audio_driver_javascript.cpp
+++ b/platform/javascript/audio_driver_javascript.cpp
@@ -105,8 +105,8 @@ void AudioDriverJavaScript::_audio_driver_capture(int p_from, int p_samples) {
}
Error AudioDriverJavaScript::init() {
- mix_rate = GLOBAL_GET("audio/mix_rate");
- int latency = GLOBAL_GET("audio/output_latency");
+ mix_rate = GLOBAL_GET("audio/driver/mix_rate");
+ int latency = GLOBAL_GET("audio/driver/output_latency");
channel_count = godot_audio_init(mix_rate, latency, &_state_change_callback, &_latency_update_callback);
buffer_length = closest_power_of_2((latency * mix_rate / 1000));
@@ -267,7 +267,7 @@ int AudioDriverJavaScript::WorkletNode::create(int p_buffer_size, int p_channels
void AudioDriverJavaScript::WorkletNode::start(float *p_out_buf, int p_out_buf_size, float *p_in_buf, int p_in_buf_size) {
godot_audio_worklet_start(p_in_buf, p_in_buf_size, p_out_buf, p_out_buf_size, state);
- thread = Thread::create(_audio_thread_func, this);
+ thread.start(_audio_thread_func, this);
}
void AudioDriverJavaScript::WorkletNode::lock() {
@@ -280,8 +280,6 @@ void AudioDriverJavaScript::WorkletNode::unlock() {
void AudioDriverJavaScript::WorkletNode::finish() {
quit = true; // Ask thread to quit.
- Thread::wait_to_finish(thread);
- memdelete(thread);
- thread = nullptr;
+ thread.wait_to_finish();
}
#endif
diff --git a/platform/javascript/audio_driver_javascript.h b/platform/javascript/audio_driver_javascript.h
index d55ec261a4..393693640f 100644
--- a/platform/javascript/audio_driver_javascript.h
+++ b/platform/javascript/audio_driver_javascript.h
@@ -59,7 +59,7 @@ public:
STATE_MAX,
};
Mutex mutex;
- Thread *thread = nullptr;
+ Thread thread;
bool quit = false;
int32_t state[STATE_MAX] = { 0 };
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 0d57f8aad1..4297088c09 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -1,7 +1,14 @@
import os
import sys
-from emscripten_helpers import run_closure_compiler, create_engine_file, add_js_libraries, add_js_pre, add_js_externs
+from emscripten_helpers import (
+ run_closure_compiler,
+ create_engine_file,
+ add_js_libraries,
+ add_js_pre,
+ add_js_externs,
+ get_build_version,
+)
from methods import get_compiler_version
from SCons.Util import WhereIs
@@ -50,12 +57,13 @@ def get_flags():
def configure(env):
- if not isinstance(env["initial_memory"], int):
+ try:
+ env["initial_memory"] = int(env["initial_memory"])
+ except Exception:
print("Initial memory must be a valid integer")
sys.exit(255)
## Build type
-
if env["target"] == "release":
# Use -Os to prioritize optimizing for reduced file size. This is
# particularly valuable for the web platform because it directly
@@ -84,9 +92,9 @@ def configure(env):
if not env["threads_enabled"]:
print("Threads must be enabled to build the editor. Please add the 'threads_enabled=yes' option")
sys.exit(255)
- if env["initial_memory"] < 32:
- print("Editor build requires at least 32MiB of initial memory. Forcing it.")
- env["initial_memory"] = 32
+ if env["initial_memory"] < 64:
+ print("Editor build requires at least 64MiB of initial memory. Forcing it.")
+ env["initial_memory"] = 64
elif env["builtin_icu"]:
env.Append(CCFLAGS=["-frtti"])
else:
@@ -139,6 +147,9 @@ def configure(env):
env.AddMethod(add_js_pre, "AddJSPre")
env.AddMethod(add_js_externs, "AddJSExterns")
+ # Add method for getting build version string.
+ env.AddMethod(get_build_version, "GetBuildVersion")
+
# Add method that joins/compiles our Engine files.
env.AddMethod(create_engine_file, "CreateEngineFile")
@@ -218,7 +229,15 @@ def configure(env):
env.Append(LINKFLAGS=["-s", "OFFSCREEN_FRAMEBUFFER=1"])
# callMain for manual start.
- env.Append(LINKFLAGS=["-s", "EXTRA_EXPORTED_RUNTIME_METHODS=['callMain']"])
+ env.Append(LINKFLAGS=["-s", "EXTRA_EXPORTED_RUNTIME_METHODS=['callMain','cwrap']"])
# Add code that allow exiting runtime.
env.Append(LINKFLAGS=["-s", "EXIT_RUNTIME=1"])
+
+ # TODO remove once we have GLES support back (temporary fix undefined symbols due to dead code elimination).
+ env.Append(
+ LINKFLAGS=[
+ "-s",
+ "EXPORTED_FUNCTIONS=['_main', '_emscripten_webgl_get_current_context', '_emscripten_webgl_commit_frame', '_emscripten_webgl_create_context']",
+ ]
+ )
diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp
index 915e8eeacf..5e2dddd8e7 100644
--- a/platform/javascript/display_server_javascript.cpp
+++ b/platform/javascript/display_server_javascript.cpp
@@ -93,7 +93,7 @@ EM_BOOL DisplayServerJavaScript::fullscreen_change_callback(int p_event_type, co
DisplayServerJavaScript *display = get_singleton();
// Empty ID is canvas.
String target_id = String::utf8(p_event->id);
- if (target_id.is_empty() || target_id == String::utf8(display->canvas_id)) {
+ if (target_id.is_empty() || target_id == String::utf8(&(display->canvas_id[1]))) {
// This event property is the only reliable data on
// browser fullscreen state.
if (p_event->isFullscreen) {
@@ -455,7 +455,7 @@ DisplayServer::MouseMode DisplayServerJavaScript::mouse_get_mode() const {
EmscriptenPointerlockChangeEvent ev;
emscripten_get_pointerlock_status(&ev);
- return (ev.isActive && String::utf8(ev.id) == String::utf8(canvas_id)) ? MOUSE_MODE_CAPTURED : MOUSE_MODE_VISIBLE;
+ return (ev.isActive && String::utf8(ev.id) == String::utf8(&canvas_id[1])) ? MOUSE_MODE_CAPTURED : MOUSE_MODE_VISIBLE;
}
// Wheel
@@ -703,6 +703,9 @@ DisplayServerJavaScript::DisplayServerJavaScript(const String &p_rendering_drive
// Ensure the canvas ID.
godot_js_config_canvas_id_get(canvas_id, 256);
+ // Handle contextmenu, webglcontextlost
+ godot_js_display_setup_canvas();
+
// Check if it's windows.
swap_cancel_ok = godot_js_display_is_swap_ok_cancel() == 1;
@@ -842,7 +845,8 @@ Size2i DisplayServerJavaScript::screen_get_size(int p_screen) const {
EmscriptenFullscreenChangeEvent ev;
EMSCRIPTEN_RESULT result = emscripten_get_fullscreen_status(&ev);
ERR_FAIL_COND_V(result != EMSCRIPTEN_RESULT_SUCCESS, Size2i());
- return Size2i(ev.screenWidth, ev.screenHeight);
+ double scale = godot_js_display_pixel_ratio_get();
+ return Size2i(ev.screenWidth * scale, ev.screenHeight * scale);
}
Rect2i DisplayServerJavaScript::screen_get_usable_rect(int p_screen) const {
@@ -852,7 +856,11 @@ Rect2i DisplayServerJavaScript::screen_get_usable_rect(int p_screen) const {
}
int DisplayServerJavaScript::screen_get_dpi(int p_screen) const {
- return 96; // TODO maybe check pixel ratio via window.devicePixelRatio * 96? Inexact.
+ return godot_js_display_screen_dpi_get();
+}
+
+float DisplayServerJavaScript::screen_get_scale(int p_screen) const {
+ return godot_js_display_pixel_ratio_get();
}
Vector<DisplayServer::WindowID> DisplayServerJavaScript::get_window_list() const {
diff --git a/platform/javascript/display_server_javascript.h b/platform/javascript/display_server_javascript.h
index e28fbc56f3..e2fe731abf 100644
--- a/platform/javascript/display_server_javascript.h
+++ b/platform/javascript/display_server_javascript.h
@@ -136,6 +136,7 @@ public:
Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
+ float screen_get_scale(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
// windows
Vector<DisplayServer::WindowID> get_window_list() const override;
diff --git a/platform/javascript/emscripten_helpers.py b/platform/javascript/emscripten_helpers.py
index 8b8c492e22..d08555916b 100644
--- a/platform/javascript/emscripten_helpers.py
+++ b/platform/javascript/emscripten_helpers.py
@@ -15,6 +15,15 @@ def run_closure_compiler(target, source, env, for_signature):
return " ".join(cmd)
+def get_build_version(env):
+ import version
+
+ name = "custom_build"
+ if os.getenv("BUILD_NAME") != None:
+ name = os.getenv("BUILD_NAME")
+ return "%d.%d.%d.%s.%s" % (version.major, version.minor, version.patch, version.status, name)
+
+
def create_engine_file(env, target, source, externs):
if env["use_closure_compiler"]:
return env.BuildJS(target, source, JSEXTERNS=externs)
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index 48ccc1f87a..199d778314 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -135,6 +135,7 @@ public:
s += "Access-Control-Allow-Origin: *\r\n";
s += "Cross-Origin-Opener-Policy: same-origin\r\n";
s += "Cross-Origin-Embedder-Policy: require-corp\r\n";
+ s += "Cache-Control: no-store, max-age=0\r\n";
s += "\r\n";
CharString cs = s.utf8();
Error err = connection->put_data((const uint8_t *)cs.get_data(), cs.size() - 1);
@@ -213,7 +214,7 @@ class EditorExportPlatformJavaScript : public EditorExportPlatform {
Ref<EditorHTTPServer> server;
bool server_quit = false;
Mutex server_lock;
- Thread *server_thread = nullptr;
+ Thread server_thread;
enum ExportMode {
EXPORT_MODE_NORMAL = 0,
@@ -318,7 +319,7 @@ void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportP
}
if (p_preset->get("vram_texture_compression/for_mobile")) {
- String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
+ String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
if (driver == "GLES2") {
r_features->push_back("etc");
} else if (driver == "Vulkan") {
@@ -681,7 +682,7 @@ void EditorExportPlatformJavaScript::_server_thread_poll(void *data) {
EditorExportPlatformJavaScript::EditorExportPlatformJavaScript() {
server.instance();
- server_thread = Thread::create(_server_thread_poll, this);
+ server_thread.start(_server_thread_poll, this);
Ref<Image> img = memnew(Image(_javascript_logo));
logo.instance();
@@ -702,8 +703,7 @@ EditorExportPlatformJavaScript::EditorExportPlatformJavaScript() {
EditorExportPlatformJavaScript::~EditorExportPlatformJavaScript() {
server->stop();
server_quit = true;
- Thread::wait_to_finish(server_thread);
- memdelete(server_thread);
+ server_thread.wait_to_finish();
}
void register_javascript_exporter() {
diff --git a/platform/javascript/godot_js.h b/platform/javascript/godot_js.h
index 0006848756..f0da8b7ca3 100644
--- a/platform/javascript/godot_js.h
+++ b/platform/javascript/godot_js.h
@@ -49,8 +49,10 @@ extern int godot_js_os_fs_is_persistent();
extern void godot_js_os_fs_sync(void (*p_callback)());
extern int godot_js_os_execute(const char *p_json);
extern void godot_js_os_shell_open(const char *p_uri);
+extern int godot_js_os_hw_concurrency_get();
// Display
+extern int godot_js_display_screen_dpi_get();
extern double godot_js_display_pixel_ratio_get();
extern void godot_js_display_alert(const char *p_text);
extern int godot_js_display_touchscreen_is_available();
@@ -86,6 +88,7 @@ extern int godot_js_display_gamepad_sample_get(int p_idx, float r_btns[16], int3
extern void godot_js_display_notification_cb(void (*p_callback)(int p_notification), int p_enter, int p_exit, int p_in, int p_out);
extern void godot_js_display_paste_cb(void (*p_callback)(const char *p_text));
extern void godot_js_display_drop_files_cb(void (*p_callback)(char **p_filev, int p_filec));
+extern void godot_js_display_setup_canvas();
#ifdef __cplusplus
}
#endif
diff --git a/platform/javascript/http_client_javascript.cpp b/platform/javascript/http_client_javascript.cpp
index c8c48dd582..1136ea299d 100644
--- a/platform/javascript/http_client_javascript.cpp
+++ b/platform/javascript/http_client_javascript.cpp
@@ -104,7 +104,11 @@ Error HTTPClient::request_raw(Method p_method, const String &p_url, const Vector
Error err = prepare_request(p_method, p_url, p_headers);
if (err != OK)
return err;
- godot_xhr_send_data(xhr_id, p_body.ptr(), p_body.size());
+ if (p_body.is_empty()) {
+ godot_xhr_send(xhr_id, nullptr, 0);
+ } else {
+ godot_xhr_send(xhr_id, p_body.ptr(), p_body.size());
+ }
return OK;
}
@@ -112,7 +116,12 @@ Error HTTPClient::request(Method p_method, const String &p_url, const Vector<Str
Error err = prepare_request(p_method, p_url, p_headers);
if (err != OK)
return err;
- godot_xhr_send_string(xhr_id, p_body.utf8().get_data());
+ if (p_body.is_empty()) {
+ godot_xhr_send(xhr_id, nullptr, 0);
+ } else {
+ const CharString cs = p_body.utf8();
+ godot_xhr_send(xhr_id, cs.get_data(), cs.length());
+ }
return OK;
}
diff --git a/platform/javascript/http_request.h b/platform/javascript/http_request.h
index d32b2f265e..a9d6faade2 100644
--- a/platform/javascript/http_request.h
+++ b/platform/javascript/http_request.h
@@ -53,9 +53,7 @@ extern int godot_xhr_open(int p_xhr_id, const char *p_method, const char *p_url,
extern void godot_xhr_set_request_header(int p_xhr_id, const char *p_header, const char *p_value);
-extern void godot_xhr_send_null(int p_xhr_id);
-extern void godot_xhr_send_string(int p_xhr_id, const char *p_data);
-extern void godot_xhr_send_data(int p_xhr_id, const void *p_data, int p_len);
+extern void godot_xhr_send(int p_xhr_id, const void *p_data, int p_len);
extern void godot_xhr_abort(int p_xhr_id);
/* this is an HTTPClient::ResponseCode, not ::Status */
diff --git a/platform/javascript/javascript_main.cpp b/platform/javascript/javascript_main.cpp
index 0b8af70b13..0fe95b0a8f 100644
--- a/platform/javascript/javascript_main.cpp
+++ b/platform/javascript/javascript_main.cpp
@@ -88,6 +88,13 @@ extern EMSCRIPTEN_KEEPALIVE int godot_js_main(int argc, char *argv[]) {
Main::start();
os->get_main_loop()->initialize();
+#ifdef TOOLS_ENABLED
+ if (Main::is_project_manager() && FileAccess::exists("/tmp/preload.zip")) {
+ PackedStringArray ps;
+ ps.push_back("/tmp/preload.zip");
+ os->get_main_loop()->emit_signal("files_dropped", ps, -1);
+ }
+#endif
emscripten_set_main_loop(main_loop_callback, -1, false);
// Immediately run the first iteration.
// We are inside an animation frame, we want to immediately draw on the newly setup canvas.
diff --git a/platform/javascript/js/dynlink.pre.js b/platform/javascript/js/dynlink.pre.js
deleted file mode 100644
index 34bc371ea9..0000000000
--- a/platform/javascript/js/dynlink.pre.js
+++ /dev/null
@@ -1 +0,0 @@
-Module['dynamicLibraries'] = [Module['thisProgram'] + '.side.wasm'].concat(Module['dynamicLibraries'] ? Module['dynamicLibraries'] : []);
diff --git a/platform/javascript/js/engine/engine.js b/platform/javascript/js/engine/engine.js
index 4b8a7dde69..321221323c 100644
--- a/platform/javascript/js/engine/engine.js
+++ b/platform/javascript/js/engine/engine.js
@@ -62,7 +62,7 @@ const Engine = (function () {
// Emscripten configuration.
config['thisProgram'] = me.executableName;
config['noExitRuntime'] = true;
- config['dynamicLibraries'] = me.gdnativeLibs;
+ config['dynamicLibraries'] = [`${me.executableName}.side.wasm`].concat(me.gdnativeLibs);
Godot(config).then(function (module) {
module['initFS'](me.persistentPaths).then(function (fs_err) {
me.rtenv = module;
@@ -107,17 +107,6 @@ const Engine = (function () {
me.canvas.tabIndex = 0;
}
- // Disable right-click context menu.
- me.canvas.addEventListener('contextmenu', function (ev) {
- ev.preventDefault();
- }, false);
-
- // Until context restoration is implemented warn the user of context loss.
- me.canvas.addEventListener('webglcontextlost', function (ev) {
- alert('WebGL context lost, please reload the page'); // eslint-disable-line no-alert
- ev.preventDefault();
- }, false);
-
// Browser locale, or custom one if defined.
let locale = me.customLocale;
if (!locale) {
diff --git a/platform/javascript/js/libs/library_godot_display.js b/platform/javascript/js/libs/library_godot_display.js
index 2977b7c122..9ec295b39f 100644
--- a/platform/javascript/js/libs/library_godot_display.js
+++ b/platform/javascript/js/libs/library_godot_display.js
@@ -405,6 +405,27 @@ const GodotDisplay = {
$GodotDisplay__deps: ['$GodotConfig', '$GodotRuntime', '$GodotDisplayCursor', '$GodotDisplayListeners', '$GodotDisplayDragDrop', '$GodotDisplayGamepads'],
$GodotDisplay: {
window_icon: '',
+ findDPI: function () {
+ function testDPI(dpi) {
+ return window.matchMedia(`(max-resolution: ${dpi}dpi)`).matches;
+ }
+ function bisect(low, high, func) {
+ const mid = parseInt(((high - low) / 2) + low, 10);
+ if (high - low <= 1) {
+ return func(high) ? high : low;
+ }
+ if (func(mid)) {
+ return bisect(low, mid, func);
+ }
+ return bisect(mid, high, func);
+ }
+ try {
+ const dpi = bisect(0, 800, testDPI);
+ return dpi >= 96 ? dpi : 96;
+ } catch (e) {
+ return 96;
+ }
+ },
},
godot_js_display_is_swap_ok_cancel__sig: 'i',
@@ -422,6 +443,11 @@ const GodotDisplay = {
window.alert(GodotRuntime.parseString(p_text)); // eslint-disable-line no-alert
},
+ godot_js_display_screen_dpi_get__sig: 'i',
+ godot_js_display_screen_dpi_get: function () {
+ return GodotDisplay.findDPI();
+ },
+
godot_js_display_pixel_ratio_get__sig: 'f',
godot_js_display_pixel_ratio_get: function () {
return window.devicePixelRatio || 1;
@@ -619,6 +645,18 @@ const GodotDisplay = {
GodotDisplayListeners.add(canvas, 'drop', GodotDisplayDragDrop.handler(dropFiles));
},
+ godot_js_display_setup_canvas__sig: 'v',
+ godot_js_display_setup_canvas: function () {
+ const canvas = GodotConfig.canvas;
+ GodotDisplayListeners.add(canvas, 'contextmenu', function (ev) {
+ ev.preventDefault();
+ }, false);
+ GodotDisplayListeners.add(canvas, 'webglcontextlost', function (ev) {
+ alert('WebGL context lost, please reload the page'); // eslint-disable-line no-alert
+ ev.preventDefault();
+ }, false);
+ },
+
/*
* Gamepads
*/
diff --git a/platform/javascript/js/libs/library_godot_http_request.js b/platform/javascript/js/libs/library_godot_http_request.js
index 930d3209f8..7dc2a2df29 100644
--- a/platform/javascript/js/libs/library_godot_http_request.js
+++ b/platform/javascript/js/libs/library_godot_http_request.js
@@ -82,31 +82,13 @@ const GodotHTTPRequest = {
GodotHTTPRequest.requests[xhrId].setRequestHeader(GodotRuntime.parseString(header), GodotRuntime.parseString(value));
},
- godot_xhr_send_null__sig: 'vi',
- godot_xhr_send_null: function (xhrId) {
- GodotHTTPRequest.requests[xhrId].send();
- },
-
- godot_xhr_send_string__sig: 'vii',
- godot_xhr_send_string: function (xhrId, strPtr) {
- if (!strPtr) {
- GodotRuntime.error('Failed to send string per XHR: null pointer');
- return;
- }
- GodotHTTPRequest.requests[xhrId].send(GodotRuntime.parseString(strPtr));
- },
-
- godot_xhr_send_data__sig: 'viii',
- godot_xhr_send_data: function (xhrId, ptr, len) {
- if (!ptr) {
- GodotRuntime.error('Failed to send data per XHR: null pointer');
- return;
- }
- if (len < 0) {
- GodotRuntime.error('Failed to send data per XHR: buffer length less than 0');
- return;
+ godot_xhr_send__sig: 'viii',
+ godot_xhr_send: function (xhrId, p_ptr, p_len) {
+ let data = null;
+ if (p_ptr && p_len) {
+ data = GodotRuntime.heapCopy(HEAP8, p_ptr, p_len);
}
- GodotHTTPRequest.requests[xhrId].send(HEAPU8.subarray(ptr, ptr + len));
+ GodotHTTPRequest.requests[xhrId].send(data);
},
godot_xhr_abort__sig: 'vi',
diff --git a/platform/javascript/js/libs/library_godot_os.js b/platform/javascript/js/libs/library_godot_os.js
index 9fde4a84e1..3ffcd655b7 100644
--- a/platform/javascript/js/libs/library_godot_os.js
+++ b/platform/javascript/js/libs/library_godot_os.js
@@ -282,6 +282,11 @@ const GodotOS = {
godot_js_os_shell_open: function (p_uri) {
window.open(GodotRuntime.parseString(p_uri), '_blank');
},
+
+ godot_js_os_hw_concurrency_get__sig: 'i',
+ godot_js_os_hw_concurrency_get: function () {
+ return navigator.hardwareConcurrency || 1;
+ },
};
autoAddDeps(GodotOS, '$GodotOS');
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index b922b2ba91..0b1650076c 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -129,6 +129,10 @@ int OS_JavaScript::get_process_id() const {
ERR_FAIL_V_MSG(0, "OS::get_process_id() is not available on the HTML5 platform.");
}
+int OS_JavaScript::get_processor_count() const {
+ return godot_js_os_hw_concurrency_get();
+}
+
bool OS_JavaScript::_check_internal_feature_support(const String &p_feature) {
if (p_feature == "HTML5" || p_feature == "web") {
return true;
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h
index 8db62d9d1c..81bb9c5f3d 100644
--- a/platform/javascript/os_javascript.h
+++ b/platform/javascript/os_javascript.h
@@ -74,6 +74,7 @@ public:
Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr) override;
Error kill(const ProcessID &p_pid) override;
int get_process_id() const override;
+ int get_processor_count() const override;
String get_executable_path() const override;
Error shell_open(String p_uri) override;
diff --git a/platform/linuxbsd/SCsub b/platform/linuxbsd/SCsub
index 6e43ffcedb..46714e9502 100644
--- a/platform/linuxbsd/SCsub
+++ b/platform/linuxbsd/SCsub
@@ -16,7 +16,10 @@ common_x11 = [
"key_mapping_x11.cpp",
]
+if "udev" in env and env["udev"]:
+ common_x11.append("libudev-so_wrap.c")
+
prog = env.add_program("#bin/godot", ["godot_linuxbsd.cpp"] + common_x11)
-if env["debug_symbols"] == "yes" and env["separate_debug_symbols"]:
+if env["debug_symbols"] and env["separate_debug_symbols"]:
env.AddPostAction(prog, run_in_subprocess(platform_linuxbsd_builders.make_debug_linuxbsd))
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index a819731328..f87e9cf886 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -64,15 +64,15 @@ def get_opts():
BoolVariable("use_llvm", "Use the LLVM compiler", False),
BoolVariable("use_lld", "Use the LLD linker", False),
BoolVariable("use_thinlto", "Use ThinLTO", False),
- BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", False),
+ BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", True),
BoolVariable("use_coverage", "Test Godot coverage", 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),
BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN))", False),
BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
- BoolVariable("udev", "Use udev for gamepad connection callbacks", False),
- EnumVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", "yes", ("yes", "no")),
+ BoolVariable("udev", "Use udev for gamepad connection callbacks", True),
+ BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
BoolVariable("touch", "Enable touch events", True),
BoolVariable("execinfo", "Use libexecinfo on systems where glibc is not available", False),
@@ -92,7 +92,7 @@ def configure(env):
else: # optimize for size
env.Prepend(CCFLAGS=["-Os"])
- if env["debug_symbols"] == "yes":
+ if env["debug_symbols"]:
env.Prepend(CCFLAGS=["-g2"])
elif env["target"] == "release_debug":
@@ -102,7 +102,7 @@ def configure(env):
env.Prepend(CCFLAGS=["-Os"])
env.Prepend(CPPDEFINES=["DEBUG_ENABLED"])
- if env["debug_symbols"] == "yes":
+ if env["debug_symbols"]:
env.Prepend(CCFLAGS=["-g2"])
elif env["target"] == "debug":
@@ -310,9 +310,8 @@ def configure(env):
if os.system("pkg-config --exists alsa") == 0: # 0 means found
print("Enabling ALSA")
+ env["alsa"] = True
env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
- # Don't parse --cflags, we don't need to add /usr/include/alsa to include path
- env.ParseConfig("pkg-config alsa --libs")
else:
print("ALSA libraries not found, disabling driver")
@@ -320,20 +319,20 @@ def configure(env):
if os.system("pkg-config --exists libpulse") == 0: # 0 means found
print("Enabling PulseAudio")
env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED"])
- env.ParseConfig("pkg-config --cflags --libs libpulse")
+ env.ParseConfig("pkg-config --cflags libpulse")
else:
print("PulseAudio development libraries not found, disabling driver")
if platform.system() == "Linux":
env.Append(CPPDEFINES=["JOYDEV_ENABLED"])
-
if env["udev"]:
if os.system("pkg-config --exists libudev") == 0: # 0 means found
print("Enabling udev support")
env.Append(CPPDEFINES=["UDEV_ENABLED"])
- env.ParseConfig("pkg-config libudev --cflags --libs")
else:
print("libudev development libraries not found, disabling udev support")
+ else:
+ env["udev"] = False # Linux specific
# Linkflags below this line should typically stay the last ones
if not env["builtin_zlib"]:
@@ -390,4 +389,7 @@ def configure(env):
# Link those statically for portability
if env["use_static_cpp"]:
- env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])
+ # Workaround for GH-31743, Ubuntu 18.04 i386 crashes when it's used.
+ # That doesn't make any sense but it's likely a Ubuntu bug?
+ if is64 or env["bits"] == "64":
+ env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"])
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index 00b90923de..fceeb82325 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -2697,7 +2697,7 @@ bool DisplayServerX11::_wait_for_events() const {
}
void DisplayServerX11::_poll_events() {
- while (!events_thread_done) {
+ while (!events_thread_done.is_set()) {
_wait_for_events();
// Process events from the queue.
@@ -3360,7 +3360,7 @@ void DisplayServerX11::process_events() {
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://", "").http_unescape().strip_edges();
+ files.write[i] = files[i].replace("file://", "").uri_decode().strip_edges();
}
if (!windows[window_id].drop_files_callback.is_null()) {
@@ -4266,7 +4266,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
}
}
- events_thread = Thread::create(_poll_events_thread, this);
+ events_thread.start(_poll_events_thread, this);
_update_real_mouse_position(windows[MAIN_WINDOW_ID]);
@@ -4279,10 +4279,8 @@ DisplayServerX11::~DisplayServerX11() {
_clipboard_transfer_ownership(XA_PRIMARY, x11_main_window);
_clipboard_transfer_ownership(XInternAtom(x11_display, "CLIPBOARD", 0), x11_main_window);
- events_thread_done = true;
- Thread::wait_to_finish(events_thread);
- memdelete(events_thread);
- events_thread = nullptr;
+ events_thread_done.set();
+ events_thread.wait_to_finish();
//destroy all windows
for (Map<WindowID, WindowData>::Element *E = windows.front(); E; E = E->next()) {
diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h
index 7784ba82b5..10686d8424 100644
--- a/platform/linuxbsd/display_server_x11.h
+++ b/platform/linuxbsd/display_server_x11.h
@@ -252,8 +252,8 @@ class DisplayServerX11 : public DisplayServer {
void _dispatch_input_event(const Ref<InputEvent> &p_event);
mutable Mutex events_mutex;
- Thread *events_thread = nullptr;
- bool events_thread_done = false;
+ Thread events_thread;
+ SafeFlag events_thread_done;
LocalVector<XEvent> polled_events;
static void _poll_events_thread(void *ud);
bool _wait_for_events() const;
diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp
index 291ca49585..fc818a478d 100644
--- a/platform/linuxbsd/joypad_linux.cpp
+++ b/platform/linuxbsd/joypad_linux.cpp
@@ -32,13 +32,14 @@
#include "joypad_linux.h"
+#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <linux/input.h>
#include <unistd.h>
#ifdef UDEV_ENABLED
-#include <libudev.h>
+#include "libudev-so_wrap.h"
#endif
#define LONG_BITS (sizeof(long) * 8)
@@ -71,15 +72,23 @@ void JoypadLinux::Joypad::reset() {
}
JoypadLinux::JoypadLinux(Input *in) {
- exit_udev = false;
+#ifdef UDEV_ENABLED
+ use_udev = initialize_libudev() == 0;
+ if (use_udev) {
+ print_verbose("JoypadLinux: udev enabled and loaded successfully.");
+ } else {
+ print_verbose("JoypadLinux: udev enabled, but couldn't be loaded. Falling back to /dev/input to detect joypads.");
+ }
+#else
+ print_verbose("JoypadLinux: udev disabled, parsing /dev/input to detect joypads.");
+#endif
input = in;
- joy_thread = Thread::create(joy_thread_func, this);
+ joy_thread.start(joy_thread_func, this);
}
JoypadLinux::~JoypadLinux() {
- exit_udev = true;
- Thread::wait_to_finish(joy_thread);
- memdelete(joy_thread);
+ exit_monitor.set();
+ joy_thread.wait_to_finish();
close_joypad();
}
@@ -92,11 +101,20 @@ void JoypadLinux::joy_thread_func(void *p_user) {
void JoypadLinux::run_joypad_thread() {
#ifdef UDEV_ENABLED
- udev *_udev = udev_new();
- ERR_FAIL_COND(!_udev);
- enumerate_joypads(_udev);
- monitor_joypads(_udev);
- udev_unref(_udev);
+ if (use_udev) {
+ udev *_udev = udev_new();
+ if (!_udev) {
+ use_udev = false;
+ ERR_PRINT("Failed getting an udev context, falling back to parsing /dev/input.");
+ monitor_joypads();
+ } else {
+ enumerate_joypads(_udev);
+ monitor_joypads(_udev);
+ udev_unref(_udev);
+ }
+ } else {
+ monitor_joypads();
+ }
#else
monitor_joypads();
#endif
@@ -137,7 +155,7 @@ void JoypadLinux::monitor_joypads(udev *p_udev) {
udev_monitor_enable_receiving(mon);
int fd = udev_monitor_get_fd(mon);
- while (!exit_udev) {
+ while (!exit_monitor.is_set()) {
fd_set fds;
struct timeval tv;
int ret;
@@ -179,17 +197,27 @@ void JoypadLinux::monitor_joypads(udev *p_udev) {
#endif
void JoypadLinux::monitor_joypads() {
- while (!exit_udev) {
+ while (!exit_monitor.is_set()) {
{
MutexLock lock(joy_mutex);
- for (int i = 0; i < 32; i++) {
+ DIR *input_directory;
+ input_directory = opendir("/dev/input");
+ if (input_directory) {
+ struct dirent *current;
char fname[64];
- sprintf(fname, "/dev/input/event%d", i);
- if (attached_devices.find(fname) == -1) {
- open_joypad(fname);
+
+ while ((current = readdir(input_directory)) != NULL) {
+ if (strncmp(current->d_name, "event", 5) != 0) {
+ continue;
+ }
+ sprintf(fname, "/dev/input/%.*s", 16, current->d_name);
+ if (attached_devices.find(fname) == -1) {
+ open_joypad(fname);
+ }
}
}
+ closedir(input_directory);
}
usleep(1000000); // 1s
}
diff --git a/platform/linuxbsd/joypad_linux.h b/platform/linuxbsd/joypad_linux.h
index 20d30b510c..b0d0db047b 100644
--- a/platform/linuxbsd/joypad_linux.h
+++ b/platform/linuxbsd/joypad_linux.h
@@ -70,10 +70,13 @@ private:
void reset();
};
- bool exit_udev;
+#ifdef UDEV_ENABLED
+ bool use_udev = false;
+#endif
+ SafeFlag exit_monitor;
Mutex joy_mutex;
- Thread *joy_thread;
- Input *input;
+ Thread joy_thread;
+ Input *input = nullptr;
Joypad joypads[JOYPADS_MAX];
Vector<String> attached_devices;
diff --git a/platform/linuxbsd/libudev-so_wrap.c b/platform/linuxbsd/libudev-so_wrap.c
new file mode 100644
index 0000000000..07f368d7c5
--- /dev/null
+++ b/platform/linuxbsd/libudev-so_wrap.c
@@ -0,0 +1,829 @@
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by /home/hp/Projects/godot/pulse/generate-wrapper.py 0.2 on 2021-02-18 00:18:56
+// flags: /home/hp/Projects/godot/pulse/generate-wrapper.py --include /usr/include/libudev.h --sys-include <libudev.h> --soname libudev.so.1 --init-name libudev --omit-prefix gnu_ --output-header libudev-so_wrap.h --output-implementation libudev-so_wrap.c
+//
+#define udev_ref udev_ref_dylibloader_orig_libudev
+#define udev_unref udev_unref_dylibloader_orig_libudev
+#define udev_new udev_new_dylibloader_orig_libudev
+#define udev_set_log_fn udev_set_log_fn_dylibloader_orig_libudev
+#define udev_get_log_priority udev_get_log_priority_dylibloader_orig_libudev
+#define udev_set_log_priority udev_set_log_priority_dylibloader_orig_libudev
+#define udev_get_userdata udev_get_userdata_dylibloader_orig_libudev
+#define udev_set_userdata udev_set_userdata_dylibloader_orig_libudev
+#define udev_list_entry_get_next udev_list_entry_get_next_dylibloader_orig_libudev
+#define udev_list_entry_get_by_name udev_list_entry_get_by_name_dylibloader_orig_libudev
+#define udev_list_entry_get_name udev_list_entry_get_name_dylibloader_orig_libudev
+#define udev_list_entry_get_value udev_list_entry_get_value_dylibloader_orig_libudev
+#define udev_device_ref udev_device_ref_dylibloader_orig_libudev
+#define udev_device_unref udev_device_unref_dylibloader_orig_libudev
+#define udev_device_get_udev udev_device_get_udev_dylibloader_orig_libudev
+#define udev_device_new_from_syspath udev_device_new_from_syspath_dylibloader_orig_libudev
+#define udev_device_new_from_devnum udev_device_new_from_devnum_dylibloader_orig_libudev
+#define udev_device_new_from_subsystem_sysname udev_device_new_from_subsystem_sysname_dylibloader_orig_libudev
+#define udev_device_new_from_device_id udev_device_new_from_device_id_dylibloader_orig_libudev
+#define udev_device_new_from_environment udev_device_new_from_environment_dylibloader_orig_libudev
+#define udev_device_get_parent udev_device_get_parent_dylibloader_orig_libudev
+#define udev_device_get_parent_with_subsystem_devtype udev_device_get_parent_with_subsystem_devtype_dylibloader_orig_libudev
+#define udev_device_get_devpath udev_device_get_devpath_dylibloader_orig_libudev
+#define udev_device_get_subsystem udev_device_get_subsystem_dylibloader_orig_libudev
+#define udev_device_get_devtype udev_device_get_devtype_dylibloader_orig_libudev
+#define udev_device_get_syspath udev_device_get_syspath_dylibloader_orig_libudev
+#define udev_device_get_sysname udev_device_get_sysname_dylibloader_orig_libudev
+#define udev_device_get_sysnum udev_device_get_sysnum_dylibloader_orig_libudev
+#define udev_device_get_devnode udev_device_get_devnode_dylibloader_orig_libudev
+#define udev_device_get_is_initialized udev_device_get_is_initialized_dylibloader_orig_libudev
+#define udev_device_get_devlinks_list_entry udev_device_get_devlinks_list_entry_dylibloader_orig_libudev
+#define udev_device_get_properties_list_entry udev_device_get_properties_list_entry_dylibloader_orig_libudev
+#define udev_device_get_tags_list_entry udev_device_get_tags_list_entry_dylibloader_orig_libudev
+#define udev_device_get_sysattr_list_entry udev_device_get_sysattr_list_entry_dylibloader_orig_libudev
+#define udev_device_get_property_value udev_device_get_property_value_dylibloader_orig_libudev
+#define udev_device_get_driver udev_device_get_driver_dylibloader_orig_libudev
+#define udev_device_get_devnum udev_device_get_devnum_dylibloader_orig_libudev
+#define udev_device_get_action udev_device_get_action_dylibloader_orig_libudev
+#define udev_device_get_seqnum udev_device_get_seqnum_dylibloader_orig_libudev
+#define udev_device_get_usec_since_initialized udev_device_get_usec_since_initialized_dylibloader_orig_libudev
+#define udev_device_get_sysattr_value udev_device_get_sysattr_value_dylibloader_orig_libudev
+#define udev_device_set_sysattr_value udev_device_set_sysattr_value_dylibloader_orig_libudev
+#define udev_device_has_tag udev_device_has_tag_dylibloader_orig_libudev
+#define udev_monitor_ref udev_monitor_ref_dylibloader_orig_libudev
+#define udev_monitor_unref udev_monitor_unref_dylibloader_orig_libudev
+#define udev_monitor_get_udev udev_monitor_get_udev_dylibloader_orig_libudev
+#define udev_monitor_new_from_netlink udev_monitor_new_from_netlink_dylibloader_orig_libudev
+#define udev_monitor_enable_receiving udev_monitor_enable_receiving_dylibloader_orig_libudev
+#define udev_monitor_set_receive_buffer_size udev_monitor_set_receive_buffer_size_dylibloader_orig_libudev
+#define udev_monitor_get_fd udev_monitor_get_fd_dylibloader_orig_libudev
+#define udev_monitor_receive_device udev_monitor_receive_device_dylibloader_orig_libudev
+#define udev_monitor_filter_add_match_subsystem_devtype udev_monitor_filter_add_match_subsystem_devtype_dylibloader_orig_libudev
+#define udev_monitor_filter_add_match_tag udev_monitor_filter_add_match_tag_dylibloader_orig_libudev
+#define udev_monitor_filter_update udev_monitor_filter_update_dylibloader_orig_libudev
+#define udev_monitor_filter_remove udev_monitor_filter_remove_dylibloader_orig_libudev
+#define udev_enumerate_ref udev_enumerate_ref_dylibloader_orig_libudev
+#define udev_enumerate_unref udev_enumerate_unref_dylibloader_orig_libudev
+#define udev_enumerate_get_udev udev_enumerate_get_udev_dylibloader_orig_libudev
+#define udev_enumerate_new udev_enumerate_new_dylibloader_orig_libudev
+#define udev_enumerate_add_match_subsystem udev_enumerate_add_match_subsystem_dylibloader_orig_libudev
+#define udev_enumerate_add_nomatch_subsystem udev_enumerate_add_nomatch_subsystem_dylibloader_orig_libudev
+#define udev_enumerate_add_match_sysattr udev_enumerate_add_match_sysattr_dylibloader_orig_libudev
+#define udev_enumerate_add_nomatch_sysattr udev_enumerate_add_nomatch_sysattr_dylibloader_orig_libudev
+#define udev_enumerate_add_match_property udev_enumerate_add_match_property_dylibloader_orig_libudev
+#define udev_enumerate_add_match_sysname udev_enumerate_add_match_sysname_dylibloader_orig_libudev
+#define udev_enumerate_add_match_tag udev_enumerate_add_match_tag_dylibloader_orig_libudev
+#define udev_enumerate_add_match_parent udev_enumerate_add_match_parent_dylibloader_orig_libudev
+#define udev_enumerate_add_match_is_initialized udev_enumerate_add_match_is_initialized_dylibloader_orig_libudev
+#define udev_enumerate_add_syspath udev_enumerate_add_syspath_dylibloader_orig_libudev
+#define udev_enumerate_scan_devices udev_enumerate_scan_devices_dylibloader_orig_libudev
+#define udev_enumerate_scan_subsystems udev_enumerate_scan_subsystems_dylibloader_orig_libudev
+#define udev_enumerate_get_list_entry udev_enumerate_get_list_entry_dylibloader_orig_libudev
+#define udev_queue_ref udev_queue_ref_dylibloader_orig_libudev
+#define udev_queue_unref udev_queue_unref_dylibloader_orig_libudev
+#define udev_queue_get_udev udev_queue_get_udev_dylibloader_orig_libudev
+#define udev_queue_new udev_queue_new_dylibloader_orig_libudev
+#define udev_queue_get_kernel_seqnum udev_queue_get_kernel_seqnum_dylibloader_orig_libudev
+#define udev_queue_get_udev_seqnum udev_queue_get_udev_seqnum_dylibloader_orig_libudev
+#define udev_queue_get_udev_is_active udev_queue_get_udev_is_active_dylibloader_orig_libudev
+#define udev_queue_get_queue_is_empty udev_queue_get_queue_is_empty_dylibloader_orig_libudev
+#define udev_queue_get_seqnum_is_finished udev_queue_get_seqnum_is_finished_dylibloader_orig_libudev
+#define udev_queue_get_seqnum_sequence_is_finished udev_queue_get_seqnum_sequence_is_finished_dylibloader_orig_libudev
+#define udev_queue_get_fd udev_queue_get_fd_dylibloader_orig_libudev
+#define udev_queue_flush udev_queue_flush_dylibloader_orig_libudev
+#define udev_queue_get_queued_list_entry udev_queue_get_queued_list_entry_dylibloader_orig_libudev
+#define udev_hwdb_new udev_hwdb_new_dylibloader_orig_libudev
+#define udev_hwdb_ref udev_hwdb_ref_dylibloader_orig_libudev
+#define udev_hwdb_unref udev_hwdb_unref_dylibloader_orig_libudev
+#define udev_hwdb_get_properties_list_entry udev_hwdb_get_properties_list_entry_dylibloader_orig_libudev
+#define udev_util_encode_string udev_util_encode_string_dylibloader_orig_libudev
+#include <libudev.h>
+#undef udev_ref
+#undef udev_unref
+#undef udev_new
+#undef udev_set_log_fn
+#undef udev_get_log_priority
+#undef udev_set_log_priority
+#undef udev_get_userdata
+#undef udev_set_userdata
+#undef udev_list_entry_get_next
+#undef udev_list_entry_get_by_name
+#undef udev_list_entry_get_name
+#undef udev_list_entry_get_value
+#undef udev_device_ref
+#undef udev_device_unref
+#undef udev_device_get_udev
+#undef udev_device_new_from_syspath
+#undef udev_device_new_from_devnum
+#undef udev_device_new_from_subsystem_sysname
+#undef udev_device_new_from_device_id
+#undef udev_device_new_from_environment
+#undef udev_device_get_parent
+#undef udev_device_get_parent_with_subsystem_devtype
+#undef udev_device_get_devpath
+#undef udev_device_get_subsystem
+#undef udev_device_get_devtype
+#undef udev_device_get_syspath
+#undef udev_device_get_sysname
+#undef udev_device_get_sysnum
+#undef udev_device_get_devnode
+#undef udev_device_get_is_initialized
+#undef udev_device_get_devlinks_list_entry
+#undef udev_device_get_properties_list_entry
+#undef udev_device_get_tags_list_entry
+#undef udev_device_get_sysattr_list_entry
+#undef udev_device_get_property_value
+#undef udev_device_get_driver
+#undef udev_device_get_devnum
+#undef udev_device_get_action
+#undef udev_device_get_seqnum
+#undef udev_device_get_usec_since_initialized
+#undef udev_device_get_sysattr_value
+#undef udev_device_set_sysattr_value
+#undef udev_device_has_tag
+#undef udev_monitor_ref
+#undef udev_monitor_unref
+#undef udev_monitor_get_udev
+#undef udev_monitor_new_from_netlink
+#undef udev_monitor_enable_receiving
+#undef udev_monitor_set_receive_buffer_size
+#undef udev_monitor_get_fd
+#undef udev_monitor_receive_device
+#undef udev_monitor_filter_add_match_subsystem_devtype
+#undef udev_monitor_filter_add_match_tag
+#undef udev_monitor_filter_update
+#undef udev_monitor_filter_remove
+#undef udev_enumerate_ref
+#undef udev_enumerate_unref
+#undef udev_enumerate_get_udev
+#undef udev_enumerate_new
+#undef udev_enumerate_add_match_subsystem
+#undef udev_enumerate_add_nomatch_subsystem
+#undef udev_enumerate_add_match_sysattr
+#undef udev_enumerate_add_nomatch_sysattr
+#undef udev_enumerate_add_match_property
+#undef udev_enumerate_add_match_sysname
+#undef udev_enumerate_add_match_tag
+#undef udev_enumerate_add_match_parent
+#undef udev_enumerate_add_match_is_initialized
+#undef udev_enumerate_add_syspath
+#undef udev_enumerate_scan_devices
+#undef udev_enumerate_scan_subsystems
+#undef udev_enumerate_get_list_entry
+#undef udev_queue_ref
+#undef udev_queue_unref
+#undef udev_queue_get_udev
+#undef udev_queue_new
+#undef udev_queue_get_kernel_seqnum
+#undef udev_queue_get_udev_seqnum
+#undef udev_queue_get_udev_is_active
+#undef udev_queue_get_queue_is_empty
+#undef udev_queue_get_seqnum_is_finished
+#undef udev_queue_get_seqnum_sequence_is_finished
+#undef udev_queue_get_fd
+#undef udev_queue_flush
+#undef udev_queue_get_queued_list_entry
+#undef udev_hwdb_new
+#undef udev_hwdb_ref
+#undef udev_hwdb_unref
+#undef udev_hwdb_get_properties_list_entry
+#undef udev_util_encode_string
+#include <dlfcn.h>
+#include <stdio.h>
+struct udev* (*udev_ref_dylibloader_wrapper_libudev)(struct udev*);
+struct udev* (*udev_unref_dylibloader_wrapper_libudev)(struct udev*);
+struct udev* (*udev_new_dylibloader_wrapper_libudev)( void);
+void (*udev_set_log_fn_dylibloader_wrapper_libudev)(struct udev*, void*);
+int (*udev_get_log_priority_dylibloader_wrapper_libudev)(struct udev*);
+void (*udev_set_log_priority_dylibloader_wrapper_libudev)(struct udev*, int);
+void* (*udev_get_userdata_dylibloader_wrapper_libudev)(struct udev*);
+void (*udev_set_userdata_dylibloader_wrapper_libudev)(struct udev*, void*);
+struct udev_list_entry* (*udev_list_entry_get_next_dylibloader_wrapper_libudev)(struct udev_list_entry*);
+struct udev_list_entry* (*udev_list_entry_get_by_name_dylibloader_wrapper_libudev)(struct udev_list_entry*,const char*);
+const char* (*udev_list_entry_get_name_dylibloader_wrapper_libudev)(struct udev_list_entry*);
+const char* (*udev_list_entry_get_value_dylibloader_wrapper_libudev)(struct udev_list_entry*);
+struct udev_device* (*udev_device_ref_dylibloader_wrapper_libudev)(struct udev_device*);
+struct udev_device* (*udev_device_unref_dylibloader_wrapper_libudev)(struct udev_device*);
+struct udev* (*udev_device_get_udev_dylibloader_wrapper_libudev)(struct udev_device*);
+struct udev_device* (*udev_device_new_from_syspath_dylibloader_wrapper_libudev)(struct udev*,const char*);
+struct udev_device* (*udev_device_new_from_devnum_dylibloader_wrapper_libudev)(struct udev*, char, dev_t);
+struct udev_device* (*udev_device_new_from_subsystem_sysname_dylibloader_wrapper_libudev)(struct udev*,const char*,const char*);
+struct udev_device* (*udev_device_new_from_device_id_dylibloader_wrapper_libudev)(struct udev*,const char*);
+struct udev_device* (*udev_device_new_from_environment_dylibloader_wrapper_libudev)(struct udev*);
+struct udev_device* (*udev_device_get_parent_dylibloader_wrapper_libudev)(struct udev_device*);
+struct udev_device* (*udev_device_get_parent_with_subsystem_devtype_dylibloader_wrapper_libudev)(struct udev_device*,const char*,const char*);
+const char* (*udev_device_get_devpath_dylibloader_wrapper_libudev)(struct udev_device*);
+const char* (*udev_device_get_subsystem_dylibloader_wrapper_libudev)(struct udev_device*);
+const char* (*udev_device_get_devtype_dylibloader_wrapper_libudev)(struct udev_device*);
+const char* (*udev_device_get_syspath_dylibloader_wrapper_libudev)(struct udev_device*);
+const char* (*udev_device_get_sysname_dylibloader_wrapper_libudev)(struct udev_device*);
+const char* (*udev_device_get_sysnum_dylibloader_wrapper_libudev)(struct udev_device*);
+const char* (*udev_device_get_devnode_dylibloader_wrapper_libudev)(struct udev_device*);
+int (*udev_device_get_is_initialized_dylibloader_wrapper_libudev)(struct udev_device*);
+struct udev_list_entry* (*udev_device_get_devlinks_list_entry_dylibloader_wrapper_libudev)(struct udev_device*);
+struct udev_list_entry* (*udev_device_get_properties_list_entry_dylibloader_wrapper_libudev)(struct udev_device*);
+struct udev_list_entry* (*udev_device_get_tags_list_entry_dylibloader_wrapper_libudev)(struct udev_device*);
+struct udev_list_entry* (*udev_device_get_sysattr_list_entry_dylibloader_wrapper_libudev)(struct udev_device*);
+const char* (*udev_device_get_property_value_dylibloader_wrapper_libudev)(struct udev_device*,const char*);
+const char* (*udev_device_get_driver_dylibloader_wrapper_libudev)(struct udev_device*);
+dev_t (*udev_device_get_devnum_dylibloader_wrapper_libudev)(struct udev_device*);
+const char* (*udev_device_get_action_dylibloader_wrapper_libudev)(struct udev_device*);
+unsigned long long int (*udev_device_get_seqnum_dylibloader_wrapper_libudev)(struct udev_device*);
+unsigned long long int (*udev_device_get_usec_since_initialized_dylibloader_wrapper_libudev)(struct udev_device*);
+const char* (*udev_device_get_sysattr_value_dylibloader_wrapper_libudev)(struct udev_device*,const char*);
+int (*udev_device_set_sysattr_value_dylibloader_wrapper_libudev)(struct udev_device*,const char*,const char*);
+int (*udev_device_has_tag_dylibloader_wrapper_libudev)(struct udev_device*,const char*);
+struct udev_monitor* (*udev_monitor_ref_dylibloader_wrapper_libudev)(struct udev_monitor*);
+struct udev_monitor* (*udev_monitor_unref_dylibloader_wrapper_libudev)(struct udev_monitor*);
+struct udev* (*udev_monitor_get_udev_dylibloader_wrapper_libudev)(struct udev_monitor*);
+struct udev_monitor* (*udev_monitor_new_from_netlink_dylibloader_wrapper_libudev)(struct udev*,const char*);
+int (*udev_monitor_enable_receiving_dylibloader_wrapper_libudev)(struct udev_monitor*);
+int (*udev_monitor_set_receive_buffer_size_dylibloader_wrapper_libudev)(struct udev_monitor*, int);
+int (*udev_monitor_get_fd_dylibloader_wrapper_libudev)(struct udev_monitor*);
+struct udev_device* (*udev_monitor_receive_device_dylibloader_wrapper_libudev)(struct udev_monitor*);
+int (*udev_monitor_filter_add_match_subsystem_devtype_dylibloader_wrapper_libudev)(struct udev_monitor*,const char*,const char*);
+int (*udev_monitor_filter_add_match_tag_dylibloader_wrapper_libudev)(struct udev_monitor*,const char*);
+int (*udev_monitor_filter_update_dylibloader_wrapper_libudev)(struct udev_monitor*);
+int (*udev_monitor_filter_remove_dylibloader_wrapper_libudev)(struct udev_monitor*);
+struct udev_enumerate* (*udev_enumerate_ref_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+struct udev_enumerate* (*udev_enumerate_unref_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+struct udev* (*udev_enumerate_get_udev_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+struct udev_enumerate* (*udev_enumerate_new_dylibloader_wrapper_libudev)(struct udev*);
+int (*udev_enumerate_add_match_subsystem_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*);
+int (*udev_enumerate_add_nomatch_subsystem_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*);
+int (*udev_enumerate_add_match_sysattr_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*,const char*);
+int (*udev_enumerate_add_nomatch_sysattr_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*,const char*);
+int (*udev_enumerate_add_match_property_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*,const char*);
+int (*udev_enumerate_add_match_sysname_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*);
+int (*udev_enumerate_add_match_tag_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*);
+int (*udev_enumerate_add_match_parent_dylibloader_wrapper_libudev)(struct udev_enumerate*,struct udev_device*);
+int (*udev_enumerate_add_match_is_initialized_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+int (*udev_enumerate_add_syspath_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*);
+int (*udev_enumerate_scan_devices_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+int (*udev_enumerate_scan_subsystems_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+struct udev_list_entry* (*udev_enumerate_get_list_entry_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+struct udev_queue* (*udev_queue_ref_dylibloader_wrapper_libudev)(struct udev_queue*);
+struct udev_queue* (*udev_queue_unref_dylibloader_wrapper_libudev)(struct udev_queue*);
+struct udev* (*udev_queue_get_udev_dylibloader_wrapper_libudev)(struct udev_queue*);
+struct udev_queue* (*udev_queue_new_dylibloader_wrapper_libudev)(struct udev*);
+unsigned long long int (*udev_queue_get_kernel_seqnum_dylibloader_wrapper_libudev)(struct udev_queue*);
+unsigned long long int (*udev_queue_get_udev_seqnum_dylibloader_wrapper_libudev)(struct udev_queue*);
+int (*udev_queue_get_udev_is_active_dylibloader_wrapper_libudev)(struct udev_queue*);
+int (*udev_queue_get_queue_is_empty_dylibloader_wrapper_libudev)(struct udev_queue*);
+int (*udev_queue_get_seqnum_is_finished_dylibloader_wrapper_libudev)(struct udev_queue*, unsigned long long int);
+int (*udev_queue_get_seqnum_sequence_is_finished_dylibloader_wrapper_libudev)(struct udev_queue*, unsigned long long int, unsigned long long int);
+int (*udev_queue_get_fd_dylibloader_wrapper_libudev)(struct udev_queue*);
+int (*udev_queue_flush_dylibloader_wrapper_libudev)(struct udev_queue*);
+struct udev_list_entry* (*udev_queue_get_queued_list_entry_dylibloader_wrapper_libudev)(struct udev_queue*);
+struct udev_hwdb* (*udev_hwdb_new_dylibloader_wrapper_libudev)(struct udev*);
+struct udev_hwdb* (*udev_hwdb_ref_dylibloader_wrapper_libudev)(struct udev_hwdb*);
+struct udev_hwdb* (*udev_hwdb_unref_dylibloader_wrapper_libudev)(struct udev_hwdb*);
+struct udev_list_entry* (*udev_hwdb_get_properties_list_entry_dylibloader_wrapper_libudev)(struct udev_hwdb*,const char*, unsigned);
+int (*udev_util_encode_string_dylibloader_wrapper_libudev)(const char*, char*, size_t);
+int initialize_libudev() {
+ void *handle;
+ char *error;
+ handle = dlopen("libudev.so.1", RTLD_LAZY);
+ if (!handle) {
+ fprintf(stderr, "%s\n", dlerror());
+ return(1);
+ }
+ dlerror();
+// udev_ref
+ *(void **) (&udev_ref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_unref
+ *(void **) (&udev_unref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_unref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_new
+ *(void **) (&udev_new_dylibloader_wrapper_libudev) = dlsym(handle, "udev_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_set_log_fn
+ *(void **) (&udev_set_log_fn_dylibloader_wrapper_libudev) = dlsym(handle, "udev_set_log_fn");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_get_log_priority
+ *(void **) (&udev_get_log_priority_dylibloader_wrapper_libudev) = dlsym(handle, "udev_get_log_priority");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_set_log_priority
+ *(void **) (&udev_set_log_priority_dylibloader_wrapper_libudev) = dlsym(handle, "udev_set_log_priority");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_get_userdata
+ *(void **) (&udev_get_userdata_dylibloader_wrapper_libudev) = dlsym(handle, "udev_get_userdata");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_set_userdata
+ *(void **) (&udev_set_userdata_dylibloader_wrapper_libudev) = dlsym(handle, "udev_set_userdata");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_list_entry_get_next
+ *(void **) (&udev_list_entry_get_next_dylibloader_wrapper_libudev) = dlsym(handle, "udev_list_entry_get_next");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_list_entry_get_by_name
+ *(void **) (&udev_list_entry_get_by_name_dylibloader_wrapper_libudev) = dlsym(handle, "udev_list_entry_get_by_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_list_entry_get_name
+ *(void **) (&udev_list_entry_get_name_dylibloader_wrapper_libudev) = dlsym(handle, "udev_list_entry_get_name");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_list_entry_get_value
+ *(void **) (&udev_list_entry_get_value_dylibloader_wrapper_libudev) = dlsym(handle, "udev_list_entry_get_value");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_ref
+ *(void **) (&udev_device_ref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_unref
+ *(void **) (&udev_device_unref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_unref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_udev
+ *(void **) (&udev_device_get_udev_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_udev");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_new_from_syspath
+ *(void **) (&udev_device_new_from_syspath_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_new_from_syspath");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_new_from_devnum
+ *(void **) (&udev_device_new_from_devnum_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_new_from_devnum");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_new_from_subsystem_sysname
+ *(void **) (&udev_device_new_from_subsystem_sysname_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_new_from_subsystem_sysname");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_new_from_device_id
+ *(void **) (&udev_device_new_from_device_id_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_new_from_device_id");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_new_from_environment
+ *(void **) (&udev_device_new_from_environment_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_new_from_environment");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_parent
+ *(void **) (&udev_device_get_parent_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_parent");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_parent_with_subsystem_devtype
+ *(void **) (&udev_device_get_parent_with_subsystem_devtype_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_parent_with_subsystem_devtype");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_devpath
+ *(void **) (&udev_device_get_devpath_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_devpath");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_subsystem
+ *(void **) (&udev_device_get_subsystem_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_subsystem");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_devtype
+ *(void **) (&udev_device_get_devtype_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_devtype");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_syspath
+ *(void **) (&udev_device_get_syspath_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_syspath");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_sysname
+ *(void **) (&udev_device_get_sysname_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_sysname");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_sysnum
+ *(void **) (&udev_device_get_sysnum_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_sysnum");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_devnode
+ *(void **) (&udev_device_get_devnode_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_devnode");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_is_initialized
+ *(void **) (&udev_device_get_is_initialized_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_is_initialized");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_devlinks_list_entry
+ *(void **) (&udev_device_get_devlinks_list_entry_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_devlinks_list_entry");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_properties_list_entry
+ *(void **) (&udev_device_get_properties_list_entry_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_properties_list_entry");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_tags_list_entry
+ *(void **) (&udev_device_get_tags_list_entry_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_tags_list_entry");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_sysattr_list_entry
+ *(void **) (&udev_device_get_sysattr_list_entry_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_sysattr_list_entry");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_property_value
+ *(void **) (&udev_device_get_property_value_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_property_value");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_driver
+ *(void **) (&udev_device_get_driver_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_driver");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_devnum
+ *(void **) (&udev_device_get_devnum_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_devnum");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_action
+ *(void **) (&udev_device_get_action_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_action");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_seqnum
+ *(void **) (&udev_device_get_seqnum_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_seqnum");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_usec_since_initialized
+ *(void **) (&udev_device_get_usec_since_initialized_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_usec_since_initialized");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_get_sysattr_value
+ *(void **) (&udev_device_get_sysattr_value_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_get_sysattr_value");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_set_sysattr_value
+ *(void **) (&udev_device_set_sysattr_value_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_set_sysattr_value");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_device_has_tag
+ *(void **) (&udev_device_has_tag_dylibloader_wrapper_libudev) = dlsym(handle, "udev_device_has_tag");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_ref
+ *(void **) (&udev_monitor_ref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_unref
+ *(void **) (&udev_monitor_unref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_unref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_get_udev
+ *(void **) (&udev_monitor_get_udev_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_get_udev");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_new_from_netlink
+ *(void **) (&udev_monitor_new_from_netlink_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_new_from_netlink");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_enable_receiving
+ *(void **) (&udev_monitor_enable_receiving_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_enable_receiving");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_set_receive_buffer_size
+ *(void **) (&udev_monitor_set_receive_buffer_size_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_set_receive_buffer_size");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_get_fd
+ *(void **) (&udev_monitor_get_fd_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_get_fd");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_receive_device
+ *(void **) (&udev_monitor_receive_device_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_receive_device");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_filter_add_match_subsystem_devtype
+ *(void **) (&udev_monitor_filter_add_match_subsystem_devtype_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_filter_add_match_subsystem_devtype");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_filter_add_match_tag
+ *(void **) (&udev_monitor_filter_add_match_tag_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_filter_add_match_tag");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_filter_update
+ *(void **) (&udev_monitor_filter_update_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_filter_update");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_monitor_filter_remove
+ *(void **) (&udev_monitor_filter_remove_dylibloader_wrapper_libudev) = dlsym(handle, "udev_monitor_filter_remove");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_ref
+ *(void **) (&udev_enumerate_ref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_unref
+ *(void **) (&udev_enumerate_unref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_unref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_get_udev
+ *(void **) (&udev_enumerate_get_udev_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_get_udev");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_new
+ *(void **) (&udev_enumerate_new_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_add_match_subsystem
+ *(void **) (&udev_enumerate_add_match_subsystem_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_add_match_subsystem");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_add_nomatch_subsystem
+ *(void **) (&udev_enumerate_add_nomatch_subsystem_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_add_nomatch_subsystem");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_add_match_sysattr
+ *(void **) (&udev_enumerate_add_match_sysattr_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_add_match_sysattr");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_add_nomatch_sysattr
+ *(void **) (&udev_enumerate_add_nomatch_sysattr_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_add_nomatch_sysattr");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_add_match_property
+ *(void **) (&udev_enumerate_add_match_property_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_add_match_property");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_add_match_sysname
+ *(void **) (&udev_enumerate_add_match_sysname_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_add_match_sysname");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_add_match_tag
+ *(void **) (&udev_enumerate_add_match_tag_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_add_match_tag");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_add_match_parent
+ *(void **) (&udev_enumerate_add_match_parent_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_add_match_parent");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_add_match_is_initialized
+ *(void **) (&udev_enumerate_add_match_is_initialized_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_add_match_is_initialized");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_add_syspath
+ *(void **) (&udev_enumerate_add_syspath_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_add_syspath");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_scan_devices
+ *(void **) (&udev_enumerate_scan_devices_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_scan_devices");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_scan_subsystems
+ *(void **) (&udev_enumerate_scan_subsystems_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_scan_subsystems");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_enumerate_get_list_entry
+ *(void **) (&udev_enumerate_get_list_entry_dylibloader_wrapper_libudev) = dlsym(handle, "udev_enumerate_get_list_entry");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_ref
+ *(void **) (&udev_queue_ref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_unref
+ *(void **) (&udev_queue_unref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_unref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_get_udev
+ *(void **) (&udev_queue_get_udev_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_get_udev");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_new
+ *(void **) (&udev_queue_new_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_get_kernel_seqnum
+ *(void **) (&udev_queue_get_kernel_seqnum_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_get_kernel_seqnum");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_get_udev_seqnum
+ *(void **) (&udev_queue_get_udev_seqnum_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_get_udev_seqnum");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_get_udev_is_active
+ *(void **) (&udev_queue_get_udev_is_active_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_get_udev_is_active");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_get_queue_is_empty
+ *(void **) (&udev_queue_get_queue_is_empty_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_get_queue_is_empty");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_get_seqnum_is_finished
+ *(void **) (&udev_queue_get_seqnum_is_finished_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_get_seqnum_is_finished");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_get_seqnum_sequence_is_finished
+ *(void **) (&udev_queue_get_seqnum_sequence_is_finished_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_get_seqnum_sequence_is_finished");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_get_fd
+ *(void **) (&udev_queue_get_fd_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_get_fd");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_flush
+ *(void **) (&udev_queue_flush_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_flush");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_queue_get_queued_list_entry
+ *(void **) (&udev_queue_get_queued_list_entry_dylibloader_wrapper_libudev) = dlsym(handle, "udev_queue_get_queued_list_entry");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_hwdb_new
+ *(void **) (&udev_hwdb_new_dylibloader_wrapper_libudev) = dlsym(handle, "udev_hwdb_new");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_hwdb_ref
+ *(void **) (&udev_hwdb_ref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_hwdb_ref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_hwdb_unref
+ *(void **) (&udev_hwdb_unref_dylibloader_wrapper_libudev) = dlsym(handle, "udev_hwdb_unref");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_hwdb_get_properties_list_entry
+ *(void **) (&udev_hwdb_get_properties_list_entry_dylibloader_wrapper_libudev) = dlsym(handle, "udev_hwdb_get_properties_list_entry");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+// udev_util_encode_string
+ *(void **) (&udev_util_encode_string_dylibloader_wrapper_libudev) = dlsym(handle, "udev_util_encode_string");
+ error = dlerror();
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error);
+ }
+return 0;
+}
diff --git a/platform/linuxbsd/libudev-so_wrap.h b/platform/linuxbsd/libudev-so_wrap.h
new file mode 100644
index 0000000000..f6d949fa4a
--- /dev/null
+++ b/platform/linuxbsd/libudev-so_wrap.h
@@ -0,0 +1,376 @@
+#ifndef DYLIBLOAD_WRAPPER_LIBUDEV
+#define DYLIBLOAD_WRAPPER_LIBUDEV
+// This file is generated. Do not edit!
+// see https://github.com/hpvb/dynload-wrapper for details
+// generated by /home/hp/Projects/godot/pulse/generate-wrapper.py 0.2 on 2021-02-18 00:18:56
+// flags: /home/hp/Projects/godot/pulse/generate-wrapper.py --include /usr/include/libudev.h --sys-include <libudev.h> --soname libudev.so.1 --init-name libudev --omit-prefix gnu_ --output-header libudev-so_wrap.h --output-implementation libudev-so_wrap.c
+//
+#define udev_ref udev_ref_dylibloader_orig_libudev
+#define udev_unref udev_unref_dylibloader_orig_libudev
+#define udev_new udev_new_dylibloader_orig_libudev
+#define udev_set_log_fn udev_set_log_fn_dylibloader_orig_libudev
+#define udev_get_log_priority udev_get_log_priority_dylibloader_orig_libudev
+#define udev_set_log_priority udev_set_log_priority_dylibloader_orig_libudev
+#define udev_get_userdata udev_get_userdata_dylibloader_orig_libudev
+#define udev_set_userdata udev_set_userdata_dylibloader_orig_libudev
+#define udev_list_entry_get_next udev_list_entry_get_next_dylibloader_orig_libudev
+#define udev_list_entry_get_by_name udev_list_entry_get_by_name_dylibloader_orig_libudev
+#define udev_list_entry_get_name udev_list_entry_get_name_dylibloader_orig_libudev
+#define udev_list_entry_get_value udev_list_entry_get_value_dylibloader_orig_libudev
+#define udev_device_ref udev_device_ref_dylibloader_orig_libudev
+#define udev_device_unref udev_device_unref_dylibloader_orig_libudev
+#define udev_device_get_udev udev_device_get_udev_dylibloader_orig_libudev
+#define udev_device_new_from_syspath udev_device_new_from_syspath_dylibloader_orig_libudev
+#define udev_device_new_from_devnum udev_device_new_from_devnum_dylibloader_orig_libudev
+#define udev_device_new_from_subsystem_sysname udev_device_new_from_subsystem_sysname_dylibloader_orig_libudev
+#define udev_device_new_from_device_id udev_device_new_from_device_id_dylibloader_orig_libudev
+#define udev_device_new_from_environment udev_device_new_from_environment_dylibloader_orig_libudev
+#define udev_device_get_parent udev_device_get_parent_dylibloader_orig_libudev
+#define udev_device_get_parent_with_subsystem_devtype udev_device_get_parent_with_subsystem_devtype_dylibloader_orig_libudev
+#define udev_device_get_devpath udev_device_get_devpath_dylibloader_orig_libudev
+#define udev_device_get_subsystem udev_device_get_subsystem_dylibloader_orig_libudev
+#define udev_device_get_devtype udev_device_get_devtype_dylibloader_orig_libudev
+#define udev_device_get_syspath udev_device_get_syspath_dylibloader_orig_libudev
+#define udev_device_get_sysname udev_device_get_sysname_dylibloader_orig_libudev
+#define udev_device_get_sysnum udev_device_get_sysnum_dylibloader_orig_libudev
+#define udev_device_get_devnode udev_device_get_devnode_dylibloader_orig_libudev
+#define udev_device_get_is_initialized udev_device_get_is_initialized_dylibloader_orig_libudev
+#define udev_device_get_devlinks_list_entry udev_device_get_devlinks_list_entry_dylibloader_orig_libudev
+#define udev_device_get_properties_list_entry udev_device_get_properties_list_entry_dylibloader_orig_libudev
+#define udev_device_get_tags_list_entry udev_device_get_tags_list_entry_dylibloader_orig_libudev
+#define udev_device_get_sysattr_list_entry udev_device_get_sysattr_list_entry_dylibloader_orig_libudev
+#define udev_device_get_property_value udev_device_get_property_value_dylibloader_orig_libudev
+#define udev_device_get_driver udev_device_get_driver_dylibloader_orig_libudev
+#define udev_device_get_devnum udev_device_get_devnum_dylibloader_orig_libudev
+#define udev_device_get_action udev_device_get_action_dylibloader_orig_libudev
+#define udev_device_get_seqnum udev_device_get_seqnum_dylibloader_orig_libudev
+#define udev_device_get_usec_since_initialized udev_device_get_usec_since_initialized_dylibloader_orig_libudev
+#define udev_device_get_sysattr_value udev_device_get_sysattr_value_dylibloader_orig_libudev
+#define udev_device_set_sysattr_value udev_device_set_sysattr_value_dylibloader_orig_libudev
+#define udev_device_has_tag udev_device_has_tag_dylibloader_orig_libudev
+#define udev_monitor_ref udev_monitor_ref_dylibloader_orig_libudev
+#define udev_monitor_unref udev_monitor_unref_dylibloader_orig_libudev
+#define udev_monitor_get_udev udev_monitor_get_udev_dylibloader_orig_libudev
+#define udev_monitor_new_from_netlink udev_monitor_new_from_netlink_dylibloader_orig_libudev
+#define udev_monitor_enable_receiving udev_monitor_enable_receiving_dylibloader_orig_libudev
+#define udev_monitor_set_receive_buffer_size udev_monitor_set_receive_buffer_size_dylibloader_orig_libudev
+#define udev_monitor_get_fd udev_monitor_get_fd_dylibloader_orig_libudev
+#define udev_monitor_receive_device udev_monitor_receive_device_dylibloader_orig_libudev
+#define udev_monitor_filter_add_match_subsystem_devtype udev_monitor_filter_add_match_subsystem_devtype_dylibloader_orig_libudev
+#define udev_monitor_filter_add_match_tag udev_monitor_filter_add_match_tag_dylibloader_orig_libudev
+#define udev_monitor_filter_update udev_monitor_filter_update_dylibloader_orig_libudev
+#define udev_monitor_filter_remove udev_monitor_filter_remove_dylibloader_orig_libudev
+#define udev_enumerate_ref udev_enumerate_ref_dylibloader_orig_libudev
+#define udev_enumerate_unref udev_enumerate_unref_dylibloader_orig_libudev
+#define udev_enumerate_get_udev udev_enumerate_get_udev_dylibloader_orig_libudev
+#define udev_enumerate_new udev_enumerate_new_dylibloader_orig_libudev
+#define udev_enumerate_add_match_subsystem udev_enumerate_add_match_subsystem_dylibloader_orig_libudev
+#define udev_enumerate_add_nomatch_subsystem udev_enumerate_add_nomatch_subsystem_dylibloader_orig_libudev
+#define udev_enumerate_add_match_sysattr udev_enumerate_add_match_sysattr_dylibloader_orig_libudev
+#define udev_enumerate_add_nomatch_sysattr udev_enumerate_add_nomatch_sysattr_dylibloader_orig_libudev
+#define udev_enumerate_add_match_property udev_enumerate_add_match_property_dylibloader_orig_libudev
+#define udev_enumerate_add_match_sysname udev_enumerate_add_match_sysname_dylibloader_orig_libudev
+#define udev_enumerate_add_match_tag udev_enumerate_add_match_tag_dylibloader_orig_libudev
+#define udev_enumerate_add_match_parent udev_enumerate_add_match_parent_dylibloader_orig_libudev
+#define udev_enumerate_add_match_is_initialized udev_enumerate_add_match_is_initialized_dylibloader_orig_libudev
+#define udev_enumerate_add_syspath udev_enumerate_add_syspath_dylibloader_orig_libudev
+#define udev_enumerate_scan_devices udev_enumerate_scan_devices_dylibloader_orig_libudev
+#define udev_enumerate_scan_subsystems udev_enumerate_scan_subsystems_dylibloader_orig_libudev
+#define udev_enumerate_get_list_entry udev_enumerate_get_list_entry_dylibloader_orig_libudev
+#define udev_queue_ref udev_queue_ref_dylibloader_orig_libudev
+#define udev_queue_unref udev_queue_unref_dylibloader_orig_libudev
+#define udev_queue_get_udev udev_queue_get_udev_dylibloader_orig_libudev
+#define udev_queue_new udev_queue_new_dylibloader_orig_libudev
+#define udev_queue_get_kernel_seqnum udev_queue_get_kernel_seqnum_dylibloader_orig_libudev
+#define udev_queue_get_udev_seqnum udev_queue_get_udev_seqnum_dylibloader_orig_libudev
+#define udev_queue_get_udev_is_active udev_queue_get_udev_is_active_dylibloader_orig_libudev
+#define udev_queue_get_queue_is_empty udev_queue_get_queue_is_empty_dylibloader_orig_libudev
+#define udev_queue_get_seqnum_is_finished udev_queue_get_seqnum_is_finished_dylibloader_orig_libudev
+#define udev_queue_get_seqnum_sequence_is_finished udev_queue_get_seqnum_sequence_is_finished_dylibloader_orig_libudev
+#define udev_queue_get_fd udev_queue_get_fd_dylibloader_orig_libudev
+#define udev_queue_flush udev_queue_flush_dylibloader_orig_libudev
+#define udev_queue_get_queued_list_entry udev_queue_get_queued_list_entry_dylibloader_orig_libudev
+#define udev_hwdb_new udev_hwdb_new_dylibloader_orig_libudev
+#define udev_hwdb_ref udev_hwdb_ref_dylibloader_orig_libudev
+#define udev_hwdb_unref udev_hwdb_unref_dylibloader_orig_libudev
+#define udev_hwdb_get_properties_list_entry udev_hwdb_get_properties_list_entry_dylibloader_orig_libudev
+#define udev_util_encode_string udev_util_encode_string_dylibloader_orig_libudev
+#include <libudev.h>
+#undef udev_ref
+#undef udev_unref
+#undef udev_new
+#undef udev_set_log_fn
+#undef udev_get_log_priority
+#undef udev_set_log_priority
+#undef udev_get_userdata
+#undef udev_set_userdata
+#undef udev_list_entry_get_next
+#undef udev_list_entry_get_by_name
+#undef udev_list_entry_get_name
+#undef udev_list_entry_get_value
+#undef udev_device_ref
+#undef udev_device_unref
+#undef udev_device_get_udev
+#undef udev_device_new_from_syspath
+#undef udev_device_new_from_devnum
+#undef udev_device_new_from_subsystem_sysname
+#undef udev_device_new_from_device_id
+#undef udev_device_new_from_environment
+#undef udev_device_get_parent
+#undef udev_device_get_parent_with_subsystem_devtype
+#undef udev_device_get_devpath
+#undef udev_device_get_subsystem
+#undef udev_device_get_devtype
+#undef udev_device_get_syspath
+#undef udev_device_get_sysname
+#undef udev_device_get_sysnum
+#undef udev_device_get_devnode
+#undef udev_device_get_is_initialized
+#undef udev_device_get_devlinks_list_entry
+#undef udev_device_get_properties_list_entry
+#undef udev_device_get_tags_list_entry
+#undef udev_device_get_sysattr_list_entry
+#undef udev_device_get_property_value
+#undef udev_device_get_driver
+#undef udev_device_get_devnum
+#undef udev_device_get_action
+#undef udev_device_get_seqnum
+#undef udev_device_get_usec_since_initialized
+#undef udev_device_get_sysattr_value
+#undef udev_device_set_sysattr_value
+#undef udev_device_has_tag
+#undef udev_monitor_ref
+#undef udev_monitor_unref
+#undef udev_monitor_get_udev
+#undef udev_monitor_new_from_netlink
+#undef udev_monitor_enable_receiving
+#undef udev_monitor_set_receive_buffer_size
+#undef udev_monitor_get_fd
+#undef udev_monitor_receive_device
+#undef udev_monitor_filter_add_match_subsystem_devtype
+#undef udev_monitor_filter_add_match_tag
+#undef udev_monitor_filter_update
+#undef udev_monitor_filter_remove
+#undef udev_enumerate_ref
+#undef udev_enumerate_unref
+#undef udev_enumerate_get_udev
+#undef udev_enumerate_new
+#undef udev_enumerate_add_match_subsystem
+#undef udev_enumerate_add_nomatch_subsystem
+#undef udev_enumerate_add_match_sysattr
+#undef udev_enumerate_add_nomatch_sysattr
+#undef udev_enumerate_add_match_property
+#undef udev_enumerate_add_match_sysname
+#undef udev_enumerate_add_match_tag
+#undef udev_enumerate_add_match_parent
+#undef udev_enumerate_add_match_is_initialized
+#undef udev_enumerate_add_syspath
+#undef udev_enumerate_scan_devices
+#undef udev_enumerate_scan_subsystems
+#undef udev_enumerate_get_list_entry
+#undef udev_queue_ref
+#undef udev_queue_unref
+#undef udev_queue_get_udev
+#undef udev_queue_new
+#undef udev_queue_get_kernel_seqnum
+#undef udev_queue_get_udev_seqnum
+#undef udev_queue_get_udev_is_active
+#undef udev_queue_get_queue_is_empty
+#undef udev_queue_get_seqnum_is_finished
+#undef udev_queue_get_seqnum_sequence_is_finished
+#undef udev_queue_get_fd
+#undef udev_queue_flush
+#undef udev_queue_get_queued_list_entry
+#undef udev_hwdb_new
+#undef udev_hwdb_ref
+#undef udev_hwdb_unref
+#undef udev_hwdb_get_properties_list_entry
+#undef udev_util_encode_string
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define udev_ref udev_ref_dylibloader_wrapper_libudev
+#define udev_unref udev_unref_dylibloader_wrapper_libudev
+#define udev_new udev_new_dylibloader_wrapper_libudev
+#define udev_set_log_fn udev_set_log_fn_dylibloader_wrapper_libudev
+#define udev_get_log_priority udev_get_log_priority_dylibloader_wrapper_libudev
+#define udev_set_log_priority udev_set_log_priority_dylibloader_wrapper_libudev
+#define udev_get_userdata udev_get_userdata_dylibloader_wrapper_libudev
+#define udev_set_userdata udev_set_userdata_dylibloader_wrapper_libudev
+#define udev_list_entry_get_next udev_list_entry_get_next_dylibloader_wrapper_libudev
+#define udev_list_entry_get_by_name udev_list_entry_get_by_name_dylibloader_wrapper_libudev
+#define udev_list_entry_get_name udev_list_entry_get_name_dylibloader_wrapper_libudev
+#define udev_list_entry_get_value udev_list_entry_get_value_dylibloader_wrapper_libudev
+#define udev_device_ref udev_device_ref_dylibloader_wrapper_libudev
+#define udev_device_unref udev_device_unref_dylibloader_wrapper_libudev
+#define udev_device_get_udev udev_device_get_udev_dylibloader_wrapper_libudev
+#define udev_device_new_from_syspath udev_device_new_from_syspath_dylibloader_wrapper_libudev
+#define udev_device_new_from_devnum udev_device_new_from_devnum_dylibloader_wrapper_libudev
+#define udev_device_new_from_subsystem_sysname udev_device_new_from_subsystem_sysname_dylibloader_wrapper_libudev
+#define udev_device_new_from_device_id udev_device_new_from_device_id_dylibloader_wrapper_libudev
+#define udev_device_new_from_environment udev_device_new_from_environment_dylibloader_wrapper_libudev
+#define udev_device_get_parent udev_device_get_parent_dylibloader_wrapper_libudev
+#define udev_device_get_parent_with_subsystem_devtype udev_device_get_parent_with_subsystem_devtype_dylibloader_wrapper_libudev
+#define udev_device_get_devpath udev_device_get_devpath_dylibloader_wrapper_libudev
+#define udev_device_get_subsystem udev_device_get_subsystem_dylibloader_wrapper_libudev
+#define udev_device_get_devtype udev_device_get_devtype_dylibloader_wrapper_libudev
+#define udev_device_get_syspath udev_device_get_syspath_dylibloader_wrapper_libudev
+#define udev_device_get_sysname udev_device_get_sysname_dylibloader_wrapper_libudev
+#define udev_device_get_sysnum udev_device_get_sysnum_dylibloader_wrapper_libudev
+#define udev_device_get_devnode udev_device_get_devnode_dylibloader_wrapper_libudev
+#define udev_device_get_is_initialized udev_device_get_is_initialized_dylibloader_wrapper_libudev
+#define udev_device_get_devlinks_list_entry udev_device_get_devlinks_list_entry_dylibloader_wrapper_libudev
+#define udev_device_get_properties_list_entry udev_device_get_properties_list_entry_dylibloader_wrapper_libudev
+#define udev_device_get_tags_list_entry udev_device_get_tags_list_entry_dylibloader_wrapper_libudev
+#define udev_device_get_sysattr_list_entry udev_device_get_sysattr_list_entry_dylibloader_wrapper_libudev
+#define udev_device_get_property_value udev_device_get_property_value_dylibloader_wrapper_libudev
+#define udev_device_get_driver udev_device_get_driver_dylibloader_wrapper_libudev
+#define udev_device_get_devnum udev_device_get_devnum_dylibloader_wrapper_libudev
+#define udev_device_get_action udev_device_get_action_dylibloader_wrapper_libudev
+#define udev_device_get_seqnum udev_device_get_seqnum_dylibloader_wrapper_libudev
+#define udev_device_get_usec_since_initialized udev_device_get_usec_since_initialized_dylibloader_wrapper_libudev
+#define udev_device_get_sysattr_value udev_device_get_sysattr_value_dylibloader_wrapper_libudev
+#define udev_device_set_sysattr_value udev_device_set_sysattr_value_dylibloader_wrapper_libudev
+#define udev_device_has_tag udev_device_has_tag_dylibloader_wrapper_libudev
+#define udev_monitor_ref udev_monitor_ref_dylibloader_wrapper_libudev
+#define udev_monitor_unref udev_monitor_unref_dylibloader_wrapper_libudev
+#define udev_monitor_get_udev udev_monitor_get_udev_dylibloader_wrapper_libudev
+#define udev_monitor_new_from_netlink udev_monitor_new_from_netlink_dylibloader_wrapper_libudev
+#define udev_monitor_enable_receiving udev_monitor_enable_receiving_dylibloader_wrapper_libudev
+#define udev_monitor_set_receive_buffer_size udev_monitor_set_receive_buffer_size_dylibloader_wrapper_libudev
+#define udev_monitor_get_fd udev_monitor_get_fd_dylibloader_wrapper_libudev
+#define udev_monitor_receive_device udev_monitor_receive_device_dylibloader_wrapper_libudev
+#define udev_monitor_filter_add_match_subsystem_devtype udev_monitor_filter_add_match_subsystem_devtype_dylibloader_wrapper_libudev
+#define udev_monitor_filter_add_match_tag udev_monitor_filter_add_match_tag_dylibloader_wrapper_libudev
+#define udev_monitor_filter_update udev_monitor_filter_update_dylibloader_wrapper_libudev
+#define udev_monitor_filter_remove udev_monitor_filter_remove_dylibloader_wrapper_libudev
+#define udev_enumerate_ref udev_enumerate_ref_dylibloader_wrapper_libudev
+#define udev_enumerate_unref udev_enumerate_unref_dylibloader_wrapper_libudev
+#define udev_enumerate_get_udev udev_enumerate_get_udev_dylibloader_wrapper_libudev
+#define udev_enumerate_new udev_enumerate_new_dylibloader_wrapper_libudev
+#define udev_enumerate_add_match_subsystem udev_enumerate_add_match_subsystem_dylibloader_wrapper_libudev
+#define udev_enumerate_add_nomatch_subsystem udev_enumerate_add_nomatch_subsystem_dylibloader_wrapper_libudev
+#define udev_enumerate_add_match_sysattr udev_enumerate_add_match_sysattr_dylibloader_wrapper_libudev
+#define udev_enumerate_add_nomatch_sysattr udev_enumerate_add_nomatch_sysattr_dylibloader_wrapper_libudev
+#define udev_enumerate_add_match_property udev_enumerate_add_match_property_dylibloader_wrapper_libudev
+#define udev_enumerate_add_match_sysname udev_enumerate_add_match_sysname_dylibloader_wrapper_libudev
+#define udev_enumerate_add_match_tag udev_enumerate_add_match_tag_dylibloader_wrapper_libudev
+#define udev_enumerate_add_match_parent udev_enumerate_add_match_parent_dylibloader_wrapper_libudev
+#define udev_enumerate_add_match_is_initialized udev_enumerate_add_match_is_initialized_dylibloader_wrapper_libudev
+#define udev_enumerate_add_syspath udev_enumerate_add_syspath_dylibloader_wrapper_libudev
+#define udev_enumerate_scan_devices udev_enumerate_scan_devices_dylibloader_wrapper_libudev
+#define udev_enumerate_scan_subsystems udev_enumerate_scan_subsystems_dylibloader_wrapper_libudev
+#define udev_enumerate_get_list_entry udev_enumerate_get_list_entry_dylibloader_wrapper_libudev
+#define udev_queue_ref udev_queue_ref_dylibloader_wrapper_libudev
+#define udev_queue_unref udev_queue_unref_dylibloader_wrapper_libudev
+#define udev_queue_get_udev udev_queue_get_udev_dylibloader_wrapper_libudev
+#define udev_queue_new udev_queue_new_dylibloader_wrapper_libudev
+#define udev_queue_get_kernel_seqnum udev_queue_get_kernel_seqnum_dylibloader_wrapper_libudev
+#define udev_queue_get_udev_seqnum udev_queue_get_udev_seqnum_dylibloader_wrapper_libudev
+#define udev_queue_get_udev_is_active udev_queue_get_udev_is_active_dylibloader_wrapper_libudev
+#define udev_queue_get_queue_is_empty udev_queue_get_queue_is_empty_dylibloader_wrapper_libudev
+#define udev_queue_get_seqnum_is_finished udev_queue_get_seqnum_is_finished_dylibloader_wrapper_libudev
+#define udev_queue_get_seqnum_sequence_is_finished udev_queue_get_seqnum_sequence_is_finished_dylibloader_wrapper_libudev
+#define udev_queue_get_fd udev_queue_get_fd_dylibloader_wrapper_libudev
+#define udev_queue_flush udev_queue_flush_dylibloader_wrapper_libudev
+#define udev_queue_get_queued_list_entry udev_queue_get_queued_list_entry_dylibloader_wrapper_libudev
+#define udev_hwdb_new udev_hwdb_new_dylibloader_wrapper_libudev
+#define udev_hwdb_ref udev_hwdb_ref_dylibloader_wrapper_libudev
+#define udev_hwdb_unref udev_hwdb_unref_dylibloader_wrapper_libudev
+#define udev_hwdb_get_properties_list_entry udev_hwdb_get_properties_list_entry_dylibloader_wrapper_libudev
+#define udev_util_encode_string udev_util_encode_string_dylibloader_wrapper_libudev
+extern struct udev* (*udev_ref_dylibloader_wrapper_libudev)(struct udev*);
+extern struct udev* (*udev_unref_dylibloader_wrapper_libudev)(struct udev*);
+extern struct udev* (*udev_new_dylibloader_wrapper_libudev)( void);
+extern void (*udev_set_log_fn_dylibloader_wrapper_libudev)(struct udev*, void*);
+extern int (*udev_get_log_priority_dylibloader_wrapper_libudev)(struct udev*);
+extern void (*udev_set_log_priority_dylibloader_wrapper_libudev)(struct udev*, int);
+extern void* (*udev_get_userdata_dylibloader_wrapper_libudev)(struct udev*);
+extern void (*udev_set_userdata_dylibloader_wrapper_libudev)(struct udev*, void*);
+extern struct udev_list_entry* (*udev_list_entry_get_next_dylibloader_wrapper_libudev)(struct udev_list_entry*);
+extern struct udev_list_entry* (*udev_list_entry_get_by_name_dylibloader_wrapper_libudev)(struct udev_list_entry*,const char*);
+extern const char* (*udev_list_entry_get_name_dylibloader_wrapper_libudev)(struct udev_list_entry*);
+extern const char* (*udev_list_entry_get_value_dylibloader_wrapper_libudev)(struct udev_list_entry*);
+extern struct udev_device* (*udev_device_ref_dylibloader_wrapper_libudev)(struct udev_device*);
+extern struct udev_device* (*udev_device_unref_dylibloader_wrapper_libudev)(struct udev_device*);
+extern struct udev* (*udev_device_get_udev_dylibloader_wrapper_libudev)(struct udev_device*);
+extern struct udev_device* (*udev_device_new_from_syspath_dylibloader_wrapper_libudev)(struct udev*,const char*);
+extern struct udev_device* (*udev_device_new_from_devnum_dylibloader_wrapper_libudev)(struct udev*, char, dev_t);
+extern struct udev_device* (*udev_device_new_from_subsystem_sysname_dylibloader_wrapper_libudev)(struct udev*,const char*,const char*);
+extern struct udev_device* (*udev_device_new_from_device_id_dylibloader_wrapper_libudev)(struct udev*,const char*);
+extern struct udev_device* (*udev_device_new_from_environment_dylibloader_wrapper_libudev)(struct udev*);
+extern struct udev_device* (*udev_device_get_parent_dylibloader_wrapper_libudev)(struct udev_device*);
+extern struct udev_device* (*udev_device_get_parent_with_subsystem_devtype_dylibloader_wrapper_libudev)(struct udev_device*,const char*,const char*);
+extern const char* (*udev_device_get_devpath_dylibloader_wrapper_libudev)(struct udev_device*);
+extern const char* (*udev_device_get_subsystem_dylibloader_wrapper_libudev)(struct udev_device*);
+extern const char* (*udev_device_get_devtype_dylibloader_wrapper_libudev)(struct udev_device*);
+extern const char* (*udev_device_get_syspath_dylibloader_wrapper_libudev)(struct udev_device*);
+extern const char* (*udev_device_get_sysname_dylibloader_wrapper_libudev)(struct udev_device*);
+extern const char* (*udev_device_get_sysnum_dylibloader_wrapper_libudev)(struct udev_device*);
+extern const char* (*udev_device_get_devnode_dylibloader_wrapper_libudev)(struct udev_device*);
+extern int (*udev_device_get_is_initialized_dylibloader_wrapper_libudev)(struct udev_device*);
+extern struct udev_list_entry* (*udev_device_get_devlinks_list_entry_dylibloader_wrapper_libudev)(struct udev_device*);
+extern struct udev_list_entry* (*udev_device_get_properties_list_entry_dylibloader_wrapper_libudev)(struct udev_device*);
+extern struct udev_list_entry* (*udev_device_get_tags_list_entry_dylibloader_wrapper_libudev)(struct udev_device*);
+extern struct udev_list_entry* (*udev_device_get_sysattr_list_entry_dylibloader_wrapper_libudev)(struct udev_device*);
+extern const char* (*udev_device_get_property_value_dylibloader_wrapper_libudev)(struct udev_device*,const char*);
+extern const char* (*udev_device_get_driver_dylibloader_wrapper_libudev)(struct udev_device*);
+extern dev_t (*udev_device_get_devnum_dylibloader_wrapper_libudev)(struct udev_device*);
+extern const char* (*udev_device_get_action_dylibloader_wrapper_libudev)(struct udev_device*);
+extern unsigned long long int (*udev_device_get_seqnum_dylibloader_wrapper_libudev)(struct udev_device*);
+extern unsigned long long int (*udev_device_get_usec_since_initialized_dylibloader_wrapper_libudev)(struct udev_device*);
+extern const char* (*udev_device_get_sysattr_value_dylibloader_wrapper_libudev)(struct udev_device*,const char*);
+extern int (*udev_device_set_sysattr_value_dylibloader_wrapper_libudev)(struct udev_device*,const char*,const char*);
+extern int (*udev_device_has_tag_dylibloader_wrapper_libudev)(struct udev_device*,const char*);
+extern struct udev_monitor* (*udev_monitor_ref_dylibloader_wrapper_libudev)(struct udev_monitor*);
+extern struct udev_monitor* (*udev_monitor_unref_dylibloader_wrapper_libudev)(struct udev_monitor*);
+extern struct udev* (*udev_monitor_get_udev_dylibloader_wrapper_libudev)(struct udev_monitor*);
+extern struct udev_monitor* (*udev_monitor_new_from_netlink_dylibloader_wrapper_libudev)(struct udev*,const char*);
+extern int (*udev_monitor_enable_receiving_dylibloader_wrapper_libudev)(struct udev_monitor*);
+extern int (*udev_monitor_set_receive_buffer_size_dylibloader_wrapper_libudev)(struct udev_monitor*, int);
+extern int (*udev_monitor_get_fd_dylibloader_wrapper_libudev)(struct udev_monitor*);
+extern struct udev_device* (*udev_monitor_receive_device_dylibloader_wrapper_libudev)(struct udev_monitor*);
+extern int (*udev_monitor_filter_add_match_subsystem_devtype_dylibloader_wrapper_libudev)(struct udev_monitor*,const char*,const char*);
+extern int (*udev_monitor_filter_add_match_tag_dylibloader_wrapper_libudev)(struct udev_monitor*,const char*);
+extern int (*udev_monitor_filter_update_dylibloader_wrapper_libudev)(struct udev_monitor*);
+extern int (*udev_monitor_filter_remove_dylibloader_wrapper_libudev)(struct udev_monitor*);
+extern struct udev_enumerate* (*udev_enumerate_ref_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+extern struct udev_enumerate* (*udev_enumerate_unref_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+extern struct udev* (*udev_enumerate_get_udev_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+extern struct udev_enumerate* (*udev_enumerate_new_dylibloader_wrapper_libudev)(struct udev*);
+extern int (*udev_enumerate_add_match_subsystem_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*);
+extern int (*udev_enumerate_add_nomatch_subsystem_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*);
+extern int (*udev_enumerate_add_match_sysattr_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*,const char*);
+extern int (*udev_enumerate_add_nomatch_sysattr_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*,const char*);
+extern int (*udev_enumerate_add_match_property_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*,const char*);
+extern int (*udev_enumerate_add_match_sysname_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*);
+extern int (*udev_enumerate_add_match_tag_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*);
+extern int (*udev_enumerate_add_match_parent_dylibloader_wrapper_libudev)(struct udev_enumerate*,struct udev_device*);
+extern int (*udev_enumerate_add_match_is_initialized_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+extern int (*udev_enumerate_add_syspath_dylibloader_wrapper_libudev)(struct udev_enumerate*,const char*);
+extern int (*udev_enumerate_scan_devices_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+extern int (*udev_enumerate_scan_subsystems_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+extern struct udev_list_entry* (*udev_enumerate_get_list_entry_dylibloader_wrapper_libudev)(struct udev_enumerate*);
+extern struct udev_queue* (*udev_queue_ref_dylibloader_wrapper_libudev)(struct udev_queue*);
+extern struct udev_queue* (*udev_queue_unref_dylibloader_wrapper_libudev)(struct udev_queue*);
+extern struct udev* (*udev_queue_get_udev_dylibloader_wrapper_libudev)(struct udev_queue*);
+extern struct udev_queue* (*udev_queue_new_dylibloader_wrapper_libudev)(struct udev*);
+extern unsigned long long int (*udev_queue_get_kernel_seqnum_dylibloader_wrapper_libudev)(struct udev_queue*);
+extern unsigned long long int (*udev_queue_get_udev_seqnum_dylibloader_wrapper_libudev)(struct udev_queue*);
+extern int (*udev_queue_get_udev_is_active_dylibloader_wrapper_libudev)(struct udev_queue*);
+extern int (*udev_queue_get_queue_is_empty_dylibloader_wrapper_libudev)(struct udev_queue*);
+extern int (*udev_queue_get_seqnum_is_finished_dylibloader_wrapper_libudev)(struct udev_queue*, unsigned long long int);
+extern int (*udev_queue_get_seqnum_sequence_is_finished_dylibloader_wrapper_libudev)(struct udev_queue*, unsigned long long int, unsigned long long int);
+extern int (*udev_queue_get_fd_dylibloader_wrapper_libudev)(struct udev_queue*);
+extern int (*udev_queue_flush_dylibloader_wrapper_libudev)(struct udev_queue*);
+extern struct udev_list_entry* (*udev_queue_get_queued_list_entry_dylibloader_wrapper_libudev)(struct udev_queue*);
+extern struct udev_hwdb* (*udev_hwdb_new_dylibloader_wrapper_libudev)(struct udev*);
+extern struct udev_hwdb* (*udev_hwdb_ref_dylibloader_wrapper_libudev)(struct udev_hwdb*);
+extern struct udev_hwdb* (*udev_hwdb_unref_dylibloader_wrapper_libudev)(struct udev_hwdb*);
+extern struct udev_list_entry* (*udev_hwdb_get_properties_list_entry_dylibloader_wrapper_libudev)(struct udev_hwdb*,const char*, unsigned);
+extern int (*udev_util_encode_string_dylibloader_wrapper_libudev)(const char*, char*, size_t);
+int initialize_libudev();
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linuxbsd/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp
index 44b3930d6c..09e1f9461c 100644
--- a/platform/linuxbsd/os_linuxbsd.cpp
+++ b/platform/linuxbsd/os_linuxbsd.cpp
@@ -410,7 +410,7 @@ Error OS_LinuxBSD::move_to_trash(const String &p_path) {
OS::Time time = OS::get_singleton()->get_time(false);
String timestamp = vformat("%04d-%02d-%02dT%02d:%02d:", date.year, date.month, date.day, time.hour, time.min);
timestamp = vformat("%s%02d", timestamp, time.sec); // vformat only supports up to 6 arguments.
- String trash_info = "[Trash Info]\nPath=" + p_path.http_escape() + "\nDeletionDate=" + timestamp + "\n";
+ String trash_info = "[Trash Info]\nPath=" + p_path.uri_encode() + "\nDeletionDate=" + timestamp + "\n";
{
Error err;
FileAccess *file = FileAccess::open(trash_path + "/info/" + file_name + ".trashinfo", FileAccess::WRITE, &err);
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
index aa95a89444..46c13d8550 100644
--- a/platform/osx/SCsub
+++ b/platform/osx/SCsub
@@ -18,5 +18,5 @@ files = [
prog = env.add_program("#bin/godot", files)
-if env["debug_symbols"] == "yes" and env["separate_debug_symbols"]:
+if env["debug_symbols"] and env["separate_debug_symbols"]:
env.AddPostAction(prog, run_in_subprocess(platform_osx_builders.make_debug_osx))
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index 466f68d269..acea00c5ac 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -31,7 +31,7 @@ def get_opts():
False,
),
EnumVariable("macports_clang", "Build using Clang from MacPorts", "no", ("no", "5.0", "devel")),
- EnumVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", "yes", ("yes", "no")),
+ BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
BoolVariable("use_ubsan", "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)", False),
BoolVariable("use_asan", "Use LLVM/GCC compiler address sanitizer (ASAN))", False),
@@ -54,7 +54,7 @@ def configure(env):
if env["arch"] != "arm64":
env.Prepend(CCFLAGS=["-msse2"])
- if env["debug_symbols"] == "yes":
+ if env["debug_symbols"]:
env.Prepend(CCFLAGS=["-g2"])
elif env["target"] == "release_debug":
@@ -63,7 +63,7 @@ def configure(env):
else: # optimize for size
env.Prepend(CCFLAGS=["-Os"])
env.Prepend(CPPDEFINES=["DEBUG_ENABLED"])
- if env["debug_symbols"] == "yes":
+ if env["debug_symbols"]:
env.Prepend(CCFLAGS=["-g2"])
elif env["target"] == "debug":
diff --git a/platform/osx/display_server_osx.h b/platform/osx/display_server_osx.h
index 597ebce6ff..9fac99810b 100644
--- a/platform/osx/display_server_osx.h
+++ b/platform/osx/display_server_osx.h
@@ -93,6 +93,7 @@ public:
List<WarpEvent> warp_events;
NSTimeInterval last_warp = 0;
+ bool ignore_warp = false;
Vector<KeyEvent> key_event_buffer;
int key_event_pos;
diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm
index 2d43454501..ed7d89009f 100644
--- a/platform/osx/display_server_osx.mm
+++ b/platform/osx/display_server_osx.mm
@@ -871,6 +871,15 @@ static void _mouseDownEvent(DisplayServer::WindowID window_id, NSEvent *event, i
NSPoint delta = NSMakePoint([event deltaX], [event deltaY]);
NSPoint mpos = [event locationInWindow];
+ if (DS_OSX->ignore_warp) {
+ // Discard late events, before warp
+ if (([event timestamp]) < DS_OSX->last_warp) {
+ return;
+ }
+ DS_OSX->ignore_warp = false;
+ return;
+ }
+
if (DS_OSX->mouse_mode == DisplayServer::MOUSE_MODE_CONFINED) {
// Discard late events
if (([event timestamp]) < DS_OSX->last_warp) {
@@ -2098,6 +2107,8 @@ void DisplayServerOSX::mouse_set_mode(MouseMode p_mode) {
CGAssociateMouseAndMouseCursorPosition(true);
}
+ last_warp = [[NSProcessInfo processInfo] systemUptime];
+ ignore_warp = true;
warp_events.clear();
mouse_mode = p_mode;
}
diff --git a/platform/server/detect.py b/platform/server/detect.py
index db503584d3..1c3fa990fe 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -32,13 +32,13 @@ def get_opts():
return [
BoolVariable("use_llvm", "Use the LLVM compiler", False),
- BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", False),
+ BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", True),
BoolVariable("use_coverage", "Test Godot coverage", 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),
BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN))", False),
- EnumVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", "yes", ("yes", "no")),
+ BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
BoolVariable("execinfo", "Use libexecinfo on systems where glibc is not available", False),
]
@@ -58,7 +58,7 @@ def configure(env):
else: # optimize for size
env.Prepend(CCFLAGS=["-Os"])
- if env["debug_symbols"] == "yes":
+ if env["debug_symbols"]:
env.Prepend(CCFLAGS=["-g2"])
elif env["target"] == "release_debug":
@@ -68,7 +68,7 @@ def configure(env):
env.Prepend(CCFLAGS=["-Os"])
env.Prepend(CPPDEFINES=["DEBUG_ENABLED"])
- if env["debug_symbols"] == "yes":
+ if env["debug_symbols"]:
env.Prepend(CCFLAGS=["-g2"])
elif env["target"] == "debug":
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 5760bcc72c..fa97948395 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -39,14 +39,11 @@
#include "drivers/windows/dir_access_windows.h"
#include "drivers/windows/file_access_windows.h"
#include "drivers/windows/mutex_windows.h"
-#include "drivers/windows/rw_lock_windows.h"
#include "drivers/windows/semaphore_windows.h"
#include "main/main.h"
#include "platform/windows/windows_terminal_logger.h"
#include "servers/audio_server.h"
#include "servers/rendering/rendering_server_default.h"
-#include "servers/rendering/rendering_server_wrap_mt.h"
-#include "thread_uwp.h"
#include <ppltasks.h>
#include <wrl.h>
@@ -131,9 +128,6 @@ void OS_UWP::initialize_core() {
//RedirectIOToConsole();
- ThreadUWP::make_default();
- RWLockWindows::make_default();
-
FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_RESOURCES);
FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_USERDATA);
FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_FILESYSTEM);
diff --git a/platform/uwp/thread_uwp.cpp b/platform/uwp/thread_uwp.cpp
deleted file mode 100644
index 364c414375..0000000000
--- a/platform/uwp/thread_uwp.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*************************************************************************/
-/* thread_uwp.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "thread_uwp.h"
-
-#include "core/os/memory.h"
-
-Thread *ThreadUWP::create_func_uwp(ThreadCreateCallback p_callback, void *p_user, const Settings &) {
- ThreadUWP *thread = memnew(ThreadUWP);
-
- std::thread new_thread(p_callback, p_user);
- std::swap(thread->thread, new_thread);
-
- return thread;
-};
-
-Thread::ID ThreadUWP::get_thread_id_func_uwp() {
- return std::hash<std::thread::id>()(std::this_thread::get_id());
-};
-
-void ThreadUWP::wait_to_finish_func_uwp(Thread *p_thread) {
- ThreadUWP *tp = static_cast<ThreadUWP *>(p_thread);
- tp->thread.join();
-};
-
-Thread::ID ThreadUWP::get_id() const {
- return std::hash<std::thread::id>()(thread.get_id());
-};
-
-void ThreadUWP::make_default() {
- create_func = create_func_uwp;
- get_thread_id_func = get_thread_id_func_uwp;
- wait_to_finish_func = wait_to_finish_func_uwp;
-};
diff --git a/platform/uwp/thread_uwp.h b/platform/uwp/thread_uwp.h
deleted file mode 100644
index 0bfc71d2e0..0000000000
--- a/platform/uwp/thread_uwp.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************/
-/* thread_uwp.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 THREAD_UWP_H
-#define THREAD_UWP_H
-
-#ifdef UWP_ENABLED
-
-#include "core/os/thread.h"
-
-#include <thread>
-
-class ThreadUWP : public Thread {
- std::thread thread;
-
- static Thread *create_func_uwp(ThreadCreateCallback p_callback, void *, const Settings &);
- static ID get_thread_id_func_uwp();
- static void wait_to_finish_func_uwp(Thread *p_thread);
-
- ThreadUWP() {}
-
-public:
- virtual ID get_id() const;
-
- static void make_default();
-
- ~ThreadUWP() {}
-};
-
-#endif // UWP_ENABLED
-
-#endif // THREAD_UWP_H
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index 0c9aa77803..47d8e14680 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -32,5 +32,5 @@ if env["vsproj"]:
env.vs_srcs += ["platform/windows/" + str(x)]
if not os.getenv("VCINSTALLDIR"):
- if env["debug_symbols"] == "yes" and env["separate_debug_symbols"]:
+ if env["debug_symbols"] and env["separate_debug_symbols"]:
env.AddPostAction(prog, run_in_subprocess(platform_windows_builders.make_debug_mingw))
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 5216fca2ca..f26dea8d35 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -64,7 +64,7 @@ def get_opts():
# XP support dropped after EOL due to missing API for IPv6 and other issues
# Vista support dropped after EOL due to GH-10243
("target_win_version", "Targeted Windows version, >= 0x0601 (Windows 7)", "0x0601"),
- EnumVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", "yes", ("yes", "no")),
+ BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
EnumVariable("windows_subsystem", "Windows subsystem", "default", ("default", "console", "gui")),
BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
("msvc_version", "MSVC version to use. Ignored if VCINSTALLDIR is set in shell env.", None),
@@ -204,12 +204,12 @@ def configure_msvc(env, manual_msvc_config):
env.Append(LINKFLAGS=["/OPT:REF"])
elif env["target"] == "debug":
- env.AppendUnique(CCFLAGS=["/Z7", "/Od", "/EHsc"])
+ env.AppendUnique(CCFLAGS=["/Zi", "/FS", "/Od", "/EHsc"])
env.AppendUnique(CPPDEFINES=["DEBUG_ENABLED"])
env.Append(LINKFLAGS=["/DEBUG"])
- if env["debug_symbols"] == "yes":
- env.AppendUnique(CCFLAGS=["/Z7"])
+ if env["debug_symbols"]:
+ env.AppendUnique(CCFLAGS=["/Zi", "/FS"])
env.AppendUnique(LINKFLAGS=["/DEBUG"])
if env["windows_subsystem"] == "gui":
@@ -224,6 +224,7 @@ def configure_msvc(env, manual_msvc_config):
env.AppendUnique(CCFLAGS=["/MT"])
else:
env.AppendUnique(CCFLAGS=["/MD"])
+
env.AppendUnique(CCFLAGS=["/Gd", "/GR", "/nologo"])
# Force to use Unicode encoding
env.AppendUnique(CCFLAGS=["/utf-8"])
@@ -339,13 +340,13 @@ def configure_mingw(env):
else: # optimize for size
env.Prepend(CCFLAGS=["-Os"])
- if env["debug_symbols"] == "yes":
+ if env["debug_symbols"]:
env.Prepend(CCFLAGS=["-g2"])
elif env["target"] == "release_debug":
env.Append(CCFLAGS=["-O2"])
env.Append(CPPDEFINES=["DEBUG_ENABLED"])
- if env["debug_symbols"] == "yes":
+ if env["debug_symbols"]:
env.Prepend(CCFLAGS=["-g2"])
if env["optimize"] == "speed": # optimize for speed (default)
env.Append(CCFLAGS=["-O2"])
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index 14e7d395d3..b9b78f7bd4 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -535,7 +535,7 @@ void DisplayServerWindows::delete_sub_window(WindowID p_window) {
}
#endif
- if ((OS::get_singleton()->get_current_tablet_driver() == "wintab") && wintab_available && windows[p_window].wtctx) {
+ if ((tablet_get_current_driver() == "wintab") && wintab_available && windows[p_window].wtctx) {
wintab_WTClose(windows[p_window].wtctx);
windows[p_window].wtctx = 0;
}
@@ -1784,7 +1784,10 @@ void DisplayServerWindows::_dispatch_input_event(const Ref<InputEvent> &p_event)
Ref<InputEventFromWindow> event_from_window = p_event;
if (event_from_window.is_valid() && event_from_window->get_window_id() != INVALID_WINDOW_ID) {
//send to a window
- ERR_FAIL_COND(!windows.has(event_from_window->get_window_id()));
+ if (!windows.has(event_from_window->get_window_id())) {
+ in_dispatch_input_event = false;
+ ERR_FAIL_MSG("DisplayServerWindows: Invalid window id in input event.");
+ }
Callable callable = windows[event_from_window->get_window_id()].input_event_callback;
if (callable.is_null()) {
in_dispatch_input_event = false;
@@ -2018,7 +2021,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
} break;
case WT_CSRCHANGE:
case WT_PROXIMITY: {
- if ((OS::get_singleton()->get_current_tablet_driver() == "wintab") && wintab_available && windows[window_id].wtctx) {
+ if ((tablet_get_current_driver() == "wintab") && wintab_available && windows[window_id].wtctx) {
AXIS pressure;
if (wintab_WTInfo(WTI_DEVICES + windows[window_id].wtlc.lcDevice, DVC_NPRESSURE, &pressure)) {
windows[window_id].min_pressure = int(pressure.axMin);
@@ -2032,7 +2035,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
} break;
case WT_PACKET: {
- if ((OS::get_singleton()->get_current_tablet_driver() == "wintab") && wintab_available && windows[window_id].wtctx) {
+ if ((tablet_get_current_driver() == "wintab") && wintab_available && windows[window_id].wtctx) {
PACKET packet;
if (wintab_WTPacket(windows[window_id].wtctx, wParam, &packet)) {
float pressure = float(packet.pkNormalPressure - windows[window_id].min_pressure) / float(windows[window_id].max_pressure - windows[window_id].min_pressure);
@@ -2111,7 +2114,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
break;
}
- if ((OS::get_singleton()->get_current_tablet_driver() != "winink") || !winink_available) {
+ if ((tablet_get_current_driver() != "winink") || !winink_available) {
break;
}
@@ -2137,7 +2140,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
break;
}
- if ((OS::get_singleton()->get_current_tablet_driver() != "winink") || !winink_available) {
+ if ((tablet_get_current_driver() != "winink") || !winink_available) {
break;
}
@@ -2301,7 +2304,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
mm->set_shift((wParam & MK_SHIFT) != 0);
mm->set_alt(alt_mem);
- if ((OS::get_singleton()->get_current_tablet_driver() == "wintab") && wintab_available && windows[window_id].wtctx) {
+ if ((tablet_get_current_driver() == "wintab") && wintab_available && windows[window_id].wtctx) {
// Note: WinTab sends both WT_PACKET and WM_xBUTTONDOWN/UP/MOUSEMOVE events, use mouse 1/0 pressure only when last_pressure was not update recently.
if (windows[window_id].last_pressure_update < 10) {
windows[window_id].last_pressure_update++;
@@ -2796,7 +2799,7 @@ void DisplayServerWindows::_process_activate_event(WindowID p_window_id, WPARAM
alt_mem = false;
}
- if ((OS::get_singleton()->get_current_tablet_driver() == "wintab") && wintab_available && windows[p_window_id].wtctx) {
+ if ((tablet_get_current_driver() == "wintab") && wintab_available && windows[p_window_id].wtctx) {
wintab_WTEnable(windows[p_window_id].wtctx, GET_WM_ACTIVATE_STATE(wParam, lParam));
}
}
@@ -3034,7 +3037,7 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
DragAcceptFiles(wd.hWnd, true);
- if ((OS::get_singleton()->get_current_tablet_driver() == "wintab") && wintab_available) {
+ if ((tablet_get_current_driver() == "wintab") && wintab_available) {
wintab_WTInfo(WTI_DEFSYSCTX, 0, &wd.wtlc);
wd.wtlc.lcOptions |= CXO_MESSAGES;
wd.wtlc.lcPktData = PK_NORMAL_PRESSURE | PK_TANGENT_PRESSURE | PK_ORIENTATION;
@@ -3101,6 +3104,40 @@ typedef enum _SHC_PROCESS_DPI_AWARENESS {
SHC_PROCESS_PER_MONITOR_DPI_AWARE = 2
} SHC_PROCESS_DPI_AWARENESS;
+int DisplayServerWindows::tablet_get_driver_count() const {
+ return tablet_drivers.size();
+}
+
+String DisplayServerWindows::tablet_get_driver_name(int p_driver) const {
+ if (p_driver < 0 || p_driver >= tablet_drivers.size()) {
+ return "";
+ } else {
+ return tablet_drivers[p_driver];
+ }
+}
+
+String DisplayServerWindows::tablet_get_current_driver() const {
+ return tablet_driver;
+}
+
+void DisplayServerWindows::tablet_set_current_driver(const String &p_driver) {
+ if (tablet_get_driver_count() == 0) {
+ return;
+ }
+ bool found = false;
+ for (int i = 0; i < tablet_get_driver_count(); i++) {
+ if (p_driver == tablet_get_driver_name(i)) {
+ found = true;
+ }
+ }
+ if (found) {
+ _update_tablet_ctx(tablet_driver, p_driver);
+ tablet_driver = p_driver;
+ } else {
+ ERR_PRINT("Unknown tablet driver " + p_driver + ".");
+ }
+}
+
DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, WindowMode p_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
drop_events = false;
key_event_pos = 0;
@@ -3119,6 +3156,35 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
outside = true;
+ //Note: Wacom WinTab driver API for pen input, for devices incompatible with Windows Ink.
+ HMODULE wintab_lib = LoadLibraryW(L"wintab32.dll");
+ if (wintab_lib) {
+ wintab_WTOpen = (WTOpenPtr)GetProcAddress(wintab_lib, "WTOpenW");
+ wintab_WTClose = (WTClosePtr)GetProcAddress(wintab_lib, "WTClose");
+ wintab_WTInfo = (WTInfoPtr)GetProcAddress(wintab_lib, "WTInfoW");
+ wintab_WTPacket = (WTPacketPtr)GetProcAddress(wintab_lib, "WTPacket");
+ wintab_WTEnable = (WTEnablePtr)GetProcAddress(wintab_lib, "WTEnable");
+
+ wintab_available = wintab_WTOpen && wintab_WTClose && wintab_WTInfo && wintab_WTPacket && wintab_WTEnable;
+ }
+
+ if (wintab_available) {
+ tablet_drivers.push_back("wintab");
+ }
+
+ //Note: Windows Ink API for pen input, available on Windows 8+ only.
+ HMODULE user32_lib = LoadLibraryW(L"user32.dll");
+ if (user32_lib) {
+ win8p_GetPointerType = (GetPointerTypePtr)GetProcAddress(user32_lib, "GetPointerType");
+ win8p_GetPointerPenInfo = (GetPointerPenInfoPtr)GetProcAddress(user32_lib, "GetPointerPenInfo");
+
+ winink_available = win8p_GetPointerType && win8p_GetPointerPenInfo;
+ }
+
+ if (winink_available) {
+ tablet_drivers.push_back("winink");
+ }
+
if (OS::get_singleton()->is_hidpi_allowed()) {
HMODULE Shcore = LoadLibraryW(L"Shcore.dll");
diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h
index c8c6a75bf5..a734077e59 100644
--- a/platform/windows/display_server_windows.h
+++ b/platform/windows/display_server_windows.h
@@ -264,7 +264,6 @@ class DisplayServerWindows : public DisplayServer {
_THREAD_SAFE_CLASS_
-public:
// WinTab API
static bool wintab_available;
static WTOpenPtr wintab_WTOpen;
@@ -279,8 +278,9 @@ public:
static GetPointerPenInfoPtr win8p_GetPointerPenInfo;
void _update_tablet_ctx(const String &p_old_driver, const String &p_new_driver);
+ String tablet_driver;
+ Vector<String> tablet_drivers;
-private:
void GetMaskBitmaps(HBITMAP hSourceBitmap, COLORREF clrTransparent, OUT HBITMAP &hAndMaskBitmap, OUT HBITMAP &hXorMaskBitmap);
enum {
@@ -542,6 +542,11 @@ public:
virtual String keyboard_get_layout_language(int p_index) const;
virtual String keyboard_get_layout_name(int p_index) const;
+ virtual int tablet_get_driver_count() const;
+ virtual String tablet_get_driver_name(int p_driver) const;
+ virtual String tablet_get_current_driver() const;
+ virtual void tablet_set_current_driver(const String &p_driver);
+
virtual void process_events();
virtual void force_process_and_drop_events();
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index f0848ff880..3280a36e9b 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -39,15 +39,12 @@
#include "core/version_generated.gen.h"
#include "drivers/windows/dir_access_windows.h"
#include "drivers/windows/file_access_windows.h"
-#include "drivers/windows/rw_lock_windows.h"
-#include "drivers/windows/thread_windows.h"
#include "joypad_windows.h"
#include "lang_table.h"
#include "main/main.h"
#include "platform/windows/display_server_windows.h"
#include "servers/audio_server.h"
#include "servers/rendering/rendering_server_default.h"
-#include "servers/rendering/rendering_server_wrap_mt.h"
#include "windows_terminal_logger.h"
#include <avrt.h>
@@ -177,9 +174,6 @@ void OS_Windows::initialize() {
//RedirectIOToConsole();
- ThreadWindows::make_default();
- RWLockWindows::make_default();
-
FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_RESOURCES);
FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_USERDATA);
FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_FILESYSTEM);
@@ -771,77 +765,12 @@ Error OS_Windows::move_to_trash(const String &p_path) {
return OK;
}
-int OS_Windows::get_tablet_driver_count() const {
- return tablet_drivers.size();
-}
-
-String OS_Windows::get_tablet_driver_name(int p_driver) const {
- if (p_driver < 0 || p_driver >= tablet_drivers.size()) {
- return "";
- } else {
- return tablet_drivers[p_driver];
- }
-}
-
-String OS_Windows::get_current_tablet_driver() const {
- return tablet_driver;
-}
-
-void OS_Windows::set_current_tablet_driver(const String &p_driver) {
- if (get_tablet_driver_count() == 0) {
- return;
- }
- bool found = false;
- for (int i = 0; i < get_tablet_driver_count(); i++) {
- if (p_driver == get_tablet_driver_name(i)) {
- found = true;
- }
- }
- if (found) {
- if (DisplayServerWindows::get_singleton()) {
- ((DisplayServerWindows *)DisplayServerWindows::get_singleton())->_update_tablet_ctx(tablet_driver, p_driver);
- }
- tablet_driver = p_driver;
- } else {
- ERR_PRINT("Unknown tablet driver " + p_driver + ".");
- }
-}
-
OS_Windows::OS_Windows(HINSTANCE _hInstance) {
ticks_per_second = 0;
ticks_start = 0;
main_loop = nullptr;
process_map = nullptr;
- //Note: Wacom WinTab driver API for pen input, for devices incompatible with Windows Ink.
- HMODULE wintab_lib = LoadLibraryW(L"wintab32.dll");
- if (wintab_lib) {
- DisplayServerWindows::wintab_WTOpen = (WTOpenPtr)GetProcAddress(wintab_lib, "WTOpenW");
- DisplayServerWindows::wintab_WTClose = (WTClosePtr)GetProcAddress(wintab_lib, "WTClose");
- DisplayServerWindows::wintab_WTInfo = (WTInfoPtr)GetProcAddress(wintab_lib, "WTInfoW");
- DisplayServerWindows::wintab_WTPacket = (WTPacketPtr)GetProcAddress(wintab_lib, "WTPacket");
- DisplayServerWindows::wintab_WTEnable = (WTEnablePtr)GetProcAddress(wintab_lib, "WTEnable");
-
- DisplayServerWindows::wintab_available = DisplayServerWindows::wintab_WTOpen && DisplayServerWindows::wintab_WTClose && DisplayServerWindows::wintab_WTInfo && DisplayServerWindows::wintab_WTPacket && DisplayServerWindows::wintab_WTEnable;
- }
-
- if (DisplayServerWindows::wintab_available) {
- tablet_drivers.push_back("wintab");
- }
-
- //Note: Windows Ink API for pen input, available on Windows 8+ only.
- HMODULE user32_lib = LoadLibraryW(L"user32.dll");
- if (user32_lib) {
- DisplayServerWindows::win8p_GetPointerType = (GetPointerTypePtr)GetProcAddress(user32_lib, "GetPointerType");
- DisplayServerWindows::win8p_GetPointerPenInfo = (GetPointerPenInfoPtr)GetProcAddress(user32_lib, "GetPointerPenInfo");
-
- DisplayServerWindows::winink_available = DisplayServerWindows::win8p_GetPointerType && DisplayServerWindows::win8p_GetPointerPenInfo;
- }
-
- if (DisplayServerWindows::winink_available) {
- tablet_drivers.push_back("winink");
- }
-
force_quit = false;
hInstance = _hInstance;
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 1a8791196b..8f9ef254f1 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -73,9 +73,6 @@ class OS_Windows : public OS {
HINSTANCE hInstance;
MainLoop *main_loop;
- String tablet_driver;
- Vector<String> tablet_drivers;
-
#ifdef WASAPI_ENABLED
AudioDriverWASAPI driver_wasapi;
#endif
@@ -119,11 +116,6 @@ public:
virtual String get_name() const override;
- virtual int get_tablet_driver_count() const override;
- virtual String get_tablet_driver_name(int p_driver) const override;
- virtual String get_current_tablet_driver() const override;
- virtual void set_current_tablet_driver(const String &p_driver) override;
-
virtual void initialize_joypads() override {}
virtual Date get_date(bool utc) const override;
diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp
index d9d551074d..f39850441b 100644
--- a/scene/2d/animated_sprite_2d.cpp
+++ b/scene/2d/animated_sprite_2d.cpp
@@ -409,7 +409,7 @@ void AnimatedSprite2D::_notification(int p_what) {
}
update();
- _change_notify("frame");
+
emit_signal(SceneStringNames::get_singleton()->frame_changed);
}
@@ -477,7 +477,7 @@ void AnimatedSprite2D::set_sprite_frames(const Ref<SpriteFrames> &p_frames) {
set_frame(frame);
}
- _change_notify();
+ notify_property_list_changed();
_reset_timeout();
update();
update_configuration_warning();
@@ -510,7 +510,7 @@ void AnimatedSprite2D::set_frame(int p_frame) {
frame = p_frame;
_reset_timeout();
update();
- _change_notify("frame");
+
emit_signal(SceneStringNames::get_singleton()->frame_changed);
}
@@ -546,7 +546,6 @@ void AnimatedSprite2D::set_offset(const Point2 &p_offset) {
offset = p_offset;
update();
item_rect_changed();
- _change_notify("offset");
}
Point2 AnimatedSprite2D::get_offset() const {
@@ -573,8 +572,7 @@ bool AnimatedSprite2D::is_flipped_v() const {
void AnimatedSprite2D::_res_changed() {
set_frame(frame);
- _change_notify("frame");
- _change_notify("animation");
+
update();
}
@@ -642,7 +640,7 @@ void AnimatedSprite2D::set_animation(const StringName &p_animation) {
animation = p_animation;
_reset_timeout();
set_frame(0);
- _change_notify();
+ notify_property_list_changed();
update();
}
@@ -712,15 +710,4 @@ void AnimatedSprite2D::_bind_methods() {
}
AnimatedSprite2D::AnimatedSprite2D() {
- centered = true;
- hflip = false;
- vflip = false;
-
- frame = 0;
- speed_scale = 1.0f;
- playing = false;
- backwards = false;
- animation = "default";
- timeout = 0;
- is_over = false;
}
diff --git a/scene/2d/animated_sprite_2d.h b/scene/2d/animated_sprite_2d.h
index a558a3e657..5e53a401e2 100644
--- a/scene/2d/animated_sprite_2d.h
+++ b/scene/2d/animated_sprite_2d.h
@@ -38,14 +38,9 @@ class SpriteFrames : public Resource {
GDCLASS(SpriteFrames, Resource);
struct Anim {
- float speed;
- bool loop;
+ float speed = 5.0;
+ bool loop = true;
Vector<Ref<Texture2D>> frames;
-
- Anim() {
- loop = true;
- speed = 5;
- }
};
Map<StringName, Anim> animations;
@@ -109,20 +104,20 @@ class AnimatedSprite2D : public Node2D {
GDCLASS(AnimatedSprite2D, Node2D);
Ref<SpriteFrames> frames;
- bool playing;
- bool backwards;
- StringName animation;
- int frame;
- float speed_scale;
+ bool playing = false;
+ bool backwards = false;
+ StringName animation = "default";
+ int frame = 0;
+ float speed_scale = 1.0f;
- bool centered;
+ bool centered = true;
Point2 offset;
- bool is_over;
- float timeout;
+ bool is_over = false;
+ float timeout = 0.0;
- bool hflip;
- bool vflip;
+ bool hflip = false;
+ bool vflip = false;
void _res_changed();
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index fae893a76c..68d5b4b540 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -627,20 +627,8 @@ void Area2D::_bind_methods() {
Area2D::Area2D() :
CollisionObject2D(PhysicsServer2D::get_singleton()->area_create(), true) {
- space_override = SPACE_OVERRIDE_DISABLED;
set_gravity(98);
set_gravity_vector(Vector2(0, 1));
- gravity_is_point = false;
- gravity_distance_scale = 0;
- linear_damp = 0.1;
- angular_damp = 1;
- locked = false;
- priority = 0;
- monitoring = false;
- monitorable = false;
- collision_mask = 1;
- collision_layer = 1;
- audio_bus_override = false;
set_monitoring(true);
set_monitorable(true);
}
diff --git a/scene/2d/area_2d.h b/scene/2d/area_2d.h
index 0b45675555..39b022fd2c 100644
--- a/scene/2d/area_2d.h
+++ b/scene/2d/area_2d.h
@@ -47,19 +47,19 @@ public:
};
private:
- SpaceOverride space_override;
+ SpaceOverride space_override = SPACE_OVERRIDE_DISABLED;
Vector2 gravity_vec;
real_t gravity;
- bool gravity_is_point;
- real_t gravity_distance_scale;
- real_t linear_damp;
- real_t angular_damp;
- uint32_t collision_mask;
- uint32_t collision_layer;
- int priority;
- bool monitoring;
- bool monitorable;
- bool locked;
+ bool gravity_is_point = false;
+ real_t gravity_distance_scale = 0.0;
+ real_t linear_damp = 0.1;
+ real_t angular_damp = 1.0;
+ uint32_t collision_mask = 1;
+ uint32_t collision_layer = 1;
+ int priority = 0;
+ bool monitoring = false;
+ bool monitorable = false;
+ bool locked = false;
void _body_inout(int p_status, const RID &p_body, ObjectID p_instance, int p_body_shape, int p_area_shape);
@@ -67,8 +67,8 @@ private:
void _body_exit_tree(ObjectID p_id);
struct ShapePair {
- int body_shape;
- int area_shape;
+ int body_shape = 0;
+ int area_shape = 0;
bool operator<(const ShapePair &p_sp) const {
if (body_shape == p_sp.body_shape) {
return area_shape < p_sp.area_shape;
@@ -85,8 +85,8 @@ private:
};
struct BodyState {
- int rc;
- bool in_tree;
+ int rc = 0;
+ bool in_tree = false;
VSet<ShapePair> shapes;
};
@@ -98,8 +98,8 @@ private:
void _area_exit_tree(ObjectID p_id);
struct AreaShapePair {
- int area_shape;
- int self_shape;
+ int area_shape = 0;
+ int self_shape = 0;
bool operator<(const AreaShapePair &p_sp) const {
if (area_shape == p_sp.area_shape) {
return self_shape < p_sp.self_shape;
@@ -116,15 +116,15 @@ private:
};
struct AreaState {
- int rc;
- bool in_tree;
+ int rc = 0;
+ bool in_tree = false;
VSet<AreaShapePair> shapes;
};
Map<ObjectID, AreaState> area_map;
void _clear_monitoring();
- bool audio_bus_override;
+ bool audio_bus_override = false;
StringName audio_bus;
protected:
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index f1eb7d017d..6d8d6058eb 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -35,14 +35,14 @@
#include "scene/main/window.h"
void AudioStreamPlayer2D::_mix_audio() {
- if (!stream_playback.is_valid() || !active ||
+ if (!stream_playback.is_valid() || !active.is_set() ||
(stream_paused && !stream_paused_fade_out)) {
return;
}
- if (setseek >= 0.0) {
- stream_playback->start(setseek);
- setseek = -1.0; //reset seek
+ if (setseek.get() >= 0.0) {
+ stream_playback->start(setseek.get());
+ setseek.set(-1.0); //reset seek
}
//get data
@@ -57,7 +57,8 @@ void AudioStreamPlayer2D::_mix_audio() {
stream_playback->mix(buffer, pitch_scale, buffer_size);
//write all outputs
- for (int i = 0; i < output_count; i++) {
+ int oc = output_count.get();
+ for (int i = 0; i < oc; i++) {
Output current = outputs[i];
//see if current output exists, to keep volume ramp
@@ -130,14 +131,14 @@ void AudioStreamPlayer2D::_mix_audio() {
prev_outputs[i] = current;
}
- prev_output_count = output_count;
+ prev_output_count = oc;
//stream is no longer active, disable this.
if (!stream_playback->is_playing()) {
- active = false;
+ active.clear();
}
- output_ready = false;
+ output_ready.clear();
stream_paused_fade_in = false;
stream_paused_fade_out = false;
}
@@ -168,7 +169,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PHYSICS_PROCESS) {
//update anything related to position first, if possible of course
- if (!output_ready) {
+ if (!output_ready.is_set()) {
List<Viewport *> viewports;
Ref<World2D> world_2d = get_world_2d();
ERR_FAIL_COND(world_2d.is_null());
@@ -240,24 +241,20 @@ void AudioStreamPlayer2D::_notification(int p_what) {
}
}
- output_count = new_output_count;
- output_ready = true;
+ output_count.set(new_output_count);
+ output_ready.set();
}
//start playing if requested
- if (setplay >= 0.0) {
- setseek = setplay;
- active = true;
- setplay = -1;
- //do not update, this makes it easier to animate (will shut off otherwise)
- //_change_notify("playing"); //update property in editor
+ if (setplay.get() >= 0.0) {
+ setseek.set(setplay.get());
+ active.set();
+ setplay.set(-1);
}
//stop playing if no longer active
- if (!active) {
+ if (!active.is_set()) {
set_physics_process_internal(false);
- //do not update, this makes it easier to animate (will shut off otherwise)
- //_change_notify("playing"); //update property in editor
emit_signal("finished");
}
}
@@ -271,8 +268,8 @@ void AudioStreamPlayer2D::set_stream(Ref<AudioStream> p_stream) {
if (stream_playback.is_valid()) {
stream_playback.unref();
stream.unref();
- active = false;
- setseek = -1;
+ active.clear();
+ setseek.set(-1);
}
if (p_stream.is_valid()) {
@@ -315,30 +312,29 @@ void AudioStreamPlayer2D::play(float p_from_pos) {
}
if (stream_playback.is_valid()) {
- active = true;
- setplay = p_from_pos;
- output_ready = false;
+ setplay.set(p_from_pos);
+ output_ready.clear();
set_physics_process_internal(true);
}
}
void AudioStreamPlayer2D::seek(float p_seconds) {
if (stream_playback.is_valid()) {
- setseek = p_seconds;
+ setseek.set(p_seconds);
}
}
void AudioStreamPlayer2D::stop() {
if (stream_playback.is_valid()) {
- active = false;
+ active.clear();
set_physics_process_internal(false);
- setplay = -1;
+ setplay.set(-1);
}
}
bool AudioStreamPlayer2D::is_playing() const {
if (stream_playback.is_valid()) {
- return active; // && stream_playback->is_playing();
+ return active.is_set() || setplay.get() >= 0;
}
return false;
@@ -346,6 +342,10 @@ bool AudioStreamPlayer2D::is_playing() const {
float AudioStreamPlayer2D::get_playback_position() {
if (stream_playback.is_valid()) {
+ float ss = setseek.get();
+ if (ss >= 0.0) {
+ return ss;
+ }
return stream_playback->get_playback_position();
}
@@ -385,7 +385,7 @@ void AudioStreamPlayer2D::_set_playing(bool p_enable) {
}
bool AudioStreamPlayer2D::_is_active() const {
- return active;
+ return active.is_set();
}
void AudioStreamPlayer2D::_validate_property(PropertyInfo &property) const {
@@ -404,7 +404,7 @@ void AudioStreamPlayer2D::_validate_property(PropertyInfo &property) const {
}
void AudioStreamPlayer2D::_bus_layout_changed() {
- _change_notify();
+ notify_property_list_changed();
}
void AudioStreamPlayer2D::set_max_distance(float p_pixels) {
@@ -503,21 +503,6 @@ void AudioStreamPlayer2D::_bind_methods() {
}
AudioStreamPlayer2D::AudioStreamPlayer2D() {
- volume_db = 0;
- pitch_scale = 1.0;
- autoplay = false;
- setseek = -1;
- active = false;
- output_count = 0;
- prev_output_count = 0;
- max_distance = 2000;
- attenuation = 1;
- setplay = -1;
- output_ready = false;
- area_mask = 1;
- stream_paused = false;
- stream_paused_fade_in = false;
- stream_paused_fade_out = false;
AudioServer::get_singleton()->connect("bus_layout_changed", callable_mp(this, &AudioStreamPlayer2D::_bus_layout_changed));
}
diff --git a/scene/2d/audio_stream_player_2d.h b/scene/2d/audio_stream_player_2d.h
index 4eb709facb..21f524c703 100644
--- a/scene/2d/audio_stream_player_2d.h
+++ b/scene/2d/audio_stream_player_2d.h
@@ -31,6 +31,7 @@
#ifndef AUDIO_STREAM_PLAYER_2D_H
#define AUDIO_STREAM_PLAYER_2D_H
+#include "core/templates/safe_refcount.h"
#include "scene/2d/node_2d.h"
#include "servers/audio/audio_stream.h"
#include "servers/audio_server.h"
@@ -47,32 +48,32 @@ private:
struct Output {
AudioFrame vol;
- int bus_index;
- Viewport *viewport; //pointer only used for reference to previous mix
+ int bus_index = 0;
+ Viewport *viewport = nullptr; //pointer only used for reference to previous mix
};
Output outputs[MAX_OUTPUTS];
- volatile int output_count;
- volatile bool output_ready;
+ SafeNumeric<int> output_count;
+ SafeFlag output_ready;
//these are used by audio thread to have a reference of previous volumes (for ramping volume and avoiding clicks)
Output prev_outputs[MAX_OUTPUTS];
- int prev_output_count;
+ int prev_output_count = 0;
Ref<AudioStreamPlayback> stream_playback;
Ref<AudioStream> stream;
Vector<AudioFrame> mix_buffer;
- volatile float setseek;
- volatile bool active;
- volatile float setplay;
+ SafeNumeric<float> setseek{ -1.0 };
+ SafeFlag active;
+ SafeNumeric<float> setplay{ -1.0 };
- float volume_db;
- float pitch_scale;
- bool autoplay;
- bool stream_paused;
- bool stream_paused_fade_in;
- bool stream_paused_fade_out;
+ float volume_db = 0.0;
+ float pitch_scale = 1.0;
+ bool autoplay = false;
+ bool stream_paused = false;
+ bool stream_paused_fade_in = false;
+ bool stream_paused_fade_out = false;
StringName bus;
void _mix_audio();
@@ -83,10 +84,10 @@ private:
void _bus_layout_changed();
- uint32_t area_mask;
+ uint32_t area_mask = 1;
- float max_distance;
- float attenuation;
+ float max_distance = 2000.0;
+ float attenuation = 1.0;
protected:
void _validate_property(PropertyInfo &property) const override;
diff --git a/scene/2d/back_buffer_copy.cpp b/scene/2d/back_buffer_copy.cpp
index 91c887cb84..539a66b881 100644
--- a/scene/2d/back_buffer_copy.cpp
+++ b/scene/2d/back_buffer_copy.cpp
@@ -93,8 +93,6 @@ void BackBufferCopy::_bind_methods() {
}
BackBufferCopy::BackBufferCopy() {
- rect = Rect2(-100, -100, 200, 200);
- copy_mode = COPY_MODE_RECT;
_update_copy_mode();
}
diff --git a/scene/2d/back_buffer_copy.h b/scene/2d/back_buffer_copy.h
index 0916d344f9..6bdb3aaab2 100644
--- a/scene/2d/back_buffer_copy.h
+++ b/scene/2d/back_buffer_copy.h
@@ -44,8 +44,8 @@ public:
};
private:
- Rect2 rect;
- CopyMode copy_mode;
+ Rect2 rect = Rect2(-100, -100, 200, 200);
+ CopyMode copy_mode = COPY_MODE_RECT;
void _update_copy_mode();
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 4f45325d3a..853e92780b 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -749,9 +749,6 @@ void Camera2D::_bind_methods() {
}
Camera2D::Camera2D() {
- anchor_mode = ANCHOR_MODE_DRAG_CENTER;
- rotating = false;
- current = false;
limit[SIDE_LEFT] = -10000000;
limit[SIDE_TOP] = -10000000;
limit[SIDE_RIGHT] = 10000000;
@@ -761,27 +758,6 @@ Camera2D::Camera2D() {
drag_margin[SIDE_TOP] = 0.2;
drag_margin[SIDE_RIGHT] = 0.2;
drag_margin[SIDE_BOTTOM] = 0.2;
- camera_pos = Vector2();
- first = true;
- smoothing_enabled = false;
- limit_smoothing_enabled = false;
- custom_viewport = nullptr;
-
- process_mode = CAMERA2D_PROCESS_IDLE;
-
- smoothing = 5.0;
- zoom = Vector2(1, 1);
-
- screen_drawing_enabled = true;
- limit_drawing_enabled = false;
- margin_drawing_enabled = false;
-
- drag_horizontal_enabled = false;
- drag_vertical_enabled = false;
- drag_horizontal_offset = 0;
- drag_vertical_offset = 0;
- drag_horizontal_offset_changed = false;
- drag_vertical_offset_changed = false;
set_notify_transform(true);
}
diff --git a/scene/2d/camera_2d.h b/scene/2d/camera_2d.h
index 8977d872f0..3a7d01901d 100644
--- a/scene/2d/camera_2d.h
+++ b/scene/2d/camera_2d.h
@@ -51,32 +51,32 @@ public:
protected:
Point2 camera_pos;
Point2 smoothed_camera_pos;
- bool first;
+ bool first = true;
ObjectID custom_viewport_id; // to check validity
- Viewport *custom_viewport;
- Viewport *viewport;
+ Viewport *custom_viewport = nullptr;
+ Viewport *viewport = nullptr;
StringName group_name;
StringName canvas_group_name;
RID canvas;
Vector2 offset;
- Vector2 zoom;
- AnchorMode anchor_mode;
- bool rotating;
- bool current;
- float smoothing;
- bool smoothing_enabled;
+ Vector2 zoom = Vector2(1, 1);
+ AnchorMode anchor_mode = ANCHOR_MODE_DRAG_CENTER;
+ bool rotating = false;
+ bool current = false;
+ float smoothing = 5.0;
+ bool smoothing_enabled = false;
int limit[4];
- bool limit_smoothing_enabled;
+ bool limit_smoothing_enabled = false;
float drag_margin[4];
- bool drag_horizontal_enabled;
- bool drag_vertical_enabled;
- float drag_horizontal_offset;
- float drag_vertical_offset;
- bool drag_horizontal_offset_changed;
- bool drag_vertical_offset_changed;
+ bool drag_horizontal_enabled = false;
+ bool drag_vertical_enabled = false;
+ float drag_horizontal_offset = 0.0;
+ float drag_vertical_offset = 0.0;
+ bool drag_horizontal_offset_changed = false;
+ bool drag_vertical_offset_changed = false;
Point2 camera_screen_center;
void _update_process_mode();
@@ -87,11 +87,11 @@ protected:
void _set_old_smoothing(float p_enable);
- bool screen_drawing_enabled;
- bool limit_drawing_enabled;
- bool margin_drawing_enabled;
+ bool screen_drawing_enabled = true;
+ bool limit_drawing_enabled = false;
+ bool margin_drawing_enabled = false;
- Camera2DProcessMode process_mode;
+ Camera2DProcessMode process_mode = CAMERA2D_PROCESS_IDLE;
Size2 _get_camera_screen_size() const;
diff --git a/scene/2d/canvas_modulate.cpp b/scene/2d/canvas_modulate.cpp
index 6e90afde21..5d5aaae505 100644
--- a/scene/2d/canvas_modulate.cpp
+++ b/scene/2d/canvas_modulate.cpp
@@ -94,7 +94,6 @@ String CanvasModulate::get_configuration_warning() const {
}
CanvasModulate::CanvasModulate() {
- color = Color(1, 1, 1, 1);
}
CanvasModulate::~CanvasModulate() {
diff --git a/scene/2d/canvas_modulate.h b/scene/2d/canvas_modulate.h
index 6efc0cab9b..4d55a5d9cb 100644
--- a/scene/2d/canvas_modulate.h
+++ b/scene/2d/canvas_modulate.h
@@ -36,7 +36,7 @@
class CanvasModulate : public Node2D {
GDCLASS(CanvasModulate, Node2D);
- Color color;
+ Color color = Color(1, 1, 1, 1);
protected:
void _notification(int p_what);
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index f0b007f843..c83ed36917 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -165,7 +165,7 @@ bool CollisionObject2D::is_shape_owner_one_way_collision_enabled(uint32_t p_owne
return shapes[p_owner].one_way_collision;
}
-void CollisionObject2D::shape_owner_set_one_way_collision_margin(uint32_t p_owner, float p_margin) {
+void CollisionObject2D::shape_owner_set_one_way_collision_margin(uint32_t p_owner, real_t p_margin) {
if (area) {
return; //not for areas
}
@@ -179,7 +179,7 @@ void CollisionObject2D::shape_owner_set_one_way_collision_margin(uint32_t p_owne
}
}
-float CollisionObject2D::get_shape_owner_one_way_collision_margin(uint32_t p_owner) const {
+real_t CollisionObject2D::get_shape_owner_one_way_collision_margin(uint32_t p_owner) const {
ERR_FAIL_COND_V(!shapes.has(p_owner), 0);
return shapes[p_owner].one_way_collision_margin;
diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h
index a2112c27f4..e82b61d441 100644
--- a/scene/2d/collision_object_2d.h
+++ b/scene/2d/collision_object_2d.h
@@ -37,35 +37,29 @@
class CollisionObject2D : public Node2D {
GDCLASS(CollisionObject2D, Node2D);
- bool area;
+ bool area = false;
RID rid;
- bool pickable;
+ bool pickable = false;
struct ShapeData {
- Object *owner;
+ Object *owner = nullptr;
Transform2D xform;
struct Shape {
Ref<Shape2D> shape;
- int index;
+ int index = 0;
};
Vector<Shape> shapes;
- bool disabled;
- bool one_way_collision;
- float one_way_collision_margin;
-
- ShapeData() {
- disabled = false;
- one_way_collision = false;
- one_way_collision_margin = 0;
- owner = nullptr;
- }
+
+ bool disabled = false;
+ bool one_way_collision = false;
+ real_t one_way_collision_margin = 0.0;
};
- int total_subshapes;
+ int total_subshapes = 0;
Map<uint32_t, ShapeData> shapes;
- bool only_update_transform_changes; //this is used for sync physics in KinematicBody
+ bool only_update_transform_changes = false; //this is used for sync physics in KinematicBody
protected:
CollisionObject2D(RID p_rid, bool p_area);
@@ -97,8 +91,8 @@ public:
void shape_owner_set_one_way_collision(uint32_t p_owner, bool p_enable);
bool is_shape_owner_one_way_collision_enabled(uint32_t p_owner) const;
- void shape_owner_set_one_way_collision_margin(uint32_t p_owner, float p_margin);
- float get_shape_owner_one_way_collision_margin(uint32_t p_owner) const;
+ void shape_owner_set_one_way_collision_margin(uint32_t p_owner, real_t p_margin);
+ real_t get_shape_owner_one_way_collision_margin(uint32_t p_owner) const;
void shape_owner_add_shape(uint32_t p_owner, const Ref<Shape2D> &p_shape);
int shape_owner_get_shape_count(uint32_t p_owner) const;
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index 851e40cda6..39d7705226 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -158,7 +158,7 @@ void CollisionPolygon2D::_notification(int p_what) {
Vector2 line_to(0, 20);
draw_line(Vector2(), line_to, dcol, 3);
Vector<Vector2> pts;
- float tsize = 8;
+ real_t tsize = 8;
pts.push_back(line_to + (Vector2(0, tsize)));
pts.push_back(line_to + (Vector2(Math_SQRT12 * tsize, 0)));
pts.push_back(line_to + (Vector2(-Math_SQRT12 * tsize, 0)));
@@ -275,14 +275,14 @@ bool CollisionPolygon2D::is_one_way_collision_enabled() const {
return one_way_collision;
}
-void CollisionPolygon2D::set_one_way_collision_margin(float p_margin) {
+void CollisionPolygon2D::set_one_way_collision_margin(real_t p_margin) {
one_way_collision_margin = p_margin;
if (parent) {
parent->shape_owner_set_one_way_collision_margin(owner_id, one_way_collision_margin);
}
}
-float CollisionPolygon2D::get_one_way_collision_margin() const {
+real_t CollisionPolygon2D::get_one_way_collision_margin() const {
return one_way_collision_margin;
}
@@ -310,12 +310,5 @@ void CollisionPolygon2D::_bind_methods() {
}
CollisionPolygon2D::CollisionPolygon2D() {
- aabb = Rect2(-10, -10, 20, 20);
- build_mode = BUILD_SOLIDS;
set_notify_local_transform(true);
- parent = nullptr;
- owner_id = 0;
- disabled = false;
- one_way_collision = false;
- one_way_collision_margin = 1.0;
}
diff --git a/scene/2d/collision_polygon_2d.h b/scene/2d/collision_polygon_2d.h
index caa5b2c3ec..9df9802629 100644
--- a/scene/2d/collision_polygon_2d.h
+++ b/scene/2d/collision_polygon_2d.h
@@ -46,14 +46,14 @@ public:
};
protected:
- Rect2 aabb;
- BuildMode build_mode;
+ Rect2 aabb = Rect2(-10, -10, 20, 20);
+ BuildMode build_mode = BUILD_SOLIDS;
Vector<Point2> polygon;
- uint32_t owner_id;
- CollisionObject2D *parent;
- bool disabled;
- bool one_way_collision;
- float one_way_collision_margin;
+ uint32_t owner_id = 0;
+ CollisionObject2D *parent = nullptr;
+ bool disabled = false;
+ bool one_way_collision = false;
+ real_t one_way_collision_margin = 1.0;
Vector<Vector<Vector2>> _decompose_in_convex();
@@ -86,8 +86,8 @@ public:
void set_one_way_collision(bool p_enable);
bool is_one_way_collision_enabled() const;
- void set_one_way_collision_margin(float p_margin);
- float get_one_way_collision_margin() const;
+ void set_one_way_collision_margin(real_t p_margin);
+ real_t get_one_way_collision_margin() const;
CollisionPolygon2D();
};
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index 37bed577ac..4d1d274542 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -125,7 +125,7 @@ void CollisionShape2D::_notification(int p_what) {
Vector2 line_to(0, 20);
draw_line(Vector2(), line_to, draw_col, 2);
Vector<Vector2> pts;
- float tsize = 8;
+ real_t tsize = 8;
pts.push_back(line_to + (Vector2(0, tsize)));
pts.push_back(line_to + (Vector2(Math_SQRT12 * tsize, 0)));
pts.push_back(line_to + (Vector2(-Math_SQRT12 * tsize, 0)));
@@ -215,14 +215,14 @@ bool CollisionShape2D::is_one_way_collision_enabled() const {
return one_way_collision;
}
-void CollisionShape2D::set_one_way_collision_margin(float p_margin) {
+void CollisionShape2D::set_one_way_collision_margin(real_t p_margin) {
one_way_collision_margin = p_margin;
if (parent) {
parent->shape_owner_set_one_way_collision_margin(owner_id, one_way_collision_margin);
}
}
-float CollisionShape2D::get_one_way_collision_margin() const {
+real_t CollisionShape2D::get_one_way_collision_margin() const {
return one_way_collision_margin;
}
@@ -243,11 +243,5 @@ void CollisionShape2D::_bind_methods() {
}
CollisionShape2D::CollisionShape2D() {
- rect = Rect2(-Point2(10, 10), Point2(20, 20));
set_notify_local_transform(true);
- owner_id = 0;
- parent = nullptr;
- disabled = false;
- one_way_collision = false;
- one_way_collision_margin = 1.0;
}
diff --git a/scene/2d/collision_shape_2d.h b/scene/2d/collision_shape_2d.h
index 8a4d885393..695d0c6657 100644
--- a/scene/2d/collision_shape_2d.h
+++ b/scene/2d/collision_shape_2d.h
@@ -39,13 +39,13 @@ class CollisionObject2D;
class CollisionShape2D : public Node2D {
GDCLASS(CollisionShape2D, Node2D);
Ref<Shape2D> shape;
- Rect2 rect;
- uint32_t owner_id;
- CollisionObject2D *parent;
+ Rect2 rect = Rect2(-Point2(10, 10), Point2(20, 20));
+ uint32_t owner_id = 0;
+ CollisionObject2D *parent = nullptr;
void _shape_changed();
- bool disabled;
- bool one_way_collision;
- float one_way_collision_margin;
+ bool disabled = false;
+ bool one_way_collision = false;
+ real_t one_way_collision_margin = 1.0;
void _update_in_shape_owner(bool p_xform_only = false);
@@ -69,8 +69,8 @@ public:
void set_one_way_collision(bool p_enable);
bool is_one_way_collision_enabled() const;
- void set_one_way_collision_margin(float p_margin);
- float get_one_way_collision_margin() const;
+ void set_one_way_collision_margin(real_t p_margin);
+ real_t get_one_way_collision_margin() const;
virtual String get_configuration_warning() const override;
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index 7c9bd118d8..0e51264171 100644
--- a/scene/2d/cpu_particles_2d.cpp
+++ b/scene/2d/cpu_particles_2d.cpp
@@ -60,7 +60,7 @@ void CPUParticles2D::set_amount(int p_amount) {
}
particle_data.resize((8 + 4 + 4) * p_amount);
- RS::get_singleton()->multimesh_allocate(multimesh, p_amount, RS::MULTIMESH_TRANSFORM_2D, true, true);
+ RS::get_singleton()->multimesh_allocate_data(multimesh, p_amount, RS::MULTIMESH_TRANSFORM_2D, true, true);
particle_order.resize(p_amount);
}
@@ -410,7 +410,7 @@ bool CPUParticles2D::get_particle_flag(ParticleFlags p_particle_flag) const {
void CPUParticles2D::set_emission_shape(EmissionShape p_shape) {
ERR_FAIL_INDEX(p_shape, EMISSION_SHAPE_MAX);
emission_shape = p_shape;
- _change_notify();
+ notify_property_list_changed();
}
void CPUParticles2D::set_emission_sphere_radius(float p_radius) {
@@ -599,7 +599,7 @@ void CPUParticles2D::_particles_process(float p_delta) {
cycle++;
if (one_shot && cycle > 0) {
set_emitting(false);
- _change_notify();
+ notify_property_list_changed();
}
}
@@ -671,6 +671,8 @@ void CPUParticles2D::_particles_process(float p_delta) {
restart = true;
}
+ float tv = 0.0;
+
if (restart) {
if (!emitting) {
p.active = false;
@@ -685,12 +687,12 @@ void CPUParticles2D::_particles_process(float p_delta) {
float tex_angle = 0.0;
if (curve_parameters[PARAM_ANGLE].is_valid()) {
- tex_angle = curve_parameters[PARAM_ANGLE]->interpolate(0);
+ tex_angle = curve_parameters[PARAM_ANGLE]->interpolate(tv);
}
float tex_anim_offset = 0.0;
if (curve_parameters[PARAM_ANGLE].is_valid()) {
- tex_anim_offset = curve_parameters[PARAM_ANGLE]->interpolate(0);
+ tex_anim_offset = curve_parameters[PARAM_ANGLE]->interpolate(tv);
}
p.seed = Math::rand();
@@ -700,7 +702,7 @@ void CPUParticles2D::_particles_process(float p_delta) {
p.hue_rot_rand = Math::randf();
p.anim_offset_rand = Math::randf();
- float angle1_rad = Math::atan2(direction.y, direction.x) + (Math::randf() * 2.0 - 1.0) * Math_PI * spread / 180.0;
+ float angle1_rad = Math::atan2(direction.y, direction.x) + Math::deg2rad((Math::randf() * 2.0 - 1.0) * spread);
Vector2 rot = Vector2(Math::cos(angle1_rad), Math::sin(angle1_rad));
p.velocity = rot * parameters[PARAM_INITIAL_LINEAR_VELOCITY] * Math::lerp(1.0f, float(Math::randf()), randomness[PARAM_INITIAL_LINEAR_VELOCITY]);
@@ -721,7 +723,7 @@ void CPUParticles2D::_particles_process(float p_delta) {
//do none
} break;
case EMISSION_SHAPE_SPHERE: {
- float s = Math::randf(), t = 2.0 * Math_PI * Math::randf();
+ float s = Math::randf(), t = Math_TAU * Math::randf();
float radius = emission_sphere_radius * Math::sqrt(1.0 - s * s);
p.transform[2] = Vector2(Math::cos(t), Math::sin(t)) * radius;
} break;
@@ -765,59 +767,61 @@ void CPUParticles2D::_particles_process(float p_delta) {
continue;
} else if (p.time > p.lifetime) {
p.active = false;
+ tv = 1.0;
} else {
uint32_t alt_seed = p.seed;
p.time += local_delta;
p.custom[1] = p.time / lifetime;
+ tv = p.time / p.lifetime;
float tex_linear_velocity = 0.0;
if (curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY].is_valid()) {
- tex_linear_velocity = curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY]->interpolate(p.custom[1]);
+ tex_linear_velocity = curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY]->interpolate(tv);
}
float tex_orbit_velocity = 0.0;
if (curve_parameters[PARAM_ORBIT_VELOCITY].is_valid()) {
- tex_orbit_velocity = curve_parameters[PARAM_ORBIT_VELOCITY]->interpolate(p.custom[1]);
+ tex_orbit_velocity = curve_parameters[PARAM_ORBIT_VELOCITY]->interpolate(tv);
}
float tex_angular_velocity = 0.0;
if (curve_parameters[PARAM_ANGULAR_VELOCITY].is_valid()) {
- tex_angular_velocity = curve_parameters[PARAM_ANGULAR_VELOCITY]->interpolate(p.custom[1]);
+ tex_angular_velocity = curve_parameters[PARAM_ANGULAR_VELOCITY]->interpolate(tv);
}
float tex_linear_accel = 0.0;
if (curve_parameters[PARAM_LINEAR_ACCEL].is_valid()) {
- tex_linear_accel = curve_parameters[PARAM_LINEAR_ACCEL]->interpolate(p.custom[1]);
+ tex_linear_accel = curve_parameters[PARAM_LINEAR_ACCEL]->interpolate(tv);
}
float tex_tangential_accel = 0.0;
if (curve_parameters[PARAM_TANGENTIAL_ACCEL].is_valid()) {
- tex_tangential_accel = curve_parameters[PARAM_TANGENTIAL_ACCEL]->interpolate(p.custom[1]);
+ tex_tangential_accel = curve_parameters[PARAM_TANGENTIAL_ACCEL]->interpolate(tv);
}
float tex_radial_accel = 0.0;
if (curve_parameters[PARAM_RADIAL_ACCEL].is_valid()) {
- tex_radial_accel = curve_parameters[PARAM_RADIAL_ACCEL]->interpolate(p.custom[1]);
+ tex_radial_accel = curve_parameters[PARAM_RADIAL_ACCEL]->interpolate(tv);
}
float tex_damping = 0.0;
if (curve_parameters[PARAM_DAMPING].is_valid()) {
- tex_damping = curve_parameters[PARAM_DAMPING]->interpolate(p.custom[1]);
+ tex_damping = curve_parameters[PARAM_DAMPING]->interpolate(tv);
}
float tex_angle = 0.0;
if (curve_parameters[PARAM_ANGLE].is_valid()) {
- tex_angle = curve_parameters[PARAM_ANGLE]->interpolate(p.custom[1]);
+ tex_angle = curve_parameters[PARAM_ANGLE]->interpolate(tv);
}
float tex_anim_speed = 0.0;
if (curve_parameters[PARAM_ANIM_SPEED].is_valid()) {
- tex_anim_speed = curve_parameters[PARAM_ANIM_SPEED]->interpolate(p.custom[1]);
+ tex_anim_speed = curve_parameters[PARAM_ANIM_SPEED]->interpolate(tv);
}
float tex_anim_offset = 0.0;
if (curve_parameters[PARAM_ANIM_OFFSET].is_valid()) {
- tex_anim_offset = curve_parameters[PARAM_ANIM_OFFSET]->interpolate(p.custom[1]);
+ tex_anim_offset = curve_parameters[PARAM_ANIM_OFFSET]->interpolate(tv);
}
Vector2 force = gravity;
@@ -837,7 +841,7 @@ void CPUParticles2D::_particles_process(float p_delta) {
//orbit velocity
float orbit_amount = (parameters[PARAM_ORBIT_VELOCITY] + tex_orbit_velocity) * Math::lerp(1.0f, rand_from_seed(alt_seed), randomness[PARAM_ORBIT_VELOCITY]);
if (orbit_amount != 0.0) {
- float ang = orbit_amount * local_delta * Math_PI * 2.0;
+ float ang = orbit_amount * local_delta * Math_TAU;
// Not sure why the ParticlesMaterial code uses a clockwise rotation matrix,
// but we use -ang here to reproduce its behavior.
Transform2D rot = Transform2D(-ang, Vector2());
@@ -869,15 +873,15 @@ void CPUParticles2D::_particles_process(float p_delta) {
float tex_scale = 1.0;
if (curve_parameters[PARAM_SCALE].is_valid()) {
- tex_scale = curve_parameters[PARAM_SCALE]->interpolate(p.custom[1]);
+ tex_scale = curve_parameters[PARAM_SCALE]->interpolate(tv);
}
float tex_hue_variation = 0.0;
if (curve_parameters[PARAM_HUE_VARIATION].is_valid()) {
- tex_hue_variation = curve_parameters[PARAM_HUE_VARIATION]->interpolate(p.custom[1]);
+ tex_hue_variation = curve_parameters[PARAM_HUE_VARIATION]->interpolate(tv);
}
- float hue_rot_angle = (parameters[PARAM_HUE_VARIATION] + tex_hue_variation) * Math_PI * 2.0 * Math::lerp(1.0f, p.hue_rot_rand * 2.0f - 1.0f, randomness[PARAM_HUE_VARIATION]);
+ float hue_rot_angle = (parameters[PARAM_HUE_VARIATION] + tex_hue_variation) * Math_TAU * Math::lerp(1.0f, p.hue_rot_rand * 2.0f - 1.0f, randomness[PARAM_HUE_VARIATION]);
float hue_rot_c = Math::cos(hue_rot_angle);
float hue_rot_s = Math::sin(hue_rot_angle);
@@ -893,7 +897,7 @@ void CPUParticles2D::_particles_process(float p_delta) {
}
if (color_ramp.is_valid()) {
- p.color = color_ramp->get_color_at_offset(p.custom[1]) * color;
+ p.color = color_ramp->get_color_at_offset(tv) * color;
} else {
p.color = color;
}
@@ -1365,34 +1369,14 @@ void CPUParticles2D::_bind_methods() {
}
CPUParticles2D::CPUParticles2D() {
- time = 0;
- inactive_time = 0;
- frame_remainder = 0;
- cycle = 0;
- redraw = false;
- emitting = false;
-
mesh = RenderingServer::get_singleton()->mesh_create();
multimesh = RenderingServer::get_singleton()->multimesh_create();
RenderingServer::get_singleton()->multimesh_set_mesh(multimesh, mesh);
set_emitting(true);
- set_one_shot(false);
set_amount(8);
- set_lifetime(1);
- set_fixed_fps(0);
- set_fractional_delta(true);
- set_pre_process_time(0);
- set_explosiveness_ratio(0);
- set_randomness_ratio(0);
- set_lifetime_randomness(0);
set_use_local_coordinates(true);
- set_draw_order(DRAW_ORDER_INDEX);
- set_speed_scale(1);
-
- set_direction(Vector2(1, 0));
- set_spread(45);
set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0);
set_param(PARAM_ANGULAR_VELOCITY, 0);
set_param(PARAM_ORBIT_VELOCITY, 0);
@@ -1405,11 +1389,6 @@ CPUParticles2D::CPUParticles2D() {
set_param(PARAM_HUE_VARIATION, 0);
set_param(PARAM_ANIM_SPEED, 0);
set_param(PARAM_ANIM_OFFSET, 0);
- set_emission_shape(EMISSION_SHAPE_POINT);
- set_emission_sphere_radius(1);
- set_emission_rect_extents(Vector2(1, 1));
-
- set_gravity(Vector2(0, 98));
for (int i = 0; i < PARAM_MAX; i++) {
set_param_randomness(Parameter(i), 0);
diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h
index 3793f6a418..7ee165b3e1 100644
--- a/scene/2d/cpu_particles_2d.h
+++ b/scene/2d/cpu_particles_2d.h
@@ -78,31 +78,31 @@ public:
};
private:
- bool emitting;
+ bool emitting = false;
struct Particle {
Transform2D transform;
Color color;
- float custom[4];
- float rotation;
+ float custom[4] = {};
+ float rotation = 0.0;
Vector2 velocity;
- bool active;
- float angle_rand;
- float scale_rand;
- float hue_rot_rand;
- float anim_offset_rand;
- float time;
- float lifetime;
+ bool active = false;
+ float angle_rand = 0.0;
+ float scale_rand = 0.0;
+ float hue_rot_rand = 0.0;
+ float anim_offset_rand = 0.0;
+ float time = 0.0;
+ float lifetime = 0.0;
Color base_color;
- uint32_t seed;
+ uint32_t seed = 0;
};
- float time;
- float inactive_time;
- float frame_remainder;
- int cycle;
- bool redraw;
+ float time = 0.0;
+ float inactive_time = 0.0;
+ float frame_remainder = 0.0;
+ int cycle = 0;
+ bool redraw = false;
RID mesh;
RID multimesh;
@@ -112,7 +112,7 @@ private:
Vector<int> particle_order;
struct SortLifetime {
- const Particle *particles;
+ const Particle *particles = nullptr;
bool operator()(int p_a, int p_b) const {
return particles[p_a].time > particles[p_b].time;
@@ -120,7 +120,7 @@ private:
};
struct SortAxis {
- const Particle *particles;
+ const Particle *particles = nullptr;
Vector2 axis;
bool operator()(int p_a, int p_b) const {
return axis.dot(particles[p_a].transform[2]) < axis.dot(particles[p_b].transform[2]);
@@ -129,28 +129,28 @@ private:
//
- bool one_shot;
+ bool one_shot = false;
- float lifetime;
- float pre_process_time;
- float explosiveness_ratio;
- float randomness_ratio;
- float lifetime_randomness;
- float speed_scale;
+ float lifetime = 1.0;
+ float pre_process_time = 0.0;
+ float explosiveness_ratio = 0.0;
+ float randomness_ratio = 0.0;
+ float lifetime_randomness = 0.0;
+ float speed_scale = 1.0;
bool local_coords;
- int fixed_fps;
- bool fractional_delta;
+ int fixed_fps = 0;
+ bool fractional_delta = true;
Transform2D inv_emission_transform;
- DrawOrder draw_order;
+ DrawOrder draw_order = DRAW_ORDER_INDEX;
Ref<Texture2D> texture;
////////
- Vector2 direction;
- float spread;
+ Vector2 direction = Vector2(1, 0);
+ float spread = 45.0;
float parameters[PARAM_MAX];
float randomness[PARAM_MAX];
@@ -161,15 +161,15 @@ private:
bool particle_flags[PARTICLE_FLAG_MAX];
- EmissionShape emission_shape;
- float emission_sphere_radius;
- Vector2 emission_rect_extents;
+ EmissionShape emission_shape = EMISSION_SHAPE_POINT;
+ float emission_sphere_radius = 1.0;
+ Vector2 emission_rect_extents = Vector2(1, 1);
Vector<Vector2> emission_points;
Vector<Vector2> emission_normals;
Vector<Color> emission_colors;
- int emission_point_count;
+ int emission_point_count = 0;
- Vector2 gravity;
+ Vector2 gravity = Vector2(0, 98);
void _update_internal();
void _particles_process(float p_delta);
diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp
index 2e477a88a9..af70c47f7c 100644
--- a/scene/2d/gpu_particles_2d.cpp
+++ b/scene/2d/gpu_particles_2d.cpp
@@ -101,7 +101,6 @@ void GPUParticles2D::set_visibility_rect(const Rect2 &p_visibility_rect) {
RS::get_singleton()->particles_set_custom_aabb(particles, aabb);
- _change_notify("visibility_rect");
update();
}
@@ -305,7 +304,7 @@ void GPUParticles2D::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
if (one_shot && !is_emitting()) {
- _change_notify();
+ notify_property_list_changed();
set_process_internal(false);
}
}
diff --git a/scene/2d/joints_2d.cpp b/scene/2d/joints_2d.cpp
index 1a31f72a59..f4f08674c9 100644
--- a/scene/2d/joints_2d.cpp
+++ b/scene/2d/joints_2d.cpp
@@ -65,18 +65,16 @@ void Joint2D::_body_exit_tree(const ObjectID &p_body_id) {
}
void Joint2D::_update_joint(bool p_only_free) {
- if (joint.is_valid()) {
- if (ba.is_valid() && bb.is_valid() && exclude_from_collision) {
- PhysicsServer2D::get_singleton()->joint_disable_collisions_between_bodies(joint, false);
- }
-
- PhysicsServer2D::get_singleton()->free(joint);
- joint = RID();
- ba = RID();
- bb = RID();
+ if (ba.is_valid() && bb.is_valid() && exclude_from_collision) {
+ PhysicsServer2D::get_singleton()->joint_disable_collisions_between_bodies(joint, false);
}
+ ba = RID();
+ bb = RID();
+ configured = false;
+
if (p_only_free || !is_inside_tree()) {
+ PhysicsServer2D::get_singleton()->joint_clear(joint);
warning = String();
return;
}
@@ -88,30 +86,35 @@ void Joint2D::_update_joint(bool p_only_free) {
PhysicsBody2D *body_b = Object::cast_to<PhysicsBody2D>(node_b);
if (node_a && !body_a && node_b && !body_b) {
+ PhysicsServer2D::get_singleton()->joint_clear(joint);
warning = TTR("Node A and Node B must be PhysicsBody2Ds");
update_configuration_warning();
return;
}
if (node_a && !body_a) {
+ PhysicsServer2D::get_singleton()->joint_clear(joint);
warning = TTR("Node A must be a PhysicsBody2D");
update_configuration_warning();
return;
}
if (node_b && !body_b) {
+ PhysicsServer2D::get_singleton()->joint_clear(joint);
warning = TTR("Node B must be a PhysicsBody2D");
update_configuration_warning();
return;
}
if (!body_a || !body_b) {
+ PhysicsServer2D::get_singleton()->joint_clear(joint);
warning = TTR("Joint is not connected to two PhysicsBody2Ds");
update_configuration_warning();
return;
}
if (body_a == body_b) {
+ PhysicsServer2D::get_singleton()->joint_clear(joint);
warning = TTR("Node A and Node B must be different PhysicsBody2Ds");
update_configuration_warning();
return;
@@ -128,7 +131,9 @@ void Joint2D::_update_joint(bool p_only_free) {
body_b->force_update_transform();
}
- joint = _configure_joint(body_a, body_b);
+ configured = true;
+
+ _configure_joint(joint, body_a, body_b);
ERR_FAIL_COND_MSG(!joint.is_valid(), "Failed to configure the joint.");
@@ -249,8 +254,11 @@ void Joint2D::_bind_methods() {
}
Joint2D::Joint2D() {
- bias = 0;
- exclude_from_collision = true;
+ joint = PhysicsServer2D::get_singleton()->joint_create();
+}
+
+Joint2D::~Joint2D() {
+ PhysicsServer2D::get_singleton()->free(joint);
}
///////////////////////////////////////////////////////////////////////////////
@@ -274,16 +282,15 @@ void PinJoint2D::_notification(int p_what) {
}
}
-RID PinJoint2D::_configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) {
- RID pj = PhysicsServer2D::get_singleton()->pin_joint_create(get_global_transform().get_origin(), body_a->get_rid(), body_b ? body_b->get_rid() : RID());
- PhysicsServer2D::get_singleton()->pin_joint_set_param(pj, PhysicsServer2D::PIN_JOINT_SOFTNESS, softness);
- return pj;
+void PinJoint2D::_configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) {
+ PhysicsServer2D::get_singleton()->joint_make_pin(p_joint, get_global_transform().get_origin(), body_a->get_rid(), body_b ? body_b->get_rid() : RID());
+ PhysicsServer2D::get_singleton()->pin_joint_set_param(p_joint, PhysicsServer2D::PIN_JOINT_SOFTNESS, softness);
}
void PinJoint2D::set_softness(real_t p_softness) {
softness = p_softness;
update();
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer2D::get_singleton()->pin_joint_set_param(get_joint(), PhysicsServer2D::PIN_JOINT_SOFTNESS, p_softness);
}
}
@@ -300,7 +307,6 @@ void PinJoint2D::_bind_methods() {
}
PinJoint2D::PinJoint2D() {
- softness = 0;
}
///////////////////////////////////////////////////////////////////////////////
@@ -326,13 +332,13 @@ void GrooveJoint2D::_notification(int p_what) {
}
}
-RID GrooveJoint2D::_configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) {
+void GrooveJoint2D::_configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) {
Transform2D gt = get_global_transform();
Vector2 groove_A1 = gt.get_origin();
Vector2 groove_A2 = gt.xform(Vector2(0, length));
Vector2 anchor_B = gt.xform(Vector2(0, initial_offset));
- return PhysicsServer2D::get_singleton()->groove_joint_create(groove_A1, groove_A2, anchor_B, body_a->get_rid(), body_b->get_rid());
+ PhysicsServer2D::get_singleton()->joint_make_groove(p_joint, groove_A1, groove_A2, anchor_B, body_a->get_rid(), body_b->get_rid());
}
void GrooveJoint2D::set_length(real_t p_length) {
@@ -364,8 +370,6 @@ void GrooveJoint2D::_bind_methods() {
}
GrooveJoint2D::GrooveJoint2D() {
- length = 50;
- initial_offset = 25;
}
///////////////////////////////////////////////////////////////////////////////
@@ -390,19 +394,17 @@ void DampedSpringJoint2D::_notification(int p_what) {
}
}
-RID DampedSpringJoint2D::_configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) {
+void DampedSpringJoint2D::_configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) {
Transform2D gt = get_global_transform();
Vector2 anchor_A = gt.get_origin();
Vector2 anchor_B = gt.xform(Vector2(0, length));
- RID dsj = PhysicsServer2D::get_singleton()->damped_spring_joint_create(anchor_A, anchor_B, body_a->get_rid(), body_b->get_rid());
+ PhysicsServer2D::get_singleton()->joint_make_damped_spring(p_joint, anchor_A, anchor_B, body_a->get_rid(), body_b->get_rid());
if (rest_length) {
- PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(dsj, PhysicsServer2D::DAMPED_SPRING_REST_LENGTH, rest_length);
+ PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(p_joint, PhysicsServer2D::DAMPED_SPRING_REST_LENGTH, rest_length);
}
- PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(dsj, PhysicsServer2D::DAMPED_SPRING_STIFFNESS, stiffness);
- PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(dsj, PhysicsServer2D::DAMPED_SPRING_DAMPING, damping);
-
- return dsj;
+ PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(p_joint, PhysicsServer2D::DAMPED_SPRING_STIFFNESS, stiffness);
+ PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(p_joint, PhysicsServer2D::DAMPED_SPRING_DAMPING, damping);
}
void DampedSpringJoint2D::set_length(real_t p_length) {
@@ -417,7 +419,7 @@ real_t DampedSpringJoint2D::get_length() const {
void DampedSpringJoint2D::set_rest_length(real_t p_rest_length) {
rest_length = p_rest_length;
update();
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(get_joint(), PhysicsServer2D::DAMPED_SPRING_REST_LENGTH, p_rest_length ? p_rest_length : length);
}
}
@@ -429,7 +431,7 @@ real_t DampedSpringJoint2D::get_rest_length() const {
void DampedSpringJoint2D::set_stiffness(real_t p_stiffness) {
stiffness = p_stiffness;
update();
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(get_joint(), PhysicsServer2D::DAMPED_SPRING_STIFFNESS, p_stiffness);
}
}
@@ -441,7 +443,7 @@ real_t DampedSpringJoint2D::get_stiffness() const {
void DampedSpringJoint2D::set_damping(real_t p_damping) {
damping = p_damping;
update();
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer2D::get_singleton()->damped_spring_joint_set_param(get_joint(), PhysicsServer2D::DAMPED_SPRING_DAMPING, p_damping);
}
}
@@ -467,8 +469,4 @@ void DampedSpringJoint2D::_bind_methods() {
}
DampedSpringJoint2D::DampedSpringJoint2D() {
- length = 50;
- rest_length = 0;
- stiffness = 20;
- damping = 1;
}
diff --git a/scene/2d/joints_2d.h b/scene/2d/joints_2d.h
index d0fbb9fd3a..3607a6c176 100644
--- a/scene/2d/joints_2d.h
+++ b/scene/2d/joints_2d.h
@@ -43,9 +43,10 @@ class Joint2D : public Node2D {
NodePath a;
NodePath b;
- real_t bias;
+ real_t bias = 0.0;
- bool exclude_from_collision;
+ bool exclude_from_collision = true;
+ bool configured = false;
String warning;
protected:
@@ -54,10 +55,12 @@ protected:
void _update_joint(bool p_only_free = false);
void _notification(int p_what);
- virtual RID _configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) = 0;
+ virtual void _configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) = 0;
static void _bind_methods();
+ _FORCE_INLINE_ bool is_configured() const { return configured; }
+
public:
virtual String get_configuration_warning() const override;
@@ -75,16 +78,17 @@ public:
RID get_joint() const { return joint; }
Joint2D();
+ ~Joint2D();
};
class PinJoint2D : public Joint2D {
GDCLASS(PinJoint2D, Joint2D);
- real_t softness;
+ real_t softness = 0.0;
protected:
void _notification(int p_what);
- virtual RID _configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
+ virtual void _configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
static void _bind_methods();
public:
@@ -97,12 +101,12 @@ public:
class GrooveJoint2D : public Joint2D {
GDCLASS(GrooveJoint2D, Joint2D);
- real_t length;
- real_t initial_offset;
+ real_t length = 50.0;
+ real_t initial_offset = 25.0;
protected:
void _notification(int p_what);
- virtual RID _configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
+ virtual void _configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
static void _bind_methods();
public:
@@ -118,14 +122,14 @@ public:
class DampedSpringJoint2D : public Joint2D {
GDCLASS(DampedSpringJoint2D, Joint2D);
- real_t stiffness;
- real_t damping;
- real_t rest_length;
- real_t length;
+ real_t stiffness = 20.0;
+ real_t damping = 1.0;
+ real_t rest_length = 0.0;
+ real_t length = 50.0;
protected:
void _notification(int p_what);
- virtual RID _configure_joint(PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
+ virtual void _configure_joint(RID p_joint, PhysicsBody2D *body_a, PhysicsBody2D *body_b) override;
static void _bind_methods();
public:
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index ba4372f040..15fcb08422 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -300,22 +300,6 @@ void Light2D::_bind_methods() {
Light2D::Light2D() {
canvas_light = RenderingServer::get_singleton()->canvas_light_create();
- enabled = true;
- editor_only = false;
- shadow = false;
- color = Color(1, 1, 1);
- height = 0;
- z_min = -1024;
- z_max = 1024;
- layer_min = 0;
- layer_max = 0;
- item_mask = 1;
- item_shadow_mask = 1;
- energy = 1.0;
- shadow_color = Color(0, 0, 0, 0);
- shadow_filter = SHADOW_FILTER_NONE;
- shadow_smooth = 0;
- blend_mode = BLEND_MODE_ADD;
set_notify_transform(true);
}
@@ -393,7 +377,6 @@ void PointLight2D::set_texture_offset(const Vector2 &p_offset) {
texture_offset = p_offset;
RS::get_singleton()->canvas_light_set_texture_offset(_get_light(), texture_offset);
item_rect_changed();
- _change_notify("offset");
}
Vector2 PointLight2D::get_texture_offset() const {
diff --git a/scene/2d/light_2d.h b/scene/2d/light_2d.h
index 0112ab1648..4279baf15b 100644
--- a/scene/2d/light_2d.h
+++ b/scene/2d/light_2d.h
@@ -52,24 +52,24 @@ public:
private:
RID canvas_light;
- bool enabled;
- bool editor_only;
- bool shadow;
- Color color;
- Color shadow_color;
- float height;
- float energy;
- int z_min;
- int z_max;
- int layer_min;
- int layer_max;
- int item_mask;
- int item_shadow_mask;
- float shadow_smooth;
+ bool enabled = true;
+ bool editor_only = false;
+ bool shadow = false;
+ Color color = Color(1, 1, 1);
+ Color shadow_color = Color(0, 0, 0, 0);
+ float height = 0.0;
+ float energy = 1.0;
+ int z_min = -1024;
+ int z_max = 1024;
+ int layer_min = 0;
+ int layer_max = 0;
+ int item_mask = 1;
+ int item_shadow_mask = 1;
+ float shadow_smooth = 0.0;
Ref<Texture2D> texture;
Vector2 texture_offset;
- ShadowFilter shadow_filter;
- BlendMode blend_mode;
+ ShadowFilter shadow_filter = SHADOW_FILTER_NONE;
+ BlendMode blend_mode = BLEND_MODE_ADD;
void _update_light_visibility();
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp
index 3146e64c08..9589702e2e 100644
--- a/scene/2d/light_occluder_2d.cpp
+++ b/scene/2d/light_occluder_2d.cpp
@@ -145,9 +145,6 @@ void OccluderPolygon2D::_bind_methods() {
OccluderPolygon2D::OccluderPolygon2D() {
occ_polygon = RS::get_singleton()->canvas_occluder_polygon_create();
- closed = true;
- cull = CULL_DISABLED;
- rect_cache_dirty = true;
}
OccluderPolygon2D::~OccluderPolygon2D() {
diff --git a/scene/2d/light_occluder_2d.h b/scene/2d/light_occluder_2d.h
index 7944ccad3a..f567c6d965 100644
--- a/scene/2d/light_occluder_2d.h
+++ b/scene/2d/light_occluder_2d.h
@@ -46,11 +46,11 @@ public:
private:
RID occ_polygon;
Vector<Vector2> polygon;
- bool closed;
- CullMode cull;
+ bool closed = true;
+ CullMode cull = CULL_DISABLED;
mutable Rect2 item_rect;
- mutable bool rect_cache_dirty;
+ mutable bool rect_cache_dirty = true;
protected:
static void _bind_methods();
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index 0a3f5673f8..2959ea1a36 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -40,15 +40,6 @@ VARIANT_ENUM_CAST(Line2D::LineCapMode)
VARIANT_ENUM_CAST(Line2D::LineTextureMode)
Line2D::Line2D() {
- _joint_mode = LINE_JOINT_SHARP;
- _begin_cap_mode = LINE_CAP_NONE;
- _end_cap_mode = LINE_CAP_NONE;
- _width = 10;
- _default_color = Color(1, 1, 1);
- _texture_mode = LINE_TEXTURE_NONE;
- _sharp_limit = 2.f;
- _round_precision = 8;
- _antialiased = false;
}
#ifdef TOOLS_ENABLED
diff --git a/scene/2d/line_2d.h b/scene/2d/line_2d.h
index e0b1cea60a..5e7eb4bac9 100644
--- a/scene/2d/line_2d.h
+++ b/scene/2d/line_2d.h
@@ -124,18 +124,18 @@ private:
private:
Vector<Vector2> _points;
- LineJointMode _joint_mode;
- LineCapMode _begin_cap_mode;
- LineCapMode _end_cap_mode;
- float _width;
+ LineJointMode _joint_mode = LINE_JOINT_SHARP;
+ LineCapMode _begin_cap_mode = LINE_CAP_NONE;
+ LineCapMode _end_cap_mode = LINE_CAP_NONE;
+ float _width = 10.0;
Ref<Curve> _curve;
- Color _default_color;
+ Color _default_color = Color(1, 1, 1);
Ref<Gradient> _gradient;
Ref<Texture2D> _texture;
- LineTextureMode _texture_mode;
- float _sharp_limit;
- int _round_precision;
- bool _antialiased;
+ LineTextureMode _texture_mode = LINE_TEXTURE_NONE;
+ float _sharp_limit = 2.f;
+ int _round_precision = 8;
+ bool _antialiased = false;
};
#endif // LINE2D_H
diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp
index 2f4459785b..892ccadfda 100644
--- a/scene/2d/line_builder.cpp
+++ b/scene/2d/line_builder.cpp
@@ -94,20 +94,6 @@ static inline Vector2 interpolate(const Rect2 &r, const Vector2 &v) {
//----------------------------------------------------------------------------
LineBuilder::LineBuilder() {
- joint_mode = Line2D::LINE_JOINT_SHARP;
- width = 10;
- curve = nullptr;
- default_color = Color(0.4, 0.5, 1);
- gradient = nullptr;
- sharp_limit = 2.f;
- round_precision = 8;
- begin_cap_mode = Line2D::LINE_CAP_NONE;
- end_cap_mode = Line2D::LINE_CAP_NONE;
- tile_aspect = 1.f;
-
- _interpolate_color = false;
- _last_index[0] = 0;
- _last_index[1] = 0;
}
void LineBuilder::clear_output() {
@@ -554,7 +540,7 @@ void LineBuilder::new_arc(Vector2 center, Vector2 vbegin, float angle_delta, Col
float t = Vector2(1, 0).angle_to(vbegin);
float end_angle = t + angle_delta;
Vector2 rpos(0, 0);
- float tt_begin = -Math_PI / 2.f;
+ float tt_begin = -Math_PI / 2.0f;
float tt = tt_begin;
// Center vertice
diff --git a/scene/2d/line_builder.h b/scene/2d/line_builder.h
index bd419d330b..654e61422b 100644
--- a/scene/2d/line_builder.h
+++ b/scene/2d/line_builder.h
@@ -41,17 +41,17 @@ public:
// TODO Move in a struct and reference it
// Input
Vector<Vector2> points;
- Line2D::LineJointMode joint_mode;
- Line2D::LineCapMode begin_cap_mode;
- Line2D::LineCapMode end_cap_mode;
- float width;
- Curve *curve;
- Color default_color;
- Gradient *gradient;
- Line2D::LineTextureMode texture_mode;
- float sharp_limit;
- int round_precision;
- float tile_aspect; // w/h
+ Line2D::LineJointMode joint_mode = Line2D::LINE_JOINT_SHARP;
+ Line2D::LineCapMode begin_cap_mode = Line2D::LINE_CAP_NONE;
+ Line2D::LineCapMode end_cap_mode = Line2D::LINE_CAP_NONE;
+ float width = 10.0;
+ Curve *curve = nullptr;
+ Color default_color = Color(0.4, 0.5, 1);
+ Gradient *gradient = nullptr;
+ Line2D::LineTextureMode texture_mode = Line2D::LineTextureMode::LINE_TEXTURE_NONE;
+ float sharp_limit = 2.f;
+ int round_precision = 8;
+ float tile_aspect = 1.f; // w/h
// TODO offset_joints option (offers alternative implementation of round joints)
// TODO Move in a struct and reference it
@@ -82,8 +82,8 @@ private:
void new_arc(Vector2 center, Vector2 vbegin, float angle_delta, Color color, Rect2 uv_rect);
private:
- bool _interpolate_color;
- int _last_index[2]; // Index of last up and down vertices of the strip
+ bool _interpolate_color = false;
+ int _last_index[2] = {}; // Index of last up and down vertices of the strip
};
#endif // LINE_BUILDER_H
diff --git a/scene/2d/mesh_instance_2d.cpp b/scene/2d/mesh_instance_2d.cpp
index 430e655fc6..b7a0028199 100644
--- a/scene/2d/mesh_instance_2d.cpp
+++ b/scene/2d/mesh_instance_2d.cpp
@@ -71,7 +71,6 @@ void MeshInstance2D::set_texture(const Ref<Texture2D> &p_texture) {
texture = p_texture;
update();
emit_signal("texture_changed");
- _change_notify("texture");
}
void MeshInstance2D::set_normal_map(const Ref<Texture2D> &p_texture) {
diff --git a/scene/2d/multimesh_instance_2d.cpp b/scene/2d/multimesh_instance_2d.cpp
index 5164e5c7e9..72a899370e 100644
--- a/scene/2d/multimesh_instance_2d.cpp
+++ b/scene/2d/multimesh_instance_2d.cpp
@@ -71,7 +71,6 @@ void MultiMeshInstance2D::set_texture(const Ref<Texture2D> &p_texture) {
texture = p_texture;
update();
emit_signal("texture_changed");
- _change_notify("texture");
}
Ref<Texture2D> MultiMeshInstance2D::get_texture() const {
diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp
index 7360fce330..b02cdf12ad 100644
--- a/scene/2d/navigation_region_2d.cpp
+++ b/scene/2d/navigation_region_2d.cpp
@@ -481,7 +481,6 @@ void NavigationRegion2D::set_navigation_polygon(const Ref<NavigationPolygon> &p_
}
_navpoly_changed();
- _change_notify("navpoly");
update_configuration_warning();
}
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 70a4e3f0fb..bf311632c8 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -53,12 +53,6 @@ void Node2D::_edit_set_state(const Dictionary &p_state) {
skew = p_state["skew"];
_update_transform();
- _change_notify("rotation");
- _change_notify("rotation_degrees");
- _change_notify("scale");
- _change_notify("skew");
- _change_notify("skew_degrees");
- _change_notify("position");
}
void Node2D::_edit_set_position(const Point2 &p_position) {
@@ -80,8 +74,6 @@ Size2 Node2D::_edit_get_scale() const {
void Node2D::_edit_set_rotation(float p_rotation) {
angle = p_rotation;
_update_transform();
- _change_notify("rotation");
- _change_notify("rotation_degrees");
}
float Node2D::_edit_get_rotation() const {
@@ -124,8 +116,6 @@ void Node2D::_edit_set_rect(const Rect2 &p_edit_rect) {
_scale *= new_scale;
_update_transform();
- _change_notify("scale");
- _change_notify("position");
}
#endif
@@ -156,7 +146,6 @@ void Node2D::set_position(const Point2 &p_pos) {
}
pos = p_pos;
_update_transform();
- _change_notify("position");
}
void Node2D::set_rotation(float p_radians) {
@@ -165,8 +154,6 @@ void Node2D::set_rotation(float p_radians) {
}
angle = p_radians;
_update_transform();
- _change_notify("rotation");
- _change_notify("rotation_degrees");
}
void Node2D::set_skew(float p_radians) {
@@ -175,8 +162,6 @@ void Node2D::set_skew(float p_radians) {
}
skew = p_radians;
_update_transform();
- _change_notify("skew");
- _change_notify("skew_degrees");
}
void Node2D::set_rotation_degrees(float p_degrees) {
@@ -200,7 +185,6 @@ void Node2D::set_scale(const Size2 &p_scale) {
_scale.y = CMP_EPSILON;
}
_update_transform();
- _change_notify("scale");
}
Point2 Node2D::get_position() const {
@@ -358,7 +342,6 @@ void Node2D::set_z_index(int p_z) {
ERR_FAIL_COND(p_z > RS::CANVAS_ITEM_Z_MAX);
z_index = p_z;
RS::get_singleton()->canvas_item_set_z_index(get_canvas_item(), z_index);
- _change_notify("z_index");
}
void Node2D::set_z_as_relative(bool p_enabled) {
diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h
index a5ae5dae0e..c27d740b8a 100644
--- a/scene/2d/node_2d.h
+++ b/scene/2d/node_2d.h
@@ -37,9 +37,9 @@ class Node2D : public CanvasItem {
GDCLASS(Node2D, CanvasItem);
Point2 pos;
- float angle = 0;
+ float angle = 0.0;
Size2 _scale = Vector2(1, 1);
- float skew = 0;
+ float skew = 0.0;
int z_index = 0;
bool z_relative = true;
diff --git a/scene/2d/parallax_background.cpp b/scene/2d/parallax_background.cpp
index a35ffaa668..c93915d1bc 100644
--- a/scene/2d/parallax_background.cpp
+++ b/scene/2d/parallax_background.cpp
@@ -185,9 +185,5 @@ void ParallaxBackground::_bind_methods() {
}
ParallaxBackground::ParallaxBackground() {
- scale = 1.0;
set_layer(-100); //behind all by default
-
- base_scale = Vector2(1, 1);
- ignore_camera_zoom = false;
}
diff --git a/scene/2d/parallax_background.h b/scene/2d/parallax_background.h
index 578e615be9..c9991efc9d 100644
--- a/scene/2d/parallax_background.h
+++ b/scene/2d/parallax_background.h
@@ -39,15 +39,15 @@ class ParallaxBackground : public CanvasLayer {
GDCLASS(ParallaxBackground, CanvasLayer);
Point2 offset;
- float scale;
+ float scale = 1.0;
Point2 base_offset;
- Point2 base_scale;
+ Point2 base_scale = Vector2(1, 1);
Point2 screen_offset;
String group_name;
Point2 limit_begin;
Point2 limit_end;
Point2 final_offset;
- bool ignore_camera_zoom;
+ bool ignore_camera_zoom = false;
void _update_scroll();
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp
index 129082cb91..a38338e1e3 100644
--- a/scene/2d/parallax_layer.cpp
+++ b/scene/2d/parallax_layer.cpp
@@ -163,5 +163,4 @@ void ParallaxLayer::_bind_methods() {
}
ParallaxLayer::ParallaxLayer() {
- motion_scale = Size2(1, 1);
}
diff --git a/scene/2d/parallax_layer.h b/scene/2d/parallax_layer.h
index b6895b0aca..86694c7724 100644
--- a/scene/2d/parallax_layer.h
+++ b/scene/2d/parallax_layer.h
@@ -38,7 +38,7 @@ class ParallaxLayer : public Node2D {
Point2 orig_offset;
Point2 orig_scale;
- Size2 motion_scale;
+ Size2 motion_scale = Size2(1, 1);
Vector2 motion_offset;
Vector2 mirroring;
void _update_mirroring();
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index 41c91115ad..724998641f 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -240,7 +240,7 @@ bool PathFollow2D::get_cubic_interpolation() const {
void PathFollow2D::_validate_property(PropertyInfo &property) const {
if (property.name == "offset") {
- float max = 10000;
+ float max = 10000.0;
if (path && path->get_curve().is_valid()) {
max = path->get_curve()->get_baked_length();
}
@@ -319,8 +319,6 @@ void PathFollow2D::set_offset(float p_offset) {
_update_transform();
}
- _change_notify("offset");
- _change_notify("unit_offset");
}
void PathFollow2D::set_h_offset(float p_h_offset) {
diff --git a/scene/2d/path_2d.h b/scene/2d/path_2d.h
index 3c5e0e4180..a748817555 100644
--- a/scene/2d/path_2d.h
+++ b/scene/2d/path_2d.h
@@ -64,10 +64,10 @@ class PathFollow2D : public Node2D {
public:
private:
Path2D *path = nullptr;
- real_t offset = 0;
- real_t h_offset = 0;
- real_t v_offset = 0;
- real_t lookahead = 4;
+ real_t offset = 0.0;
+ real_t h_offset = 0.0;
+ real_t v_offset = 0.0;
+ real_t lookahead = 4.0;
bool cubic = true;
bool loop = true;
bool rotates = true;
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index a65009d072..96d8fb609b 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -111,8 +111,6 @@ bool PhysicsBody2D::get_collision_layer_bit(int p_bit) const {
PhysicsBody2D::PhysicsBody2D(PhysicsServer2D::BodyMode p_mode) :
CollisionObject2D(PhysicsServer2D::get_singleton()->body_create(), false) {
PhysicsServer2D::get_singleton()->body_set_mode(get_rid(), p_mode);
- collision_layer = 1;
- collision_mask = 1;
set_pickable(false);
}
@@ -197,7 +195,6 @@ void StaticBody2D::_bind_methods() {
StaticBody2D::StaticBody2D() :
PhysicsBody2D(PhysicsServer2D::BODY_MODE_STATIC) {
- constant_angular_velocity = 0;
}
StaticBody2D::~StaticBody2D() {
@@ -320,11 +317,11 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
struct _RigidBody2DInOut {
ObjectID id;
- int shape;
- int local_shape;
+ int shape = 0;
+ int local_shape = 0;
};
-bool RigidBody2D::_test_motion(const Vector2 &p_motion, bool p_infinite_inertia, float p_margin, const Ref<PhysicsTestMotionResult2D> &p_result) {
+bool RigidBody2D::_test_motion(const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin, const Ref<PhysicsTestMotionResult2D> &p_result) {
PhysicsServer2D::MotionResult *r = nullptr;
if (p_result.is_valid()) {
r = p_result->get_result_ptr();
@@ -611,7 +608,7 @@ void RigidBody2D::apply_impulse(const Vector2 &p_impulse, const Vector2 &p_posit
PhysicsServer2D::get_singleton()->body_apply_impulse(get_rid(), p_impulse, p_position);
}
-void RigidBody2D::apply_torque_impulse(float p_torque) {
+void RigidBody2D::apply_torque_impulse(real_t p_torque) {
PhysicsServer2D::get_singleton()->body_apply_torque_impulse(get_rid(), p_torque);
}
@@ -623,11 +620,11 @@ Vector2 RigidBody2D::get_applied_force() const {
return PhysicsServer2D::get_singleton()->body_get_applied_force(get_rid());
};
-void RigidBody2D::set_applied_torque(const float p_torque) {
+void RigidBody2D::set_applied_torque(const real_t p_torque) {
PhysicsServer2D::get_singleton()->body_set_applied_torque(get_rid(), p_torque);
};
-float RigidBody2D::get_applied_torque() const {
+real_t RigidBody2D::get_applied_torque() const {
return PhysicsServer2D::get_singleton()->body_get_applied_torque(get_rid());
};
@@ -639,7 +636,7 @@ void RigidBody2D::add_force(const Vector2 &p_force, const Vector2 &p_position) {
PhysicsServer2D::get_singleton()->body_add_force(get_rid(), p_force, p_position);
}
-void RigidBody2D::add_torque(const float p_torque) {
+void RigidBody2D::add_torque(const real_t p_torque) {
PhysicsServer2D::get_singleton()->body_add_torque(get_rid(), p_torque);
}
@@ -841,25 +838,6 @@ void RigidBody2D::_bind_methods() {
RigidBody2D::RigidBody2D() :
PhysicsBody2D(PhysicsServer2D::BODY_MODE_RIGID) {
- mode = MODE_RIGID;
-
- mass = 1;
-
- gravity_scale = 1;
- linear_damp = -1;
- angular_damp = -1;
-
- max_contacts_reported = 0;
- state = nullptr;
-
- angular_velocity = 0;
- sleeping = false;
- ccd_mode = CCD_MODE_DISABLED;
-
- custom_integrator = false;
- contact_monitor = nullptr;
- can_sleep = true;
-
PhysicsServer2D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed");
}
@@ -906,7 +884,7 @@ bool KinematicBody2D::separate_raycast_shapes(bool p_infinite_inertia, Collision
Vector2 recover;
int hits = PhysicsServer2D::get_singleton()->body_test_ray_separation(get_rid(), gt, p_infinite_inertia, recover, sep_res, 8, margin);
int deepest = -1;
- float deepest_depth;
+ real_t deepest_depth;
for (int i = 0; i < hits; i++) {
if (deepest == -1 || sep_res[i].collision_depth > deepest_depth) {
deepest = i;
@@ -966,7 +944,7 @@ bool KinematicBody2D::move_and_collide(const Vector2 &p_motion, bool p_infinite_
//so, if you pass 45 as limit, avoid numerical precision errors when angle is 45.
#define FLOOR_ANGLE_THRESHOLD 0.01
-Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const Vector2 &p_up_direction, bool p_stop_on_slope, int p_max_slides, float p_floor_max_angle, bool p_infinite_inertia) {
+Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const Vector2 &p_up_direction, bool p_stop_on_slope, int p_max_slides, real_t p_floor_max_angle, bool p_infinite_inertia) {
Vector2 body_velocity = p_linear_velocity;
Vector2 body_velocity_normal = body_velocity.normalized();
Vector2 up_direction = p_up_direction.normalized();
@@ -1057,7 +1035,7 @@ Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const
return body_velocity;
}
-Vector2 KinematicBody2D::move_and_slide_with_snap(const Vector2 &p_linear_velocity, const Vector2 &p_snap, const Vector2 &p_up_direction, bool p_stop_on_slope, int p_max_slides, float p_floor_max_angle, bool p_infinite_inertia) {
+Vector2 KinematicBody2D::move_and_slide_with_snap(const Vector2 &p_linear_velocity, const Vector2 &p_snap, const Vector2 &p_up_direction, bool p_stop_on_slope, int p_max_slides, real_t p_floor_max_angle, bool p_infinite_inertia) {
Vector2 up_direction = p_up_direction.normalized();
bool was_on_floor = on_floor;
@@ -1123,11 +1101,11 @@ bool KinematicBody2D::test_move(const Transform2D &p_from, const Vector2 &p_moti
return PhysicsServer2D::get_singleton()->body_test_motion(get_rid(), p_from, p_motion, p_infinite_inertia, margin);
}
-void KinematicBody2D::set_safe_margin(float p_margin) {
+void KinematicBody2D::set_safe_margin(real_t p_margin) {
margin = p_margin;
}
-float KinematicBody2D::get_safe_margin() const {
+real_t KinematicBody2D::get_safe_margin() const {
return margin;
}
@@ -1219,8 +1197,8 @@ void KinematicBody2D::_notification(int p_what) {
void KinematicBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("move_and_collide", "rel_vec", "infinite_inertia", "exclude_raycast_shapes", "test_only"), &KinematicBody2D::_move, DEFVAL(true), DEFVAL(true), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("move_and_slide", "linear_velocity", "up_direction", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody2D::move_and_slide, DEFVAL(Vector2(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", "up_direction", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody2D::move_and_slide_with_snap, DEFVAL(Vector2(0, 0)), DEFVAL(false), DEFVAL(4), DEFVAL(Math::deg2rad((float)45)), DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("move_and_slide", "linear_velocity", "up_direction", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody2D::move_and_slide, DEFVAL(Vector2(0, 0)), DEFVAL(false), DEFVAL(4), DEFVAL(Math::deg2rad((real_t)45.0)), DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("move_and_slide_with_snap", "linear_velocity", "snap", "up_direction", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody2D::move_and_slide_with_snap, DEFVAL(Vector2(0, 0)), DEFVAL(false), DEFVAL(4), DEFVAL(Math::deg2rad((real_t)45.0)), DEFVAL(true));
ClassDB::bind_method(D_METHOD("test_move", "from", "rel_vec", "infinite_inertia"), &KinematicBody2D::test_move, DEFVAL(true));
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index 159f73b269..2dc853b23b 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -41,8 +41,8 @@ class KinematicCollision2D;
class PhysicsBody2D : public CollisionObject2D {
GDCLASS(PhysicsBody2D, CollisionObject2D);
- uint32_t collision_layer;
- uint32_t collision_mask;
+ uint32_t collision_layer = 1;
+ uint32_t collision_mask = 1;
protected:
void _notification(int p_what);
@@ -74,7 +74,7 @@ class StaticBody2D : public PhysicsBody2D {
GDCLASS(StaticBody2D, PhysicsBody2D);
Vector2 constant_linear_velocity;
- real_t constant_angular_velocity;
+ real_t constant_angular_velocity = 0.0;
Ref<PhysicsMaterial> physics_material_override;
@@ -116,30 +116,30 @@ public:
};
private:
- bool can_sleep;
- PhysicsDirectBodyState2D *state;
- Mode mode;
+ bool can_sleep = true;
+ PhysicsDirectBodyState2D *state = nullptr;
+ Mode mode = MODE_RIGID;
- real_t mass;
+ real_t mass = 1.0;
Ref<PhysicsMaterial> physics_material_override;
- real_t gravity_scale;
- real_t linear_damp;
- real_t angular_damp;
+ real_t gravity_scale = 1.0;
+ real_t linear_damp = -1.0;
+ real_t angular_damp = -1.0;
Vector2 linear_velocity;
- real_t angular_velocity;
- bool sleeping;
+ real_t angular_velocity = 0.0;
+ bool sleeping = false;
- int max_contacts_reported;
+ int max_contacts_reported = 0;
- bool custom_integrator;
+ bool custom_integrator = false;
- CCDMode ccd_mode;
+ CCDMode ccd_mode = CCD_MODE_DISABLED;
struct ShapePair {
- int body_shape;
- int local_shape;
- bool tagged;
+ int body_shape = 0;
+ int local_shape = 0;
+ bool tagged = false;
bool operator<(const ShapePair &p_sp) const {
if (body_shape == p_sp.body_shape) {
return local_shape < p_sp.local_shape;
@@ -160,23 +160,23 @@ private:
};
struct BodyState {
//int rc;
- bool in_scene;
+ bool in_scene = false;
VSet<ShapePair> shapes;
};
struct ContactMonitor {
- bool locked;
+ bool locked = false;
Map<ObjectID, BodyState> body_map;
};
- ContactMonitor *contact_monitor;
+ ContactMonitor *contact_monitor = nullptr;
void _body_enter_tree(ObjectID p_id);
void _body_exit_tree(ObjectID p_id);
void _body_inout(int p_status, ObjectID p_instance, int p_body_shape, int p_local_shape);
void _direct_state_changed(Object *p_state);
- bool _test_motion(const Vector2 &p_motion, bool p_infinite_inertia = true, float p_margin = 0.08, const Ref<PhysicsTestMotionResult2D> &p_result = Ref<PhysicsTestMotionResult2D>());
+ bool _test_motion(const Vector2 &p_motion, bool p_infinite_inertia = true, real_t p_margin = 0.08, const Ref<PhysicsTestMotionResult2D> &p_result = Ref<PhysicsTestMotionResult2D>());
protected:
void _notification(int p_what);
@@ -232,17 +232,17 @@ public:
void apply_central_impulse(const Vector2 &p_impulse);
void apply_impulse(const Vector2 &p_impulse, const Vector2 &p_position = Vector2());
- void apply_torque_impulse(float p_torque);
+ void apply_torque_impulse(real_t p_torque);
void set_applied_force(const Vector2 &p_force);
Vector2 get_applied_force() const;
- void set_applied_torque(const float p_torque);
- float get_applied_torque() const;
+ void set_applied_torque(const real_t p_torque);
+ real_t get_applied_torque() const;
void add_central_force(const Vector2 &p_force);
void add_force(const Vector2 &p_force, const Vector2 &p_position = Vector2());
- void add_torque(float p_torque);
+ void add_torque(real_t p_torque);
TypedArray<Node2D> get_colliding_bodies() const; //function for script
@@ -268,15 +268,15 @@ public:
Vector2 collider_vel;
ObjectID collider;
RID collider_rid;
- int collider_shape;
+ int collider_shape = 0;
Variant collider_metadata;
Vector2 remainder;
Vector2 travel;
- int local_shape;
+ int local_shape = 0;
};
private:
- float margin;
+ real_t margin;
Vector2 floor_normal;
Vector2 floor_velocity;
@@ -309,11 +309,11 @@ public:
bool separate_raycast_shapes(bool p_infinite_inertia, Collision &r_collision);
- void set_safe_margin(float p_margin);
- float get_safe_margin() const;
+ void set_safe_margin(real_t p_margin);
+ real_t get_safe_margin() const;
- Vector2 move_and_slide(const Vector2 &p_linear_velocity, const Vector2 &p_up_direction = Vector2(0, 0), bool p_stop_on_slope = false, int p_max_slides = 4, float p_floor_max_angle = Math::deg2rad((float)45), bool p_infinite_inertia = true);
- Vector2 move_and_slide_with_snap(const Vector2 &p_linear_velocity, const Vector2 &p_snap, const Vector2 &p_up_direction = Vector2(0, 0), bool p_stop_on_slope = false, int p_max_slides = 4, float p_floor_max_angle = Math::deg2rad((float)45), bool p_infinite_inertia = true);
+ Vector2 move_and_slide(const Vector2 &p_linear_velocity, const Vector2 &p_up_direction = Vector2(0, 0), bool p_stop_on_slope = false, int p_max_slides = 4, real_t p_floor_max_angle = Math::deg2rad((real_t)45.0), bool p_infinite_inertia = true);
+ Vector2 move_and_slide_with_snap(const Vector2 &p_linear_velocity, const Vector2 &p_snap, const Vector2 &p_up_direction = Vector2(0, 0), bool p_stop_on_slope = false, int p_max_slides = 4, real_t p_floor_max_angle = Math::deg2rad((real_t)45.0), bool p_infinite_inertia = true);
bool is_on_floor() const;
bool is_on_wall() const;
bool is_on_ceiling() const;
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index 82e1b7ac96..ecc05fb931 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -155,7 +155,7 @@ void Polygon2D::_notification(int p_what) {
Rect2 bounds;
int highest_idx = -1;
float highest_y = -1e20;
- float sum = 0;
+ float sum = 0.0;
for (int i = 0; i < len; i++) {
if (i == 0) {
@@ -273,7 +273,7 @@ void Polygon2D::_notification(int p_what) {
//normalize the weights
for (int i = 0; i < vc; i++) {
- float tw = 0;
+ float tw = 0.0;
for (int j = 0; j < 4; j++) {
tw += weightsw[i * 4 + j];
}
@@ -483,7 +483,6 @@ void Polygon2D::set_offset(const Vector2 &p_offset) {
offset = p_offset;
rect_cache_dirty = true;
update();
- _change_notify("offset");
}
Vector2 Polygon2D::get_offset() const {
@@ -649,13 +648,4 @@ void Polygon2D::_bind_methods() {
}
Polygon2D::Polygon2D() {
- invert = false;
- invert_border = 100;
- antialiased = false;
- tex_rot = 0;
- tex_tile = true;
- tex_scale = Vector2(1, 1);
- color = Color(1, 1, 1);
- rect_cache_dirty = true;
- internal_vertices = 0;
}
diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h
index cdb3052225..ab01a4ffd0 100644
--- a/scene/2d/polygon_2d.h
+++ b/scene/2d/polygon_2d.h
@@ -40,7 +40,7 @@ class Polygon2D : public Node2D {
Vector<Vector2> uv;
Vector<Color> vertex_colors;
Array polygons;
- int internal_vertices;
+ int internal_vertices = 0;
struct Bone {
NodePath path;
@@ -49,19 +49,19 @@ class Polygon2D : public Node2D {
Vector<Bone> bone_weights;
- Color color;
+ Color color = Color(1, 1, 1);
Ref<Texture2D> texture;
- Size2 tex_scale;
+ Size2 tex_scale = Vector2(1, 1);
Vector2 tex_ofs;
- bool tex_tile;
- float tex_rot;
- bool invert;
- float invert_border;
- bool antialiased;
+ bool tex_tile = true;
+ float tex_rot = 0.0;
+ bool invert = false;
+ float invert_border = 100.0;
+ bool antialiased = false;
Vector2 offset;
- mutable bool rect_cache_dirty;
+ mutable bool rect_cache_dirty = true;
mutable Rect2 item_rect;
NodePath skeleton;
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index 2c4a549acf..2cc3a74270 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -173,7 +173,7 @@ void RayCast2D::_notification(int p_what) {
}
draw_line(Vector2(), target_position, draw_col, 2);
Vector<Vector2> pts;
- float tsize = 8;
+ float tsize = 8.0;
pts.push_back(xf.xform(Vector2(tsize, 0)));
pts.push_back(xf.xform(Vector2(0, Math_SQRT12 * tsize)));
pts.push_back(xf.xform(Vector2(0, -Math_SQRT12 * tsize)));
@@ -325,12 +325,4 @@ void RayCast2D::_bind_methods() {
}
RayCast2D::RayCast2D() {
- enabled = true;
- collided = false;
- against_shape = 0;
- collision_mask = 1;
- target_position = Vector2(0, 50);
- exclude_parent_body = true;
- collide_with_bodies = true;
- collide_with_areas = false;
}
diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h
index ff7a970ebf..dab3302e25 100644
--- a/scene/2d/ray_cast_2d.h
+++ b/scene/2d/ray_cast_2d.h
@@ -36,20 +36,20 @@
class RayCast2D : public Node2D {
GDCLASS(RayCast2D, Node2D);
- bool enabled;
- bool collided;
+ bool enabled = true;
+ bool collided = false;
ObjectID against;
- int against_shape;
+ int against_shape = 0;
Vector2 collision_point;
Vector2 collision_normal;
Set<RID> exclude;
- uint32_t collision_mask;
- bool exclude_parent_body;
+ uint32_t collision_mask = 1;
+ bool exclude_parent_body = true;
- Vector2 target_position;
+ Vector2 target_position = Vector2(0, 50);
- bool collide_with_areas;
- bool collide_with_bodies;
+ bool collide_with_areas = false;
+ bool collide_with_bodies = true;
protected:
void _notification(int p_what);
diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp
index 4ed4c3a8ff..f10714e28a 100644
--- a/scene/2d/remote_transform_2d.cpp
+++ b/scene/2d/remote_transform_2d.cpp
@@ -223,10 +223,5 @@ void RemoteTransform2D::_bind_methods() {
}
RemoteTransform2D::RemoteTransform2D() {
- use_global_coordinates = true;
- update_remote_position = true;
- update_remote_rotation = true;
- update_remote_scale = true;
-
set_notify_transform(true);
}
diff --git a/scene/2d/remote_transform_2d.h b/scene/2d/remote_transform_2d.h
index cb4bd37f1f..4a26d7b339 100644
--- a/scene/2d/remote_transform_2d.h
+++ b/scene/2d/remote_transform_2d.h
@@ -40,10 +40,10 @@ class RemoteTransform2D : public Node2D {
ObjectID cache;
- bool use_global_coordinates;
- bool update_remote_position;
- bool update_remote_rotation;
- bool update_remote_scale;
+ bool use_global_coordinates = true;
+ bool update_remote_position = true;
+ bool update_remote_rotation = true;
+ bool update_remote_scale = true;
void _update_remote();
void _update_cache();
diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp
index bb5a309f65..5728230a8c 100644
--- a/scene/2d/skeleton_2d.cpp
+++ b/scene/2d/skeleton_2d.cpp
@@ -157,10 +157,6 @@ String Bone2D::get_configuration_warning() const {
}
Bone2D::Bone2D() {
- skeleton = nullptr;
- parent_bone = nullptr;
- skeleton_index = -1;
- default_length = 16;
set_notify_local_transform(true);
//this is a clever hack so the bone knows no rest has been set yet, allowing to show an error.
for (int i = 0; i < 3; i++) {
@@ -186,7 +182,7 @@ void Skeleton2D::_update_bone_setup() {
}
bone_setup_dirty = false;
- RS::get_singleton()->skeleton_allocate(skeleton, bones.size(), true);
+ RS::get_singleton()->skeleton_allocate_data(skeleton, bones.size(), true);
bones.sort(); //sorty so they are always in the same order/index
@@ -293,9 +289,6 @@ void Skeleton2D::_bind_methods() {
}
Skeleton2D::Skeleton2D() {
- bone_setup_dirty = true;
- transform_dirty = true;
-
skeleton = RS::get_singleton()->skeleton_create();
set_notify_transform(true);
}
diff --git a/scene/2d/skeleton_2d.h b/scene/2d/skeleton_2d.h
index 36b9e1b339..80ca8c80ac 100644
--- a/scene/2d/skeleton_2d.h
+++ b/scene/2d/skeleton_2d.h
@@ -43,12 +43,12 @@ class Bone2D : public Node2D {
friend class AnimatedValuesBackup;
#endif
- Bone2D *parent_bone;
- Skeleton2D *skeleton;
+ Bone2D *parent_bone = nullptr;
+ Skeleton2D *skeleton = nullptr;
Transform2D rest;
- float default_length;
+ float default_length = 16.0;
- int skeleton_index;
+ int skeleton_index = -1;
protected:
void _notification(int p_what);
@@ -82,19 +82,19 @@ class Skeleton2D : public Node2D {
bool operator<(const Bone &p_bone) const {
return p_bone.bone->is_greater_than(bone);
}
- Bone2D *bone;
- int parent_index;
+ Bone2D *bone = nullptr;
+ int parent_index = 0;
Transform2D accum_transform;
Transform2D rest_inverse;
};
Vector<Bone> bones;
- bool bone_setup_dirty;
+ bool bone_setup_dirty = true;
void _make_bone_setup_dirty();
void _update_bone_setup();
- bool transform_dirty;
+ bool transform_dirty = true;
void _make_transform_dirty();
void _update_transform();
diff --git a/scene/2d/sprite_2d.cpp b/scene/2d/sprite_2d.cpp
index 773214deeb..dde9790b44 100644
--- a/scene/2d/sprite_2d.cpp
+++ b/scene/2d/sprite_2d.cpp
@@ -155,7 +155,6 @@ void Sprite2D::set_texture(const Ref<Texture2D> &p_texture) {
update();
emit_signal("texture_changed");
item_rect_changed();
- _change_notify("texture");
}
Ref<Texture2D> Sprite2D::get_texture() const {
@@ -176,7 +175,6 @@ void Sprite2D::set_offset(const Point2 &p_offset) {
offset = p_offset;
update();
item_rect_changed();
- _change_notify("offset");
}
Point2 Sprite2D::get_offset() const {
@@ -224,8 +222,6 @@ void Sprite2D::set_region_rect(const Rect2 &p_region_rect) {
if (region) {
item_rect_changed();
}
-
- _change_notify("region_rect");
}
Rect2 Sprite2D::get_region_rect() const {
@@ -250,8 +246,6 @@ void Sprite2D::set_frame(int p_frame) {
frame = p_frame;
- _change_notify("frame");
- _change_notify("frame_coords");
emit_signal(SceneStringNames::get_singleton()->frame_changed);
}
@@ -275,7 +269,7 @@ void Sprite2D::set_vframes(int p_amount) {
vframes = p_amount;
update();
item_rect_changed();
- _change_notify();
+ notify_property_list_changed();
}
int Sprite2D::get_vframes() const {
@@ -287,7 +281,7 @@ void Sprite2D::set_hframes(int p_amount) {
hframes = p_amount;
update();
item_rect_changed();
- _change_notify();
+ notify_property_list_changed();
}
int Sprite2D::get_hframes() const {
@@ -462,16 +456,6 @@ void Sprite2D::_bind_methods() {
}
Sprite2D::Sprite2D() {
- centered = true;
- hflip = false;
- vflip = false;
- region = false;
- region_filter_clip = false;
-
- frame = 0;
-
- vframes = 1;
- hframes = 1;
}
Sprite2D::~Sprite2D() {
diff --git a/scene/2d/sprite_2d.h b/scene/2d/sprite_2d.h
index 716882d485..fa765f457d 100644
--- a/scene/2d/sprite_2d.h
+++ b/scene/2d/sprite_2d.h
@@ -39,21 +39,21 @@ class Sprite2D : public Node2D {
Ref<Texture2D> texture;
Color specular_color;
- float shininess;
+ float shininess = 0.0;
- bool centered;
+ bool centered = true;
Point2 offset;
- bool hflip;
- bool vflip;
- bool region;
+ bool hflip = false;
+ bool vflip = false;
+ bool region = false;
Rect2 region_rect;
- bool region_filter_clip;
+ bool region_filter_clip = false;
- int frame;
+ int frame = 0;
- int vframes;
- int hframes;
+ int vframes = 1;
+ int hframes = 1;
void _get_rects(Rect2 &r_src_rect, Rect2 &r_dst_rect, bool &r_filter_clip) const;
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 01b7a9c260..d868ebae25 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -165,7 +165,6 @@ void TileMap::_update_quadrant_transform() {
void TileMap::set_tileset(const Ref<TileSet> &p_tileset) {
if (tile_set.is_valid()) {
tile_set->disconnect("changed", callable_mp(this, &TileMap::_recreate_quadrants));
- tile_set->remove_change_receptor(this);
}
_clear_quadrants();
@@ -173,7 +172,6 @@ void TileMap::set_tileset(const Ref<TileSet> &p_tileset) {
if (tile_set.is_valid()) {
tile_set->connect("changed", callable_mp(this, &TileMap::_recreate_quadrants));
- tile_set->add_change_receptor(this);
} else {
clear();
}
@@ -1330,7 +1328,7 @@ void TileMap::set_collision_use_parent(bool p_use_parent) {
}
_recreate_quadrants();
- _change_notify();
+ notify_property_list_changed();
update_configuration_warning();
}
@@ -1865,47 +1863,11 @@ void TileMap::_bind_methods() {
BIND_ENUM_CONSTANT(TILE_ORIGIN_BOTTOM_LEFT);
}
-void TileMap::_changed_callback(Object *p_changed, const char *p_prop) {
- if (tile_set.is_valid() && tile_set.ptr() == p_changed) {
- emit_signal("settings_changed");
- }
-}
-
TileMap::TileMap() {
- rect_cache_dirty = true;
- used_size_cache_dirty = true;
- pending_update = false;
- quadrant_order_dirty = false;
- quadrant_size = 16;
- cell_size = Size2(64, 64);
- custom_transform = Transform2D(64, 0, 0, 64, 0, 0);
- collision_layer = 1;
- collision_mask = 1;
- friction = 1;
- bounce = 0;
- mode = MODE_SQUARE;
- half_offset = HALF_OFFSET_DISABLED;
- use_parent = false;
- collision_parent = nullptr;
- use_kinematic = false;
- navigation = nullptr;
- use_y_sort = false;
- compatibility_mode = false;
- centered_textures = false;
- occluder_light_mask = 1;
- clip_uv = false;
- format = FORMAT_1; // Assume lowest possible format if none is present
-
- fp_adjust = 0.00001;
- tile_origin = TILE_ORIGIN_TOP_LEFT;
set_notify_transform(true);
set_notify_local_transform(false);
}
TileMap::~TileMap() {
- if (tile_set.is_valid()) {
- tile_set->remove_change_receptor(this);
- }
-
clear();
}
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index b1e54aafae..3bf4587921 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -70,22 +70,22 @@ private:
};
Ref<TileSet> tile_set;
- Size2i cell_size;
- int quadrant_size;
- Mode mode;
- Transform2D custom_transform;
- HalfOffset half_offset;
- bool use_parent;
- CollisionObject2D *collision_parent;
- bool use_kinematic;
- Navigation2D *navigation;
+ Size2i cell_size = Size2(64, 64);
+ int quadrant_size = 16;
+ Mode mode = MODE_SQUARE;
+ Transform2D custom_transform = Transform2D(64, 0, 0, 64, 0, 0);
+ HalfOffset half_offset = HALF_OFFSET_DISABLED;
+ bool use_parent = false;
+ CollisionObject2D *collision_parent = nullptr;
+ bool use_kinematic = false;
+ Navigation2D *navigation = nullptr;
union PosKey {
struct {
int16_t x;
int16_t y;
};
- uint32_t key;
+ uint32_t key = 0;
//using a more precise comparison so the regions can be sorted later
bool operator<(const PosKey &p_k) const { return (y == p_k.y) ? x < p_k.x : y < p_k.y; }
@@ -119,8 +119,7 @@ private:
int16_t autotile_coord_y : 16;
};
- uint64_t _u64t;
- Cell() { _u64t = 0; }
+ uint64_t _u64t = 0;
};
Map<PosKey, Cell> tile_map;
@@ -130,7 +129,7 @@ private:
Vector2 pos;
List<RID> canvas_items;
RID body;
- uint32_t shape_owner_id;
+ uint32_t shape_owner_id = 0;
SelfList<Quadrant> dirty_list;
@@ -176,27 +175,27 @@ private:
SelfList<Quadrant>::List dirty_quadrant_list;
- bool pending_update;
+ bool pending_update = false;
Rect2 rect_cache;
- bool rect_cache_dirty;
+ bool rect_cache_dirty = true;
Rect2 used_size_cache;
- bool used_size_cache_dirty;
- bool quadrant_order_dirty;
- bool use_y_sort;
- bool compatibility_mode;
- bool centered_textures;
- bool clip_uv;
- float fp_adjust;
- float friction;
- float bounce;
- uint32_t collision_layer;
- uint32_t collision_mask;
- mutable DataFormat format;
-
- TileOrigin tile_origin;
-
- int occluder_light_mask;
+ bool used_size_cache_dirty = true;
+ bool quadrant_order_dirty = false;
+ bool use_y_sort = false;
+ bool compatibility_mode = false;
+ bool centered_textures = false;
+ bool clip_uv = false;
+ float fp_adjust = 0.00001;
+ float friction = 1.0;
+ float bounce = 0.0;
+ uint32_t collision_layer = 1;
+ uint32_t collision_mask = 1;
+ mutable DataFormat format = FORMAT_1; // Assume lowest possible format if none is present
+
+ TileOrigin tile_origin = TILE_ORIGIN_TOP_LEFT;
+
+ int occluder_light_mask = 1;
void _fix_cell_transform(Transform2D &xform, const Cell &p_cell, const Vector2 &p_offset, const Size2 &p_sc);
@@ -233,7 +232,6 @@ protected:
static void _bind_methods();
virtual void _validate_property(PropertyInfo &property) const override;
- virtual void _changed_callback(Object *p_changed, const char *p_prop) override;
public:
enum {
diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp
index 04a1aedcd3..fccf126dad 100644
--- a/scene/2d/touch_screen_button.cpp
+++ b/scene/2d/touch_screen_button.cpp
@@ -399,11 +399,6 @@ void TouchScreenButton::_bind_methods() {
}
TouchScreenButton::TouchScreenButton() {
- finger_pressed = -1;
- passby_press = false;
- visibility = VISIBILITY_ALWAYS;
- shape_centered = true;
- shape_visible = true;
unit_rect = Ref<RectangleShape2D>(memnew(RectangleShape2D));
unit_rect->set_size(Vector2(1, 1));
}
diff --git a/scene/2d/touch_screen_button.h b/scene/2d/touch_screen_button.h
index f4ae3ca26c..10820ad059 100644
--- a/scene/2d/touch_screen_button.h
+++ b/scene/2d/touch_screen_button.h
@@ -50,16 +50,16 @@ private:
Ref<Texture2D> texture_pressed;
Ref<BitMap> bitmask;
Ref<Shape2D> shape;
- bool shape_centered;
- bool shape_visible;
+ bool shape_centered = true;
+ bool shape_visible = true;
Ref<RectangleShape2D> unit_rect;
StringName action;
- bool passby_press;
- int finger_pressed;
+ bool passby_press = false;
+ int finger_pressed = -1;
- VisibilityMode visibility;
+ VisibilityMode visibility = VISIBILITY_ALWAYS;
void _input(const Ref<InputEvent> &p_event);
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index f3dddd5af8..916038a1f3 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -89,8 +89,6 @@ void VisibilityNotifier2D::set_rect(const Rect2 &p_rect) {
item_rect_changed();
}
}
-
- _change_notify("rect");
}
Rect2 VisibilityNotifier2D::get_rect() const {
@@ -363,6 +361,4 @@ VisibilityEnabler2D::VisibilityEnabler2D() {
}
enabler[ENABLER_PARENT_PROCESS] = false;
enabler[ENABLER_PARENT_PHYSICS_PROCESS] = false;
-
- visible = false;
}
diff --git a/scene/2d/visibility_notifier_2d.h b/scene/2d/visibility_notifier_2d.h
index ea3b5df37b..3d1701a1e5 100644
--- a/scene/2d/visibility_notifier_2d.h
+++ b/scene/2d/visibility_notifier_2d.h
@@ -85,7 +85,7 @@ protected:
virtual void _screen_enter() override;
virtual void _screen_exit() override;
- bool visible;
+ bool visible = false;
void _find_nodes(Node *p_node);
diff --git a/scene/2d/y_sort.cpp b/scene/2d/y_sort.cpp
index 987e4581f4..7e7bc27cc2 100644
--- a/scene/2d/y_sort.cpp
+++ b/scene/2d/y_sort.cpp
@@ -48,6 +48,5 @@ void YSort::_bind_methods() {
}
YSort::YSort() {
- sort_enabled = true;
RS::get_singleton()->canvas_item_set_sort_children_by_y(get_canvas_item(), true);
}
diff --git a/scene/2d/y_sort.h b/scene/2d/y_sort.h
index 0882a88e3a..7d36ee3391 100644
--- a/scene/2d/y_sort.h
+++ b/scene/2d/y_sort.h
@@ -35,7 +35,7 @@
class YSort : public Node2D {
GDCLASS(YSort, Node2D);
- bool sort_enabled;
+ bool sort_enabled = true;
static void _bind_methods();
public:
diff --git a/scene/3d/area_3d.cpp b/scene/3d/area_3d.cpp
index 36312482cd..99c5276636 100644
--- a/scene/3d/area_3d.cpp
+++ b/scene/3d/area_3d.cpp
@@ -681,29 +681,10 @@ void Area3D::_bind_methods() {
Area3D::Area3D() :
CollisionObject3D(PhysicsServer3D::get_singleton()->area_create(), true) {
- space_override = SPACE_OVERRIDE_DISABLED;
set_gravity(9.8);
- locked = false;
set_gravity_vector(Vector3(0, -1, 0));
- gravity_is_point = false;
- gravity_distance_scale = 0;
- linear_damp = 0.1;
- angular_damp = 0.1;
- priority = 0;
- monitoring = false;
- monitorable = false;
- collision_mask = 1;
- collision_layer = 1;
set_monitoring(true);
set_monitorable(true);
-
- audio_bus_override = false;
- audio_bus = "Master";
-
- use_reverb_bus = false;
- reverb_bus = "Master";
- reverb_amount = 0.0;
- reverb_uniformity = 0.0;
}
Area3D::~Area3D() {
diff --git a/scene/3d/area_3d.h b/scene/3d/area_3d.h
index 5d8e1933ba..6d976115f7 100644
--- a/scene/3d/area_3d.h
+++ b/scene/3d/area_3d.h
@@ -47,19 +47,19 @@ public:
};
private:
- SpaceOverride space_override;
+ SpaceOverride space_override = SPACE_OVERRIDE_DISABLED;
Vector3 gravity_vec;
real_t gravity;
- bool gravity_is_point;
- real_t gravity_distance_scale;
- real_t angular_damp;
- real_t linear_damp;
- uint32_t collision_mask;
- uint32_t collision_layer;
- int priority;
- bool monitoring;
- bool monitorable;
- bool locked;
+ bool gravity_is_point = false;
+ real_t gravity_distance_scale = 0.0;
+ real_t angular_damp = 0.1;
+ real_t linear_damp = 0.1;
+ uint32_t collision_mask = 1;
+ uint32_t collision_layer = 1;
+ int priority = 0;
+ bool monitoring = false;
+ bool monitorable = false;
+ bool locked = false;
void _body_inout(int p_status, const RID &p_body, ObjectID p_instance, int p_body_shape, int p_area_shape);
@@ -67,8 +67,8 @@ private:
void _body_exit_tree(ObjectID p_id);
struct ShapePair {
- int body_shape;
- int area_shape;
+ int body_shape = 0;
+ int area_shape = 0;
bool operator<(const ShapePair &p_sp) const {
if (body_shape == p_sp.body_shape) {
return area_shape < p_sp.area_shape;
@@ -85,8 +85,8 @@ private:
};
struct BodyState {
- int rc;
- bool in_tree;
+ int rc = 0;
+ bool in_tree = false;
VSet<ShapePair> shapes;
};
@@ -98,8 +98,8 @@ private:
void _area_exit_tree(ObjectID p_id);
struct AreaShapePair {
- int area_shape;
- int self_shape;
+ int area_shape = 0;
+ int self_shape = 0;
bool operator<(const AreaShapePair &p_sp) const {
if (area_shape == p_sp.area_shape) {
return self_shape < p_sp.self_shape;
@@ -116,21 +116,21 @@ private:
};
struct AreaState {
- int rc;
- bool in_tree;
+ int rc = 0;
+ bool in_tree = false;
VSet<AreaShapePair> shapes;
};
Map<ObjectID, AreaState> area_map;
void _clear_monitoring();
- bool audio_bus_override;
- StringName audio_bus;
+ bool audio_bus_override = false;
+ StringName audio_bus = "Master";
- bool use_reverb_bus;
- StringName reverb_bus;
- float reverb_amount;
- float reverb_uniformity;
+ bool use_reverb_bus = false;
+ StringName reverb_bus = "Master";
+ float reverb_amount = 0.0;
+ float reverb_uniformity = 0.0;
void _validate_property(PropertyInfo &property) const override;
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 2bcf898ced..72392be5bd 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -42,8 +42,8 @@ class Spcap {
private:
struct Speaker {
Vector3 direction;
- real_t effective_number_of_speakers; // precalculated
- mutable real_t squared_gain; // temporary
+ real_t effective_number_of_speakers = 0; // precalculated
+ mutable real_t squared_gain = 0; // temporary
};
Vector<Speaker> speakers;
@@ -138,15 +138,15 @@ void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tig
}
void AudioStreamPlayer3D::_mix_audio() {
- if (!stream_playback.is_valid() || !active ||
+ if (!stream_playback.is_valid() || !active.is_set() ||
(stream_paused && !stream_paused_fade_out)) {
return;
}
bool started = false;
- if (setseek >= 0.0) {
- stream_playback->start(setseek);
- setseek = -1.0; //reset seek
+ if (setseek.get() >= 0.0) {
+ stream_playback->start(setseek.get());
+ setseek.set(-1.0); //reset seek
started = true;
}
@@ -160,14 +160,14 @@ void AudioStreamPlayer3D::_mix_audio() {
}
// Mix if we're not paused or we're fading out
- if ((output_count > 0 || out_of_range_mode == OUT_OF_RANGE_MIX)) {
+ if ((output_count.get() > 0 || out_of_range_mode == OUT_OF_RANGE_MIX)) {
float output_pitch_scale = 0.0;
- if (output_count) {
+ if (output_count.get()) {
//used for doppler, not realistic but good enough
- for (int i = 0; i < output_count; i++) {
+ for (int i = 0; i < output_count.get(); i++) {
output_pitch_scale += outputs[i].pitch_scale;
}
- output_pitch_scale /= float(output_count);
+ output_pitch_scale /= float(output_count.get());
} else {
output_pitch_scale = 1.0;
}
@@ -176,7 +176,7 @@ void AudioStreamPlayer3D::_mix_audio() {
}
//write all outputs
- for (int i = 0; i < output_count; i++) {
+ for (int i = 0; i < output_count.get(); i++) {
Output current = outputs[i];
//see if current output exists, to keep volume ramp
@@ -285,14 +285,14 @@ void AudioStreamPlayer3D::_mix_audio() {
prev_outputs[i] = current;
}
- prev_output_count = output_count;
+ prev_output_count = output_count.get();
//stream is no longer active, disable this.
if (!stream_playback->is_playing()) {
- active = false;
+ active.clear();
}
- output_ready = false;
+ output_ready.clear();
stream_paused_fade_in = false;
stream_paused_fade_out = false;
}
@@ -360,7 +360,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PHYSICS_PROCESS) {
//update anything related to position first, if possible of course
- if (!output_ready) {
+ if (!output_ready.is_set()) {
Vector3 linear_velocity;
//compute linear velocity for doppler
@@ -596,24 +596,20 @@ void AudioStreamPlayer3D::_notification(int p_what) {
}
}
- output_count = new_output_count;
- output_ready = true;
+ output_count.set(new_output_count);
+ output_ready.set();
}
//start playing if requested
- if (setplay >= 0.0) {
- setseek = setplay;
- active = true;
- setplay = -1;
- //do not update, this makes it easier to animate (will shut off otherwise)
- ///_change_notify("playing"); //update property in editor
+ if (setplay.get() >= 0.0) {
+ setseek.set(setplay.get());
+ active.set();
+ setplay.set(-1);
}
//stop playing if no longer active
- if (!active) {
+ if (!active.is_set()) {
set_physics_process_internal(false);
- //do not update, this makes it easier to animate (will shut off otherwise)
- //_change_notify("playing"); //update property in editor
emit_signal("finished");
}
}
@@ -627,8 +623,8 @@ void AudioStreamPlayer3D::set_stream(Ref<AudioStream> p_stream) {
if (stream_playback.is_valid()) {
stream_playback.unref();
stream.unref();
- active = false;
- setseek = -1;
+ active.clear();
+ setseek.set(-1);
}
if (p_stream.is_valid()) {
@@ -687,30 +683,29 @@ void AudioStreamPlayer3D::play(float p_from_pos) {
}
if (stream_playback.is_valid()) {
- active = true;
- setplay = p_from_pos;
- output_ready = false;
+ setplay.set(p_from_pos);
+ output_ready.clear();
set_physics_process_internal(true);
}
}
void AudioStreamPlayer3D::seek(float p_seconds) {
if (stream_playback.is_valid()) {
- setseek = p_seconds;
+ setseek.set(p_seconds);
}
}
void AudioStreamPlayer3D::stop() {
if (stream_playback.is_valid()) {
- active = false;
+ active.clear();
set_physics_process_internal(false);
- setplay = -1;
+ setplay.set(-1);
}
}
bool AudioStreamPlayer3D::is_playing() const {
if (stream_playback.is_valid()) {
- return active; // && stream_playback->is_playing();
+ return active.is_set() || setplay.get() >= 0;
}
return false;
@@ -718,6 +713,10 @@ bool AudioStreamPlayer3D::is_playing() const {
float AudioStreamPlayer3D::get_playback_position() {
if (stream_playback.is_valid()) {
+ float ss = setseek.get();
+ if (ss >= 0.0) {
+ return ss;
+ }
return stream_playback->get_playback_position();
}
@@ -757,7 +756,7 @@ void AudioStreamPlayer3D::_set_playing(bool p_enable) {
}
bool AudioStreamPlayer3D::_is_active() const {
- return active;
+ return active.is_set();
}
void AudioStreamPlayer3D::_validate_property(PropertyInfo &property) const {
@@ -776,7 +775,7 @@ void AudioStreamPlayer3D::_validate_property(PropertyInfo &property) const {
}
void AudioStreamPlayer3D::_bus_layout_changed() {
- _change_notify();
+ notify_property_list_changed();
}
void AudioStreamPlayer3D::set_max_distance(float p_metres) {
@@ -809,7 +808,6 @@ void AudioStreamPlayer3D::set_emission_angle(float p_angle) {
ERR_FAIL_COND(p_angle < 0 || p_angle > 90);
emission_angle = p_angle;
update_gizmo();
- _change_notify("emission_angle");
}
float AudioStreamPlayer3D::get_emission_angle() const {
@@ -1002,31 +1000,6 @@ void AudioStreamPlayer3D::_bind_methods() {
}
AudioStreamPlayer3D::AudioStreamPlayer3D() {
- unit_db = 0;
- unit_size = 1;
- attenuation_model = ATTENUATION_INVERSE_DISTANCE;
- max_db = 3;
- pitch_scale = 1.0;
- autoplay = false;
- setseek = -1;
- active = false;
- output_count = 0;
- prev_output_count = 0;
- max_distance = 0;
- setplay = -1;
- output_ready = false;
- area_mask = 1;
- emission_angle = 45;
- emission_angle_enabled = false;
- emission_angle_filter_attenuation_db = -12;
- attenuation_filter_cutoff_hz = 5000;
- attenuation_filter_db = -24;
- 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;
-
velocity_tracker.instance();
AudioServer::get_singleton()->connect("bus_layout_changed", callable_mp(this, &AudioStreamPlayer3D::_bus_layout_changed));
set_disable_scale(true);
diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h
index bcfe2b2229..70c535bd89 100644
--- a/scene/3d/audio_stream_player_3d.h
+++ b/scene/3d/audio_stream_player_3d.h
@@ -31,6 +31,7 @@
#ifndef AUDIO_STREAM_PLAYER_3D_H
#define AUDIO_STREAM_PLAYER_3D_H
+#include "core/templates/safe_refcount.h"
#include "scene/3d/node_3d.h"
#include "scene/3d/velocity_tracker_3d.h"
#include "servers/audio/audio_filter_sw.h"
@@ -71,46 +72,39 @@ private:
AudioFilterSW filter;
AudioFilterSW::Processor filter_process[8];
AudioFrame vol[4];
- float filter_gain;
- float pitch_scale;
- int bus_index;
- int reverb_bus_index;
+ float filter_gain = 0.0;
+ float pitch_scale = 0.0;
+ int bus_index = -1;
+ int reverb_bus_index = -1;
AudioFrame reverb_vol[4];
- Viewport *viewport; //pointer only used for reference to previous mix
-
- Output() {
- filter_gain = 0;
- viewport = nullptr;
- reverb_bus_index = -1;
- bus_index = -1;
- }
+ Viewport *viewport = nullptr; //pointer only used for reference to previous mix
};
Output outputs[MAX_OUTPUTS];
- volatile int output_count;
- volatile bool output_ready;
+ SafeNumeric<int> output_count;
+ SafeFlag output_ready;
//these are used by audio thread to have a reference of previous volumes (for ramping volume and avoiding clicks)
Output prev_outputs[MAX_OUTPUTS];
- int prev_output_count;
+ int prev_output_count = 0;
Ref<AudioStreamPlayback> stream_playback;
Ref<AudioStream> stream;
Vector<AudioFrame> mix_buffer;
- volatile float setseek;
- volatile bool active;
- volatile float setplay;
-
- AttenuationModel attenuation_model;
- float unit_db;
- float unit_size;
- float max_db;
- float pitch_scale;
- bool autoplay;
- bool stream_paused;
- bool stream_paused_fade_in;
- bool stream_paused_fade_out;
+ SafeNumeric<float> setseek{ -1.0 };
+ SafeFlag active;
+ SafeNumeric<float> setplay{ -1.0 };
+
+ AttenuationModel attenuation_model = ATTENUATION_INVERSE_DISTANCE;
+ float unit_db = 0.0;
+ float unit_size = 1.0;
+ float max_db = 3.0;
+ float pitch_scale = 1.0;
+ bool autoplay = false;
+ bool stream_paused = false;
+ bool stream_paused_fade_in = false;
+ bool stream_paused_fade_out = false;
StringName bus;
static void _calc_output_vol(const Vector3 &source_dir, real_t tightness, Output &output);
@@ -122,21 +116,21 @@ private:
void _bus_layout_changed();
- uint32_t area_mask;
+ uint32_t area_mask = 1;
- bool emission_angle_enabled;
- float emission_angle;
- float emission_angle_filter_attenuation_db;
- float attenuation_filter_cutoff_hz;
- float attenuation_filter_db;
+ bool emission_angle_enabled = false;
+ float emission_angle = 45.0;
+ float emission_angle_filter_attenuation_db = -12.0;
+ float attenuation_filter_cutoff_hz = 5000.0;
+ float attenuation_filter_db = -24.0;
- float max_distance;
+ float max_distance = 0.0;
Ref<VelocityTracker3D> velocity_tracker;
- DopplerTracking doppler_tracking;
+ DopplerTracking doppler_tracking = DOPPLER_TRACKING_DISABLED;
- OutOfRangeMode out_of_range_mode;
+ OutOfRangeMode out_of_range_mode = OUT_OF_RANGE_MIX;
float _get_attenuation_db(float p_distance) const;
diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp
index 14c8755d99..75907d4a84 100644
--- a/scene/3d/baked_lightmap.cpp
+++ b/scene/3d/baked_lightmap.cpp
@@ -1302,7 +1302,7 @@ bool BakedLightmap::is_interior() const {
void BakedLightmap::set_environment_mode(EnvironmentMode p_mode) {
environment_mode = p_mode;
- _change_notify();
+ notify_property_list_changed();
}
BakedLightmap::EnvironmentMode BakedLightmap::get_environment_mode() const {
@@ -1466,17 +1466,4 @@ void BakedLightmap::_bind_methods() {
}
BakedLightmap::BakedLightmap() {
- environment_mode = ENVIRONMENT_MODE_DISABLED;
- environment_custom_color = Color(0.2, 0.7, 1.0);
- environment_custom_energy = 1.0;
-
- bake_quality = BAKE_QUALITY_MEDIUM;
- interior = false;
- directional = false;
-
- gen_probes = GENERATE_PROBES_DISABLED;
- use_denoiser = true;
- bounces = 1;
- bias = 0.0005;
- max_texture_size = 16384;
}
diff --git a/scene/3d/baked_lightmap.h b/scene/3d/baked_lightmap.h
index 7fd1cf892e..e2d89ab2d0 100644
--- a/scene/3d/baked_lightmap.h
+++ b/scene/3d/baked_lightmap.h
@@ -53,9 +53,9 @@ class BakedLightmapData : public Resource {
struct User {
NodePath path;
- int32_t sub_instance;
+ int32_t sub_instance = 0;
Rect2 uv_scale;
- int slice_index;
+ int slice_index = 0;
};
Vector<User> users;
@@ -136,32 +136,32 @@ public:
};
private:
- BakeQuality bake_quality;
- bool use_denoiser;
- int bounces;
- float bias;
- int max_texture_size;
- bool interior;
- EnvironmentMode environment_mode;
+ BakeQuality bake_quality = BAKE_QUALITY_MEDIUM;
+ bool use_denoiser = true;
+ int bounces = 1;
+ float bias = 0.0005;
+ int max_texture_size = 16384;
+ bool interior = false;
+ EnvironmentMode environment_mode = ENVIRONMENT_MODE_DISABLED;
Ref<Sky> environment_custom_sky;
- Color environment_custom_color;
- float environment_custom_energy;
- bool directional;
- GenerateProbes gen_probes;
+ Color environment_custom_color = Color(0.2, 0.7, 1.0);
+ float environment_custom_energy = 1.0;
+ bool directional = false;
+ GenerateProbes gen_probes = GENERATE_PROBES_DISABLED;
Ref<BakedLightmapData> light_data;
struct LightsFound {
Transform xform;
- Light3D *light;
+ Light3D *light = nullptr;
};
struct MeshesFound {
Transform xform;
NodePath node_path;
- int32_t subindex;
+ int32_t subindex = 0;
Ref<Mesh> mesh;
- int32_t lightmap_scale;
+ int32_t lightmap_scale = 0;
Vector<Ref<Material>> overrides;
};
@@ -172,19 +172,20 @@ private:
struct BakeTimeData {
String text;
- int pass;
- uint64_t last_step;
+ int pass = 0;
+ uint64_t last_step = 0;
};
struct BSPSimplex {
- int vertices[4];
- int planes[4];
+ int vertices[4] = {};
+ int planes[4] = {};
};
struct BSPNode {
static const int32_t EMPTY_LEAF = INT32_MIN;
Plane plane;
- int32_t over = EMPTY_LEAF, under = EMPTY_LEAF;
+ int32_t over = EMPTY_LEAF;
+ int32_t under = EMPTY_LEAF;
};
int _bsp_get_simplex_side(const Vector<Vector3> &p_points, const LocalVector<BSPSimplex> &p_simplices, const Plane &p_plane, uint32_t p_simplex) const;
@@ -192,16 +193,16 @@ private:
struct BakeStepUD {
Lightmapper::BakeStepFunc func;
- void *ud;
- float from_percent;
- float to_percent;
+ void *ud = nullptr;
+ float from_percent = 0.0;
+ float to_percent = 0.0;
};
static bool _lightmap_bake_step_function(float p_completion, const String &p_text, void *ud, bool p_refresh);
struct GenProbesOctree {
Vector3i offset;
- uint32_t size;
+ uint32_t size = 0;
GenProbesOctree *children[8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
~GenProbesOctree() {
for (int i = 0; i < 8; i++) {
diff --git a/scene/3d/bone_attachment_3d.cpp b/scene/3d/bone_attachment_3d.cpp
index 30fe1ecea8..5315e685a0 100644
--- a/scene/3d/bone_attachment_3d.cpp
+++ b/scene/3d/bone_attachment_3d.cpp
@@ -105,7 +105,6 @@ void BoneAttachment3D::_notification(int p_what) {
}
BoneAttachment3D::BoneAttachment3D() {
- bound = false;
}
void BoneAttachment3D::_bind_methods() {
diff --git a/scene/3d/bone_attachment_3d.h b/scene/3d/bone_attachment_3d.h
index 0dddaa1028..0c6d5f12b1 100644
--- a/scene/3d/bone_attachment_3d.h
+++ b/scene/3d/bone_attachment_3d.h
@@ -36,7 +36,7 @@
class BoneAttachment3D : public Node3D {
GDCLASS(BoneAttachment3D, Node3D);
- bool bound;
+ bool bound = false;
String bone_name;
void _check_bind();
diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp
index 53c3204b3e..e9e93884a5 100644
--- a/scene/3d/camera_3d.cpp
+++ b/scene/3d/camera_3d.cpp
@@ -209,7 +209,7 @@ void Camera3D::set_projection(Camera3D::Projection p_mode) {
if (p_mode == PROJECTION_PERSPECTIVE || p_mode == PROJECTION_ORTHOGONAL || p_mode == PROJECTION_FRUSTUM) {
mode = p_mode;
_update_camera_mode();
- _change_notify();
+ notify_property_list_changed();
}
}
@@ -432,7 +432,7 @@ void Camera3D::set_keep_aspect_mode(KeepAspect p_aspect) {
keep_aspect = p_aspect;
RenderingServer::get_singleton()->camera_set_use_vertical_aspect(camera, p_aspect == KEEP_WIDTH);
_update_camera_mode();
- _change_notify();
+ notify_property_list_changed();
}
Camera3D::KeepAspect Camera3D::get_keep_aspect_mode() const {
@@ -562,14 +562,12 @@ void Camera3D::set_fov(float p_fov) {
ERR_FAIL_COND(p_fov < 1 || p_fov > 179);
fov = p_fov;
_update_camera_mode();
- _change_notify("fov");
}
void Camera3D::set_size(float p_size) {
ERR_FAIL_COND(p_size < 0.1 || p_size > 16384);
size = p_size;
_update_camera_mode();
- _change_notify("size");
}
void Camera3D::set_near(float p_near) {
@@ -653,24 +651,10 @@ Vector3 Camera3D::get_doppler_tracked_velocity() const {
Camera3D::Camera3D() {
camera = RenderingServer::get_singleton()->camera_create();
- size = 1;
- fov = 0;
- frustum_offset = Vector2();
- near = 0;
- far = 0;
- current = false;
- viewport = nullptr;
- force_change = false;
- mode = PROJECTION_PERSPECTIVE;
set_perspective(75.0, 0.05, 4000.0);
- keep_aspect = KEEP_HEIGHT;
- layers = 0xfffff;
- v_offset = 0;
- h_offset = 0;
RenderingServer::get_singleton()->camera_set_cull_mask(camera, layers);
//active=false;
velocity_tracker.instance();
- doppler_tracking = DOPPLER_TRACKING_DISABLED;
set_notify_transform(true);
set_disable_scale(true);
}
@@ -882,16 +866,10 @@ void ClippedCamera3D::_bind_methods() {
}
ClippedCamera3D::ClippedCamera3D() {
- margin = 0;
- clip_offset = 0;
- process_mode = CLIP_PROCESS_PHYSICS;
set_physics_process_internal(true);
- collision_mask = 1;
set_notify_local_transform(Engine::get_singleton()->is_editor_hint());
points.resize(5);
pyramid_shape = PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_CONVEX_POLYGON);
- clip_to_areas = false;
- clip_to_bodies = true;
}
ClippedCamera3D::~ClippedCamera3D() {
diff --git a/scene/3d/camera_3d.h b/scene/3d/camera_3d.h
index aa36c8800d..06bb55e23c 100644
--- a/scene/3d/camera_3d.h
+++ b/scene/3d/camera_3d.h
@@ -57,26 +57,27 @@ public:
};
private:
- bool force_change;
- bool current;
- Viewport *viewport;
+ bool force_change = false;
+ bool current = false;
+ Viewport *viewport = nullptr;
- Projection mode;
+ Projection mode = PROJECTION_PERSPECTIVE;
- float fov;
- float size;
+ float fov = 0.0;
+ float size = 1.0;
Vector2 frustum_offset;
- float near, far;
- float v_offset;
- float h_offset;
- KeepAspect keep_aspect;
+ float near = 0.0;
+ float far = 0.0;
+ float v_offset = 0.0;
+ float h_offset = 0.0;
+ KeepAspect keep_aspect = KEEP_HEIGHT;
RID camera;
RID scenario_id;
// String camera_group;
- uint32_t layers;
+ uint32_t layers = 0xfffff;
Ref<Environment> environment;
Ref<CameraEffects> effects;
@@ -87,7 +88,7 @@ private:
friend class Viewport;
void _update_audio_listener_state();
- DopplerTracking doppler_tracking;
+ DopplerTracking doppler_tracking = DOPPLER_TRACKING_DISABLED;
Ref<VelocityTracker3D> velocity_tracker;
protected:
@@ -191,13 +192,13 @@ public:
};
private:
- ProcessMode process_mode;
+ ProcessMode process_mode = CLIP_PROCESS_PHYSICS;
RID pyramid_shape;
- float margin;
- float clip_offset;
- uint32_t collision_mask;
- bool clip_to_areas;
- bool clip_to_bodies;
+ float margin = 0.0;
+ float clip_offset = 0.0;
+ uint32_t collision_mask = 1;
+ bool clip_to_areas = false;
+ bool clip_to_bodies = true;
Set<RID> exclude;
diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp
index f1d7ac64b2..b7da4822e2 100644
--- a/scene/3d/collision_object_3d.cpp
+++ b/scene/3d/collision_object_3d.cpp
@@ -325,10 +325,7 @@ uint32_t CollisionObject3D::shape_find_owner(int p_shape_index) const {
CollisionObject3D::CollisionObject3D(RID p_rid, bool p_area) {
rid = p_rid;
area = p_area;
- capture_input_on_drag = false;
- ray_pickable = true;
set_notify_transform(true);
- total_subshapes = 0;
if (p_area) {
PhysicsServer3D::get_singleton()->area_attach_object_instance_id(rid, get_instance_id());
@@ -360,8 +357,6 @@ String CollisionObject3D::get_configuration_warning() const {
}
CollisionObject3D::CollisionObject3D() {
- capture_input_on_drag = false;
- ray_pickable = true;
set_notify_transform(true);
//owner=
diff --git a/scene/3d/collision_object_3d.h b/scene/3d/collision_object_3d.h
index da65791b9c..b7473ca12a 100644
--- a/scene/3d/collision_object_3d.h
+++ b/scene/3d/collision_object_3d.h
@@ -37,33 +37,28 @@
class CollisionObject3D : public Node3D {
GDCLASS(CollisionObject3D, Node3D);
- bool area;
+ bool area = false;
RID rid;
struct ShapeData {
- Object *owner;
+ Object *owner = nullptr;
Transform xform;
struct ShapeBase {
Ref<Shape3D> shape;
- int index;
+ int index = 0;
};
Vector<ShapeBase> shapes;
- bool disabled;
-
- ShapeData() {
- disabled = false;
- owner = nullptr;
- }
+ bool disabled = false;
};
- int total_subshapes;
+ int total_subshapes = 0;
Map<uint32_t, ShapeData> shapes;
- bool capture_input_on_drag;
- bool ray_pickable;
+ bool capture_input_on_drag = false;
+ bool ray_pickable = true;
void _update_pickable();
diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp
index 5e77937533..e3e2eb4669 100644
--- a/scene/3d/collision_polygon_3d.cpp
+++ b/scene/3d/collision_polygon_3d.cpp
@@ -70,6 +70,7 @@ void CollisionPolygon3D::_build_polygon() {
}
convex->set_points(cp);
+ convex->set_margin(margin);
parent->shape_owner_add_shape(owner_id, convex);
parent->shape_owner_set_disabled(owner_id, disabled);
}
@@ -132,13 +133,13 @@ AABB CollisionPolygon3D::get_item_rect() const {
return aabb;
}
-void CollisionPolygon3D::set_depth(float p_depth) {
+void CollisionPolygon3D::set_depth(real_t p_depth) {
depth = p_depth;
_build_polygon();
update_gizmo();
}
-float CollisionPolygon3D::get_depth() const {
+real_t CollisionPolygon3D::get_depth() const {
return depth;
}
@@ -155,6 +156,17 @@ bool CollisionPolygon3D::is_disabled() const {
return disabled;
}
+real_t CollisionPolygon3D::get_margin() const {
+ return margin;
+}
+
+void CollisionPolygon3D::set_margin(real_t p_margin) {
+ margin = p_margin;
+ if (parent) {
+ _build_polygon();
+ }
+}
+
String CollisionPolygon3D::get_configuration_warning() const {
String warning = Node3D::get_configuration_warning();
@@ -189,18 +201,17 @@ void CollisionPolygon3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_disabled", "disabled"), &CollisionPolygon3D::set_disabled);
ClassDB::bind_method(D_METHOD("is_disabled"), &CollisionPolygon3D::is_disabled);
+ ClassDB::bind_method(D_METHOD("set_margin", "margin"), &CollisionPolygon3D::set_margin);
+ ClassDB::bind_method(D_METHOD("get_margin"), &CollisionPolygon3D::get_margin);
+
ClassDB::bind_method(D_METHOD("_is_editable_3d_polygon"), &CollisionPolygon3D::_is_editable_3d_polygon);
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth"), "set_depth", "get_depth");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");
ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0.001,10,0.001"), "set_margin", "get_margin");
}
CollisionPolygon3D::CollisionPolygon3D() {
- aabb = AABB(Vector3(-1, -1, -1), Vector3(2, 2, 2));
- depth = 1.0;
set_notify_local_transform(true);
- parent = nullptr;
- owner_id = 0;
- disabled = false;
}
diff --git a/scene/3d/collision_polygon_3d.h b/scene/3d/collision_polygon_3d.h
index ec13b9af6d..750751b509 100644
--- a/scene/3d/collision_polygon_3d.h
+++ b/scene/3d/collision_polygon_3d.h
@@ -37,16 +37,17 @@
class CollisionObject3D;
class CollisionPolygon3D : public Node3D {
GDCLASS(CollisionPolygon3D, Node3D);
+ real_t margin = 0.04;
protected:
- float depth;
- AABB aabb;
+ real_t depth = 1.0;
+ AABB aabb = AABB(Vector3(-1, -1, -1), Vector3(2, 2, 2));
Vector<Point2> polygon;
- uint32_t owner_id;
- CollisionObject3D *parent;
+ uint32_t owner_id = 0;
+ CollisionObject3D *parent = nullptr;
- bool disabled;
+ bool disabled = false;
void _build_polygon();
@@ -59,8 +60,8 @@ protected:
static void _bind_methods();
public:
- void set_depth(float p_depth);
- float get_depth() const;
+ void set_depth(real_t p_depth);
+ real_t get_depth() const;
void set_polygon(const Vector<Point2> &p_polygon);
Vector<Point2> get_polygon() const;
@@ -70,6 +71,9 @@ public:
virtual AABB get_item_rect() const;
+ real_t get_margin() const;
+ void set_margin(real_t p_margin);
+
String get_configuration_warning() const override;
CollisionPolygon3D();
diff --git a/scene/3d/collision_shape_3d.cpp b/scene/3d/collision_shape_3d.cpp
index 503d1be104..914c8eab7a 100644
--- a/scene/3d/collision_shape_3d.cpp
+++ b/scene/3d/collision_shape_3d.cpp
@@ -93,6 +93,7 @@ void CollisionShape3D::_notification(int p_what) {
if (shape.is_valid()) {
parent->shape_owner_add_shape(owner_id, shape);
}
+ _update_in_shape_owner();
}
} break;
case NOTIFICATION_ENTER_TREE: {
@@ -213,10 +214,6 @@ bool CollisionShape3D::is_disabled() const {
CollisionShape3D::CollisionShape3D() {
//indicator = RenderingServer::get_singleton()->mesh_create();
- disabled = false;
- debug_shape = nullptr;
- parent = nullptr;
- owner_id = 0;
set_notify_local_transform(true);
}
diff --git a/scene/3d/collision_shape_3d.h b/scene/3d/collision_shape_3d.h
index 5f556b01a9..f55c09ffaa 100644
--- a/scene/3d/collision_shape_3d.h
+++ b/scene/3d/collision_shape_3d.h
@@ -40,14 +40,14 @@ class CollisionShape3D : public Node3D {
Ref<Shape3D> shape;
- uint32_t owner_id;
- CollisionObject3D *parent;
+ uint32_t owner_id = 0;
+ CollisionObject3D *parent = nullptr;
- Node *debug_shape;
+ Node *debug_shape = nullptr;
bool debug_shape_dirty;
void resource_changed(RES res);
- bool disabled;
+ bool disabled = false;
protected:
void _update_debug_shape();
diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp
index 3562f7b778..d22d7ff3ab 100644
--- a/scene/3d/cpu_particles_3d.cpp
+++ b/scene/3d/cpu_particles_3d.cpp
@@ -73,7 +73,7 @@ void CPUParticles3D::set_amount(int p_amount) {
}
particle_data.resize((12 + 4 + 4) * p_amount);
- RS::get_singleton()->multimesh_allocate(multimesh, p_amount, RS::MULTIMESH_TRANSFORM_3D, true, true);
+ RS::get_singleton()->multimesh_allocate_data(multimesh, p_amount, RS::MULTIMESH_TRANSFORM_3D, true, true);
particle_order.resize(p_amount);
}
@@ -152,6 +152,7 @@ float CPUParticles3D::get_speed_scale() const {
}
void CPUParticles3D::set_draw_order(DrawOrder p_order) {
+ ERR_FAIL_INDEX(p_order, DRAW_ORDER_MAX);
draw_order = p_order;
}
@@ -372,7 +373,7 @@ void CPUParticles3D::set_particle_flag(ParticleFlags p_particle_flag, bool p_ena
ERR_FAIL_INDEX(p_particle_flag, PARTICLE_FLAG_MAX);
particle_flags[p_particle_flag] = p_enable;
if (p_particle_flag == PARTICLE_FLAG_DISABLE_Z) {
- _change_notify();
+ notify_property_list_changed();
}
}
@@ -575,7 +576,7 @@ void CPUParticles3D::_particles_process(float p_delta) {
cycle++;
if (one_shot && cycle > 0) {
set_emitting(false);
- _change_notify();
+ notify_property_list_changed();
}
}
@@ -646,6 +647,8 @@ void CPUParticles3D::_particles_process(float p_delta) {
restart = true;
}
+ float tv = 0.0;
+
if (restart) {
if (!emitting) {
p.active = false;
@@ -660,12 +663,12 @@ void CPUParticles3D::_particles_process(float p_delta) {
float tex_angle = 0.0;
if (curve_parameters[PARAM_ANGLE].is_valid()) {
- tex_angle = curve_parameters[PARAM_ANGLE]->interpolate(0);
+ tex_angle = curve_parameters[PARAM_ANGLE]->interpolate(tv);
}
float tex_anim_offset = 0.0;
if (curve_parameters[PARAM_ANGLE].is_valid()) {
- tex_anim_offset = curve_parameters[PARAM_ANGLE]->interpolate(0);
+ tex_anim_offset = curve_parameters[PARAM_ANGLE]->interpolate(tv);
}
p.seed = Math::rand();
@@ -676,13 +679,13 @@ void CPUParticles3D::_particles_process(float p_delta) {
p.anim_offset_rand = Math::randf();
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
- float angle1_rad = Math::atan2(direction.y, direction.x) + (Math::randf() * 2.0 - 1.0) * Math_PI * spread / 180.0;
+ float angle1_rad = Math::atan2(direction.y, direction.x) + Math::deg2rad((Math::randf() * 2.0 - 1.0) * spread);
Vector3 rot = Vector3(Math::cos(angle1_rad), Math::sin(angle1_rad), 0.0);
p.velocity = rot * parameters[PARAM_INITIAL_LINEAR_VELOCITY] * Math::lerp(1.0f, float(Math::randf()), randomness[PARAM_INITIAL_LINEAR_VELOCITY]);
} else {
//initiate velocity spread in 3D
- float angle1_rad = Math::atan2(direction.x, direction.z) + (Math::randf() * 2.0 - 1.0) * Math_PI * spread / 180.0;
- float angle2_rad = Math::atan2(direction.y, Math::abs(direction.z)) + (Math::randf() * 2.0 - 1.0) * (1.0 - flatness) * Math_PI * spread / 180.0;
+ float angle1_rad = Math::atan2(direction.x, direction.z) + Math::deg2rad((Math::randf() * 2.0 - 1.0) * spread);
+ float angle2_rad = Math::atan2(direction.y, Math::abs(direction.z)) + Math::deg2rad((Math::randf() * 2.0 - 1.0) * (1.0 - flatness) * spread);
Vector3 direction_xz = Vector3(Math::sin(angle1_rad), 0, Math::cos(angle1_rad));
Vector3 direction_yz = Vector3(0, Math::sin(angle2_rad), Math::cos(angle2_rad));
@@ -706,8 +709,9 @@ void CPUParticles3D::_particles_process(float p_delta) {
//do none
} break;
case EMISSION_SHAPE_SPHERE: {
- float s = 2.0 * Math::randf() - 1.0, t = 2.0 * Math_PI * Math::randf();
- float radius = emission_sphere_radius * Math::sqrt(1.0 - s * s);
+ real_t s = 2.0 * Math::randf() - 1.0;
+ real_t t = Math_TAU * Math::randf();
+ real_t radius = emission_sphere_radius * Math::sqrt(1.0 - s * s);
p.transform.origin = Vector3(radius * Math::cos(t), radius * Math::sin(t), emission_sphere_radius * s);
} break;
case EMISSION_SHAPE_BOX: {
@@ -771,61 +775,63 @@ void CPUParticles3D::_particles_process(float p_delta) {
continue;
} else if (p.time > p.lifetime) {
p.active = false;
+ tv = 1.0;
} else {
uint32_t alt_seed = p.seed;
p.time += local_delta;
p.custom[1] = p.time / lifetime;
+ tv = p.time / p.lifetime;
float tex_linear_velocity = 0.0;
if (curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY].is_valid()) {
- tex_linear_velocity = curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY]->interpolate(p.custom[1]);
+ tex_linear_velocity = curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY]->interpolate(tv);
}
float tex_orbit_velocity = 0.0;
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
if (curve_parameters[PARAM_ORBIT_VELOCITY].is_valid()) {
- tex_orbit_velocity = curve_parameters[PARAM_ORBIT_VELOCITY]->interpolate(p.custom[1]);
+ tex_orbit_velocity = curve_parameters[PARAM_ORBIT_VELOCITY]->interpolate(tv);
}
}
float tex_angular_velocity = 0.0;
if (curve_parameters[PARAM_ANGULAR_VELOCITY].is_valid()) {
- tex_angular_velocity = curve_parameters[PARAM_ANGULAR_VELOCITY]->interpolate(p.custom[1]);
+ tex_angular_velocity = curve_parameters[PARAM_ANGULAR_VELOCITY]->interpolate(tv);
}
float tex_linear_accel = 0.0;
if (curve_parameters[PARAM_LINEAR_ACCEL].is_valid()) {
- tex_linear_accel = curve_parameters[PARAM_LINEAR_ACCEL]->interpolate(p.custom[1]);
+ tex_linear_accel = curve_parameters[PARAM_LINEAR_ACCEL]->interpolate(tv);
}
float tex_tangential_accel = 0.0;
if (curve_parameters[PARAM_TANGENTIAL_ACCEL].is_valid()) {
- tex_tangential_accel = curve_parameters[PARAM_TANGENTIAL_ACCEL]->interpolate(p.custom[1]);
+ tex_tangential_accel = curve_parameters[PARAM_TANGENTIAL_ACCEL]->interpolate(tv);
}
float tex_radial_accel = 0.0;
if (curve_parameters[PARAM_RADIAL_ACCEL].is_valid()) {
- tex_radial_accel = curve_parameters[PARAM_RADIAL_ACCEL]->interpolate(p.custom[1]);
+ tex_radial_accel = curve_parameters[PARAM_RADIAL_ACCEL]->interpolate(tv);
}
float tex_damping = 0.0;
if (curve_parameters[PARAM_DAMPING].is_valid()) {
- tex_damping = curve_parameters[PARAM_DAMPING]->interpolate(p.custom[1]);
+ tex_damping = curve_parameters[PARAM_DAMPING]->interpolate(tv);
}
float tex_angle = 0.0;
if (curve_parameters[PARAM_ANGLE].is_valid()) {
- tex_angle = curve_parameters[PARAM_ANGLE]->interpolate(p.custom[1]);
+ tex_angle = curve_parameters[PARAM_ANGLE]->interpolate(tv);
}
float tex_anim_speed = 0.0;
if (curve_parameters[PARAM_ANIM_SPEED].is_valid()) {
- tex_anim_speed = curve_parameters[PARAM_ANIM_SPEED]->interpolate(p.custom[1]);
+ tex_anim_speed = curve_parameters[PARAM_ANIM_SPEED]->interpolate(tv);
}
float tex_anim_offset = 0.0;
if (curve_parameters[PARAM_ANIM_OFFSET].is_valid()) {
- tex_anim_offset = curve_parameters[PARAM_ANIM_OFFSET]->interpolate(p.custom[1]);
+ tex_anim_offset = curve_parameters[PARAM_ANIM_OFFSET]->interpolate(tv);
}
Vector3 force = gravity;
@@ -855,7 +861,7 @@ void CPUParticles3D::_particles_process(float p_delta) {
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
float orbit_amount = (parameters[PARAM_ORBIT_VELOCITY] + tex_orbit_velocity) * Math::lerp(1.0f, rand_from_seed(alt_seed), randomness[PARAM_ORBIT_VELOCITY]);
if (orbit_amount != 0.0) {
- float ang = orbit_amount * local_delta * Math_PI * 2.0;
+ float ang = orbit_amount * local_delta * Math_TAU;
// Not sure why the ParticlesMaterial code uses a clockwise rotation matrix,
// but we use -ang here to reproduce its behavior.
Transform2D rot = Transform2D(-ang, Vector2());
@@ -887,15 +893,15 @@ void CPUParticles3D::_particles_process(float p_delta) {
float tex_scale = 1.0;
if (curve_parameters[PARAM_SCALE].is_valid()) {
- tex_scale = curve_parameters[PARAM_SCALE]->interpolate(p.custom[1]);
+ tex_scale = curve_parameters[PARAM_SCALE]->interpolate(tv);
}
float tex_hue_variation = 0.0;
if (curve_parameters[PARAM_HUE_VARIATION].is_valid()) {
- tex_hue_variation = curve_parameters[PARAM_HUE_VARIATION]->interpolate(p.custom[1]);
+ tex_hue_variation = curve_parameters[PARAM_HUE_VARIATION]->interpolate(tv);
}
- float hue_rot_angle = (parameters[PARAM_HUE_VARIATION] + tex_hue_variation) * Math_PI * 2.0 * Math::lerp(1.0f, p.hue_rot_rand * 2.0f - 1.0f, randomness[PARAM_HUE_VARIATION]);
+ float hue_rot_angle = (parameters[PARAM_HUE_VARIATION] + tex_hue_variation) * Math_TAU * Math::lerp(1.0f, p.hue_rot_rand * 2.0f - 1.0f, randomness[PARAM_HUE_VARIATION]);
float hue_rot_c = Math::cos(hue_rot_angle);
float hue_rot_s = Math::sin(hue_rot_angle);
@@ -911,7 +917,7 @@ void CPUParticles3D::_particles_process(float p_delta) {
}
if (color_ramp.is_valid()) {
- p.color = color_ramp->get_color_at_offset(p.custom[1]) * color;
+ p.color = color_ramp->get_color_at_offset(tv) * color;
} else {
p.color = color;
}
@@ -1006,6 +1012,7 @@ void CPUParticles3D::_update_particle_data_buffer() {
sorter.compare.particles = r;
sorter.sort(order, pc);
} else if (draw_order == DRAW_ORDER_VIEW_DEPTH) {
+ ERR_FAIL_NULL(get_viewport());
Camera3D *c = get_viewport()->get_camera();
if (c) {
Vector3 dir = c->get_global_transform().basis.get_axis(2); //far away to close
@@ -1067,7 +1074,7 @@ void CPUParticles3D::_update_particle_data_buffer() {
ptr += 20;
}
- can_update = true;
+ can_update.set();
}
void CPUParticles3D::_set_redraw(bool p_redraw) {
@@ -1096,9 +1103,9 @@ void CPUParticles3D::_set_redraw(bool p_redraw) {
void CPUParticles3D::_update_render_thread() {
MutexLock lock(update_mutex);
- if (can_update) {
+ if (can_update.is_set()) {
RS::get_singleton()->multimesh_set_buffer(multimesh, particle_data);
- can_update = false; //wait for next time
+ can_update.clear(); //wait for next time
}
}
@@ -1160,7 +1167,7 @@ void CPUParticles3D::_notification(int p_what) {
ptr += 20;
}
- can_update = true;
+ can_update.set();
}
}
}
@@ -1440,13 +1447,6 @@ void CPUParticles3D::_bind_methods() {
}
CPUParticles3D::CPUParticles3D() {
- time = 0;
- inactive_time = 0;
- frame_remainder = 0;
- cycle = 0;
- redraw = false;
- emitting = false;
-
set_notify_transform(true);
multimesh = RenderingServer::get_singleton()->multimesh_create();
@@ -1454,23 +1454,8 @@ CPUParticles3D::CPUParticles3D() {
set_base(multimesh);
set_emitting(true);
- set_one_shot(false);
set_amount(8);
- set_lifetime(1);
- set_fixed_fps(0);
- set_fractional_delta(true);
- set_pre_process_time(0);
- set_explosiveness_ratio(0);
- set_randomness_ratio(0);
- set_lifetime_randomness(0);
- set_use_local_coordinates(true);
-
- set_draw_order(DRAW_ORDER_INDEX);
- set_speed_scale(1);
-
- set_direction(Vector3(1, 0, 0));
- set_spread(45);
- set_flatness(0);
+
set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0);
set_param(PARAM_ANGULAR_VELOCITY, 0);
set_param(PARAM_ORBIT_VELOCITY, 0);
@@ -1497,8 +1482,6 @@ CPUParticles3D::CPUParticles3D() {
particle_flags[i] = false;
}
- can_update = false;
-
set_color(Color(1, 1, 1, 1));
}
diff --git a/scene/3d/cpu_particles_3d.h b/scene/3d/cpu_particles_3d.h
index 3ee03ff3d8..10ac32622d 100644
--- a/scene/3d/cpu_particles_3d.h
+++ b/scene/3d/cpu_particles_3d.h
@@ -32,6 +32,7 @@
#define CPU_PARTICLES_H
#include "core/templates/rid.h"
+#include "core/templates/safe_refcount.h"
#include "scene/3d/visual_instance_3d.h"
class CPUParticles3D : public GeometryInstance3D {
@@ -43,6 +44,7 @@ public:
DRAW_ORDER_INDEX,
DRAW_ORDER_LIFETIME,
DRAW_ORDER_VIEW_DEPTH,
+ DRAW_ORDER_MAX
};
enum Parameter {
@@ -78,30 +80,30 @@ public:
};
private:
- bool emitting;
+ bool emitting = false;
struct Particle {
Transform transform;
Color color;
- float custom[4];
+ float custom[4] = {};
Vector3 velocity;
- bool active;
- float angle_rand;
- float scale_rand;
- float hue_rot_rand;
- float anim_offset_rand;
- float time;
- float lifetime;
+ bool active = false;
+ float angle_rand = 0.0;
+ float scale_rand = 0.0;
+ float hue_rot_rand = 0.0;
+ float anim_offset_rand = 0.0;
+ float time = 0.0;
+ float lifetime = 0.0;
Color base_color;
- uint32_t seed;
+ uint32_t seed = 0;
};
- float time;
- float inactive_time;
- float frame_remainder;
- int cycle;
- bool redraw;
+ float time = 0.0;
+ float inactive_time = 0.0;
+ float frame_remainder = 0.0;
+ int cycle = 0;
+ bool redraw = false;
RID multimesh;
@@ -110,7 +112,7 @@ private:
Vector<int> particle_order;
struct SortLifetime {
- const Particle *particles;
+ const Particle *particles = nullptr;
bool operator()(int p_a, int p_b) const {
return particles[p_a].time > particles[p_b].time;
@@ -118,7 +120,7 @@ private:
};
struct SortAxis {
- const Particle *particles;
+ const Particle *particles = nullptr;
Vector3 axis;
bool operator()(int p_a, int p_b) const {
return axis.dot(particles[p_a].transform.origin) < axis.dot(particles[p_b].transform.origin);
@@ -127,50 +129,50 @@ private:
//
- bool one_shot;
+ bool one_shot = false;
- float lifetime;
- float pre_process_time;
- float explosiveness_ratio;
- float randomness_ratio;
- float lifetime_randomness;
- float speed_scale;
- bool local_coords;
- int fixed_fps;
- bool fractional_delta;
+ float lifetime = 1.0;
+ float pre_process_time = 0.0;
+ float explosiveness_ratio = 0.0;
+ float randomness_ratio = 0.0;
+ float lifetime_randomness = 0.0;
+ float speed_scale = 1.0;
+ bool local_coords = true;
+ int fixed_fps = 0;
+ bool fractional_delta = true;
Transform inv_emission_transform;
- volatile bool can_update;
+ SafeFlag can_update;
- DrawOrder draw_order;
+ DrawOrder draw_order = DRAW_ORDER_INDEX;
Ref<Mesh> mesh;
////////
- Vector3 direction;
- float spread;
- float flatness;
+ Vector3 direction = Vector3(1, 0, 0);
+ float spread = 45.0;
+ float flatness = 0.0;
float parameters[PARAM_MAX];
- float randomness[PARAM_MAX];
+ float randomness[PARAM_MAX] = {};
Ref<Curve> curve_parameters[PARAM_MAX];
- Color color;
+ Color color = Color(1, 1, 1, 1);
Ref<Gradient> color_ramp;
- bool particle_flags[PARTICLE_FLAG_MAX];
+ bool particle_flags[PARTICLE_FLAG_MAX] = {};
- EmissionShape emission_shape;
- float emission_sphere_radius;
- Vector3 emission_box_extents;
+ EmissionShape emission_shape = EMISSION_SHAPE_POINT;
+ float emission_sphere_radius = 1.0;
+ Vector3 emission_box_extents = Vector3(1, 1, 1);
Vector<Vector3> emission_points;
Vector<Vector3> emission_normals;
Vector<Color> emission_colors;
- int emission_point_count;
+ int emission_point_count = 0;
- Vector3 gravity;
+ Vector3 gravity = Vector3(0, -9.8, 0);
void _update_internal();
void _particles_process(float p_delta);
diff --git a/scene/3d/decal.cpp b/scene/3d/decal.cpp
index e67802cfc4..0f10f2b85f 100644
--- a/scene/3d/decal.cpp
+++ b/scene/3d/decal.cpp
@@ -34,7 +34,6 @@ void Decal::set_extents(const Vector3 &p_extents) {
extents = p_extents;
RS::get_singleton()->decal_set_extents(decal, p_extents);
update_gizmo();
- _change_notify("extents");
}
Vector3 Decal::get_extents() const {
@@ -220,18 +219,6 @@ void Decal::_bind_methods() {
}
Decal::Decal() {
- extents = Vector3(1, 1, 1);
- emission_energy = 1.0;
- modulate = Color(1, 1, 1, 1);
- albedo_mix = 1.0;
- cull_mask = (1 << 20) - 1;
- upper_fade = 0.3;
- lower_fade = 0.3;
- normal_fade = 0;
- distance_fade_enabled = false;
- distance_fade_begin = 10;
- distance_fade_length = 1;
-
decal = RenderingServer::get_singleton()->decal_create();
RS::get_singleton()->instance_set_base(get_instance(), decal);
}
diff --git a/scene/3d/decal.h b/scene/3d/decal.h
index 500a1425f2..095579d775 100644
--- a/scene/3d/decal.h
+++ b/scene/3d/decal.h
@@ -49,18 +49,18 @@ public:
private:
RID decal;
- Vector3 extents;
+ Vector3 extents = Vector3(1, 1, 1);
Ref<Texture2D> textures[TEXTURE_MAX];
- float emission_energy;
- float albedo_mix;
- Color modulate;
- uint32_t cull_mask;
- float normal_fade;
- float upper_fade;
- float lower_fade;
- bool distance_fade_enabled;
- float distance_fade_begin;
- float distance_fade_length;
+ float emission_energy = 1.0;
+ float albedo_mix = 1.0;
+ Color modulate = Color(1, 1, 1, 1);
+ uint32_t cull_mask = (1 << 20) - 1;
+ float normal_fade = 0.0;
+ float upper_fade = 0.3;
+ float lower_fade = 0.3;
+ bool distance_fade_enabled = false;
+ float distance_fade_begin = 10.0;
+ float distance_fade_length = 1.0;
protected:
static void _bind_methods();
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index b00a0ec30b..8a8bfe50b9 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -91,7 +91,7 @@ Dictionary GIProbeData::_get_data() const {
}
void GIProbeData::allocate(const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3 &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) {
- RS::get_singleton()->gi_probe_allocate(probe, p_to_cell_xform, p_aabb, p_octree_size, p_octree_cells, p_data_cells, p_distance_field, p_level_counts);
+ RS::get_singleton()->gi_probe_allocate_data(probe, p_to_cell_xform, p_aabb, p_octree_size, p_octree_cells, p_data_cells, p_distance_field, p_level_counts);
bounds = p_aabb;
to_cell_xform = p_to_cell_xform;
octree_size = p_octree_size;
@@ -221,7 +221,7 @@ RID GIProbeData::get_rid() const {
void GIProbeData::_validate_property(PropertyInfo &property) const {
if (property.name == "anisotropy_strength") {
- bool anisotropy_enabled = ProjectSettings::get_singleton()->get("rendering/quality/gi_probes/anisotropic");
+ bool anisotropy_enabled = ProjectSettings::get_singleton()->get("rendering/global_illumination/gi_probes/anisotropic");
if (!anisotropy_enabled) {
property.usage = PROPERTY_USAGE_NOEDITOR;
}
@@ -286,17 +286,6 @@ void GIProbeData::_bind_methods() {
}
GIProbeData::GIProbeData() {
- ao = 0.0;
- ao_size = 0.5;
- dynamic_range = 4;
- energy = 1.0;
- bias = 1.5;
- normal_bias = 0.0;
- propagation = 0.7;
- anisotropy_strength = 0.5;
- interior = false;
- use_two_bounces = false;
-
probe = RS::get_singleton()->gi_probe_create();
}
@@ -334,7 +323,6 @@ GIProbe::Subdiv GIProbe::get_subdiv() const {
void GIProbe::set_extents(const Vector3 &p_extents) {
extents = p_extents;
update_gizmo();
- _change_notify("extents");
}
Vector3 GIProbe::get_extents() const {
@@ -497,7 +485,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) {
bake_end_function();
}
- _change_notify(); //bake property may have changed
+ notify_property_list_changed(); //bake property may have changed
}
void GIProbe::_debug_bake() {
@@ -520,7 +508,10 @@ String GIProbe::get_configuration_warning() const {
warning += "\n\n";
}
warning += TTR("GIProbes are not supported by the GLES2 video driver.\nUse a BakedLightmap instead.");
+ } else if (probe_data.is_null()) {
+ warning += TTR("No GIProbe data set, so this node is disabled. Bake static objects to enable GI.");
}
+
return warning;
}
@@ -550,9 +541,6 @@ void GIProbe::_bind_methods() {
}
GIProbe::GIProbe() {
- subdiv = SUBDIV_128;
- extents = Vector3(10, 10, 10);
-
gi_probe = RS::get_singleton()->gi_probe_create();
set_disable_scale(true);
}
diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h
index afea94fe12..534b425557 100644
--- a/scene/3d/gi_probe.h
+++ b/scene/3d/gi_probe.h
@@ -46,16 +46,16 @@ class GIProbeData : public Resource {
AABB bounds;
Vector3 octree_size;
- float dynamic_range;
- float energy;
- float bias;
- float normal_bias;
- float propagation;
- float anisotropy_strength;
- float ao;
- float ao_size;
- bool interior;
- bool use_two_bounces;
+ float dynamic_range = 4.0;
+ float energy = 1.0;
+ float bias = 1.5;
+ float normal_bias = 0.0;
+ float propagation = 0.7;
+ float anisotropy_strength = 0.5;
+ float ao = 0.0;
+ float ao_size = 0.5;
+ bool interior = false;
+ bool use_two_bounces = false;
protected:
static void _bind_methods();
@@ -129,8 +129,8 @@ private:
RID gi_probe;
- Subdiv subdiv;
- Vector3 extents;
+ Subdiv subdiv = SUBDIV_128;
+ Vector3 extents = Vector3(10, 10, 10);
struct PlotMesh {
Ref<Material> override_material;
diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp
index 7d77578b01..17a61b3e4d 100644
--- a/scene/3d/gpu_particles_3d.cpp
+++ b/scene/3d/gpu_particles_3d.cpp
@@ -100,7 +100,6 @@ void GPUParticles3D::set_visibility_aabb(const AABB &p_aabb) {
visibility_aabb = p_aabb;
RS::get_singleton()->particles_set_custom_aabb(particles, visibility_aabb);
update_gizmo();
- _change_notify("visibility_aabb");
}
void GPUParticles3D::set_use_local_coordinates(bool p_enable) {
@@ -190,7 +189,7 @@ void GPUParticles3D::set_draw_passes(int p_count) {
ERR_FAIL_COND(p_count < 1);
draw_passes.resize(p_count);
RS::get_singleton()->particles_set_draw_passes(particles, p_count);
- _change_notify();
+ notify_property_list_changed();
}
int GPUParticles3D::get_draw_passes() const {
@@ -353,7 +352,7 @@ void GPUParticles3D::_notification(int p_what) {
// the shot ends the editor can properly update
if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
if (one_shot && !is_emitting()) {
- _change_notify();
+ notify_property_list_changed();
set_process_internal(false);
}
}
diff --git a/scene/3d/gpu_particles_collision_3d.h b/scene/3d/gpu_particles_collision_3d.h
index 7d6301ee50..81c33663f3 100644
--- a/scene/3d/gpu_particles_collision_3d.h
+++ b/scene/3d/gpu_particles_collision_3d.h
@@ -130,16 +130,16 @@ private:
LEAF_MASK = LEAF_BIT - 1
};
AABB bounds;
- uint32_t children[2];
+ uint32_t children[2] = {};
};
struct FacePos {
Vector3 center;
- uint32_t index;
+ uint32_t index = 0;
};
struct FaceSort {
- uint32_t axis;
+ uint32_t axis = 0;
bool operator()(const FacePos &p_left, const FacePos &p_right) const {
return p_left.center[axis] < p_right.center[axis];
}
@@ -148,13 +148,13 @@ private:
uint32_t _create_bvh(LocalVector<BVH> &bvh_tree, FacePos *p_faces, uint32_t p_face_count, const Face3 *p_triangles, float p_thickness);
struct ComputeSDFParams {
- float *cells;
+ float *cells = nullptr;
Vector3i size;
- float cell_size;
+ float cell_size = 0.0;
Vector3 cell_offset;
- const BVH *bvh;
- const Face3 *triangles;
- float thickness;
+ const BVH *bvh = nullptr;
+ const Face3 *triangles = nullptr;
+ float thickness = 0.0;
};
void _find_closest_distance(const Vector3 &p_pos, const BVH *bvh, uint32_t p_bvh_cell, const Face3 *triangles, float thickness, float &closest_distance);
diff --git a/scene/3d/immediate_geometry_3d.cpp b/scene/3d/immediate_geometry_3d.cpp
index 17410d5870..d64babaa9d 100644
--- a/scene/3d/immediate_geometry_3d.cpp
+++ b/scene/3d/immediate_geometry_3d.cpp
@@ -87,21 +87,24 @@ Vector<Face3> ImmediateGeometry3D::get_faces(uint32_t p_usage_flags) const {
}
void ImmediateGeometry3D::add_sphere(int p_lats, int p_lons, float p_radius, bool p_add_uv) {
+ const double lat_step = Math_TAU / p_lats;
+ const double lon_step = Math_TAU / p_lons;
+
for (int i = 1; i <= p_lats; i++) {
- double lat0 = Math_PI * (-0.5 + (double)(i - 1) / p_lats);
+ double lat0 = lat_step * (i - 1) - Math_TAU / 4;
double z0 = Math::sin(lat0);
double zr0 = Math::cos(lat0);
- double lat1 = Math_PI * (-0.5 + (double)i / p_lats);
+ double lat1 = lat_step * i - Math_TAU / 4;
double z1 = Math::sin(lat1);
double zr1 = Math::cos(lat1);
for (int j = p_lons; j >= 1; j--) {
- double lng0 = 2 * Math_PI * (double)(j - 1) / p_lons;
+ double lng0 = lon_step * (j - 1);
double x0 = Math::cos(lng0);
double y0 = Math::sin(lng0);
- double lng1 = 2 * Math_PI * (double)(j) / p_lons;
+ double lng1 = lon_step * j;
double x1 = Math::cos(lng1);
double y1 = Math::sin(lng1);
@@ -147,7 +150,6 @@ void ImmediateGeometry3D::_bind_methods() {
ImmediateGeometry3D::ImmediateGeometry3D() {
im = RenderingServer::get_singleton()->immediate_create();
set_base(im);
- empty = true;
}
ImmediateGeometry3D::~ImmediateGeometry3D() {
diff --git a/scene/3d/immediate_geometry_3d.h b/scene/3d/immediate_geometry_3d.h
index 8e546e27e7..ee4938d9f7 100644
--- a/scene/3d/immediate_geometry_3d.h
+++ b/scene/3d/immediate_geometry_3d.h
@@ -41,7 +41,7 @@ class ImmediateGeometry3D : public GeometryInstance3D {
//a list of textures drawn need to be kept, to avoid references
// in RenderingServer from becoming invalid if the texture is no longer used
List<Ref<Texture2D>> cached_textures;
- bool empty;
+ bool empty = true;
AABB aabb;
protected:
diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp
index b998a1a400..b0a10b5547 100644
--- a/scene/3d/light_3d.cpp
+++ b/scene/3d/light_3d.cpp
@@ -48,11 +48,7 @@ void Light3D::set_param(Param p_param, float p_value) {
update_gizmo();
if (p_param == PARAM_SPOT_ANGLE) {
- _change_notify("spot_angle");
update_configuration_warning();
- } else if (p_param == PARAM_RANGE) {
- _change_notify("omni_range");
- _change_notify("spot_range");
}
}
}
@@ -184,8 +180,6 @@ void Light3D::_update_visibility() {
#endif
RS::get_singleton()->instance_set_visible(get_instance(), is_visible_in_tree() && editor_ok);
-
- _change_notify("geometry/visible");
}
void Light3D::_notification(int p_what) {
@@ -324,10 +318,6 @@ Light3D::Light3D(RenderingServer::LightType p_type) {
RS::get_singleton()->instance_set_base(get_instance(), light);
- reverse_cull = false;
- bake_mode = BAKE_DYNAMIC;
-
- editor_only = false;
set_color(Color(1, 1, 1, 1));
set_shadow(false);
set_negative(false);
@@ -351,13 +341,12 @@ Light3D::Light3D(RenderingServer::LightType p_type) {
set_param(PARAM_SHADOW_BIAS, 0.02);
set_param(PARAM_SHADOW_NORMAL_BIAS, 1.0);
set_param(PARAM_TRANSMITTANCE_BIAS, 0.05);
- set_param(PARAM_SHADOW_VOLUMETRIC_FOG_FADE, 1.0);
+ set_param(PARAM_SHADOW_VOLUMETRIC_FOG_FADE, 0.1);
set_param(PARAM_SHADOW_FADE_START, 1);
set_disable_scale(true);
}
Light3D::Light3D() {
- type = RenderingServer::LIGHT_DIRECTIONAL;
ERR_PRINT("Light3D should not be instanced directly; use the DirectionalLight3D, OmniLight3D or SpotLight3D subtypes instead.");
}
diff --git a/scene/3d/light_3d.h b/scene/3d/light_3d.h
index 833598c4a1..311db54bce 100644
--- a/scene/3d/light_3d.h
+++ b/scene/3d/light_3d.h
@@ -71,16 +71,16 @@ public:
private:
Color color;
- float param[PARAM_MAX];
+ float param[PARAM_MAX] = {};
Color shadow_color;
- bool shadow;
- bool negative;
- bool reverse_cull;
- uint32_t cull_mask;
- RS::LightType type;
- bool editor_only;
+ bool shadow = false;
+ bool negative = false;
+ bool reverse_cull = false;
+ uint32_t cull_mask = 0;
+ RS::LightType type = RenderingServer::LIGHT_DIRECTIONAL;
+ bool editor_only = false;
void _update_visibility();
- BakeMode bake_mode;
+ BakeMode bake_mode = BAKE_DYNAMIC;
Ref<Texture2D> projector;
// bind helpers
diff --git a/scene/3d/listener_3d.cpp b/scene/3d/listener_3d.cpp
index 23adb0aa19..9842f152d7 100644
--- a/scene/3d/listener_3d.cpp
+++ b/scene/3d/listener_3d.cpp
@@ -159,8 +159,6 @@ void Listener3D::_bind_methods() {
}
Listener3D::Listener3D() {
- current = false;
- force_change = false;
set_notify_transform(true);
//active=false;
}
diff --git a/scene/3d/listener_3d.h b/scene/3d/listener_3d.h
index 2a78efb2c7..85657a8e53 100644
--- a/scene/3d/listener_3d.h
+++ b/scene/3d/listener_3d.h
@@ -38,8 +38,8 @@ class Listener3D : public Node3D {
GDCLASS(Listener3D, Node3D);
private:
- bool force_change;
- bool current;
+ bool force_change = false;
+ bool current = false;
RID scenario_id;
diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp
index 865510731e..b997c64b29 100644
--- a/scene/3d/mesh_instance_3d.cpp
+++ b/scene/3d/mesh_instance_3d.cpp
@@ -95,7 +95,7 @@ void MeshInstance3D::_get_property_list(List<PropertyInfo> *p_list) const {
ls.sort();
for (List<String>::Element *E = ls.front(); E; E = E->next()) {
- p_list->push_back(PropertyInfo(Variant::FLOAT, E->get(), PROPERTY_HINT_RANGE, "0,1,0.00001"));
+ p_list->push_back(PropertyInfo(Variant::FLOAT, E->get(), PROPERTY_HINT_RANGE, "-1,1,0.00001"));
}
if (mesh.is_valid()) {
@@ -112,7 +112,6 @@ void MeshInstance3D::set_mesh(const Ref<Mesh> &p_mesh) {
if (mesh.is_valid()) {
mesh->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &MeshInstance3D::_mesh_changed));
- materials.clear();
}
mesh = p_mesh;
@@ -136,7 +135,7 @@ void MeshInstance3D::set_mesh(const Ref<Mesh> &p_mesh) {
update_gizmo();
- _change_notify();
+ notify_property_list_changed();
}
Ref<Mesh> MeshInstance3D::get_mesh() const {
@@ -153,7 +152,7 @@ void MeshInstance3D::_resolve_skeleton_path() {
if (skin_internal.is_null()) {
//a skin was created for us
skin_internal = new_skin_reference->get_skin();
- _change_notify();
+ notify_property_list_changed();
}
}
}
@@ -320,6 +319,7 @@ Ref<Material> MeshInstance3D::get_active_material(int p_surface) const {
}
void MeshInstance3D::_mesh_changed() {
+ ERR_FAIL_COND(mesh.is_null());
materials.resize(mesh->get_surface_count());
}
@@ -429,7 +429,6 @@ void MeshInstance3D::_bind_methods() {
}
MeshInstance3D::MeshInstance3D() {
- skeleton_path = NodePath("..");
}
MeshInstance3D::~MeshInstance3D() {
diff --git a/scene/3d/mesh_instance_3d.h b/scene/3d/mesh_instance_3d.h
index 822e04e656..eb300784b1 100644
--- a/scene/3d/mesh_instance_3d.h
+++ b/scene/3d/mesh_instance_3d.h
@@ -44,15 +44,11 @@ protected:
Ref<Skin> skin;
Ref<Skin> skin_internal;
Ref<SkinReference> skin_ref;
- NodePath skeleton_path;
+ NodePath skeleton_path = NodePath("..");
struct BlendShapeTrack {
- int idx;
- float value;
- BlendShapeTrack() {
- idx = 0;
- value = 0;
- }
+ int idx = 0;
+ float value = 0.0;
};
Map<StringName, BlendShapeTrack> blend_shape_tracks;
diff --git a/scene/3d/navigation_3d.cpp b/scene/3d/navigation_3d.cpp
index 2a7195be1a..eaddec7601 100644
--- a/scene/3d/navigation_3d.cpp
+++ b/scene/3d/navigation_3d.cpp
@@ -110,8 +110,6 @@ Navigation3D::Navigation3D() {
set_cell_size(0.3);
set_edge_connection_margin(5.0); // Five meters, depends a lot on the agent's radius
-
- up = Vector3(0, 1, 0);
}
Navigation3D::~Navigation3D() {
diff --git a/scene/3d/navigation_3d.h b/scene/3d/navigation_3d.h
index 3e8adaf5ff..b89725a3f5 100644
--- a/scene/3d/navigation_3d.h
+++ b/scene/3d/navigation_3d.h
@@ -39,7 +39,7 @@ class Navigation3D : public Node3D {
RID map;
- Vector3 up;
+ Vector3 up = Vector3(0, 1, 0);
real_t cell_size;
real_t edge_connection_margin;
diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp
index b7b1415091..19bde94222 100644
--- a/scene/3d/navigation_region_3d.cpp
+++ b/scene/3d/navigation_region_3d.cpp
@@ -124,13 +124,13 @@ void NavigationRegion3D::set_navigation_mesh(const Ref<NavigationMesh> &p_navmes
}
if (navmesh.is_valid()) {
- navmesh->remove_change_receptor(this);
+ navmesh->disconnect("changed", callable_mp(this, &NavigationRegion3D::_navigation_changed));
}
navmesh = p_navmesh;
if (navmesh.is_valid()) {
- navmesh->add_change_receptor(this);
+ navmesh->connect("changed", callable_mp(this, &NavigationRegion3D::_navigation_changed));
}
NavigationServer3D::get_singleton()->region_set_navmesh(region, p_navmesh);
@@ -150,7 +150,7 @@ Ref<NavigationMesh> NavigationRegion3D::get_navigation_mesh() const {
}
struct BakeThreadsArgs {
- NavigationRegion3D *nav_region;
+ NavigationRegion3D *nav_region = nullptr;
};
void _bake_navigation_mesh(void *p_user_data) {
@@ -170,18 +170,17 @@ void _bake_navigation_mesh(void *p_user_data) {
}
void NavigationRegion3D::bake_navigation_mesh() {
- ERR_FAIL_COND(bake_thread != nullptr);
+ ERR_FAIL_COND(bake_thread.is_started());
BakeThreadsArgs *args = memnew(BakeThreadsArgs);
args->nav_region = this;
- bake_thread = Thread::create(_bake_navigation_mesh, args);
- ERR_FAIL_COND(bake_thread == nullptr);
+ bake_thread.start(_bake_navigation_mesh, args);
}
void NavigationRegion3D::_bake_finished(Ref<NavigationMesh> p_nav_mesh) {
set_navigation_mesh(p_nav_mesh);
- bake_thread = nullptr;
+ bake_thread.wait_to_finish();
emit_signal("bake_finished");
}
@@ -231,7 +230,7 @@ void NavigationRegion3D::_bind_methods() {
ADD_SIGNAL(MethodInfo("bake_finished"));
}
-void NavigationRegion3D::_changed_callback(Object *p_changed, const char *p_prop) {
+void NavigationRegion3D::_navigation_changed() {
update_gizmo();
update_configuration_warning();
}
@@ -243,7 +242,7 @@ NavigationRegion3D::NavigationRegion3D() {
NavigationRegion3D::~NavigationRegion3D() {
if (navmesh.is_valid()) {
- navmesh->remove_change_receptor(this);
+ navmesh->disconnect("changed", callable_mp(this, &NavigationRegion3D::_navigation_changed));
}
NavigationServer3D::get_singleton()->free(region);
}
diff --git a/scene/3d/navigation_region_3d.h b/scene/3d/navigation_region_3d.h
index a5b8c2cd5e..6ae15c9360 100644
--- a/scene/3d/navigation_region_3d.h
+++ b/scene/3d/navigation_region_3d.h
@@ -46,12 +46,13 @@ class NavigationRegion3D : public Node3D {
Navigation3D *navigation = nullptr;
Node *debug_view = nullptr;
- Thread *bake_thread = nullptr;
+ Thread bake_thread;
+
+ void _navigation_changed();
protected:
void _notification(int p_what);
static void _bind_methods();
- void _changed_callback(Object *p_changed, const char *p_prop) override;
public:
void set_enabled(bool p_enabled);
diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp
index 2a49e60669..4575716f7a 100644
--- a/scene/3d/node_3d.cpp
+++ b/scene/3d/node_3d.cpp
@@ -226,10 +226,6 @@ void Node3D::_notification(int p_what) {
void Node3D::set_transform(const Transform &p_transform) {
data.local_transform = p_transform;
data.dirty |= DIRTY_VECTORS;
- _change_notify("translation");
- _change_notify("rotation");
- _change_notify("rotation_degrees");
- _change_notify("scale");
_propagate_transform_changed(this);
if (data.notify_local_transform) {
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
@@ -307,7 +303,6 @@ Transform Node3D::get_relative_transform(const Node *p_parent) const {
void Node3D::set_translation(const Vector3 &p_translation) {
data.local_transform.origin = p_translation;
- _change_notify("transform");
_propagate_transform_changed(this);
if (data.notify_local_transform) {
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
@@ -322,7 +317,6 @@ void Node3D::set_rotation(const Vector3 &p_euler_rad) {
data.rotation = p_euler_rad;
data.dirty |= DIRTY_LOCAL;
- _change_notify("transform");
_propagate_transform_changed(this);
if (data.notify_local_transform) {
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
@@ -330,7 +324,7 @@ void Node3D::set_rotation(const Vector3 &p_euler_rad) {
}
void Node3D::set_rotation_degrees(const Vector3 &p_euler_deg) {
- set_rotation(p_euler_deg * Math_PI / 180.0);
+ set_rotation(p_euler_deg * (Math_PI / 180.0));
}
void Node3D::set_scale(const Vector3 &p_scale) {
@@ -341,7 +335,6 @@ void Node3D::set_scale(const Vector3 &p_scale) {
data.scale = p_scale;
data.dirty |= DIRTY_LOCAL;
- _change_notify("transform");
_propagate_transform_changed(this);
if (data.notify_local_transform) {
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
@@ -364,7 +357,7 @@ Vector3 Node3D::get_rotation() const {
}
Vector3 Node3D::get_rotation_degrees() const {
- return get_rotation() * 180.0 / Math_PI;
+ return get_rotation() * (180.0 / Math_PI);
}
Vector3 Node3D::get_scale() const {
@@ -495,7 +488,6 @@ Ref<World3D> Node3D::get_world_3d() const {
void Node3D::_propagate_visibility_changed() {
notification(NOTIFICATION_VISIBILITY_CHANGED);
emit_signal(SceneStringNames::get_singleton()->visibility_changed);
- _change_notify("visible");
#ifdef TOOLS_ENABLED
if (data.gizmo.is_valid()) {
_update_gizmo();
@@ -755,8 +747,8 @@ void Node3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("orthonormalize"), &Node3D::orthonormalize);
ClassDB::bind_method(D_METHOD("set_identity"), &Node3D::set_identity);
- ClassDB::bind_method(D_METHOD("look_at", "target", "up"), &Node3D::look_at);
- ClassDB::bind_method(D_METHOD("look_at_from_position", "position", "target", "up"), &Node3D::look_at_from_position);
+ ClassDB::bind_method(D_METHOD("look_at", "target", "up"), &Node3D::look_at, DEFVAL(Vector3(0, 1, 0)));
+ ClassDB::bind_method(D_METHOD("look_at_from_position", "position", "target", "up"), &Node3D::look_at_from_position, DEFVAL(Vector3(0, 1, 0)));
ClassDB::bind_method(D_METHOD("to_local", "global_point"), &Node3D::to_local);
ClassDB::bind_method(D_METHOD("to_global", "local_point"), &Node3D::to_global);
diff --git a/scene/3d/node_3d.h b/scene/3d/node_3d.h
index 8610e2c0bd..a62c7b31a8 100644
--- a/scene/3d/node_3d.h
+++ b/scene/3d/node_3d.h
@@ -173,8 +173,8 @@ public:
void global_scale(const Vector3 &p_scale);
void global_translate(const Vector3 &p_offset);
- void look_at(const Vector3 &p_target, const Vector3 &p_up);
- void look_at_from_position(const Vector3 &p_pos, const Vector3 &p_target, const Vector3 &p_up);
+ void look_at(const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0));
+ void look_at_from_position(const Vector3 &p_pos, const Vector3 &p_target, const Vector3 &p_up = Vector3(0, 1, 0));
Vector3 to_local(Vector3 p_global) const;
Vector3 to_global(Vector3 p_local) const;
diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp
index 3f048beb71..7e2601902b 100644
--- a/scene/3d/path_3d.cpp
+++ b/scene/3d/path_3d.cpp
@@ -323,8 +323,6 @@ void PathFollow3D::set_offset(float p_offset) {
_update_transform();
}
- _change_notify("offset");
- _change_notify("unit_offset");
}
void PathFollow3D::set_h_offset(float p_h_offset) {
diff --git a/scene/3d/path_3d.h b/scene/3d/path_3d.h
index 15e38c95e7..17ee47593e 100644
--- a/scene/3d/path_3d.h
+++ b/scene/3d/path_3d.h
@@ -66,10 +66,10 @@ public:
private:
Path3D *path = nullptr;
- real_t delta_offset = 0; // Change in offset since last _update_transform.
- real_t offset = 0;
- real_t h_offset = 0;
- real_t v_offset = 0;
+ real_t delta_offset = 0.0; // Change in offset since last _update_transform.
+ real_t offset = 0.0;
+ real_t h_offset = 0.0;
+ real_t v_offset = 0.0;
bool cubic = true;
bool loop = true;
RotationMode rotation_mode = ROTATION_XYZ;
diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp
index 5645923f22..6d135c8283 100644
--- a/scene/3d/physics_body_3d.cpp
+++ b/scene/3d/physics_body_3d.cpp
@@ -51,7 +51,7 @@ Vector3 PhysicsBody3D::get_angular_velocity() const {
return Vector3();
}
-float PhysicsBody3D::get_inverse_mass() const {
+real_t PhysicsBody3D::get_inverse_mass() const {
return 0;
}
@@ -148,7 +148,8 @@ void PhysicsBody3D::_bind_methods() {
}
PhysicsBody3D::PhysicsBody3D(PhysicsServer3D::BodyMode p_mode) :
- CollisionObject3D(PhysicsServer3D::get_singleton()->body_create(p_mode), false) {
+ CollisionObject3D(PhysicsServer3D::get_singleton()->body_create(), false) {
+ PhysicsServer3D::get_singleton()->body_set_mode(get_rid(), p_mode);
collision_layer = 1;
collision_mask = 1;
}
@@ -330,8 +331,8 @@ void RigidBody3D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
struct _RigidBodyInOut {
ObjectID id;
- int shape;
- int local_shape;
+ int shape = 0;
+ int local_shape = 0;
};
void RigidBody3D::_direct_state_changed(Object *p_state) {
@@ -825,24 +826,6 @@ void RigidBody3D::_bind_methods() {
RigidBody3D::RigidBody3D() :
PhysicsBody3D(PhysicsServer3D::BODY_MODE_RIGID) {
- mode = MODE_RIGID;
-
- mass = 1;
- max_contacts_reported = 0;
- state = nullptr;
-
- gravity_scale = 1;
- linear_damp = -1;
- angular_damp = -1;
-
- //angular_velocity=0;
- sleeping = false;
- ccd = false;
-
- custom_integrator = false;
- contact_monitor = nullptr;
- can_sleep = true;
-
PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed");
}
@@ -924,7 +907,7 @@ bool KinematicBody3D::move_and_collide(const Vector3 &p_motion, bool p_infinite_
//so, if you pass 45 as limit, avoid numerical precision errors when angle is 45.
#define FLOOR_ANGLE_THRESHOLD 0.01
-Vector3 KinematicBody3D::move_and_slide(const Vector3 &p_linear_velocity, const Vector3 &p_up_direction, bool p_stop_on_slope, int p_max_slides, float p_floor_max_angle, bool p_infinite_inertia) {
+Vector3 KinematicBody3D::move_and_slide(const Vector3 &p_linear_velocity, const Vector3 &p_up_direction, bool p_stop_on_slope, int p_max_slides, real_t p_floor_max_angle, bool p_infinite_inertia) {
Vector3 body_velocity = p_linear_velocity;
Vector3 body_velocity_normal = body_velocity.normalized();
Vector3 up_direction = p_up_direction.normalized();
@@ -1018,7 +1001,7 @@ Vector3 KinematicBody3D::move_and_slide(const Vector3 &p_linear_velocity, const
return body_velocity;
}
-Vector3 KinematicBody3D::move_and_slide_with_snap(const Vector3 &p_linear_velocity, const Vector3 &p_snap, const Vector3 &p_up_direction, bool p_stop_on_slope, int p_max_slides, float p_floor_max_angle, bool p_infinite_inertia) {
+Vector3 KinematicBody3D::move_and_slide_with_snap(const Vector3 &p_linear_velocity, const Vector3 &p_snap, const Vector3 &p_up_direction, bool p_stop_on_slope, int p_max_slides, real_t p_floor_max_angle, bool p_infinite_inertia) {
Vector3 up_direction = p_up_direction.normalized();
bool was_on_floor = on_floor;
@@ -1090,7 +1073,7 @@ bool KinematicBody3D::separate_raycast_shapes(bool p_infinite_inertia, Collision
Vector3 recover;
int hits = PhysicsServer3D::get_singleton()->body_test_ray_separation(get_rid(), gt, p_infinite_inertia, recover, sep_res, 8, margin);
int deepest = -1;
- float deepest_depth;
+ real_t deepest_depth;
for (int i = 0; i < hits; i++) {
if (deepest == -1 || sep_res[i].collision_depth > deepest_depth) {
deepest = i;
@@ -1131,12 +1114,12 @@ bool KinematicBody3D::get_axis_lock(PhysicsServer3D::BodyAxis p_axis) const {
return PhysicsServer3D::get_singleton()->body_is_axis_locked(get_rid(), p_axis);
}
-void KinematicBody3D::set_safe_margin(float p_margin) {
+void KinematicBody3D::set_safe_margin(real_t p_margin) {
margin = p_margin;
PhysicsServer3D::get_singleton()->body_set_kinematic_safe_margin(get_rid(), margin);
}
-float KinematicBody3D::get_safe_margin() const {
+real_t KinematicBody3D::get_safe_margin() const {
return margin;
}
@@ -1180,8 +1163,8 @@ void KinematicBody3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_direct_state_changed"), &KinematicBody3D::_direct_state_changed);
ClassDB::bind_method(D_METHOD("move_and_collide", "rel_vec", "infinite_inertia", "exclude_raycast_shapes", "test_only"), &KinematicBody3D::_move, DEFVAL(true), DEFVAL(true), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("move_and_slide", "linear_velocity", "up_direction", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody3D::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", "up_direction", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody3D::move_and_slide_with_snap, DEFVAL(Vector3(0, 0, 0)), DEFVAL(false), DEFVAL(4), DEFVAL(Math::deg2rad((float)45)), DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("move_and_slide", "linear_velocity", "up_direction", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody3D::move_and_slide, DEFVAL(Vector3(0, 0, 0)), DEFVAL(false), DEFVAL(4), DEFVAL(Math::deg2rad((real_t)45.0)), DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("move_and_slide_with_snap", "linear_velocity", "snap", "up_direction", "stop_on_slope", "max_slides", "floor_max_angle", "infinite_inertia"), &KinematicBody3D::move_and_slide_with_snap, DEFVAL(Vector3(0, 0, 0)), DEFVAL(false), DEFVAL(4), DEFVAL(Math::deg2rad((real_t)45.0)), DEFVAL(true));
ClassDB::bind_method(D_METHOD("test_move", "from", "rel_vec", "infinite_inertia"), &KinematicBody3D::test_move, DEFVAL(true));
@@ -1221,11 +1204,6 @@ void KinematicBody3D::_direct_state_changed(Object *p_state) {
KinematicBody3D::KinematicBody3D() :
PhysicsBody3D(PhysicsServer3D::BODY_MODE_KINEMATIC) {
- locked_axis = 0;
- on_floor = false;
- on_ceiling = false;
- on_wall = false;
-
set_safe_margin(0.001);
PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed");
}
@@ -1716,6 +1694,10 @@ bool PhysicalBone3D::SixDOFJointData::_set(const StringName &p_name, const Varia
String path = p_name;
+ if (!path.begins_with("joint_constraints/")) {
+ return false;
+ }
+
Vector3::Axis axis;
{
const String axis_s = path.get_slicec('/', 1);
@@ -1872,6 +1854,10 @@ bool PhysicalBone3D::SixDOFJointData::_get(const StringName &p_name, Variant &r_
String path = p_name;
+ if (!path.begins_with("joint_constraints/")) {
+ return false;
+ }
+
int axis;
{
const String axis_s = path.get_slicec('/', 1);
@@ -2026,7 +2012,7 @@ void PhysicalBone3D::_notification(int p_what) {
update_bone_id();
reset_to_rest_position();
reset_physics_simulation_state();
- if (!joint.is_valid() && joint_data) {
+ if (joint_data) {
_reload_joint();
}
break;
@@ -2037,10 +2023,7 @@ void PhysicalBone3D::_notification(int p_what) {
}
}
parent_skeleton = nullptr;
- if (joint.is_valid()) {
- PhysicsServer3D::get_singleton()->free(joint);
- joint = RID();
- }
+ PhysicsServer3D::get_singleton()->joint_clear(joint);
break;
case NOTIFICATION_TRANSFORM_CHANGED:
if (Engine::get_singleton()->is_editor_hint()) {
@@ -2190,17 +2173,14 @@ void PhysicalBone3D::_fix_joint_offset() {
}
void PhysicalBone3D::_reload_joint() {
- if (joint.is_valid()) {
- PhysicsServer3D::get_singleton()->free(joint);
- joint = RID();
- }
-
if (!parent_skeleton) {
+ PhysicsServer3D::get_singleton()->joint_clear(joint);
return;
}
PhysicalBone3D *body_a = parent_skeleton->get_physical_bone_parent(bone_id);
if (!body_a) {
+ PhysicsServer3D::get_singleton()->joint_clear(joint);
return;
}
@@ -2210,7 +2190,7 @@ void PhysicalBone3D::_reload_joint() {
switch (get_joint_type()) {
case JOINT_TYPE_PIN: {
- joint = PhysicsServer3D::get_singleton()->joint_create_pin(body_a->get_rid(), local_a.origin, get_rid(), joint_offset.origin);
+ PhysicsServer3D::get_singleton()->joint_make_pin(joint, body_a->get_rid(), local_a.origin, get_rid(), joint_offset.origin);
const PinJointData *pjd(static_cast<const PinJointData *>(joint_data));
PhysicsServer3D::get_singleton()->pin_joint_set_param(joint, PhysicsServer3D::PIN_JOINT_BIAS, pjd->bias);
PhysicsServer3D::get_singleton()->pin_joint_set_param(joint, PhysicsServer3D::PIN_JOINT_DAMPING, pjd->damping);
@@ -2218,7 +2198,7 @@ void PhysicalBone3D::_reload_joint() {
} break;
case JOINT_TYPE_CONE: {
- joint = PhysicsServer3D::get_singleton()->joint_create_cone_twist(body_a->get_rid(), local_a, get_rid(), joint_offset);
+ PhysicsServer3D::get_singleton()->joint_make_cone_twist(joint, body_a->get_rid(), local_a, get_rid(), joint_offset);
const ConeJointData *cjd(static_cast<const ConeJointData *>(joint_data));
PhysicsServer3D::get_singleton()->cone_twist_joint_set_param(joint, PhysicsServer3D::CONE_TWIST_JOINT_SWING_SPAN, cjd->swing_span);
PhysicsServer3D::get_singleton()->cone_twist_joint_set_param(joint, PhysicsServer3D::CONE_TWIST_JOINT_TWIST_SPAN, cjd->twist_span);
@@ -2228,7 +2208,7 @@ void PhysicalBone3D::_reload_joint() {
} break;
case JOINT_TYPE_HINGE: {
- joint = PhysicsServer3D::get_singleton()->joint_create_hinge(body_a->get_rid(), local_a, get_rid(), joint_offset);
+ PhysicsServer3D::get_singleton()->joint_make_hinge(joint, body_a->get_rid(), local_a, get_rid(), joint_offset);
const HingeJointData *hjd(static_cast<const HingeJointData *>(joint_data));
PhysicsServer3D::get_singleton()->hinge_joint_set_flag(joint, PhysicsServer3D::HINGE_JOINT_FLAG_USE_LIMIT, hjd->angular_limit_enabled);
PhysicsServer3D::get_singleton()->hinge_joint_set_param(joint, PhysicsServer3D::HINGE_JOINT_LIMIT_UPPER, hjd->angular_limit_upper);
@@ -2239,7 +2219,7 @@ void PhysicalBone3D::_reload_joint() {
} break;
case JOINT_TYPE_SLIDER: {
- joint = PhysicsServer3D::get_singleton()->joint_create_slider(body_a->get_rid(), local_a, get_rid(), joint_offset);
+ PhysicsServer3D::get_singleton()->joint_make_slider(joint, body_a->get_rid(), local_a, get_rid(), joint_offset);
const SliderJointData *sjd(static_cast<const SliderJointData *>(joint_data));
PhysicsServer3D::get_singleton()->slider_joint_set_param(joint, PhysicsServer3D::SLIDER_JOINT_LINEAR_LIMIT_UPPER, sjd->linear_limit_upper);
PhysicsServer3D::get_singleton()->slider_joint_set_param(joint, PhysicsServer3D::SLIDER_JOINT_LINEAR_LIMIT_LOWER, sjd->linear_limit_lower);
@@ -2254,7 +2234,7 @@ void PhysicalBone3D::_reload_joint() {
} break;
case JOINT_TYPE_6DOF: {
- joint = PhysicsServer3D::get_singleton()->joint_create_generic_6dof(body_a->get_rid(), local_a, get_rid(), joint_offset);
+ PhysicsServer3D::get_singleton()->joint_make_generic_6dof(joint, body_a->get_rid(), local_a, get_rid(), joint_offset);
const SixDOFJointData *g6dofjd(static_cast<const SixDOFJointData *>(joint_data));
for (int axis = 0; axis < 3; ++axis) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(joint, static_cast<Vector3::Axis>(axis), PhysicsServer3D::G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT, g6dofjd->axis_data[axis].linear_limit_enabled);
@@ -2347,7 +2327,7 @@ void PhysicalBone3D::set_joint_type(JointType p_joint_type) {
_reload_joint();
#ifdef TOOLS_ENABLED
- _change_notify();
+ notify_property_list_changed();
if (get_gizmo().is_valid()) {
get_gizmo()->redraw();
}
@@ -2362,7 +2342,6 @@ void PhysicalBone3D::set_joint_offset(const Transform &p_offset) {
joint_offset = p_offset;
_update_joint_offset();
- _change_notify("joint_rotation_degrees");
}
const Transform &PhysicalBone3D::get_joint_offset() const {
@@ -2373,7 +2352,6 @@ void PhysicalBone3D::set_joint_rotation(const Vector3 &p_euler_rad) {
joint_offset.basis.set_euler_scale(p_euler_rad, joint_offset.basis.get_scale());
_update_joint_offset();
- _change_notify("joint_offset");
}
Vector3 PhysicalBone3D::get_joint_rotation() const {
@@ -2381,11 +2359,11 @@ Vector3 PhysicalBone3D::get_joint_rotation() const {
}
void PhysicalBone3D::set_joint_rotation_degrees(const Vector3 &p_euler_deg) {
- set_joint_rotation(p_euler_deg * Math_PI / 180.0);
+ set_joint_rotation(p_euler_deg * (Math_PI / 180.0));
}
Vector3 PhysicalBone3D::get_joint_rotation_degrees() const {
- return get_joint_rotation() * 180.0 / Math_PI;
+ return get_joint_rotation() * (180.0 / Math_PI);
}
const Transform &PhysicalBone3D::get_body_offset() const {
@@ -2508,6 +2486,7 @@ bool PhysicalBone3D::get_axis_lock(PhysicsServer3D::BodyAxis p_axis) const {
PhysicalBone3D::PhysicalBone3D() :
PhysicsBody3D(PhysicsServer3D::BODY_MODE_STATIC) {
+ joint = PhysicsServer3D::get_singleton()->joint_create();
reset_physics_simulation_state();
}
@@ -2515,6 +2494,7 @@ PhysicalBone3D::~PhysicalBone3D() {
if (joint_data) {
memdelete(joint_data);
}
+ PhysicsServer3D::get_singleton()->free(joint);
}
void PhysicalBone3D::update_bone_id() {
diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h
index d9b95e6551..1450fce6a6 100644
--- a/scene/3d/physics_body_3d.h
+++ b/scene/3d/physics_body_3d.h
@@ -50,7 +50,7 @@ protected:
public:
virtual Vector3 get_linear_velocity() const;
virtual Vector3 get_angular_velocity() const;
- virtual float get_inverse_mass() const;
+ virtual real_t get_inverse_mass() const;
void set_collision_layer(uint32_t p_layer);
uint32_t get_collision_layer() const;
@@ -111,31 +111,31 @@ public:
};
protected:
- bool can_sleep;
- PhysicsDirectBodyState3D *state;
- Mode mode;
+ bool can_sleep = true;
+ PhysicsDirectBodyState3D *state = nullptr;
+ Mode mode = MODE_RIGID;
- real_t mass;
+ real_t mass = 1.0;
Ref<PhysicsMaterial> physics_material_override;
Vector3 linear_velocity;
Vector3 angular_velocity;
Basis inverse_inertia_tensor;
- real_t gravity_scale;
- real_t linear_damp;
- real_t angular_damp;
+ real_t gravity_scale = 1.0;
+ real_t linear_damp = -1.0;
+ real_t angular_damp = -1.0;
- bool sleeping;
- bool ccd;
+ bool sleeping = false;
+ bool ccd = false;
- int max_contacts_reported;
+ int max_contacts_reported = 0;
- bool custom_integrator;
+ bool custom_integrator = false;
struct ShapePair {
- int body_shape;
- int local_shape;
- bool tagged;
+ int body_shape = 0;
+ int local_shape = 0;
+ bool tagged = false;
bool operator<(const ShapePair &p_sp) const {
if (body_shape == p_sp.body_shape) {
return local_shape < p_sp.local_shape;
@@ -157,16 +157,16 @@ protected:
};
struct BodyState {
//int rc;
- bool in_tree;
+ bool in_tree = false;
VSet<ShapePair> shapes;
};
struct ContactMonitor {
- bool locked;
+ bool locked = false;
Map<ObjectID, BodyState> body_map;
};
- ContactMonitor *contact_monitor;
+ ContactMonitor *contact_monitor = nullptr;
void _body_enter_tree(ObjectID p_id);
void _body_exit_tree(ObjectID p_id);
@@ -183,7 +183,7 @@ public:
void set_mass(real_t p_mass);
real_t get_mass() const;
- virtual float get_inverse_mass() const override { return 1.0 / mass; }
+ virtual real_t get_inverse_mass() const override { return 1.0 / mass; }
void set_physics_material_override(const Ref<PhysicsMaterial> &p_physics_material_override);
Ref<PhysicsMaterial> get_physics_material_override() const;
@@ -261,27 +261,27 @@ public:
Vector3 collider_vel;
ObjectID collider;
RID collider_rid;
- int collider_shape;
+ int collider_shape = 0;
Variant collider_metadata;
Vector3 remainder;
Vector3 travel;
- int local_shape;
+ int local_shape = 0;
};
private:
Vector3 linear_velocity;
Vector3 angular_velocity;
- uint16_t locked_axis;
+ uint16_t locked_axis = 0;
- float margin;
+ real_t margin;
Vector3 floor_normal;
Vector3 floor_velocity;
RID on_floor_body;
- bool on_floor;
- bool on_ceiling;
- bool on_wall;
+ bool on_floor = false;
+ bool on_ceiling = false;
+ bool on_wall = false;
Vector<Collision> colliders;
Vector<Ref<KinematicCollision3D>> slide_colliders;
Ref<KinematicCollision3D> motion_cache;
@@ -309,11 +309,11 @@ public:
void set_axis_lock(PhysicsServer3D::BodyAxis p_axis, bool p_lock);
bool get_axis_lock(PhysicsServer3D::BodyAxis p_axis) const;
- void set_safe_margin(float p_margin);
- float get_safe_margin() const;
+ void set_safe_margin(real_t p_margin);
+ real_t get_safe_margin() const;
- Vector3 move_and_slide(const Vector3 &p_linear_velocity, const Vector3 &p_up_direction = Vector3(0, 0, 0), bool p_stop_on_slope = false, int p_max_slides = 4, float p_floor_max_angle = Math::deg2rad((float)45), bool p_infinite_inertia = true);
- Vector3 move_and_slide_with_snap(const Vector3 &p_linear_velocity, const Vector3 &p_snap, const Vector3 &p_up_direction = Vector3(0, 0, 0), bool p_stop_on_slope = false, int p_max_slides = 4, float p_floor_max_angle = Math::deg2rad((float)45), bool p_infinite_inertia = true);
+ Vector3 move_and_slide(const Vector3 &p_linear_velocity, const Vector3 &p_up_direction = Vector3(0, 0, 0), bool p_stop_on_slope = false, int p_max_slides = 4, real_t p_floor_max_angle = Math::deg2rad((real_t)45.0), bool p_infinite_inertia = true);
+ Vector3 move_and_slide_with_snap(const Vector3 &p_linear_velocity, const Vector3 &p_snap, const Vector3 &p_up_direction = Vector3(0, 0, 0), bool p_stop_on_slope = false, int p_max_slides = 4, real_t p_floor_max_angle = Math::deg2rad((real_t)45.0), bool p_infinite_inertia = true);
bool is_on_floor() const;
bool is_on_wall() const;
bool is_on_ceiling() const;
@@ -385,10 +385,8 @@ public:
virtual void _get_property_list(List<PropertyInfo> *p_list) const;
real_t bias = 0.3;
- real_t damping = 1.;
- real_t impulse_clamp = 0;
-
- PinJointData() {}
+ real_t damping = 1.0;
+ real_t impulse_clamp = 0.0;
};
struct ConeJointData : public JointData {
@@ -398,14 +396,11 @@ public:
virtual bool _get(const StringName &p_name, Variant &r_ret) const;
virtual void _get_property_list(List<PropertyInfo> *p_list) const;
- real_t swing_span;
+ real_t swing_span = Math_PI * 0.25;
real_t twist_span = Math_PI;
real_t bias = 0.3;
real_t softness = 0.8;
real_t relaxation = 1.;
-
- ConeJointData() :
- swing_span(Math_PI * 0.25) {}
};
struct HingeJointData : public JointData {
@@ -416,16 +411,11 @@ public:
virtual void _get_property_list(List<PropertyInfo> *p_list) const;
bool angular_limit_enabled = false;
- real_t angular_limit_upper;
- real_t angular_limit_lower;
+ real_t angular_limit_upper = Math_PI * 0.5;
+ real_t angular_limit_lower = -Math_PI * 0.5;
real_t angular_limit_bias = 0.3;
real_t angular_limit_softness = 0.9;
real_t angular_limit_relaxation = 1.;
-
- HingeJointData() :
-
- angular_limit_upper(Math_PI * 0.5),
- angular_limit_lower(-Math_PI * 0.5) {}
};
struct SliderJointData : public JointData {
@@ -435,45 +425,41 @@ public:
virtual bool _get(const StringName &p_name, Variant &r_ret) const;
virtual void _get_property_list(List<PropertyInfo> *p_list) const;
- real_t linear_limit_upper = 1.;
- real_t linear_limit_lower = -1.;
- real_t linear_limit_softness = 1.;
+ real_t linear_limit_upper = 1.0;
+ real_t linear_limit_lower = -1.0;
+ real_t linear_limit_softness = 1.0;
real_t linear_limit_restitution = 0.7;
- real_t linear_limit_damping = 1.;
- real_t angular_limit_upper = 0;
- real_t angular_limit_lower = 0;
- real_t angular_limit_softness = 1.;
+ real_t linear_limit_damping = 1.0;
+ real_t angular_limit_upper = 0.0;
+ real_t angular_limit_lower = 0.0;
+ real_t angular_limit_softness = 1.0;
real_t angular_limit_restitution = 0.7;
- real_t angular_limit_damping = 1.;
-
- SliderJointData() {}
+ real_t angular_limit_damping = 1.0;
};
struct SixDOFJointData : public JointData {
struct SixDOFAxisData {
bool linear_limit_enabled = true;
- real_t linear_limit_upper = 0;
- real_t linear_limit_lower = 0;
+ real_t linear_limit_upper = 0.0;
+ real_t linear_limit_lower = 0.0;
real_t linear_limit_softness = 0.7;
real_t linear_restitution = 0.5;
- real_t linear_damping = 1.;
+ real_t linear_damping = 1.0;
bool linear_spring_enabled = false;
- real_t linear_spring_stiffness = 0;
- real_t linear_spring_damping = 0;
- real_t linear_equilibrium_point = 0;
+ real_t linear_spring_stiffness = 0.0;
+ real_t linear_spring_damping = 0.0;
+ real_t linear_equilibrium_point = 0.0;
bool angular_limit_enabled = true;
- real_t angular_limit_upper = 0;
- real_t angular_limit_lower = 0;
+ real_t angular_limit_upper = 0.0;
+ real_t angular_limit_lower = 0.0;
real_t angular_limit_softness = 0.5;
- real_t angular_restitution = 0;
- real_t angular_damping = 1.;
+ real_t angular_restitution = 0.0;
+ real_t angular_damping = 1.0;
real_t erp = 0.5;
bool angular_spring_enabled = false;
- real_t angular_spring_stiffness = 0;
- real_t angular_spring_damping = 0.;
- real_t angular_equilibrium_point = 0;
-
- SixDOFAxisData() {}
+ real_t angular_spring_stiffness = 0.0;
+ real_t angular_spring_damping = 0.0;
+ real_t angular_equilibrium_point = 0.0;
};
virtual JointType get_joint_type() { return JOINT_TYPE_6DOF; }
@@ -505,12 +491,12 @@ private:
int bone_id = -1;
String bone_name;
- real_t bounce = 0;
- real_t mass = 1;
- real_t friction = 1;
- real_t gravity_scale = 1;
- real_t linear_damp = -1;
- real_t angular_damp = -1;
+ real_t bounce = 0.0;
+ real_t mass = 1.0;
+ real_t friction = 1.0;
+ real_t gravity_scale = 1.0;
+ real_t linear_damp = -1.0;
+ real_t angular_damp = -1.0;
bool can_sleep = true;
protected:
diff --git a/scene/3d/physics_joint_3d.cpp b/scene/3d/physics_joint_3d.cpp
index 326b91b6ed..0463bed9d6 100644
--- a/scene/3d/physics_joint_3d.cpp
+++ b/scene/3d/physics_joint_3d.cpp
@@ -62,18 +62,17 @@ void Joint3D::_body_exit_tree(const ObjectID &p_body_id) {
}
void Joint3D::_update_joint(bool p_only_free) {
- if (joint.is_valid()) {
- if (ba.is_valid() && bb.is_valid()) {
- PhysicsServer3D::get_singleton()->body_remove_collision_exception(ba, bb);
- }
-
- PhysicsServer3D::get_singleton()->free(joint);
- joint = RID();
- ba = RID();
- bb = RID();
+ if (ba.is_valid() && bb.is_valid()) {
+ PhysicsServer3D::get_singleton()->body_remove_collision_exception(ba, bb);
}
+ ba = RID();
+ bb = RID();
+
+ configured = false;
+
if (p_only_free || !is_inside_tree()) {
+ PhysicsServer3D::get_singleton()->joint_clear(joint);
warning = String();
return;
}
@@ -85,30 +84,35 @@ void Joint3D::_update_joint(bool p_only_free) {
PhysicsBody3D *body_b = Object::cast_to<PhysicsBody3D>(node_b);
if (node_a && !body_a && node_b && !body_b) {
+ PhysicsServer3D::get_singleton()->joint_clear(joint);
warning = TTR("Node A and Node B must be PhysicsBody3Ds");
update_configuration_warning();
return;
}
if (node_a && !body_a) {
+ PhysicsServer3D::get_singleton()->joint_clear(joint);
warning = TTR("Node A must be a PhysicsBody3D");
update_configuration_warning();
return;
}
if (node_b && !body_b) {
+ PhysicsServer3D::get_singleton()->joint_clear(joint);
warning = TTR("Node B must be a PhysicsBody3D");
update_configuration_warning();
return;
}
if (!body_a && !body_b) {
+ PhysicsServer3D::get_singleton()->joint_clear(joint);
warning = TTR("Joint is not connected to any PhysicsBody3Ds");
update_configuration_warning();
return;
}
if (body_a == body_b) {
+ PhysicsServer3D::get_singleton()->joint_clear(joint);
warning = TTR("Node A and Node B must be different PhysicsBody3Ds");
update_configuration_warning();
return;
@@ -117,14 +121,14 @@ void Joint3D::_update_joint(bool p_only_free) {
warning = String();
update_configuration_warning();
+ configured = true;
+
if (body_a) {
- joint = _configure_joint(body_a, body_b);
+ _configure_joint(joint, body_a, body_b);
} else if (body_b) {
- joint = _configure_joint(body_b, nullptr);
+ _configure_joint(joint, body_b, nullptr);
}
- ERR_FAIL_COND_MSG(!joint.is_valid(), "Failed to configure the joint.");
-
PhysicsServer3D::get_singleton()->joint_set_solver_priority(joint, solver_priority);
if (body_a) {
@@ -245,9 +249,12 @@ void Joint3D::_bind_methods() {
}
Joint3D::Joint3D() {
- exclude_from_collision = true;
- solver_priority = 1;
set_notify_transform(true);
+ joint = PhysicsServer3D::get_singleton()->joint_create();
+}
+
+Joint3D::~Joint3D() {
+ PhysicsServer3D::get_singleton()->free(joint);
}
///////////////////////////////////
@@ -265,20 +272,20 @@ void PinJoint3D::_bind_methods() {
BIND_ENUM_CONSTANT(PARAM_IMPULSE_CLAMP);
}
-void PinJoint3D::set_param(Param p_param, float p_value) {
+void PinJoint3D::set_param(Param p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, 3);
params[p_param] = p_value;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->pin_joint_set_param(get_joint(), PhysicsServer3D::PinJointParam(p_param), p_value);
}
}
-float PinJoint3D::get_param(Param p_param) const {
+real_t PinJoint3D::get_param(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, 3, 0);
return params[p_param];
}
-RID PinJoint3D::_configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
+void PinJoint3D::_configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
Vector3 pinpos = get_global_transform().origin;
Vector3 local_a = body_a->get_global_transform().affine_inverse().xform(pinpos);
Vector3 local_b;
@@ -289,11 +296,10 @@ RID PinJoint3D::_configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
local_b = pinpos;
}
- RID j = PhysicsServer3D::get_singleton()->joint_create_pin(body_a->get_rid(), local_a, body_b ? body_b->get_rid() : RID(), local_b);
+ PhysicsServer3D::get_singleton()->joint_make_pin(p_joint, body_a->get_rid(), local_a, body_b ? body_b->get_rid() : RID(), local_b);
for (int i = 0; i < 3; i++) {
- PhysicsServer3D::get_singleton()->pin_joint_set_param(j, PhysicsServer3D::PinJointParam(i), params[i]);
+ PhysicsServer3D::get_singleton()->pin_joint_set_param(p_joint, PhysicsServer3D::PinJointParam(i), params[i]);
}
- return j;
}
PinJoint3D::PinJoint3D() {
@@ -306,19 +312,19 @@ PinJoint3D::PinJoint3D() {
///////////////////////////////////
-void HingeJoint3D::_set_upper_limit(float p_limit) {
+void HingeJoint3D::_set_upper_limit(real_t p_limit) {
set_param(PARAM_LIMIT_UPPER, Math::deg2rad(p_limit));
}
-float HingeJoint3D::_get_upper_limit() const {
+real_t HingeJoint3D::_get_upper_limit() const {
return Math::rad2deg(get_param(PARAM_LIMIT_UPPER));
}
-void HingeJoint3D::_set_lower_limit(float p_limit) {
+void HingeJoint3D::_set_lower_limit(real_t p_limit) {
set_param(PARAM_LIMIT_LOWER, Math::deg2rad(p_limit));
}
-float HingeJoint3D::_get_lower_limit() const {
+real_t HingeJoint3D::_get_lower_limit() const {
return Math::rad2deg(get_param(PARAM_LIMIT_LOWER));
}
@@ -363,17 +369,17 @@ void HingeJoint3D::_bind_methods() {
BIND_ENUM_CONSTANT(FLAG_MAX);
}
-void HingeJoint3D::set_param(Param p_param, float p_value) {
+void HingeJoint3D::set_param(Param p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
params[p_param] = p_value;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->hinge_joint_set_param(get_joint(), PhysicsServer3D::HingeJointParam(p_param), p_value);
}
update_gizmo();
}
-float HingeJoint3D::get_param(Param p_param) const {
+real_t HingeJoint3D::get_param(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params[p_param];
}
@@ -381,7 +387,7 @@ float HingeJoint3D::get_param(Param p_param) const {
void HingeJoint3D::set_flag(Flag p_flag, bool p_value) {
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
flags[p_flag] = p_value;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->hinge_joint_set_flag(get_joint(), PhysicsServer3D::HingeJointFlag(p_flag), p_value);
}
@@ -393,7 +399,7 @@ bool HingeJoint3D::get_flag(Flag p_flag) const {
return flags[p_flag];
}
-RID HingeJoint3D::_configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
+void HingeJoint3D::_configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
Transform gt = get_global_transform();
Transform ainv = body_a->get_global_transform().affine_inverse();
@@ -408,15 +414,14 @@ RID HingeJoint3D::_configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b)
local_b.orthonormalize();
- RID j = PhysicsServer3D::get_singleton()->joint_create_hinge(body_a->get_rid(), local_a, body_b ? body_b->get_rid() : RID(), local_b);
+ PhysicsServer3D::get_singleton()->joint_make_hinge(p_joint, body_a->get_rid(), local_a, body_b ? body_b->get_rid() : RID(), local_b);
for (int i = 0; i < PARAM_MAX; i++) {
- PhysicsServer3D::get_singleton()->hinge_joint_set_param(j, PhysicsServer3D::HingeJointParam(i), params[i]);
+ PhysicsServer3D::get_singleton()->hinge_joint_set_param(p_joint, PhysicsServer3D::HingeJointParam(i), params[i]);
}
for (int i = 0; i < FLAG_MAX; i++) {
set_flag(Flag(i), flags[i]);
- PhysicsServer3D::get_singleton()->hinge_joint_set_flag(j, PhysicsServer3D::HingeJointFlag(i), flags[i]);
+ PhysicsServer3D::get_singleton()->hinge_joint_set_flag(p_joint, PhysicsServer3D::HingeJointFlag(i), flags[i]);
}
- return j;
}
HingeJoint3D::HingeJoint3D() {
@@ -437,19 +442,19 @@ HingeJoint3D::HingeJoint3D() {
//////////////////////////////////
-void SliderJoint3D::_set_upper_limit_angular(float p_limit_angular) {
+void SliderJoint3D::_set_upper_limit_angular(real_t p_limit_angular) {
set_param(PARAM_ANGULAR_LIMIT_UPPER, Math::deg2rad(p_limit_angular));
}
-float SliderJoint3D::_get_upper_limit_angular() const {
+real_t SliderJoint3D::_get_upper_limit_angular() const {
return Math::rad2deg(get_param(PARAM_ANGULAR_LIMIT_UPPER));
}
-void SliderJoint3D::_set_lower_limit_angular(float p_limit_angular) {
+void SliderJoint3D::_set_lower_limit_angular(real_t p_limit_angular) {
set_param(PARAM_ANGULAR_LIMIT_LOWER, Math::deg2rad(p_limit_angular));
}
-float SliderJoint3D::_get_lower_limit_angular() const {
+real_t SliderJoint3D::_get_lower_limit_angular() const {
return Math::rad2deg(get_param(PARAM_ANGULAR_LIMIT_LOWER));
}
@@ -514,21 +519,21 @@ void SliderJoint3D::_bind_methods() {
BIND_ENUM_CONSTANT(PARAM_MAX);
}
-void SliderJoint3D::set_param(Param p_param, float p_value) {
+void SliderJoint3D::set_param(Param p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
params[p_param] = p_value;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->slider_joint_set_param(get_joint(), PhysicsServer3D::SliderJointParam(p_param), p_value);
}
update_gizmo();
}
-float SliderJoint3D::get_param(Param p_param) const {
+real_t SliderJoint3D::get_param(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params[p_param];
}
-RID SliderJoint3D::_configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
+void SliderJoint3D::_configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
Transform gt = get_global_transform();
Transform ainv = body_a->get_global_transform().affine_inverse();
@@ -543,12 +548,10 @@ RID SliderJoint3D::_configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b
local_b.orthonormalize();
- RID j = PhysicsServer3D::get_singleton()->joint_create_slider(body_a->get_rid(), local_a, body_b ? body_b->get_rid() : RID(), local_b);
+ PhysicsServer3D::get_singleton()->joint_make_slider(p_joint, body_a->get_rid(), local_a, body_b ? body_b->get_rid() : RID(), local_b);
for (int i = 0; i < PARAM_MAX; i++) {
- PhysicsServer3D::get_singleton()->slider_joint_set_param(j, PhysicsServer3D::SliderJointParam(i), params[i]);
+ PhysicsServer3D::get_singleton()->slider_joint_set_param(p_joint, PhysicsServer3D::SliderJointParam(i), params[i]);
}
-
- return j;
}
SliderJoint3D::SliderJoint3D() {
@@ -579,19 +582,19 @@ SliderJoint3D::SliderJoint3D() {
//////////////////////////////////
-void ConeTwistJoint3D::_set_swing_span(float p_limit_angular) {
+void ConeTwistJoint3D::_set_swing_span(real_t p_limit_angular) {
set_param(PARAM_SWING_SPAN, Math::deg2rad(p_limit_angular));
}
-float ConeTwistJoint3D::_get_swing_span() const {
+real_t ConeTwistJoint3D::_get_swing_span() const {
return Math::rad2deg(get_param(PARAM_SWING_SPAN));
}
-void ConeTwistJoint3D::_set_twist_span(float p_limit_angular) {
+void ConeTwistJoint3D::_set_twist_span(real_t p_limit_angular) {
set_param(PARAM_TWIST_SPAN, Math::deg2rad(p_limit_angular));
}
-float ConeTwistJoint3D::_get_twist_span() const {
+real_t ConeTwistJoint3D::_get_twist_span() const {
return Math::rad2deg(get_param(PARAM_TWIST_SPAN));
}
@@ -620,22 +623,22 @@ void ConeTwistJoint3D::_bind_methods() {
BIND_ENUM_CONSTANT(PARAM_MAX);
}
-void ConeTwistJoint3D::set_param(Param p_param, float p_value) {
+void ConeTwistJoint3D::set_param(Param p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
params[p_param] = p_value;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->cone_twist_joint_set_param(get_joint(), PhysicsServer3D::ConeTwistJointParam(p_param), p_value);
}
update_gizmo();
}
-float ConeTwistJoint3D::get_param(Param p_param) const {
+real_t ConeTwistJoint3D::get_param(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params[p_param];
}
-RID ConeTwistJoint3D::_configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
+void ConeTwistJoint3D::_configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
Transform gt = get_global_transform();
//Vector3 cone_twistpos = gt.origin;
//Vector3 cone_twistdir = gt.basis.get_axis(2);
@@ -653,12 +656,10 @@ RID ConeTwistJoint3D::_configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *bod
local_b.orthonormalize();
- RID j = PhysicsServer3D::get_singleton()->joint_create_cone_twist(body_a->get_rid(), local_a, body_b ? body_b->get_rid() : RID(), local_b);
+ PhysicsServer3D::get_singleton()->joint_make_cone_twist(p_joint, body_a->get_rid(), local_a, body_b ? body_b->get_rid() : RID(), local_b);
for (int i = 0; i < PARAM_MAX; i++) {
- PhysicsServer3D::get_singleton()->cone_twist_joint_set_param(j, PhysicsServer3D::ConeTwistJointParam(i), params[i]);
+ PhysicsServer3D::get_singleton()->cone_twist_joint_set_param(p_joint, PhysicsServer3D::ConeTwistJointParam(i), params[i]);
}
-
- return j;
}
ConeTwistJoint3D::ConeTwistJoint3D() {
@@ -671,51 +672,51 @@ ConeTwistJoint3D::ConeTwistJoint3D() {
/////////////////////////////////////////////////////////////////////
-void Generic6DOFJoint3D::_set_angular_hi_limit_x(float p_limit_angular) {
+void Generic6DOFJoint3D::_set_angular_hi_limit_x(real_t p_limit_angular) {
set_param_x(PARAM_ANGULAR_UPPER_LIMIT, Math::deg2rad(p_limit_angular));
}
-float Generic6DOFJoint3D::_get_angular_hi_limit_x() const {
+real_t Generic6DOFJoint3D::_get_angular_hi_limit_x() const {
return Math::rad2deg(get_param_x(PARAM_ANGULAR_UPPER_LIMIT));
}
-void Generic6DOFJoint3D::_set_angular_lo_limit_x(float p_limit_angular) {
+void Generic6DOFJoint3D::_set_angular_lo_limit_x(real_t p_limit_angular) {
set_param_x(PARAM_ANGULAR_LOWER_LIMIT, Math::deg2rad(p_limit_angular));
}
-float Generic6DOFJoint3D::_get_angular_lo_limit_x() const {
+real_t Generic6DOFJoint3D::_get_angular_lo_limit_x() const {
return Math::rad2deg(get_param_x(PARAM_ANGULAR_LOWER_LIMIT));
}
-void Generic6DOFJoint3D::_set_angular_hi_limit_y(float p_limit_angular) {
+void Generic6DOFJoint3D::_set_angular_hi_limit_y(real_t p_limit_angular) {
set_param_y(PARAM_ANGULAR_UPPER_LIMIT, Math::deg2rad(p_limit_angular));
}
-float Generic6DOFJoint3D::_get_angular_hi_limit_y() const {
+real_t Generic6DOFJoint3D::_get_angular_hi_limit_y() const {
return Math::rad2deg(get_param_y(PARAM_ANGULAR_UPPER_LIMIT));
}
-void Generic6DOFJoint3D::_set_angular_lo_limit_y(float p_limit_angular) {
+void Generic6DOFJoint3D::_set_angular_lo_limit_y(real_t p_limit_angular) {
set_param_y(PARAM_ANGULAR_LOWER_LIMIT, Math::deg2rad(p_limit_angular));
}
-float Generic6DOFJoint3D::_get_angular_lo_limit_y() const {
+real_t Generic6DOFJoint3D::_get_angular_lo_limit_y() const {
return Math::rad2deg(get_param_y(PARAM_ANGULAR_LOWER_LIMIT));
}
-void Generic6DOFJoint3D::_set_angular_hi_limit_z(float p_limit_angular) {
+void Generic6DOFJoint3D::_set_angular_hi_limit_z(real_t p_limit_angular) {
set_param_z(PARAM_ANGULAR_UPPER_LIMIT, Math::deg2rad(p_limit_angular));
}
-float Generic6DOFJoint3D::_get_angular_hi_limit_z() const {
+real_t Generic6DOFJoint3D::_get_angular_hi_limit_z() const {
return Math::rad2deg(get_param_z(PARAM_ANGULAR_UPPER_LIMIT));
}
-void Generic6DOFJoint3D::_set_angular_lo_limit_z(float p_limit_angular) {
+void Generic6DOFJoint3D::_set_angular_lo_limit_z(real_t p_limit_angular) {
set_param_z(PARAM_ANGULAR_LOWER_LIMIT, Math::deg2rad(p_limit_angular));
}
-float Generic6DOFJoint3D::_get_angular_lo_limit_z() const {
+real_t Generic6DOFJoint3D::_get_angular_lo_limit_z() const {
return Math::rad2deg(get_param_z(PARAM_ANGULAR_LOWER_LIMIT));
}
@@ -877,45 +878,45 @@ void Generic6DOFJoint3D::_bind_methods() {
BIND_ENUM_CONSTANT(FLAG_MAX);
}
-void Generic6DOFJoint3D::set_param_x(Param p_param, float p_value) {
+void Generic6DOFJoint3D::set_param_x(Param p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
params_x[p_param] = p_value;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_joint(), Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
}
update_gizmo();
}
-float Generic6DOFJoint3D::get_param_x(Param p_param) const {
+real_t Generic6DOFJoint3D::get_param_x(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params_x[p_param];
}
-void Generic6DOFJoint3D::set_param_y(Param p_param, float p_value) {
+void Generic6DOFJoint3D::set_param_y(Param p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
params_y[p_param] = p_value;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_joint(), Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
}
update_gizmo();
}
-float Generic6DOFJoint3D::get_param_y(Param p_param) const {
+real_t Generic6DOFJoint3D::get_param_y(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params_y[p_param];
}
-void Generic6DOFJoint3D::set_param_z(Param p_param, float p_value) {
+void Generic6DOFJoint3D::set_param_z(Param p_param, real_t p_value) {
ERR_FAIL_INDEX(p_param, PARAM_MAX);
params_z[p_param] = p_value;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(get_joint(), Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisParam(p_param), p_value);
}
update_gizmo();
}
-float Generic6DOFJoint3D::get_param_z(Param p_param) const {
+real_t Generic6DOFJoint3D::get_param_z(Param p_param) const {
ERR_FAIL_INDEX_V(p_param, PARAM_MAX, 0);
return params_z[p_param];
}
@@ -923,7 +924,7 @@ float Generic6DOFJoint3D::get_param_z(Param p_param) const {
void Generic6DOFJoint3D::set_flag_x(Flag p_flag, bool p_enabled) {
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
flags_x[p_flag] = p_enabled;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
}
update_gizmo();
@@ -937,7 +938,7 @@ bool Generic6DOFJoint3D::get_flag_x(Flag p_flag) const {
void Generic6DOFJoint3D::set_flag_y(Flag p_flag, bool p_enabled) {
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
flags_y[p_flag] = p_enabled;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
}
update_gizmo();
@@ -951,7 +952,7 @@ bool Generic6DOFJoint3D::get_flag_y(Flag p_flag) const {
void Generic6DOFJoint3D::set_flag_z(Flag p_flag, bool p_enabled) {
ERR_FAIL_INDEX(p_flag, FLAG_MAX);
flags_z[p_flag] = p_enabled;
- if (get_joint().is_valid()) {
+ if (is_configured()) {
PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(get_joint(), Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisFlag(p_flag), p_enabled);
}
update_gizmo();
@@ -962,7 +963,7 @@ bool Generic6DOFJoint3D::get_flag_z(Flag p_flag) const {
return flags_z[p_flag];
}
-RID Generic6DOFJoint3D::_configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
+void Generic6DOFJoint3D::_configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) {
Transform gt = get_global_transform();
//Vector3 cone_twistpos = gt.origin;
//Vector3 cone_twistdir = gt.basis.get_axis(2);
@@ -980,19 +981,17 @@ RID Generic6DOFJoint3D::_configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *b
local_b.orthonormalize();
- RID j = PhysicsServer3D::get_singleton()->joint_create_generic_6dof(body_a->get_rid(), local_a, body_b ? body_b->get_rid() : RID(), local_b);
+ PhysicsServer3D::get_singleton()->joint_make_generic_6dof(p_joint, body_a->get_rid(), local_a, body_b ? body_b->get_rid() : RID(), local_b);
for (int i = 0; i < PARAM_MAX; i++) {
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(j, Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisParam(i), params_x[i]);
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(j, Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisParam(i), params_y[i]);
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(j, Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisParam(i), params_z[i]);
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(p_joint, Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisParam(i), params_x[i]);
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(p_joint, Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisParam(i), params_y[i]);
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_param(p_joint, Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisParam(i), params_z[i]);
}
for (int i = 0; i < FLAG_MAX; i++) {
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(j, Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisFlag(i), flags_x[i]);
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(j, Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisFlag(i), flags_y[i]);
- PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(j, Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisFlag(i), flags_z[i]);
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(p_joint, Vector3::AXIS_X, PhysicsServer3D::G6DOFJointAxisFlag(i), flags_x[i]);
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(p_joint, Vector3::AXIS_Y, PhysicsServer3D::G6DOFJointAxisFlag(i), flags_y[i]);
+ PhysicsServer3D::get_singleton()->generic_6dof_joint_set_flag(p_joint, Vector3::AXIS_Z, PhysicsServer3D::G6DOFJointAxisFlag(i), flags_z[i]);
}
-
- return j;
}
Generic6DOFJoint3D::Generic6DOFJoint3D() {
diff --git a/scene/3d/physics_joint_3d.h b/scene/3d/physics_joint_3d.h
index 9702076318..8d0a16e432 100644
--- a/scene/3d/physics_joint_3d.h
+++ b/scene/3d/physics_joint_3d.h
@@ -44,9 +44,10 @@ class Joint3D : public Node3D {
NodePath a;
NodePath b;
- int solver_priority;
- bool exclude_from_collision;
+ int solver_priority = 1;
+ bool exclude_from_collision = true;
String warning;
+ bool configured = false;
protected:
void _disconnect_signals();
@@ -55,10 +56,12 @@ protected:
void _notification(int p_what);
- virtual RID _configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) = 0;
+ virtual void _configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) = 0;
static void _bind_methods();
+ _FORCE_INLINE_ bool is_configured() const { return configured; }
+
public:
virtual String get_configuration_warning() const override;
@@ -76,6 +79,7 @@ public:
RID get_joint() const { return joint; }
Joint3D();
+ ~Joint3D();
};
///////////////////////////////////////////
@@ -91,13 +95,13 @@ public:
};
protected:
- float params[3];
- virtual RID _configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) override;
+ real_t params[3];
+ virtual void _configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) override;
static void _bind_methods();
public:
- void set_param(Param p_param, float p_value);
- float get_param(Param p_param) const;
+ void set_param(Param p_param, real_t p_value);
+ real_t get_param(Param p_param) const;
PinJoint3D();
};
@@ -127,20 +131,20 @@ public:
};
protected:
- float params[PARAM_MAX];
+ real_t params[PARAM_MAX];
bool flags[FLAG_MAX];
- virtual RID _configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) override;
+ virtual void _configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) override;
static void _bind_methods();
- void _set_upper_limit(float p_limit);
- float _get_upper_limit() const;
+ void _set_upper_limit(real_t p_limit);
+ real_t _get_upper_limit() const;
- void _set_lower_limit(float p_limit);
- float _get_lower_limit() const;
+ void _set_lower_limit(real_t p_limit);
+ real_t _get_lower_limit() const;
public:
- void set_param(Param p_param, float p_value);
- float get_param(Param p_param) const;
+ void set_param(Param p_param, real_t p_value);
+ real_t get_param(Param p_param) const;
void set_flag(Flag p_flag, bool p_value);
bool get_flag(Flag p_flag) const;
@@ -184,19 +188,19 @@ public:
};
protected:
- void _set_upper_limit_angular(float p_limit_angular);
- float _get_upper_limit_angular() const;
+ void _set_upper_limit_angular(real_t p_limit_angular);
+ real_t _get_upper_limit_angular() const;
- void _set_lower_limit_angular(float p_limit_angular);
- float _get_lower_limit_angular() const;
+ void _set_lower_limit_angular(real_t p_limit_angular);
+ real_t _get_lower_limit_angular() const;
- float params[PARAM_MAX];
- virtual RID _configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) override;
+ real_t params[PARAM_MAX];
+ virtual void _configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) override;
static void _bind_methods();
public:
- void set_param(Param p_param, float p_value);
- float get_param(Param p_param) const;
+ void set_param(Param p_param, real_t p_value);
+ real_t get_param(Param p_param) const;
SliderJoint3D();
};
@@ -217,19 +221,19 @@ public:
};
protected:
- void _set_swing_span(float p_limit_angular);
- float _get_swing_span() const;
+ void _set_swing_span(real_t p_limit_angular);
+ real_t _get_swing_span() const;
- void _set_twist_span(float p_limit_angular);
- float _get_twist_span() const;
+ void _set_twist_span(real_t p_limit_angular);
+ real_t _get_twist_span() const;
- float params[PARAM_MAX];
- virtual RID _configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) override;
+ real_t params[PARAM_MAX];
+ virtual void _configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) override;
static void _bind_methods();
public:
- void set_param(Param p_param, float p_value);
- float get_param(Param p_param) const;
+ void set_param(Param p_param, real_t p_value);
+ real_t get_param(Param p_param) const;
ConeTwistJoint3D();
};
@@ -277,43 +281,43 @@ public:
};
protected:
- void _set_angular_hi_limit_x(float p_limit_angular);
- float _get_angular_hi_limit_x() const;
+ void _set_angular_hi_limit_x(real_t p_limit_angular);
+ real_t _get_angular_hi_limit_x() const;
- void _set_angular_hi_limit_y(float p_limit_angular);
- float _get_angular_hi_limit_y() const;
+ void _set_angular_hi_limit_y(real_t p_limit_angular);
+ real_t _get_angular_hi_limit_y() const;
- void _set_angular_hi_limit_z(float p_limit_angular);
- float _get_angular_hi_limit_z() const;
+ void _set_angular_hi_limit_z(real_t p_limit_angular);
+ real_t _get_angular_hi_limit_z() const;
- void _set_angular_lo_limit_x(float p_limit_angular);
- float _get_angular_lo_limit_x() const;
+ void _set_angular_lo_limit_x(real_t p_limit_angular);
+ real_t _get_angular_lo_limit_x() const;
- void _set_angular_lo_limit_y(float p_limit_angular);
- float _get_angular_lo_limit_y() const;
+ void _set_angular_lo_limit_y(real_t p_limit_angular);
+ real_t _get_angular_lo_limit_y() const;
- void _set_angular_lo_limit_z(float p_limit_angular);
- float _get_angular_lo_limit_z() const;
+ void _set_angular_lo_limit_z(real_t p_limit_angular);
+ real_t _get_angular_lo_limit_z() const;
- float params_x[PARAM_MAX];
+ real_t params_x[PARAM_MAX];
bool flags_x[FLAG_MAX];
- float params_y[PARAM_MAX];
+ real_t params_y[PARAM_MAX];
bool flags_y[FLAG_MAX];
- float params_z[PARAM_MAX];
+ real_t params_z[PARAM_MAX];
bool flags_z[FLAG_MAX];
- virtual RID _configure_joint(PhysicsBody3D *body_a, PhysicsBody3D *body_b) override;
+ virtual void _configure_joint(RID p_joint, PhysicsBody3D *body_a, PhysicsBody3D *body_b) override;
static void _bind_methods();
public:
- void set_param_x(Param p_param, float p_value);
- float get_param_x(Param p_param) const;
+ void set_param_x(Param p_param, real_t p_value);
+ real_t get_param_x(Param p_param) const;
- void set_param_y(Param p_param, float p_value);
- float get_param_y(Param p_param) const;
+ void set_param_y(Param p_param, real_t p_value);
+ real_t get_param_y(Param p_param) const;
- void set_param_z(Param p_param, float p_value);
- float get_param_z(Param p_param) const;
+ void set_param_z(Param p_param, real_t p_value);
+ real_t get_param_z(Param p_param) const;
void set_flag_x(Flag p_flag, bool p_enabled);
bool get_flag_x(Flag p_flag) const;
diff --git a/scene/3d/ray_cast_3d.cpp b/scene/3d/ray_cast_3d.cpp
index 0b7c15a023..bfe79f15f5 100644
--- a/scene/3d/ray_cast_3d.cpp
+++ b/scene/3d/ray_cast_3d.cpp
@@ -392,13 +392,4 @@ void RayCast3D::_clear_debug_shape() {
}
RayCast3D::RayCast3D() {
- enabled = true;
- collided = false;
- against_shape = 0;
- collision_mask = 1;
- target_position = Vector3(0, -1, 0);
- debug_shape = nullptr;
- exclude_parent_body = true;
- collide_with_areas = false;
- collide_with_bodies = true;
}
diff --git a/scene/3d/ray_cast_3d.h b/scene/3d/ray_cast_3d.h
index 4109853280..ae92189527 100644
--- a/scene/3d/ray_cast_3d.h
+++ b/scene/3d/ray_cast_3d.h
@@ -36,28 +36,28 @@
class RayCast3D : public Node3D {
GDCLASS(RayCast3D, Node3D);
- bool enabled;
- bool collided;
+ bool enabled = true;
+ bool collided = false;
ObjectID against;
- int against_shape;
+ int against_shape = 0;
Vector3 collision_point;
Vector3 collision_normal;
- Vector3 target_position;
+ Vector3 target_position = Vector3(0, -1, 0);
Set<RID> exclude;
- uint32_t collision_mask;
- bool exclude_parent_body;
+ uint32_t collision_mask = 1;
+ bool exclude_parent_body = true;
- Node *debug_shape;
+ Node *debug_shape = nullptr;
Ref<Material> debug_material;
void _create_debug_shape();
void _update_debug_shape();
void _clear_debug_shape();
- bool collide_with_areas;
- bool collide_with_bodies;
+ bool collide_with_areas = false;
+ bool collide_with_bodies = true;
protected:
void _notification(int p_what);
diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp
index 63fa0c06c3..ad24f39bce 100644
--- a/scene/3d/reflection_probe.cpp
+++ b/scene/3d/reflection_probe.cpp
@@ -42,7 +42,7 @@ float ReflectionProbe::get_intensity() const {
void ReflectionProbe::set_ambient_mode(AmbientMode p_mode) {
ambient_mode = p_mode;
RS::get_singleton()->reflection_probe_set_ambient_mode(probe, RS::ReflectionProbeAmbientMode(p_mode));
- _change_notify();
+ notify_property_list_changed();
}
ReflectionProbe::AmbientMode ReflectionProbe::get_ambient_mode() const {
@@ -95,13 +95,12 @@ void ReflectionProbe::set_extents(const Vector3 &p_extents) {
if (extents[i] - 0.01 < ABS(origin_offset[i])) {
origin_offset[i] = SGN(origin_offset[i]) * (extents[i] - 0.01);
- _change_notify("origin_offset");
}
}
RS::get_singleton()->reflection_probe_set_extents(probe, extents);
RS::get_singleton()->reflection_probe_set_origin_offset(probe, origin_offset);
- _change_notify("extents");
+
update_gizmo();
}
@@ -120,7 +119,6 @@ void ReflectionProbe::set_origin_offset(const Vector3 &p_extents) {
RS::get_singleton()->reflection_probe_set_extents(probe, extents);
RS::get_singleton()->reflection_probe_set_origin_offset(probe, origin_offset);
- _change_notify("origin_offset");
update_gizmo();
}
@@ -257,20 +255,6 @@ void ReflectionProbe::_bind_methods() {
}
ReflectionProbe::ReflectionProbe() {
- intensity = 1.0;
- ambient_mode = AMBIENT_ENVIRONMENT;
- ambient_color = Color(0, 0, 0);
- ambient_color_energy = 1.0;
- max_distance = 0;
- extents = Vector3(1, 1, 1);
- origin_offset = Vector3(0, 0, 0);
- box_projection = false;
- interior = false;
- enable_shadows = false;
- cull_mask = (1 << 20) - 1;
- update_mode = UPDATE_ONCE;
- lod_threshold = 1.0;
-
probe = RenderingServer::get_singleton()->reflection_probe_create();
RS::get_singleton()->instance_set_base(get_instance(), probe);
set_disable_scale(true);
diff --git a/scene/3d/reflection_probe.h b/scene/3d/reflection_probe.h
index a43d4e2422..15c2da3ae0 100644
--- a/scene/3d/reflection_probe.h
+++ b/scene/3d/reflection_probe.h
@@ -53,20 +53,20 @@ public:
private:
RID probe;
- float intensity;
- float max_distance;
- Vector3 extents;
- Vector3 origin_offset;
- bool box_projection;
- bool enable_shadows;
- bool interior;
- AmbientMode ambient_mode;
- Color ambient_color;
- float ambient_color_energy;
- float lod_threshold;
-
- uint32_t cull_mask;
- UpdateMode update_mode;
+ float intensity = 1.0;
+ float max_distance = 0.0;
+ Vector3 extents = Vector3(1, 1, 1);
+ Vector3 origin_offset = Vector3(0, 0, 0);
+ bool box_projection = false;
+ bool enable_shadows = false;
+ bool interior = false;
+ AmbientMode ambient_mode = AMBIENT_ENVIRONMENT;
+ Color ambient_color = Color(0, 0, 0);
+ float ambient_color_energy = 1.0;
+ float lod_threshold = 1.0;
+
+ uint32_t cull_mask = (1 << 20) - 1;
+ UpdateMode update_mode = UPDATE_ONCE;
protected:
static void _bind_methods();
diff --git a/scene/3d/remote_transform_3d.cpp b/scene/3d/remote_transform_3d.cpp
index 4afbb80779..83ac813c53 100644
--- a/scene/3d/remote_transform_3d.cpp
+++ b/scene/3d/remote_transform_3d.cpp
@@ -217,10 +217,5 @@ void RemoteTransform3D::_bind_methods() {
}
RemoteTransform3D::RemoteTransform3D() {
- use_global_coordinates = true;
- update_remote_position = true;
- update_remote_rotation = true;
- update_remote_scale = true;
-
set_notify_transform(true);
}
diff --git a/scene/3d/remote_transform_3d.h b/scene/3d/remote_transform_3d.h
index 3b30c835be..21005d92d1 100644
--- a/scene/3d/remote_transform_3d.h
+++ b/scene/3d/remote_transform_3d.h
@@ -40,10 +40,10 @@ class RemoteTransform3D : public Node3D {
ObjectID cache;
- bool use_global_coordinates;
- bool update_remote_position;
- bool update_remote_rotation;
- bool update_remote_scale;
+ bool use_global_coordinates = true;
+ bool update_remote_position = true;
+ bool update_remote_rotation = true;
+ bool update_remote_scale = true;
void _update_remote();
void _update_cache();
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp
index 5e09a15b80..be62fe801f 100644
--- a/scene/3d/skeleton_3d.cpp
+++ b/scene/3d/skeleton_3d.cpp
@@ -304,7 +304,7 @@ void Skeleton3D::_notification(int p_what) {
uint32_t bind_count = skin->get_bind_count();
if (E->get()->bind_count != bind_count) {
- RS::get_singleton()->skeleton_allocate(skeleton, bind_count);
+ RS::get_singleton()->skeleton_allocate_data(skeleton, bind_count);
E->get()->bind_count = bind_count;
E->get()->skin_bone_indices.resize(bind_count);
E->get()->skin_bone_indices_ptrs = E->get()->skin_bone_indices.ptrw();
@@ -927,10 +927,6 @@ void Skeleton3D::_bind_methods() {
}
Skeleton3D::Skeleton3D() {
- animate_physical_bones = true;
- dirty = false;
- version = 1;
- process_order_dirty = true;
}
Skeleton3D::~Skeleton3D() {
diff --git a/scene/3d/skeleton_3d.h b/scene/3d/skeleton_3d.h
index 73417dce21..9772bfcc95 100644
--- a/scene/3d/skeleton_3d.h
+++ b/scene/3d/skeleton_3d.h
@@ -74,57 +74,44 @@ private:
struct Bone {
String name;
- bool enabled;
- int parent;
- int sort_index; //used for re-sorting process order
+ bool enabled = true;
+ int parent = -1;
+ int sort_index = 0; //used for re-sorting process order
- bool disable_rest;
+ bool disable_rest = false;
Transform rest;
Transform pose;
Transform pose_global;
- bool custom_pose_enable;
+ bool custom_pose_enable = false;
Transform custom_pose;
- float global_pose_override_amount;
- bool global_pose_override_reset;
+ float global_pose_override_amount = 0.0;
+ bool global_pose_override_reset = false;
Transform global_pose_override;
#ifndef _3D_DISABLED
- PhysicalBone3D *physical_bone;
- PhysicalBone3D *cache_parent_physical_bone;
+ PhysicalBone3D *physical_bone = nullptr;
+ PhysicalBone3D *cache_parent_physical_bone = nullptr;
#endif // _3D_DISABLED
List<ObjectID> nodes_bound;
-
- Bone() {
- parent = -1;
- enabled = true;
- disable_rest = false;
- custom_pose_enable = false;
- global_pose_override_amount = 0;
- global_pose_override_reset = false;
-#ifndef _3D_DISABLED
- physical_bone = nullptr;
- cache_parent_physical_bone = nullptr;
-#endif // _3D_DISABLED
- }
};
Set<SkinReference *> skin_bindings;
void _skin_changed();
- bool animate_physical_bones;
+ bool animate_physical_bones = true;
Vector<Bone> bones;
Vector<int> process_order;
- bool process_order_dirty;
+ bool process_order_dirty = true;
void _make_dirty();
- bool dirty;
+ bool dirty = false;
- uint64_t version;
+ uint64_t version = 1;
// bind helpers
Array _get_bound_child_nodes_to_bone(int p_bone) const {
diff --git a/scene/3d/skeleton_ik_3d.h b/scene/3d/skeleton_ik_3d.h
index 557647aa62..eefecf68bb 100644
--- a/scene/3d/skeleton_ik_3d.h
+++ b/scene/3d/skeleton_ik_3d.h
@@ -54,15 +54,13 @@ class FabrikInverseKinematic {
BoneId bone = -1;
PhysicalBone3D *pb = nullptr;
- real_t length = 0;
+ real_t length = 0.0;
/// Positions relative to root bone
Transform initial_transform;
Vector3 current_pos;
// Direction from this bone to child
Vector3 current_ori;
- ChainItem() {}
-
ChainItem *find_child(const BoneId p_bone_id);
ChainItem *add_child(const BoneId p_bone_id);
};
@@ -80,7 +78,7 @@ class FabrikInverseKinematic {
struct Chain {
ChainItem chain_root;
- ChainItem *middle_chain_item;
+ ChainItem *middle_chain_item = nullptr;
Vector<ChainTip> tips;
Vector3 magnet_position;
};
@@ -130,7 +128,7 @@ class SkeletonIK3D : public Node {
StringName root_bone;
StringName tip_bone;
- real_t interpolation = 1;
+ real_t interpolation = 1.0;
Transform target;
NodePath target_node_path_override;
bool override_tip_basis = true;
diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp
index 785465f28e..2d8f22ab37 100644
--- a/scene/3d/soft_body_3d.cpp
+++ b/scene/3d/soft_body_3d.cpp
@@ -245,13 +245,11 @@ bool SoftBody3D::_get_property_pinned_points(int p_item, const String &p_what, V
return true;
}
-void SoftBody3D::_changed_callback(Object *p_changed, const char *p_prop) {
+void SoftBody3D::_softbody_changed() {
prepare_physics_server();
_reset_points_offsets();
#ifdef TOOLS_ENABLED
- if (p_changed == this) {
- update_configuration_warning();
- }
+ update_configuration_warning();
#endif
}
@@ -259,7 +257,9 @@ void SoftBody3D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_WORLD: {
if (Engine::get_singleton()->is_editor_hint()) {
- add_change_receptor(this);
+ // I have no idea what this is supposed to do, it's really weird
+ // leaving for upcoming PK work on physics
+ //add_change_receptor(this);
}
RID space = get_world_3d()->get_space();
@@ -337,8 +337,8 @@ void SoftBody3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_linear_stiffness", "linear_stiffness"), &SoftBody3D::set_linear_stiffness);
ClassDB::bind_method(D_METHOD("get_linear_stiffness"), &SoftBody3D::get_linear_stiffness);
- ClassDB::bind_method(D_METHOD("set_areaAngular_stiffness", "areaAngular_stiffness"), &SoftBody3D::set_areaAngular_stiffness);
- ClassDB::bind_method(D_METHOD("get_areaAngular_stiffness"), &SoftBody3D::get_areaAngular_stiffness);
+ ClassDB::bind_method(D_METHOD("set_angular_stiffness", "angular_stiffness"), &SoftBody3D::set_angular_stiffness);
+ ClassDB::bind_method(D_METHOD("get_angular_stiffness"), &SoftBody3D::get_angular_stiffness);
ClassDB::bind_method(D_METHOD("set_volume_stiffness", "volume_stiffness"), &SoftBody3D::set_volume_stiffness);
ClassDB::bind_method(D_METHOD("get_volume_stiffness"), &SoftBody3D::get_volume_stiffness);
@@ -366,7 +366,7 @@ void SoftBody3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "simulation_precision", PROPERTY_HINT_RANGE, "1,100,1"), "set_simulation_precision", "get_simulation_precision");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "total_mass", PROPERTY_HINT_RANGE, "0.01,10000,1"), "set_total_mass", "get_total_mass");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "linear_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_linear_stiffness", "get_linear_stiffness");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "areaAngular_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_areaAngular_stiffness", "get_areaAngular_stiffness");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_angular_stiffness", "get_angular_stiffness");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volume_stiffness", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_volume_stiffness", "get_volume_stiffness");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "pressure_coefficient"), "set_pressure_coefficient", "get_pressure_coefficient");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_coefficient", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_damping_coefficient", "get_damping_coefficient");
@@ -612,12 +612,12 @@ real_t SoftBody3D::get_linear_stiffness() {
return PhysicsServer3D::get_singleton()->soft_body_get_linear_stiffness(physics_rid);
}
-void SoftBody3D::set_areaAngular_stiffness(real_t p_areaAngular_stiffness) {
- PhysicsServer3D::get_singleton()->soft_body_set_areaAngular_stiffness(physics_rid, p_areaAngular_stiffness);
+void SoftBody3D::set_angular_stiffness(real_t p_angular_stiffness) {
+ PhysicsServer3D::get_singleton()->soft_body_set_angular_stiffness(physics_rid, p_angular_stiffness);
}
-real_t SoftBody3D::get_areaAngular_stiffness() {
- return PhysicsServer3D::get_singleton()->soft_body_get_areaAngular_stiffness(physics_rid);
+real_t SoftBody3D::get_angular_stiffness() {
+ return PhysicsServer3D::get_singleton()->soft_body_get_angular_stiffness(physics_rid);
}
void SoftBody3D::set_volume_stiffness(real_t p_volume_stiffness) {
diff --git a/scene/3d/soft_body_3d.h b/scene/3d/soft_body_3d.h
index d3c5dc022f..6e24a530bd 100644
--- a/scene/3d/soft_body_3d.h
+++ b/scene/3d/soft_body_3d.h
@@ -39,13 +39,13 @@ class SoftBodyRenderingServerHandler {
friend class SoftBody3D;
RID mesh;
- int surface;
+ int surface = 0;
Vector<uint8_t> buffer;
- uint32_t stride;
- uint32_t offset_vertices;
- uint32_t offset_normal;
+ uint32_t stride = 0;
+ uint32_t offset_vertices = 0;
+ uint32_t offset_normal = 0;
- uint8_t *write_buffer;
+ uint8_t *write_buffer = nullptr;
private:
SoftBodyRenderingServerHandler();
@@ -91,13 +91,15 @@ private:
bool pinned_points_cache_dirty = true;
Ref<ArrayMesh> debug_mesh_cache;
- class MeshInstance3D *debug_mesh;
+ class MeshInstance3D *debug_mesh = nullptr;
- bool capture_input_on_drag;
+ bool capture_input_on_drag = false;
bool ray_pickable = true;
void _update_pickable();
+ void _softbody_changed();
+
protected:
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
@@ -107,8 +109,6 @@ protected:
bool _set_property_pinned_points_attachment(int p_item, const String &p_what, const Variant &p_value);
bool _get_property_pinned_points(int p_item, const String &p_what, Variant &r_ret) const;
- virtual void _changed_callback(Object *p_changed, const char *p_prop) override;
-
void _notification(int p_what);
static void _bind_methods();
@@ -149,8 +149,8 @@ public:
void set_linear_stiffness(real_t p_linear_stiffness);
real_t get_linear_stiffness();
- void set_areaAngular_stiffness(real_t p_areaAngular_stiffness);
- real_t get_areaAngular_stiffness();
+ void set_angular_stiffness(real_t p_angular_stiffness);
+ real_t get_angular_stiffness();
void set_volume_stiffness(real_t p_volume_stiffness);
real_t get_volume_stiffness();
diff --git a/scene/3d/spring_arm_3d.cpp b/scene/3d/spring_arm_3d.cpp
index 6812282844..9518b47696 100644
--- a/scene/3d/spring_arm_3d.cpp
+++ b/scene/3d/spring_arm_3d.cpp
@@ -78,11 +78,11 @@ void SpringArm3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin"), "set_margin", "get_margin");
}
-float SpringArm3D::get_length() const {
+real_t SpringArm3D::get_length() const {
return spring_length;
}
-void SpringArm3D::set_length(float p_length) {
+void SpringArm3D::set_length(real_t p_length) {
if (is_inside_tree() && (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_collisions_hint())) {
update_gizmo();
}
@@ -106,11 +106,11 @@ uint32_t SpringArm3D::get_mask() {
return mask;
}
-float SpringArm3D::get_margin() {
+real_t SpringArm3D::get_margin() {
return margin;
}
-void SpringArm3D::set_margin(float p_margin) {
+void SpringArm3D::set_margin(real_t p_margin) {
margin = p_margin;
}
@@ -126,7 +126,7 @@ void SpringArm3D::clear_excluded_objects() {
excluded_objects.clear();
}
-float SpringArm3D::get_hit_length() {
+real_t SpringArm3D::get_hit_length() {
return current_spring_length;
}
@@ -143,7 +143,7 @@ void SpringArm3D::process_spring() {
PhysicsDirectSpaceState3D::RayResult r;
bool intersected = get_world_3d()->get_direct_space_state()->intersect_ray(get_global_transform().origin, get_global_transform().origin + motion, r, excluded_objects, mask);
if (intersected) {
- float dist = get_global_transform().origin.distance_to(r.position);
+ real_t dist = get_global_transform().origin.distance_to(r.position);
dist -= margin;
motion_delta = dist / (spring_length);
}
diff --git a/scene/3d/spring_arm_3d.h b/scene/3d/spring_arm_3d.h
index 4c2d2a54ff..63505ab9d3 100644
--- a/scene/3d/spring_arm_3d.h
+++ b/scene/3d/spring_arm_3d.h
@@ -38,19 +38,19 @@ class SpringArm3D : public Node3D {
Ref<Shape3D> shape;
Set<RID> excluded_objects;
- float spring_length = 1;
- float current_spring_length = 0;
+ real_t spring_length = 1.0;
+ real_t current_spring_length = 0.0;
bool keep_child_basis = false;
uint32_t mask = 1;
- float margin = 0.01;
+ real_t margin = 0.01;
protected:
void _notification(int p_what);
static void _bind_methods();
public:
- void set_length(float p_length);
- float get_length() const;
+ void set_length(real_t p_length);
+ real_t get_length() const;
void set_shape(Ref<Shape3D> p_shape);
Ref<Shape3D> get_shape() const;
void set_mask(uint32_t p_mask);
@@ -58,9 +58,9 @@ public:
void add_excluded_object(RID p_rid);
bool remove_excluded_object(RID p_rid);
void clear_excluded_objects();
- float get_hit_length();
- void set_margin(float p_margin);
- float get_margin();
+ real_t get_hit_length();
+ void set_margin(real_t p_margin);
+ real_t get_margin();
SpringArm3D() {}
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index 3e49750366..cb2df9130f 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -339,24 +339,10 @@ void SpriteBase3D::_bind_methods() {
}
SpriteBase3D::SpriteBase3D() {
- color_dirty = true;
- centered = true;
- hflip = false;
- vflip = false;
- parent_sprite = nullptr;
- pI = nullptr;
-
for (int i = 0; i < FLAG_MAX; i++) {
flags[i] = i == FLAG_TRANSPARENT || i == FLAG_DOUBLE_SIDED;
}
- alpha_cut = ALPHA_CUT_DISABLED;
- billboard_mode = StandardMaterial3D::BILLBOARD_DISABLED;
- axis = Vector3::AXIS_Z;
- pixel_size = 0.01;
- modulate = Color(1, 1, 1, 1);
- pending_update = false;
- opacity = 1.0;
immediate = RenderingServer::get_singleton()->immediate_create();
set_base(immediate);
}
@@ -557,8 +543,6 @@ void Sprite3D::set_frame(int p_frame) {
_queue_update();
- _change_notify("frame");
- _change_notify("frame_coords");
emit_signal(SceneStringNames::get_singleton()->frame_changed);
}
@@ -581,7 +565,7 @@ void Sprite3D::set_vframes(int p_amount) {
ERR_FAIL_COND(p_amount < 1);
vframes = p_amount;
_queue_update();
- _change_notify();
+ notify_property_list_changed();
}
int Sprite3D::get_vframes() const {
@@ -592,7 +576,7 @@ void Sprite3D::set_hframes(int p_amount) {
ERR_FAIL_COND(p_amount < 1);
hframes = p_amount;
_queue_update();
- _change_notify();
+ notify_property_list_changed();
}
int Sprite3D::get_hframes() const {
@@ -904,12 +888,13 @@ void AnimatedSprite3D::_notification(int p_what) {
} else {
frame = fc - 1;
}
+ emit_signal(SceneStringNames::get_singleton()->animation_finished);
} else {
frame++;
}
_queue_update();
- _change_notify("frame");
+ emit_signal(SceneStringNames::get_singleton()->frame_changed);
}
float to_process = MIN(timeout, remaining);
@@ -935,7 +920,7 @@ void AnimatedSprite3D::set_sprite_frames(const Ref<SpriteFrames> &p_frames) {
set_frame(frame);
}
- _change_notify();
+ notify_property_list_changed();
_reset_timeout();
_queue_update();
update_configuration_warning();
@@ -968,7 +953,7 @@ void AnimatedSprite3D::set_frame(int p_frame) {
frame = p_frame;
_reset_timeout();
_queue_update();
- _change_notify("frame");
+
emit_signal(SceneStringNames::get_singleton()->frame_changed);
}
@@ -1004,8 +989,6 @@ Rect2 AnimatedSprite3D::get_item_rect() const {
void AnimatedSprite3D::_res_changed() {
set_frame(frame);
- _change_notify("frame");
- _change_notify("animation");
_queue_update();
}
@@ -1062,7 +1045,7 @@ void AnimatedSprite3D::set_animation(const StringName &p_animation) {
animation = p_animation;
_reset_timeout();
set_frame(0);
- _change_notify();
+ notify_property_list_changed();
_queue_update();
}
@@ -1101,6 +1084,7 @@ void AnimatedSprite3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_frame"), &AnimatedSprite3D::get_frame);
ADD_SIGNAL(MethodInfo("frame_changed"));
+ ADD_SIGNAL(MethodInfo("animation_finished"));
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE, "SpriteFrames"), "set_sprite_frames", "get_sprite_frames");
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "animation"), "set_animation", "get_animation");
@@ -1109,8 +1093,4 @@ void AnimatedSprite3D::_bind_methods() {
}
AnimatedSprite3D::AnimatedSprite3D() {
- frame = 0;
- playing = false;
- animation = "default";
- timeout = 0;
}
diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h
index 3e38d4581e..a9ce2d8eee 100644
--- a/scene/3d/sprite_3d.h
+++ b/scene/3d/sprite_3d.h
@@ -55,32 +55,32 @@ public:
};
private:
- bool color_dirty;
+ bool color_dirty = true;
Color color_accum;
- SpriteBase3D *parent_sprite;
+ SpriteBase3D *parent_sprite = nullptr;
List<SpriteBase3D *> children;
- List<SpriteBase3D *>::Element *pI;
+ List<SpriteBase3D *>::Element *pI = nullptr;
- bool centered;
+ bool centered = true;
Point2 offset;
- bool hflip;
- bool vflip;
+ bool hflip = false;
+ bool vflip = false;
- Color modulate;
- float opacity;
+ Color modulate = Color(1, 1, 1, 1);
+ float opacity = 1.0;
- Vector3::Axis axis;
- float pixel_size;
+ Vector3::Axis axis = Vector3::AXIS_Z;
+ float pixel_size = 0.01;
AABB aabb;
RID immediate;
bool flags[FLAG_MAX];
- AlphaCutMode alpha_cut;
- StandardMaterial3D::BillboardMode billboard_mode;
- bool pending_update;
+ AlphaCutMode alpha_cut = ALPHA_CUT_DISABLED;
+ StandardMaterial3D::BillboardMode billboard_mode = StandardMaterial3D::BILLBOARD_DISABLED;
+ bool pending_update = false;
void _im_update();
void _propagate_color_changed();
@@ -195,16 +195,16 @@ class AnimatedSprite3D : public SpriteBase3D {
GDCLASS(AnimatedSprite3D, SpriteBase3D);
Ref<SpriteFrames> frames;
- bool playing;
- StringName animation;
- int frame;
+ bool playing = false;
+ StringName animation = "default";
+ int frame = 0;
- bool centered;
+ bool centered = true;
- float timeout;
+ float timeout = 0.0;
- bool hflip;
- bool vflip;
+ bool hflip = 1;
+ bool vflip = 1;
Color modulate;
diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp
index 120bbbae43..0d25e2f21f 100644
--- a/scene/3d/vehicle_body_3d.cpp
+++ b/scene/3d/vehicle_body_3d.cpp
@@ -147,77 +147,77 @@ void VehicleWheel3D::_update(PhysicsDirectBodyState3D *s) {
}
}
-void VehicleWheel3D::set_radius(float p_radius) {
+void VehicleWheel3D::set_radius(real_t p_radius) {
m_wheelRadius = p_radius;
update_gizmo();
}
-float VehicleWheel3D::get_radius() const {
+real_t VehicleWheel3D::get_radius() const {
return m_wheelRadius;
}
-void VehicleWheel3D::set_suspension_rest_length(float p_length) {
+void VehicleWheel3D::set_suspension_rest_length(real_t p_length) {
m_suspensionRestLength = p_length;
update_gizmo();
}
-float VehicleWheel3D::get_suspension_rest_length() const {
+real_t VehicleWheel3D::get_suspension_rest_length() const {
return m_suspensionRestLength;
}
-void VehicleWheel3D::set_suspension_travel(float p_length) {
+void VehicleWheel3D::set_suspension_travel(real_t p_length) {
m_maxSuspensionTravelCm = p_length / 0.01;
}
-float VehicleWheel3D::get_suspension_travel() const {
+real_t VehicleWheel3D::get_suspension_travel() const {
return m_maxSuspensionTravelCm * 0.01;
}
-void VehicleWheel3D::set_suspension_stiffness(float p_value) {
+void VehicleWheel3D::set_suspension_stiffness(real_t p_value) {
m_suspensionStiffness = p_value;
}
-float VehicleWheel3D::get_suspension_stiffness() const {
+real_t VehicleWheel3D::get_suspension_stiffness() const {
return m_suspensionStiffness;
}
-void VehicleWheel3D::set_suspension_max_force(float p_value) {
+void VehicleWheel3D::set_suspension_max_force(real_t p_value) {
m_maxSuspensionForce = p_value;
}
-float VehicleWheel3D::get_suspension_max_force() const {
+real_t VehicleWheel3D::get_suspension_max_force() const {
return m_maxSuspensionForce;
}
-void VehicleWheel3D::set_damping_compression(float p_value) {
+void VehicleWheel3D::set_damping_compression(real_t p_value) {
m_wheelsDampingCompression = p_value;
}
-float VehicleWheel3D::get_damping_compression() const {
+real_t VehicleWheel3D::get_damping_compression() const {
return m_wheelsDampingCompression;
}
-void VehicleWheel3D::set_damping_relaxation(float p_value) {
+void VehicleWheel3D::set_damping_relaxation(real_t p_value) {
m_wheelsDampingRelaxation = p_value;
}
-float VehicleWheel3D::get_damping_relaxation() const {
+real_t VehicleWheel3D::get_damping_relaxation() const {
return m_wheelsDampingRelaxation;
}
-void VehicleWheel3D::set_friction_slip(float p_value) {
+void VehicleWheel3D::set_friction_slip(real_t p_value) {
m_frictionSlip = p_value;
}
-float VehicleWheel3D::get_friction_slip() const {
+real_t VehicleWheel3D::get_friction_slip() const {
return m_frictionSlip;
}
-void VehicleWheel3D::set_roll_influence(float p_value) {
+void VehicleWheel3D::set_roll_influence(real_t p_value) {
m_rollInfluence = p_value;
}
-float VehicleWheel3D::get_roll_influence() const {
+real_t VehicleWheel3D::get_roll_influence() const {
return m_rollInfluence;
}
@@ -295,27 +295,27 @@ void VehicleWheel3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping_relaxation"), "set_damping_relaxation", "get_damping_relaxation");
}
-void VehicleWheel3D::set_engine_force(float p_engine_force) {
+void VehicleWheel3D::set_engine_force(real_t p_engine_force) {
m_engineForce = p_engine_force;
}
-float VehicleWheel3D::get_engine_force() const {
+real_t VehicleWheel3D::get_engine_force() const {
return m_engineForce;
}
-void VehicleWheel3D::set_brake(float p_brake) {
+void VehicleWheel3D::set_brake(real_t p_brake) {
m_brake = p_brake;
}
-float VehicleWheel3D::get_brake() const {
+real_t VehicleWheel3D::get_brake() const {
return m_brake;
}
-void VehicleWheel3D::set_steering(float p_steering) {
+void VehicleWheel3D::set_steering(real_t p_steering) {
m_steering = p_steering;
}
-float VehicleWheel3D::get_steering() const {
+real_t VehicleWheel3D::get_steering() const {
return m_steering;
}
@@ -335,39 +335,15 @@ bool VehicleWheel3D::is_used_as_steering() const {
return steers;
}
-float VehicleWheel3D::get_skidinfo() const {
+real_t VehicleWheel3D::get_skidinfo() const {
return m_skidInfo;
}
-float VehicleWheel3D::get_rpm() const {
+real_t VehicleWheel3D::get_rpm() const {
return m_rpm;
}
VehicleWheel3D::VehicleWheel3D() {
- steers = false;
- engine_traction = false;
- m_steering = real_t(0.);
- m_engineForce = real_t(0.);
- m_rotation = real_t(0.);
- m_deltaRotation = real_t(0.);
- m_brake = real_t(0.);
- m_rollInfluence = real_t(0.1);
-
- m_suspensionRestLength = 0.15;
- m_wheelRadius = 0.5; //0.28;
- m_suspensionStiffness = 5.88;
- m_wheelsDampingCompression = 0.83;
- m_wheelsDampingRelaxation = 0.88;
- m_frictionSlip = 10.5;
- m_bIsFrontWheel = false;
- m_maxSuspensionTravelCm = 500;
- m_maxSuspensionForce = 6000;
-
- m_suspensionRelativeVelocity = 0;
- m_clippedInvContactDotSuspension = 1.0;
- m_raycastInfo.m_isInContact = false;
-
- body = nullptr;
}
void VehicleBody3D::_update_wheel_transform(VehicleWheel3D &wheel, PhysicsDirectBodyState3D *s) {
@@ -564,7 +540,7 @@ void VehicleBody3D::_resolve_single_bilateral(PhysicsDirectBodyState3D *s, const
Vector3 vel = vel1 - vel2;
Basis b2trans;
- float b2invmass = 0;
+ real_t b2invmass = 0;
Vector3 b2lv;
Vector3 b2av;
Vector3 b2invinertia; //todo
@@ -622,8 +598,8 @@ VehicleBody3D::btVehicleWheelContactPoint::btVehicleWheelContactPoint(PhysicsDir
m_frictionPositionWorld(frictionPosWorld),
m_frictionDirectionWorld(frictionDirectionWorld),
m_maxImpulse(maxImpulse) {
- float denom0 = 0;
- float denom1 = 0;
+ real_t denom0 = 0;
+ real_t denom1 = 0;
{
Vector3 r0 = frictionPosWorld - s->get_transform().origin;
@@ -831,7 +807,7 @@ void VehicleBody3D::_direct_state_changed(Object *p_state) {
state = Object::cast_to<PhysicsDirectBodyState3D>(p_state);
- float step = state->get_step();
+ real_t step = state->get_step();
for (int i = 0; i < wheels.size(); i++) {
_update_wheel(i, state);
@@ -891,7 +867,7 @@ void VehicleBody3D::_direct_state_changed(Object *p_state) {
state = nullptr;
}
-void VehicleBody3D::set_engine_force(float p_engine_force) {
+void VehicleBody3D::set_engine_force(real_t p_engine_force) {
engine_force = p_engine_force;
for (int i = 0; i < wheels.size(); i++) {
VehicleWheel3D &wheelInfo = *wheels[i];
@@ -901,11 +877,11 @@ void VehicleBody3D::set_engine_force(float p_engine_force) {
}
}
-float VehicleBody3D::get_engine_force() const {
+real_t VehicleBody3D::get_engine_force() const {
return engine_force;
}
-void VehicleBody3D::set_brake(float p_brake) {
+void VehicleBody3D::set_brake(real_t p_brake) {
brake = p_brake;
for (int i = 0; i < wheels.size(); i++) {
VehicleWheel3D &wheelInfo = *wheels[i];
@@ -913,11 +889,11 @@ void VehicleBody3D::set_brake(float p_brake) {
}
}
-float VehicleBody3D::get_brake() const {
+real_t VehicleBody3D::get_brake() const {
return brake;
}
-void VehicleBody3D::set_steering(float p_steering) {
+void VehicleBody3D::set_steering(real_t p_steering) {
m_steeringValue = p_steering;
for (int i = 0; i < wheels.size(); i++) {
VehicleWheel3D &wheelInfo = *wheels[i];
@@ -927,7 +903,7 @@ void VehicleBody3D::set_steering(float p_steering) {
}
}
-float VehicleBody3D::get_steering() const {
+real_t VehicleBody3D::get_steering() const {
return m_steeringValue;
}
@@ -948,16 +924,6 @@ void VehicleBody3D::_bind_methods() {
}
VehicleBody3D::VehicleBody3D() {
- m_pitchControl = 0;
- m_currentVehicleSpeedKmHour = real_t(0.);
- m_steeringValue = real_t(0.);
-
- engine_force = 0;
- brake = 0;
-
- state = nullptr;
- ccd = false;
-
exclude.insert(get_rid());
//PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed");
diff --git a/scene/3d/vehicle_body_3d.h b/scene/3d/vehicle_body_3d.h
index ca7ea6574d..860fa7e3b7 100644
--- a/scene/3d/vehicle_body_3d.h
+++ b/scene/3d/vehicle_body_3d.h
@@ -42,52 +42,52 @@ class VehicleWheel3D : public Node3D {
Transform m_worldTransform;
Transform local_xform;
- bool engine_traction;
- bool steers;
+ bool engine_traction = false;
+ bool steers = false;
Vector3 m_chassisConnectionPointCS; //const
Vector3 m_wheelDirectionCS; //const
Vector3 m_wheelAxleCS; // const or modified by steering
- real_t m_suspensionRestLength;
- real_t m_maxSuspensionTravelCm;
- real_t m_wheelRadius;
+ real_t m_suspensionRestLength = 0.15;
+ real_t m_maxSuspensionTravelCm = 500.0;
+ real_t m_wheelRadius = 0.5;
- real_t m_suspensionStiffness;
- real_t m_wheelsDampingCompression;
- real_t m_wheelsDampingRelaxation;
- real_t m_frictionSlip;
- real_t m_maxSuspensionForce;
- bool m_bIsFrontWheel;
+ real_t m_suspensionStiffness = 5.88;
+ real_t m_wheelsDampingCompression = 0.83;
+ real_t m_wheelsDampingRelaxation = 0.88;
+ real_t m_frictionSlip = 10.5;
+ real_t m_maxSuspensionForce = 6000.0;
+ bool m_bIsFrontWheel = false;
- VehicleBody3D *body;
+ VehicleBody3D *body = nullptr;
//btVector3 m_wheelAxleCS; // const or modified by steering ?
- real_t m_steering;
- real_t m_rotation;
- real_t m_deltaRotation;
- real_t m_rpm;
- real_t m_rollInfluence;
- real_t m_engineForce;
- real_t m_brake;
+ real_t m_steering = 0.0;
+ real_t m_rotation = 0.0;
+ real_t m_deltaRotation = 0.0;
+ real_t m_rpm = 0.0;
+ real_t m_rollInfluence = 0.1;
+ real_t m_engineForce = 0.0;
+ real_t m_brake = 0.0;
- real_t m_clippedInvContactDotSuspension;
- real_t m_suspensionRelativeVelocity;
+ real_t m_clippedInvContactDotSuspension = 1.0;
+ real_t m_suspensionRelativeVelocity = 0.0;
//calculated by suspension
- real_t m_wheelsSuspensionForce;
- real_t m_skidInfo;
+ real_t m_wheelsSuspensionForce = 0.0;
+ real_t m_skidInfo = 0.0;
struct RaycastInfo {
//set by raycaster
Vector3 m_contactNormalWS; //contactnormal
Vector3 m_contactPointWS; //raycast hitpoint
- real_t m_suspensionLength;
+ real_t m_suspensionLength = 0.0;
Vector3 m_hardPointWS; //raycast starting point
Vector3 m_wheelDirectionWS; //direction in worldspace
Vector3 m_wheelAxleWS; // axle in worldspace
- bool m_isInContact;
- PhysicsBody3D *m_groundObject; //could be general void* ptr
+ bool m_isInContact = false;
+ PhysicsBody3D *m_groundObject = nullptr; //could be general void* ptr
} m_raycastInfo;
void _update(PhysicsDirectBodyState3D *s);
@@ -97,29 +97,29 @@ protected:
static void _bind_methods();
public:
- void set_radius(float p_radius);
- float get_radius() const;
+ void set_radius(real_t p_radius);
+ real_t get_radius() const;
- void set_suspension_rest_length(float p_length);
- float get_suspension_rest_length() const;
+ void set_suspension_rest_length(real_t p_length);
+ real_t get_suspension_rest_length() const;
- void set_suspension_travel(float p_length);
- float get_suspension_travel() const;
+ void set_suspension_travel(real_t p_length);
+ real_t get_suspension_travel() const;
- void set_suspension_stiffness(float p_value);
- float get_suspension_stiffness() const;
+ void set_suspension_stiffness(real_t p_value);
+ real_t get_suspension_stiffness() const;
- void set_suspension_max_force(float p_value);
- float get_suspension_max_force() const;
+ void set_suspension_max_force(real_t p_value);
+ real_t get_suspension_max_force() const;
- void set_damping_compression(float p_value);
- float get_damping_compression() const;
+ void set_damping_compression(real_t p_value);
+ real_t get_damping_compression() const;
- void set_damping_relaxation(float p_value);
- float get_damping_relaxation() const;
+ void set_damping_relaxation(real_t p_value);
+ real_t get_damping_relaxation() const;
- void set_friction_slip(float p_value);
- float get_friction_slip() const;
+ void set_friction_slip(real_t p_value);
+ real_t get_friction_slip() const;
void set_use_as_traction(bool p_enable);
bool is_used_as_traction() const;
@@ -129,21 +129,21 @@ public:
bool is_in_contact() const;
- void set_roll_influence(float p_value);
- float get_roll_influence() const;
+ void set_roll_influence(real_t p_value);
+ real_t get_roll_influence() const;
- float get_skidinfo() const;
+ real_t get_skidinfo() const;
- float get_rpm() const;
+ real_t get_rpm() const;
- void set_engine_force(float p_engine_force);
- float get_engine_force() const;
+ void set_engine_force(real_t p_engine_force);
+ real_t get_engine_force() const;
- void set_brake(float p_brake);
- float get_brake() const;
+ void set_brake(real_t p_brake);
+ real_t get_brake() const;
- void set_steering(float p_steering);
- float get_steering() const;
+ void set_steering(real_t p_steering);
+ real_t get_steering() const;
String get_configuration_warning() const override;
@@ -153,12 +153,12 @@ public:
class VehicleBody3D : public RigidBody3D {
GDCLASS(VehicleBody3D, RigidBody3D);
- float engine_force;
- float brake;
+ real_t engine_force = 0.0;
+ real_t brake = 0.0;
- real_t m_pitchControl;
- real_t m_steeringValue;
- real_t m_currentVehicleSpeedKmHour;
+ real_t m_pitchControl = 0.0;
+ real_t m_steeringValue = 0.0;
+ real_t m_currentVehicleSpeedKmHour = 0.0;
Set<RID> exclude;
@@ -168,12 +168,12 @@ class VehicleBody3D : public RigidBody3D {
Vector<real_t> m_sideImpulse;
struct btVehicleWheelContactPoint {
- PhysicsDirectBodyState3D *m_s;
- PhysicsBody3D *m_body1;
+ PhysicsDirectBodyState3D *m_s = nullptr;
+ PhysicsBody3D *m_body1 = nullptr;
Vector3 m_frictionPositionWorld;
Vector3 m_frictionDirectionWorld;
- real_t m_jacDiagABInv;
- real_t m_maxImpulse;
+ real_t m_jacDiagABInv = 0.0;
+ real_t m_maxImpulse = 0.0;
btVehicleWheelContactPoint(PhysicsDirectBodyState3D *s, PhysicsBody3D *body1, const Vector3 &frictionPosWorld, const Vector3 &frictionDirectionWorld, real_t maxImpulse);
};
@@ -195,14 +195,14 @@ class VehicleBody3D : public RigidBody3D {
void _direct_state_changed(Object *p_state) override;
public:
- void set_engine_force(float p_engine_force);
- float get_engine_force() const;
+ void set_engine_force(real_t p_engine_force);
+ real_t get_engine_force() const;
- void set_brake(float p_brake);
- float get_brake() const;
+ void set_brake(real_t p_brake);
+ real_t get_brake() const;
- void set_steering(float p_steering);
- float get_steering() const;
+ void set_steering(real_t p_steering);
+ real_t get_steering() const;
VehicleBody3D();
};
diff --git a/scene/3d/velocity_tracker_3d.cpp b/scene/3d/velocity_tracker_3d.cpp
index 35d00f3639..5b5cc06456 100644
--- a/scene/3d/velocity_tracker_3d.cpp
+++ b/scene/3d/velocity_tracker_3d.cpp
@@ -128,6 +128,4 @@ void VelocityTracker3D::_bind_methods() {
VelocityTracker3D::VelocityTracker3D() {
position_history.resize(4); // should be configurable
- position_history_len = 0;
- physics_step = false;
}
diff --git a/scene/3d/velocity_tracker_3d.h b/scene/3d/velocity_tracker_3d.h
index 3fc89cc7fb..e971f4755a 100644
--- a/scene/3d/velocity_tracker_3d.h
+++ b/scene/3d/velocity_tracker_3d.h
@@ -37,13 +37,13 @@ class VelocityTracker3D : public Reference {
GDCLASS(VelocityTracker3D, Reference);
struct PositionHistory {
- uint64_t frame;
+ uint64_t frame = 0;
Vector3 position;
};
- bool physics_step;
+ bool physics_step = false;
Vector<PositionHistory> position_history;
- int position_history_len;
+ int position_history_len = 0;
protected:
static void _bind_methods();
diff --git a/scene/3d/visibility_notifier_3d.cpp b/scene/3d/visibility_notifier_3d.cpp
index 494709fe84..471838b9d1 100644
--- a/scene/3d/visibility_notifier_3d.cpp
+++ b/scene/3d/visibility_notifier_3d.cpp
@@ -69,7 +69,6 @@ void VisibilityNotifier3D::set_aabb(const AABB &p_aabb) {
get_world_3d()->_update_notifier(this, get_global_transform().xform(aabb));
}
- _change_notify("aabb");
update_gizmo();
}
@@ -80,13 +79,16 @@ AABB VisibilityNotifier3D::get_aabb() const {
void VisibilityNotifier3D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_WORLD: {
- get_world_3d()->_register_notifier(this, get_global_transform().xform(aabb));
+ world = get_world_3d();
+ ERR_FAIL_COND(!world.is_valid());
+ world->_register_notifier(this, get_global_transform().xform(aabb));
} break;
case NOTIFICATION_TRANSFORM_CHANGED: {
- get_world_3d()->_update_notifier(this, get_global_transform().xform(aabb));
+ world->_update_notifier(this, get_global_transform().xform(aabb));
} break;
case NOTIFICATION_EXIT_WORLD: {
- get_world_3d()->_remove_notifier(this);
+ ERR_FAIL_COND(!world.is_valid());
+ world->_remove_notifier(this);
} break;
}
}
@@ -109,7 +111,6 @@ void VisibilityNotifier3D::_bind_methods() {
}
VisibilityNotifier3D::VisibilityNotifier3D() {
- aabb = AABB(Vector3(-1, -1, -1), Vector3(2, 2, 2));
set_notify_transform(true);
}
@@ -249,6 +250,4 @@ VisibilityEnabler3D::VisibilityEnabler3D() {
for (int i = 0; i < ENABLER_MAX; i++) {
enabler[i] = true;
}
-
- visible = false;
}
diff --git a/scene/3d/visibility_notifier_3d.h b/scene/3d/visibility_notifier_3d.h
index 29552510b7..9f7705067f 100644
--- a/scene/3d/visibility_notifier_3d.h
+++ b/scene/3d/visibility_notifier_3d.h
@@ -33,13 +33,15 @@
#include "scene/3d/node_3d.h"
+class World3D;
class Camera3D;
class VisibilityNotifier3D : public Node3D {
GDCLASS(VisibilityNotifier3D, Node3D);
+ Ref<World3D> world;
Set<Camera3D *> cameras;
- AABB aabb;
+ AABB aabb = AABB(Vector3(-1, -1, -1), Vector3(2, 2, 2));
protected:
virtual void _screen_enter() {}
@@ -74,7 +76,7 @@ protected:
virtual void _screen_enter() override;
virtual void _screen_exit() override;
- bool visible;
+ bool visible = false;
void _find_nodes(Node *p_node);
diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp
index 1d0a830383..394c67e873 100644
--- a/scene/3d/visual_instance_3d.cpp
+++ b/scene/3d/visual_instance_3d.cpp
@@ -43,7 +43,6 @@ void VisualInstance3D::_update_visibility() {
return;
}
- _change_notify("visible");
RS::get_singleton()->instance_set_visible(get_instance(), is_visible_in_tree());
}
@@ -135,7 +134,6 @@ RID VisualInstance3D::get_base() const {
VisualInstance3D::VisualInstance3D() {
instance = RenderingServer::get_singleton()->instance_create();
RenderingServer::get_singleton()->instance_attach_object_instance_id(instance, get_instance_id());
- layers = 1;
set_notify_transform(true);
}
@@ -371,7 +369,7 @@ void GeometryInstance3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_gi_mode", "mode"), &GeometryInstance3D::set_gi_mode);
ClassDB::bind_method(D_METHOD("get_gi_mode"), &GeometryInstance3D::get_gi_mode);
- ClassDB::bind_method(D_METHOD("set_lod_bias", "p_bias"), &GeometryInstance3D::set_lod_bias);
+ ClassDB::bind_method(D_METHOD("set_lod_bias", "bias"), &GeometryInstance3D::set_lod_bias);
ClassDB::bind_method(D_METHOD("get_lod_bias"), &GeometryInstance3D::get_lod_bias);
ClassDB::bind_method(D_METHOD("set_custom_aabb", "aabb"), &GeometryInstance3D::set_custom_aabb);
@@ -412,17 +410,5 @@ void GeometryInstance3D::_bind_methods() {
}
GeometryInstance3D::GeometryInstance3D() {
- lod_min_distance = 0;
- lod_max_distance = 0;
- lod_min_hysteresis = 0;
- lod_max_hysteresis = 0;
-
- lod_bias = 1.0;
-
- gi_mode = GI_MODE_DISABLED;
- lightmap_scale = LIGHTMAP_SCALE_1X;
-
- shadow_casting_setting = SHADOW_CASTING_SETTING_ON;
- extra_cull_margin = 0;
//RS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),0);
}
diff --git a/scene/3d/visual_instance_3d.h b/scene/3d/visual_instance_3d.h
index f370f29cb0..7fed8095ef 100644
--- a/scene/3d/visual_instance_3d.h
+++ b/scene/3d/visual_instance_3d.h
@@ -42,7 +42,7 @@ class VisualInstance3D : public Node3D {
RID base;
RID instance;
- uint32_t layers;
+ uint32_t layers = 1;
RID _get_visual_instance_rid() const;
@@ -105,21 +105,21 @@ public:
};
private:
- ShadowCastingSetting shadow_casting_setting;
+ ShadowCastingSetting shadow_casting_setting = SHADOW_CASTING_SETTING_ON;
Ref<Material> material_override;
- float lod_min_distance;
- float lod_max_distance;
- float lod_min_hysteresis;
- float lod_max_hysteresis;
+ float lod_min_distance = 0.0;
+ float lod_max_distance = 0.0;
+ float lod_min_hysteresis = 0.0;
+ float lod_max_hysteresis = 0.0;
- float lod_bias;
+ float lod_bias = 1.0;
mutable HashMap<StringName, Variant> instance_uniforms;
mutable HashMap<StringName, StringName> instance_uniform_property_remap;
- float extra_cull_margin;
- LightmapScale lightmap_scale;
- GIMode gi_mode;
+ float extra_cull_margin = 0.0;
+ LightmapScale lightmap_scale = LIGHTMAP_SCALE_1X;
+ GIMode gi_mode = GI_MODE_DISABLED;
const StringName *_instance_uniform_get_remap(const StringName p_name) const;
diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp
index b99d753dde..17c8596e8f 100644
--- a/scene/3d/voxelizer.cpp
+++ b/scene/3d/voxelizer.cpp
@@ -1007,7 +1007,4 @@ Transform Voxelizer::get_to_cell_space_xform() const {
}
Voxelizer::Voxelizer() {
- sorted = false;
- color_scan_cell_width = 4;
- bake_texture_size = 128;
}
diff --git a/scene/3d/voxelizer.h b/scene/3d/voxelizer.h
index a0b581d625..87f949e7db 100644
--- a/scene/3d/voxelizer.h
+++ b/scene/3d/voxelizer.h
@@ -44,35 +44,25 @@ private:
struct Cell {
uint32_t children[8];
- float albedo[3]; //albedo in RGB24
- float emission[3]; //accumulated light in 16:16 fixed point (needs to be integer for moving lights fast)
- float normal[3];
- uint32_t used_sides;
- float alpha; //used for upsampling
- uint16_t x;
- uint16_t y;
- uint16_t z;
- uint16_t level;
+ float albedo[3] = {}; //albedo in RGB24
+ float emission[3] = {}; //accumulated light in 16:16 fixed point (needs to be integer for moving lights fast)
+ float normal[3] = {};
+ uint32_t used_sides = 0;
+ float alpha = 0.0; //used for upsampling
+ uint16_t x = 0;
+ uint16_t y = 0;
+ uint16_t z = 0;
+ uint16_t level = 0;
Cell() {
for (int i = 0; i < 8; i++) {
children[i] = CHILD_EMPTY;
}
-
- for (int i = 0; i < 3; i++) {
- emission[i] = 0;
- albedo[i] = 0;
- normal[i] = 0;
- }
- alpha = 0;
- used_sides = 0;
- x = y = z = 0;
- level = 0;
}
};
Vector<Cell> bake_cells;
- int cell_subdiv;
+ int cell_subdiv = 0;
struct CellSort {
union {
@@ -82,10 +72,10 @@ private:
uint64_t x : 16;
uint64_t level : 16;
};
- uint64_t key;
+ uint64_t key = 0;
};
- int32_t index;
+ int32_t index = 0;
_FORCE_INLINE_ bool operator<(const CellSort &p_cell_sort) const {
return key < p_cell_sort.key;
@@ -101,16 +91,16 @@ private:
Map<Ref<Material>, MaterialCache> material_cache;
AABB original_bounds;
AABB po2_bounds;
- int axis_cell_size[3];
+ int axis_cell_size[3] = {};
Transform to_cell_space;
- int color_scan_cell_width;
- int bake_texture_size;
- float cell_size;
+ int color_scan_cell_width = 4;
+ int bake_texture_size = 128;
+ float cell_size = 0.0;
- int max_original_cells;
- int leaf_voxel_count;
+ int max_original_cells = 0;
+ int leaf_voxel_count = 0;
Vector<Color> _get_bake_texture(Ref<Image> p_image, const Color &p_color_mul, const Color &p_color_add);
MaterialCache _get_material_cache(Ref<Material> p_material);
@@ -119,7 +109,7 @@ private:
void _fixup_plot(int p_idx, int p_level);
void _debug_mesh(int p_idx, int p_level, const AABB &p_aabb, Ref<MultiMesh> &p_multimesh, int &idx);
- bool sorted;
+ bool sorted = false;
void _sort();
public:
diff --git a/scene/animation/animation_blend_space_1d.cpp b/scene/animation/animation_blend_space_1d.cpp
index 41e1318b1f..15f562242f 100644
--- a/scene/animation/animation_blend_space_1d.cpp
+++ b/scene/animation/animation_blend_space_1d.cpp
@@ -311,14 +311,6 @@ AnimationNodeBlendSpace1D::AnimationNodeBlendSpace1D() {
for (int i = 0; i < MAX_BLEND_POINTS; i++) {
blend_points[i].name = itos(i);
}
- blend_points_used = 0;
- max_space = 1;
- min_space = -1;
-
- snap = 0.1;
- value_label = "value";
-
- blend_position = "blend_position";
}
AnimationNodeBlendSpace1D::~AnimationNodeBlendSpace1D() {
diff --git a/scene/animation/animation_blend_space_1d.h b/scene/animation/animation_blend_space_1d.h
index 6edbc4e319..8886e6c679 100644
--- a/scene/animation/animation_blend_space_1d.h
+++ b/scene/animation/animation_blend_space_1d.h
@@ -43,24 +43,24 @@ class AnimationNodeBlendSpace1D : public AnimationRootNode {
struct BlendPoint {
StringName name;
Ref<AnimationRootNode> node;
- float position;
+ float position = 0.0;
};
BlendPoint blend_points[MAX_BLEND_POINTS];
- int blend_points_used;
+ int blend_points_used = 0;
- float max_space;
- float min_space;
+ float max_space = 1.0;
+ float min_space = -1.0;
- float snap;
+ float snap = 0.1;
- String value_label;
+ String value_label = "value";
void _add_blend_point(int p_index, const Ref<AnimationRootNode> &p_node);
void _tree_changed();
- StringName blend_position;
+ StringName blend_position = "blend_position";
protected:
virtual void _validate_property(PropertyInfo &property) const override;
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index c32cc82bd8..9c4bc107dd 100644
--- a/scene/animation/animation_blend_space_2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -437,7 +437,7 @@ float AnimationNodeBlendSpace2D::process(float p_time, bool p_seek) {
Vector2 blend_pos = get_parameter(blend_position);
int closest = get_parameter(this->closest);
float length_internal = get_parameter(this->length_internal);
- float mind = 0; //time of min distance point
+ float mind = 0.0; //time of min distance point
if (blend_mode == BLEND_MODE_INTERPOLATED) {
if (triangles.size() == 0) {
@@ -529,7 +529,7 @@ float AnimationNodeBlendSpace2D::process(float p_time, bool p_seek) {
}
if (new_closest != closest && new_closest != -1) {
- float from = 0;
+ float from = 0.0;
if (blend_mode == BLEND_MODE_DISCRETE_CARRY && closest != -1) {
//see how much animation remains
from = blend_node(blend_points[closest].name, blend_points[closest].node, p_time, true, 0.0, FILTER_IGNORE, false) - length_internal;
@@ -665,18 +665,6 @@ AnimationNodeBlendSpace2D::AnimationNodeBlendSpace2D() {
for (int i = 0; i < MAX_BLEND_POINTS; i++) {
blend_points[i].name = itos(i);
}
- auto_triangles = true;
- blend_points_used = 0;
- max_space = Vector2(1, 1);
- min_space = Vector2(-1, -1);
- snap = Vector2(0.1, 0.1);
- x_label = "x";
- y_label = "y";
- trianges_dirty = false;
- blend_position = "blend_position";
- closest = "closest";
- length_internal = "length_internal";
- blend_mode = BLEND_MODE_INTERPOLATED;
}
AnimationNodeBlendSpace2D::~AnimationNodeBlendSpace2D() {
diff --git a/scene/animation/animation_blend_space_2d.h b/scene/animation/animation_blend_space_2d.h
index c74afcb8ce..65d09a550d 100644
--- a/scene/animation/animation_blend_space_2d.h
+++ b/scene/animation/animation_blend_space_2d.h
@@ -55,23 +55,23 @@ protected:
};
BlendPoint blend_points[MAX_BLEND_POINTS];
- int blend_points_used;
+ int blend_points_used = 0;
struct BlendTriangle {
- int points[3];
+ int points[3] = {};
};
Vector<BlendTriangle> triangles;
- StringName blend_position;
- StringName closest;
- StringName length_internal;
- Vector2 max_space;
- Vector2 min_space;
- Vector2 snap;
- String x_label;
- String y_label;
- BlendMode blend_mode;
+ StringName blend_position = "blend_position";
+ StringName closest = "closest";
+ StringName length_internal = "length_internal";
+ Vector2 max_space = Vector2(1, 1);
+ Vector2 min_space = Vector2(-1, -1);
+ Vector2 snap = Vector2(0.1, 0.1);
+ String x_label = "x";
+ String y_label = "y";
+ BlendMode blend_mode = BLEND_MODE_INTERPOLATED;
void _add_blend_point(int p_index, const Ref<AnimationRootNode> &p_node);
void _set_triangles(const Vector<int> &p_triangles);
@@ -79,8 +79,8 @@ protected:
void _blend_triangle(const Vector2 &p_pos, const Vector2 *p_points, float *r_weights);
- bool auto_triangles;
- bool trianges_dirty;
+ bool auto_triangles = true;
+ bool trianges_dirty = false;
void _update_triangles();
void _queue_auto_triangles();
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp
index 24ae01e9d8..79a1dc1ac0 100644
--- a/scene/animation/animation_blend_tree.cpp
+++ b/scene/animation/animation_blend_tree.cpp
@@ -34,7 +34,6 @@
void AnimationNodeAnimation::set_animation(const StringName &p_name) {
animation = p_name;
- _change_notify("animation");
}
StringName AnimationNodeAnimation::get_animation() const {
@@ -125,9 +124,6 @@ void AnimationNodeAnimation::_bind_methods() {
}
AnimationNodeAnimation::AnimationNodeAnimation() {
- last_version = 0;
- skip = false;
- time = "time";
}
////////////////////////////////////////////////////////
@@ -346,21 +342,6 @@ void AnimationNodeOneShot::_bind_methods() {
AnimationNodeOneShot::AnimationNodeOneShot() {
add_input("in");
add_input("shot");
-
- fade_in = 0.1;
- fade_out = 0.1;
- autorestart = false;
- autorestart_delay = 1;
- autorestart_random_delay = 0;
-
- mix = MIX_MODE_BLEND;
- sync = false;
-
- active = "active";
- prev_active = "prev_active";
- time = "time";
- remaining = "remaining";
- time_to_restart = "time_to_restart";
}
////////////////////////////////////////////////
@@ -405,10 +386,8 @@ void AnimationNodeAdd2::_bind_methods() {
}
AnimationNodeAdd2::AnimationNodeAdd2() {
- add_amount = "add_amount";
add_input("in");
add_input("add");
- sync = false;
}
////////////////////////////////////////////////
@@ -454,11 +433,9 @@ void AnimationNodeAdd3::_bind_methods() {
}
AnimationNodeAdd3::AnimationNodeAdd3() {
- add_amount = "add_amount";
add_input("-add");
add_input("in");
add_input("+add");
- sync = false;
}
/////////////////////////////////////////////
@@ -504,10 +481,8 @@ void AnimationNodeBlend2::_bind_methods() {
}
AnimationNodeBlend2::AnimationNodeBlend2() {
- blend_amount = "blend_amount";
add_input("in");
add_input("blend");
- sync = false;
}
//////////////////////////////////////
@@ -583,7 +558,6 @@ void AnimationNodeTimeScale::_bind_methods() {
}
AnimationNodeTimeScale::AnimationNodeTimeScale() {
- scale = "scale";
add_input("in");
}
@@ -608,7 +582,6 @@ float AnimationNodeTimeSeek::process(float p_time, bool p_seek) {
} else if (seek_pos >= 0) {
float ret = blend_input(0, seek_pos, true, 1.0, FILTER_IGNORE, false);
set_parameter(this->seek_pos, -1.0); //reset
- _change_notify("seek_pos");
return ret;
} else {
return blend_input(0, p_time, false, 1.0, FILTER_IGNORE, false);
@@ -620,7 +593,6 @@ void AnimationNodeTimeSeek::_bind_methods() {
AnimationNodeTimeSeek::AnimationNodeTimeSeek() {
add_input("in");
- seek_pos = "seek_position";
}
/////////////////////////////////////////////////
@@ -728,7 +700,7 @@ float AnimationNodeTransition::process(float p_time, bool p_seek) {
return 0;
}
- float rem = 0;
+ float rem = 0.0;
if (prev < 0) { // process current animation, check for transition
@@ -811,16 +783,7 @@ void AnimationNodeTransition::_bind_methods() {
}
AnimationNodeTransition::AnimationNodeTransition() {
- prev_xfading = "prev_xfading";
- prev = "prev";
- time = "time";
- current = "current";
- prev_current = "prev_current";
- xfade = 0.0;
-
- enabled_inputs = 0;
for (int i = 0; i < MAX_INPUTS; i++) {
- inputs[i].auto_advance = false;
inputs[i].name = "state " + itos(i);
}
}
@@ -1158,6 +1121,13 @@ void AnimationNodeBlendTree::_get_property_list(List<PropertyInfo> *p_list) cons
p_list->push_back(PropertyInfo(Variant::ARRAY, "node_connections", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
}
+void AnimationNodeBlendTree::reset_state() {
+ graph_offset = Vector2();
+ nodes.clear();
+ emit_changed();
+ emit_signal("tree_changed");
+}
+
void AnimationNodeBlendTree::_tree_changed() {
emit_signal("tree_changed");
}
diff --git a/scene/animation/animation_blend_tree.h b/scene/animation/animation_blend_tree.h
index 45a9f2e7e1..d82658c8c2 100644
--- a/scene/animation/animation_blend_tree.h
+++ b/scene/animation/animation_blend_tree.h
@@ -37,10 +37,10 @@ class AnimationNodeAnimation : public AnimationRootNode {
GDCLASS(AnimationNodeAnimation, AnimationRootNode);
StringName animation;
- StringName time;
+ StringName time = "time";
- uint64_t last_version;
- bool skip;
+ uint64_t last_version = 0;
+ bool skip = false;
protected:
void _validate_property(PropertyInfo &property) const override;
@@ -71,26 +71,26 @@ public:
};
private:
- float fade_in;
- float fade_out;
+ float fade_in = 0.1;
+ float fade_out = 0.1;
- bool autorestart;
- float autorestart_delay;
- float autorestart_random_delay;
- MixMode mix;
+ bool autorestart = false;
+ float autorestart_delay = 1.0;
+ float autorestart_random_delay = 0.0;
+ MixMode mix = MIX_MODE_BLEND;
- bool sync;
+ bool sync = false;
/* bool active;
bool do_start;
float time;
float remaining;*/
- StringName active;
- StringName prev_active;
- StringName time;
- StringName remaining;
- StringName time_to_restart;
+ StringName active = "active";
+ StringName prev_active = "prev_active";
+ StringName time = "time";
+ StringName remaining = "remaining";
+ StringName time_to_restart = "time_to_restart";
protected:
static void _bind_methods();
@@ -132,8 +132,8 @@ VARIANT_ENUM_CAST(AnimationNodeOneShot::MixMode)
class AnimationNodeAdd2 : public AnimationNode {
GDCLASS(AnimationNodeAdd2, AnimationNode);
- StringName add_amount;
- bool sync;
+ StringName add_amount = "add_amount";
+ bool sync = false;
protected:
static void _bind_methods();
@@ -156,8 +156,8 @@ public:
class AnimationNodeAdd3 : public AnimationNode {
GDCLASS(AnimationNodeAdd3, AnimationNode);
- StringName add_amount;
- bool sync;
+ StringName add_amount = "add_amount";
+ bool sync = false;
protected:
static void _bind_methods();
@@ -180,8 +180,8 @@ public:
class AnimationNodeBlend2 : public AnimationNode {
GDCLASS(AnimationNodeBlend2, AnimationNode);
- StringName blend_amount;
- bool sync;
+ StringName blend_amount = "blend_amount";
+ bool sync = false;
protected:
static void _bind_methods();
@@ -225,7 +225,7 @@ public:
class AnimationNodeTimeScale : public AnimationNode {
GDCLASS(AnimationNodeTimeScale, AnimationNode);
- StringName scale;
+ StringName scale = "scale";
protected:
static void _bind_methods();
@@ -244,7 +244,7 @@ public:
class AnimationNodeTimeSeek : public AnimationNode {
GDCLASS(AnimationNodeTimeSeek, AnimationNode);
- StringName seek_pos;
+ StringName seek_pos = "seek_position";
protected:
static void _bind_methods();
@@ -268,12 +268,11 @@ class AnimationNodeTransition : public AnimationNode {
};
struct InputData {
String name;
- bool auto_advance;
- InputData() { auto_advance = false; }
+ bool auto_advance = false;
};
InputData inputs[MAX_INPUTS];
- int enabled_inputs;
+ int enabled_inputs = 0;
/*
float prev_xfading;
@@ -282,13 +281,13 @@ class AnimationNodeTransition : public AnimationNode {
int current;
int prev_current; */
- StringName prev_xfading;
- StringName prev;
- StringName time;
- StringName current;
- StringName prev_current;
+ StringName prev_xfading = "prev_xfading";
+ StringName prev = "prev";
+ StringName time = "time";
+ StringName current = "current";
+ StringName prev_current = "prev_current";
- float xfade;
+ float xfade = 0.0;
void _update_inputs();
@@ -352,6 +351,8 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ virtual void reset_state() override;
+
public:
enum ConnectionError {
CONNECTION_OK,
@@ -381,7 +382,7 @@ public:
struct NodeConnection {
StringName input_node;
- int input_index;
+ int input_index = 0;
StringName output_node;
};
diff --git a/scene/animation/animation_cache.cpp b/scene/animation/animation_cache.cpp
index 6ef2da6977..689acdd57b 100644
--- a/scene/animation/animation_cache.cpp
+++ b/scene/animation/animation_cache.cpp
@@ -308,7 +308,4 @@ void AnimationCache::set_root(Node *p_root) {
}
AnimationCache::AnimationCache() {
- root = nullptr;
- cache_dirty = true;
- cache_valid = false;
}
diff --git a/scene/animation/animation_cache.h b/scene/animation/animation_cache.h
index 484b710b06..07c9d09ae0 100644
--- a/scene/animation/animation_cache.h
+++ b/scene/animation/animation_cache.h
@@ -39,31 +39,23 @@ class AnimationCache : public Object {
struct Path {
RES resource;
- Object *object;
- Skeleton3D *skeleton; // haxor
- Node *node;
- Node3D *spatial;
+ Object *object = nullptr;
+ Skeleton3D *skeleton = nullptr; // haxor
+ Node *node = nullptr;
+ Node3D *spatial = nullptr;
- int bone_idx;
+ int bone_idx = -1;
Vector<StringName> subpath;
- bool valid;
- Path() {
- object = nullptr;
- skeleton = nullptr;
- node = nullptr;
- bone_idx = -1;
- valid = false;
- spatial = nullptr;
- }
+ bool valid = false;
};
Set<Node *> connected_nodes;
Vector<Path> path_cache;
- Node *root;
+ Node *root = nullptr;
Ref<Animation> animation;
- bool cache_dirty;
- bool cache_valid;
+ bool cache_dirty = true;
+ bool cache_valid = false;
void _node_exit_tree(Node *p_node);
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index ef9f531f04..71de3635f9 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -130,11 +130,6 @@ void AnimationNodeStateMachineTransition::_bind_methods() {
}
AnimationNodeStateMachineTransition::AnimationNodeStateMachineTransition() {
- switch_mode = SWITCH_MODE_IMMEDIATE;
- auto_advance = false;
- xfade = 0;
- disabled = false;
- priority = 1;
}
////////////////////////////////////////////////////////
@@ -398,7 +393,7 @@ float AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_st
//find next
StringName next;
- float next_xfade = 0;
+ float next_xfade = 0.0;
AnimationNodeStateMachineTransition::SwitchMode switch_mode = AnimationNodeStateMachineTransition::SWITCH_MODE_IMMEDIATE;
if (path.size()) {
@@ -502,16 +497,6 @@ void AnimationNodeStateMachinePlayback::_bind_methods() {
AnimationNodeStateMachinePlayback::AnimationNodeStateMachinePlayback() {
set_local_to_scene(true); //only one per instanced scene
-
- playing = false;
- len_current = 0;
- fading_time = 0;
- stop_request = false;
- len_total = 0.0;
- pos_current = 0.0;
- loops_current = 0;
- fading_pos = 0.0;
- start_request_travel = false;
}
///////////////////////////////////////////////////////
@@ -929,6 +914,18 @@ void AnimationNodeStateMachine::_get_property_list(List<PropertyInfo> *p_list) c
p_list->push_back(PropertyInfo(Variant::VECTOR2, "graph_offset", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR));
}
+void AnimationNodeStateMachine::reset_state() {
+ states.clear();
+ transitions.clear();
+ playback = "playback";
+ start_node = StringName();
+ end_node = StringName();
+ graph_offset = Vector2();
+
+ emit_changed();
+ emit_signal("tree_changed");
+}
+
void AnimationNodeStateMachine::set_node_position(const StringName &p_name, const Vector2 &p_position) {
ERR_FAIL_COND(!states.has(p_name));
states[p_name].position = p_position;
@@ -975,5 +972,4 @@ void AnimationNodeStateMachine::_bind_methods() {
}
AnimationNodeStateMachine::AnimationNodeStateMachine() {
- playback = "playback";
}
diff --git a/scene/animation/animation_node_state_machine.h b/scene/animation/animation_node_state_machine.h
index daeb2fabaa..9c1bca63c3 100644
--- a/scene/animation/animation_node_state_machine.h
+++ b/scene/animation/animation_node_state_machine.h
@@ -44,13 +44,13 @@ public:
};
private:
- SwitchMode switch_mode;
- bool auto_advance;
+ SwitchMode switch_mode = SWITCH_MODE_IMMEDIATE;
+ bool auto_advance = false;
StringName advance_condition;
StringName advance_condition_name;
- float xfade;
- bool disabled;
- int priority;
+ float xfade = 0.0;
+ bool disabled = false;
+ int priority = 1;
protected:
static void _bind_methods();
@@ -89,28 +89,28 @@ class AnimationNodeStateMachinePlayback : public Resource {
friend class AnimationNodeStateMachine;
struct AStarCost {
- float distance;
+ float distance = 0.0;
StringName prev;
};
- float len_total;
+ float len_total = 0.0;
- float len_current;
- float pos_current;
- int loops_current;
+ float len_current = 0.0;
+ float pos_current = 0.0;
+ int loops_current = 0;
StringName current;
StringName fading_from;
- float fading_time;
- float fading_pos;
+ float fading_time = 0.0;
+ float fading_pos = 0.0;
Vector<StringName> path;
- bool playing;
+ bool playing = false;
StringName start_request;
- bool start_request_travel;
- bool stop_request;
+ bool start_request_travel = false;
+ bool stop_request = false;
bool _travel(AnimationNodeStateMachine *p_state_machine, const StringName &p_travel);
@@ -154,7 +154,7 @@ private:
Vector<Transition> transitions;
- StringName playback;
+ StringName playback = "playback";
StringName start_node;
StringName end_node;
@@ -171,6 +171,8 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ virtual void reset_state() override;
+
public:
virtual void get_parameter_list(List<PropertyInfo> *r_list) const override;
virtual Variant get_parameter_default_value(const StringName &p_parameter) const override;
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 8e50c733ae..c6fa55b76e 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -229,13 +229,13 @@ void AnimationPlayer::_notification(int p_what) {
}
}
-void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim) {
+void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim, Node *p_root_override) {
// Already cached?
if (p_anim->node_cache.size() == p_anim->animation->get_track_count()) {
return;
}
- Node *parent = get_node(root);
+ Node *parent = p_root_override ? p_root_override : get_node(root);
ERR_FAIL_COND(!parent);
@@ -969,7 +969,7 @@ Error AnimationPlayer::add_animation(const StringName &p_name, const Ref<Animati
}
_ref_anim(p_animation);
- _change_notify();
+ notify_property_list_changed();
return OK;
}
@@ -981,7 +981,7 @@ void AnimationPlayer::remove_animation(const StringName &p_name) {
animation_set.erase(p_name);
clear_caches();
- _change_notify();
+ notify_property_list_changed();
}
void AnimationPlayer::_ref_anim(const Ref<Animation> &p_anim) {
@@ -1039,7 +1039,7 @@ void AnimationPlayer::rename_animation(const StringName &p_name, const StringNam
}
clear_caches();
- _change_notify();
+ notify_property_list_changed();
}
bool AnimationPlayer::has_animation(const StringName &p_name) const {
@@ -1132,7 +1132,7 @@ void AnimationPlayer::play(const StringName &p_name, float p_custom_blend, float
Playback &c = playback;
if (c.current.from) {
- float blend_time = 0;
+ float blend_time = 0.0;
// find if it can blend
BlendKey bk;
bk.from = c.current.from->name;
@@ -1497,13 +1497,13 @@ void AnimationPlayer::get_argument_options(const StringName &p_function, int p_i
}
#ifdef TOOLS_ENABLED
-Ref<AnimatedValuesBackup> AnimationPlayer::backup_animated_values() {
+Ref<AnimatedValuesBackup> AnimationPlayer::backup_animated_values(Node *p_root_override) {
Ref<AnimatedValuesBackup> backup;
if (!playback.current.from) {
return backup;
}
- _ensure_node_caches(playback.current.from);
+ _ensure_node_caches(playback.current.from, p_root_override);
backup.instance();
for (int i = 0; i < playback.current.from->node_cache.size(); i++) {
@@ -1560,10 +1560,11 @@ Ref<AnimatedValuesBackup> AnimationPlayer::apply_reset(bool p_user_initiated) {
AnimationPlayer *aux_player = memnew(AnimationPlayer);
EditorNode::get_singleton()->add_child(aux_player);
- aux_player->set_root(aux_player->get_path_to(root_node));
aux_player->add_animation("RESET", reset_anim);
aux_player->set_assigned_animation("RESET");
- Ref<AnimatedValuesBackup> old_values = aux_player->backup_animated_values();
+ // Forcing the use of the original root because the scene where original player belongs may be not the active one
+ Node *root = get_node(get_root());
+ Ref<AnimatedValuesBackup> old_values = aux_player->backup_animated_values(root);
aux_player->seek(0.0f, true);
aux_player->queue_delete();
@@ -1677,23 +1678,7 @@ void AnimationPlayer::_bind_methods() {
}
AnimationPlayer::AnimationPlayer() {
- accum_pass = 1;
- cache_update_size = 0;
- cache_update_prop_size = 0;
- cache_update_bezier_size = 0;
- speed_scale = 1;
- end_reached = false;
- end_notify = false;
- reset_on_save = true;
- animation_process_mode = ANIMATION_PROCESS_IDLE;
- method_call_mode = ANIMATION_METHOD_CALL_DEFERRED;
- processing = false;
- default_blend_time = 0;
root = SceneStringNames::get_singleton()->path_pp;
- playing = false;
- active = true;
- playback.seeked = false;
- playback.started = false;
}
AnimationPlayer::~AnimationPlayer() {
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index 4532825f5a..f2774cb395 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -41,9 +41,9 @@ class AnimatedValuesBackup : public Reference {
GDCLASS(AnimatedValuesBackup, Reference);
struct Entry {
- Object *object;
+ Object *object = nullptr;
Vector<StringName> subpath; // Unused if bone
- int bone_idx; // -1 if not a bone
+ int bone_idx = -1; // -1 if not a bone
Variant value;
};
Vector<Entry> entries;
@@ -118,8 +118,6 @@ private:
Variant value_accum;
uint64_t accum_pass = 0;
Variant capture;
-
- PropertyAnim() {}
};
Map<StringName, PropertyAnim> property_anim;
@@ -130,8 +128,6 @@ private:
float bezier_accum = 0.0;
Object *object = nullptr;
uint64_t accum_pass = 0;
-
- BezierAnim() {}
};
Map<StringName, BezierAnim> bezier_anim;
@@ -141,7 +137,7 @@ private:
struct TrackNodeCacheKey {
ObjectID id;
- int bone_idx;
+ int bone_idx = -1;
inline bool operator<(const TrackNodeCacheKey &p_right) const {
if (id == p_right.id) {
@@ -155,16 +151,16 @@ private:
Map<TrackNodeCacheKey, TrackNodeCache> node_cache_map;
TrackNodeCache *cache_update[NODE_CACHE_UPDATE_MAX];
- int cache_update_size;
+ int cache_update_size = 0;
TrackNodeCache::PropertyAnim *cache_update_prop[NODE_CACHE_UPDATE_MAX];
- int cache_update_prop_size;
+ int cache_update_prop_size = 0;
TrackNodeCache::BezierAnim *cache_update_bezier[NODE_CACHE_UPDATE_MAX];
- int cache_update_bezier_size;
+ int cache_update_bezier_size = 0;
Set<TrackNodeCache *> playing_caches;
- uint64_t accum_pass;
- float speed_scale;
- float default_blend_time;
+ uint64_t accum_pass = 1;
+ float speed_scale = 1.0;
+ float default_blend_time = 0.0;
struct AnimationData {
String name;
@@ -183,54 +179,43 @@ private:
Map<BlendKey, float> blend_times;
struct PlaybackData {
- AnimationData *from;
- float pos;
- float speed_scale;
-
- PlaybackData() {
- pos = 0;
- speed_scale = 1.0;
- from = nullptr;
- }
+ AnimationData *from = nullptr;
+ float pos = 0.0;
+ float speed_scale = 1.0;
};
struct Blend {
PlaybackData data;
- float blend_time;
- float blend_left;
-
- Blend() {
- blend_left = 0;
- blend_time = 0;
- }
+ float blend_time = 0.0;
+ float blend_left = 0.0;
};
struct Playback {
List<Blend> blend;
PlaybackData current;
StringName assigned;
- bool seeked;
- bool started;
+ bool seeked = false;
+ bool started = false;
} playback;
List<StringName> queued;
- bool end_reached;
- bool end_notify;
+ bool end_reached = false;
+ bool end_notify = false;
String autoplay;
- bool reset_on_save;
- AnimationProcessMode animation_process_mode;
- AnimationMethodCallMode method_call_mode;
- bool processing;
- bool active;
+ bool reset_on_save = true;
+ AnimationProcessMode animation_process_mode = ANIMATION_PROCESS_IDLE;
+ AnimationMethodCallMode method_call_mode = ANIMATION_METHOD_CALL_DEFERRED;
+ bool processing = false;
+ bool active = true;
NodePath root;
void _animation_process_animation(AnimationData *p_anim, float p_time, float p_delta, float p_interp, bool p_is_current = true, bool p_seeked = false, bool p_started = false);
- void _ensure_node_caches(AnimationData *p_anim);
+ void _ensure_node_caches(AnimationData *p_anim, Node *p_root_override = nullptr);
void _animation_process_data(PlaybackData &cd, float p_delta, float p_blend, bool p_seeked, bool p_started);
void _animation_process2(float p_delta, bool p_started);
void _animation_update_transforms();
@@ -257,7 +242,7 @@ private:
void _set_process(bool p_process, bool p_force = false);
- bool playing;
+ bool playing = false;
protected:
bool _set(const StringName &p_name, const Variant &p_value);
@@ -334,7 +319,7 @@ public:
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override;
#ifdef TOOLS_ENABLED
- Ref<AnimatedValuesBackup> backup_animated_values();
+ Ref<AnimatedValuesBackup> backup_animated_values(Node *p_root_override = nullptr);
Ref<AnimatedValuesBackup> apply_reset(bool p_user_initiated = false);
bool can_apply_reset() const;
#endif
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index e6abbc0c7a..c0da35d803 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -158,7 +158,7 @@ float AnimationNode::blend_input(int p_input, float p_time, bool p_seek, float p
Ref<AnimationNode> node = blend_tree->get_node(node_name);
//inputs.write[p_input].last_pass = state->last_pass;
- float activity = 0;
+ float activity = 0.0;
float ret = _blend_node(node_name, blend_tree->get_node_connection_array(node_name), nullptr, node, p_time, p_seek, p_blend, p_filter, p_optimize, &activity);
Vector<AnimationTree::Activity> *activity_ptr = state->tree->input_activity_map.getptr(base_path);
@@ -441,9 +441,6 @@ void AnimationNode::_bind_methods() {
}
AnimationNode::AnimationNode() {
- state = nullptr;
- parent = nullptr;
- filter_enabled = false;
}
////////////////////
@@ -820,6 +817,7 @@ void AnimationTree::_process_graph(float p_delta) {
Ref<Animation> a = as.animation;
float time = as.time;
float delta = as.delta;
+ float weight = as.blend;
bool seeked = as.seeked;
for (int i = 0; i < a->get_track_count(); i++) {
@@ -839,7 +837,7 @@ void AnimationTree::_process_graph(float p_delta) {
ERR_CONTINUE(blend_idx < 0 || blend_idx >= state.track_count);
- float blend = (*as.track_blends)[blend_idx];
+ float blend = (*as.track_blends)[blend_idx] * weight;
if (blend < CMP_EPSILON) {
continue; //nothing to blend
@@ -1396,7 +1394,7 @@ void AnimationTree::_update_properties() {
properties_dirty = false;
- _change_notify();
+ notify_property_list_changed();
}
bool AnimationTree::_set(const StringName &p_name, const Variant &p_value) {
@@ -1406,9 +1404,6 @@ bool AnimationTree::_set(const StringName &p_name, const Variant &p_value) {
if (property_map.has(p_name)) {
property_map[p_name] = p_value;
-#ifdef TOOLS_ENABLED
- _change_notify(p_name.operator String().utf8().get_data());
-#endif
return true;
}
@@ -1506,13 +1501,6 @@ void AnimationTree::_bind_methods() {
}
AnimationTree::AnimationTree() {
- process_mode = ANIMATION_PROCESS_IDLE;
- active = false;
- cache_valid = false;
- setup_pass = 1;
- process_pass = 1;
- started = true;
- properties_dirty = true;
}
AnimationTree::~AnimationTree() {
diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h
index a0171e617b..0f78b1f0e2 100644
--- a/scene/animation/animation_tree.h
+++ b/scene/animation/animation_tree.h
@@ -63,26 +63,26 @@ public:
struct AnimationState {
Ref<Animation> animation;
- float time;
- float delta;
- const Vector<float> *track_blends;
- float blend;
- bool seeked;
+ float time = 0.0;
+ float delta = 0.0;
+ const Vector<float> *track_blends = nullptr;
+ float blend = 0.0;
+ bool seeked = false;
};
struct State {
- int track_count;
+ int track_count = 0;
HashMap<NodePath, int> track_map;
List<AnimationState> animation_states;
- bool valid;
- AnimationPlayer *player;
- AnimationTree *tree;
+ bool valid = false;
+ AnimationPlayer *player = nullptr;
+ AnimationTree *tree = nullptr;
String invalid_reasons;
- uint64_t last_pass;
+ uint64_t last_pass = 0;
};
Vector<float> blends;
- State *state;
+ State *state = nullptr;
float _pre_process(const StringName &p_base_path, AnimationNode *p_parent, State *p_state, float p_time, bool p_seek, const Vector<StringName> &p_connections);
void _pre_update_animations(HashMap<NodePath, int> *track_map);
@@ -90,10 +90,10 @@ public:
//all this is temporary
StringName base_path;
Vector<StringName> connections;
- AnimationNode *parent;
+ AnimationNode *parent = nullptr;
HashMap<NodePath, bool> filter;
- bool filter_enabled;
+ bool filter_enabled = false;
Array _get_filters() const;
void _set_filters(const Array &p_filters);
@@ -171,36 +171,29 @@ public:
private:
struct TrackCache {
- bool root_motion;
- uint64_t setup_pass;
- uint64_t process_pass;
- Animation::TrackType type;
- Object *object;
+ bool root_motion = false;
+ uint64_t setup_pass = 0;
+ uint64_t process_pass = 0;
+ Animation::TrackType type = Animation::TrackType::TYPE_ANIMATION;
+ Object *object = nullptr;
ObjectID object_id;
TrackCache() {
- root_motion = false;
- setup_pass = 0;
- process_pass = 0;
- object = nullptr;
}
virtual ~TrackCache() {}
};
struct TrackCacheTransform : public TrackCache {
- Node3D *spatial;
- Skeleton3D *skeleton;
- int bone_idx;
+ Node3D *spatial = nullptr;
+ Skeleton3D *skeleton = nullptr;
+ int bone_idx = -1;
Vector3 loc;
Quat rot;
- float rot_blend_accum;
+ float rot_blend_accum = 0.0;
Vector3 scale;
TrackCacheTransform() {
type = Animation::TYPE_TRANSFORM;
- spatial = nullptr;
- bone_idx = -1;
- skeleton = nullptr;
}
};
@@ -215,33 +208,28 @@ private:
};
struct TrackCacheBezier : public TrackCache {
- float value;
+ float value = 0.0;
Vector<StringName> subpath;
TrackCacheBezier() {
type = Animation::TYPE_BEZIER;
- value = 0;
}
};
struct TrackCacheAudio : public TrackCache {
- bool playing;
- float start;
- float len;
+ bool playing = false;
+ float start = 0.0;
+ float len = 0.0;
TrackCacheAudio() {
type = Animation::TYPE_AUDIO;
- playing = false;
- start = 0;
- len = 0;
}
};
struct TrackCacheAnimation : public TrackCache {
- bool playing;
+ bool playing = false;
TrackCacheAnimation() {
type = Animation::TYPE_ANIMATION;
- playing = false;
}
};
@@ -250,12 +238,12 @@ private:
Ref<AnimationNode> root;
- AnimationProcessMode process_mode;
- bool active;
+ AnimationProcessMode process_mode = ANIMATION_PROCESS_IDLE;
+ bool active = false;
NodePath animation_player;
AnimationNode::State state;
- bool cache_valid;
+ bool cache_valid = false;
void _node_removed(Node *p_node);
void _caches_cleared();
@@ -263,16 +251,16 @@ private:
bool _update_caches(AnimationPlayer *player);
void _process_graph(float p_delta);
- uint64_t setup_pass;
- uint64_t process_pass;
+ uint64_t setup_pass = 1;
+ uint64_t process_pass = 1;
- bool started;
+ bool started = true;
NodePath root_motion_track;
Transform root_motion_transform;
friend class AnimationNode;
- bool properties_dirty;
+ bool properties_dirty = true;
void _tree_changed();
void _update_properties();
List<PropertyInfo> properties;
@@ -280,8 +268,8 @@ private:
HashMap<StringName, Variant> property_map;
struct Activity {
- uint64_t last_pass;
- float activity;
+ uint64_t last_pass = 0;
+ float activity = 0.0;
};
HashMap<StringName, Vector<Activity>> input_activity_map;
diff --git a/scene/animation/root_motion_view.cpp b/scene/animation/root_motion_view.cpp
index 5fd936df8e..a4a1b02a4c 100644
--- a/scene/animation/root_motion_view.cpp
+++ b/scene/animation/root_motion_view.cpp
@@ -188,13 +188,9 @@ void RootMotionView::_bind_methods() {
}
RootMotionView::RootMotionView() {
- zero_y = true;
- radius = 10;
- cell_size = 1;
set_process_internal(true);
immediate = RenderingServer::get_singleton()->immediate_create();
set_base(immediate);
- color = Color(0.5, 0.5, 1.0);
}
RootMotionView::~RootMotionView() {
diff --git a/scene/animation/root_motion_view.h b/scene/animation/root_motion_view.h
index 063fb8feda..afcff6137f 100644
--- a/scene/animation/root_motion_view.h
+++ b/scene/animation/root_motion_view.h
@@ -39,12 +39,12 @@ class RootMotionView : public VisualInstance3D {
public:
RID immediate;
NodePath path;
- float cell_size;
- float radius;
- bool use_in_game;
- Color color;
- bool first;
- bool zero_y;
+ float cell_size = 1.0;
+ float radius = 10.0;
+ bool use_in_game = false;
+ Color color = Color(0.5, 0.5, 1.0);
+ bool first = true;
+ bool zero_y = true;
Transform accumulated;
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index 8bdb5c7447..62d03ea80c 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -1098,7 +1098,7 @@ void Tween::seek(real_t p_time) {
real_t Tween::tell() const {
// We want to grab the position of the furthest along tween
pending_update++;
- real_t pos = 0;
+ real_t pos = 0.0;
// For each interpolation...
for (const List<InterpolateData>::Element *E = interpolates.front(); E; E = E->next()) {
@@ -1122,7 +1122,7 @@ real_t Tween::get_runtime() const {
pending_update++;
// For each interpolation...
- real_t runtime = 0;
+ real_t runtime = 0.0;
for (const List<InterpolateData>::Element *E = interpolates.front(); E; E = E->next()) {
// Get the tween data and see if it's runtime is greater than the previous tweens
const InterpolateData &data = E->get();
@@ -1789,12 +1789,6 @@ void Tween::targeting_method(Object *p_object, StringName p_method, Object *p_in
}
Tween::Tween() {
- // Initialize tween attributes
- tween_process_mode = TWEEN_PROCESS_IDLE;
- repeat = false;
- speed_scale = 1;
- pending_update = 0;
- uid = 0;
}
Tween::~Tween() {
diff --git a/scene/animation/tween.h b/scene/animation/tween.h
index c65a6f850f..88c02be0bc 100644
--- a/scene/animation/tween.h
+++ b/scene/animation/tween.h
@@ -79,11 +79,11 @@ private:
};
struct InterpolateData {
- bool active;
- InterpolateType type;
- bool finish;
- bool call_deferred;
- real_t elapsed;
+ bool active = false;
+ InterpolateType type = INTER_CALLBACK;
+ bool finish = false;
+ bool call_deferred = false;
+ real_t elapsed = 0.0;
ObjectID id;
Vector<StringName> key;
StringName concatenated_key;
@@ -92,33 +92,27 @@ private:
Variant final_val;
ObjectID target_id;
Vector<StringName> target_key;
- real_t duration;
- TransitionType trans_type;
- EaseType ease_type;
- real_t delay;
- int args;
+ real_t duration = 0.0;
+ TransitionType trans_type = TransitionType::TRANS_BACK;
+ EaseType ease_type = EaseType::EASE_COUNT;
+ real_t delay = 0.0;
+ int args = 0;
Variant arg[5];
- int uid;
- InterpolateData() {
- active = false;
- finish = false;
- call_deferred = false;
- uid = 0;
- }
+ int uid = 0;
};
String autoplay;
- TweenProcessMode tween_process_mode;
- bool repeat;
- float speed_scale;
- mutable int pending_update;
- int uid;
+ TweenProcessMode tween_process_mode = TWEEN_PROCESS_IDLE;
+ bool repeat = false;
+ float speed_scale = 1.0;
+ mutable int pending_update = 0;
+ int uid = 0;
List<InterpolateData> interpolates;
struct PendingCommand {
StringName key;
- int args;
+ int args = 0;
Variant arg[10];
};
List<PendingCommand> pending_commands;
diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp
index 4a9e146696..7957571ab7 100644
--- a/scene/audio/audio_stream_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -99,7 +99,7 @@ void AudioStreamPlayer::_mix_audio() {
use_fadeout = false;
}
- if (!stream_playback.is_valid() || !active ||
+ if (!stream_playback.is_valid() || !active.is_set() ||
(stream_paused && !stream_paused_fade)) {
return;
}
@@ -112,24 +112,24 @@ void AudioStreamPlayer::_mix_audio() {
return;
}
- if (setstop) {
+ if (setstop.is_set()) {
_mix_internal(true);
stream_playback->stop();
- setstop = false;
+ setstop.clear();
}
- if (setseek >= 0.0 && !stop_has_priority) {
+ if (setseek.get() >= 0.0 && !stop_has_priority.is_set()) {
if (stream_playback->is_playing()) {
//fade out to avoid pops
_mix_internal(true);
}
- stream_playback->start(setseek);
- setseek = -1.0; //reset seek
+ stream_playback->start(setseek.get());
+ setseek.set(-1.0); //reset seek
mix_volume_db = volume_db; //reset ramp
}
- stop_has_priority = false;
+ stop_has_priority.clear();
_mix_internal(false);
}
@@ -143,8 +143,8 @@ void AudioStreamPlayer::_notification(int p_what) {
}
if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
- if (!active || (setseek < 0 && !stream_playback->is_playing())) {
- active = false;
+ if (!active.is_set() || (setseek.get() < 0 && !stream_playback->is_playing())) {
+ active.clear();
set_process_internal(false);
emit_signal("finished");
}
@@ -169,7 +169,7 @@ void AudioStreamPlayer::_notification(int p_what) {
void AudioStreamPlayer::set_stream(Ref<AudioStream> p_stream) {
AudioServer::get_singleton()->lock();
- if (active && stream_playback.is_valid() && !stream_paused) {
+ if (active.is_set() && stream_playback.is_valid() && !stream_paused) {
//changing streams out of the blue is not a great idea, but at least
//lets try to somehow avoid a click
@@ -196,9 +196,9 @@ void AudioStreamPlayer::set_stream(Ref<AudioStream> p_stream) {
if (stream_playback.is_valid()) {
stream_playback.unref();
stream.unref();
- active = false;
- setseek = -1;
- setstop = false;
+ active.clear();
+ setseek.set(-1);
+ setstop.clear();
}
if (p_stream.is_valid()) {
@@ -237,29 +237,29 @@ float AudioStreamPlayer::get_pitch_scale() const {
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
- setseek = p_from_pos;
- stop_has_priority = false;
- active = true;
+ setseek.set(p_from_pos);
+ stop_has_priority.clear();
+ active.set();
set_process_internal(true);
}
}
void AudioStreamPlayer::seek(float p_seconds) {
if (stream_playback.is_valid()) {
- setseek = p_seconds;
+ setseek.set(p_seconds);
}
}
void AudioStreamPlayer::stop() {
- if (stream_playback.is_valid() && active) {
- setstop = true;
- stop_has_priority = true;
+ if (stream_playback.is_valid() && active.is_set()) {
+ setstop.set();
+ stop_has_priority.set();
}
}
bool AudioStreamPlayer::is_playing() const {
if (stream_playback.is_valid()) {
- return active && !setstop; //&& stream_playback->is_playing();
+ return active.is_set() && !setstop.is_set(); //&& stream_playback->is_playing();
}
return false;
@@ -267,6 +267,10 @@ bool AudioStreamPlayer::is_playing() const {
float AudioStreamPlayer::get_playback_position() {
if (stream_playback.is_valid()) {
+ float ss = setseek.get();
+ if (ss >= 0.0) {
+ return ss;
+ }
return stream_playback->get_playback_position();
}
@@ -314,7 +318,7 @@ void AudioStreamPlayer::_set_playing(bool p_enable) {
}
bool AudioStreamPlayer::_is_active() const {
- return active;
+ return active.is_set();
}
void AudioStreamPlayer::set_stream_paused(bool p_pause) {
@@ -344,7 +348,7 @@ void AudioStreamPlayer::_validate_property(PropertyInfo &property) const {
}
void AudioStreamPlayer::_bus_layout_changed() {
- _change_notify();
+ notify_property_list_changed();
}
Ref<AudioStreamPlayback> AudioStreamPlayer::get_stream_playback() {
@@ -402,18 +406,7 @@ void AudioStreamPlayer::_bind_methods() {
}
AudioStreamPlayer::AudioStreamPlayer() {
- mix_volume_db = 0;
- pitch_scale = 1.0;
- volume_db = 0;
- autoplay = false;
- setseek = -1;
- active = false;
- stream_paused = false;
- stream_paused_fade = false;
- mix_target = MIX_TARGET_STEREO;
fadeout_buffer.resize(512);
- setstop = false;
- use_fadeout = false;
AudioServer::get_singleton()->connect("bus_layout_changed", callable_mp(this, &AudioStreamPlayer::_bus_layout_changed));
}
diff --git a/scene/audio/audio_stream_player.h b/scene/audio/audio_stream_player.h
index fa45a39682..d8f83ee38d 100644
--- a/scene/audio/audio_stream_player.h
+++ b/scene/audio/audio_stream_player.h
@@ -31,6 +31,7 @@
#ifndef AUDIO_STREAM_PLAYER_H
#define AUDIO_STREAM_PLAYER_H
+#include "core/templates/safe_refcount.h"
#include "scene/main/node.h"
#include "servers/audio/audio_stream.h"
@@ -51,20 +52,20 @@ private:
Vector<AudioFrame> fadeout_buffer;
bool use_fadeout;
- volatile float setseek;
- volatile bool active;
- volatile bool setstop;
- volatile bool stop_has_priority;
-
- float mix_volume_db;
- float pitch_scale;
- float volume_db;
- bool autoplay;
- bool stream_paused;
- bool stream_paused_fade;
+ SafeNumeric<float> setseek{ -1.0 };
+ SafeFlag active;
+ SafeFlag setstop;
+ SafeFlag stop_has_priority;
+
+ float mix_volume_db = 0.0;
+ float pitch_scale = 1.0;
+ float volume_db = 0.0;
+ bool autoplay = false;
+ bool stream_paused = false;
+ bool stream_paused_fade = false;
StringName bus;
- MixTarget mix_target;
+ MixTarget mix_target = MIX_TARGET_STEREO;
void _mix_internal(bool p_fadeout);
void _mix_audio();
diff --git a/scene/debugger/scene_debugger.h b/scene/debugger/scene_debugger.h
index 51632446f8..9d54556187 100644
--- a/scene/debugger/scene_debugger.h
+++ b/scene/debugger/scene_debugger.h
@@ -77,7 +77,7 @@ public:
class SceneDebuggerTree {
public:
struct RemoteNode {
- int child_count;
+ int child_count = 0;
String name;
String type_name;
ObjectID id;
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 27e33be9d7..db13b9b11f 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -199,7 +199,6 @@ void BaseButton::set_disabled(bool p_disabled) {
status.pressing_inside = false;
}
update();
- _change_notify("disabled");
}
bool BaseButton::is_disabled() const {
@@ -213,7 +212,6 @@ void BaseButton::set_pressed(bool p_pressed) {
if (status.pressed == p_pressed) {
return;
}
- _change_notify("pressed");
status.pressed = p_pressed;
if (p_pressed) {
@@ -448,18 +446,7 @@ void BaseButton::_bind_methods() {
}
BaseButton::BaseButton() {
- toggle_mode = false;
- shortcut_in_tooltip = true;
- keep_pressed_outside = false;
- status.pressed = false;
- status.press_attempt = false;
- status.hovering = false;
- status.pressing_inside = false;
- status.disabled = false;
set_focus_mode(FOCUS_ALL);
- action_mode = ACTION_MODE_BUTTON_RELEASE;
- button_mask = BUTTON_MASK_LEFT;
- shortcut_context = ObjectID();
}
BaseButton::~BaseButton() {
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index b349b75761..d54d63cc39 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -45,21 +45,21 @@ public:
};
private:
- int button_mask;
- bool toggle_mode;
- bool shortcut_in_tooltip;
- bool keep_pressed_outside;
+ int button_mask = BUTTON_MASK_LEFT;
+ bool toggle_mode = false;
+ bool shortcut_in_tooltip = true;
+ bool keep_pressed_outside = false;
Ref<Shortcut> shortcut;
ObjectID shortcut_context;
- ActionMode action_mode;
+ ActionMode action_mode = ACTION_MODE_BUTTON_RELEASE;
struct Status {
- bool pressed;
- bool hovering;
- bool press_attempt;
- bool pressing_inside;
+ bool pressed = false;
+ bool hovering = false;
+ bool press_attempt = false;
+ bool pressing_inside = false;
- bool disabled;
+ bool disabled = false;
} status;
diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp
index a00d755c9c..c570438b6a 100644
--- a/scene/gui/box_container.cpp
+++ b/scene/gui/box_container.cpp
@@ -33,9 +33,9 @@
#include "margin_container.h"
struct _MinSizeCache {
- int min_size;
- bool will_stretch;
- int final_size;
+ int min_size = 0;
+ bool will_stretch = false;
+ int final_size = 0;
};
void BoxContainer::_resort() {
@@ -50,7 +50,7 @@ void BoxContainer::_resort() {
int children_count = 0;
int stretch_min = 0;
int stretch_avail = 0;
- float stretch_ratio_total = 0;
+ float stretch_ratio_total = 0.0;
Map<Control *, _MinSizeCache> min_size_cache;
for (int i = 0; i < get_child_count(); i++) {
@@ -105,7 +105,7 @@ void BoxContainer::_resort() {
has_stretched = true;
bool refit_successful = true; //assume refit-test will go well
- float error = 0; // Keep track of accumulated error in pixels
+ float error = 0.0; // Keep track of accumulated error in pixels
for (int i = 0; i < get_child_count(); i++) {
Control *c = Object::cast_to<Control>(get_child(i));
@@ -331,7 +331,6 @@ void BoxContainer::add_spacer(bool p_begin) {
BoxContainer::BoxContainer(bool p_vertical) {
vertical = p_vertical;
- align = ALIGN_BEGIN;
}
void BoxContainer::_bind_methods() {
diff --git a/scene/gui/box_container.h b/scene/gui/box_container.h
index 8285c2b9a2..31050d1feb 100644
--- a/scene/gui/box_container.h
+++ b/scene/gui/box_container.h
@@ -44,8 +44,8 @@ public:
};
private:
- bool vertical;
- AlignMode align;
+ bool vertical = false;
+ AlignMode align = ALIGN_BEGIN;
void _resort();
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index 119f3539e1..37bb17b47d 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -102,8 +102,8 @@ void Button::_notification(int p_what) {
style->draw(ci, Rect2(Point2(0, 0), size));
}
color = get_theme_color("font_color");
- if (has_theme_color("icon_color_normal")) {
- color_icon = get_theme_color("icon_color_normal");
+ if (has_theme_color("icon_normal_color")) {
+ color_icon = get_theme_color("icon_normal_color");
}
} break;
case DRAW_HOVER_PRESSED: {
@@ -117,13 +117,13 @@ void Button::_notification(int p_what) {
if (!flat) {
style->draw(ci, Rect2(Point2(0, 0), size));
}
- if (has_theme_color("font_color_hover_pressed")) {
- color = get_theme_color("font_color_hover_pressed");
+ if (has_theme_color("font_hover_pressed_color")) {
+ color = get_theme_color("font_hover_pressed_color");
} else {
color = get_theme_color("font_color");
}
- if (has_theme_color("icon_color_hover_pressed")) {
- color_icon = get_theme_color("icon_color_hover_pressed");
+ if (has_theme_color("icon_hover_pressed_color")) {
+ color_icon = get_theme_color("icon_hover_pressed_color");
}
break;
@@ -140,13 +140,13 @@ void Button::_notification(int p_what) {
if (!flat) {
style->draw(ci, Rect2(Point2(0, 0), size));
}
- if (has_theme_color("font_color_pressed")) {
- color = get_theme_color("font_color_pressed");
+ if (has_theme_color("font_pressed_color")) {
+ color = get_theme_color("font_pressed_color");
} else {
color = get_theme_color("font_color");
}
- if (has_theme_color("icon_color_pressed")) {
- color_icon = get_theme_color("icon_color_pressed");
+ if (has_theme_color("icon_pressed_color")) {
+ color_icon = get_theme_color("icon_pressed_color");
}
} break;
@@ -160,9 +160,9 @@ void Button::_notification(int p_what) {
if (!flat) {
style->draw(ci, Rect2(Point2(0, 0), size));
}
- color = get_theme_color("font_color_hover");
- if (has_theme_color("icon_color_hover")) {
- color_icon = get_theme_color("icon_color_hover");
+ color = get_theme_color("font_hover_color");
+ if (has_theme_color("icon_hover_color")) {
+ color_icon = get_theme_color("icon_hover_color");
}
} break;
@@ -176,9 +176,9 @@ void Button::_notification(int p_what) {
if (!flat) {
style->draw(ci, Rect2(Point2(0, 0), size));
}
- color = get_theme_color("font_color_disabled");
- if (has_theme_color("icon_color_disabled")) {
- color_icon = get_theme_color("icon_color_disabled");
+ color = get_theme_color("font_disabled_color");
+ if (has_theme_color("icon_disabled_color")) {
+ color_icon = get_theme_color("icon_disabled_color");
}
} break;
@@ -203,7 +203,7 @@ void Button::_notification(int p_what) {
color_icon.a = 0.4;
}
- float icon_ofs_region = 0;
+ float icon_ofs_region = 0.0;
if (rtl) {
if (_internal_margin[SIDE_RIGHT] > 0) {
icon_ofs_region = _internal_margin[SIDE_RIGHT] + get_theme_constant("hseparation");
@@ -303,13 +303,13 @@ void Button::_notification(int p_what) {
text_ofs.x -= icon_ofs.x;
}
- Color font_outline_modulate = get_theme_color("font_outline_modulate");
+ Color font_outline_color = get_theme_color("font_outline_color");
int outline_size = get_theme_constant("outline_size");
- if (outline_size > 0 && font_outline_modulate.a > 0) {
- text_buf->draw_outline(ci, text_ofs.floor(), outline_size, font_outline_modulate);
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ text_buf->draw_outline(ci, text_ofs, outline_size, font_outline_color);
}
- text_buf->draw(ci, text_ofs.floor(), color);
+ text_buf->draw(ci, text_ofs, color);
if (!_icon.is_null() && icon_region.size.width > 0) {
draw_texture_rect_region(_icon, icon_region, Rect2(Point2(), _icon->get_size()), color_icon);
@@ -338,7 +338,6 @@ void Button::set_text(const String &p_text) {
_shape();
update();
- _change_notify("text");
minimum_size_changed();
}
}
@@ -399,7 +398,6 @@ void Button::set_icon(const Ref<Texture2D> &p_icon) {
if (icon != p_icon) {
icon = p_icon;
update();
- _change_notify("icon");
minimum_size_changed();
}
}
@@ -424,7 +422,6 @@ void Button::set_flat(bool p_flat) {
if (flat != p_flat) {
flat = p_flat;
update();
- _change_notify("flat");
}
}
@@ -474,7 +471,7 @@ bool Button::_set(const StringName &p_name, const Variant &p_value) {
update();
}
}
- _change_notify();
+ notify_property_list_changed();
return true;
}
@@ -544,16 +541,8 @@ Button::Button(const String &p_text) {
text_buf.instance();
text_buf->set_flags(TextServer::BREAK_MANDATORY);
- flat = false;
- clip_text = false;
- expand_icon = false;
set_mouse_filter(MOUSE_FILTER_STOP);
set_text(p_text);
- align = ALIGN_CENTER;
-
- for (int i = 0; i < 4; i++) {
- _internal_margin[i] = 0;
- }
}
Button::~Button() {
diff --git a/scene/gui/button.h b/scene/gui/button.h
index d633fddc8a..d968f63f51 100644
--- a/scene/gui/button.h
+++ b/scene/gui/button.h
@@ -45,7 +45,7 @@ public:
};
private:
- bool flat;
+ bool flat = false;
String text;
String xl_text;
Ref<TextParagraph> text_buf;
@@ -55,10 +55,10 @@ private:
TextDirection text_direction = TEXT_DIRECTION_AUTO;
Ref<Texture2D> icon;
- bool expand_icon;
- bool clip_text;
- TextAlign align;
- float _internal_margin[4];
+ bool expand_icon = false;
+ bool clip_text = false;
+ TextAlign align = ALIGN_CENTER;
+ float _internal_margin[4] = {};
void _shape();
diff --git a/scene/gui/center_container.cpp b/scene/gui/center_container.cpp
index f2d1dee0fc..909516e7ef 100644
--- a/scene/gui/center_container.cpp
+++ b/scene/gui/center_container.cpp
@@ -95,6 +95,4 @@ void CenterContainer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_top_left"), "set_use_top_left", "is_using_top_left");
}
-CenterContainer::CenterContainer() {
- use_top_left = false;
-}
+CenterContainer::CenterContainer() {}
diff --git a/scene/gui/center_container.h b/scene/gui/center_container.h
index ee8b2e0e48..0944f200fc 100644
--- a/scene/gui/center_container.h
+++ b/scene/gui/center_container.h
@@ -36,7 +36,7 @@
class CenterContainer : public Container {
GDCLASS(CenterContainer, Container);
- bool use_top_left;
+ bool use_top_left = false;
protected:
void _notification(int p_what);
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 6c81ef0998..b82c078a2d 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -52,6 +52,7 @@ void ColorPicker::_notification(int p_what) {
btn_pick->set_icon(get_theme_icon("screen_picker", "ColorPicker"));
bt_add_preset->set_icon(get_theme_icon("add_preset"));
+ _update_controls();
_update_color();
#ifdef TOOLS_ENABLED
@@ -577,6 +578,10 @@ void ColorPicker::_preset_input(const Ref<InputEvent> &p_event) {
}
void ColorPicker::_screen_input(const Ref<InputEvent> &p_event) {
+ if (!is_inside_tree()) {
+ return;
+ }
+
Ref<InputEventMouseButton> bev = p_event;
if (bev.is_valid() && bev->get_button_index() == BUTTON_LEFT && !bev->is_pressed()) {
emit_signal("color_changed", color);
@@ -606,6 +611,10 @@ void ColorPicker::_add_preset_pressed() {
}
void ColorPicker::_screen_pick_pressed() {
+ if (!is_inside_tree()) {
+ return;
+ }
+
Viewport *r = get_tree()->get_root();
if (!screen) {
screen = memnew(Control);
@@ -718,17 +727,6 @@ void ColorPicker::_bind_methods() {
ColorPicker::ColorPicker() :
BoxContainer(true) {
- updating = true;
- edit_alpha = true;
- text_is_constructor = false;
- hsv_mode_enabled = false;
- raw_mode_enabled = false;
- deferred_mode_enabled = false;
- changing_color = false;
- presets_enabled = true;
- presets_visible = true;
- screen = nullptr;
-
HBoxContainer *hb_edit = memnew(HBoxContainer);
add_child(hb_edit);
hb_edit->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1001,12 +999,5 @@ void ColorPickerButton::_bind_methods() {
}
ColorPickerButton::ColorPickerButton() {
- // Initialization is now done deferred,
- // this improves performance in the inspector as the color picker
- // can be expensive to initialize.
- picker = nullptr;
- popup = nullptr;
- edit_alpha = true;
-
set_toggle_mode(true);
}
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index 3695820a79..7915527bc0 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -46,7 +46,7 @@ class ColorPicker : public BoxContainer {
GDCLASS(ColorPicker, BoxContainer);
private:
- Control *screen;
+ Control *screen = nullptr;
Control *uv_edit;
Control *w_edit;
TextureRect *sample;
@@ -64,20 +64,22 @@ private:
Label *labels[4];
Button *text_type;
LineEdit *c_text;
- bool edit_alpha;
+ bool edit_alpha = true;
Size2i ms;
- bool text_is_constructor;
- int presets_per_row;
+ bool text_is_constructor = false;
+ int presets_per_row = 0;
Color color;
- bool raw_mode_enabled;
- bool hsv_mode_enabled;
- bool deferred_mode_enabled;
- bool updating;
- bool changing_color;
- bool presets_enabled;
- bool presets_visible;
- float h, s, v;
+ bool raw_mode_enabled = false;
+ bool hsv_mode_enabled = false;
+ bool deferred_mode_enabled = false;
+ bool updating = true;
+ bool changing_color = false;
+ bool presets_enabled = true;
+ bool presets_visible = true;
+ float h = 0.0;
+ float s = 0.0;
+ float v = 0.0;
Color last_hsv;
void _html_entered(const String &p_html);
@@ -139,10 +141,14 @@ public:
class ColorPickerButton : public Button {
GDCLASS(ColorPickerButton, Button);
- PopupPanel *popup;
- ColorPicker *picker;
+ // Initialization is now done deferred,
+ // this improves performance in the inspector as the color picker
+ // can be expensive to initialize.
+
+ PopupPanel *popup = nullptr;
+ ColorPicker *picker = nullptr;
Color color;
- bool edit_alpha;
+ bool edit_alpha = true;
void _color_changed(const Color &p_color);
void _modal_closed();
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index 03bade6702..2e6b798eea 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -180,7 +180,6 @@ void Container::_bind_methods() {
}
Container::Container() {
- pending_sort = false;
// All containers should let mouse events pass by default.
set_mouse_filter(MOUSE_FILTER_PASS);
}
diff --git a/scene/gui/container.h b/scene/gui/container.h
index 5e60ca04dc..a4f392a3ae 100644
--- a/scene/gui/container.h
+++ b/scene/gui/container.h
@@ -36,7 +36,7 @@
class Container : public Control {
GDCLASS(Container, Control);
- bool pending_sort;
+ bool pending_sort = false;
void _sort_children();
void _child_minsize_changed();
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index ad21c351d0..0e28c942f1 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -439,14 +439,14 @@ bool Control::is_layout_rtl() const {
} else if (parent_window) {
return parent_window->is_layout_rtl();
} else {
- if (GLOBAL_GET("display/window/force_right_to_left_layout_direction")) {
+ if (GLOBAL_GET("internationalization/rendering/force_right_to_left_layout_direction")) {
return true;
}
String locale = TranslationServer::get_singleton()->get_tool_locale();
return TS->is_locale_right_to_left(locale);
}
} else if (data.layout_dir == LAYOUT_DIRECTION_LOCALE) {
- if (GLOBAL_GET("display/window/force_right_to_left_layout_direction")) {
+ if (GLOBAL_GET("internationalization/rendering/force_right_to_left_layout_direction")) {
return true;
}
String locale = TranslationServer::get_singleton()->get_tool_locale();
@@ -709,7 +709,7 @@ bool Control::can_drop_data(const Point2 &p_point, const Variant &p_data) const
}
}
- return Variant();
+ return false;
}
void Control::drop_data(const Point2 &p_point, const Variant &p_data) {
@@ -1275,7 +1275,6 @@ void Control::_size_changed() {
}
if (pos_changed || size_changed) {
item_rect_changed(size_changed);
- _change_notify_offsets();
_notify_transform();
}
@@ -1315,10 +1314,6 @@ void Control::set_anchor(Side p_side, float p_anchor, bool p_keep_offset, bool p
}
update();
- _change_notify("anchor_left");
- _change_notify("anchor_right");
- _change_notify("anchor_top");
- _change_notify("anchor_bottom");
}
void Control::_set_anchor(Side p_side, float p_anchor) {
@@ -1592,16 +1587,6 @@ float Control::get_anchor(Side p_side) const {
return data.anchor[p_side];
}
-void Control::_change_notify_offsets() {
- // this avoids sending the whole object data again on a change
- _change_notify("offset_left");
- _change_notify("offset_top");
- _change_notify("offset_right");
- _change_notify("offset_bottom");
- _change_notify("rect_position");
- _change_notify("rect_size");
-}
-
void Control::set_offset(Side p_side, float p_value) {
ERR_FAIL_INDEX((int)p_side, 4);
@@ -1699,10 +1684,6 @@ void Control::_set_position(const Size2 &p_point) {
void Control::set_position(const Size2 &p_point, bool p_keep_offsets) {
if (p_keep_offsets) {
_compute_anchors(Rect2(p_point, data.size_cache), data.offset, data.anchor);
- _change_notify("anchor_left");
- _change_notify("anchor_right");
- _change_notify("anchor_top");
- _change_notify("anchor_bottom");
} else {
_compute_offsets(Rect2(p_point, data.size_cache), data.anchor, data.offset);
}
@@ -1736,10 +1717,6 @@ void Control::set_size(const Size2 &p_size, bool p_keep_offsets) {
if (p_keep_offsets) {
_compute_anchors(Rect2(data.pos_cache, new_size), data.offset, data.anchor);
- _change_notify("anchor_left");
- _change_notify("anchor_right");
- _change_notify("anchor_top");
- _change_notify("anchor_bottom");
} else {
_compute_offsets(Rect2(data.pos_cache, new_size), data.anchor, data.offset);
}
@@ -2577,7 +2554,6 @@ void Control::set_rotation(float p_radians) {
data.rotation = p_radians;
update();
_notify_transform();
- _change_notify("rect_rotation");
}
float Control::get_rotation() const {
@@ -2602,7 +2578,6 @@ void Control::set_pivot_offset(const Vector2 &p_pivot) {
data.pivot_offset = p_pivot;
update();
_notify_transform();
- _change_notify("rect_pivot_offset");
}
Vector2 Control::get_pivot_offset() const {
@@ -2785,6 +2760,8 @@ void Control::_bind_methods() {
ClassDB::bind_method(D_METHOD("has_focus"), &Control::has_focus);
ClassDB::bind_method(D_METHOD("grab_focus"), &Control::grab_focus);
ClassDB::bind_method(D_METHOD("release_focus"), &Control::release_focus);
+ ClassDB::bind_method(D_METHOD("find_prev_valid_focus"), &Control::find_prev_valid_focus);
+ ClassDB::bind_method(D_METHOD("find_next_valid_focus"), &Control::find_next_valid_focus);
ClassDB::bind_method(D_METHOD("get_focus_owner"), &Control::get_focus_owner);
ClassDB::bind_method(D_METHOD("set_h_size_flags", "flags"), &Control::set_h_size_flags);
diff --git a/scene/gui/control.h b/scene/gui/control.h
index ac2a1b35de..8b24781287 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -179,13 +179,13 @@ private:
LayoutDirection layout_dir = LAYOUT_DIRECTION_INHERITED;
- float rotation = 0;
+ float rotation = 0.0;
Vector2 scale = Vector2(1, 1);
Vector2 pivot_offset;
int h_size_flags = SIZE_FILL;
int v_size_flags = SIZE_FILL;
- float expand = 1;
+ float expand = 1.0;
Point2 custom_minimum_size;
MouseFilter mouse_filter = MOUSE_FILTER_STOP;
@@ -233,7 +233,6 @@ private:
void _theme_changed();
- void _change_notify_offsets();
void _update_minimum_size();
void _update_scroll();
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 773c609a70..fdfbf9eafc 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -292,8 +292,6 @@ void AcceptDialog::set_swap_cancel_ok(bool p_swap) {
}
AcceptDialog::AcceptDialog() {
- parent_visible = nullptr;
-
set_wrap_controls(true);
set_visible(false);
set_transient(true);
@@ -325,7 +323,6 @@ AcceptDialog::AcceptDialog() {
ok->connect("pressed", callable_mp(this, &AcceptDialog::_ok_pressed));
- hide_on_ok = true;
set_title(RTR("Alert!"));
connect("window_input", callable_mp(this, &AcceptDialog::_input_from_window));
diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h
index e450a3c30a..b072055d49 100644
--- a/scene/gui/dialogs.h
+++ b/scene/gui/dialogs.h
@@ -44,12 +44,12 @@ class LineEdit;
class AcceptDialog : public Window {
GDCLASS(AcceptDialog, Window);
- Window *parent_visible;
+ Window *parent_visible = nullptr;
Panel *bg;
HBoxContainer *hbc;
Label *label;
Button *ok;
- bool hide_on_ok;
+ bool hide_on_ok = true;
void _custom_action(const String &p_action);
void _update_child_rects();
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 5765d6b932..7453324505 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -50,20 +50,20 @@ VBoxContainer *FileDialog::get_vbox() {
void FileDialog::_theme_changed() {
Color font_color = vbox->get_theme_color("font_color", "Button");
- Color font_color_hover = vbox->get_theme_color("font_color_hover", "Button");
- Color font_color_pressed = vbox->get_theme_color("font_color_pressed", "Button");
+ Color font_hover_color = vbox->get_theme_color("font_hover_color", "Button");
+ Color font_pressed_color = vbox->get_theme_color("font_pressed_color", "Button");
- dir_up->add_theme_color_override("icon_color_normal", font_color);
- dir_up->add_theme_color_override("icon_color_hover", font_color_hover);
- dir_up->add_theme_color_override("icon_color_pressed", font_color_pressed);
+ dir_up->add_theme_color_override("icon_normal_color", font_color);
+ dir_up->add_theme_color_override("icon_hover_color", font_hover_color);
+ dir_up->add_theme_color_override("icon_pressed_color", font_pressed_color);
- refresh->add_theme_color_override("icon_color_normal", font_color);
- refresh->add_theme_color_override("icon_color_hover", font_color_hover);
- refresh->add_theme_color_override("icon_color_pressed", font_color_pressed);
+ refresh->add_theme_color_override("icon_normal_color", font_color);
+ refresh->add_theme_color_override("icon_hover_color", font_hover_color);
+ refresh->add_theme_color_override("icon_pressed_color", font_pressed_color);
- show_hidden->add_theme_color_override("icon_color_normal", font_color);
- show_hidden->add_theme_color_override("icon_color_hover", font_color_hover);
- show_hidden->add_theme_color_override("icon_color_pressed", font_color_pressed);
+ show_hidden->add_theme_color_override("icon_normal_color", font_color);
+ show_hidden->add_theme_color_override("icon_hover_color", font_hover_color);
+ show_hidden->add_theme_color_override("icon_pressed_color", font_pressed_color);
}
void FileDialog::_notification(int p_what) {
@@ -852,8 +852,6 @@ void FileDialog::set_default_show_hidden_files(bool p_show) {
FileDialog::FileDialog() {
show_hidden_files = default_show_hidden_files;
- mode_overrides_title = true;
-
vbox = memnew(VBoxContainer);
add_child(vbox);
vbox->connect("theme_changed", callable_mp(this, &FileDialog::_theme_changed));
@@ -925,7 +923,6 @@ FileDialog::FileDialog() {
vbox->add_child(file_box);
dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES);
- access = ACCESS_RESOURCES;
_update_drives();
connect("confirmed", callable_mp(this, &FileDialog::_action_pressed));
@@ -967,7 +964,6 @@ FileDialog::FileDialog() {
set_hide_on_ok(false);
- invalidated = true;
if (register_func) {
register_func(this);
}
diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h
index 626bb78d42..25b742c234 100644
--- a/scene/gui/file_dialog.h
+++ b/scene/gui/file_dialog.h
@@ -69,7 +69,7 @@ private:
LineEdit *makedirname;
Button *makedir;
- Access access;
+ Access access = ACCESS_RESOURCES;
//Button *action;
VBoxContainer *vbox;
FileMode mode;
@@ -93,12 +93,12 @@ private:
Vector<String> filters;
- bool mode_overrides_title;
+ bool mode_overrides_title = true;
static bool default_show_hidden_files;
- bool show_hidden_files;
+ bool show_hidden_files = false;
- bool invalidated;
+ bool invalidated = true;
void update_dir();
void update_file_name();
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index d18fff887d..36b383f16c 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -42,8 +42,6 @@
#endif
GradientEdit::GradientEdit() {
- grabbed = -1;
- grabbing = false;
set_focus_mode(FOCUS_ALL);
popup = memnew(PopupPanel);
diff --git a/scene/gui/gradient_edit.h b/scene/gui/gradient_edit.h
index 189b33f563..eb7367d598 100644
--- a/scene/gui/gradient_edit.h
+++ b/scene/gui/gradient_edit.h
@@ -44,8 +44,8 @@ class GradientEdit : public Control {
Ref<ImageTexture> checker;
- bool grabbing;
- int grabbed;
+ bool grabbing = false;
+ int grabbed = -1;
Vector<Gradient::Point> points;
void _draw_checker(int x, int y, int w, int h);
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 6662992d46..70015bcf88 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -154,6 +154,10 @@ Vector2 GraphEditMinimap::_convert_to_graph_position(const Vector2 &p_position)
}
void GraphEditMinimap::_gui_input(const Ref<InputEvent> &p_ev) {
+ if (!ge->is_minimap_enabled()) {
+ return;
+ }
+
Ref<InputEventMouseButton> mb = p_ev;
Ref<InputEventMouseMotion> mm = p_ev;
@@ -381,6 +385,15 @@ void GraphEdit::_graph_node_moved(Node *p_gn) {
connections_layer->update();
}
+void GraphEdit::_graph_node_slot_updated(int p_index, Node *p_gn) {
+ GraphNode *gn = Object::cast_to<GraphNode>(p_gn);
+ ERR_FAIL_COND(!gn);
+ top_layer->update();
+ minimap->update();
+ update();
+ connections_layer->update();
+}
+
void GraphEdit::add_child_notify(Node *p_child) {
Control::add_child_notify(p_child);
@@ -390,6 +403,7 @@ void GraphEdit::add_child_notify(Node *p_child) {
if (gn) {
gn->set_scale(Vector2(zoom, zoom));
gn->connect("position_offset_changed", callable_mp(this, &GraphEdit::_graph_node_moved), varray(gn));
+ gn->connect("slot_updated", callable_mp(this, &GraphEdit::_graph_node_slot_updated), varray(gn));
gn->connect("raise_request", callable_mp(this, &GraphEdit::_graph_node_raised), varray(gn));
gn->connect("item_rect_changed", callable_mp((CanvasItem *)connections_layer, &CanvasItem::update));
gn->connect("item_rect_changed", callable_mp((CanvasItem *)minimap, &GraphEditMinimap::update));
@@ -415,6 +429,7 @@ void GraphEdit::remove_child_notify(Node *p_child) {
GraphNode *gn = Object::cast_to<GraphNode>(p_child);
if (gn) {
gn->disconnect("position_offset_changed", callable_mp(this, &GraphEdit::_graph_node_moved));
+ gn->disconnect("slot_updated", callable_mp(this, &GraphEdit::_graph_node_slot_updated));
gn->disconnect("raise_request", callable_mp(this, &GraphEdit::_graph_node_raised));
// In case of the whole GraphEdit being destroyed these references can already be freed.
@@ -1315,25 +1330,17 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
}
}
- Ref<InputEventKey> k = p_ev;
-
- if (k.is_valid()) {
- if (k->get_keycode() == KEY_D && k->is_pressed() && k->get_command()) {
+ if (p_ev->is_pressed()) {
+ if (p_ev->is_action("ui_graph_duplicate")) {
emit_signal("duplicate_nodes_request");
accept_event();
- }
-
- if (k->get_keycode() == KEY_C && k->is_pressed() && k->get_command()) {
+ } else if (p_ev->is_action("ui_copy")) {
emit_signal("copy_nodes_request");
accept_event();
- }
-
- if (k->get_keycode() == KEY_V && k->is_pressed() && k->get_command()) {
+ } else if (p_ev->is_action("ui_paste")) {
emit_signal("paste_nodes_request");
accept_event();
- }
-
- if (k->get_keycode() == KEY_DELETE && k->is_pressed()) {
+ } else if (p_ev->is_action("ui_graph_delete")) {
emit_signal("delete_nodes_request");
accept_event();
}
@@ -1589,7 +1596,7 @@ void GraphEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("remove_valid_connection_type", "from_type", "to_type"), &GraphEdit::remove_valid_connection_type);
ClassDB::bind_method(D_METHOD("is_valid_connection_type", "from_type", "to_type"), &GraphEdit::is_valid_connection_type);
- ClassDB::bind_method(D_METHOD("set_zoom", "p_zoom"), &GraphEdit::set_zoom);
+ ClassDB::bind_method(D_METHOD("set_zoom", "zoom"), &GraphEdit::set_zoom);
ClassDB::bind_method(D_METHOD("get_zoom"), &GraphEdit::get_zoom);
ClassDB::bind_method(D_METHOD("set_snap", "pixels"), &GraphEdit::set_snap);
@@ -1604,9 +1611,9 @@ void GraphEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_connection_lines_antialiased", "pixels"), &GraphEdit::set_connection_lines_antialiased);
ClassDB::bind_method(D_METHOD("is_connection_lines_antialiased"), &GraphEdit::is_connection_lines_antialiased);
- ClassDB::bind_method(D_METHOD("set_minimap_size", "p_size"), &GraphEdit::set_minimap_size);
+ ClassDB::bind_method(D_METHOD("set_minimap_size", "size"), &GraphEdit::set_minimap_size);
ClassDB::bind_method(D_METHOD("get_minimap_size"), &GraphEdit::get_minimap_size);
- ClassDB::bind_method(D_METHOD("set_minimap_opacity", "p_opacity"), &GraphEdit::set_minimap_opacity);
+ ClassDB::bind_method(D_METHOD("set_minimap_opacity", "opacity"), &GraphEdit::set_minimap_opacity);
ClassDB::bind_method(D_METHOD("get_minimap_opacity"), &GraphEdit::get_minimap_opacity);
ClassDB::bind_method(D_METHOD("set_minimap_enabled", "enable"), &GraphEdit::set_minimap_enabled);
@@ -1653,8 +1660,6 @@ void GraphEdit::_bind_methods() {
GraphEdit::GraphEdit() {
set_focus_mode(FOCUS_ALL);
- awaiting_scroll_offset_update = false;
- top_layer = nullptr;
top_layer = memnew(GraphEditFilter(this));
add_child(top_layer);
top_layer->set_mouse_filter(MOUSE_FILTER_PASS);
@@ -1677,13 +1682,6 @@ GraphEdit::GraphEdit() {
v_scroll->set_name("_v_scroll");
top_layer->add_child(v_scroll);
- updating = false;
- connecting = false;
- right_disconnects = false;
-
- box_selecting = false;
- dragging = false;
-
//set large minmax so it can scroll even if not resized yet
h_scroll->set_min(-10000);
h_scroll->set_max(10000);
@@ -1694,8 +1692,6 @@ GraphEdit::GraphEdit() {
h_scroll->connect("value_changed", callable_mp(this, &GraphEdit::_scroll_moved));
v_scroll->connect("value_changed", callable_mp(this, &GraphEdit::_scroll_moved));
- zoom = 1;
-
zoom_hb = memnew(HBoxContainer);
top_layer->add_child(zoom_hb);
zoom_hb->set_position(Vector2(10, 10));
@@ -1754,7 +1750,7 @@ GraphEdit::GraphEdit() {
top_layer->add_child(minimap);
minimap->set_name("_minimap");
minimap->set_modulate(Color(1, 1, 1, minimap_opacity));
- minimap->set_mouse_filter(MOUSE_FILTER_STOP);
+ minimap->set_mouse_filter(MOUSE_FILTER_PASS);
minimap->set_custom_minimum_size(Vector2(50, 50));
minimap->set_size(minimap_size);
minimap->set_anchors_preset(Control::PRESET_BOTTOM_RIGHT);
@@ -1764,7 +1760,5 @@ GraphEdit::GraphEdit() {
minimap->set_offset(Side::SIDE_BOTTOM, -MINIMAP_OFFSET);
minimap->connect("draw", callable_mp(this, &GraphEdit::_minimap_draw));
- setting_scroll_ofs = false;
- just_disconnected = false;
set_clip_contents(true);
}
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index 4525152bd5..8fdf975319 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -99,9 +99,9 @@ public:
struct Connection {
StringName from;
StringName to;
- int from_port;
- int to_port;
- float activity;
+ int from_port = 0;
+ int to_port = 0;
+ float activity = 0.0;
};
private:
@@ -121,41 +121,41 @@ private:
HScrollBar *h_scroll;
VScrollBar *v_scroll;
- float port_grab_distance_horizontal;
+ float port_grab_distance_horizontal = 0.0;
float port_grab_distance_vertical;
- bool connecting;
+ bool connecting = false;
String connecting_from;
- bool connecting_out;
- int connecting_index;
- int connecting_type;
+ bool connecting_out = false;
+ int connecting_index = 0;
+ int connecting_type = 0;
Color connecting_color;
- bool connecting_target;
+ bool connecting_target = false;
Vector2 connecting_to;
String connecting_target_to;
int connecting_target_index;
- bool just_disconnected;
- bool connecting_valid;
+ bool just_disconnected = false;
+ bool connecting_valid = false;
Vector2 click_pos;
- bool dragging;
- bool just_selected;
- bool moving_selection;
+ bool dragging = false;
+ bool just_selected = false;
+ bool moving_selection = false;
Vector2 drag_accum;
- float zoom;
+ float zoom = 1.0;
- bool box_selecting;
- bool box_selection_mode_additive;
+ bool box_selecting = false;
+ bool box_selection_mode_additive = false;
Point2 box_selecting_from;
Point2 box_selecting_to;
Rect2 box_selecting_rect;
List<GraphNode *> previus_selected;
- bool setting_scroll_ofs;
- bool right_disconnects;
- bool updating;
- bool awaiting_scroll_offset_update;
+ bool setting_scroll_ofs = false;
+ bool right_disconnects = false;
+ bool updating = false;
+ bool awaiting_scroll_offset_update = false;
List<Connection> connections;
float lines_thickness = 2.0f;
@@ -167,6 +167,7 @@ private:
void _graph_node_raised(Node *p_gn);
void _graph_node_moved(Node *p_gn);
+ void _graph_node_slot_updated(int p_index, Node *p_gn);
void _update_scroll();
void _scroll_moved(double);
@@ -194,7 +195,7 @@ private:
uint32_t type_a;
uint32_t type_b;
};
- uint64_t key;
+ uint64_t key = 0;
};
bool operator<(const ConnType &p_type) const {
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 9f5c87377f..b615cdb266 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -51,7 +51,7 @@ bool GraphNode::_set(const StringName &p_name, const Variant &p_value) {
update();
}
}
- _change_notify();
+ notify_property_list_changed();
return true;
}
@@ -71,6 +71,8 @@ bool GraphNode::_set(const StringName &p_name, const Variant &p_value) {
si.enable_left = p_value;
} else if (what == "left_type") {
si.type_left = p_value;
+ } else if (what == "left_icon") {
+ si.custom_slot_left = p_value;
} else if (what == "left_color") {
si.color_left = p_value;
} else if (what == "right_enabled") {
@@ -79,11 +81,13 @@ bool GraphNode::_set(const StringName &p_name, const Variant &p_value) {
si.type_right = p_value;
} else if (what == "right_color") {
si.color_right = p_value;
+ } else if (what == "right_icon") {
+ si.custom_slot_right = p_value;
} else {
return false;
}
- set_slot(idx, si.enable_left, si.type_left, si.color_left, si.enable_right, si.type_right, si.color_right);
+ set_slot(idx, si.enable_left, si.type_left, si.color_left, si.enable_right, si.type_right, si.color_right, si.custom_slot_left, si.custom_slot_right);
update();
return true;
}
@@ -120,12 +124,16 @@ bool GraphNode::_get(const StringName &p_name, Variant &r_ret) const {
r_ret = si.type_left;
} else if (what == "left_color") {
r_ret = si.color_left;
+ } else if (what == "left_icon") {
+ r_ret = si.custom_slot_left;
} else if (what == "right_enabled") {
r_ret = si.enable_right;
} else if (what == "right_type") {
r_ret = si.type_right;
} else if (what == "right_color") {
r_ret = si.color_right;
+ } else if (what == "right_icon") {
+ r_ret = si.custom_slot_right;
} else {
return false;
}
@@ -152,9 +160,11 @@ void GraphNode::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::BOOL, base + "left_enabled"));
p_list->push_back(PropertyInfo(Variant::INT, base + "left_type"));
p_list->push_back(PropertyInfo(Variant::COLOR, base + "left_color"));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, base + "left_icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL));
p_list->push_back(PropertyInfo(Variant::BOOL, base + "right_enabled"));
p_list->push_back(PropertyInfo(Variant::INT, base + "right_type"));
p_list->push_back(PropertyInfo(Variant::COLOR, base + "right_color"));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, base + "right_icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NULL));
idx++;
}
@@ -355,7 +365,9 @@ void GraphNode::_shape() {
void GraphNode::set_slot(int p_idx, bool p_enable_left, int p_type_left, const Color &p_color_left, bool p_enable_right, int p_type_right, const Color &p_color_right, const Ref<Texture2D> &p_custom_left, const Ref<Texture2D> &p_custom_right) {
ERR_FAIL_COND(p_idx < 0);
- if (!p_enable_left && p_type_left == 0 && p_color_left == Color(1, 1, 1, 1) && !p_enable_right && p_type_right == 0 && p_color_right == Color(1, 1, 1, 1)) {
+ if (!p_enable_left && p_type_left == 0 && p_color_left == Color(1, 1, 1, 1) &&
+ !p_enable_right && p_type_right == 0 && p_color_right == Color(1, 1, 1, 1) &&
+ !p_custom_left.is_valid() && !p_custom_right.is_valid()) {
slot_info.erase(p_idx);
return;
}
@@ -372,6 +384,8 @@ void GraphNode::set_slot(int p_idx, bool p_enable_left, int p_type_left, const C
slot_info[p_idx] = s;
update();
connpos_dirty = true;
+
+ emit_signal("slot_updated", p_idx);
}
void GraphNode::clear_slot(int p_idx) {
@@ -472,7 +486,6 @@ void GraphNode::set_title(const String &p_title) {
_shape();
update();
- _change_notify("title");
minimum_size_changed();
}
@@ -826,6 +839,7 @@ void GraphNode::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "overlay", PROPERTY_HINT_ENUM, "Disabled,Breakpoint,Position"), "set_overlay", "get_overlay");
ADD_SIGNAL(MethodInfo("position_offset_changed"));
+ ADD_SIGNAL(MethodInfo("slot_updated", PropertyInfo(Variant::INT, "idx")));
ADD_SIGNAL(MethodInfo("dragged", PropertyInfo(Variant::VECTOR2, "from"), PropertyInfo(Variant::VECTOR2, "to")));
ADD_SIGNAL(MethodInfo("raise_request"));
ADD_SIGNAL(MethodInfo("close_request"));
@@ -838,12 +852,5 @@ void GraphNode::_bind_methods() {
GraphNode::GraphNode() {
title_buf.instance();
- overlay = OVERLAY_DISABLED;
- show_close = false;
- connpos_dirty = true;
set_mouse_filter(MOUSE_FILTER_STOP);
- comment = false;
- resizable = false;
- resizing = false;
- selected = false;
}
diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h
index cf66586e6b..1bc54dddb7 100644
--- a/scene/gui/graph_node.h
+++ b/scene/gui/graph_node.h
@@ -46,23 +46,14 @@ public:
private:
struct Slot {
- bool enable_left;
- int type_left;
- Color color_left;
- bool enable_right;
- int type_right;
- Color color_right;
+ bool enable_left = false;
+ int type_left = 0;
+ Color color_left = Color(1, 1, 1, 1);
+ bool enable_right = false;
+ int type_right = 0;
+ Color color_right = Color(1, 1, 1, 1);
Ref<Texture2D> custom_slot_left;
Ref<Texture2D> custom_slot_right;
-
- Slot() {
- enable_left = false;
- type_left = 0;
- color_left = Color(1, 1, 1, 1);
- enable_right = false;
- type_right = 0;
- color_right = Color(1, 1, 1, 1);
- }
};
String title;
@@ -72,12 +63,12 @@ private:
String language;
TextDirection text_direction = TEXT_DIRECTION_AUTO;
- bool show_close;
+ bool show_close = false;
Vector2 position_offset;
- bool comment;
- bool resizable;
+ bool comment = false;
+ bool resizable = false;
- bool resizing;
+ bool resizing = false;
Vector2 resizing_from;
Vector2 resizing_from_size;
@@ -87,7 +78,7 @@ private:
struct ConnCache {
Vector2 pos;
- int type;
+ int type = 0;
Color color;
};
@@ -96,16 +87,16 @@ private:
Map<int, Slot> slot_info;
- bool connpos_dirty;
+ bool connpos_dirty = true;
void _connpos_update();
void _resort();
void _shape();
Vector2 drag_from;
- bool selected;
+ bool selected = false;
- Overlay overlay;
+ Overlay overlay = OVERLAY_DISABLED;
protected:
void _gui_input(const Ref<InputEvent> &p_ev);
diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp
index 11335db54a..541925a802 100644
--- a/scene/gui/grid_container.cpp
+++ b/scene/gui/grid_container.cpp
@@ -261,6 +261,4 @@ Size2 GridContainer::get_minimum_size() const {
return ms;
}
-GridContainer::GridContainer() {
- columns = 1;
-}
+GridContainer::GridContainer() {}
diff --git a/scene/gui/grid_container.h b/scene/gui/grid_container.h
index 8045c94b9a..9b43a5bc7e 100644
--- a/scene/gui/grid_container.h
+++ b/scene/gui/grid_container.h
@@ -36,7 +36,7 @@
class GridContainer : public Container {
GDCLASS(GridContainer, Container);
- int columns;
+ int columns = 1;
protected:
void _notification(int p_what);
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 03ce6bdd3d..7afc04c51c 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -883,6 +883,8 @@ void ItemList::_notification(int p_what) {
int vseparation = get_theme_constant("vseparation");
int icon_margin = get_theme_constant("icon_margin");
int line_separation = get_theme_constant("line_separation");
+ Color font_outline_color = get_theme_color("font_outline_color");
+ int outline_size = get_theme_constant("outline_size");
Ref<StyleBox> sbsel = has_focus() ? get_theme_stylebox("selected_focus") : get_theme_stylebox("selected");
Ref<StyleBox> cursor = has_focus() ? get_theme_stylebox("cursor") : get_theme_stylebox("cursor_unfocused");
@@ -890,7 +892,7 @@ void ItemList::_notification(int p_what) {
Color guide_color = get_theme_color("guide_color");
Color font_color = get_theme_color("font_color");
- Color font_color_selected = get_theme_color("font_color_selected");
+ Color font_selected_color = get_theme_color("font_selected_color");
if (has_focus()) {
RenderingServer::get_singleton()->canvas_item_add_clip_ignore(get_canvas_item(), true);
@@ -899,7 +901,7 @@ void ItemList::_notification(int p_what) {
}
if (shape_changed) {
- float max_column_width = 0;
+ float max_column_width = 0.0;
//1- compute item minimum sizes
for (int i = 0; i < items.size(); i++) {
@@ -1188,13 +1190,12 @@ void ItemList::_notification(int p_what) {
max_len = size2.x;
}
- Color modulate = items[i].selected ? font_color_selected : (items[i].custom_fg != Color() ? items[i].custom_fg : font_color);
+ Color modulate = items[i].selected ? font_selected_color : (items[i].custom_fg != Color() ? items[i].custom_fg : font_color);
if (items[i].disabled) {
modulate.a *= 0.5;
}
if (icon_mode == ICON_MODE_TOP && max_text_lines > 0) {
- text_ofs = text_ofs.floor();
text_ofs += base_ofs;
text_ofs += items[i].rect_cache.position;
@@ -1205,6 +1206,10 @@ void ItemList::_notification(int p_what) {
items.write[i].text_buf->set_width(max_len);
items.write[i].text_buf->set_align(HALIGN_CENTER);
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ items[i].text_buf->draw_outline(get_canvas_item(), text_ofs, outline_size, font_outline_color);
+ }
+
items[i].text_buf->draw(get_canvas_item(), text_ofs, modulate);
} else {
if (fixed_column_width > 0) {
@@ -1217,7 +1222,6 @@ void ItemList::_notification(int p_what) {
text_ofs.y += (items[i].rect_cache.size.height - size2.y) / 2;
}
- text_ofs = text_ofs.floor();
text_ofs += base_ofs;
text_ofs += items[i].rect_cache.position;
@@ -1232,6 +1236,11 @@ void ItemList::_notification(int p_what) {
} else {
items.write[i].text_buf->set_align(HALIGN_LEFT);
}
+
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ items[i].text_buf->draw_outline(get_canvas_item(), text_ofs, outline_size, font_outline_color);
+ }
+
items[i].text_buf->draw(get_canvas_item(), text_ofs, modulate);
}
}
@@ -1617,34 +1626,12 @@ void ItemList::_bind_methods() {
}
ItemList::ItemList() {
- current = -1;
-
- select_mode = SELECT_SINGLE;
- icon_mode = ICON_MODE_LEFT;
-
- fixed_column_width = 0;
- same_column_width = false;
- max_text_lines = 1;
- max_columns = 1;
- auto_height = false;
- auto_height_value = 0.0f;
-
scroll_bar = memnew(VScrollBar);
add_child(scroll_bar);
- shape_changed = true;
scroll_bar->connect("value_changed", callable_mp(this, &ItemList::_scroll_changed));
set_focus_mode(FOCUS_ALL);
- current_columns = 1;
- search_time_msec = 0;
- ensure_selected_visible = false;
- defer_select_single = -1;
- allow_rmb_select = false;
- allow_reselect = false;
- do_autoscroll_to_bottom = false;
-
- icon_scale = 1.0f;
set_clip_contents(true);
}
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index 4982a68071..86a0174a20 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -52,7 +52,7 @@ public:
private:
struct Item {
Ref<Texture2D> icon;
- bool icon_transposed;
+ bool icon_transposed = false;
Rect2i icon_region;
Color icon_modulate;
Ref<Texture2D> tag_icon;
@@ -62,10 +62,10 @@ private:
String language;
TextDirection text_direction = TEXT_DIRECTION_AUTO;
- bool selectable;
- bool selected;
- bool disabled;
- bool tooltip_enabled;
+ bool selectable = false;
+ bool selected = false;
+ bool disabled = false;
+ bool tooltip_enabled = false;
Variant metadata;
String tooltip;
Color custom_fg;
@@ -79,44 +79,44 @@ private:
bool operator<(const Item &p_another) const { return text < p_another.text; }
};
- int current;
+ int current = -1;
- bool shape_changed;
+ bool shape_changed = true;
- bool ensure_selected_visible;
- bool same_column_width;
+ bool ensure_selected_visible = false;
+ bool same_column_width = false;
- bool auto_height;
- float auto_height_value;
+ bool auto_height = false;
+ float auto_height_value = 0.0;
Vector<Item> items;
Vector<int> separators;
- SelectMode select_mode;
- IconMode icon_mode;
+ SelectMode select_mode = SELECT_SINGLE;
+ IconMode icon_mode = ICON_MODE_LEFT;
VScrollBar *scroll_bar;
- uint64_t search_time_msec;
+ uint64_t search_time_msec = 0;
String search_string;
- int current_columns;
- int fixed_column_width;
- int max_text_lines;
- int max_columns;
+ int current_columns = 1;
+ int fixed_column_width = 0;
+ int max_text_lines = 1;
+ int max_columns = 1;
Size2 fixed_icon_size;
Size2 max_item_size_cache;
- int defer_select_single;
+ int defer_select_single = -1;
- bool allow_rmb_select;
+ bool allow_rmb_select = false;
- bool allow_reselect;
+ bool allow_reselect = false;
- real_t icon_scale;
+ real_t icon_scale = 1.0;
- bool do_autoscroll_to_bottom;
+ bool do_autoscroll_to_bottom = false;
Array _get_items() const;
void _set_items(const Array &p_items);
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index bd89fe441c..2997a6ebe9 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -184,17 +184,17 @@ void Label::_notification(int p_what) {
Ref<StyleBox> style = get_theme_stylebox("normal");
Ref<Font> font = get_theme_font("font");
Color font_color = get_theme_color("font_color");
- Color font_color_shadow = get_theme_color("font_color_shadow");
+ Color font_shadow_color = get_theme_color("font_shadow_color");
Point2 shadow_ofs(get_theme_constant("shadow_offset_x"), get_theme_constant("shadow_offset_y"));
int line_spacing = get_theme_constant("line_spacing");
- Color font_outline_modulate = get_theme_color("font_outline_modulate");
+ Color font_outline_color = get_theme_color("font_outline_color");
int outline_size = get_theme_constant("outline_size");
int shadow_outline_size = get_theme_constant("shadow_outline_size");
bool rtl = is_layout_rtl();
style->draw(ci, Rect2(Point2(0, 0), get_size()));
- float total_h = 0;
+ float total_h = 0.0;
int lines_visible = 0;
// Get number of lines to fit to the height.
@@ -298,17 +298,17 @@ void Label::_notification(int p_what) {
for (int j = 0; j < gl_size; j++) {
for (int k = 0; k < glyphs[j].repeat; k++) {
if (glyphs[j].font_rid != RID()) {
- if (font_color_shadow.a > 0) {
- TS->font_draw_glyph(glyphs[j].font_rid, ci, glyphs[j].font_size, ofs + Vector2(glyphs[j].x_off, glyphs[j].y_off) + shadow_ofs, glyphs[j].index, font_color_shadow);
+ if (font_shadow_color.a > 0) {
+ TS->font_draw_glyph(glyphs[j].font_rid, ci, glyphs[j].font_size, ofs + Vector2(glyphs[j].x_off, glyphs[j].y_off) + shadow_ofs, glyphs[j].index, font_shadow_color);
if (shadow_outline_size > 0) {
//draw shadow
- TS->font_draw_glyph_outline(glyphs[j].font_rid, ci, glyphs[j].font_size, shadow_outline_size, ofs + Vector2(glyphs[j].x_off, glyphs[j].y_off) + Vector2(-shadow_ofs.x, shadow_ofs.y), glyphs[j].index, font_color_shadow);
- TS->font_draw_glyph_outline(glyphs[j].font_rid, ci, glyphs[j].font_size, shadow_outline_size, ofs + Vector2(glyphs[j].x_off, glyphs[j].y_off) + Vector2(shadow_ofs.x, -shadow_ofs.y), glyphs[j].index, font_color_shadow);
- TS->font_draw_glyph_outline(glyphs[j].font_rid, ci, glyphs[j].font_size, shadow_outline_size, ofs + Vector2(glyphs[j].x_off, glyphs[j].y_off) + Vector2(-shadow_ofs.x, -shadow_ofs.y), glyphs[j].index, font_color_shadow);
+ TS->font_draw_glyph_outline(glyphs[j].font_rid, ci, glyphs[j].font_size, shadow_outline_size, ofs + Vector2(glyphs[j].x_off, glyphs[j].y_off) + Vector2(-shadow_ofs.x, shadow_ofs.y), glyphs[j].index, font_shadow_color);
+ TS->font_draw_glyph_outline(glyphs[j].font_rid, ci, glyphs[j].font_size, shadow_outline_size, ofs + Vector2(glyphs[j].x_off, glyphs[j].y_off) + Vector2(shadow_ofs.x, -shadow_ofs.y), glyphs[j].index, font_shadow_color);
+ TS->font_draw_glyph_outline(glyphs[j].font_rid, ci, glyphs[j].font_size, shadow_outline_size, ofs + Vector2(glyphs[j].x_off, glyphs[j].y_off) + Vector2(-shadow_ofs.x, -shadow_ofs.y), glyphs[j].index, font_shadow_color);
}
}
- if (font_outline_modulate.a != 0.0 && outline_size > 0) {
- TS->font_draw_glyph_outline(glyphs[j].font_rid, ci, glyphs[j].font_size, outline_size, ofs + Vector2(glyphs[j].x_off, glyphs[j].y_off), glyphs[j].index, font_outline_modulate);
+ if (font_outline_color.a != 0.0 && outline_size > 0) {
+ TS->font_draw_glyph_outline(glyphs[j].font_rid, ci, glyphs[j].font_size, outline_size, ofs + Vector2(glyphs[j].x_off, glyphs[j].y_off), glyphs[j].index, font_outline_color);
}
}
ofs.x += glyphs[j].advance;
@@ -357,21 +357,25 @@ void Label::_notification(int p_what) {
}
Size2 Label::get_minimum_size() const {
- Size2 min_style = get_theme_stylebox("normal")->get_minimum_size();
-
// don't want to mutable everything
if (dirty || lines_dirty) {
const_cast<Label *>(this)->_shape();
}
+ Size2 min_size = minsize;
+
+ Ref<Font> font = get_theme_font("font");
+ min_size.height = MAX(min_size.height, font->get_height(get_theme_font_size("font_size")) + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM));
+
+ Size2 min_style = get_theme_stylebox("normal")->get_minimum_size();
if (autowrap) {
- return Size2(1, clip ? 1 : minsize.height) + min_style;
+ return Size2(1, clip ? 1 : min_size.height) + min_style;
} else {
- Size2 ms = minsize;
if (clip) {
- ms.width = 1;
+ min_size.width = 1;
}
- return ms + min_style;
+
+ return min_size + min_style;
}
}
@@ -391,7 +395,7 @@ int Label::get_visible_line_count() const {
Ref<StyleBox> style = get_theme_stylebox("normal");
int line_spacing = get_theme_constant("line_spacing");
int lines_visible = 0;
- float total_h = 0;
+ float total_h = 0.0;
for (int64_t i = lines_skipped; i < lines_rid.size(); i++) {
total_h += TS->shaped_text_get_size(lines_rid[i]).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM) + line_spacing;
if (total_h > (get_size().height - style->get_minimum_size().height + line_spacing)) {
@@ -538,7 +542,6 @@ void Label::set_visible_characters(int p_amount) {
if (get_total_character_count() > 0) {
percent_visible = (float)p_amount / (float)get_total_character_count();
}
- _change_notify("percent_visible");
update();
}
@@ -555,7 +558,6 @@ void Label::set_percent_visible(float p_percent) {
visible_chars = get_total_character_count() * p_percent;
percent_visible = p_percent;
}
- _change_notify("visible_chars");
update();
}
@@ -610,7 +612,7 @@ bool Label::_set(const StringName &p_name, const Variant &p_value) {
update();
}
}
- _change_notify();
+ notify_property_list_changed();
return true;
}
diff --git a/scene/gui/label.h b/scene/gui/label.h
index 219c6af39e..032b4112e1 100644
--- a/scene/gui/label.h
+++ b/scene/gui/label.h
@@ -72,7 +72,7 @@ private:
Control::StructuredTextParser st_parser = STRUCTURED_TEXT_DEFAULT;
Array st_args;
- float percent_visible = 1;
+ float percent_visible = 1.0;
int visible_chars = -1;
int lines_skipped = 0;
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 5f0bb453f3..ba08aae8e3 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -30,6 +30,7 @@
#include "line_edit.h"
+#include "core/input/input_map.h"
#include "core/object/message_queue.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
@@ -44,6 +45,175 @@
#endif
#include "scene/main/window.h"
+void LineEdit::_swap_current_input_direction() {
+ if (input_direction == TEXT_DIRECTION_LTR) {
+ input_direction = TEXT_DIRECTION_RTL;
+ } else {
+ input_direction = TEXT_DIRECTION_LTR;
+ }
+ set_cursor_position(get_cursor_position());
+ update();
+}
+
+void LineEdit::_move_cursor_left(bool p_select, bool p_move_by_word) {
+ if (selection.enabled && !p_select) {
+ set_cursor_position(selection.begin);
+ deselect();
+ return;
+ }
+
+ shift_selection_check_pre(p_select);
+
+ if (p_move_by_word) {
+ int cc = cursor_pos;
+
+ Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text_rid);
+ for (int i = words.size() - 1; i >= 0; i--) {
+ if (words[i].x < cc) {
+ cc = words[i].x;
+ break;
+ }
+ }
+
+ set_cursor_position(cc);
+ } else {
+ if (mid_grapheme_caret_enabled) {
+ set_cursor_position(get_cursor_position() - 1);
+ } else {
+ set_cursor_position(TS->shaped_text_prev_grapheme_pos(text_rid, get_cursor_position()));
+ }
+ }
+
+ shift_selection_check_post(p_select);
+}
+
+void LineEdit::_move_cursor_right(bool p_select, bool p_move_by_word) {
+ if (selection.enabled && !p_select) {
+ set_cursor_position(selection.end);
+ deselect();
+ return;
+ }
+
+ shift_selection_check_pre(p_select);
+
+ if (p_move_by_word) {
+ int cc = cursor_pos;
+
+ Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text_rid);
+ for (int i = 0; i < words.size(); i++) {
+ if (words[i].y > cc) {
+ cc = words[i].y;
+ break;
+ }
+ }
+
+ set_cursor_position(cc);
+ } else {
+ if (mid_grapheme_caret_enabled) {
+ set_cursor_position(get_cursor_position() + 1);
+ } else {
+ set_cursor_position(TS->shaped_text_next_grapheme_pos(text_rid, get_cursor_position()));
+ }
+ }
+
+ shift_selection_check_post(p_select);
+}
+
+void LineEdit::_move_cursor_start(bool p_select) {
+ shift_selection_check_pre(p_select);
+ set_cursor_position(0);
+ shift_selection_check_post(p_select);
+}
+
+void LineEdit::_move_cursor_end(bool p_select) {
+ shift_selection_check_pre(p_select);
+ set_cursor_position(text.length());
+ shift_selection_check_post(p_select);
+}
+
+void LineEdit::_backspace(bool p_word, bool p_all_to_left) {
+ if (!editable) {
+ return;
+ }
+
+ if (p_all_to_left) {
+ deselect();
+ text = text.substr(0, cursor_pos);
+ _text_changed();
+ return;
+ }
+
+ if (selection.enabled) {
+ selection_delete();
+ return;
+ }
+
+ if (p_word) {
+ int cc = cursor_pos;
+
+ Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text_rid);
+ for (int i = words.size() - 1; i >= 0; i--) {
+ if (words[i].x < cc) {
+ cc = words[i].x;
+ }
+ }
+
+ delete_text(cc, cursor_pos);
+
+ set_cursor_position(cc);
+ } else {
+ delete_char();
+ }
+}
+
+void LineEdit::_delete(bool p_word, bool p_all_to_right) {
+ if (!editable) {
+ return;
+ }
+
+ if (p_all_to_right) {
+ deselect();
+ text = text.substr(cursor_pos, text.length() - cursor_pos);
+ _shape();
+ set_cursor_position(0);
+ _text_changed();
+ return;
+ }
+
+ if (selection.enabled) {
+ selection_delete();
+ return;
+ }
+
+ int text_len = text.length();
+
+ if (cursor_pos == text_len) {
+ return; // Nothing to do.
+ }
+
+ if (p_word) {
+ int cc = cursor_pos;
+ Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text_rid);
+ for (int i = 0; i < words.size(); i++) {
+ if (words[i].y > cc) {
+ cc = words[i].y;
+ break;
+ }
+ }
+
+ delete_text(cursor_pos, cc);
+ } else {
+ if (mid_grapheme_caret_enabled) {
+ set_cursor_position(cursor_pos + 1);
+ delete_char();
+ } else {
+ int cc = cursor_pos;
+ set_cursor_position(TS->shaped_text_next_grapheme_pos(text_rid, cursor_pos));
+ delete_text(cc, cursor_pos);
+ }
+ }
+}
+
void LineEdit::_gui_input(Ref<InputEvent> p_event) {
Ref<InputEventMouseButton> b = p_event;
@@ -55,7 +225,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
if (b->is_pressed() && b->get_button_index() == BUTTON_RIGHT && context_menu_enabled) {
menu->set_position(get_screen_transform().xform(get_local_mouse_position()));
menu->set_size(Vector2(1, 1));
- //menu->set_scale(get_global_transform().get_scale());
+ _generate_context_menu();
menu->popup();
grab_focus();
accept_event();
@@ -121,13 +291,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
selection.creating = false;
selection.doubleclick = false;
- if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_VIRTUAL_KEYBOARD) && virtual_keyboard_enabled) {
- if (selection.enabled) {
- DisplayServer::get_singleton()->virtual_keyboard_show(text, get_global_rect(), false, max_length, selection.begin, selection.end);
- } else {
- DisplayServer::get_singleton()->virtual_keyboard_show(text, get_global_rect(), false, max_length, cursor_pos);
- }
- }
+ show_virtual_keyboard();
}
update();
@@ -159,453 +323,163 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
return;
}
-#ifdef APPLE_STYLE_KEYS
- if (k->get_control() && !k->get_shift() && !k->get_alt() && !k->get_command()) {
- uint32_t remap_key = KEY_UNKNOWN;
- switch (k->get_keycode()) {
- case KEY_F: {
- remap_key = KEY_RIGHT;
- } break;
- case KEY_B: {
- remap_key = KEY_LEFT;
- } break;
- case KEY_P: {
- remap_key = KEY_UP;
- } break;
- case KEY_N: {
- remap_key = KEY_DOWN;
- } break;
- case KEY_D: {
- remap_key = KEY_DELETE;
- } break;
- case KEY_H: {
- remap_key = KEY_BACKSPACE;
- } break;
- case KEY_A: {
- remap_key = KEY_HOME;
- } break;
- case KEY_E: {
- remap_key = KEY_END;
- } break;
+ if (context_menu_enabled) {
+ if (k->is_action("ui_menu", true)) {
+ Point2 pos = Point2(get_cursor_pixel_pos().x, (get_size().y + get_theme_font("font")->get_height(get_theme_font_size("font_size"))) / 2);
+ menu->set_position(get_global_transform().xform(pos));
+ menu->set_size(Vector2(1, 1));
+ _generate_context_menu();
+ menu->popup();
+ menu->grab_focus();
}
+ }
- if (remap_key != KEY_UNKNOWN) {
- k->set_keycode(remap_key);
- k->set_control(false);
+ // Default is ENTER, KP_ENTER. Cannot use ui_accept as default includes SPACE
+ if (k->is_action("ui_text_newline", true)) {
+ emit_signal("text_entered", text);
+ if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_VIRTUAL_KEYBOARD) && virtual_keyboard_enabled) {
+ DisplayServer::get_singleton()->virtual_keyboard_hide();
}
}
-#endif
-
- unsigned int code = k->get_keycode();
-
- if (k->get_command() && is_shortcut_keys_enabled()) {
- bool handled = true;
-
- switch (code) {
- case (KEY_QUOTELEFT): { // Swap current input direction (primary cursor)
-
- if (input_direction == TEXT_DIRECTION_LTR) {
- input_direction = TEXT_DIRECTION_RTL;
- } else {
- input_direction = TEXT_DIRECTION_LTR;
- }
- set_cursor_position(get_cursor_position());
- update();
-
- } break;
-
- case (KEY_X): { // CUT.
-
- if (editable) {
- cut_text();
- }
-
- } break;
- case (KEY_C): { // COPY.
-
- copy_text();
-
- } break;
-
- case (KEY_Y): // PASTE (Yank for unix users).
- case (KEY_V): { // PASTE.
-
- if (editable) {
- paste_text();
- }
-
- } break;
-
- case (KEY_Z): { // Undo/redo.
- if (editable) {
- if (k->get_shift()) {
- redo();
- } else {
- undo();
- }
- }
- } break;
-
- case (KEY_U): { // Delete from start to cursor.
-
- if (editable) {
- deselect();
- text = text.substr(cursor_pos, text.length() - cursor_pos);
- _shape();
- set_cursor_position(0);
- _text_changed();
- }
-
- } break;
-
- case (KEY_K): { // Delete from cursor_pos to end.
-
- if (editable) {
- deselect();
- text = text.substr(0, cursor_pos);
- _text_changed();
- }
+ if (is_shortcut_keys_enabled()) {
+ if (k->is_action("ui_copy", true)) {
+ copy_text();
+ accept_event();
+ return;
+ }
- } break;
- case (KEY_A): { // Select all.
- select();
+ if (k->is_action("ui_text_select_all", true)) {
+ select();
+ accept_event();
+ return;
+ }
- } break;
-#ifdef APPLE_STYLE_KEYS
- case (KEY_LEFT): { // Go to start of text - like HOME key.
- shift_selection_check_pre(k->get_shift());
- set_cursor_position(0);
- shift_selection_check_post(k->get_shift());
- } break;
- case (KEY_RIGHT): { // Go to end of text - like END key.
- shift_selection_check_pre(k->get_shift());
- set_cursor_position(text.length());
- shift_selection_check_post(k->get_shift());
- } break;
- case (KEY_BACKSPACE): {
- if (!editable)
- break;
+ // Cut / Paste
+ if (k->is_action("ui_cut", true)) {
+ cut_text();
+ accept_event();
+ return;
+ }
- // If selected, delete the selection
- if (selection.enabled) {
- selection_delete();
- break;
- }
+ if (k->is_action("ui_paste", true)) {
+ paste_text();
+ accept_event();
+ return;
+ }
- // Otherwise delete from cursor to beginning of text edit
- int current_pos = get_cursor_position();
- if (current_pos != 0) {
- delete_text(0, current_pos);
- }
- } break;
-#endif
- default: {
- handled = false;
- }
+ // Undo / Redo
+ if (k->is_action("ui_undo", true)) {
+ undo();
+ accept_event();
+ return;
}
- if (handled) {
+ if (k->is_action("ui_redo", true)) {
+ redo();
accept_event();
return;
}
}
- _reset_caret_blink_timer();
- if (!k->get_metakey()) {
- bool handled = true;
- switch (code) {
- case KEY_KP_ENTER:
- case KEY_ENTER: {
- emit_signal("text_entered", text);
- if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_VIRTUAL_KEYBOARD) && virtual_keyboard_enabled) {
- DisplayServer::get_singleton()->virtual_keyboard_hide();
- }
-
- } break;
-
- case KEY_BACKSPACE: {
- if (!editable) {
- break;
- }
-
- if (selection.enabled) {
- selection_delete();
- break;
- }
-
-#ifdef APPLE_STYLE_KEYS
- if (k->get_alt()) {
-#else
- if (k->get_alt()) {
- handled = false;
- break;
- } else if (k->get_command()) {
-#endif
- int cc = cursor_pos;
-
- Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text_rid);
- for (int i = words.size() - 1; i >= 0; i--) {
- if (words[i].x < cc) {
- cc = words[i].x;
- break;
- }
- }
-
- delete_text(cc, cursor_pos);
-
- set_cursor_position(cc);
-
- } else {
- delete_char();
- }
-
- } break;
- case KEY_KP_4: {
- if (k->get_unicode() != 0) {
- handled = false;
- break;
- }
- [[fallthrough]];
- }
- case KEY_LEFT: {
-#ifndef APPLE_STYLE_KEYS
- if (!k->get_alt()) {
-#endif
- if (selection.enabled && !k->get_shift()) {
- set_cursor_position(selection.begin);
- deselect();
- handled = true;
- break;
- }
-
- shift_selection_check_pre(k->get_shift());
-#ifndef APPLE_STYLE_KEYS
- }
-#endif
-
-#ifdef APPLE_STYLE_KEYS
- if (k->get_command()) {
- set_cursor_position(0);
- } else if (k->get_alt()) {
-#else
- if (k->get_alt()) {
- handled = false;
- break;
- } else if (k->get_command()) {
-#endif
- int cc = cursor_pos;
-
- Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text_rid);
- for (int i = words.size() - 1; i >= 0; i--) {
- if (words[i].x < cc) {
- cc = words[i].x;
- break;
- }
- }
-
- set_cursor_position(cc);
-
- } else {
- if (mid_grapheme_caret_enabled) {
- set_cursor_position(get_cursor_position() - 1);
- } else {
- set_cursor_position(TS->shaped_text_prev_grapheme_pos(text_rid, get_cursor_position()));
- }
- }
-
- shift_selection_check_post(k->get_shift());
-
- } break;
- case KEY_KP_6: {
- if (k->get_unicode() != 0) {
- handled = false;
- break;
- }
- [[fallthrough]];
- }
- case KEY_RIGHT: {
-#ifndef APPLE_STYLE_KEYS
- if (!k->get_alt()) {
-#endif
- if (selection.enabled && !k->get_shift()) {
- set_cursor_position(selection.end);
- deselect();
- handled = true;
- break;
- }
-
- shift_selection_check_pre(k->get_shift());
-#ifndef APPLE_STYLE_KEYS
- }
-#endif
-
-#ifdef APPLE_STYLE_KEYS
- if (k->get_command()) {
- set_cursor_position(text.length());
- } else if (k->get_alt()) {
-#else
- if (k->get_alt()) {
- handled = false;
- break;
- } else if (k->get_command()) {
-#endif
- int cc = cursor_pos;
-
- Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text_rid);
- for (int i = 0; i < words.size(); i++) {
- if (words[i].y > cc) {
- cc = words[i].y;
- break;
- }
- }
-
- set_cursor_position(cc);
-
- } else {
- if (mid_grapheme_caret_enabled) {
- set_cursor_position(get_cursor_position() + 1);
- } else {
- set_cursor_position(TS->shaped_text_next_grapheme_pos(text_rid, get_cursor_position()));
- }
- }
-
- shift_selection_check_post(k->get_shift());
-
- } break;
- case KEY_UP: {
- shift_selection_check_pre(k->get_shift());
- if (get_cursor_position() == 0) {
- handled = false;
- }
- set_cursor_position(0);
- shift_selection_check_post(k->get_shift());
- } break;
- case KEY_DOWN: {
- shift_selection_check_pre(k->get_shift());
- if (get_cursor_position() == text.length()) {
- handled = false;
- }
- set_cursor_position(text.length());
- shift_selection_check_post(k->get_shift());
- } break;
- case KEY_DELETE: {
- if (!editable) {
- break;
- }
-
- if (k->get_shift() && !k->get_command() && !k->get_alt()) {
- cut_text();
- break;
- }
-
- if (selection.enabled) {
- selection_delete();
- break;
- }
-
- int text_len = text.length();
+ // BACKSPACE
+ if (k->is_action("ui_text_backspace_all_to_left", true)) {
+ _backspace(false, true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_backspace_word", true)) {
+ _backspace(true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_backspace", true)) {
+ _backspace();
+ accept_event();
+ return;
+ }
- if (cursor_pos == text_len) {
- break; // Nothing to do.
- }
+ // DELETE
+ if (k->is_action("ui_text_delete_all_to_right", true)) {
+ _delete(false, true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_delete_word", true)) {
+ _delete(true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_delete", true)) {
+ _delete();
+ accept_event();
+ return;
+ }
-#ifdef APPLE_STYLE_KEYS
- if (k->get_alt()) {
-#else
- if (k->get_alt()) {
- handled = false;
- break;
- } else if (k->get_command()) {
-#endif
- int cc = cursor_pos;
+ // Cursor Movement
- Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text_rid);
- for (int i = 0; i < words.size(); i++) {
- if (words[i].y > cc) {
- cc = words[i].y;
- break;
- }
- }
+ k = k->duplicate();
+ bool shift_pressed = k->get_shift();
+ // Remove shift or else actions will not match. Use above variable for selection.
+ k->set_shift(false);
- delete_text(cursor_pos, cc);
+ if (k->is_action("ui_text_caret_word_left", true)) {
+ _move_cursor_left(shift_pressed, true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_caret_left", true)) {
+ _move_cursor_left(shift_pressed);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_caret_word_right", true)) {
+ _move_cursor_right(shift_pressed, true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_caret_right", true)) {
+ _move_cursor_right(shift_pressed, false);
+ accept_event();
+ return;
+ }
- } else {
- if (mid_grapheme_caret_enabled) {
- set_cursor_position(cursor_pos + 1);
- delete_char();
- } else {
- int cc = cursor_pos;
- set_cursor_position(TS->shaped_text_next_grapheme_pos(text_rid, cursor_pos));
- delete_text(cc, cursor_pos);
- }
- }
+ // Up = Home, Down = End
+ if (k->is_action("ui_text_caret_up", true) || k->is_action("ui_text_caret_line_start", true) || k->is_action("ui_text_caret_page_up", true)) {
+ _move_cursor_start(shift_pressed);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_caret_down", true) || k->is_action("ui_text_caret_line_end", true) || k->is_action("ui_text_caret_page_down", true)) {
+ _move_cursor_end(shift_pressed);
+ accept_event();
+ return;
+ }
- } break;
- case KEY_KP_7: {
- if (k->get_unicode() != 0) {
- handled = false;
- break;
- }
- [[fallthrough]];
- }
- case KEY_HOME: {
- shift_selection_check_pre(k->get_shift());
- set_cursor_position(0);
- shift_selection_check_post(k->get_shift());
- } break;
- case KEY_KP_1: {
- if (k->get_unicode() != 0) {
- handled = false;
- break;
- }
- [[fallthrough]];
- }
- case KEY_END: {
- shift_selection_check_pre(k->get_shift());
- set_cursor_position(text.length());
- shift_selection_check_post(k->get_shift());
- } break;
- case KEY_MENU: {
- if (context_menu_enabled) {
- Point2 pos = Point2(get_cursor_pixel_pos().x, (get_size().y + get_theme_font("font")->get_height(get_theme_font_size("font_size"))) / 2);
- menu->set_position(get_global_transform().xform(pos));
- menu->set_size(Vector2(1, 1));
- //menu->set_scale(get_global_transform().get_scale());
- menu->popup();
- menu->grab_focus();
- }
- } break;
+ // Misc
+ if (k->is_action("ui_swap_input_direction", true)) {
+ _swap_current_input_direction();
+ accept_event();
+ return;
+ }
- default: {
- handled = false;
- } break;
- }
+ _reset_caret_blink_timer();
- if (handled) {
- accept_event();
- } else if (!k->get_command()) {
- if (k->get_unicode() >= 32 && k->get_keycode() != KEY_DELETE) {
- if (editable) {
- selection_delete();
- char32_t ucodestr[2] = { (char32_t)k->get_unicode(), 0 };
- int prev_len = text.length();
- append_at_cursor(ucodestr);
- if (text.length() != prev_len) {
- _text_changed();
- }
- accept_event();
- }
+ // Allow unicode handling if:
+ // * No Modifiers are pressed (except shift)
+ bool allow_unicode_handling = !(k->get_command() || k->get_control() || k->get_alt() || k->get_metakey());
- } else {
- return;
- }
+ if (allow_unicode_handling && editable && k->get_unicode() >= 32) {
+ // Handle Unicode (if no modifiers active)
+ selection_delete();
+ char32_t ucodestr[2] = { (char32_t)k->get_unicode(), 0 };
+ int prev_len = text.length();
+ append_at_cursor(ucodestr);
+ if (text.length() != prev_len) {
+ _text_changed();
}
-
- update();
+ accept_event();
}
-
- return;
}
}
@@ -635,10 +509,17 @@ Variant LineEdit::get_drag_data(const Point2 &p_point) {
}
bool LineEdit::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
+ bool drop_override = Control::can_drop_data(p_point, p_data); // In case user wants to drop custom data.
+ if (drop_override) {
+ return drop_override;
+ }
+
return p_data.get_type() == Variant::STRING;
}
void LineEdit::drop_data(const Point2 &p_point, const Variant &p_data) {
+ Control::drop_data(p_point, p_data);
+
if (p_data.get_type() == Variant::STRING) {
set_cursor_at_pixel_pos(p_point.x);
int selected = selection.end - selection.begin;
@@ -770,8 +651,8 @@ void LineEdit::_notification(int p_what) {
int y_ofs = style->get_offset().y + (y_area - text_height) / 2;
Color selection_color = get_theme_color("selection_color");
- Color font_color = is_editable() ? get_theme_color("font_color") : get_theme_color("font_color_uneditable");
- Color font_color_selected = get_theme_color("font_color_selected");
+ Color font_color = is_editable() ? get_theme_color("font_color") : get_theme_color("font_uneditable_color");
+ Color font_selected_color = get_theme_color("font_selected_color");
Color cursor_color = get_theme_color("cursor_color");
// Draw placeholder color.
@@ -834,14 +715,32 @@ void LineEdit::_notification(int p_what) {
// Draw text.
ofs.y += TS->shaped_text_get_ascent(text_rid);
+ Color font_outline_color = get_theme_color("font_outline_color");
+ int outline_size = get_theme_constant("outline_size");
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ Vector2 oofs = ofs;
+ for (int i = 0; i < gl_size; i++) {
+ for (int j = 0; j < glyphs[i].repeat; j++) {
+ if (ceil(oofs.x) >= x_ofs && (oofs.x + glyphs[i].advance) <= ofs_max) {
+ if (glyphs[i].font_rid != RID()) {
+ TS->font_draw_glyph_outline(glyphs[i].font_rid, ci, glyphs[i].font_size, outline_size, oofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, font_outline_color);
+ }
+ }
+ oofs.x += glyphs[i].advance;
+ }
+ if (oofs.x >= ofs_max) {
+ break;
+ }
+ }
+ }
for (int i = 0; i < gl_size; i++) {
bool selected = selection.enabled && glyphs[i].start >= selection.begin && glyphs[i].end <= selection.end;
for (int j = 0; j < glyphs[i].repeat; j++) {
if (ceil(ofs.x) >= x_ofs && (ofs.x + glyphs[i].advance) <= ofs_max) {
if (glyphs[i].font_rid != RID()) {
- TS->font_draw_glyph(glyphs[i].font_rid, ci, glyphs[i].font_size, ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, selected ? font_color_selected : font_color);
+ TS->font_draw_glyph(glyphs[i].font_rid, ci, glyphs[i].font_size, ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, selected ? font_selected_color : font_color);
} else if ((glyphs[i].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) {
- TS->draw_hex_code_box(ci, glyphs[i].font_size, ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, selected ? font_color_selected : font_color);
+ TS->draw_hex_code_box(ci, glyphs[i].font_size, ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, selected ? font_selected_color : font_color);
}
}
ofs.x += glyphs[i].advance;
@@ -953,14 +852,7 @@ void LineEdit::_notification(int p_what) {
DisplayServer::get_singleton()->window_set_ime_position(get_global_position() + cursor_pos, get_viewport()->get_window_id());
}
- if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_VIRTUAL_KEYBOARD) && virtual_keyboard_enabled) {
- if (selection.enabled) {
- DisplayServer::get_singleton()->virtual_keyboard_show(text, get_global_rect(), false, max_length, selection.begin, selection.end);
- } else {
- DisplayServer::get_singleton()->virtual_keyboard_show(text, get_global_rect(), false, max_length, cursor_pos);
- }
- }
-
+ show_virtual_keyboard();
} break;
case NOTIFICATION_FOCUS_EXIT: {
if (caret_blink_enabled && !caret_force_displayed) {
@@ -1001,13 +893,17 @@ void LineEdit::copy_text() {
}
void LineEdit::cut_text() {
- if (selection.enabled && !pass) {
+ if (editable && selection.enabled && !pass) {
DisplayServer::get_singleton()->clipboard_set(text.substr(selection.begin, selection.end - selection.begin));
selection_delete();
}
}
void LineEdit::paste_text() {
+ if (!editable) {
+ return;
+ }
+
// Strip escape characters like \n and \t as they can't be displayed on LineEdit.
String paste_buffer = DisplayServer::get_singleton()->clipboard_get().strip_escapes();
@@ -1028,6 +924,10 @@ void LineEdit::paste_text() {
}
void LineEdit::undo() {
+ if (!editable) {
+ return;
+ }
+
if (undo_stack_pos == nullptr) {
if (undo_stack.size() <= 1) {
return;
@@ -1047,6 +947,10 @@ void LineEdit::undo() {
}
void LineEdit::redo() {
+ if (!editable) {
+ return;
+ }
+
if (undo_stack_pos == nullptr) {
return;
}
@@ -1407,6 +1311,21 @@ Array LineEdit::get_structured_text_bidi_override_options() const {
void LineEdit::clear() {
clear_internal();
_text_changed();
+
+ // This should reset virtual keyboard state if needed.
+ if (has_focus()) {
+ show_virtual_keyboard();
+ }
+}
+
+void LineEdit::show_virtual_keyboard() {
+ if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_VIRTUAL_KEYBOARD) && virtual_keyboard_enabled) {
+ if (selection.enabled) {
+ DisplayServer::get_singleton()->virtual_keyboard_show(text, get_global_rect(), false, max_length, selection.begin, selection.end);
+ } else {
+ DisplayServer::get_singleton()->virtual_keyboard_show(text, get_global_rect(), false, max_length, cursor_pos);
+ }
+ }
}
String LineEdit::get_text() const {
@@ -1559,12 +1478,12 @@ Size2 LineEdit::get_minimum_size() const {
Size2 min_size;
// Minimum size of text.
- int space_size = font->get_char_size('m', 0, font_size).x;
- min_size.width = get_theme_constant("minimum_spaces") * space_size;
+ int em_space_size = font->get_char_size('M', 0, font_size).x;
+ min_size.width = get_theme_constant("minimum_character_width") * em_space_size;
if (expand_to_text_length) {
// Add a space because some fonts are too exact, and because cursor needs a bit more when at the end.
- min_size.width = MAX(min_size.width, full_width + space_size);
+ min_size.width = MAX(min_size.width, full_width + em_space_size);
}
min_size.height = MAX(TS->shaped_text_get_size(text_rid).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM), font->get_height(font_size));
@@ -1949,7 +1868,6 @@ void LineEdit::_text_changed() {
void LineEdit::_emit_text_change() {
emit_signal("text_changed", text);
- _change_notify("text");
text_changed_dirty = false;
}
@@ -2034,25 +1952,50 @@ void LineEdit::_create_undo_state() {
undo_stack.push_back(op);
}
+int LineEdit::_get_menu_action_accelerator(const String &p_action) {
+ const List<Ref<InputEvent>> *events = InputMap::get_singleton()->action_get_events(p_action);
+ if (!events) {
+ return 0;
+ }
+
+ // Use first event in the list for the accelerator.
+ const List<Ref<InputEvent>>::Element *first_event = events->front();
+ if (!first_event) {
+ return 0;
+ }
+
+ const Ref<InputEventKey> event = first_event->get();
+ if (event.is_null()) {
+ return 0;
+ }
+
+ // Use physical keycode if non-zero
+ if (event->get_physical_keycode() != 0) {
+ return event->get_physical_keycode_with_modifiers();
+ } else {
+ return event->get_keycode_with_modifiers();
+ }
+}
+
void LineEdit::_generate_context_menu() {
// Reorganize context menu.
menu->clear();
if (editable) {
- menu->add_item(RTR("Cut"), MENU_CUT, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_X : 0);
+ menu->add_item(RTR("Cut"), MENU_CUT, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_cut") : 0);
}
- menu->add_item(RTR("Copy"), MENU_COPY, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_C : 0);
+ menu->add_item(RTR("Copy"), MENU_COPY, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_copy") : 0);
if (editable) {
- menu->add_item(RTR("Paste"), MENU_PASTE, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_V : 0);
+ menu->add_item(RTR("Paste"), MENU_PASTE, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_paste") : 0);
}
menu->add_separator();
if (is_selecting_enabled()) {
- menu->add_item(RTR("Select All"), MENU_SELECT_ALL, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_A : 0);
+ menu->add_item(RTR("Select All"), MENU_SELECT_ALL, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_text_select_all") : 0);
}
if (editable) {
menu->add_item(RTR("Clear"), MENU_CLEAR);
menu->add_separator();
- menu->add_item(RTR("Undo"), MENU_UNDO, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_Z : 0);
- menu->add_item(RTR("Redo"), MENU_REDO, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_Z : 0);
+ menu->add_item(RTR("Undo"), MENU_UNDO, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_undo") : 0);
+ menu->add_item(RTR("Redo"), MENU_REDO, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_redo") : 0);
}
menu->add_separator();
menu->add_submenu_item(RTR("Text writing direction"), "DirMenu");
@@ -2082,7 +2025,7 @@ bool LineEdit::_set(const StringName &p_name, const Variant &p_value) {
update();
}
}
- _change_notify();
+ notify_property_list_changed();
return true;
}
@@ -2255,9 +2198,6 @@ LineEdit::LineEdit() {
text_rid = TS->create_shaped_text();
_create_undo_state();
- clear_button_status.press_attempt = false;
- clear_button_status.pressing_inside = false;
-
deselect();
set_focus_mode(FOCUS_ALL);
set_default_cursor_shape(CURSOR_IBEAM);
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index 1e7495e734..cbadf818cd 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -94,7 +94,7 @@ private:
Point2 ime_selection;
RID text_rid;
- float full_width = 0;
+ float full_width = 0.0;
bool selecting_enabled = true;
@@ -129,19 +129,19 @@ private:
Ref<Texture2D> right_icon;
struct Selection {
- int begin;
- int end;
- int cursor_start;
- bool enabled;
- bool creating;
- bool doubleclick;
- bool drag_attempt;
+ int begin = 0;
+ int end = 0;
+ int cursor_start = 0;
+ bool enabled = false;
+ bool creating = false;
+ bool doubleclick = false;
+ bool drag_attempt = false;
} selection;
struct TextOperation {
- int cursor_pos;
- int scroll_offset;
- int cached_width;
+ int cursor_pos = 0;
+ int scroll_offset = 0;
+ int cached_width = 0;
String text;
};
List<TextOperation> undo_stack;
@@ -163,6 +163,7 @@ private:
void _clear_redo();
void _create_undo_state();
+ int _get_menu_action_accelerator(const String &p_action);
void _generate_context_menu();
void _shape();
@@ -188,6 +189,14 @@ private:
void _editor_settings_changed();
+ void _swap_current_input_direction();
+ void _move_cursor_left(bool p_select, bool p_move_by_word = false);
+ void _move_cursor_right(bool p_select, bool p_move_by_word = false);
+ void _move_cursor_start(bool p_select);
+ void _move_cursor_end(bool p_select);
+ void _backspace(bool p_word = false, bool p_all_to_left = false);
+ void _delete(bool p_word = false, bool p_all_to_right = false);
+
void _gui_input(Ref<InputEvent> p_event);
void _notification(int p_what);
@@ -306,6 +315,9 @@ public:
Ref<Texture2D> get_right_icon();
virtual bool is_text_field() const override;
+
+ void show_virtual_keyboard();
+
LineEdit();
~LineEdit();
};
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index 495529017a..1f7b61e3d1 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -163,8 +163,8 @@ void LinkButton::_notification(int p_what) {
} break;
case DRAW_HOVER_PRESSED:
case DRAW_PRESSED: {
- if (has_theme_color("font_color_pressed")) {
- color = get_theme_color("font_color_pressed");
+ if (has_theme_color("font_pressed_color")) {
+ color = get_theme_color("font_pressed_color");
} else {
color = get_theme_color("font_color");
}
@@ -173,12 +173,12 @@ void LinkButton::_notification(int p_what) {
} break;
case DRAW_HOVER: {
- color = get_theme_color("font_color_hover");
+ color = get_theme_color("font_hover_color");
do_underline = underline_mode != UNDERLINE_MODE_NEVER;
} break;
case DRAW_DISABLED: {
- color = get_theme_color("font_color_disabled");
+ color = get_theme_color("font_disabled_color");
do_underline = underline_mode == UNDERLINE_MODE_ALWAYS;
} break;
@@ -191,9 +191,17 @@ void LinkButton::_notification(int p_what) {
int width = text_buf->get_line_width();
+ Color font_outline_color = get_theme_color("font_outline_color");
+ int outline_size = get_theme_constant("outline_size");
if (is_layout_rtl()) {
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ text_buf->draw_outline(get_canvas_item(), Vector2(size.width - width, 0), outline_size, font_outline_color);
+ }
text_buf->draw(get_canvas_item(), Vector2(size.width - width, 0), color);
} else {
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ text_buf->draw_outline(get_canvas_item(), Vector2(0, 0), outline_size, font_outline_color);
+ }
text_buf->draw(get_canvas_item(), Vector2(0, 0), color);
}
@@ -231,7 +239,7 @@ bool LinkButton::_set(const StringName &p_name, const Variant &p_value) {
update();
}
}
- _change_notify();
+ notify_property_list_changed();
return true;
}
@@ -294,7 +302,6 @@ void LinkButton::_bind_methods() {
LinkButton::LinkButton() {
text_buf.instance();
- underline_mode = UNDERLINE_MODE_ALWAYS;
set_focus_mode(FOCUS_NONE);
set_default_cursor_shape(CURSOR_POINTING_HAND);
}
diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h
index 5ab6aba122..7eaa9f88b6 100644
--- a/scene/gui/link_button.h
+++ b/scene/gui/link_button.h
@@ -48,7 +48,7 @@ public:
private:
String text;
Ref<TextLine> text_buf;
- UnderlineMode underline_mode;
+ UnderlineMode underline_mode = UNDERLINE_MODE_ALWAYS;
Dictionary opentype_features;
String language;
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index 94cb5ef0f4..5acc7e808a 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -118,7 +118,6 @@ void MenuButton::set_disable_shortcuts(bool p_disabled) {
}
MenuButton::MenuButton() {
- switch_on_hover = false;
set_flat(true);
set_toggle_mode(true);
set_disable_shortcuts(false);
diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h
index cd4ed5bcb2..fd9ae6021e 100644
--- a/scene/gui/menu_button.h
+++ b/scene/gui/menu_button.h
@@ -37,9 +37,9 @@
class MenuButton : public Button {
GDCLASS(MenuButton, Button);
- bool clicked;
- bool switch_on_hover;
- bool disable_shortcuts;
+ bool clicked = false;
+ bool switch_on_hover = false;
+ bool disable_shortcuts = false;
PopupMenu *popup;
Array _get_items() const;
diff --git a/scene/gui/nine_patch_rect.cpp b/scene/gui/nine_patch_rect.cpp
index c274eb5c10..29a38ad5e3 100644
--- a/scene/gui/nine_patch_rect.cpp
+++ b/scene/gui/nine_patch_rect.cpp
@@ -98,7 +98,6 @@ void NinePatchRect::set_texture(const Ref<Texture2D> &p_tex) {
*/
minimum_size_changed();
emit_signal("texture_changed");
- _change_notify("texture");
}
Ref<Texture2D> NinePatchRect::get_texture() const {
@@ -110,20 +109,6 @@ void NinePatchRect::set_patch_margin(Side p_side, int p_size) {
margin[p_side] = p_size;
update();
minimum_size_changed();
- switch (p_side) {
- case SIDE_LEFT:
- _change_notify("patch_margin_left");
- break;
- case SIDE_TOP:
- _change_notify("patch_margin_top");
- break;
- case SIDE_RIGHT:
- _change_notify("patch_margin_right");
- break;
- case SIDE_BOTTOM:
- _change_notify("patch_margin_bottom");
- break;
- }
}
int NinePatchRect::get_patch_margin(Side p_side) const {
@@ -139,7 +124,6 @@ void NinePatchRect::set_region_rect(const Rect2 &p_region_rect) {
region_rect = p_region_rect;
item_rect_changed();
- _change_notify("region_rect");
}
Rect2 NinePatchRect::get_region_rect() const {
@@ -174,16 +158,7 @@ NinePatchRect::AxisStretchMode NinePatchRect::get_v_axis_stretch_mode() const {
}
NinePatchRect::NinePatchRect() {
- margin[SIDE_LEFT] = 0;
- margin[SIDE_RIGHT] = 0;
- margin[SIDE_BOTTOM] = 0;
- margin[SIDE_TOP] = 0;
-
set_mouse_filter(MOUSE_FILTER_IGNORE);
- draw_center = true;
-
- axis_h = AXIS_STRETCH_MODE_STRETCH;
- axis_v = AXIS_STRETCH_MODE_STRETCH;
}
NinePatchRect::~NinePatchRect() {
diff --git a/scene/gui/nine_patch_rect.h b/scene/gui/nine_patch_rect.h
index fcf25018aa..f9a3f31fe5 100644
--- a/scene/gui/nine_patch_rect.h
+++ b/scene/gui/nine_patch_rect.h
@@ -43,12 +43,13 @@ public:
AXIS_STRETCH_MODE_TILE_FIT,
};
- bool draw_center;
- int margin[4];
+ bool draw_center = true;
+ int margin[4] = {};
Rect2 region_rect;
Ref<Texture2D> texture;
- AxisStretchMode axis_h, axis_v;
+ AxisStretchMode axis_h = AXIS_STRETCH_MODE_STRETCH;
+ AxisStretchMode axis_v = AXIS_STRETCH_MODE_STRETCH;
protected:
void _notification(int p_what);
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 4f274595a2..e52b6917be 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -62,13 +62,13 @@ void OptionButton::_notification(int p_what) {
if (get_theme_constant("modulate_arrow")) {
switch (get_draw_mode()) {
case DRAW_PRESSED:
- clr = get_theme_color("font_color_pressed");
+ clr = get_theme_color("font_pressed_color");
break;
case DRAW_HOVER:
- clr = get_theme_color("font_color_hover");
+ clr = get_theme_color("font_hover_color");
break;
case DRAW_DISABLED:
- clr = get_theme_color("font_color_disabled");
+ clr = get_theme_color("font_disabled_color");
break;
default:
clr = get_theme_color("font_color");
@@ -336,7 +336,6 @@ void OptionButton::_bind_methods() {
}
OptionButton::OptionButton() {
- current = -1;
set_toggle_mode(true);
set_text_align(ALIGN_LEFT);
if (is_layout_rtl()) {
diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h
index 9cb296baa9..d846e395ad 100644
--- a/scene/gui/option_button.h
+++ b/scene/gui/option_button.h
@@ -38,7 +38,7 @@ class OptionButton : public Button {
GDCLASS(OptionButton, Button);
PopupMenu *popup;
- int current;
+ int current = -1;
void _focused(int p_which);
void _selected(int p_which);
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index e777e6c26b..f237f79be1 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -52,8 +52,8 @@ Size2 PopupMenu::_get_contents_minimum_size() const {
Size2 minsize = get_theme_stylebox("panel")->get_minimum_size(); // Accounts for margin in the margin container
minsize.x += scroll_container->get_v_scrollbar()->get_size().width * 2; // Adds a buffer so that the scrollbar does not render over the top of content
- float max_w = 0;
- float icon_w = 0;
+ float max_w = 0.0;
+ float icon_w = 0.0;
int check_w = MAX(get_theme_icon("checked")->get_width(), get_theme_icon("radio_checked")->get_width()) + hseparation;
int accel_max_w = 0;
bool has_check = false;
@@ -62,7 +62,7 @@ Size2 PopupMenu::_get_contents_minimum_size() const {
Size2 size;
Size2 icon_size = items[i].get_icon_size();
- size.height = MAX(icon_size.height, items[i].text_buf->get_size().y);
+ size.height = _get_item_height(i);
icon_w = MAX(icon_size.width, icon_w);
size.width += items[i].h_ofs;
@@ -89,7 +89,9 @@ Size2 PopupMenu::_get_contents_minimum_size() const {
minsize.height += size.height;
}
- minsize.width += max_w + icon_w + accel_max_w;
+ int item_side_padding = get_theme_constant("item_start_padding") + get_theme_constant("item_end_padding");
+ minsize.width += max_w + icon_w + accel_max_w + item_side_padding;
+
if (has_check) {
minsize.width += check_w;
}
@@ -104,13 +106,35 @@ Size2 PopupMenu::_get_contents_minimum_size() const {
return minsize;
}
+int PopupMenu::_get_item_height(int p_item) const {
+ ERR_FAIL_INDEX_V(p_item, items.size(), 0);
+ ERR_FAIL_COND_V(p_item < 0, 0);
+
+ int icon_height = items[p_item].get_icon_size().height;
+ if (items[p_item].checkable_type) {
+ icon_height = MAX(icon_height, MAX(get_theme_icon("checked")->get_height(), get_theme_icon("radio_checked")->get_height()));
+ }
+
+ int text_height = items[p_item].text_buf->get_size().height;
+ if (text_height == 0 && !items[p_item].separator) {
+ text_height = get_theme_font("font")->get_height(get_theme_font_size("font_size"));
+ }
+
+ int separator_height = 0;
+ if (items[p_item].separator) {
+ separator_height = MAX(get_theme_stylebox("separator")->get_minimum_size().height, MAX(get_theme_stylebox("labeled_separator_left")->get_minimum_size().height, get_theme_stylebox("labeled_separator_right")->get_minimum_size().height));
+ }
+
+ return MAX(separator_height, MAX(text_height, icon_height));
+}
+
int PopupMenu::_get_items_total_height() const {
int vsep = get_theme_constant("vseparation");
// Get total height of all items by taking max of icon height and font height
int items_total_height = 0;
for (int i = 0; i < items.size(); i++) {
- items_total_height += MAX(items[i].get_icon_size().height, items[i].text_buf->get_size().y) + vsep;
+ items_total_height += _get_item_height(i) + vsep;
}
// Subtract a separator which is not needed for the last item.
@@ -152,7 +176,7 @@ int PopupMenu::_get_mouse_over(const Point2 &p_over) const {
for (int i = 0; i < items.size(); i++) {
ofs.y += i > 0 ? vseparation : (float)vseparation / 2;
- ofs.y += MAX(items[i].get_icon_size().height, items[i].text_buf->get_size().y);
+ ofs.y += _get_item_height(i);
if (p_over.y - control->get_position().y < ofs.y) {
return i;
@@ -451,6 +475,10 @@ void PopupMenu::_draw_items() {
margin_size.width = margin_container->get_theme_constant("margin_right") + margin_container->get_theme_constant("margin_left");
margin_size.height = margin_container->get_theme_constant("margin_top") + margin_container->get_theme_constant("margin_bottom");
+ // Space between the item content and the sides of popup menu.
+ int item_start_padding = get_theme_constant("item_start_padding");
+ int item_end_padding = get_theme_constant("item_end_padding");
+
bool rtl = control->is_layout_rtl();
Ref<StyleBox> style = get_theme_stylebox("panel");
Ref<StyleBox> hover = get_theme_stylebox("hover");
@@ -471,10 +499,10 @@ void PopupMenu::_draw_items() {
int vseparation = get_theme_constant("vseparation");
int hseparation = get_theme_constant("hseparation");
Color font_color = get_theme_color("font_color");
- Color font_color_disabled = get_theme_color("font_color_disabled");
- Color font_color_accel = get_theme_color("font_color_accel");
- Color font_color_hover = get_theme_color("font_color_hover");
- Color font_color_separator = get_theme_color("font_color_separator");
+ Color font_disabled_color = get_theme_color("font_disabled_color");
+ Color font_accelerator_color = get_theme_color("font_accelerator_color");
+ Color font_hover_color = get_theme_color("font_hover_color");
+ Color font_separator_color = get_theme_color("font_separator_color");
float scroll_width = scroll_container->get_v_scrollbar()->is_visible_in_tree() ? scroll_container->get_v_scrollbar()->get_size().width : 0;
float display_width = control->get_size().width - scroll_width;
@@ -509,7 +537,7 @@ void PopupMenu::_draw_items() {
Point2 item_ofs = ofs;
Size2 icon_size = items[i].get_icon_size();
- float h = MAX(icon_size.height, items[i].text_buf->get_size().y);
+ float h = _get_item_height(i);
if (i == mouse_over) {
if (rtl) {
@@ -525,24 +553,28 @@ void PopupMenu::_draw_items() {
item_ofs.x += items[i].h_ofs;
if (items[i].separator) {
int sep_h = separator->get_center_size().height + separator->get_minimum_size().height;
+ int sep_ofs = Math::floor((h - sep_h) / 2.0);
if (text != String()) {
int text_size = items[i].text_buf->get_size().width;
int text_center = display_width / 2;
int text_left = text_center - text_size / 2;
int text_right = text_center + text_size / 2;
if (text_left > item_ofs.x) {
- labeled_separator_left->draw(ci, Rect2(item_ofs + Point2(0, Math::floor((h - sep_h) / 2.0)), Size2(MAX(0, text_left - item_ofs.x), sep_h)));
+ labeled_separator_left->draw(ci, Rect2(item_ofs + Point2(0, sep_ofs), Size2(MAX(0, text_left - item_ofs.x), sep_h)));
}
if (text_right < display_width) {
- labeled_separator_right->draw(ci, Rect2(Point2(text_right, item_ofs.y + Math::floor((h - sep_h) / 2.0)), Size2(MAX(0, display_width - text_right), sep_h)));
+ labeled_separator_right->draw(ci, Rect2(Point2(text_right, item_ofs.y + sep_ofs), Size2(MAX(0, display_width - text_right), sep_h)));
}
} else {
- separator->draw(ci, Rect2(item_ofs + Point2(0, Math::floor((h - sep_h) / 2.0)), Size2(display_width, sep_h)));
+ separator->draw(ci, Rect2(item_ofs + Point2(0, sep_ofs), Size2(display_width, sep_h)));
}
}
Color icon_color(1, 1, 1, items[i].disabled ? 0.5 : 1);
+ // For non-separator items, add some padding for the content.
+ item_ofs.x += item_start_padding;
+
// Checkboxes
if (items[i].checkable_type) {
Texture2D *icon = (items[i].checked ? check[items[i].checkable_type - 1] : uncheck[items[i].checkable_type - 1]).ptr();
@@ -565,35 +597,53 @@ void PopupMenu::_draw_items() {
// Submenu arrow on right hand side
if (items[i].submenu != "") {
if (rtl) {
- submenu->draw(ci, Point2(scroll_width + style->get_margin(SIDE_LEFT), item_ofs.y + Math::floor(h - submenu->get_height()) / 2), icon_color);
+ submenu->draw(ci, Point2(scroll_width + style->get_margin(SIDE_LEFT) + item_end_padding, item_ofs.y + Math::floor(h - submenu->get_height()) / 2), icon_color);
} else {
- submenu->draw(ci, Point2(display_width - style->get_margin(SIDE_RIGHT) - submenu->get_width(), item_ofs.y + Math::floor(h - submenu->get_height()) / 2), icon_color);
+ submenu->draw(ci, Point2(display_width - style->get_margin(SIDE_RIGHT) - submenu->get_width() - item_end_padding, item_ofs.y + Math::floor(h - submenu->get_height()) / 2), icon_color);
}
}
// Text
+ Color font_outline_color = get_theme_color("font_outline_color");
+ int outline_size = get_theme_constant("outline_size");
if (items[i].separator) {
if (text != String()) {
int center = (display_width - items[i].text_buf->get_size().width) / 2;
- items[i].text_buf->draw(ci, Point2(center, item_ofs.y + Math::floor((h - items[i].text_buf->get_size().y) / 2.0)), font_color_separator);
+ Vector2 text_pos = Point2(center, item_ofs.y + Math::floor((h - items[i].text_buf->get_size().y) / 2.0));
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ items[i].text_buf->draw_outline(ci, text_pos, outline_size, font_outline_color);
+ }
+ items[i].text_buf->draw(ci, text_pos, font_separator_color);
}
} else {
item_ofs.x += icon_ofs + check_ofs;
if (rtl) {
- items[i].text_buf->draw(ci, Size2(control->get_size().width - items[i].text_buf->get_size().width - item_ofs.x, item_ofs.y) + Point2(0, Math::floor((h - items[i].text_buf->get_size().y) / 2.0)), items[i].disabled ? font_color_disabled : (i == mouse_over ? font_color_hover : font_color));
+ Vector2 text_pos = Size2(control->get_size().width - items[i].text_buf->get_size().width - item_ofs.x, item_ofs.y) + Point2(0, Math::floor((h - items[i].text_buf->get_size().y) / 2.0));
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ items[i].text_buf->draw_outline(ci, text_pos, outline_size, font_outline_color);
+ }
+ items[i].text_buf->draw(ci, text_pos, items[i].disabled ? font_disabled_color : (i == mouse_over ? font_hover_color : font_color));
} else {
- items[i].text_buf->draw(ci, item_ofs + Point2(0, Math::floor((h - items[i].text_buf->get_size().y) / 2.0)), items[i].disabled ? font_color_disabled : (i == mouse_over ? font_color_hover : font_color));
+ Vector2 text_pos = item_ofs + Point2(0, Math::floor((h - items[i].text_buf->get_size().y) / 2.0));
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ items[i].text_buf->draw_outline(ci, text_pos, outline_size, font_outline_color);
+ }
+ items[i].text_buf->draw(ci, text_pos, items[i].disabled ? font_disabled_color : (i == mouse_over ? font_hover_color : font_color));
}
}
// Accelerator / Shortcut
if (items[i].accel || (items[i].shortcut.is_valid() && items[i].shortcut->is_valid())) {
if (rtl) {
- item_ofs.x = scroll_width + style->get_margin(SIDE_LEFT);
+ item_ofs.x = scroll_width + style->get_margin(SIDE_LEFT) + item_end_padding;
} else {
- item_ofs.x = display_width - style->get_margin(SIDE_RIGHT) - items[i].accel_text_buf->get_size().x;
+ item_ofs.x = display_width - style->get_margin(SIDE_RIGHT) - items[i].accel_text_buf->get_size().x - item_end_padding;
+ }
+ Vector2 text_pos = item_ofs + Point2(0, Math::floor((h - items[i].text_buf->get_size().y) / 2.0));
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ items[i].accel_text_buf->draw_outline(ci, text_pos, outline_size, font_outline_color);
}
- items[i].accel_text_buf->draw(ci, item_ofs + Point2(0, Math::floor((h - items[i].text_buf->get_size().y) / 2.0)), i == mouse_over ? font_color_hover : font_color_accel);
+ items[i].accel_text_buf->draw(ci, text_pos, i == mouse_over ? font_hover_color : font_accelerator_color);
}
// Cache the item vertical offset from the first item and the height
@@ -1656,19 +1706,6 @@ PopupMenu::PopupMenu() {
connect("window_input", callable_mp(this, &PopupMenu::_gui_input));
- mouse_over = -1;
- submenu_over = -1;
- initial_button_mask = 0;
- during_grabbed_click = false;
-
- allow_search = true;
- search_time_msec = 0;
- search_string = "";
-
- set_hide_on_item_selection(true);
- set_hide_on_checkable_item_selection(true);
- set_hide_on_multistate_item_selection(false);
-
submenu_timer = memnew(Timer);
submenu_timer->set_wait_time(0.3);
submenu_timer->set_one_shot(true);
diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h
index c050e61d50..e4cbe984c9 100644
--- a/scene/gui/popup_menu.h
+++ b/scene/gui/popup_menu.h
@@ -51,28 +51,28 @@ class PopupMenu : public Popup {
String language;
Control::TextDirection text_direction = Control::TEXT_DIRECTION_AUTO;
- bool checked;
+ bool checked = false;
enum {
CHECKABLE_TYPE_NONE,
CHECKABLE_TYPE_CHECK_BOX,
CHECKABLE_TYPE_RADIO_BUTTON,
} checkable_type;
- int max_states;
- int state;
- bool separator;
- bool disabled;
- bool dirty;
- int id;
+ int max_states = 0;
+ int state = 0;
+ bool separator = false;
+ bool disabled = false;
+ bool dirty = true;
+ int id = 0;
Variant metadata;
String submenu;
String tooltip;
- uint32_t accel;
- int _ofs_cache;
- int _height_cache;
- int h_ofs;
+ uint32_t accel = 0;
+ int _ofs_cache = 0;
+ int _height_cache = 0;
+ int h_ofs = 0;
Ref<Shortcut> shortcut;
- bool shortcut_is_global;
- bool shortcut_is_disabled;
+ bool shortcut_is_global = false;
+ bool shortcut_is_disabled = false;
// Returns (0,0) if icon is null.
Size2 get_icon_size() const {
@@ -82,19 +82,7 @@ class PopupMenu : public Popup {
Item() {
text_buf.instance();
accel_text_buf.instance();
- dirty = true;
- checked = false;
checkable_type = CHECKABLE_TYPE_NONE;
- separator = false;
- max_states = 0;
- state = 0;
- accel = 0;
- disabled = false;
- _ofs_cache = 0;
- _height_cache = 0;
- h_ofs = 0;
- shortcut_is_global = false;
- shortcut_is_disabled = false;
}
};
@@ -104,15 +92,16 @@ class PopupMenu : public Popup {
Timer *submenu_timer;
List<Rect2> autohide_areas;
Vector<Item> items;
- int initial_button_mask;
- bool during_grabbed_click;
- int mouse_over;
- int submenu_over;
+ int initial_button_mask = 0;
+ bool during_grabbed_click = false;
+ int mouse_over = -1;
+ int submenu_over = -1;
Rect2 parent_rect;
String _get_accel_text(const Item &p_item) const;
int _get_mouse_over(const Point2 &p_over) const;
virtual Size2 _get_contents_minimum_size() const override;
+ int _get_item_height(int p_item) const;
int _get_items_total_height() const;
void _scroll_to_item(int p_item);
@@ -123,9 +112,9 @@ class PopupMenu : public Popup {
void _submenu_timeout();
uint64_t popup_time_msec = 0;
- bool hide_on_item_selection;
- bool hide_on_checkable_item_selection;
- bool hide_on_multistate_item_selection;
+ bool hide_on_item_selection = true;
+ bool hide_on_checkable_item_selection = true;
+ bool hide_on_multistate_item_selection = false;
Vector2 moved;
Array _get_items() const;
@@ -136,9 +125,9 @@ class PopupMenu : public Popup {
void _ref_shortcut(Ref<Shortcut> p_sc);
void _unref_shortcut(Ref<Shortcut> p_sc);
- bool allow_search;
- uint64_t search_time_msec;
- String search_string;
+ bool allow_search = true;
+ uint64_t search_time_msec = 0;
+ String search_string = "";
MarginContainer *margin_container;
ScrollContainer *scroll_container;
diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp
index 1b33cc6ffb..6e8dfd5994 100644
--- a/scene/gui/progress_bar.cpp
+++ b/scene/gui/progress_bar.cpp
@@ -74,7 +74,13 @@ void ProgressBar::_notification(int p_what) {
if (percent_visible) {
String txt = TS->format_number(itos(int(get_as_ratio() * 100))) + TS->percent_sign();
TextLine tl = TextLine(txt, font, font_size);
- tl.draw(get_canvas_item(), (Point2(get_size().width - tl.get_size().x, get_size().height - tl.get_size().y) / 2).round(), font_color);
+ Vector2 text_pos = (Point2(get_size().width - tl.get_size().x, get_size().height - tl.get_size().y) / 2).round();
+ Color font_outline_color = get_theme_color("font_outline_color");
+ int outline_size = get_theme_constant("outline_size");
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ tl.draw_outline(get_canvas_item(), text_pos, outline_size, font_outline_color);
+ }
+ tl.draw(get_canvas_item(), text_pos, font_color);
}
}
}
@@ -98,5 +104,4 @@ void ProgressBar::_bind_methods() {
ProgressBar::ProgressBar() {
set_v_size_flags(0);
set_step(0.01);
- percent_visible = true;
}
diff --git a/scene/gui/progress_bar.h b/scene/gui/progress_bar.h
index 3317846108..fb6060d932 100644
--- a/scene/gui/progress_bar.h
+++ b/scene/gui/progress_bar.h
@@ -36,7 +36,7 @@
class ProgressBar : public Range {
GDCLASS(ProgressBar, Range);
- bool percent_visible;
+ bool percent_visible = true;
protected:
void _notification(int p_what);
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index b9ac6d7505..86b775e795 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -47,7 +47,6 @@ void Range::_value_changed_notify() {
_value_changed(shared->val);
emit_signal("value_changed", shared->val);
update();
- _change_notify("value");
}
void Range::Shared::emit_value_changed() {
@@ -63,7 +62,6 @@ void Range::Shared::emit_value_changed() {
void Range::_changed_notify(const char *p_what) {
emit_signal("changed");
update();
- _change_notify(p_what);
}
void Range::Shared::emit_changed(const char *p_what) {
@@ -171,7 +169,10 @@ void Range::set_as_ratio(double p_value) {
}
double Range::get_as_ratio() const {
- ERR_FAIL_COND_V_MSG(Math::is_equal_approx(get_max(), get_min()), 0.0, "Cannot get ratio when minimum and maximum value are equal.");
+ if (Math::is_equal_approx(get_max(), get_min())) {
+ // Avoid division by zero.
+ return 1.0;
+ }
if (shared->exp_ratio && get_min() >= 0) {
double exp_min = get_min() == 0 ? 0.0 : Math::log(get_min()) / Math::log((double)2);
@@ -311,17 +312,7 @@ bool Range::is_lesser_allowed() const {
Range::Range() {
shared = memnew(Shared);
- shared->min = 0;
- shared->max = 100;
- shared->val = 0;
- shared->step = 1;
- shared->page = 0;
shared->owners.insert(this);
- shared->exp_ratio = false;
- shared->allow_greater = false;
- shared->allow_lesser = false;
-
- _rounded_values = false;
}
Range::~Range() {
diff --git a/scene/gui/range.h b/scene/gui/range.h
index 68ff46bd74..1072a109c6 100644
--- a/scene/gui/range.h
+++ b/scene/gui/range.h
@@ -37,11 +37,14 @@ class Range : public Control {
GDCLASS(Range, Control);
struct Shared {
- double val, min, max;
- double step, page;
- bool exp_ratio;
- bool allow_greater;
- bool allow_lesser;
+ double val = 0.0;
+ double min = 0.0;
+ double max = 100.0;
+ double step = 1.0;
+ double page = 0.0;
+ bool exp_ratio = false;
+ bool allow_greater = false;
+ bool allow_lesser = false;
Set<Range *> owners;
void emit_value_changed();
void emit_changed(const char *p_what = "");
@@ -62,7 +65,7 @@ protected:
static void _bind_methods();
- bool _rounded_values;
+ bool _rounded_values = false;
public:
void set_value(double p_val);
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index e934772371..a79c633502 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -45,7 +45,7 @@
#include "editor/editor_scale.h"
#endif
-RichTextLabel::Item *RichTextLabel::_get_next_item(Item *p_item, bool p_free) {
+RichTextLabel::Item *RichTextLabel::_get_next_item(Item *p_item, bool p_free) const {
if (p_free) {
if (p_item->subitems.size()) {
return p_item->subitems.front()->get();
@@ -90,7 +90,7 @@ RichTextLabel::Item *RichTextLabel::_get_next_item(Item *p_item, bool p_free) {
return nullptr;
}
-RichTextLabel::Item *RichTextLabel::_get_prev_item(Item *p_item, bool p_free) {
+RichTextLabel::Item *RichTextLabel::_get_prev_item(Item *p_item, bool p_free) const {
if (p_free) {
if (p_item->subitems.size()) {
return p_item->subitems.back()->get();
@@ -147,7 +147,7 @@ RichTextLabel::Item *RichTextLabel::_get_item_at_pos(RichTextLabel::Item *p_item
case ITEM_TEXT: {
ItemText *t = (ItemText *)it;
offset += t->text.length();
- if (offset > p_position) {
+ if (offset >= p_position) {
return it;
}
} break;
@@ -220,7 +220,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font>
if (tab_size > 0) { // Align inline tabs.
Vector<float> tabs;
- tabs.push_back(tab_size * p_base_font->get_char_size('m', 0, p_base_font_size).width);
+ tabs.push_back(tab_size * p_base_font->get_char_size(' ', 0, p_base_font_size).width);
l.text_buf->tab_align(tabs);
}
@@ -314,7 +314,7 @@ void RichTextLabel::_resize_line(ItemFrame *p_frame, int p_line, const Ref<Font>
table->rows.clear();
Vector2 offset;
- float row_height = 0;
+ float row_height = 0.0;
for (List<Item *>::Element *E = table->subitems.front(); E; E = E->next()) {
ERR_CONTINUE(E->get()->type != ITEM_FRAME); // Children should all be frames.
@@ -392,7 +392,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
if (tab_size > 0) { // Align inline tabs.
Vector<float> tabs;
- tabs.push_back(tab_size * p_base_font->get_char_size('m', 0, p_base_font_size).width);
+ tabs.push_back(tab_size * p_base_font->get_char_size(' ', 0, p_base_font_size).width);
l.text_buf->tab_align(tabs);
}
@@ -454,6 +454,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
ItemImage *img = (ItemImage *)it;
l.text_buf->add_object((uint64_t)it, img->image->get_size(), img->inline_align, 1);
text += String::chr(0xfffc);
+ l.char_count += 1;
} break;
case ITEM_TABLE: {
ItemTable *table = static_cast<ItemTable *>(it);
@@ -553,7 +554,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
table->rows.clear();
Vector2 offset;
- float row_height = 0;
+ float row_height = 0.0;
for (List<Item *>::Element *E = table->subitems.front(); E; E = E->next()) {
ERR_CONTINUE(E->get()->type != ITEM_FRAME); // Children should all be frames.
@@ -618,7 +619,7 @@ void RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
}
}
-int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_ofs, int p_width, const Color &p_base_color, int p_outline_size, const Color &p_outline_color, const Color &p_font_color_shadow, bool p_shadow_as_outline, const Point2 &p_shadow_ofs) {
+int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_ofs, int p_width, const Color &p_base_color, int p_outline_size, const Color &p_outline_color, const Color &p_font_shadow_color, bool p_shadow_as_outline, const Point2 &p_shadow_ofs) {
Vector2 off;
ERR_FAIL_COND_V(p_frame == nullptr, 0);
@@ -776,6 +777,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
Color odd_row_bg = get_theme_color("table_odd_row_bg");
Color even_row_bg = get_theme_color("table_even_row_bg");
Color border = get_theme_color("table_border");
+ int hseparation = get_theme_constant("table_hseparation");
int col_count = table->columns.size();
int row_count = table->rows.size();
@@ -792,15 +794,15 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
coff.x = rect.size.width - table->columns[col].width - coff.x;
}
if (row % 2 == 0) {
- draw_rect(Rect2(p_ofs + rect.position + off + coff - frame->padding.position, Size2(table->columns[col].width, table->rows[row])), (frame->odd_row_bg != Color(0, 0, 0, 0) ? frame->odd_row_bg : odd_row_bg), true);
+ draw_rect(Rect2(p_ofs + rect.position + off + coff - frame->padding.position, Size2(table->columns[col].width + hseparation + frame->padding.position.x + frame->padding.size.x, table->rows[row])), (frame->odd_row_bg != Color(0, 0, 0, 0) ? frame->odd_row_bg : odd_row_bg), true);
} else {
- draw_rect(Rect2(p_ofs + rect.position + off + coff - frame->padding.position, Size2(table->columns[col].width, table->rows[row])), (frame->even_row_bg != Color(0, 0, 0, 0) ? frame->even_row_bg : even_row_bg), true);
+ draw_rect(Rect2(p_ofs + rect.position + off + coff - frame->padding.position, Size2(table->columns[col].width + hseparation + frame->padding.position.x + frame->padding.size.x, table->rows[row])), (frame->even_row_bg != Color(0, 0, 0, 0) ? frame->even_row_bg : even_row_bg), true);
}
- draw_rect(Rect2(p_ofs + rect.position + off + coff - frame->padding.position, Size2(table->columns[col].width, table->rows[row])), (frame->border != Color(0, 0, 0, 0) ? frame->border : border), false);
+ draw_rect(Rect2(p_ofs + rect.position + off + coff - frame->padding.position, Size2(table->columns[col].width + hseparation + frame->padding.position.x + frame->padding.size.x, table->rows[row])), (frame->border != Color(0, 0, 0, 0) ? frame->border : border), false);
}
for (int j = 0; j < frame->lines.size(); j++) {
- _draw_line(frame, j, p_ofs + rect.position + off + Vector2(0, frame->lines[j].offset.y), rect.size.x, p_base_color, p_outline_size, p_outline_color, p_font_color_shadow, p_shadow_as_outline, p_shadow_ofs);
+ _draw_line(frame, j, p_ofs + rect.position + off + Vector2(0, frame->lines[j].offset.y), rect.size.x, p_base_color, p_outline_size, p_outline_color, p_font_shadow_color, p_shadow_as_outline, p_shadow_ofs);
}
idx++;
}
@@ -819,8 +821,8 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
// Draw oulines and shadow.
for (int i = 0; i < gl_size; i++) {
Item *it = _get_item_at_pos(it_from, it_to, glyphs[i].start);
- int size = _find_outline_size(it);
- Color font_color = _find_outline_color(it, Color(0, 0, 0, 0));
+ int size = _find_outline_size(it, p_outline_size);
+ Color font_color = _find_outline_color(it, p_outline_color);
if (size <= 0) {
gloff.x += glyphs[i].advance;
continue;
@@ -920,9 +922,9 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
if (visible) {
if (frid != RID()) {
if (p_shadow_as_outline) {
- TS->font_draw_glyph_outline(frid, ci, glyphs[i].font_size, size, p_ofs + fx_offset + gloff + Vector2(-shadow_ofs.x, shadow_ofs.y), gl, p_font_color_shadow);
- TS->font_draw_glyph_outline(frid, ci, glyphs[i].font_size, size, p_ofs + fx_offset + gloff + Vector2(shadow_ofs.x, -shadow_ofs.y), gl, p_font_color_shadow);
- TS->font_draw_glyph_outline(frid, ci, glyphs[i].font_size, size, p_ofs + fx_offset + gloff + Vector2(-shadow_ofs.x, -shadow_ofs.y), gl, p_font_color_shadow);
+ TS->font_draw_glyph_outline(frid, ci, glyphs[i].font_size, size, p_ofs + fx_offset + gloff + Vector2(-shadow_ofs.x, shadow_ofs.y), gl, p_font_shadow_color);
+ TS->font_draw_glyph_outline(frid, ci, glyphs[i].font_size, size, p_ofs + fx_offset + gloff + Vector2(shadow_ofs.x, -shadow_ofs.y), gl, p_font_shadow_color);
+ TS->font_draw_glyph_outline(frid, ci, glyphs[i].font_size, size, p_ofs + fx_offset + gloff + Vector2(-shadow_ofs.x, -shadow_ofs.y), gl, p_font_shadow_color);
}
TS->font_draw_glyph_outline(frid, ci, glyphs[i].font_size, size, p_ofs + fx_offset + gloff, gl, font_color);
}
@@ -932,7 +934,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
}
// Draw main text.
- Color selection_fg = get_theme_color("font_color_selected");
+ Color selection_fg = get_theme_color("font_selected_color");
Color selection_bg = get_theme_color("selection_color");
int sel_start = -1;
@@ -1398,9 +1400,9 @@ void RichTextLabel::_notification(int p_what) {
}
Ref<Font> base_font = get_theme_font("normal_font");
Color base_color = get_theme_color("default_color");
- Color outline_color = get_theme_color("outline_color");
+ Color outline_color = get_theme_color("font_outline_color");
int outline_size = get_theme_constant("outline_size");
- Color font_color_shadow = get_theme_color("font_color_shadow");
+ Color font_shadow_color = get_theme_color("font_shadow_color");
bool use_outline = get_theme_constant("shadow_as_outline");
Point2 shadow_ofs(get_theme_constant("shadow_offset_x"), get_theme_constant("shadow_offset_y"));
@@ -1411,7 +1413,7 @@ void RichTextLabel::_notification(int p_what) {
Point2 ofs = text_rect.get_position() + Vector2(0, main->lines[from_line].offset.y - vofs);
while (ofs.y < size.height && from_line < main->lines.size()) {
visible_paragraph_count++;
- visible_line_count += _draw_line(main, from_line, ofs, text_rect.size.x, base_color, outline_size, outline_color, font_color_shadow, use_outline, shadow_ofs);
+ visible_line_count += _draw_line(main, from_line, ofs, text_rect.size.x, base_color, outline_size, outline_color, font_shadow_color, use_outline, shadow_ofs);
ofs.y += main->lines[from_line].text_buf->get_size().y;
from_line++;
}
@@ -1573,53 +1575,36 @@ void RichTextLabel::_gui_input(Ref<InputEvent> p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
- if (k->is_pressed() && !k->get_alt() && !k->get_shift()) {
+ if (k->is_pressed()) {
bool handled = false;
- switch (k->get_keycode()) {
- case KEY_PAGEUP: {
- if (vscroll->is_visible_in_tree()) {
- vscroll->set_value(vscroll->get_value() - vscroll->get_page());
- handled = true;
- }
- } break;
- case KEY_PAGEDOWN: {
- if (vscroll->is_visible_in_tree()) {
- vscroll->set_value(vscroll->get_value() + vscroll->get_page());
- handled = true;
- }
- } break;
- case KEY_UP: {
- if (vscroll->is_visible_in_tree()) {
- vscroll->set_value(vscroll->get_value() - get_theme_font("normal_font")->get_height(get_theme_font_size("normal_font_size")));
- handled = true;
- }
- } break;
- case KEY_DOWN: {
- if (vscroll->is_visible_in_tree()) {
- vscroll->set_value(vscroll->get_value() + get_theme_font("normal_font")->get_height(get_theme_font_size("normal_font_size")));
- handled = true;
- }
- } break;
- case KEY_HOME: {
- if (vscroll->is_visible_in_tree()) {
- vscroll->set_value(0);
- handled = true;
- }
- } break;
- case KEY_END: {
- if (vscroll->is_visible_in_tree()) {
- vscroll->set_value(vscroll->get_max());
- handled = true;
- }
- } break;
- case KEY_INSERT:
- case KEY_C: {
- if (k->get_command()) {
- selection_copy();
- handled = true;
- }
- } break;
+ if (k->is_action("ui_pageup") && vscroll->is_visible_in_tree()) {
+ vscroll->set_value(vscroll->get_value() - vscroll->get_page());
+ handled = true;
+ }
+ if (k->is_action("ui_pagedown") && vscroll->is_visible_in_tree()) {
+ vscroll->set_value(vscroll->get_value() + vscroll->get_page());
+ handled = true;
+ }
+ if (k->is_action("ui_up") && vscroll->is_visible_in_tree()) {
+ vscroll->set_value(vscroll->get_value() - get_theme_font("normal_font")->get_height(get_theme_font_size("normal_font_size")));
+ handled = true;
+ }
+ if (k->is_action("ui_down") && vscroll->is_visible_in_tree()) {
+ vscroll->set_value(vscroll->get_value() + get_theme_font("normal_font")->get_height(get_theme_font_size("normal_font_size")));
+ handled = true;
+ }
+ if (k->is_action("ui_home") && vscroll->is_visible_in_tree()) {
+ vscroll->set_value(0);
+ handled = true;
+ }
+ if (k->is_action("ui_end") && vscroll->is_visible_in_tree()) {
+ vscroll->set_value(vscroll->get_max());
+ handled = true;
+ }
+ if (k->is_action("ui_copy")) {
+ selection_copy();
+ handled = true;
}
if (handled) {
@@ -1753,7 +1738,7 @@ int RichTextLabel::_find_font_size(Item *p_item) {
return -1;
}
-int RichTextLabel::_find_outline_size(Item *p_item) {
+int RichTextLabel::_find_outline_size(Item *p_item, int p_default) {
Item *sizeitem = p_item;
while (sizeitem) {
@@ -1765,7 +1750,7 @@ int RichTextLabel::_find_outline_size(Item *p_item) {
sizeitem = sizeitem->parent;
}
- return 0;
+ return p_default;
}
Dictionary RichTextLabel::_find_font_features(Item *p_item) {
@@ -1847,7 +1832,7 @@ int RichTextLabel::_find_list(Item *p_item, Vector<int> &r_index, Vector<ItemLis
int RichTextLabel::_find_margin(Item *p_item, const Ref<Font> &p_base_font, int p_base_font_size) {
Item *item = p_item;
- float margin = 0;
+ float margin = 0.0;
while (item) {
if (item->type == ITEM_INDENT) {
@@ -1859,7 +1844,7 @@ int RichTextLabel::_find_margin(Item *p_item, const Ref<Font> &p_base_font, int
if (font_size == -1) {
font_size = p_base_font_size;
}
- margin += tab_size * font->get_char_size('m', 0, font_size).width;
+ margin += tab_size * font->get_char_size(' ', 0, font_size).width;
} else if (item->type == ITEM_LIST) {
Ref<Font> font = _find_font(item);
@@ -1870,7 +1855,7 @@ int RichTextLabel::_find_margin(Item *p_item, const Ref<Font> &p_base_font, int
if (font_size == -1) {
font_size = p_base_font_size;
}
- margin += tab_size * font->get_char_size('m', 0, font_size).width;
+ margin += tab_size * font->get_char_size(' ', 0, font_size).width;
}
item = item->parent;
@@ -2252,6 +2237,8 @@ void RichTextLabel::add_image(const Ref<Texture2D> &p_image, const int p_width,
}
ERR_FAIL_COND(p_image.is_null());
+ ERR_FAIL_COND(p_image->get_width() == 0);
+ ERR_FAIL_COND(p_image->get_height() == 0);
ItemImage *item = memnew(ItemImage);
item->image = p_image;
@@ -3520,7 +3507,7 @@ bool RichTextLabel::search(const String &p_string, bool p_from_selection, bool p
return false;
}
-String RichTextLabel::_get_line_text(ItemFrame *p_frame, int p_line, Selection p_selection) {
+String RichTextLabel::_get_line_text(ItemFrame *p_frame, int p_line, Selection p_selection) const {
String text;
ERR_FAIL_COND_V(p_frame == nullptr, text);
ERR_FAIL_COND_V(p_line < 0 || p_line >= p_frame->lines.size(), text);
@@ -3587,7 +3574,7 @@ String RichTextLabel::_get_line_text(ItemFrame *p_frame, int p_line, Selection p
return text;
}
-String RichTextLabel::get_selected_text() {
+String RichTextLabel::get_selected_text() const {
if (!selection.active || !selection.enabled) {
return "";
}
@@ -3611,6 +3598,22 @@ bool RichTextLabel::is_selection_enabled() const {
return selection.enabled;
}
+int RichTextLabel::get_selection_from() const {
+ if (!selection.active || !selection.enabled) {
+ return -1;
+ }
+
+ return selection.from_frame->lines[selection.from_line].char_offset + selection.from_char;
+}
+
+int RichTextLabel::get_selection_to() const {
+ if (!selection.active || !selection.enabled) {
+ return -1;
+ }
+
+ return selection.to_frame->lines[selection.to_line].char_offset + selection.to_char - 1;
+}
+
void RichTextLabel::set_bbcode(const String &p_bbcode) {
bbcode = p_bbcode;
if (is_inside_tree() && use_bbcode) {
@@ -3646,6 +3649,8 @@ String RichTextLabel::get_text() {
text += t->text;
} else if (it->type == ITEM_NEWLINE) {
text += "\n";
+ } else if (it->type == ITEM_IMAGE) {
+ text += " ";
} else if (it->type == ITEM_INDENT || it->type == ITEM_LIST) {
text += "\t";
}
@@ -3722,7 +3727,6 @@ void RichTextLabel::set_percent_visible(float p_percent) {
}
main->first_invalid_line = 0; //invalidate ALL
_validate_line_caches(main);
- _change_notify("visible_characters");
update();
}
}
@@ -3839,6 +3843,11 @@ void RichTextLabel::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_selection_enabled", "enabled"), &RichTextLabel::set_selection_enabled);
ClassDB::bind_method(D_METHOD("is_selection_enabled"), &RichTextLabel::is_selection_enabled);
+ ClassDB::bind_method(D_METHOD("get_selection_from"), &RichTextLabel::get_selection_from);
+ ClassDB::bind_method(D_METHOD("get_selection_to"), &RichTextLabel::get_selection_to);
+
+ ClassDB::bind_method(D_METHOD("get_selected_text"), &RichTextLabel::get_selected_text);
+
ClassDB::bind_method(D_METHOD("parse_bbcode", "bbcode"), &RichTextLabel::parse_bbcode);
ClassDB::bind_method(D_METHOD("append_bbcode", "bbcode"), &RichTextLabel::append_bbcode);
@@ -3948,7 +3957,6 @@ void RichTextLabel::set_visible_characters(int p_visible) {
percent_visible = (float)p_visible / (float)total_char_count;
}
}
- _change_notify("percent_visible");
update();
}
@@ -4066,19 +4074,6 @@ RichTextLabel::RichTextLabel() {
main->first_invalid_line = 0;
main->first_resized_line = 0;
current_frame = main;
- tab_size = 4;
- default_align = ALIGN_LEFT;
- underline_meta = true;
- meta_hovering = nullptr;
- override_selected_font_color = false;
-
- scroll_visible = false;
- scroll_follow = false;
- scroll_following = false;
- updating_scroll = false;
- scroll_active = true;
- scroll_w = 0;
- scroll_updated = false;
vscroll = memnew(VScrollBar);
add_child(vscroll);
@@ -4090,19 +4085,6 @@ RichTextLabel::RichTextLabel() {
vscroll->connect("value_changed", callable_mp(this, &RichTextLabel::_scroll_changed));
vscroll->set_step(1);
vscroll->hide();
- use_bbcode = false;
-
- selection.click_frame = nullptr;
- selection.click_item = nullptr;
- selection.active = false;
- selection.enabled = false;
-
- visible_characters = -1;
- percent_visible = 1;
- visible_line_count = 0;
-
- fixed_width = -1;
- fit_content_height = false;
set_clip_contents(true);
}
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index ee37efb68b..2351aff0a4 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -147,9 +147,9 @@ private:
struct ItemDropcap : public Item {
String text;
Ref<Font> font;
- int font_size;
+ int font_size = 0;
Color color;
- int ol_size;
+ int ol_size = 0;
Color ol_color;
Rect2 dropcap_margins;
ItemDropcap() { type = ITEM_DROPCAP; }
@@ -232,11 +232,11 @@ private:
struct ItemTable : public Item {
struct Column {
- bool expand;
- int expand_ratio;
- int min_width;
- int max_width;
- int width;
+ bool expand = false;
+ int expand_ratio = 0;
+ int min_width = 0;
+ int max_width = 0;
+ int width = 0;
};
Vector<Column> columns;
@@ -322,31 +322,31 @@ private:
}
};
- ItemFrame *main;
- Item *current;
- ItemFrame *current_frame;
+ ItemFrame *main = nullptr;
+ Item *current = nullptr;
+ ItemFrame *current_frame = nullptr;
- VScrollBar *vscroll;
+ VScrollBar *vscroll = nullptr;
- bool scroll_visible;
- bool scroll_follow;
- bool scroll_following;
- bool scroll_active;
- int scroll_w;
- bool scroll_updated;
- bool updating_scroll;
+ bool scroll_visible = false;
+ bool scroll_follow = false;
+ bool scroll_following = false;
+ bool scroll_active = true;
+ int scroll_w = 0;
+ bool scroll_updated = false;
+ bool updating_scroll = false;
int current_idx = 1;
int current_char_ofs = 0;
- int visible_paragraph_count;
- int visible_line_count;
+ int visible_paragraph_count = 0;
+ int visible_line_count = 0;
- int tab_size;
- bool underline_meta;
- bool override_selected_font_color;
+ int tab_size = 4;
+ bool underline_meta = true;
+ bool override_selected_font_color = false;
- Align default_align;
+ Align default_align = ALIGN_LEFT;
- ItemMeta *meta_hovering;
+ ItemMeta *meta_hovering = nullptr;
Variant current_meta;
Vector<Ref<RichTextEffect>> custom_effects;
@@ -363,38 +363,38 @@ private:
Array st_args;
struct Selection {
- ItemFrame *click_frame;
- int click_line;
- Item *click_item;
- int click_char;
-
- ItemFrame *from_frame;
- int from_line;
- Item *from_item;
- int from_char;
-
- ItemFrame *to_frame;
- int to_line;
- Item *to_item;
- int to_char;
-
- bool active; // anything selected? i.e. from, to, etc. valid?
- bool enabled; // allow selections?
+ ItemFrame *click_frame = nullptr;
+ int click_line = 0;
+ Item *click_item = nullptr;
+ int click_char = 0;
+
+ ItemFrame *from_frame = nullptr;
+ int from_line = 0;
+ Item *from_item = nullptr;
+ int from_char = 0;
+
+ ItemFrame *to_frame = nullptr;
+ int to_line = 0;
+ Item *to_item = nullptr;
+ int to_char = 0;
+
+ bool active = false; // anything selected? i.e. from, to, etc. valid?
+ bool enabled = false; // allow selections?
};
Selection selection;
- int visible_characters;
- float percent_visible;
+ int visible_characters = -1;
+ float percent_visible = 1.0;
void _find_click(ItemFrame *p_frame, const Point2i &p_click, ItemFrame **r_click_frame = nullptr, int *r_click_line = nullptr, Item **r_click_item = nullptr, int *r_click_char = nullptr, bool *r_outside = nullptr);
- String _get_line_text(ItemFrame *p_frame, int p_line, Selection p_sel);
+ String _get_line_text(ItemFrame *p_frame, int p_line, Selection p_sel) const;
bool _search_line(ItemFrame *p_frame, int p_line, const String &p_string, Item *p_from, Item *p_to);
void _shape_line(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size, int p_width, int *r_char_offset);
void _resize_line(ItemFrame *p_frame, int p_line, const Ref<Font> &p_base_font, int p_base_font_size, int p_width);
- int _draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_ofs, int p_width, const Color &p_base_color, int p_outline_size, const Color &p_outline_color, const Color &p_font_color_shadow, bool p_shadow_as_outline, const Point2 &shadow_ofs);
+ int _draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_ofs, int p_width, const Color &p_base_color, int p_outline_size, const Color &p_outline_color, const Color &p_font_shadow_color, bool p_shadow_as_outline, const Point2 &shadow_ofs);
float _find_click_in_line(ItemFrame *p_frame, int p_line, const Vector2 &p_ofs, int p_width, const Point2i &p_click, ItemFrame **r_click_frame = nullptr, int *r_click_line = nullptr, Item **r_click_item = nullptr, int *r_click_char = nullptr);
String _roman(int p_num, bool p_capitalize) const;
@@ -405,7 +405,7 @@ private:
Ref<Font> _find_font(Item *p_item);
int _find_font_size(Item *p_item);
Dictionary _find_font_features(Item *p_item);
- int _find_outline_size(Item *p_item);
+ int _find_outline_size(Item *p_item, int p_default);
ItemList *_find_list_item(Item *p_item);
ItemDropcap *_find_dc_item(Item *p_item);
int _find_list(Item *p_item, Vector<int> &r_index, Vector<ItemList *> &r_list);
@@ -427,19 +427,19 @@ private:
void _scroll_changed(double);
void _gui_input(Ref<InputEvent> p_event);
- Item *_get_next_item(Item *p_item, bool p_free = false);
- Item *_get_prev_item(Item *p_item, bool p_free = false);
+ Item *_get_next_item(Item *p_item, bool p_free = false) const;
+ Item *_get_prev_item(Item *p_item, bool p_free = false) const;
Rect2 _get_text_rect();
Ref<RichTextEffect> _get_custom_effect_by_code(String p_bbcode_identifier);
virtual Dictionary parse_expressions_for_values(Vector<String> p_expressions);
- bool use_bbcode;
+ bool use_bbcode = false;
String bbcode;
- int fixed_width;
+ int fixed_width = -1;
- bool fit_content_height;
+ bool fit_content_height = false;
protected:
void _notification(int p_what);
@@ -524,7 +524,9 @@ public:
void set_selection_enabled(bool p_enabled);
bool is_selection_enabled() const;
- String get_selected_text();
+ int get_selection_from() const;
+ int get_selection_to() const;
+ String get_selected_text() const;
void selection_copy();
Error parse_bbcode(const String &p_bbcode);
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index 79a0de35fc..f2516e76a5 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -434,7 +434,7 @@ double ScrollBar::get_area_size() const {
}
double ScrollBar::get_area_offset() const {
- double ofs = 0;
+ double ofs = 0.0;
if (orientation == VERTICAL) {
ofs += get_theme_stylebox("hscroll")->get_margin(SIDE_TOP);
diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h
index 7dd71cc269..24b3b33e82 100644
--- a/scene/gui/scroll_bar.h
+++ b/scene/gui/scroll_bar.h
@@ -47,14 +47,14 @@ class ScrollBar : public Range {
Orientation orientation;
Size2 size;
- float custom_step = -1;
+ float custom_step = -1.0;
HighlightStatus highlight = HIGHLIGHT_NONE;
struct Drag {
bool active = false;
- float pos_at_click = 0;
- float value_at_click = 0;
+ float pos_at_click = 0.0;
+ float value_at_click = 0.0;
} drag;
double get_grabber_size() const;
@@ -73,14 +73,14 @@ class ScrollBar : public Range {
Vector2 drag_node_accum;
Vector2 drag_node_from;
Vector2 last_drag_node_accum;
- float last_drag_node_time;
- float time_since_motion;
+ float last_drag_node_time = 0.0;
+ float time_since_motion = 0.0;
bool drag_node_touching = false;
bool drag_node_touching_deaccel = false;
- bool click_handled;
+ bool click_handled = false;
bool scrolling = false;
- double target_scroll = 0;
+ double target_scroll = 0.0;
bool smooth_scroll_enabled = false;
void _drag_node_exit();
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 52feb2ab23..411891ece8 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -244,11 +244,11 @@ void ScrollContainer::_ensure_focused_visible(Control *p_control) {
if (is_a_parent_of(p_control)) {
Rect2 global_rect = get_global_rect();
Rect2 other_rect = p_control->get_global_rect();
- float right_margin = 0;
+ float right_margin = 0.0;
if (v_scroll->is_visible()) {
right_margin += v_scroll->get_size().x;
}
- float bottom_margin = 0;
+ float bottom_margin = 0.0;
if (h_scroll->is_visible()) {
bottom_margin += h_scroll->get_size().y;
}
@@ -624,15 +624,7 @@ ScrollContainer::ScrollContainer() {
add_child(v_scroll);
v_scroll->connect("value_changed", callable_mp(this, &ScrollContainer::_scroll_moved));
- drag_speed = Vector2();
- drag_touching = false;
- drag_touching_deaccel = false;
- beyond_deadzone = false;
- scroll_h = true;
- scroll_v = true;
-
deadzone = GLOBAL_GET("gui/common/default_scroll_deadzone");
- follow_focus = false;
set_clip_contents(true);
};
diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h
index 7e32cbed1c..9d3ce39345 100644
--- a/scene/gui/scroll_container.h
+++ b/scene/gui/scroll_container.h
@@ -50,18 +50,18 @@ class ScrollContainer : public Container {
Vector2 drag_accum;
Vector2 drag_from;
Vector2 last_drag_accum;
- float last_drag_time;
- float time_since_motion;
- bool drag_touching;
- bool drag_touching_deaccel;
- bool click_handled;
- bool beyond_deadzone;
-
- bool scroll_h;
- bool scroll_v;
-
- int deadzone;
- bool follow_focus;
+ float last_drag_time = 0.0;
+ float time_since_motion = 0.0;
+ bool drag_touching = false;
+ bool drag_touching_deaccel = false;
+ bool click_handled = false;
+ bool beyond_deadzone = false;
+
+ bool scroll_h = true;
+ bool scroll_v = true;
+
+ int deadzone = 0;
+ bool follow_focus = false;
void _cancel_drag();
diff --git a/scene/gui/separator.h b/scene/gui/separator.h
index 1ac0f2c503..77162c68fa 100644
--- a/scene/gui/separator.h
+++ b/scene/gui/separator.h
@@ -36,7 +36,7 @@ class Separator : public Control {
GDCLASS(Separator, Control);
protected:
- Orientation orientation;
+ Orientation orientation = Orientation::HORIZONTAL;
void _notification(int p_what);
public:
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index 0edf1856de..8b07299e30 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -269,12 +269,5 @@ void Slider::_bind_methods() {
Slider::Slider(Orientation p_orientation) {
orientation = p_orientation;
- mouse_inside = false;
- grab.active = false;
- ticks = 0;
- ticks_on_borders = false;
- custom_step = -1;
- editable = true;
- scrollable = true;
set_focus_mode(FOCUS_ALL);
}
diff --git a/scene/gui/slider.h b/scene/gui/slider.h
index 292931b7b5..65a4036cd1 100644
--- a/scene/gui/slider.h
+++ b/scene/gui/slider.h
@@ -37,23 +37,23 @@ class Slider : public Range {
GDCLASS(Slider, Range);
struct Grab {
- int pos;
- float uvalue;
- bool active;
+ int pos = 0;
+ float uvalue = 0.0;
+ bool active = false;
} grab;
- int ticks;
- bool mouse_inside;
+ int ticks = 0;
+ bool mouse_inside = false;
Orientation orientation;
- float custom_step;
- bool editable;
- bool scrollable;
+ float custom_step = -1.0;
+ bool editable = true;
+ bool scrollable = true;
protected:
void _gui_input(Ref<InputEvent> p_event);
void _notification(int p_what);
static void _bind_methods();
- bool ticks_on_borders;
+ bool ticks_on_borders = false;
public:
virtual Size2 get_minimum_size() const override;
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 037a60810e..2c9720e4b6 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -268,7 +268,6 @@ void SpinBox::_bind_methods() {
}
SpinBox::SpinBox() {
- last_w = 0;
line_edit = memnew(LineEdit);
add_child(line_edit);
@@ -280,7 +279,6 @@ SpinBox::SpinBox() {
line_edit->connect("text_entered", callable_mp(this, &SpinBox::_text_entered), Vector<Variant>(), CONNECT_DEFERRED);
line_edit->connect("focus_exited", callable_mp(this, &SpinBox::_line_edit_focus_exit), Vector<Variant>(), CONNECT_DEFERRED);
line_edit->connect("gui_input", callable_mp(this, &SpinBox::_line_edit_input));
- drag.enabled = false;
range_click_timer = memnew(Timer);
range_click_timer->connect("timeout", callable_mp(this, &SpinBox::_range_click_timeout));
diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h
index 0647ec005b..4c3adf30e8 100644
--- a/scene/gui/spin_box.h
+++ b/scene/gui/spin_box.h
@@ -39,7 +39,7 @@ class SpinBox : public Range {
GDCLASS(SpinBox, Range);
LineEdit *line_edit;
- int last_w;
+ int last_w = 0;
Timer *range_click_timer;
void _range_click_timeout();
@@ -52,11 +52,11 @@ class SpinBox : public Range {
void _line_edit_input(const Ref<InputEvent> &p_event);
struct Drag {
- float base_val;
- bool allowed;
- bool enabled;
+ float base_val = 0.0;
+ bool allowed = false;
+ bool enabled = false;
Vector2 capture_pos;
- float diff_y;
+ float diff_y = 0.0;
} drag;
void _line_edit_focus_exit();
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index d6f2df1d8c..d43e195df1 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -102,7 +102,7 @@ void SplitContainer::_resort() {
middle_sep += clamped_split_offset;
if (should_clamp_split_offset) {
split_offset = clamped_split_offset;
- _change_notify("split_offset");
+
should_clamp_split_offset = false;
}
}
@@ -359,12 +359,5 @@ void SplitContainer::_bind_methods() {
}
SplitContainer::SplitContainer(bool p_vertical) {
- mouse_inside = false;
- split_offset = 0;
- should_clamp_split_offset = false;
- middle_sep = 0;
vertical = p_vertical;
- dragging = false;
- collapsed = false;
- dragger_visibility = DRAGGER_VISIBLE;
}
diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h
index 46a6792206..6cb94d6ecf 100644
--- a/scene/gui/split_container.h
+++ b/scene/gui/split_container.h
@@ -44,16 +44,16 @@ public:
};
private:
- bool should_clamp_split_offset;
- int split_offset;
- int middle_sep;
- bool vertical;
- bool dragging;
- int drag_from;
- int drag_ofs;
- bool collapsed;
- DraggerVisibility dragger_visibility;
- bool mouse_inside;
+ bool should_clamp_split_offset = false;
+ int split_offset = 0;
+ int middle_sep = 0;
+ bool vertical = false;
+ bool dragging = false;
+ int drag_from = 0;
+ int drag_ofs = 0;
+ bool collapsed = false;
+ DraggerVisibility dragger_visibility = DRAGGER_VISIBLE;
+ bool mouse_inside = false;
Control *_getch(int p_idx) const;
diff --git a/scene/gui/subviewport_container.cpp b/scene/gui/subviewport_container.cpp
index 68eef0f96b..8ffdd269a4 100644
--- a/scene/gui/subviewport_container.cpp
+++ b/scene/gui/subviewport_container.cpp
@@ -203,8 +203,6 @@ void SubViewportContainer::_bind_methods() {
}
SubViewportContainer::SubViewportContainer() {
- stretch = false;
- shrink = 1;
set_process_input(true);
set_process_unhandled_input(true);
}
diff --git a/scene/gui/subviewport_container.h b/scene/gui/subviewport_container.h
index 91fc29d377..77cf4c16b3 100644
--- a/scene/gui/subviewport_container.h
+++ b/scene/gui/subviewport_container.h
@@ -36,8 +36,8 @@
class SubViewportContainer : public Container {
GDCLASS(SubViewportContainer, Container);
- bool stretch;
- int shrink;
+ bool stretch = false;
+ int shrink = 1;
protected:
void _notification(int p_what);
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 64a2a1843d..e3e3f549de 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -43,11 +43,11 @@ int TabContainer::_get_top_margin() const {
}
// Respect the minimum tab height.
- Ref<StyleBox> tab_bg = get_theme_stylebox("tab_bg");
- Ref<StyleBox> tab_fg = get_theme_stylebox("tab_fg");
+ Ref<StyleBox> tab_unselected = get_theme_stylebox("tab_unselected");
+ Ref<StyleBox> tab_selected = get_theme_stylebox("tab_selected");
Ref<StyleBox> tab_disabled = get_theme_stylebox("tab_disabled");
- int tab_height = MAX(MAX(tab_bg->get_minimum_size().height, tab_fg->get_minimum_size().height), tab_disabled->get_minimum_size().height);
+ int tab_height = MAX(MAX(tab_unselected->get_minimum_size().height, tab_selected->get_minimum_size().height), tab_disabled->get_minimum_size().height);
// Font height or higher icon wins.
int content_height = 0;
@@ -337,8 +337,8 @@ void TabContainer::_notification(int p_what) {
}
Vector<Control *> tabs = _get_tabs();
- Ref<StyleBox> tab_bg = get_theme_stylebox("tab_bg");
- Ref<StyleBox> tab_fg = get_theme_stylebox("tab_fg");
+ Ref<StyleBox> tab_unselected = get_theme_stylebox("tab_unselected");
+ Ref<StyleBox> tab_selected = get_theme_stylebox("tab_selected");
Ref<StyleBox> tab_disabled = get_theme_stylebox("tab_disabled");
Ref<Texture2D> increment = get_theme_icon("increment");
Ref<Texture2D> increment_hl = get_theme_icon("increment_highlight");
@@ -346,9 +346,9 @@ void TabContainer::_notification(int p_what) {
Ref<Texture2D> decrement_hl = get_theme_icon("decrement_highlight");
Ref<Texture2D> menu = get_theme_icon("menu");
Ref<Texture2D> menu_hl = get_theme_icon("menu_highlight");
- Color font_color_fg = get_theme_color("font_color_fg");
- Color font_color_bg = get_theme_color("font_color_bg");
- Color font_color_disabled = get_theme_color("font_color_disabled");
+ Color font_selected_color = get_theme_color("font_selected_color");
+ Color font_unselected_color = get_theme_color("font_unselected_color");
+ Color font_disabled_color = get_theme_color("font_disabled_color");
int side_margin = get_theme_constant("side_margin");
// Find out start and width of the header area.
@@ -433,17 +433,17 @@ void TabContainer::_notification(int p_what) {
int tab_width = tab_widths[i];
if (get_tab_disabled(index)) {
if (rtl) {
- _draw_tab(tab_disabled, font_color_disabled, index, size.width - (tabs_ofs_cache + x) - tab_width);
+ _draw_tab(tab_disabled, font_disabled_color, index, size.width - (tabs_ofs_cache + x) - tab_width);
} else {
- _draw_tab(tab_disabled, font_color_disabled, index, tabs_ofs_cache + x);
+ _draw_tab(tab_disabled, font_disabled_color, index, tabs_ofs_cache + x);
}
} else if (index == current) {
x_current = x;
} else {
if (rtl) {
- _draw_tab(tab_bg, font_color_bg, index, size.width - (tabs_ofs_cache + x) - tab_width);
+ _draw_tab(tab_unselected, font_unselected_color, index, size.width - (tabs_ofs_cache + x) - tab_width);
} else {
- _draw_tab(tab_bg, font_color_bg, index, tabs_ofs_cache + x);
+ _draw_tab(tab_unselected, font_unselected_color, index, tabs_ofs_cache + x);
}
}
@@ -459,9 +459,9 @@ void TabContainer::_notification(int p_what) {
// Draw selected tab in front. only draw selected tab when it's in visible range.
if (tabs.size() > 0 && current - first_tab_cache < tab_widths.size() && current >= first_tab_cache) {
if (rtl) {
- _draw_tab(tab_fg, font_color_fg, current, size.width - (tabs_ofs_cache + x_current) - tab_widths[current]);
+ _draw_tab(tab_selected, font_selected_color, current, size.width - (tabs_ofs_cache + x_current) - tab_widths[current]);
} else {
- _draw_tab(tab_fg, font_color_fg, current, tabs_ofs_cache + x_current);
+ _draw_tab(tab_selected, font_selected_color, current, tabs_ofs_cache + x_current);
}
}
@@ -535,6 +535,8 @@ void TabContainer::_draw_tab(Ref<StyleBox> &p_tab_style, Color &p_font_color, in
Vector<Control *> tabs = _get_tabs();
RID canvas = get_canvas_item();
Ref<Font> font = get_theme_font("font");
+ Color font_outline_color = get_theme_color("font_outline_color");
+ int outline_size = get_theme_constant("outline_size");
int icon_text_distance = get_theme_constant("icon_separation");
int tab_width = _get_tab_width(p_index);
int header_height = _get_top_margin();
@@ -565,6 +567,9 @@ void TabContainer::_draw_tab(Ref<StyleBox> &p_tab_style, Color &p_font_color, in
// Draw the tab text.
Point2i text_pos(x_content, y_center - text_buf[p_index]->get_size().y / 2);
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ text_buf[p_index]->draw_outline(canvas, text_pos, outline_size, font_outline_color);
+ }
text_buf[p_index]->draw(canvas, text_pos, p_font_color);
}
@@ -655,15 +660,15 @@ int TabContainer::_get_tab_width(int p_index) const {
}
// Respect a minimum size.
- Ref<StyleBox> tab_bg = get_theme_stylebox("tab_bg");
- Ref<StyleBox> tab_fg = get_theme_stylebox("tab_fg");
+ Ref<StyleBox> tab_unselected = get_theme_stylebox("tab_unselected");
+ Ref<StyleBox> tab_selected = get_theme_stylebox("tab_selected");
Ref<StyleBox> tab_disabled = get_theme_stylebox("tab_disabled");
if (get_tab_disabled(p_index)) {
width += tab_disabled->get_minimum_size().width;
} else if (p_index == current) {
- width += tab_fg->get_minimum_size().width;
+ width += tab_selected->get_minimum_size().width;
} else {
- width += tab_bg->get_minimum_size().width;
+ width += tab_unselected->get_minimum_size().width;
}
return width;
@@ -747,8 +752,6 @@ void TabContainer::set_current_tab(int p_current) {
_repaint();
- _change_notify("current_tab");
-
if (pending_previous == current) {
emit_signal("tab_selected", current);
} else {
@@ -967,8 +970,6 @@ void TabContainer::set_tab_align(TabAlign p_align) {
ERR_FAIL_INDEX(p_align, 3);
align = p_align;
update();
-
- _change_notify("tab_align");
}
TabContainer::TabAlign TabContainer::get_tab_align() const {
@@ -1131,13 +1132,13 @@ Size2 TabContainer::get_minimum_size() const {
ms.y = MAX(ms.y, cms.y);
}
- Ref<StyleBox> tab_bg = get_theme_stylebox("tab_bg");
- Ref<StyleBox> tab_fg = get_theme_stylebox("tab_fg");
+ Ref<StyleBox> tab_unselected = get_theme_stylebox("tab_unselected");
+ Ref<StyleBox> tab_selected = get_theme_stylebox("tab_selected");
Ref<StyleBox> tab_disabled = get_theme_stylebox("tab_disabled");
Ref<Font> font = get_theme_font("font");
if (tabs_visible) {
- ms.y += MAX(MAX(tab_bg->get_minimum_size().y, tab_fg->get_minimum_size().y), tab_disabled->get_minimum_size().y);
+ ms.y += MAX(MAX(tab_unselected->get_minimum_size().y, tab_selected->get_minimum_size().y), tab_disabled->get_minimum_size().y);
ms.y += _get_top_margin();
}
@@ -1243,20 +1244,5 @@ void TabContainer::_bind_methods() {
}
TabContainer::TabContainer() {
- first_tab_cache = 0;
- last_tab_cache = 0;
- buttons_visible_cache = false;
- menu_hovered = false;
- highlight_arrow = -1;
- tabs_ofs_cache = 0;
- current = 0;
- previous = 0;
- align = ALIGN_CENTER;
- tabs_visible = true;
- all_tabs_in_front = false;
- drag_to_rearrange_enabled = false;
- tabs_rearrange_group = -1;
- use_hidden_tabs_for_min_size = false;
-
connect("mouse_exited", callable_mp(this, &TabContainer::_on_mouse_exited));
}
diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h
index 58742c5be8..4ed5255729 100644
--- a/scene/gui/tab_container.h
+++ b/scene/gui/tab_container.h
@@ -46,23 +46,23 @@ public:
};
private:
- int first_tab_cache;
- int tabs_ofs_cache;
- int last_tab_cache;
- int current;
- int previous;
- bool tabs_visible;
- bool all_tabs_in_front;
- bool buttons_visible_cache;
- bool menu_hovered;
- int highlight_arrow;
- TabAlign align;
+ int first_tab_cache = 0;
+ int tabs_ofs_cache = 0;
+ int last_tab_cache = 0;
+ int current = 0;
+ int previous = 0;
+ bool tabs_visible = true;
+ bool all_tabs_in_front = false;
+ bool buttons_visible_cache = false;
+ bool menu_hovered = false;
+ int highlight_arrow = -1;
+ TabAlign align = ALIGN_CENTER;
Control *_get_tab(int p_idx) const;
int _get_top_margin() const;
mutable ObjectID popup_obj_id;
- bool drag_to_rearrange_enabled;
- bool use_hidden_tabs_for_min_size;
- int tabs_rearrange_group;
+ bool drag_to_rearrange_enabled = false;
+ bool use_hidden_tabs_for_min_size = false;
+ int tabs_rearrange_group = -1;
Vector<Ref<TextLine>> text_buf;
Vector<Control *> _get_tabs() const;
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index 3bf71d6c01..da1a9698d0 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -38,11 +38,11 @@
#include "scene/gui/texture_rect.h"
Size2 Tabs::get_minimum_size() const {
- Ref<StyleBox> tab_bg = get_theme_stylebox("tab_bg");
- Ref<StyleBox> tab_fg = get_theme_stylebox("tab_fg");
+ Ref<StyleBox> tab_unselected = get_theme_stylebox("tab_unselected");
+ Ref<StyleBox> tab_selected = get_theme_stylebox("tab_selected");
Ref<StyleBox> tab_disabled = get_theme_stylebox("tab_disabled");
- int y_margin = MAX(MAX(tab_bg->get_minimum_size().height, tab_fg->get_minimum_size().height), tab_disabled->get_minimum_size().height);
+ int y_margin = MAX(MAX(tab_unselected->get_minimum_size().height, tab_selected->get_minimum_size().height), tab_disabled->get_minimum_size().height);
Size2 ms(0, 0);
@@ -61,9 +61,9 @@ Size2 Tabs::get_minimum_size() const {
if (tabs[i].disabled) {
ms.width += tab_disabled->get_minimum_size().width;
} else if (current == i) {
- ms.width += tab_fg->get_minimum_size().width;
+ ms.width += tab_selected->get_minimum_size().width;
} else {
- ms.width += tab_bg->get_minimum_size().width;
+ ms.width += tab_unselected->get_minimum_size().width;
}
if (tabs[i].right_button.is_valid()) {
@@ -71,7 +71,7 @@ Size2 Tabs::get_minimum_size() const {
Size2 bms = rb->get_size();
bms.width += get_theme_constant("hseparation");
ms.width += bms.width;
- ms.height = MAX(bms.height + tab_bg->get_minimum_size().height, ms.height);
+ ms.height = MAX(bms.height + tab_unselected->get_minimum_size().height, ms.height);
}
if (cb_displaypolicy == CLOSE_BUTTON_SHOW_ALWAYS || (cb_displaypolicy == CLOSE_BUTTON_SHOW_ACTIVE_ONLY && i == current)) {
@@ -79,7 +79,7 @@ Size2 Tabs::get_minimum_size() const {
Size2 bms = cb->get_size();
bms.width += get_theme_constant("hseparation");
ms.width += bms.width;
- ms.height = MAX(bms.height + tab_bg->get_minimum_size().height, ms.height);
+ ms.height = MAX(bms.height + tab_unselected->get_minimum_size().height, ms.height);
}
}
@@ -268,13 +268,16 @@ void Tabs::_notification(int p_what) {
_update_cache();
RID ci = get_canvas_item();
- Ref<StyleBox> tab_bg = get_theme_stylebox("tab_bg");
- Ref<StyleBox> tab_fg = get_theme_stylebox("tab_fg");
+ Ref<StyleBox> tab_unselected = get_theme_stylebox("tab_unselected");
+ Ref<StyleBox> tab_selected = get_theme_stylebox("tab_selected");
Ref<StyleBox> tab_disabled = get_theme_stylebox("tab_disabled");
- Color color_fg = get_theme_color("font_color_fg");
- Color color_bg = get_theme_color("font_color_bg");
- Color color_disabled = get_theme_color("font_color_disabled");
+ Color font_selected_color = get_theme_color("font_selected_color");
+ Color font_unselected_color = get_theme_color("font_unselected_color");
+ Color font_disabled_color = get_theme_color("font_disabled_color");
Ref<Texture2D> close = get_theme_icon("close");
+ Color font_outline_color = get_theme_color("font_outline_color");
+ int outline_size = get_theme_constant("outline_size");
+
Vector2 size = get_size();
bool rtl = is_layout_rtl();
@@ -316,13 +319,13 @@ void Tabs::_notification(int p_what) {
if (tabs[i].disabled) {
sb = tab_disabled;
- col = color_disabled;
+ col = font_disabled_color;
} else if (i == current) {
- sb = tab_fg;
- col = color_fg;
+ sb = tab_selected;
+ col = font_selected_color;
} else {
- sb = tab_bg;
- col = color_bg;
+ sb = tab_unselected;
+ col = font_unselected_color;
}
if (w + lsize > limit) {
@@ -357,9 +360,17 @@ void Tabs::_notification(int p_what) {
}
if (rtl) {
- tabs[i].text_buf->draw(ci, Point2i(size.width - w - tabs[i].text_buf->get_size().x, sb->get_margin(SIDE_TOP) + ((sb_rect.size.y - sb_ms.y) - tabs[i].text_buf->get_size().y) / 2), col);
+ Vector2 text_pos = Point2i(size.width - w - tabs[i].text_buf->get_size().x, sb->get_margin(SIDE_TOP) + ((sb_rect.size.y - sb_ms.y) - tabs[i].text_buf->get_size().y) / 2);
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ tabs[i].text_buf->draw_outline(ci, text_pos, outline_size, font_outline_color);
+ }
+ tabs[i].text_buf->draw(ci, text_pos, col);
} else {
- tabs[i].text_buf->draw(ci, Point2i(w, sb->get_margin(SIDE_TOP) + ((sb_rect.size.y - sb_ms.y) - tabs[i].text_buf->get_size().y) / 2), col);
+ Vector2 text_pos = Point2i(w, sb->get_margin(SIDE_TOP) + ((sb_rect.size.y - sb_ms.y) - tabs[i].text_buf->get_size().y) / 2);
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ tabs[i].text_buf->draw_outline(ci, text_pos, outline_size, font_outline_color);
+ }
+ tabs[i].text_buf->draw(ci, text_pos, col);
}
w += tabs[i].size_text;
@@ -481,7 +492,6 @@ void Tabs::set_current_tab(int p_current) {
previous = current;
current = p_current;
- _change_notify("current_tab");
_update_cache();
update();
@@ -652,8 +662,8 @@ void Tabs::_update_hover() {
void Tabs::_update_cache() {
Ref<StyleBox> tab_disabled = get_theme_stylebox("tab_disabled");
- Ref<StyleBox> tab_bg = get_theme_stylebox("tab_bg");
- Ref<StyleBox> tab_fg = get_theme_stylebox("tab_fg");
+ Ref<StyleBox> tab_unselected = get_theme_stylebox("tab_unselected");
+ Ref<StyleBox> tab_selected = get_theme_stylebox("tab_selected");
Ref<Texture2D> incr = get_theme_icon("increment");
Ref<Texture2D> decr = get_theme_icon("decrement");
int limit = get_size().width - incr->get_width() - decr->get_width();
@@ -683,9 +693,9 @@ void Tabs::_update_cache() {
if (tabs[i].disabled) {
sb = tab_disabled;
} else if (i == current) {
- sb = tab_fg;
+ sb = tab_selected;
} else {
- sb = tab_bg;
+ sb = tab_unselected;
}
int lsize = tabs[i].size_cache;
int slen = tabs[i].size_text;
@@ -918,8 +928,8 @@ void Tabs::move_tab(int from, int to) {
int Tabs::get_tab_width(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, tabs.size(), 0);
- Ref<StyleBox> tab_bg = get_theme_stylebox("tab_bg");
- Ref<StyleBox> tab_fg = get_theme_stylebox("tab_fg");
+ Ref<StyleBox> tab_unselected = get_theme_stylebox("tab_unselected");
+ Ref<StyleBox> tab_selected = get_theme_stylebox("tab_selected");
Ref<StyleBox> tab_disabled = get_theme_stylebox("tab_disabled");
int x = 0;
@@ -937,9 +947,9 @@ int Tabs::get_tab_width(int p_idx) const {
if (tabs[p_idx].disabled) {
x += tab_disabled->get_minimum_size().width;
} else if (current == p_idx) {
- x += tab_fg->get_minimum_size().width;
+ x += tab_selected->get_minimum_size().width;
} else {
- x += tab_bg->get_minimum_size().width;
+ x += tab_unselected->get_minimum_size().width;
}
if (tabs[p_idx].right_button.is_valid()) {
@@ -1137,27 +1147,5 @@ void Tabs::_bind_methods() {
}
Tabs::Tabs() {
- current = 0;
- previous = 0;
- tab_align = ALIGN_CENTER;
- rb_hover = -1;
- rb_pressing = false;
- highlight_arrow = -1;
-
- cb_hover = -1;
- cb_pressing = false;
- cb_displaypolicy = CLOSE_BUTTON_SHOW_NEVER;
- offset = 0;
- max_drawn_tab = 0;
-
- select_with_rmb = false;
-
- min_width = 0;
- scrolling_enabled = true;
- buttons_visible = false;
- hover = -1;
- drag_to_rearrange_enabled = false;
- tabs_rearrange_group = -1;
-
connect("mouse_exited", callable_mp(this, &Tabs::_on_mouse_exited));
}
diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h
index 4396981004..86877f4d80 100644
--- a/scene/gui/tabs.h
+++ b/scene/gui/tabs.h
@@ -63,42 +63,42 @@ private:
Ref<TextLine> text_buf;
Ref<Texture2D> icon;
- int ofs_cache;
- bool disabled;
- int size_cache;
- int size_text;
- int x_cache;
- int x_size_cache;
+ int ofs_cache = 0;
+ bool disabled = false;
+ int size_cache = 0;
+ int size_text = 0;
+ int x_cache = 0;
+ int x_size_cache = 0;
Ref<Texture2D> right_button;
Rect2 rb_rect;
Rect2 cb_rect;
};
- int offset;
- int max_drawn_tab;
- int highlight_arrow;
- bool buttons_visible;
- bool missing_right;
+ int offset = 0;
+ int max_drawn_tab = 0;
+ int highlight_arrow = -1;
+ bool buttons_visible = false;
+ bool missing_right = false;
Vector<Tab> tabs;
- int current;
- int previous;
+ int current = 0;
+ int previous = 0;
int _get_top_margin() const;
- TabAlign tab_align;
- int rb_hover;
- bool rb_pressing;
+ TabAlign tab_align = ALIGN_CENTER;
+ int rb_hover = -1;
+ bool rb_pressing = false;
- bool select_with_rmb;
+ bool select_with_rmb = false;
- int cb_hover;
- bool cb_pressing;
- CloseButtonDisplayPolicy cb_displaypolicy;
+ int cb_hover = -1;
+ bool cb_pressing = false;
+ CloseButtonDisplayPolicy cb_displaypolicy = CLOSE_BUTTON_SHOW_NEVER;
- int hover; // Hovered tab.
- int min_width;
- bool scrolling_enabled;
- bool drag_to_rearrange_enabled;
- int tabs_rearrange_group;
+ int hover = -1; // Hovered tab.
+ int min_width = 0;
+ bool scrolling_enabled = true;
+ bool drag_to_rearrange_enabled = false;
+ int tabs_rearrange_group = -1;
int get_tab_width(int p_idx) const;
void _ensure_no_over_offset();
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index f25eb45b85..36aa18417d 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -32,6 +32,7 @@
#include "core/config/project_settings.h"
#include "core/input/input.h"
+#include "core/input/input_map.h"
#include "core/object/message_queue.h"
#include "core/object/script_language.h"
#include "core/os/keyboard.h"
@@ -202,7 +203,7 @@ void TextEdit::Text::invalidate_cache(int p_line, int p_column, const String &p_
// Apply tab align.
if (indent_size > 0) {
Vector<float> tabs;
- tabs.push_back(font->get_char_size('m', 0, font_size).width * indent_size);
+ tabs.push_back(font->get_char_size(' ', 0, font_size).width * indent_size);
text.write[p_line].data_buf->tab_align(tabs);
}
}
@@ -212,7 +213,7 @@ void TextEdit::Text::invalidate_all_lines() {
text.write[i].data_buf->set_width(width);
if (indent_size > 0) {
Vector<float> tabs;
- tabs.push_back(font->get_char_size('m', 0, font_size).width * indent_size);
+ tabs.push_back(font->get_char_size(' ', 0, font_size).width * indent_size);
text.write[i].data_buf->tab_align(tabs);
}
}
@@ -500,7 +501,7 @@ void TextEdit::_update_minimap_click() {
int row;
_get_minimap_mouse_row(Point2i(mp.x, mp.y), row);
- if (row >= get_first_visible_line() && (row < get_last_visible_line() || row >= (text.size() - 1))) {
+ if (row >= get_first_visible_line() && (row < get_last_full_visible_line() || row >= (text.size() - 1))) {
minimap_scroll_ratio = v_scroll->get_as_ratio();
minimap_scroll_click_pos = mp.y;
can_drag_minimap = true;
@@ -637,7 +638,7 @@ void TextEdit::_notification(int p_what) {
int visible_rows = get_visible_rows() + 1;
- Color color = readonly ? cache.font_color_readonly : cache.font_color;
+ Color color = readonly ? cache.font_readonly_color : cache.font_color;
if (cache.background_color.a > 0.01) {
RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2i(), get_size()), cache.background_color);
@@ -810,8 +811,8 @@ void TextEdit::_notification(int p_what) {
}
}
+ bool is_cursor_line_visible = false;
Point2 cursor_pos;
- int cursor_insert_offset_y = 0;
// Get the highlighted words.
String highlighted_text = get_selection_text();
@@ -877,7 +878,7 @@ void TextEdit::_notification(int p_what) {
Color current_color = cache.font_color;
if (readonly) {
- current_color = cache.font_color_readonly;
+ current_color = cache.font_readonly_color;
}
Vector<String> wrap_rows = get_wrap_rows_text(minimap_line);
@@ -918,7 +919,7 @@ void TextEdit::_notification(int p_what) {
if (color_map.has(last_wrap_column + j)) {
current_color = color_map[last_wrap_column + j].get("color");
if (readonly) {
- current_color.a = cache.font_color_readonly.a;
+ current_color.a = cache.font_readonly_color.a;
}
}
color = current_color;
@@ -977,6 +978,16 @@ void TextEdit::_notification(int p_what) {
}
}
+ int top_limit_y = 0;
+ int bottom_limit_y = get_size().height;
+ if (readonly) {
+ top_limit_y += cache.style_readonly->get_margin(SIDE_TOP);
+ bottom_limit_y -= cache.style_readonly->get_margin(SIDE_BOTTOM);
+ } else {
+ top_limit_y += cache.style_normal->get_margin(SIDE_TOP);
+ bottom_limit_y -= cache.style_normal->get_margin(SIDE_BOTTOM);
+ }
+
// draw main text
int row_height = get_row_height();
int line = first_visible_line;
@@ -1001,7 +1012,7 @@ void TextEdit::_notification(int p_what) {
Dictionary color_map = _get_line_syntax_highlighting(line);
// Ensure we at least use the font color.
- Color current_color = readonly ? cache.font_color_readonly : cache.font_color;
+ Color current_color = readonly ? cache.font_readonly_color : cache.font_color;
const Ref<TextParagraph> ldata = text.get_line_data(line);
@@ -1019,17 +1030,33 @@ void TextEdit::_notification(int p_what) {
const String &str = wrap_rows[line_wrap_index];
int char_margin = xmargin_beg - cursor.x_ofs;
- int ofs_readonly = 0;
int ofs_x = 0;
+ int ofs_y = 0;
if (readonly) {
- ofs_readonly = cache.style_readonly->get_offset().y / 2;
ofs_x = cache.style_readonly->get_offset().x / 2;
+ ofs_x -= cache.style_normal->get_offset().x / 2;
+ ofs_y = cache.style_readonly->get_offset().y / 2;
+ } else {
+ ofs_y = cache.style_normal->get_offset().y / 2;
}
- int ofs_y = (i * row_height + cache.line_spacing / 2) + ofs_readonly;
+ ofs_y += i * row_height + cache.line_spacing / 2;
ofs_y -= cursor.wrap_ofs * row_height;
ofs_y -= get_v_scroll_offset() * row_height;
+ bool clipped = false;
+ if (ofs_y + row_height < top_limit_y) {
+ // Line is outside the top margin, clip current line.
+ // Still need to go through the process to prepare color changes for next lines.
+ clipped = true;
+ }
+
+ if (ofs_y > bottom_limit_y) {
+ // Line is outside the bottom margin, clip any remaining text.
+ i = draw_amount;
+ break;
+ }
+
if (text.is_marked(line)) {
if (rtl) {
RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(size.width - ofs_x - xmargin_end, ofs_y, xmargin_end - xmargin_beg, row_height), cache.mark_color);
@@ -1050,7 +1077,7 @@ void TextEdit::_notification(int p_what) {
// Give visual indication of empty selected line.
if (selection.active && line >= selection.from_line && line <= selection.to_line && char_margin >= xmargin_beg) {
- int char_w = cache.font->get_char_size('m', 0, cache.font_size).width;
+ int char_w = cache.font->get_char_size(' ', 0, cache.font_size).width;
if (rtl) {
RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(size.width - xmargin_beg - ofs_x - char_w, ofs_y, char_w, row_height), cache.selection_color);
} else {
@@ -1091,6 +1118,9 @@ void TextEdit::_notification(int p_what) {
tl->add_string(text, cache.font, cache.font_size);
int yofs = ofs_y + (row_height - tl->get_size().y) / 2;
+ if (cache.outline_size > 0 && cache.outline_color.a > 0) {
+ tl->draw_outline(ci, Point2(gutter_offset + ofs_x, yofs), cache.outline_size, cache.outline_color);
+ }
tl->draw(ci, Point2(gutter_offset + ofs_x, yofs), get_line_gutter_item_color(line, g));
} break;
case GUTTER_TPYE_ICON: {
@@ -1147,7 +1177,7 @@ void TextEdit::_notification(int p_what) {
char_margin = size.width - char_margin - TS->shaped_text_get_size(rid).x;
}
- if (selection.active && line >= selection.from_line && line <= selection.to_line) { // Selection
+ if (!clipped && selection.active && line >= selection.from_line && line <= selection.to_line) { // Selection
int sel_from = (line > selection.from_line) ? TS->shaped_text_get_range(rid).x : selection.from_column;
int sel_to = (line < selection.to_line) ? TS->shaped_text_get_range(rid).y : selection.to_column;
Vector<Vector2> sel = TS->shaped_text_get_selection(rid, sel_from, sel_to);
@@ -1167,7 +1197,7 @@ void TextEdit::_notification(int p_what) {
}
int start = TS->shaped_text_get_range(rid).x;
- if (!search_text.is_empty()) { // Search highhlight
+ if (!clipped && !search_text.is_empty()) { // Search highhlight
int search_text_col = _get_column_pos_of_word(search_text, str, search_flags, 0);
while (search_text_col != -1) {
Vector<Vector2> sel = TS->shaped_text_get_selection(rid, search_text_col + start, search_text_col + search_text.length() + start);
@@ -1190,7 +1220,7 @@ void TextEdit::_notification(int p_what) {
}
}
- if (highlight_all_occurrences && !only_whitespaces_highlighted && !highlighted_text.is_empty()) { // Highlight
+ if (!clipped && highlight_all_occurrences && !only_whitespaces_highlighted && !highlighted_text.is_empty()) { // Highlight
int highlighted_text_col = _get_column_pos_of_word(highlighted_text, str, SEARCH_MATCH_CASE | SEARCH_WHOLE_WORDS, 0);
while (highlighted_text_col != -1) {
Vector<Vector2> sel = TS->shaped_text_get_selection(rid, highlighted_text_col + start, highlighted_text_col + highlighted_text.length() + start);
@@ -1212,7 +1242,7 @@ void TextEdit::_notification(int p_what) {
}
}
- if (select_identifiers_enabled && highlighted_word.length() != 0) { // Highlight word
+ if (!clipped && select_identifiers_enabled && highlighted_word.length() != 0) { // Highlight word
if (_is_char(highlighted_word[0]) || highlighted_word[0] == '.') {
int highlighted_word_col = _get_column_pos_of_word(highlighted_word, str, SEARCH_MATCH_CASE | SEARCH_WHOLE_WORDS, 0);
while (highlighted_word_col != -1) {
@@ -1230,7 +1260,7 @@ void TextEdit::_notification(int p_what) {
}
rect.position.y = TS->shaped_text_get_ascent(rid) + cache.font->get_underline_position(cache.font_size);
rect.size.y = cache.font->get_underline_thickness(cache.font_size);
- draw_rect(rect, cache.font_color_selected);
+ draw_rect(rect, cache.font_selected_color);
}
highlighted_word_col = _get_column_pos_of_word(highlighted_word, str, SEARCH_MATCH_CASE | SEARCH_WHOLE_WORDS, highlighted_word_col + 1);
@@ -1238,6 +1268,7 @@ void TextEdit::_notification(int p_what) {
}
}
+ const int line_top_offset_y = ofs_y;
ofs_y += (row_height - text_height) / 2;
const Vector<TextServer::Glyph> visual = TS->shaped_text_get_glyphs(rid);
@@ -1246,11 +1277,27 @@ void TextEdit::_notification(int p_what) {
ofs_y += ldata->get_line_ascent(line_wrap_index);
int char_ofs = 0;
+ if (cache.outline_size > 0 && cache.outline_color.a > 0) {
+ for (int j = 0; j < gl_size; j++) {
+ for (int k = 0; k < glyphs[j].repeat; k++) {
+ if ((char_ofs + char_margin) >= xmargin_beg && (char_ofs + glyphs[j].advance + char_margin) <= xmargin_end) {
+ if (glyphs[j].font_rid != RID()) {
+ TS->font_draw_glyph_outline(glyphs[j].font_rid, ci, glyphs[j].font_size, cache.outline_size, Vector2(char_margin + char_ofs + ofs_x + glyphs[j].x_off, ofs_y + glyphs[j].y_off), glyphs[j].index, cache.outline_color);
+ }
+ }
+ char_ofs += glyphs[j].advance;
+ }
+ if ((char_ofs + char_margin) >= xmargin_end) {
+ break;
+ }
+ }
+ char_ofs = 0;
+ }
for (int j = 0; j < gl_size; j++) {
if (color_map.has(glyphs[j].start)) {
current_color = color_map[glyphs[j].start].get("color");
- if (readonly && current_color.a > cache.font_color_readonly.a) {
- current_color.a = cache.font_color_readonly.a;
+ if (readonly && current_color.a > cache.font_readonly_color.a) {
+ current_color.a = cache.font_readonly_color.a;
}
}
@@ -1259,7 +1306,7 @@ void TextEdit::_notification(int p_what) {
int sel_to = (line < selection.to_line) ? TS->shaped_text_get_range(rid).y : selection.to_column;
if (glyphs[j].start >= sel_from && glyphs[j].end <= sel_to && override_selected_font_color) {
- current_color = cache.font_color_selected;
+ current_color = cache.font_selected_color;
}
}
@@ -1296,7 +1343,7 @@ void TextEdit::_notification(int p_what) {
}
for (int k = 0; k < glyphs[j].repeat; k++) {
- if ((char_ofs + char_margin) >= xmargin_beg && (char_ofs + glyphs[j].advance + char_margin) <= xmargin_end) {
+ if (!clipped && (char_ofs + char_margin) >= xmargin_beg && (char_ofs + glyphs[j].advance + char_margin) <= xmargin_end) {
if (glyphs[j].font_rid != RID()) {
TS->font_draw_glyph(glyphs[j].font_rid, ci, glyphs[j].font_size, Vector2(char_margin + char_ofs + ofs_x + glyphs[j].x_off, ofs_y + glyphs[j].y_off), glyphs[j].index, current_color);
} else if ((glyphs[j].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) {
@@ -1326,8 +1373,10 @@ void TextEdit::_notification(int p_what) {
#else
int caret_width = 1;
#endif
- if (cursor.line == line && ((line_wrap_index == line_wrap_amount) || (cursor.column != TS->shaped_text_get_range(rid).y))) {
- cursor_pos.y = ofs_y + ldata->get_line_descent(line_wrap_index);
+ if (!clipped && cursor.line == line && ((line_wrap_index == line_wrap_amount) || (cursor.column != TS->shaped_text_get_range(rid).y))) {
+ is_cursor_line_visible = true;
+ cursor_pos.y = line_top_offset_y;
+
if (ime_text.length() == 0) {
Rect2 l_caret, t_caret;
TextServer::Direction l_dir, t_dir;
@@ -1377,7 +1426,7 @@ void TextEdit::_notification(int p_what) {
l_caret.size.y = h;
}
l_caret.position += Vector2(char_margin + ofs_x, ofs_y);
- l_caret.size.x = cache.font->get_char_size('m', 0, cache.font_size).x;
+ l_caret.size.x = cache.font->get_char_size('M', 0, cache.font_size).x;
draw_rect(l_caret, cache.caret_color, false);
}
@@ -1441,83 +1490,101 @@ void TextEdit::_notification(int p_what) {
}
}
}
- ofs_y += ldata->get_line_descent(line_wrap_index);
}
}
bool completion_below = false;
- if (completion_active && completion_options.size() > 0) {
- // Code completion box.
- Ref<StyleBox> csb = get_theme_stylebox("completion");
- int maxlines = get_theme_constant("completion_lines");
- int cmax_width = get_theme_constant("completion_max_width") * cache.font->get_char_size('x', 0, cache.font_size).x;
- int scrollw = get_theme_constant("completion_scroll_width");
- Color scrollc = get_theme_color("completion_scroll_color");
+ if (completion_active && is_cursor_line_visible && completion_options.size() > 0) {
+ // Completion panel
+
+ const Ref<StyleBox> csb = get_theme_stylebox("completion");
+ const int maxlines = get_theme_constant("completion_lines");
+ const int cmax_width = get_theme_constant("completion_max_width") * cache.font->get_char_size('x', 0, cache.font_size).x;
+ const Color scrollc = get_theme_color("completion_scroll_color");
const int completion_options_size = completion_options.size();
- int lines = MIN(completion_options_size, maxlines);
- int w = 0;
- int h = lines * row_height;
- int nofs = cache.font->get_string_size(completion_base, cache.font_size).width;
+ const int row_count = MIN(completion_options_size, maxlines);
+ const int completion_rows_height = row_count * row_height;
+ const int completion_base_width = cache.font->get_string_size(completion_base, cache.font_size).width;
+ int scroll_rectangle_width = get_theme_constant("completion_scroll_width");
+ int width = 0;
+
+ // Compute max width of the panel based on the longest completion option
if (completion_options_size < 50) {
for (int i = 0; i < completion_options_size; i++) {
- int w2 = MIN(cache.font->get_string_size(completion_options[i].display, cache.font_size).x, cmax_width);
- if (w2 > w) {
- w = w2;
+ int line_width = MIN(cache.font->get_string_size(completion_options[i].display, cache.font_size).x, cmax_width);
+ if (line_width > width) {
+ width = line_width;
}
}
} else {
- w = cmax_width;
+ width = cmax_width;
}
// Add space for completion icons.
const int icon_hsep = get_theme_constant("hseparation", "ItemList");
- Size2 icon_area_size(row_height, row_height);
- w += icon_area_size.width + icon_hsep;
+ const Size2 icon_area_size(row_height, row_height);
+ const int icon_area_width = icon_area_size.width + icon_hsep;
+ width += icon_area_width;
- int line_from = CLAMP(completion_index - lines / 2, 0, completion_options_size - lines);
+ const int line_from = CLAMP(completion_index - row_count / 2, 0, completion_options_size - row_count);
- for (int i = 0; i < lines; i++) {
+ for (int i = 0; i < row_count; i++) {
int l = line_from + i;
ERR_CONTINUE(l < 0 || l >= completion_options_size);
if (completion_options[l].default_value.get_type() == Variant::COLOR) {
- w += icon_area_size.width;
+ width += icon_area_size.width;
break;
}
}
- int th = h + csb->get_minimum_size().y;
+ // Position completion panel
+ completion_rect.size.width = width + 2;
+ completion_rect.size.height = completion_rows_height;
- if (cursor_pos.y + row_height + th > get_size().height) {
- completion_rect.position.y = cursor_pos.y - th - (cache.line_spacing / 2.0f) - cursor_insert_offset_y;
- } else {
- completion_rect.position.y = cursor_pos.y + cache.font->get_height(cache.font_size) + (cache.line_spacing / 2.0f) + csb->get_offset().y - cursor_insert_offset_y;
- completion_below = true;
+ if (completion_options_size <= maxlines) {
+ scroll_rectangle_width = 0;
}
- if (cursor_pos.x - nofs + w + scrollw > get_size().width) {
- completion_rect.position.x = get_size().width - w - scrollw;
+ const Point2 csb_offset = csb->get_offset();
+
+ const int total_width = completion_rect.size.width + csb->get_minimum_size().x + scroll_rectangle_width;
+ const int total_height = completion_rect.size.height + csb->get_minimum_size().y;
+
+ const int rect_left_border_x = cursor_pos.x - completion_base_width - icon_area_width - csb_offset.x;
+ const int rect_right_border_x = rect_left_border_x + total_width;
+
+ if (rect_left_border_x < 0) {
+ // Anchor the completion panel to the left
+ completion_rect.position.x = 0;
+ } else if (rect_right_border_x > get_size().width) {
+ // Anchor the completion panel to the right
+ completion_rect.position.x = get_size().width - total_width;
} else {
- completion_rect.position.x = cursor_pos.x - nofs;
+ // Let the completion panel float with the cursor
+ completion_rect.position.x = rect_left_border_x;
}
- completion_rect.size.width = w + 2;
- completion_rect.size.height = h;
- if (completion_options_size <= maxlines) {
- scrollw = 0;
+ if (cursor_pos.y + row_height + total_height > get_size().height) {
+ // Completion panel above the cursor line
+ completion_rect.position.y = cursor_pos.y - total_height;
+ } else {
+ // Completion panel below the cursor line
+ completion_rect.position.y = cursor_pos.y + row_height;
+ completion_below = true;
}
- draw_style_box(csb, Rect2(completion_rect.position - csb->get_offset(), completion_rect.size + csb->get_minimum_size() + Size2(scrollw, 0)));
+ draw_style_box(csb, Rect2(completion_rect.position - csb_offset, completion_rect.size + csb->get_minimum_size() + Size2(scroll_rectangle_width, 0)));
if (cache.completion_background_color.a > 0.01) {
- RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(completion_rect.position, completion_rect.size + Size2(scrollw, 0)), cache.completion_background_color);
+ RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(completion_rect.position, completion_rect.size + Size2(scroll_rectangle_width, 0)), cache.completion_background_color);
}
RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2(completion_rect.position.x, completion_rect.position.y + (completion_index - line_from) * get_row_height()), Size2(completion_rect.size.width, get_row_height())), cache.completion_selected_color);
- draw_rect(Rect2(completion_rect.position + Vector2(icon_area_size.x + icon_hsep, 0), Size2(MIN(nofs, completion_rect.size.width - (icon_area_size.x + icon_hsep)), completion_rect.size.height)), cache.completion_existing_color);
+ draw_rect(Rect2(completion_rect.position + Vector2(icon_area_size.x + icon_hsep, 0), Size2(MIN(completion_base_width, completion_rect.size.width - (icon_area_size.x + icon_hsep)), completion_rect.size.height)), cache.completion_existing_color);
- for (int i = 0; i < lines; i++) {
+ for (int i = 0; i < row_count; i++) {
int l = line_from + i;
ERR_CONTINUE(l < 0 || l >= completion_options_size);
@@ -1554,14 +1621,17 @@ void TextEdit::_notification(int p_what) {
}
tl->set_align(HALIGN_LEFT);
}
+ if (cache.outline_size > 0 && cache.outline_color.a > 0) {
+ tl->draw_outline(ci, title_pos, cache.outline_size, cache.outline_color);
+ }
tl->draw(ci, title_pos, completion_options[l].font_color);
}
- if (scrollw) {
+ if (scroll_rectangle_width) {
// Draw a small scroll rectangle to show a position in the options.
float r = (float)maxlines / completion_options_size;
float o = (float)line_from / completion_options_size;
- draw_rect(Rect2(completion_rect.position.x + completion_rect.size.width, completion_rect.position.y + o * completion_rect.size.y, scrollw, completion_rect.size.y * r), scrollc);
+ draw_rect(Rect2(completion_rect.position.x + completion_rect.size.width, completion_rect.position.y + o * completion_rect.size.y, scroll_rectangle_width, completion_rect.size.y * r), scrollc);
}
completion_line_ofs = line_from;
@@ -1569,7 +1639,7 @@ void TextEdit::_notification(int p_what) {
// Check to see if the hint should be drawn.
bool show_hint = false;
- if (completion_hint != "") {
+ if (is_cursor_line_visible && completion_hint != "") {
if (completion_active) {
if (completion_below && !callhint_below) {
show_hint = true;
@@ -1916,7 +1986,7 @@ void TextEdit::backspace_at_cursor() {
cursor_set_column(prev_column);
}
-void TextEdit::indent_right() {
+void TextEdit::indent_selected_lines_right() {
int start_line;
int end_line;
@@ -1968,7 +2038,7 @@ void TextEdit::indent_right() {
update();
}
-void TextEdit::indent_left() {
+void TextEdit::indent_selected_lines_left() {
int start_line;
int end_line;
@@ -2039,6 +2109,618 @@ int TextEdit::_calculate_spaces_till_next_right_indent(int column) {
return indent_size - column % indent_size;
}
+void TextEdit::_swap_current_input_direction() {
+ if (input_direction == TEXT_DIRECTION_LTR) {
+ input_direction = TEXT_DIRECTION_RTL;
+ } else {
+ input_direction = TEXT_DIRECTION_LTR;
+ }
+ cursor_set_column(cursor.column);
+ update();
+}
+
+void TextEdit::_new_line(bool p_split_current_line, bool p_above) {
+ if (readonly) {
+ return;
+ }
+
+ String ins = "\n";
+
+ // Keep indentation.
+ int space_count = 0;
+ for (int i = 0; i < cursor.column; i++) {
+ if (text[cursor.line][i] == '\t') {
+ if (indent_using_spaces) {
+ ins += space_indent;
+ } else {
+ ins += "\t";
+ }
+ space_count = 0;
+ } else if (text[cursor.line][i] == ' ') {
+ space_count++;
+
+ if (space_count == indent_size) {
+ if (indent_using_spaces) {
+ ins += space_indent;
+ } else {
+ ins += "\t";
+ }
+ space_count = 0;
+ }
+ } else {
+ break;
+ }
+ }
+
+ if (is_folded(cursor.line)) {
+ unfold_line(cursor.line);
+ }
+
+ bool brace_indent = false;
+
+ // No need to indent if we are going upwards.
+ if (auto_indent && !p_above) {
+ // Indent once again if previous line will end with ':','{','[','(' and the line is not a comment
+ // (i.e. colon/brace precedes current cursor position).
+ if (cursor.column > 0) {
+ bool indent_char_found = false;
+ bool should_indent = false;
+ char indent_char = ':';
+ char c = text[cursor.line][cursor.column];
+
+ for (int i = 0; i < cursor.column; i++) {
+ c = text[cursor.line][i];
+ switch (c) {
+ case ':':
+ case '{':
+ case '[':
+ case '(':
+ indent_char_found = true;
+ should_indent = true;
+ indent_char = c;
+ continue;
+ }
+
+ if (indent_char_found && is_line_comment(cursor.line)) {
+ should_indent = true;
+ break;
+ } else if (indent_char_found && !_is_whitespace(c)) {
+ should_indent = false;
+ indent_char_found = false;
+ }
+ }
+
+ if (!is_line_comment(cursor.line) && should_indent) {
+ if (indent_using_spaces) {
+ ins += space_indent;
+ } else {
+ ins += "\t";
+ }
+
+ // No need to move the brace below if we are not taking the text with us.
+ char32_t closing_char = _get_right_pair_symbol(indent_char);
+ if ((closing_char != 0) && (closing_char == text[cursor.line][cursor.column]) && !p_split_current_line) {
+ brace_indent = true;
+ ins += "\n" + ins.substr(1, ins.length() - 2);
+ }
+ }
+ }
+ }
+ begin_complex_operation();
+ bool first_line = false;
+ if (!p_split_current_line) {
+ if (p_above) {
+ if (cursor.line > 0) {
+ cursor_set_line(cursor.line - 1);
+ cursor_set_column(text[cursor.line].length());
+ } else {
+ cursor_set_column(0);
+ first_line = true;
+ }
+ } else {
+ cursor_set_column(text[cursor.line].length());
+ }
+ }
+
+ insert_text_at_cursor(ins);
+
+ if (first_line) {
+ cursor_set_line(0);
+ } else if (brace_indent) {
+ cursor_set_line(cursor.line - 1);
+ cursor_set_column(text[cursor.line].length());
+ }
+ end_complex_operation();
+}
+
+void TextEdit::_indent_right() {
+ if (readonly) {
+ return;
+ }
+
+ if (is_selection_active()) {
+ indent_selected_lines_right();
+ } else {
+ // Simple indent.
+ if (indent_using_spaces) {
+ // Insert only as much spaces as needed till next indentation level.
+ int spaces_to_add = _calculate_spaces_till_next_right_indent(cursor.column);
+ String indent_to_insert = String();
+ for (int i = 0; i < spaces_to_add; i++) {
+ indent_to_insert = ' ' + indent_to_insert;
+ }
+ _insert_text_at_cursor(indent_to_insert);
+ } else {
+ _insert_text_at_cursor("\t");
+ }
+ }
+}
+
+void TextEdit::_indent_left() {
+ if (readonly) {
+ return;
+ }
+
+ if (is_selection_active()) {
+ indent_selected_lines_left();
+ } else {
+ // Simple unindent.
+ int cc = cursor.column;
+ const String &line = text[cursor.line];
+
+ int left = _find_first_non_whitespace_column_of_line(line);
+ cc = MIN(cc, left);
+
+ while (cc < indent_size && cc < left && line[cc] == ' ') {
+ cc++;
+ }
+
+ if (cc > 0 && cc <= text[cursor.line].length()) {
+ if (text[cursor.line][cc - 1] == '\t') {
+ // Tabs unindentation.
+ _remove_text(cursor.line, cc - 1, cursor.line, cc);
+ if (cursor.column >= left) {
+ cursor_set_column(MAX(0, cursor.column - 1));
+ }
+ update();
+ } else {
+ // Spaces unindentation.
+ int spaces_to_remove = _calculate_spaces_till_next_left_indent(cc);
+ if (spaces_to_remove > 0) {
+ _remove_text(cursor.line, cc - spaces_to_remove, cursor.line, cc);
+ if (cursor.column > left - spaces_to_remove) { // Inside text?
+ cursor_set_column(MAX(0, cursor.column - spaces_to_remove));
+ }
+ update();
+ }
+ }
+ } else if (cc == 0 && line.length() > 0 && line[0] == '\t') {
+ _remove_text(cursor.line, 0, cursor.line, 1);
+ update();
+ }
+ }
+}
+
+void TextEdit::_move_cursor_left(bool p_select, bool p_move_by_word) {
+ // Handle selection
+ if (p_select) {
+ _pre_shift_selection();
+ } else {
+ deselect();
+ }
+
+ if (p_move_by_word) {
+ int cc = cursor.column;
+
+ if (cc == 0 && cursor.line > 0) {
+ cursor_set_line(cursor.line - 1);
+ cursor_set_column(text[cursor.line].length());
+ } else {
+ Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text.get_line_data(cursor.line)->get_rid());
+ for (int i = words.size() - 1; i >= 0; i--) {
+ if (words[i].x < cc) {
+ cc = words[i].x;
+ break;
+ }
+ }
+ cursor_set_column(cc);
+ }
+ } else {
+ // If the cursor is at the start of the line, and not on the first line, move it up to the end of the previous line.
+ if (cursor.column == 0) {
+ if (cursor.line > 0) {
+ cursor_set_line(cursor.line - num_lines_from(CLAMP(cursor.line - 1, 0, text.size() - 1), -1));
+ cursor_set_column(text[cursor.line].length());
+ }
+ } else {
+ if (mid_grapheme_caret_enabled) {
+ cursor_set_column(cursor_get_column() - 1);
+ } else {
+ cursor_set_column(TS->shaped_text_prev_grapheme_pos(text.get_line_data(cursor.line)->get_rid(), cursor_get_column()));
+ }
+ }
+ }
+
+ if (p_select) {
+ _post_shift_selection();
+ }
+}
+
+void TextEdit::_move_cursor_right(bool p_select, bool p_move_by_word) {
+ // Handle selection
+ if (p_select) {
+ _pre_shift_selection();
+ } else {
+ deselect();
+ }
+
+ if (p_move_by_word) {
+ int cc = cursor.column;
+
+ if (cc == text[cursor.line].length() && cursor.line < text.size() - 1) {
+ cursor_set_line(cursor.line + 1);
+ cursor_set_column(0);
+ } else {
+ Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text.get_line_data(cursor.line)->get_rid());
+ for (int i = 0; i < words.size(); i++) {
+ if (words[i].y > cc) {
+ cc = words[i].y;
+ break;
+ }
+ }
+ cursor_set_column(cc);
+ }
+ } else {
+ // If we are at the end of the line, move the caret to the next line down.
+ if (cursor.column == text[cursor.line].length()) {
+ if (cursor.line < text.size() - 1) {
+ cursor_set_line(cursor_get_line() + num_lines_from(CLAMP(cursor.line + 1, 0, text.size() - 1), 1), true, false);
+ cursor_set_column(0);
+ }
+ } else {
+ if (mid_grapheme_caret_enabled) {
+ cursor_set_column(cursor_get_column() + 1);
+ } else {
+ cursor_set_column(TS->shaped_text_next_grapheme_pos(text.get_line_data(cursor.line)->get_rid(), cursor_get_column()));
+ }
+ }
+ }
+
+ if (p_select) {
+ _post_shift_selection();
+ }
+}
+
+void TextEdit::_move_cursor_up(bool p_select) {
+ if (p_select) {
+ _pre_shift_selection();
+ } else {
+ deselect();
+ }
+
+ int cur_wrap_index = get_cursor_wrap_index();
+ if (cur_wrap_index > 0) {
+ cursor_set_line(cursor.line, true, false, cur_wrap_index - 1);
+ } else if (cursor.line == 0) {
+ cursor_set_column(0);
+ } else {
+ int new_line = cursor.line - num_lines_from(cursor.line - 1, -1);
+ if (line_wraps(new_line)) {
+ cursor_set_line(new_line, true, false, times_line_wraps(new_line));
+ } else {
+ cursor_set_line(new_line, true, false);
+ }
+ }
+
+ if (p_select) {
+ _post_shift_selection();
+ }
+
+ _cancel_code_hint();
+}
+
+void TextEdit::_move_cursor_down(bool p_select) {
+ if (p_select) {
+ _pre_shift_selection();
+ } else {
+ deselect();
+ }
+
+ int cur_wrap_index = get_cursor_wrap_index();
+ if (cur_wrap_index < times_line_wraps(cursor.line)) {
+ cursor_set_line(cursor.line, true, false, cur_wrap_index + 1);
+ } else if (cursor.line == get_last_unhidden_line()) {
+ cursor_set_column(text[cursor.line].length());
+ } else {
+ int new_line = cursor.line + num_lines_from(CLAMP(cursor.line + 1, 0, text.size() - 1), 1);
+ cursor_set_line(new_line, true, false, 0);
+ }
+
+ if (p_select) {
+ _post_shift_selection();
+ }
+
+ _cancel_code_hint();
+}
+
+void TextEdit::_move_cursor_to_line_start(bool p_select) {
+ if (p_select) {
+ _pre_shift_selection();
+ } else {
+ deselect();
+ }
+
+ // Move cursor column to start of wrapped row and then to start of text.
+ Vector<String> rows = get_wrap_rows_text(cursor.line);
+ int wi = get_cursor_wrap_index();
+ int row_start_col = 0;
+ for (int i = 0; i < wi; i++) {
+ row_start_col += rows[i].length();
+ }
+ if (cursor.column == row_start_col || wi == 0) {
+ // Compute whitespace symbols seq length.
+ int current_line_whitespace_len = 0;
+ while (current_line_whitespace_len < text[cursor.line].length()) {
+ char32_t c = text[cursor.line][current_line_whitespace_len];
+ if (c != '\t' && c != ' ') {
+ break;
+ }
+ current_line_whitespace_len++;
+ }
+
+ if (cursor_get_column() == current_line_whitespace_len) {
+ cursor_set_column(0);
+ } else {
+ cursor_set_column(current_line_whitespace_len);
+ }
+ } else {
+ cursor_set_column(row_start_col);
+ }
+
+ if (p_select) {
+ _post_shift_selection();
+ }
+
+ _cancel_completion();
+ completion_hint = "";
+}
+
+void TextEdit::_move_cursor_to_line_end(bool p_select) {
+ if (p_select) {
+ _pre_shift_selection();
+ } else {
+ deselect();
+ }
+
+ // Move cursor column to end of wrapped row and then to end of text.
+ Vector<String> rows = get_wrap_rows_text(cursor.line);
+ int wi = get_cursor_wrap_index();
+ int row_end_col = -1;
+ for (int i = 0; i < wi + 1; i++) {
+ row_end_col += rows[i].length();
+ }
+ if (wi == rows.size() - 1 || cursor.column == row_end_col) {
+ cursor_set_column(text[cursor.line].length());
+ } else {
+ cursor_set_column(row_end_col);
+ }
+
+ if (p_select) {
+ _post_shift_selection();
+ }
+ _cancel_completion();
+ completion_hint = "";
+}
+
+void TextEdit::_move_cursor_page_up(bool p_select) {
+ if (p_select) {
+ _pre_shift_selection();
+ } else {
+ deselect();
+ }
+
+ int wi;
+ int n_line = cursor.line - num_lines_from_rows(cursor.line, get_cursor_wrap_index(), -get_visible_rows(), wi) + 1;
+ cursor_set_line(n_line, true, false, wi);
+
+ if (p_select) {
+ _post_shift_selection();
+ }
+
+ _cancel_completion();
+ completion_hint = "";
+}
+
+void TextEdit::_move_cursor_page_down(bool p_select) {
+ if (p_select) {
+ _pre_shift_selection();
+ } else {
+ deselect();
+ }
+
+ int wi;
+ int n_line = cursor.line + num_lines_from_rows(cursor.line, get_cursor_wrap_index(), get_visible_rows(), wi) - 1;
+ cursor_set_line(n_line, true, false, wi);
+
+ if (p_select) {
+ _post_shift_selection();
+ }
+
+ _cancel_completion();
+ completion_hint = "";
+}
+
+void TextEdit::_backspace(bool p_word, bool p_all_to_left) {
+ if (readonly) {
+ return;
+ }
+
+ if (is_selection_active()) {
+ _delete_selection();
+ return;
+ }
+ if (p_all_to_left) {
+ int cursor_current_column = cursor.column;
+ cursor.column = 0;
+ _remove_text(cursor.line, 0, cursor.line, cursor_current_column);
+ } else if (p_word) {
+ int line = cursor.line;
+ int column = cursor.column;
+
+ Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text.get_line_data(line)->get_rid());
+ for (int i = words.size() - 1; i >= 0; i--) {
+ if (words[i].x < column) {
+ column = words[i].x;
+ break;
+ }
+ }
+
+ _remove_text(line, column, cursor.line, cursor.column);
+
+ cursor_set_line(line);
+ cursor_set_column(column);
+ } else {
+ // One character.
+ if (cursor.line > 0 && is_line_hidden(cursor.line - 1)) {
+ unfold_line(cursor.line - 1);
+ }
+ backspace_at_cursor();
+ }
+}
+
+void TextEdit::_delete(bool p_word, bool p_all_to_right) {
+ if (readonly) {
+ return;
+ }
+
+ if (is_selection_active()) {
+ _delete_selection();
+ return;
+ }
+ int curline_len = text[cursor.line].length();
+
+ if (cursor.line == text.size() - 1 && cursor.column == curline_len) {
+ return; // Last line, last column: Nothing to do.
+ }
+
+ int next_line = cursor.column < curline_len ? cursor.line : cursor.line + 1;
+ int next_column;
+
+ if (p_all_to_right) {
+ // Delete everything to right of cursor
+ next_column = curline_len;
+ next_line = cursor.line;
+ } else if (p_word && cursor.column < curline_len - 1) {
+ // Delete next word to right of cursor
+ int line = cursor.line;
+ int column = cursor.column;
+
+ Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text.get_line_data(line)->get_rid());
+ for (int i = 0; i < words.size(); i++) {
+ if (words[i].y > column) {
+ column = words[i].y;
+ break;
+ }
+ }
+
+ next_line = line;
+ next_column = column;
+ } else {
+ // Delete one character
+ next_column = cursor.column < curline_len ? (cursor.column + 1) : 0;
+ if (mid_grapheme_caret_enabled) {
+ next_column = cursor.column < curline_len ? (cursor.column + 1) : 0;
+ } else {
+ next_column = cursor.column < curline_len ? TS->shaped_text_next_grapheme_pos(text.get_line_data(cursor.line)->get_rid(), (cursor.column)) : 0;
+ }
+ }
+
+ _remove_text(cursor.line, cursor.column, next_line, next_column);
+ update();
+}
+
+void TextEdit::_delete_selection() {
+ if (is_selection_active()) {
+ selection.active = false;
+ update();
+ _remove_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column);
+ cursor_set_line(selection.from_line, true, false);
+ cursor_set_column(selection.from_column);
+ update();
+ }
+}
+
+void TextEdit::_move_cursor_document_start(bool p_select) {
+ if (p_select) {
+ _pre_shift_selection();
+ } else {
+ deselect();
+ }
+
+ cursor_set_line(0);
+ cursor_set_column(0);
+
+ if (p_select) {
+ _post_shift_selection();
+ }
+}
+
+void TextEdit::_move_cursor_document_end(bool p_select) {
+ if (p_select) {
+ _pre_shift_selection();
+ } else {
+ deselect();
+ }
+
+ cursor_set_line(get_last_unhidden_line(), true, false, 9999);
+ cursor_set_column(text[cursor.line].length());
+
+ if (p_select) {
+ _post_shift_selection();
+ }
+}
+
+void TextEdit::_handle_unicode_character(uint32_t unicode, bool p_had_selection, bool p_update_auto_complete) {
+ if (p_update_auto_complete) {
+ _reset_caret_blink_timer();
+ }
+
+ if (p_had_selection) {
+ _delete_selection();
+ }
+
+ // Remove the old character if in insert mode and no selection.
+ if (insert_mode && !p_had_selection) {
+ begin_complex_operation();
+
+ // Make sure we don't try and remove empty space.
+ if (cursor.column < get_line(cursor.line).length()) {
+ _remove_text(cursor.line, cursor.column, cursor.line, cursor.column + 1);
+ }
+ }
+
+ const char32_t chr[2] = { (char32_t)unicode, 0 };
+
+ // Clear completion hint when function closed
+ if (completion_hint != "" && unicode == ')') {
+ completion_hint = "";
+ }
+
+ if (auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
+ _consume_pair_symbol(chr[0]);
+ } else {
+ _insert_text_at_cursor(chr);
+ }
+
+ if ((insert_mode && !p_had_selection) || (selection.active != p_had_selection)) {
+ end_complex_operation();
+ }
+
+ if (p_update_auto_complete) {
+ _update_completion_candidates();
+ }
+}
+
void TextEdit::_get_mouse_pos(const Point2i &p_mouse, int &r_row, int &r_col) const {
float rows = p_mouse.y;
rows -= cache.style_normal->get_margin(SIDE_TOP);
@@ -2069,6 +2751,18 @@ void TextEdit::_get_mouse_pos(const Point2i &p_mouse, int &r_row, int &r_col) co
} else {
int colx = p_mouse.x - (cache.style_normal->get_margin(SIDE_LEFT) + gutters_width + gutter_padding);
colx += cursor.x_ofs;
+ 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> rows2 = get_wrap_rows_text(row);
+ int row_end_col = 0;
+ for (int i = 0; i < wrap_index + 1; i++) {
+ row_end_col += rows2[i].length();
+ }
+ if (col >= row_end_col) {
+ col -= 1;
+ }
+ }
RID text_rid = text.get_line_data(row)->get_line_rid(wrap_index);
if (is_layout_rtl()) {
@@ -2274,7 +2968,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
int prev_col = cursor.column;
int prev_line = cursor.line;
- cursor_set_line(row, true, false);
+ cursor_set_line(row, false, false);
cursor_set_column(col);
if (mb->get_shift() && (cursor.column != prev_col || cursor.line != prev_line)) {
@@ -2321,7 +3015,6 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
update();
}
-
} else {
selection.active = false;
selection.selecting_mode = SelectionMode::SELECTION_MODE_POINTER;
@@ -2370,7 +3063,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
menu->set_position(get_screen_transform().xform(mpos));
menu->set_size(Vector2(1, 1));
- // menu->set_scale(get_global_transform().get_scale());
+ _generate_context_menu();
menu->popup();
grab_focus();
}
@@ -2464,13 +3157,11 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
Ref<InputEventKey> k = p_gui_input;
if (k.is_valid()) {
- k = k->duplicate(); // It will be modified later on.
-
+ // Ctrl + Hover symbols
#ifdef OSX_ENABLED
if (k->get_keycode() == KEY_META) {
#else
if (k->get_keycode() == KEY_CONTROL) {
-
#endif
if (select_identifiers_enabled) {
if (k->is_pressed() && !dragging_minimap && !dragging_selection) {
@@ -2480,1191 +3171,347 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
set_highlighted_word(String());
}
}
+ return;
}
if (!k->is_pressed()) {
return;
}
- if (completion_active) {
- if (readonly) {
- return;
- }
-
- bool valid = true;
- if (k->get_command() || k->get_metakey()) {
- valid = false;
- }
-
- if (valid) {
- if (!k->get_alt()) {
- if (k->get_keycode() == KEY_UP) {
- if (completion_index > 0) {
- completion_index--;
- } else {
- completion_index = completion_options.size() - 1;
- }
- completion_current = completion_options[completion_index];
- update();
-
- accept_event();
- return;
- }
-
- if (k->get_keycode() == KEY_DOWN) {
- if (completion_index < completion_options.size() - 1) {
- completion_index++;
- } else {
- completion_index = 0;
- }
- completion_current = completion_options[completion_index];
- update();
-
- accept_event();
- return;
- }
-
- if (k->get_keycode() == KEY_PAGEUP) {
- completion_index -= get_theme_constant("completion_lines");
- if (completion_index < 0) {
- completion_index = 0;
- }
- completion_current = completion_options[completion_index];
- update();
- accept_event();
- return;
- }
-
- if (k->get_keycode() == KEY_PAGEDOWN) {
- completion_index += get_theme_constant("completion_lines");
- if (completion_index >= completion_options.size()) {
- completion_index = completion_options.size() - 1;
- }
- completion_current = completion_options[completion_index];
- update();
- accept_event();
- return;
- }
-
- if (k->get_keycode() == KEY_HOME && completion_index > 0) {
- completion_index = 0;
- completion_current = completion_options[completion_index];
- update();
- accept_event();
- return;
- }
-
- if (k->get_keycode() == KEY_END && completion_index < completion_options.size() - 1) {
- completion_index = completion_options.size() - 1;
- completion_current = completion_options[completion_index];
- update();
- accept_event();
- return;
- }
-
- if (k->get_keycode() == KEY_KP_ENTER || k->get_keycode() == KEY_ENTER || k->get_keycode() == KEY_TAB) {
- _confirm_completion();
- accept_event();
- return;
- }
-
- if (k->get_keycode() == KEY_BACKSPACE) {
- _reset_caret_blink_timer();
-
- backspace_at_cursor();
- _update_completion_candidates();
- accept_event();
- return;
- }
-
- if (k->get_keycode() == KEY_SHIFT) {
- accept_event();
- return;
- }
- }
-
- if (k->get_unicode() > 32) {
- _reset_caret_blink_timer();
-
- const char32_t chr[2] = { (char32_t)k->get_unicode(), 0 };
- if (auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
- _consume_pair_symbol(chr[0]);
- } else {
- // Remove the old character if in insert mode.
- if (insert_mode) {
- begin_complex_operation();
-
- // Make sure we don't try and remove empty space.
- if (cursor.column < get_line(cursor.line).length()) {
- _remove_text(cursor.line, cursor.column, cursor.line, cursor.column + 1);
- }
- }
-
- _insert_text_at_cursor(chr);
-
- if (insert_mode) {
- end_complex_operation();
- }
- }
- _update_completion_candidates();
- accept_event();
-
- return;
- }
- }
-
- _cancel_completion();
- }
-
- /* TEST CONTROL FIRST! */
-
- // Some remaps for duplicate functions.
- if (k->get_command() && !k->get_shift() && !k->get_alt() && !k->get_metakey() && k->get_keycode() == KEY_INSERT) {
- k->set_keycode(KEY_C);
- }
- if (!k->get_command() && k->get_shift() && !k->get_alt() && !k->get_metakey() && k->get_keycode() == KEY_INSERT) {
- k->set_keycode(KEY_V);
- k->set_command(true);
- k->set_shift(false);
- }
-#ifdef APPLE_STYLE_KEYS
- if (k->get_control() && !k->get_shift() && !k->get_alt() && !k->get_command()) {
- uint32_t remap_key = KEY_UNKNOWN;
- switch (k->get_keycode()) {
- case KEY_F: {
- remap_key = KEY_RIGHT;
- } break;
- case KEY_B: {
- remap_key = KEY_LEFT;
- } break;
- case KEY_P: {
- remap_key = KEY_UP;
- } break;
- case KEY_N: {
- remap_key = KEY_DOWN;
- } break;
- case KEY_D: {
- remap_key = KEY_DELETE;
- } break;
- case KEY_H: {
- remap_key = KEY_BACKSPACE;
- } break;
- }
-
- if (remap_key != KEY_UNKNOWN) {
- k->set_keycode(remap_key);
- k->set_control(false);
- }
+ // If a modifier has been pressed, and nothing else, return.
+ if (k->get_keycode() == KEY_CONTROL || k->get_keycode() == KEY_ALT || k->get_keycode() == KEY_SHIFT || k->get_keycode() == KEY_META) {
+ return;
}
-#endif
_reset_caret_blink_timer();
+ // Allow unicode handling if:
+ // * No Modifiers are pressed (except shift)
+ bool allow_unicode_handling = !(k->get_command() || k->get_control() || k->get_alt() || k->get_metakey());
+
// Save here for insert mode, just in case it is cleared in the following section.
bool had_selection = selection.active;
- // Stuff to do when selection is active.
- if (!readonly && selection.active) {
- bool clear = false;
- bool unselect = false;
- bool dobreak = false;
-
- switch (k->get_keycode()) {
- case KEY_TAB: {
- if (k->get_shift()) {
- indent_left();
- } else {
- indent_right();
- }
- dobreak = true;
- accept_event();
- } break;
- case KEY_X:
- case KEY_C:
- // Special keys often used with control, wait.
- clear = (!k->get_command() || k->get_shift() || k->get_alt());
- break;
- case KEY_DELETE:
- if (!k->get_shift()) {
- accept_event();
- clear = true;
- dobreak = true;
- } else if (k->get_command() || k->get_alt()) {
- dobreak = true;
- }
- break;
- case KEY_BACKSPACE:
- accept_event();
- clear = true;
- dobreak = true;
- break;
- case KEY_LEFT:
- case KEY_RIGHT:
- case KEY_UP:
- case KEY_DOWN:
- case KEY_PAGEUP:
- case KEY_PAGEDOWN:
- case KEY_HOME:
- case KEY_END:
- // Ignore arrows if any modifiers are held (shift = selecting, others may be used for editor hotkeys).
- if (k->get_command() || k->get_shift() || k->get_alt()) {
- break;
- }
- unselect = true;
- break;
-
- default:
- if (k->get_unicode() >= 32 && !k->get_command() && !k->get_alt() && !k->get_metakey()) {
- clear = true;
- }
- if (auto_brace_completion_enabled && _is_pair_left_symbol(k->get_unicode())) {
- clear = false;
- }
- }
-
- if (unselect) {
- selection.active = false;
- selection.selecting_mode = SelectionMode::SELECTION_MODE_NONE;
- update();
- }
- if (clear) {
- if (!dobreak) {
- begin_complex_operation();
- }
- selection.active = false;
- update();
- _remove_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column);
- cursor_set_line(selection.from_line, true, false);
- cursor_set_column(selection.from_column);
- update();
- }
- if (dobreak) {
- return;
- }
- }
-
selection.selecting_text = false;
- bool keycode_handled = true;
-
- // Special keycode test.
-
- switch (k->get_keycode()) {
- case KEY_KP_ENTER:
- case KEY_ENTER: {
- if (readonly) {
- break;
- }
-
- String ins = "\n";
-
- // Keep indentation.
- int space_count = 0;
- for (int i = 0; i < cursor.column; i++) {
- if (text[cursor.line][i] == '\t') {
- if (indent_using_spaces) {
- ins += space_indent;
- } else {
- ins += "\t";
- }
- space_count = 0;
- } else if (text[cursor.line][i] == ' ') {
- space_count++;
-
- if (space_count == indent_size) {
- if (indent_using_spaces) {
- ins += space_indent;
- } else {
- ins += "\t";
- }
- space_count = 0;
- }
- } else {
- break;
- }
- }
-
- if (is_folded(cursor.line)) {
- unfold_line(cursor.line);
- }
-
- bool brace_indent = false;
-
- // No need to indent if we are going upwards.
- if (auto_indent && !(k->get_command() && k->get_shift())) {
- // Indent once again if previous line will end with ':','{','[','(' and the line is not a comment
- // (i.e. colon/brace precedes current cursor position).
- if (cursor.column > 0) {
- bool indent_char_found = false;
- bool should_indent = false;
- char indent_char = ':';
- char c = text[cursor.line][cursor.column];
-
- for (int i = 0; i < cursor.column; i++) {
- c = text[cursor.line][i];
- switch (c) {
- case ':':
- case '{':
- case '[':
- case '(':
- indent_char_found = true;
- should_indent = true;
- indent_char = c;
- continue;
- }
-
- if (indent_char_found && is_line_comment(cursor.line)) {
- should_indent = true;
- break;
- } else if (indent_char_found && !_is_whitespace(c)) {
- should_indent = false;
- indent_char_found = false;
- }
- }
-
- if (!is_line_comment(cursor.line) && should_indent) {
- if (indent_using_spaces) {
- ins += space_indent;
- } else {
- ins += "\t";
- }
-
- // No need to move the brace below if we are not taking the text with us.
- char32_t closing_char = _get_right_pair_symbol(indent_char);
- if ((closing_char != 0) && (closing_char == text[cursor.line][cursor.column]) && !k->get_command()) {
- brace_indent = true;
- ins += "\n" + ins.substr(1, ins.length() - 2);
- }
- }
- }
- }
- begin_complex_operation();
- bool first_line = false;
- if (k->get_command()) {
- if (k->get_shift()) {
- if (cursor.line > 0) {
- cursor_set_line(cursor.line - 1);
- cursor_set_column(text[cursor.line].length());
- } else {
- cursor_set_column(0);
- first_line = true;
- }
- } else {
- cursor_set_column(text[cursor.line].length());
- }
- }
+ // Check and handle all built in shortcuts.
- insert_text_at_cursor(ins);
+ // AUTO-COMPLETE
- if (first_line) {
- cursor_set_line(0);
- } else if (brace_indent) {
- cursor_set_line(cursor.line - 1);
- cursor_set_column(text[cursor.line].length());
- }
- end_complex_operation();
- } break;
- case KEY_ESCAPE: {
- if (completion_hint != "") {
- completion_hint = "";
- update();
- } else {
- keycode_handled = false;
- }
- } break;
- case KEY_TAB: {
- if (k->get_command()) {
- break; // Avoid tab when command.
- }
-
- if (readonly) {
- break;
- }
-
- if (is_selection_active()) {
- if (k->get_shift()) {
- indent_left();
- } else {
- indent_right();
- }
- } else {
- if (k->get_shift()) {
- // Simple unindent.
- int cc = cursor.column;
- const String &line = text[cursor.line];
-
- int left = _find_first_non_whitespace_column_of_line(line);
- cc = MIN(cc, left);
-
- while (cc < indent_size && cc < left && line[cc] == ' ') {
- cc++;
- }
-
- if (cc > 0 && cc <= text[cursor.line].length()) {
- if (text[cursor.line][cc - 1] == '\t') {
- // Tabs unindentation.
- _remove_text(cursor.line, cc - 1, cursor.line, cc);
- if (cursor.column >= left) {
- cursor_set_column(MAX(0, cursor.column - 1));
- }
- update();
- } else {
- // Spaces unindentation.
- int spaces_to_remove = _calculate_spaces_till_next_left_indent(cc);
- if (spaces_to_remove > 0) {
- _remove_text(cursor.line, cc - spaces_to_remove, cursor.line, cc);
- if (cursor.column > left - spaces_to_remove) { // Inside text?
- cursor_set_column(MAX(0, cursor.column - spaces_to_remove));
- }
- update();
- }
- }
- } else if (cc == 0 && line.length() > 0 && line[0] == '\t') {
- _remove_text(cursor.line, 0, cursor.line, 1);
- update();
- }
- } else {
- // Simple indent.
- if (indent_using_spaces) {
- // Insert only as much spaces as needed till next indentation level.
- int spaces_to_add = _calculate_spaces_till_next_right_indent(cursor.column);
- String indent_to_insert = String();
- for (int i = 0; i < spaces_to_add; i++) {
- indent_to_insert = ' ' + indent_to_insert;
- }
- _insert_text_at_cursor(indent_to_insert);
- } else {
- _insert_text_at_cursor("\t");
- }
- }
- }
-
- } break;
- case KEY_BACKSPACE: {
- if (readonly) {
- break;
- }
-
-#ifdef APPLE_STYLE_KEYS
- if (k->get_alt() && cursor.column > 1) {
-#else
- if (k->get_alt()) {
- keycode_handled = false;
- break;
- } else if (k->get_command() && cursor.column > 1) {
-#endif
- int line = cursor.line;
- int column = cursor.column;
-
- Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text.get_line_data(line)->get_rid());
- for (int i = words.size() - 1; i >= 0; i--) {
- if (words[i].x < column) {
- column = words[i].x;
- break;
- }
- }
-
- _remove_text(line, column, cursor.line, cursor.column);
-
- cursor_set_line(line);
- cursor_set_column(column);
-
-#ifdef APPLE_STYLE_KEYS
- } else if (k->get_command()) {
- int cursor_current_column = cursor.column;
- cursor.column = 0;
- _remove_text(cursor.line, 0, cursor.line, cursor_current_column);
-#endif
- } else {
- if (cursor.line > 0 && is_line_hidden(cursor.line - 1)) {
- unfold_line(cursor.line - 1);
- }
- backspace_at_cursor();
- }
-
- } break;
- case KEY_KP_4: {
- if (k->get_unicode() != 0) {
- keycode_handled = false;
- break;
- }
- [[fallthrough]];
- }
- case KEY_LEFT: {
- if (k->get_shift()) {
- _pre_shift_selection();
-#ifdef APPLE_STYLE_KEYS
- } else {
-#else
- } else if (!k->get_alt()) {
-#endif
- deselect();
- }
-
-#ifdef APPLE_STYLE_KEYS
- if (k->get_command()) {
- // Start at first column (it's slightly faster that way) and look for the first non-whitespace character.
- int new_cursor_pos = 0;
- for (int i = 0; i < text[cursor.line].length(); ++i) {
- if (!_is_whitespace(text[cursor.line][i])) {
- new_cursor_pos = i;
- break;
- }
- }
- if (new_cursor_pos == cursor.column) {
- // We're already at the first text character, so move to the very beginning of the line.
- cursor_set_column(0);
- } else {
- // We're somewhere to the right of the first text character; move to the first one.
- cursor_set_column(new_cursor_pos);
- }
- } else if (k->get_alt()) {
-#else
- if (k->get_alt()) {
- keycode_handled = false;
- break;
- } else if (k->get_command()) {
-#endif
- int cc = cursor.column;
-
- if (cc == 0 && cursor.line > 0) {
- cursor_set_line(cursor.line - 1);
- cursor_set_column(text[cursor.line].length());
- } else {
- Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text.get_line_data(cursor.line)->get_rid());
- for (int i = words.size() - 1; i >= 0; i--) {
- if (words[i].x < cc) {
- cc = words[i].x;
- break;
- }
- }
- cursor_set_column(cc);
- }
+ if (k->is_action("ui_text_completion_query", true)) {
+ query_code_comple();
+ accept_event();
+ return;
+ }
- } else if (cursor.column == 0) {
- if (cursor.line > 0) {
- cursor_set_line(cursor.line - num_lines_from(CLAMP(cursor.line - 1, 0, text.size() - 1), -1));
- cursor_set_column(text[cursor.line].length());
- }
+ if (completion_active) {
+ if (k->is_action("ui_up", true)) {
+ if (completion_index > 0) {
+ completion_index--;
} else {
- if (mid_grapheme_caret_enabled) {
- cursor_set_column(cursor_get_column() - 1);
- } else {
- cursor_set_column(TS->shaped_text_prev_grapheme_pos(text.get_line_data(cursor.line)->get_rid(), cursor_get_column()));
- }
+ completion_index = completion_options.size() - 1;
}
-
- if (k->get_shift()) {
- _post_shift_selection();
- }
-
- } break;
- case KEY_KP_6: {
- if (k->get_unicode() != 0) {
- keycode_handled = false;
- break;
- }
- [[fallthrough]];
+ completion_current = completion_options[completion_index];
+ update();
+ accept_event();
+ return;
}
- case KEY_RIGHT: {
- if (k->get_shift()) {
- _pre_shift_selection();
-#ifdef APPLE_STYLE_KEYS
- } else {
-#else
- } else if (!k->get_alt()) {
-#endif
- deselect();
- }
-
-#ifdef APPLE_STYLE_KEYS
- if (k->get_command()) {
- cursor_set_column(text[cursor.line].length());
- } else if (k->get_alt()) {
-#else
- if (k->get_alt()) {
- keycode_handled = false;
- break;
- } else if (k->get_command()) {
-#endif
- int cc = cursor.column;
-
- if (cc == text[cursor.line].length() && cursor.line < text.size() - 1) {
- cursor_set_line(cursor.line + 1);
- cursor_set_column(0);
- } else {
- Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text.get_line_data(cursor.line)->get_rid());
- for (int i = 0; i < words.size(); i++) {
- if (words[i].y > cc) {
- cc = words[i].y;
- break;
- }
- }
- cursor_set_column(cc);
- }
-
- } else if (cursor.column == text[cursor.line].length()) {
- if (cursor.line < text.size() - 1) {
- cursor_set_line(cursor_get_line() + num_lines_from(CLAMP(cursor.line + 1, 0, text.size() - 1), 1), true, false);
- cursor_set_column(0);
- }
+ if (k->is_action("ui_down", true)) {
+ if (completion_index < completion_options.size() - 1) {
+ completion_index++;
} else {
- if (mid_grapheme_caret_enabled) {
- cursor_set_column(cursor_get_column() + 1);
- } else {
- cursor_set_column(TS->shaped_text_next_grapheme_pos(text.get_line_data(cursor.line)->get_rid(), cursor_get_column()));
- }
- }
-
- if (k->get_shift()) {
- _post_shift_selection();
- }
-
- } break;
- case KEY_KP_8: {
- if (k->get_unicode() != 0) {
- keycode_handled = false;
- break;
+ completion_index = 0;
}
- [[fallthrough]];
+ completion_current = completion_options[completion_index];
+ update();
+ accept_event();
+ return;
}
- case KEY_UP: {
- if (k->get_alt()) {
- keycode_handled = false;
- break;
- }
-#ifndef APPLE_STYLE_KEYS
- if (k->get_command()) {
-#else
- if (k->get_command() && k->get_alt()) {
-#endif
- _scroll_lines_up();
- break;
- }
-
- if (k->get_shift()) {
- _pre_shift_selection();
+ if (k->is_action("ui_page_up", true)) {
+ completion_index -= get_theme_constant("completion_lines");
+ if (completion_index < 0) {
+ completion_index = 0;
}
-
-#ifdef APPLE_STYLE_KEYS
- if (k->get_command()) {
- cursor_set_line(0);
- } else
-#endif
- {
- int cur_wrap_index = get_cursor_wrap_index();
- if (cur_wrap_index > 0) {
- cursor_set_line(cursor.line, true, false, cur_wrap_index - 1);
- } else if (cursor.line == 0) {
- cursor_set_column(0);
- } else {
- int new_line = cursor.line - num_lines_from(cursor.line - 1, -1);
- if (line_wraps(new_line)) {
- cursor_set_line(new_line, true, false, times_line_wraps(new_line));
- } else {
- cursor_set_line(new_line, true, false);
- }
- }
- }
-
- if (k->get_shift()) {
- _post_shift_selection();
- }
- _cancel_code_hint();
-
- } break;
- case KEY_KP_2: {
- if (k->get_unicode() != 0) {
- keycode_handled = false;
- break;
- }
- [[fallthrough]];
+ completion_current = completion_options[completion_index];
+ update();
+ accept_event();
+ return;
}
- case KEY_DOWN: {
- if (k->get_alt()) {
- keycode_handled = false;
- break;
+ if (k->is_action("ui_page_down", true)) {
+ completion_index += get_theme_constant("completion_lines");
+ if (completion_index >= completion_options.size()) {
+ completion_index = completion_options.size() - 1;
}
-#ifndef APPLE_STYLE_KEYS
- if (k->get_command()) {
-#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
-#endif
- {
- int cur_wrap_index = get_cursor_wrap_index();
- if (cur_wrap_index < times_line_wraps(cursor.line)) {
- cursor_set_line(cursor.line, true, false, cur_wrap_index + 1);
- } else if (cursor.line == get_last_unhidden_line()) {
- cursor_set_column(text[cursor.line].length());
- } else {
- int new_line = cursor.line + num_lines_from(CLAMP(cursor.line + 1, 0, text.size() - 1), 1);
- cursor_set_line(new_line, true, false, 0);
- }
- }
-
- if (k->get_shift()) {
- _post_shift_selection();
- }
- _cancel_code_hint();
-
- } break;
- case KEY_DELETE: {
- if (readonly) {
- break;
- }
-
- if (k->get_shift() && !k->get_command() && !k->get_alt() && is_shortcut_keys_enabled()) {
- cut();
- break;
- }
-
- int curline_len = text[cursor.line].length();
-
- if (cursor.line == text.size() - 1 && cursor.column == curline_len) {
- break; // Nothing to do.
- }
-
- int next_line = cursor.column < curline_len ? cursor.line : cursor.line + 1;
- int next_column;
-
-#ifdef APPLE_STYLE_KEYS
- if (k->get_alt() && cursor.column < curline_len - 1) {
-#else
- if (k->get_alt()) {
- keycode_handled = false;
- break;
- } else if (k->get_command() && cursor.column < curline_len - 1) {
-#endif
-
- int line = cursor.line;
- int column = cursor.column;
-
- Vector<Vector2i> words = TS->shaped_text_get_word_breaks(text.get_line_data(line)->get_rid());
- for (int i = 0; i < words.size(); i++) {
- if (words[i].y > column) {
- column = words[i].y;
- break;
- }
- }
-
- next_line = line;
- next_column = column;
-#ifdef APPLE_STYLE_KEYS
- } else if (k->get_command()) {
- next_column = curline_len;
- next_line = cursor.line;
-#endif
- } else {
- if (mid_grapheme_caret_enabled) {
- next_column = cursor.column < curline_len ? (cursor.column + 1) : 0;
- } else {
- next_column = cursor.column < curline_len ? TS->shaped_text_next_grapheme_pos(text.get_line_data(cursor.line)->get_rid(), (cursor.column)) : 0;
- }
- }
-
- _remove_text(cursor.line, cursor.column, next_line, next_column);
+ completion_current = completion_options[completion_index];
update();
-
- } break;
- case KEY_KP_7: {
- if (k->get_unicode() != 0) {
- keycode_handled = false;
- break;
- }
- [[fallthrough]];
+ accept_event();
+ return;
}
- case KEY_HOME: {
-#ifdef APPLE_STYLE_KEYS
- if (k->get_shift())
- _pre_shift_selection();
-
- cursor_set_line(0);
-
- if (k->get_shift())
- _post_shift_selection();
- else if (k->get_command() || k->get_control())
- deselect();
-#else
- if (k->get_shift()) {
- _pre_shift_selection();
- }
-
- if (k->get_command()) {
- cursor_set_line(0);
- cursor_set_column(0);
- } else {
- // Move cursor column to start of wrapped row and then to start of text.
- Vector<String> rows = get_wrap_rows_text(cursor.line);
- int wi = get_cursor_wrap_index();
- int row_start_col = 0;
- for (int i = 0; i < wi; i++) {
- row_start_col += rows[i].length();
- }
- if (cursor.column == row_start_col || wi == 0) {
- // Compute whitespace symbols seq length.
- int current_line_whitespace_len = 0;
- while (current_line_whitespace_len < text[cursor.line].length()) {
- char32_t c = text[cursor.line][current_line_whitespace_len];
- if (c != '\t' && c != ' ') {
- break;
- }
- current_line_whitespace_len++;
- }
-
- if (cursor_get_column() == current_line_whitespace_len) {
- cursor_set_column(0);
- } else {
- cursor_set_column(current_line_whitespace_len);
- }
- } else {
- cursor_set_column(row_start_col);
- }
- }
-
- if (k->get_shift()) {
- _post_shift_selection();
- } else if (k->get_command() || k->get_control()) {
- deselect();
- }
- _cancel_completion();
- completion_hint = "";
-#endif
- } break;
- case KEY_KP_1: {
- if (k->get_unicode() != 0) {
- keycode_handled = false;
- break;
+ if (k->is_action("ui_home", true)) {
+ if (completion_index > 0) {
+ completion_index = 0;
+ completion_current = completion_options[completion_index];
+ update();
}
- [[fallthrough]];
+ accept_event();
+ return;
}
- case KEY_END: {
-#ifdef APPLE_STYLE_KEYS
- if (k->get_shift())
- _pre_shift_selection();
-
- cursor_set_line(get_last_unhidden_line(), true, false, 9999);
-
- if (k->get_shift())
- _post_shift_selection();
- else if (k->get_command() || k->get_control())
- deselect();
-#else
- if (k->get_shift()) {
- _pre_shift_selection();
- }
-
- if (k->get_command()) {
- cursor_set_line(get_last_unhidden_line(), true, false, 9999);
- }
-
- // Move cursor column to end of wrapped row and then to end of text.
- Vector<String> rows = get_wrap_rows_text(cursor.line);
- int wi = get_cursor_wrap_index();
- int row_end_col = -1;
- for (int i = 0; i < wi + 1; i++) {
- row_end_col += rows[i].length();
- }
- if (wi == rows.size() - 1 || cursor.column == row_end_col) {
- cursor_set_column(text[cursor.line].length());
- } else {
- cursor_set_column(row_end_col);
- }
-
- if (k->get_shift()) {
- _post_shift_selection();
- } else if (k->get_command() || k->get_control()) {
- deselect();
- }
-
- _cancel_completion();
- completion_hint = "";
-#endif
- } break;
- case KEY_KP_9: {
- if (k->get_unicode() != 0) {
- keycode_handled = false;
- break;
+ if (k->is_action("ui_end", true)) {
+ if (completion_index < completion_options.size() - 1) {
+ completion_index = completion_options.size() - 1;
+ completion_current = completion_options[completion_index];
+ update();
}
- [[fallthrough]];
+ accept_event();
+ return;
}
- case KEY_PAGEUP: {
- if (k->get_shift()) {
- _pre_shift_selection();
- }
-
- int wi;
- int n_line = cursor.line - num_lines_from_rows(cursor.line, get_cursor_wrap_index(), -get_visible_rows(), wi) + 1;
- cursor_set_line(n_line, true, false, wi);
-
- if (k->get_shift()) {
- _post_shift_selection();
- }
-
+ if (k->is_action("ui_accept", true) || k->is_action("ui_text_completion_accept", true)) {
+ _confirm_completion();
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_cancel", true)) {
_cancel_completion();
- completion_hint = "";
+ accept_event();
+ return;
+ }
- } break;
- case KEY_KP_3: {
- if (k->get_unicode() != 0) {
- keycode_handled = false;
- break;
+ // Handle Unicode here (if no modifiers active) and update autocomplete.
+ if (k->get_unicode() >= 32) {
+ if (allow_unicode_handling && !readonly) {
+ _handle_unicode_character(k->get_unicode(), had_selection, true);
+ accept_event();
+ return;
}
- [[fallthrough]];
}
- case KEY_PAGEDOWN: {
- if (k->get_shift()) {
- _pre_shift_selection();
- }
-
- int wi;
- int n_line = cursor.line + num_lines_from_rows(cursor.line, get_cursor_wrap_index(), get_visible_rows(), wi) - 1;
- cursor_set_line(n_line, true, false, wi);
+ }
- if (k->get_shift()) {
- _post_shift_selection();
- }
+ // NEWLINES.
+ if (k->is_action("ui_text_newline_above", true)) {
+ _new_line(false, true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_newline_blank", true)) {
+ _new_line(false);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_newline", true)) {
+ _new_line();
+ accept_event();
+ return;
+ }
- _cancel_completion();
- completion_hint = "";
+ // INDENTATION.
+ if (k->is_action("ui_text_dedent", true)) {
+ _indent_left();
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_indent", true)) {
+ _indent_right();
+ accept_event();
+ return;
+ }
- } break;
- case KEY_A: {
-#ifndef APPLE_STYLE_KEYS
- if (!k->get_control() || k->get_shift() || k->get_alt()) {
- keycode_handled = false;
- break;
- }
- if (is_shortcut_keys_enabled()) {
- select_all();
- }
-#else
- if ((!k->get_command() && !k->get_control())) {
- keycode_handled = false;
- break;
- }
- if (!k->get_shift() && k->get_command() && is_shortcut_keys_enabled())
- select_all();
- else if (k->get_control()) {
- if (k->get_shift())
- _pre_shift_selection();
-
- int current_line_whitespace_len = 0;
- while (current_line_whitespace_len < text[cursor.line].length()) {
- char32_t c = text[cursor.line][current_line_whitespace_len];
- if (c != '\t' && c != ' ')
- break;
- current_line_whitespace_len++;
- }
+ // BACKSPACE AND DELETE.
+ if (k->is_action("ui_text_backspace_all_to_left", true)) {
+ _backspace(false, true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_backspace_word", true)) {
+ _backspace(true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_backspace", true)) {
+ _backspace();
+ if (completion_active) {
+ _update_completion_candidates();
+ }
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_delete_all_to_right", true)) {
+ _delete(false, true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_delete_word", true)) {
+ _delete(true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_delete", true)) {
+ _delete();
+ accept_event();
+ return;
+ }
- if (cursor_get_column() == current_line_whitespace_len)
- cursor_set_column(0);
- else
- cursor_set_column(current_line_whitespace_len);
+ // SCROLLING.
+ if (k->is_action("ui_text_scroll_up", true)) {
+ _scroll_lines_up();
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_scroll_down", true)) {
+ _scroll_lines_down();
+ accept_event();
+ return;
+ }
- if (k->get_shift())
- _post_shift_selection();
- else if (k->get_command() || k->get_control())
- deselect();
- }
- } break;
- case KEY_E: {
- if (!k->get_control() || k->get_command() || k->get_alt()) {
- keycode_handled = false;
- break;
- }
+ // SELECT ALL, CUT, COPY, PASTE.
- if (k->get_shift())
- _pre_shift_selection();
+ if (k->is_action("ui_text_select_all", true)) {
+ select_all();
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_cut", true)) {
+ cut();
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_copy", true)) {
+ copy();
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_paste", true)) {
+ paste();
+ accept_event();
+ return;
+ }
- if (k->get_command())
- cursor_set_line(text.size() - 1, true, false);
- cursor_set_column(text[cursor.line].length());
+ // UNDO/REDO.
+ if (k->is_action("ui_undo", true)) {
+ undo();
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_redo", true)) {
+ redo();
+ accept_event();
+ return;
+ }
- if (k->get_shift())
- _post_shift_selection();
- else if (k->get_command() || k->get_control())
- deselect();
+ // MISC.
- _cancel_completion();
+ if (k->is_action("ui_menu", true)) {
+ if (context_menu_enabled) {
+ menu->set_position(get_screen_transform().xform(_get_cursor_pixel_pos()));
+ menu->set_size(Vector2(1, 1));
+ _generate_context_menu();
+ menu->popup();
+ menu->grab_focus();
+ }
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_toggle_insert_mode", true)) {
+ set_insert_mode(!insert_mode);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_cancel", true)) {
+ if (completion_hint != "") {
completion_hint = "";
-#endif
- } break;
- case (KEY_QUOTELEFT): { // Swap current input direction (primary cursor)
- if (!k->get_command()) {
- keycode_handled = false;
- break;
- }
-
- if (input_direction == TEXT_DIRECTION_LTR) {
- input_direction = TEXT_DIRECTION_RTL;
- } else {
- input_direction = TEXT_DIRECTION_LTR;
- }
- cursor_set_column(cursor.column);
update();
- } break;
- case KEY_X: {
- if (readonly) {
- break;
- }
- if (!k->get_command() || k->get_shift() || k->get_alt()) {
- keycode_handled = false;
- break;
- }
- if (is_shortcut_keys_enabled()) {
- cut();
- }
-
- } break;
- case KEY_C: {
- if (!k->get_command() || k->get_shift() || k->get_alt()) {
- keycode_handled = false;
- break;
- }
-
- if (is_shortcut_keys_enabled()) {
- copy();
- }
-
- } break;
- case KEY_Z: {
- if (readonly) {
- break;
- }
-
- if (!k->get_command()) {
- keycode_handled = false;
- break;
- }
-
- if (is_shortcut_keys_enabled()) {
- if (k->get_shift()) {
- redo();
- } else {
- undo();
- }
- }
- } break;
- case KEY_Y: {
- if (readonly) {
- break;
- }
-
- if (!k->get_command()) {
- keycode_handled = false;
- break;
- }
-
- if (is_shortcut_keys_enabled()) {
- redo();
- }
- } break;
- case KEY_V: {
- if (readonly) {
- break;
- }
- if (!k->get_command() || k->get_shift() || k->get_alt()) {
- keycode_handled = false;
- break;
- }
-
- if (is_shortcut_keys_enabled()) {
- paste();
- }
-
- } break;
- case KEY_SPACE: {
-#ifdef OSX_ENABLED
- if (completion_enabled && k->get_metakey()) { // cmd-space is spotlight shortcut in OSX
-#else
- if (completion_enabled && k->get_command()) {
-#endif
-
- query_code_comple();
- keycode_handled = true;
- } else {
- keycode_handled = false;
- }
+ }
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_swap_input_direction", true)) {
+ _swap_current_input_direction();
+ accept_event();
+ return;
+ }
- } break;
+ // CURSOR MOVEMENT
- case KEY_MENU: {
- if (context_menu_enabled) {
- menu->set_position(get_screen_transform().xform(_get_cursor_pixel_pos()));
- menu->set_size(Vector2(1, 1));
- menu->popup();
- menu->grab_focus();
- }
- } break;
+ k = k->duplicate();
+ bool shift_pressed = k->get_shift();
+ // Remove shift or else actions will not match. Use above variable for selection.
+ k->set_shift(false);
- default: {
- keycode_handled = false;
- } break;
+ // CURSOR MOVEMENT - LEFT, RIGHT.
+ if (k->is_action("ui_text_caret_word_left", true)) {
+ _move_cursor_left(shift_pressed, true);
+ accept_event();
+ return;
}
-
- if (keycode_handled) {
+ if (k->is_action("ui_text_caret_left", true)) {
+ _move_cursor_left(shift_pressed, false);
accept_event();
+ return;
}
-
- if (k->get_keycode() == KEY_INSERT) {
- set_insert_mode(!insert_mode);
+ if (k->is_action("ui_text_caret_word_right", true)) {
+ _move_cursor_right(shift_pressed, true);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_caret_right", true)) {
+ _move_cursor_right(shift_pressed, false);
accept_event();
return;
}
- if (!keycode_handled && !k->get_command()) { // For German keyboards.
-
- if (k->get_unicode() >= 32) {
- if (readonly) {
- return;
- }
-
- // Remove the old character if in insert mode and no selection.
- if (insert_mode && !had_selection) {
- begin_complex_operation();
-
- // Make sure we don't try and remove empty space.
- if (cursor.column < get_line(cursor.line).length()) {
- _remove_text(cursor.line, cursor.column, cursor.line, cursor.column + 1);
- }
- }
-
- const char32_t chr[2] = { (char32_t)k->get_unicode(), 0 };
+ // CURSOR MOVEMENT - UP, DOWN.
+ if (k->is_action("ui_text_caret_up", true)) {
+ _move_cursor_up(shift_pressed);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_caret_down", true)) {
+ _move_cursor_down(shift_pressed);
+ accept_event();
+ return;
+ }
- if (completion_hint != "" && k->get_unicode() == ')') {
- completion_hint = "";
- }
- if (auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
- _consume_pair_symbol(chr[0]);
- } else {
- _insert_text_at_cursor(chr);
- }
+ // CURSOR MOVEMENT - DOCUMENT START/END.
+ if (k->is_action("ui_text_caret_document_start", true)) { // && shift_pressed) {
+ _move_cursor_document_start(shift_pressed);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_caret_document_end", true)) { // && shift_pressed) {
+ _move_cursor_document_end(shift_pressed);
+ accept_event();
+ return;
+ }
- if (insert_mode && !had_selection) {
- end_complex_operation();
- }
+ // CURSOR MOVEMENT - LINE START/END.
+ if (k->is_action("ui_text_caret_line_start", true)) {
+ _move_cursor_to_line_start(shift_pressed);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_caret_line_end", true)) {
+ _move_cursor_to_line_end(shift_pressed);
+ accept_event();
+ return;
+ }
- if (selection.active != had_selection) {
- end_complex_operation();
- }
- accept_event();
- }
+ // CURSOR MOVEMENT - PAGE UP/DOWN.
+ if (k->is_action("ui_text_caret_page_up", true)) {
+ _move_cursor_page_up(shift_pressed);
+ accept_event();
+ return;
+ }
+ if (k->is_action("ui_text_caret_page_down", true)) {
+ _move_cursor_page_down(shift_pressed);
+ accept_event();
+ return;
}
- return;
+ if (allow_unicode_handling && !readonly && k->get_unicode() >= 32) {
+ // Handle Unicode (if no modifiers active).
+ _handle_unicode_character(k->get_unicode(), had_selection, false);
+ accept_event();
+ return;
+ }
}
}
@@ -3753,8 +3600,8 @@ void TextEdit::_scroll_lines_up() {
if (!selection.active) {
int cur_line = cursor.line;
int cur_wrap = get_cursor_wrap_index();
- int last_vis_line = get_last_visible_line();
- int last_vis_wrap = get_last_visible_line_wrap_index();
+ int last_vis_line = get_last_full_visible_line();
+ int last_vis_wrap = get_last_full_visible_line_wrap_index();
if (cur_line > last_vis_line || (cur_line == last_vis_line && cur_wrap > last_vis_wrap)) {
cursor_set_line(last_vis_line, false, false, last_vis_wrap);
@@ -4040,25 +3887,50 @@ int TextEdit::_get_control_height() const {
return control_height;
}
+int TextEdit::_get_menu_action_accelerator(const String &p_action) {
+ const List<Ref<InputEvent>> *events = InputMap::get_singleton()->action_get_events(p_action);
+ if (!events) {
+ return 0;
+ }
+
+ // Use first event in the list for the accelerator.
+ const List<Ref<InputEvent>>::Element *first_event = events->front();
+ if (!first_event) {
+ return 0;
+ }
+
+ const Ref<InputEventKey> event = first_event->get();
+ if (event.is_null()) {
+ return 0;
+ }
+
+ // Use physical keycode if non-zero
+ if (event->get_physical_keycode() != 0) {
+ return event->get_physical_keycode_with_modifiers();
+ } else {
+ return event->get_keycode_with_modifiers();
+ }
+}
+
void TextEdit::_generate_context_menu() {
// Reorganize context menu.
menu->clear();
if (!readonly) {
- menu->add_item(RTR("Cut"), MENU_CUT, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_X : 0);
+ menu->add_item(RTR("Cut"), MENU_CUT, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_cut") : 0);
}
- menu->add_item(RTR("Copy"), MENU_COPY, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_C : 0);
+ menu->add_item(RTR("Copy"), MENU_COPY, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_copy") : 0);
if (!readonly) {
- menu->add_item(RTR("Paste"), MENU_PASTE, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_V : 0);
+ menu->add_item(RTR("Paste"), MENU_PASTE, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_paste") : 0);
}
menu->add_separator();
if (is_selecting_enabled()) {
- menu->add_item(RTR("Select All"), MENU_SELECT_ALL, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_A : 0);
+ menu->add_item(RTR("Select All"), MENU_SELECT_ALL, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_text_select_all") : 0);
}
if (!readonly) {
menu->add_item(RTR("Clear"), MENU_CLEAR);
menu->add_separator();
- menu->add_item(RTR("Undo"), MENU_UNDO, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_Z : 0);
- menu->add_item(RTR("Redo"), MENU_REDO, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_Z : 0);
+ menu->add_item(RTR("Undo"), MENU_UNDO, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_undo") : 0);
+ menu->add_item(RTR("Redo"), MENU_REDO, is_shortcut_keys_enabled() ? _get_menu_action_accelerator("ui_redo") : 0);
}
menu->add_separator();
menu->add_submenu_item(RTR("Text writing direction"), "DirMenu");
@@ -4127,8 +3999,8 @@ void TextEdit::adjust_viewport_to_cursor() {
int first_vis_line = get_first_visible_line();
int first_vis_wrap = cursor.wrap_ofs;
- int last_vis_line = get_last_visible_line();
- int last_vis_wrap = get_last_visible_line_wrap_index();
+ int last_vis_line = get_last_full_visible_line();
+ int last_vis_wrap = get_last_full_visible_line_wrap_index();
if (cur_line < first_vis_line || (cur_line == first_vis_line && cur_wrap < first_vis_wrap)) {
// Cursor is above screen.
@@ -4897,11 +4769,13 @@ void TextEdit::_update_caches() {
cache.completion_font_color = get_theme_color("completion_font_color");
cache.font = get_theme_font("font");
cache.font_size = get_theme_font_size("font_size");
+ cache.outline_color = get_theme_color("font_outline_color");
+ cache.outline_size = get_theme_constant("outline_size");
cache.caret_color = get_theme_color("caret_color");
cache.caret_background_color = get_theme_color("caret_background_color");
cache.font_color = get_theme_color("font_color");
- cache.font_color_selected = get_theme_color("font_color_selected");
- cache.font_color_readonly = get_theme_color("font_color_readonly");
+ cache.font_selected_color = get_theme_color("font_selected_color");
+ cache.font_readonly_color = get_theme_color("font_readonly_color");
cache.selection_color = get_theme_color("selection_color");
cache.mark_color = get_theme_color("mark_color");
cache.current_line_color = get_theme_color("current_line_color");
@@ -5146,6 +5020,10 @@ void TextEdit::set_auto_indent(bool p_auto_indent) {
}
void TextEdit::cut() {
+ if (readonly) {
+ return;
+ }
+
if (!selection.active) {
String clipboard = text[cursor.line];
DisplayServer::get_singleton()->clipboard_set(clipboard);
@@ -5193,6 +5071,10 @@ void TextEdit::copy() {
}
void TextEdit::paste() {
+ if (readonly) {
+ return;
+ }
+
String clipboard = DisplayServer::get_singleton()->clipboard_get();
begin_complex_operation();
@@ -5896,6 +5778,10 @@ void TextEdit::_clear_redo() {
}
void TextEdit::undo() {
+ if (readonly) {
+ return;
+ }
+
_push_current_op();
if (undo_stack_pos == nullptr) {
@@ -5946,6 +5832,9 @@ void TextEdit::undo() {
}
void TextEdit::redo() {
+ if (readonly) {
+ return;
+ }
_push_current_op();
if (undo_stack_pos == nullptr) {
@@ -6106,7 +5995,7 @@ double TextEdit::get_scroll_pos_for_line(int p_line, int p_wrap_index) const {
}
// Count the number of visible lines up to this line.
- double new_line_scroll_pos = 0;
+ double new_line_scroll_pos = 0.0;
int to = CLAMP(p_line, 0, text.size() - 1);
for (int i = 0; i < to; i++) {
if (!text.is_hidden(i)) {
@@ -6141,19 +6030,19 @@ int TextEdit::get_first_visible_line() const {
return CLAMP(cursor.line_ofs, 0, text.size() - 1);
}
-int TextEdit::get_last_visible_line() const {
+int TextEdit::get_last_full_visible_line() const {
int first_vis_line = get_first_visible_line();
int last_vis_line = 0;
int wi;
- last_vis_line = first_vis_line + num_lines_from_rows(first_vis_line, cursor.wrap_ofs, get_visible_rows() + 1, wi) - 1;
+ last_vis_line = first_vis_line + num_lines_from_rows(first_vis_line, cursor.wrap_ofs, get_visible_rows(), wi) - 1;
last_vis_line = CLAMP(last_vis_line, 0, text.size() - 1);
return last_vis_line;
}
-int TextEdit::get_last_visible_line_wrap_index() const {
+int TextEdit::get_last_full_visible_line_wrap_index() const {
int first_vis_line = get_first_visible_line();
int wi;
- num_lines_from_rows(first_vis_line, cursor.wrap_ofs, get_visible_rows() + 1, wi);
+ num_lines_from_rows(first_vis_line, cursor.wrap_ofs, get_visible_rows(), wi);
return wi;
}
@@ -6884,7 +6773,7 @@ bool TextEdit::_set(const StringName &p_name, const Variant &p_value) {
update();
}
}
- _change_notify();
+ notify_property_list_changed();
return true;
}
@@ -7183,23 +7072,11 @@ void TextEdit::_bind_methods() {
}
TextEdit::TextEdit() {
- setting_row = false;
- draw_tabs = false;
- draw_spaces = false;
- override_selected_font_color = false;
- draw_caret = true;
- max_chars = 0;
clear();
- wrap_enabled = false;
- wrap_at = 0;
- wrap_right_offset = 10;
set_focus_mode(FOCUS_ALL);
_update_caches();
- cache.line_spacing = 1;
- cache.font_size = 16;
set_default_cursor_shape(CURSOR_IBEAM);
- indent_size = 4;
text.set_indent_size(indent_size);
text.clear();
@@ -7209,31 +7086,16 @@ TextEdit::TextEdit() {
add_child(h_scroll);
add_child(v_scroll);
- updating_scrolls = false;
- selection.active = false;
-
h_scroll->connect("value_changed", callable_mp(this, &TextEdit::_scroll_moved));
v_scroll->connect("value_changed", callable_mp(this, &TextEdit::_scroll_moved));
v_scroll->connect("scrolling", callable_mp(this, &TextEdit::_v_scroll_input));
- cursor_changed_dirty = false;
- text_changed_dirty = false;
-
- selection.selecting_mode = SelectionMode::SELECTION_MODE_NONE;
- selection.selecting_line = 0;
- selection.selecting_column = 0;
- selection.selecting_text = false;
- selection.active = false;
-
- block_caret = false;
- caret_blink_enabled = false;
caret_blink_timer = memnew(Timer);
add_child(caret_blink_timer);
caret_blink_timer->set_wait_time(0.65);
caret_blink_timer->connect("timeout", callable_mp(this, &TextEdit::_toggle_draw_caret));
cursor_set_blink_enabled(false);
- right_click_moves_caret = true;
idle_detect = memnew(Timer);
add_child(idle_detect);
@@ -7246,54 +7108,8 @@ TextEdit::TextEdit() {
click_select_held->set_wait_time(0.05);
click_select_held->connect("timeout", callable_mp(this, &TextEdit::_click_selection_held));
- current_op.type = TextOperation::TYPE_NONE;
- undo_enabled = true;
undo_stack_max_size = GLOBAL_GET("gui/common/text_edit_undo_stack_max_size");
- undo_stack_pos = nullptr;
- setting_text = false;
- last_dblclk = 0;
- current_op.version = 0;
- version = 0;
- saved_version = 0;
- completion_enabled = false;
- completion_active = false;
- completion_line_ofs = 0;
- tooltip_obj = nullptr;
- line_length_guidelines = false;
- line_length_guideline_soft_col = 80;
- line_length_guideline_hard_col = 100;
- hiding_enabled = false;
- next_operation_is_complex = false;
- scroll_past_end_of_file_enabled = false;
- auto_brace_completion_enabled = false;
- brace_matching_enabled = false;
- highlight_all_occurrences = false;
- highlight_current_line = false;
- indent_using_spaces = false;
- space_indent = " ";
- auto_indent = false;
- insert_mode = false;
- window_has_focus = true;
- select_identifiers_enabled = false;
- smooth_scroll_enabled = false;
- scrolling = false;
- minimap_clicked = false;
- dragging_minimap = false;
- can_drag_minimap = false;
- minimap_scroll_ratio = 0;
- minimap_scroll_click_pos = 0;
- dragging_selection = false;
- target_v_scroll = 0;
- v_scroll_speed = 80;
- draw_minimap = false;
- minimap_width = 80;
- minimap_char_size = Point2(1, 2);
- minimap_line_spacing = 1;
-
- selecting_enabled = true;
- context_menu_enabled = true;
- shortcut_keys_enabled = true;
menu = memnew(PopupMenu);
add_child(menu);
@@ -7328,12 +7144,10 @@ TextEdit::TextEdit() {
menu_ctl->add_item(RTR("Soft hyphen (SHY)"), MENU_INSERT_SHY);
menu->add_child(menu_ctl);
- readonly = true; // Initialise to opposite first, so we get past the early-out in set_readonly.
set_readonly(false);
menu->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
menu_dir->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
menu_ctl->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
- first_draw = true;
}
TextEdit::~TextEdit() {
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index d5b9b46fe2..b0c7314c65 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -92,14 +92,11 @@ private:
Vector<Vector2i> bidi_override;
Ref<TextParagraph> data_buf;
- bool marked;
- bool hidden;
+ bool marked = false;
+ bool hidden = false;
Line() {
data_buf.instance();
-
- marked = false;
- hidden = false;
}
};
@@ -173,46 +170,31 @@ private:
};
struct Cursor {
- int last_fit_x;
- int line, column; ///< cursor
- int x_ofs, line_ofs, wrap_ofs;
- Cursor() {
- last_fit_x = 0;
- line = 0;
- column = 0; ///< cursor
- x_ofs = 0;
- line_ofs = 0;
- wrap_ofs = 0;
- }
+ int last_fit_x = 0;
+ int line = 0;
+ int column = 0; ///< cursor
+ int x_ofs = 0;
+ int line_ofs = 0;
+ int wrap_ofs = 0;
} cursor;
struct Selection {
- SelectionMode selecting_mode;
- int selecting_line, selecting_column;
- int selected_word_beg, selected_word_end, selected_word_origin;
- bool selecting_text;
-
- bool active;
-
- int from_line, from_column;
- int to_line, to_column;
-
- bool shiftclick_left;
- Selection() {
- selecting_mode = SelectionMode::SELECTION_MODE_NONE;
- selecting_line = 0;
- selecting_column = 0;
- selected_word_beg = 0;
- selected_word_end = 0;
- selected_word_origin = 0;
- selecting_text = false;
- active = false;
- from_line = 0;
- from_column = 0;
- to_line = 0;
- to_column = 0;
- shiftclick_left = false;
- }
+ SelectionMode selecting_mode = SelectionMode::SELECTION_MODE_NONE;
+ int selecting_line = 0;
+ int selecting_column = 0;
+ int selected_word_beg = 0;
+ int selected_word_end = 0;
+ int selected_word_origin = 0;
+ bool selecting_text = false;
+
+ bool active = false;
+
+ int from_line = 0;
+ int from_column = 0;
+ int to_line = 0;
+ int to_column = 0;
+
+ bool shiftclick_left = false;
} selection;
Map<int, Dictionary> syntax_highlighting_cache;
@@ -224,25 +206,16 @@ private:
TYPE_REMOVE
};
- Type type;
- int from_line, from_column;
- int to_line, to_column;
+ Type type = TYPE_NONE;
+ int from_line = 0;
+ int from_column = 0;
+ int to_line = 0;
+ int to_column = 0;
String text;
- uint32_t prev_version;
- uint32_t version;
- bool chain_forward;
- bool chain_backward;
- TextOperation() {
- type = TYPE_NONE;
- from_line = 0;
- from_column = 0;
- to_line = 0;
- to_column = 0;
- prev_version = 0;
- version = 0;
- chain_forward = false;
- chain_backward = false;
- }
+ uint32_t prev_version = 0;
+ uint32_t version = 0;
+ bool chain_forward = false;
+ bool chain_backward = false;
};
String ime_text;
@@ -251,7 +224,7 @@ private:
TextOperation current_op;
List<TextOperation> undo_stack;
- List<TextOperation>::Element *undo_stack_pos;
+ List<TextOperation>::Element *undo_stack_pos = nullptr;
int undo_stack_max_size;
void _clear_redo();
@@ -264,20 +237,20 @@ private:
Dictionary _get_line_syntax_highlighting(int p_line);
Set<String> completion_prefixes;
- bool completion_enabled;
+ bool completion_enabled = false;
List<ScriptCodeCompletionOption> completion_sources;
Vector<ScriptCodeCompletionOption> completion_options;
- bool completion_active;
- bool completion_forced;
+ bool completion_active = false;
+ bool completion_forced = false;
ScriptCodeCompletionOption completion_current;
String completion_base;
- int completion_index;
+ int completion_index = 0;
Rect2i completion_rect;
- int completion_line_ofs;
+ int completion_line_ofs = 0;
String completion_hint;
- int completion_hint_offset;
+ int completion_hint_offset = 0;
- bool setting_text;
+ bool setting_text = false;
// data
Text text;
@@ -290,93 +263,93 @@ private:
Array st_args;
bool draw_control_chars = false;
- uint32_t version;
- uint32_t saved_version;
+ uint32_t version = 0;
+ uint32_t saved_version = 0;
- int max_chars;
- bool readonly;
- bool indent_using_spaces;
- int indent_size;
- String space_indent;
+ int max_chars = 0;
+ bool readonly = true; // Initialise to opposite first, so we get past the early-out in set_readonly.
+ bool indent_using_spaces = false;
+ int indent_size = 4;
+ String space_indent = " ";
Timer *caret_blink_timer;
- bool caret_blink_enabled;
- bool draw_caret;
- bool window_has_focus;
- bool block_caret;
- bool right_click_moves_caret;
+ bool caret_blink_enabled = false;
+ bool draw_caret = true;
+ bool window_has_focus = true;
+ bool block_caret = false;
+ bool right_click_moves_caret = true;
bool mid_grapheme_caret_enabled = false;
- bool wrap_enabled;
- int wrap_at;
- int wrap_right_offset;
-
- bool first_draw;
- bool setting_row;
- bool draw_tabs;
- bool draw_spaces;
- bool override_selected_font_color;
- bool cursor_changed_dirty;
- bool text_changed_dirty;
- bool undo_enabled;
- bool line_length_guidelines;
- int line_length_guideline_soft_col;
- int line_length_guideline_hard_col;
- bool hiding_enabled;
- bool draw_minimap;
- int minimap_width;
- Point2 minimap_char_size;
- int minimap_line_spacing;
-
- bool highlight_all_occurrences;
- bool scroll_past_end_of_file_enabled;
- bool auto_brace_completion_enabled;
- bool brace_matching_enabled;
- bool highlight_current_line;
- bool auto_indent;
+ bool wrap_enabled = false;
+ int wrap_at = 0;
+ int wrap_right_offset = 10;
+
+ bool first_draw = true;
+ bool setting_row = false;
+ bool draw_tabs = false;
+ bool draw_spaces = false;
+ bool override_selected_font_color = false;
+ bool cursor_changed_dirty = false;
+ bool text_changed_dirty = false;
+ bool undo_enabled = true;
+ bool line_length_guidelines = false;
+ int line_length_guideline_soft_col = 80;
+ int line_length_guideline_hard_col = 100;
+ bool hiding_enabled = false;
+ bool draw_minimap = false;
+ int minimap_width = 80;
+ Point2 minimap_char_size = Point2(1, 2);
+ int minimap_line_spacing = 1;
+
+ bool highlight_all_occurrences = false;
+ bool scroll_past_end_of_file_enabled = false;
+ bool auto_brace_completion_enabled = false;
+ bool brace_matching_enabled = false;
+ bool highlight_current_line = false;
+ bool auto_indent = false;
String cut_copy_line;
- bool insert_mode;
- bool select_identifiers_enabled;
-
- bool smooth_scroll_enabled;
- bool scrolling;
- bool dragging_selection;
- bool dragging_minimap;
- bool can_drag_minimap;
- bool minimap_clicked;
- double minimap_scroll_ratio;
- double minimap_scroll_click_pos;
- float target_v_scroll;
- float v_scroll_speed;
+ bool insert_mode = false;
+ bool select_identifiers_enabled = false;
+
+ bool smooth_scroll_enabled = false;
+ bool scrolling = false;
+ bool dragging_selection = false;
+ bool dragging_minimap = false;
+ bool can_drag_minimap = false;
+ bool minimap_clicked = false;
+ double minimap_scroll_ratio = 0.0;
+ double minimap_scroll_click_pos = 0.0;
+ float target_v_scroll = 0.0;
+ float v_scroll_speed = 80.0;
String highlighted_word;
- uint64_t last_dblclk;
+ uint64_t last_dblclk = 0;
Timer *idle_detect;
Timer *click_select_held;
HScrollBar *h_scroll;
VScrollBar *v_scroll;
- bool updating_scrolls;
+ bool updating_scrolls = false;
- Object *tooltip_obj;
+ Object *tooltip_obj = nullptr;
StringName tooltip_func;
Variant tooltip_ud;
- bool next_operation_is_complex;
+ bool next_operation_is_complex = false;
- bool callhint_below;
+ bool callhint_below = false;
Vector2 callhint_offset;
String search_text;
- uint32_t search_flags;
- int search_result_line;
- int search_result_col;
+ uint32_t search_flags = 0;
+ int search_result_line = 0;
+ int search_result_col = 0;
- bool selecting_enabled;
+ bool selecting_enabled = true;
- bool context_menu_enabled;
- bool shortcut_keys_enabled;
+ bool context_menu_enabled = true;
+ bool shortcut_keys_enabled = true;
bool virtual_keyboard_enabled = true;
void _generate_context_menu();
@@ -400,8 +373,8 @@ private:
void set_line_as_center_visible(int p_line, int p_wrap_index = 0);
void set_line_as_last_visible(int p_line, int p_wrap_index = 0);
int get_first_visible_line() const;
- int get_last_visible_line() const;
- int get_last_visible_line_wrap_index() const;
+ int get_last_full_visible_line() const;
+ int get_last_full_visible_line_wrap_index() const;
double get_visible_rows_offset() const;
double get_v_scroll_offset() const;
@@ -435,6 +408,7 @@ private:
int _get_control_height() const;
Point2 _get_local_mouse_pos() const;
+ int _get_menu_action_accelerator(const String &p_action);
void _reset_caret_blink_timer();
void _toggle_draw_caret();
@@ -468,6 +442,26 @@ private:
int _calculate_spaces_till_next_left_indent(int column);
int _calculate_spaces_till_next_right_indent(int column);
+ // Methods used in shortcuts
+ void _swap_current_input_direction();
+ void _new_line(bool p_split_current = true, bool p_above = false);
+ void _indent_right();
+ void _indent_left();
+ void _move_cursor_left(bool p_select, bool p_move_by_word = false);
+ void _move_cursor_right(bool p_select, bool p_move_by_word = false);
+ void _move_cursor_up(bool p_select);
+ void _move_cursor_down(bool p_select);
+ void _move_cursor_to_line_start(bool p_select);
+ void _move_cursor_to_line_end(bool p_select);
+ void _move_cursor_page_up(bool p_select);
+ void _move_cursor_page_down(bool p_select);
+ void _backspace(bool p_word = false, bool p_all_to_left = false);
+ void _delete(bool p_word = false, bool p_all_to_right = false);
+ void _delete_selection();
+ void _move_cursor_document_start(bool p_select);
+ void _move_cursor_document_end(bool p_select);
+ void _handle_unicode_character(uint32_t unicode, bool p_had_selection, bool p_update_auto_complete);
+
protected:
struct Cache {
Ref<Texture2D> tab_icon;
@@ -477,7 +471,9 @@ protected:
Ref<StyleBox> style_focus;
Ref<StyleBox> style_readonly;
Ref<Font> font;
- int font_size;
+ int font_size = 16;
+ int outline_size = 0;
+ Color outline_color;
Color completion_background_color;
Color completion_selected_color;
Color completion_existing_color;
@@ -485,8 +481,8 @@ protected:
Color caret_color;
Color caret_background_color;
Color font_color;
- Color font_color_selected;
- Color font_color_readonly;
+ Color font_selected_color;
+ Color font_readonly_color;
Color selection_color;
Color mark_color;
Color code_folding_color;
@@ -498,12 +494,8 @@ protected:
Color search_result_border_color;
Color background_color;
- int line_spacing;
- int minimap_width;
- Cache() {
- line_spacing = 0;
- minimap_width = 0;
- }
+ int line_spacing = 1;
+ int minimap_width = 0;
} cache;
virtual String get_tooltip(const Point2 &p_pos) const override;
@@ -668,8 +660,8 @@ public:
int get_row_height() const;
void backspace_at_cursor();
- void indent_left();
- void indent_right();
+ void indent_selected_lines_left();
+ void indent_selected_lines_right();
int get_indent_level(int p_line) const;
bool is_line_comment(int p_line) const;
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index 23c48b0906..f43e3d1a9d 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -29,7 +29,9 @@
/*************************************************************************/
#include "texture_button.h"
+
#include "core/typedefs.h"
+
#include <stdlib.h>
Size2 TextureButton::get_minimum_size() const {
@@ -247,8 +249,8 @@ void TextureButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_disabled_texture", "texture"), &TextureButton::set_disabled_texture);
ClassDB::bind_method(D_METHOD("set_focused_texture", "texture"), &TextureButton::set_focused_texture);
ClassDB::bind_method(D_METHOD("set_click_mask", "mask"), &TextureButton::set_click_mask);
- ClassDB::bind_method(D_METHOD("set_expand", "p_expand"), &TextureButton::set_expand);
- ClassDB::bind_method(D_METHOD("set_stretch_mode", "p_mode"), &TextureButton::set_stretch_mode);
+ ClassDB::bind_method(D_METHOD("set_expand", "expand"), &TextureButton::set_expand);
+ ClassDB::bind_method(D_METHOD("set_stretch_mode", "mode"), &TextureButton::set_stretch_mode);
ClassDB::bind_method(D_METHOD("set_flip_h", "enable"), &TextureButton::set_flip_h);
ClassDB::bind_method(D_METHOD("is_flipped_h"), &TextureButton::is_flipped_h);
ClassDB::bind_method(D_METHOD("set_flip_v", "enable"), &TextureButton::set_flip_v);
@@ -375,13 +377,4 @@ bool TextureButton::is_flipped_v() const {
return vflip;
}
-TextureButton::TextureButton() {
- expand = false;
- stretch_mode = STRETCH_SCALE;
- hflip = false;
- vflip = false;
-
- _texture_region = Rect2();
- _position_rect = Rect2();
- _tile = false;
-}
+TextureButton::TextureButton() {}
diff --git a/scene/gui/texture_button.h b/scene/gui/texture_button.h
index 4b750c3fb1..8361f3c341 100644
--- a/scene/gui/texture_button.h
+++ b/scene/gui/texture_button.h
@@ -54,15 +54,15 @@ private:
Ref<Texture2D> disabled;
Ref<Texture2D> focused;
Ref<BitMap> click_mask;
- bool expand;
- StretchMode stretch_mode;
+ bool expand = false;
+ StretchMode stretch_mode = STRETCH_SCALE;
Rect2 _texture_region;
Rect2 _position_rect;
- bool _tile;
+ bool _tile = false;
- bool hflip;
- bool vflip;
+ bool hflip = false;
+ bool vflip = false;
protected:
virtual Size2 get_minimum_size() const override;
diff --git a/scene/gui/texture_progress_bar.cpp b/scene/gui/texture_progress_bar.cpp
index 76564e2b17..46ce9d5ca9 100644
--- a/scene/gui/texture_progress_bar.cpp
+++ b/scene/gui/texture_progress_bar.cpp
@@ -145,9 +145,9 @@ Point2 TextureProgressBar::unit_val_to_uv(float val) {
float angle = (val * Math_TAU) - Math_PI * 0.5;
Point2 dir = Vector2(Math::cos(angle), Math::sin(angle));
float t1 = 1.0;
- float cp = 0;
- float cq = 0;
- float cr = 0;
+ float cp = 0.0;
+ float cq = 0.0;
+ float cr = 0.0;
float edgeLeft = 0.0;
float edgeRight = 1.0;
float edgeBottom = 0.0;
@@ -540,17 +540,5 @@ void TextureProgressBar::_bind_methods() {
}
TextureProgressBar::TextureProgressBar() {
- mode = FILL_LEFT_TO_RIGHT;
- rad_init_angle = 0;
- rad_center_off = Point2();
- rad_max_degrees = 360;
set_mouse_filter(MOUSE_FILTER_PASS);
-
- nine_patch_stretch = false;
- stretch_margin[SIDE_LEFT] = 0;
- stretch_margin[SIDE_RIGHT] = 0;
- stretch_margin[SIDE_BOTTOM] = 0;
- stretch_margin[SIDE_TOP] = 0;
-
- tint_under = tint_progress = tint_over = Color(1, 1, 1);
}
diff --git a/scene/gui/texture_progress_bar.h b/scene/gui/texture_progress_bar.h
index ee33a915f7..a3883a7017 100644
--- a/scene/gui/texture_progress_bar.h
+++ b/scene/gui/texture_progress_bar.h
@@ -98,13 +98,15 @@ public:
TextureProgressBar();
private:
- FillMode mode;
- float rad_init_angle;
- float rad_max_degrees;
+ FillMode mode = FILL_LEFT_TO_RIGHT;
+ float rad_init_angle = 0.0;
+ float rad_max_degrees = 360.0;
Point2 rad_center_off;
- bool nine_patch_stretch;
- int stretch_margin[4];
- Color tint_under, tint_progress, tint_over;
+ bool nine_patch_stretch = false;
+ int stretch_margin[4] = {};
+ Color tint_under = Color(1, 1, 1);
+ Color tint_progress = Color(1, 1, 1);
+ Color tint_over = Color(1, 1, 1);
Point2 unit_val_to_uv(float val);
Point2 get_relative_center();
diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp
index beb06b7739..1cba88e06f 100644
--- a/scene/gui/texture_rect.cpp
+++ b/scene/gui/texture_rect.cpp
@@ -217,11 +217,7 @@ bool TextureRect::is_flipped_v() const {
}
TextureRect::TextureRect() {
- expand = false;
- hflip = false;
- vflip = false;
set_mouse_filter(MOUSE_FILTER_PASS);
- stretch_mode = STRETCH_SCALE_ON_EXPAND;
}
TextureRect::~TextureRect() {
diff --git a/scene/gui/texture_rect.h b/scene/gui/texture_rect.h
index 0f3172f5bd..0f93d5732f 100644
--- a/scene/gui/texture_rect.h
+++ b/scene/gui/texture_rect.h
@@ -49,11 +49,11 @@ public:
};
private:
- bool expand;
- bool hflip;
- bool vflip;
+ bool expand = false;
+ bool hflip = false;
+ bool vflip = false;
Ref<Texture2D> texture;
- StretchMode stretch_mode;
+ StretchMode stretch_mode = STRETCH_SCALE_ON_EXPAND;
void _texture_changed();
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index a968a83dad..ad06739da9 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1018,7 +1018,7 @@ void Tree::update_cache() {
cache.custom_button_font_highlight = get_theme_color("custom_button_font_highlight");
cache.font_color = get_theme_color("font_color");
- cache.font_color_selected = get_theme_color("font_color_selected");
+ cache.font_selected_color = get_theme_color("font_selected_color");
cache.guide_color = get_theme_color("guide_color");
cache.drop_position_color = get_theme_color("drop_position_color");
cache.hseparation = get_theme_constant("hseparation");
@@ -1118,7 +1118,7 @@ int Tree::get_item_height(TreeItem *p_item) const {
return height;
}
-void Tree::draw_item_rect(TreeItem::Cell &p_cell, const Rect2i &p_rect, const Color &p_color, const Color &p_icon_color) {
+void Tree::draw_item_rect(TreeItem::Cell &p_cell, const Rect2i &p_rect, const Color &p_color, const Color &p_icon_color, int p_ol_size, const Color &p_ol_color) {
ERR_FAIL_COND(cache.font.is_null());
Rect2i rect = p_rect;
@@ -1160,6 +1160,9 @@ void Tree::draw_item_rect(TreeItem::Cell &p_cell, const Rect2i &p_rect, const Co
Point2 draw_pos = rect.position;
draw_pos.y += Math::floor((rect.size.y - p_cell.text_buf->get_size().y) / 2.0);
p_cell.text_buf->set_width(MAX(0, rect.size.width));
+ if (p_ol_size > 0 && p_ol_color.a > 0) {
+ p_cell.text_buf->draw_outline(ci, draw_pos, p_ol_size, p_ol_color);
+ }
p_cell.text_buf->draw(ci, draw_pos, p_color);
rect.position.x += ts.width + cache.hseparation;
rect.size.x -= ts.width + cache.hseparation;
@@ -1182,6 +1185,9 @@ void Tree::draw_item_rect(TreeItem::Cell &p_cell, const Rect2i &p_rect, const Co
Point2 draw_pos = rect.position;
draw_pos.y += Math::floor((rect.size.y - p_cell.text_buf->get_size().y) / 2.0);
p_cell.text_buf->set_width(MAX(0, rect.size.width));
+ if (p_ol_size > 0 && p_ol_color.a > 0) {
+ p_cell.text_buf->draw_outline(ci, draw_pos, p_ol_size, p_ol_color);
+ }
p_cell.text_buf->draw(ci, draw_pos, p_color);
}
}
@@ -1433,7 +1439,9 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
}
}
- Color col = p_item->cells[i].custom_color ? p_item->cells[i].color : get_theme_color(p_item->cells[i].selected ? "font_color_selected" : "font_color");
+ Color col = p_item->cells[i].custom_color ? p_item->cells[i].color : get_theme_color(p_item->cells[i].selected ? "font_selected_color" : "font_color");
+ Color font_outline_color = get_theme_color("font_outline_color");
+ int outline_size = get_theme_constant("outline_size");
Color icon_col = p_item->cells[i].icon_color;
if (p_item->cells[i].dirty) {
@@ -1450,7 +1458,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
switch (p_item->cells[i].mode) {
case TreeItem::CELL_MODE_STRING: {
- draw_item_rect(p_item->cells.write[i], item_rect, col, icon_col);
+ draw_item_rect(p_item->cells.write[i], item_rect, col, icon_col, outline_size, font_outline_color);
} break;
case TreeItem::CELL_MODE_CHECK: {
Ref<Texture2D> checked = cache.checked;
@@ -1471,7 +1479,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
item_rect.size.x -= check_w;
item_rect.position.x += check_w;
- draw_item_rect(p_item->cells.write[i], item_rect, col, icon_col);
+ draw_item_rect(p_item->cells.write[i], item_rect, col, icon_col, outline_size, font_outline_color);
} break;
case TreeItem::CELL_MODE_RANGE: {
@@ -1485,8 +1493,14 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
p_item->cells.write[i].text_buf->set_width(cell_width);
if (rtl) {
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ p_item->cells[i].text_buf->draw_outline(ci, text_pos + Vector2(cell_width - text_width, 0), outline_size, font_outline_color);
+ }
p_item->cells[i].text_buf->draw(ci, text_pos + Vector2(cell_width - text_width, 0), col);
} else {
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ p_item->cells[i].text_buf->draw_outline(ci, text_pos, outline_size, font_outline_color);
+ }
p_item->cells[i].text_buf->draw(ci, text_pos, col);
}
@@ -1501,8 +1515,14 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
int cell_width = item_rect.size.x - updown->get_width();
if (rtl) {
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ p_item->cells[i].text_buf->draw_outline(ci, text_pos + Vector2(cell_width - text_width, 0), outline_size, font_outline_color);
+ }
p_item->cells[i].text_buf->draw(ci, text_pos + Vector2(cell_width - text_width, 0), col);
} else {
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ p_item->cells[i].text_buf->draw_outline(ci, text_pos, outline_size, font_outline_color);
+ }
p_item->cells[i].text_buf->draw(ci, text_pos, col);
}
@@ -1543,7 +1563,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
}
if (!p_item->cells[i].editable) {
- draw_item_rect(p_item->cells.write[i], item_rect, col, icon_col);
+ draw_item_rect(p_item->cells.write[i], item_rect, col, icon_col, outline_size, font_outline_color);
break;
}
@@ -1571,7 +1591,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
ir.position += cache.custom_button->get_offset();
}
- draw_item_rect(p_item->cells.write[i], ir, col, icon_col);
+ draw_item_rect(p_item->cells.write[i], ir, col, icon_col, outline_size, font_outline_color);
downarrow->draw(ci, arrow_pos);
@@ -3143,6 +3163,8 @@ void Tree::_notification(int p_what) {
Ref<StyleBox> bg = cache.bg;
Ref<StyleBox> bg_focus = get_theme_stylebox("bg_focus");
+ Color font_outline_color = get_theme_color("font_outline_color");
+ int outline_size = get_theme_constant("outline_size");
Point2 draw_ofs;
draw_ofs += bg->get_offset();
@@ -3179,7 +3201,12 @@ void Tree::_notification(int p_what) {
//text
int clip_w = tbrect.size.width - sb->get_minimum_size().width;
columns.write[i].text_buf->set_width(clip_w);
- columns[i].text_buf->draw(ci, tbrect.position + Point2i(sb->get_offset().x + (tbrect.size.width - columns[i].text_buf->get_size().x) / 2, (tbrect.size.height - columns[i].text_buf->get_size().y) / 2), cache.title_button_color);
+
+ Vector2 text_pos = tbrect.position + Point2i(sb->get_offset().x + (tbrect.size.width - columns[i].text_buf->get_size().x) / 2, (tbrect.size.height - columns[i].text_buf->get_size().y) / 2);
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ columns[i].text_buf->draw_outline(ci, text_pos, outline_size, font_outline_color);
+ }
+ columns[i].text_buf->draw(ci, text_pos, cache.title_button_color);
}
}
}
@@ -3315,6 +3342,9 @@ void Tree::item_selected(int p_column, TreeItem *p_item) {
//emit_signal("multi_selected",p_item,p_column,true); - NO this is for TreeItem::select
selected_col = p_column;
+ if (!selected_item) {
+ selected_item = p_item;
+ }
} else {
select_single_item(p_item, root, p_column);
}
@@ -3322,6 +3352,14 @@ void Tree::item_selected(int p_column, TreeItem *p_item) {
}
void Tree::item_deselected(int p_column, TreeItem *p_item) {
+ if (selected_item == p_item) {
+ selected_item = nullptr;
+ }
+
+ if (selected_col == p_column) {
+ selected_col = -1;
+ }
+
if (select_mode == SELECT_MULTI || select_mode == SELECT_SINGLE) {
p_item->cells.write[p_column].selected = false;
}
@@ -4174,6 +4212,7 @@ void Tree::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_column_title_language", "column"), &Tree::get_column_title_language);
ClassDB::bind_method(D_METHOD("get_scroll"), &Tree::get_scroll);
+ ClassDB::bind_method(D_METHOD("scroll_to_item", "item"), &Tree::_scroll_to_item);
ClassDB::bind_method(D_METHOD("set_hide_folding", "hide"), &Tree::set_hide_folding);
ClassDB::bind_method(D_METHOD("is_folding_hidden"), &Tree::is_folding_hidden);
@@ -4223,19 +4262,8 @@ void Tree::_bind_methods() {
}
Tree::Tree() {
- selected_col = 0;
columns.resize(1);
- selected_item = nullptr;
- edited_item = nullptr;
- selected_col = -1;
- edited_col = -1;
- hide_root = false;
- select_mode = SELECT_SINGLE;
- root = nullptr;
- popup_menu = nullptr;
- popup_edited_item = nullptr;
- text_editor = nullptr;
set_focus_mode(FOCUS_ALL);
popup_menu = memnew(PopupMenu);
@@ -4279,50 +4307,9 @@ Tree::Tree() {
set_notify_transform(true);
- updating_value_editor = false;
- pressed_button = -1;
- show_column_titles = false;
-
- cache.click_type = Cache::CLICK_NONE;
- cache.hover_type = Cache::CLICK_NONE;
- cache.hover_index = -1;
- cache.click_index = -1;
- cache.click_id = -1;
- cache.click_item = nullptr;
- cache.click_column = 0;
- cache.hover_cell = -1;
- last_keypress = 0;
- focus_in_id = 0;
-
- blocked = 0;
-
- cursor_can_exit_tree = true;
set_mouse_filter(MOUSE_FILTER_STOP);
- drag_speed = 0;
- drag_touching = false;
- drag_touching_deaccel = false;
- pressing_for_editor = false;
- range_drag_enabled = false;
-
- hide_folding = false;
-
- drop_mode_flags = 0;
- drop_mode_over = nullptr;
- drop_mode_section = 0;
- single_select_defer = nullptr;
-
- scrolling = false;
- allow_rmb_select = false;
- force_edit_checkbox_only_on_checkbox = false;
-
set_clip_contents(true);
-
- cache.hover_item = nullptr;
- cache.hover_cell = -1;
-
- allow_reselect = false;
- propagate_mouse_activated = false;
}
Tree::~Tree() {
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index dfc02f760d..1be21cb4a4 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -62,7 +62,7 @@ private:
friend class Tree;
struct Cell {
- TreeCellMode mode;
+ TreeCellMode mode = TreeItem::CELL_MODE_STRING;
Ref<Texture2D> icon;
Rect2i icon_region;
@@ -74,24 +74,27 @@ private:
Control::StructuredTextParser st_parser = Control::STRUCTURED_TEXT_DEFAULT;
Array st_args;
Control::TextDirection text_direction = Control::TEXT_DIRECTION_INHERITED;
- bool dirty;
- double min, max, step, val;
- int icon_max_w;
- bool expr;
- bool checked;
- bool editable;
- bool selected;
- bool selectable;
- bool custom_color;
+ bool dirty = true;
+ double min = 0.0;
+ double max = 100.0;
+ double step = 1.0;
+ double val = 0.0;
+ int icon_max_w = 0;
+ bool expr = false;
+ bool checked = false;
+ bool editable = false;
+ bool selected = false;
+ bool selectable = true;
+ bool custom_color = false;
Color color;
- bool custom_bg_color;
- bool custom_bg_outline;
+ bool custom_bg_color = false;
+ bool custom_bg_outline = false;
Color bg_color;
- bool custom_button;
- bool expand_right;
- Color icon_color;
+ bool custom_button = false;
+ bool expand_right = false;
+ Color icon_color = Color(1, 1, 1);
- TextAlign text_align;
+ TextAlign text_align = ALIGN_LEFT;
Variant meta;
String tooltip;
@@ -100,42 +103,17 @@ private:
StringName custom_draw_callback;
struct Button {
- int id;
- bool disabled;
+ int id = 0;
+ bool disabled = false;
Ref<Texture2D> texture;
- Color color;
+ Color color = Color(1, 1, 1, 1);
String tooltip;
- Button() {
- id = 0;
- disabled = false;
- color = Color(1, 1, 1, 1);
- tooltip = "";
- }
};
Vector<Button> buttons;
Cell() {
text_buf.instance();
- dirty = true;
- custom_draw_obj = ObjectID();
- custom_button = false;
- mode = TreeItem::CELL_MODE_STRING;
- min = 0;
- max = 100;
- step = 1;
- val = 0;
- checked = false;
- editable = false;
- selected = false;
- selectable = true;
- custom_color = false;
- custom_bg_color = false;
- expr = false;
- icon_max_w = 0;
- text_align = ALIGN_LEFT;
- expand_right = false;
- icon_color = Color(1, 1, 1);
}
Size2 get_icon_size() const;
@@ -332,46 +310,46 @@ public:
private:
friend class TreeItem;
- TreeItem *root;
- TreeItem *popup_edited_item;
- TreeItem *selected_item;
- TreeItem *edited_item;
+ TreeItem *root = nullptr;
+ TreeItem *popup_edited_item = nullptr;
+ TreeItem *selected_item = nullptr;
+ TreeItem *edited_item = nullptr;
- TreeItem *drop_mode_over;
- int drop_mode_section;
+ TreeItem *drop_mode_over = nullptr;
+ int drop_mode_section = 0;
- TreeItem *single_select_defer;
- int single_select_defer_column;
+ TreeItem *single_select_defer = nullptr;
+ int single_select_defer_column = 0;
- int pressed_button;
- bool pressing_for_editor;
+ int pressed_button = -1;
+ bool pressing_for_editor = false;
String pressing_for_editor_text;
Vector2 pressing_pos;
Rect2 pressing_item_rect;
- float range_drag_base;
- bool range_drag_enabled;
+ float range_drag_base = 0.0;
+ bool range_drag_enabled = false;
Vector2 range_drag_capture_pos;
- bool propagate_mouse_activated;
+ bool propagate_mouse_activated = false;
//TreeItem *cursor_item;
//int cursor_column;
Rect2 custom_popup_rect;
- int edited_col;
- int selected_col;
- int popup_edited_item_col;
- bool hide_root;
- SelectMode select_mode;
+ int edited_col = -1;
+ int selected_col = -1;
+ int popup_edited_item_col = -1;
+ bool hide_root = false;
+ SelectMode select_mode = SELECT_SINGLE;
- int blocked;
+ int blocked = 0;
- int drop_mode_flags;
+ int drop_mode_flags = 0;
struct ColumnInfo {
- int min_width;
- bool expand;
+ int min_width = 1;
+ bool expand = true;
String title;
Ref<TextLine> text_buf;
Dictionary opentype_features;
@@ -379,27 +357,25 @@ private:
Control::TextDirection text_direction = Control::TEXT_DIRECTION_INHERITED;
ColumnInfo() {
text_buf.instance();
- min_width = 1;
- expand = true;
}
};
- bool show_column_titles;
+ bool show_column_titles = false;
VBoxContainer *popup_editor_vb;
Popup *popup_editor;
- LineEdit *text_editor;
+ LineEdit *text_editor = nullptr;
HSlider *value_editor;
- bool updating_value_editor;
- uint64_t focus_in_id;
- PopupMenu *popup_menu;
+ bool updating_value_editor = false;
+ uint64_t focus_in_id = 0;
+ PopupMenu *popup_menu = nullptr;
Vector<ColumnInfo> columns;
Timer *range_click_timer;
- TreeItem *range_item_last;
- bool range_up_last;
+ TreeItem *range_item_last = nullptr;
+ bool range_up_last = false;
void _range_click_timeout();
int compute_item_height(TreeItem *p_item) const;
@@ -409,7 +385,7 @@ private:
void update_item_cell(TreeItem *p_item, int p_col);
void update_item_cache(TreeItem *p_item);
//void draw_item_text(String p_text,const Ref<Texture2D>& p_icon,int p_icon_max_w,bool p_tool,Rect2i p_rect,const Color& p_color);
- void draw_item_rect(TreeItem::Cell &p_cell, const Rect2i &p_rect, const Color &p_color, const Color &p_icon_color);
+ void draw_item_rect(TreeItem::Cell &p_cell, const Rect2i &p_rect, const Color &p_color, const Color &p_icon_color, int p_ol_size, const Color &p_ol_color);
int draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 &p_draw_size, TreeItem *p_item);
void select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_col, TreeItem *p_prev = nullptr, bool *r_in_range = nullptr, bool p_force_deselect = false);
int propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool p_doubleclick, TreeItem *p_item, int p_button, const Ref<InputEventWithModifiers> &p_mod);
@@ -434,8 +410,8 @@ private:
struct Cache {
Ref<Font> font;
Ref<Font> tb_font;
- int font_size;
- int tb_font_size;
+ int font_size = 0;
+ int tb_font_size = 0;
Ref<StyleBox> bg;
Ref<StyleBox> selected;
Ref<StyleBox> selected_focus;
@@ -459,21 +435,21 @@ private:
Ref<Texture2D> updown;
Color font_color;
- Color font_color_selected;
+ Color font_selected_color;
Color guide_color;
Color drop_position_color;
Color relationship_line_color;
Color custom_button_font_highlight;
- int hseparation;
- int vseparation;
- int item_margin;
- int button_margin;
+ int hseparation = 0;
+ int vseparation = 0;
+ int item_margin = 0;
+ int button_margin = 0;
Point2 offset;
- int draw_relationship_lines;
- int draw_guides;
- int scroll_border;
- int scroll_speed;
+ int draw_relationship_lines = 0;
+ int draw_guides = 0;
+ int scroll_border = 0;
+ int scroll_speed = 0;
enum ClickType {
CLICK_NONE,
@@ -482,17 +458,17 @@ private:
};
- ClickType click_type;
- ClickType hover_type;
- int click_index;
- int click_id;
- TreeItem *click_item;
- int click_column;
- int hover_index;
+ ClickType click_type = Cache::CLICK_NONE;
+ ClickType hover_type = Cache::CLICK_NONE;
+ int click_index = -1;
+ int click_id = -1;
+ TreeItem *click_item = nullptr;
+ int click_column = 0;
+ int hover_index = -1;
Point2 click_pos;
- TreeItem *hover_item;
- int hover_cell;
+ TreeItem *hover_item = nullptr;
+ int hover_cell = -1;
Point2i text_editor_position;
@@ -510,9 +486,9 @@ private:
Rect2 search_item_rect(TreeItem *p_from, TreeItem *p_item);
//Rect2 get_item_rect(TreeItem *p_item);
- uint64_t last_keypress;
+ uint64_t last_keypress = 0;
String incr_search;
- bool cursor_can_exit_tree;
+ bool cursor_can_exit_tree = true;
void _do_incr_search(const String &p_add);
TreeItem *_search_item_text(TreeItem *p_at, const String &p_find, int *r_col, bool p_selectable, bool p_backwards = false);
@@ -526,21 +502,21 @@ private:
float last_drag_time;
float time_since_motion;*/
- float drag_speed;
- float drag_from;
- float drag_accum;
+ float drag_speed = 0.0;
+ float drag_from = 0.0;
+ float drag_accum = 0.0;
Vector2 last_speed;
- bool drag_touching;
- bool drag_touching_deaccel;
- bool click_handled;
- bool allow_rmb_select;
- bool scrolling;
+ bool drag_touching = false;
+ bool drag_touching_deaccel = false;
+ bool click_handled = false;
+ bool allow_rmb_select = false;
+ bool scrolling = false;
- bool allow_reselect;
+ bool allow_reselect = false;
- bool force_edit_checkbox_only_on_checkbox;
+ bool force_edit_checkbox_only_on_checkbox = false;
- bool hide_folding;
+ bool hide_folding = false;
int _count_selected_items(TreeItem *p_from) const;
void _go_left();
@@ -564,6 +540,10 @@ protected:
return get_item_rect(Object::cast_to<TreeItem>(p_item), p_column);
}
+ void _scroll_to_item(Object *p_item) {
+ scroll_to_item(Object::cast_to<TreeItem>(p_item));
+ }
+
public:
virtual String get_tooltip(const Point2 &p_pos) const override;
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 84d689369b..0590ae2415 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -462,25 +462,7 @@ void VideoPlayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
}
-VideoPlayer::VideoPlayer() {
- volume = 1;
- loops = false;
- paused = false;
- autoplay = false;
- expand = true;
-
- audio_track = 0;
- bus_index = 0;
-
- buffering_ms = 500;
-
- // internal_stream.player=this;
- // stream_rid=AudioServer::get_singleton()->audio_stream_create(&internal_stream);
- last_audio_time = 0;
-
- wait_resampler = 0;
- wait_resampler_limit = 2;
-};
+VideoPlayer::VideoPlayer() {}
VideoPlayer::~VideoPlayer() {
// if (stream_rid.is_valid())
diff --git a/scene/gui/video_player.h b/scene/gui/video_player.h
index 089337eed5..0edad296a1 100644
--- a/scene/gui/video_player.h
+++ b/scene/gui/video_player.h
@@ -41,8 +41,8 @@ class VideoPlayer : public Control {
struct Output {
AudioFrame vol;
- int bus_index;
- Viewport *viewport; //pointer only used for reference to previous mix
+ int bus_index = 0;
+ Viewport *viewport = nullptr; //pointer only used for reference to previous mix
};
Ref<VideoStreamPlayback> playback;
Ref<VideoStream> stream;
@@ -56,17 +56,18 @@ class VideoPlayer : public Control {
AudioRBResampler resampler;
Vector<AudioFrame> mix_buffer;
- int wait_resampler, wait_resampler_limit;
-
- bool paused;
- bool autoplay;
- float volume;
- double last_audio_time;
- bool expand;
- bool loops;
- int buffering_ms;
- int audio_track;
- int bus_index;
+ int wait_resampler = 0;
+ int wait_resampler_limit = 2;
+
+ bool paused = false;
+ bool autoplay = false;
+ float volume = 1.0;
+ double last_audio_time = 0.0;
+ bool expand = true;
+ bool loops = false;
+ int buffering_ms = 500;
+ int audio_track = 0;
+ int bus_index = 0;
StringName bus;
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index efef49fbf0..90bc99a941 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -203,7 +203,7 @@ CanvasItemMaterial::LightMode CanvasItemMaterial::get_light_mode() const {
void CanvasItemMaterial::set_particles_animation(bool p_particles_anim) {
particles_animation = p_particles_anim;
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
bool CanvasItemMaterial::get_particles_animation() const {
@@ -387,7 +387,6 @@ void CanvasItem::show() {
}
_propagate_visibility_changed(true);
- _change_notify("visible");
}
void CanvasItem::hide() {
@@ -403,7 +402,6 @@ void CanvasItem::hide() {
}
_propagate_visibility_changed(false);
- _change_notify("visible");
}
CanvasItem *CanvasItem::current_item_drawn = nullptr;
@@ -1035,7 +1033,7 @@ void CanvasItem::set_material(const Ref<Material> &p_material) {
rid = material->get_rid();
}
RS::get_singleton()->canvas_item_set_material(canvas_item, rid);
- _change_notify(); //properties for material exposed
+ notify_property_list_changed(); //properties for material exposed
}
void CanvasItem::set_use_parent_material(bool p_use_parent_material) {
@@ -1341,7 +1339,7 @@ void CanvasItem::set_texture_filter(TextureFilter p_texture_filter) {
}
texture_filter = p_texture_filter;
_update_texture_filter_changed(true);
- _change_notify();
+ notify_property_list_changed();
}
CanvasItem::TextureFilter CanvasItem::get_texture_filter() const {
@@ -1381,7 +1379,7 @@ void CanvasItem::set_texture_repeat(TextureRepeat p_texture_repeat) {
}
texture_repeat = p_texture_repeat;
_update_texture_repeat_changed(true);
- _change_notify();
+ notify_property_list_changed();
}
void CanvasItem::set_clip_children(bool p_enabled) {
diff --git a/scene/main/canvas_item.h b/scene/main/canvas_item.h
index 64eb3f4e0a..e22f93a7ea 100644
--- a/scene/main/canvas_item.h
+++ b/scene/main/canvas_item.h
@@ -90,7 +90,7 @@ private:
struct ShaderData {
RID shader;
- int users;
+ int users = 0;
};
static Map<MaterialKey, ShaderData> shader_map;
diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp
index 9826d9d4db..91daa08ff8 100644
--- a/scene/main/canvas_layer.cpp
+++ b/scene/main/canvas_layer.cpp
@@ -303,17 +303,7 @@ void CanvasLayer::_bind_methods() {
}
CanvasLayer::CanvasLayer() {
- vp = nullptr;
- scale = Vector2(1, 1);
- rot = 0;
- locrotscale_dirty = false;
- layer = 1;
canvas = RS::get_singleton()->canvas_create();
- custom_viewport = nullptr;
-
- sort_index = 0;
- follow_viewport = false;
- follow_viewport_scale = 1.0;
}
CanvasLayer::~CanvasLayer() {
diff --git a/scene/main/canvas_layer.h b/scene/main/canvas_layer.h
index cb10c6299b..181d1dd659 100644
--- a/scene/main/canvas_layer.h
+++ b/scene/main/canvas_layer.h
@@ -38,24 +38,24 @@ class Viewport;
class CanvasLayer : public Node {
GDCLASS(CanvasLayer, Node);
- bool locrotscale_dirty;
+ bool locrotscale_dirty = false;
Vector2 ofs;
- Size2 scale;
- real_t rot;
- int layer;
+ Size2 scale = Vector2(1, 1);
+ real_t rot = 0.0;
+ int layer = 1;
Transform2D transform;
RID canvas;
ObjectID custom_viewport_id; // to check validity
- Viewport *custom_viewport;
+ Viewport *custom_viewport = nullptr;
RID viewport;
- Viewport *vp;
+ Viewport *vp = nullptr;
- int sort_index;
+ int sort_index = 0;
- bool follow_viewport;
- float follow_viewport_scale;
+ bool follow_viewport = false;
+ float follow_viewport_scale = 1.0;
void _update_xform();
void _update_locrotscale();
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index ddcf07c8e9..ce7d6ef13c 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -49,7 +49,7 @@ Error HTTPRequest::_parse_url(const String &p_url) {
got_response = false;
body_len = -1;
body.resize(0);
- downloaded = 0;
+ downloaded.set(0);
redirections = 0;
String url_lower = url.to_lower();
@@ -159,11 +159,11 @@ Error HTTPRequest::request_raw(const String &p_url, const Vector<String> &p_cust
requesting = true;
- if (use_threads) {
- thread_done = false;
- thread_request_quit = false;
+ if (use_threads.is_set()) {
+ thread_done.clear();
+ thread_request_quit.clear();
client->set_blocking_mode(true);
- thread = Thread::create(_thread_func, this);
+ thread.start(_thread_func, this);
} else {
client->set_blocking_mode(false);
err = _request();
@@ -186,7 +186,7 @@ void HTTPRequest::_thread_func(void *p_userdata) {
if (err != OK) {
hr->call_deferred("_request_done", RESULT_CANT_CONNECT, 0, PackedStringArray(), PackedByteArray());
} else {
- while (!hr->thread_request_quit) {
+ while (!hr->thread_request_quit.is_set()) {
bool exit = hr->_update_connection();
if (exit) {
break;
@@ -195,7 +195,7 @@ void HTTPRequest::_thread_func(void *p_userdata) {
}
}
- hr->thread_done = true;
+ hr->thread_done.set();
}
void HTTPRequest::cancel_request() {
@@ -205,13 +205,11 @@ void HTTPRequest::cancel_request() {
return;
}
- if (!use_threads) {
+ if (!use_threads.is_set()) {
set_process_internal(false);
} else {
- thread_request_quit = true;
- Thread::wait_to_finish(thread);
- memdelete(thread);
- thread = nullptr;
+ thread_request_quit.set();
+ thread.wait_to_finish();
}
if (file) {
@@ -238,7 +236,7 @@ bool HTTPRequest::_handle_response(bool *ret_value) {
List<String> rheaders;
client->get_response_headers(&rheaders);
response_headers.resize(0);
- downloaded = 0;
+ downloaded.set(0);
for (List<String>::Element *E = rheaders.front(); E; E = E->next()) {
response_headers.push_back(E->get());
}
@@ -278,7 +276,7 @@ bool HTTPRequest::_handle_response(bool *ret_value) {
got_response = false;
body_len = -1;
body.resize(0);
- downloaded = 0;
+ downloaded.set(0);
redirections = new_redirs;
*ret_value = false;
return true;
@@ -391,7 +389,7 @@ bool HTTPRequest::_update_connection() {
client->poll();
PackedByteArray chunk = client->read_response_body_chunk();
- downloaded += chunk.size();
+ downloaded.add(chunk.size());
if (file) {
const uint8_t *r = chunk.ptr();
@@ -404,13 +402,13 @@ bool HTTPRequest::_update_connection() {
body.append_array(chunk);
}
- if (body_size_limit >= 0 && downloaded > body_size_limit) {
+ if (body_size_limit >= 0 && downloaded.get() > body_size_limit) {
call_deferred("_request_done", RESULT_BODY_SIZE_LIMIT_EXCEEDED, response_code, response_headers, PackedByteArray());
return true;
}
if (body_len >= 0) {
- if (downloaded == body_len) {
+ if (downloaded.get() == body_len) {
call_deferred("_request_done", RESULT_SUCCESS, response_code, response_headers, body);
return true;
}
@@ -480,7 +478,7 @@ void HTTPRequest::_request_done(int p_status, int p_code, const PackedStringArra
void HTTPRequest::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
- if (use_threads) {
+ if (use_threads.is_set()) {
return;
}
bool done = _update_connection();
@@ -499,11 +497,11 @@ void HTTPRequest::_notification(int p_what) {
void HTTPRequest::set_use_threads(bool p_use) {
ERR_FAIL_COND(get_http_client_status() != HTTPClient::STATUS_DISCONNECTED);
- use_threads = p_use;
+ use_threads.set_to(p_use);
}
bool HTTPRequest::is_using_threads() const {
- return use_threads;
+ return use_threads.is_set();
}
void HTTPRequest::set_accept_gzip(bool p_gzip) {
@@ -557,7 +555,7 @@ int HTTPRequest::get_max_redirects() const {
}
int HTTPRequest::get_downloaded_bytes() const {
- return downloaded;
+ return downloaded.get();
}
int HTTPRequest::get_body_size() const {
@@ -640,31 +638,11 @@ void HTTPRequest::_bind_methods() {
}
HTTPRequest::HTTPRequest() {
- thread = nullptr;
-
- port = 80;
- redirections = 0;
- max_redirects = 8;
- body_len = -1;
- got_response = false;
- validate_ssl = false;
- use_ssl = false;
- accept_gzip = true;
- response_code = 0;
- request_sent = false;
- requesting = false;
client.instance();
- use_threads = false;
- thread_done = false;
- downloaded = 0;
- body_size_limit = -1;
- file = nullptr;
-
timer = memnew(Timer);
timer->set_one_shot(true);
timer->connect("timeout", callable_mp(this, &HTTPRequest::_timeout));
add_child(timer);
- timeout = 0;
}
HTTPRequest::~HTTPRequest() {
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index 6f606296e4..92b0ff28e9 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -34,6 +34,7 @@
#include "core/io/http_client.h"
#include "core/os/file_access.h"
#include "core/os/thread.h"
+#include "core/templates/safe_refcount.h"
#include "node.h"
#include "scene/main/timer.h"
@@ -60,42 +61,42 @@ public:
};
private:
- bool requesting;
+ bool requesting = false;
String request_string;
String url;
- int port;
+ int port = 80;
Vector<String> headers;
- bool validate_ssl;
- bool use_ssl;
+ bool validate_ssl = false;
+ bool use_ssl = false;
HTTPClient::Method method;
Vector<uint8_t> request_data;
- bool request_sent;
+ bool request_sent = false;
Ref<HTTPClient> client;
PackedByteArray body;
- volatile bool use_threads;
- bool accept_gzip;
+ SafeFlag use_threads;
+ bool accept_gzip = true;
- bool got_response;
- int response_code;
+ bool got_response = false;
+ int response_code = 0;
Vector<String> response_headers;
String download_to_file;
- FileAccess *file;
+ FileAccess *file = nullptr;
- int body_len;
- volatile int downloaded;
- int body_size_limit;
+ int body_len = -1;
+ SafeNumeric<int> downloaded;
+ int body_size_limit = -1;
- int redirections;
+ int redirections = 0;
bool _update_connection();
- int max_redirects;
+ int max_redirects = 8;
- int timeout;
+ int timeout = 0;
void _redirect_request(const String &p_new_url);
@@ -107,10 +108,10 @@ private:
bool has_header(const PackedStringArray &p_headers, const String &p_header_name);
String get_header_value(const PackedStringArray &p_headers, const String &header_name);
- volatile bool thread_done;
- volatile bool thread_request_quit;
+ SafeFlag thread_done;
+ SafeFlag thread_request_quit;
- Thread *thread;
+ Thread thread;
void _request_done(int p_status, int p_code, const PackedStringArray &p_headers, const PackedByteArray &p_data);
static void _thread_func(void *p_userdata);
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 6a1b896b04..ff46c06128 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -367,8 +367,6 @@ void Node::set_physics_process(bool p_process) {
} else {
remove_from_group("physics_process");
}
-
- _change_notify("physics_process");
}
bool Node::is_physics_processing() const {
@@ -387,8 +385,6 @@ void Node::set_physics_process_internal(bool p_process_internal) {
} else {
remove_from_group("physics_process_internal");
}
-
- _change_notify("physics_process_internal");
}
bool Node::is_physics_processing_internal() const {
@@ -466,7 +462,7 @@ uint16_t Node::rpc_config(const StringName &p_method, MultiplayerAPI::RPCMode p_
nd.name = p_method;
nd.mode = p_mode;
data.rpc_methods.push_back(nd);
- return ((uint16_t)data.rpc_properties.size() - 1) | (1 << 15);
+ return ((uint16_t)data.rpc_methods.size() - 1) | (1 << 15);
} else {
int c_mid = (~(1 << 15)) & mid;
data.rpc_methods.write[c_mid].mode = p_mode;
@@ -555,7 +551,7 @@ Variant Node::_rpc_bind(const Variant **p_args, int p_argcount, Callable::CallEr
return Variant();
}
- if (p_args[0]->get_type() != Variant::STRING) {
+ if (p_args[0]->get_type() != Variant::STRING_NAME) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
@@ -584,7 +580,7 @@ Variant Node::_rpc_id_bind(const Variant **p_args, int p_argcount, Callable::Cal
return Variant();
}
- if (p_args[1]->get_type() != Variant::STRING) {
+ if (p_args[1]->get_type() != Variant::STRING_NAME) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::STRING;
@@ -607,7 +603,7 @@ Variant Node::_rpc_unreliable_bind(const Variant **p_args, int p_argcount, Calla
return Variant();
}
- if (p_args[0]->get_type() != Variant::STRING) {
+ if (p_args[0]->get_type() != Variant::STRING_NAME) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 0;
r_error.expected = Variant::STRING;
@@ -636,7 +632,7 @@ Variant Node::_rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Ca
return Variant();
}
- if (p_args[1]->get_type() != Variant::STRING) {
+ if (p_args[1]->get_type() != Variant::STRING_NAME) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = 1;
r_error.expected = Variant::STRING;
@@ -863,8 +859,6 @@ void Node::set_process(bool p_process) {
} else {
remove_from_group("process");
}
-
- _change_notify("process");
}
bool Node::is_processing() const {
@@ -883,8 +877,6 @@ void Node::set_process_internal(bool p_process_internal) {
} else {
remove_from_group("process_internal");
}
-
- _change_notify("process_internal");
}
bool Node::is_processing_internal() const {
@@ -1116,7 +1108,7 @@ void Node::_generate_serial_child_name(const Node *p_child, StringName &name) co
name = p_child->get_class();
// Adjust casing according to project setting. The current type name is expected to be in PascalCase.
- switch (ProjectSettings::get_singleton()->get("node/name_casing").operator int()) {
+ switch (ProjectSettings::get_singleton()->get("editor/node_naming/name_casing").operator int()) {
case NAME_CASING_PASCAL_CASE:
break;
case NAME_CASING_CAMEL_CASE: {
@@ -2146,8 +2138,17 @@ Node *Node::duplicate(int p_flags) const {
#ifdef TOOLS_ENABLED
Node *Node::duplicate_from_editor(Map<const Node *, Node *> &r_duplimap) const {
+ return duplicate_from_editor(r_duplimap, Map<RES, RES>());
+}
+
+Node *Node::duplicate_from_editor(Map<const Node *, Node *> &r_duplimap, const Map<RES, RES> &p_resource_remap) const {
Node *dupe = _duplicate(DUPLICATE_SIGNALS | DUPLICATE_GROUPS | DUPLICATE_SCRIPTS | DUPLICATE_USE_INSTANCING | DUPLICATE_FROM_EDITOR, &r_duplimap);
+ // This is used by SceneTreeDock's paste functionality. When pasting to foreign scene, resources are duplicated.
+ if (!p_resource_remap.is_empty()) {
+ remap_node_resources(dupe, p_resource_remap);
+ }
+
// Duplication of signals must happen after all the node descendants have been copied,
// because re-targeting of connections from some descendant to another is not possible
// if the emitter node comes later in tree order than the receiver
@@ -2155,6 +2156,54 @@ Node *Node::duplicate_from_editor(Map<const Node *, Node *> &r_duplimap) const {
return dupe;
}
+
+void Node::remap_node_resources(Node *p_node, const Map<RES, RES> &p_resource_remap) const {
+ List<PropertyInfo> props;
+ p_node->get_property_list(&props);
+
+ for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
+ if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) {
+ continue;
+ }
+
+ Variant v = p_node->get(E->get().name);
+ if (v.is_ref()) {
+ RES res = v;
+ if (res.is_valid()) {
+ if (p_resource_remap.has(res)) {
+ p_node->set(E->get().name, p_resource_remap[res]);
+ remap_nested_resources(res, p_resource_remap);
+ }
+ }
+ }
+ }
+
+ for (int i = 0; i < p_node->get_child_count(); i++) {
+ remap_node_resources(p_node->get_child(i), p_resource_remap);
+ }
+}
+
+void Node::remap_nested_resources(RES p_resource, const Map<RES, RES> &p_resource_remap) const {
+ List<PropertyInfo> props;
+ p_resource->get_property_list(&props);
+
+ for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
+ if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) {
+ continue;
+ }
+
+ Variant v = p_resource->get(E->get().name);
+ if (v.is_ref()) {
+ RES res = v;
+ if (res.is_valid()) {
+ if (p_resource_remap.has(res)) {
+ p_resource->set(E->get().name, p_resource_remap[res]);
+ remap_nested_resources(res, p_resource_remap);
+ }
+ }
+ }
+ }
+}
#endif
void Node::_duplicate_and_reown(Node *p_new_parent, const Map<Node *, Node *> &p_reown_map) const {
@@ -2332,12 +2381,7 @@ static void find_owned_by(Node *p_by, Node *p_node, List<Node *> *p_owned) {
}
}
-struct _NodeReplaceByPair {
- String name;
- Variant value;
-};
-
-void Node::replace_by(Node *p_node, bool p_keep_data) {
+void Node::replace_by(Node *p_node, bool p_keep_groups) {
ERR_FAIL_NULL(p_node);
ERR_FAIL_COND(p_node->data.parent);
@@ -2345,21 +2389,7 @@ void Node::replace_by(Node *p_node, bool p_keep_data) {
List<Node *> owned_by_owner;
Node *owner = (data.owner == this) ? p_node : data.owner;
- List<_NodeReplaceByPair> replace_data;
-
- if (p_keep_data) {
- List<PropertyInfo> plist;
- get_property_list(&plist);
-
- for (List<PropertyInfo>::Element *E = plist.front(); E; E = E->next()) {
- _NodeReplaceByPair rd;
- if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) {
- continue;
- }
- rd.name = E->get().name;
- rd.value = get(rd.name);
- }
-
+ if (p_keep_groups) {
List<GroupInfo> groups;
get_groups(&groups);
@@ -2404,10 +2434,6 @@ void Node::replace_by(Node *p_node, bool p_keep_data) {
}
p_node->set_filename(get_filename());
-
- for (List<_NodeReplaceByPair>::Element *E = replace_data.front(); E; E = E->next()) {
- p_node->set(E->get().name, E->get().value);
- }
}
void Node::_replace_connections_target(Node *p_new_target) {
@@ -2699,10 +2725,10 @@ void Node::request_ready() {
}
void Node::_bind_methods() {
- GLOBAL_DEF("node/name_num_separator", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("node/name_num_separator", PropertyInfo(Variant::INT, "node/name_num_separator", PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash"));
- GLOBAL_DEF("node/name_casing", NAME_CASING_PASCAL_CASE);
- ProjectSettings::get_singleton()->set_custom_property_info("node/name_casing", PropertyInfo(Variant::INT, "node/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case"));
+ GLOBAL_DEF("editor/node_naming/name_num_separator", 0);
+ ProjectSettings::get_singleton()->set_custom_property_info("editor/node_naming/name_num_separator", PropertyInfo(Variant::INT, "editor/node_naming/name_num_separator", PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash"));
+ GLOBAL_DEF("editor/node_naming/name_casing", NAME_CASING_PASCAL_CASE);
+ ProjectSettings::get_singleton()->set_custom_property_info("editor/node_naming/name_casing", PropertyInfo(Variant::INT, "editor/node_naming/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case"));
ClassDB::bind_method(D_METHOD("add_sibling", "sibling", "legible_unique_name"), &Node::add_sibling, DEFVAL(false));
@@ -2774,7 +2800,7 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_tree"), &Node::get_tree);
ClassDB::bind_method(D_METHOD("duplicate", "flags"), &Node::duplicate, DEFVAL(DUPLICATE_USE_INSTANCING | DUPLICATE_SIGNALS | DUPLICATE_GROUPS | DUPLICATE_SCRIPTS));
- ClassDB::bind_method(D_METHOD("replace_by", "node", "keep_data"), &Node::replace_by, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("replace_by", "node", "keep_groups"), &Node::replace_by, DEFVAL(false));
ClassDB::bind_method(D_METHOD("set_scene_instance_load_placeholder", "load_placeholder"), &Node::set_scene_instance_load_placeholder);
ClassDB::bind_method(D_METHOD("get_scene_instance_load_placeholder"), &Node::get_scene_instance_load_placeholder);
@@ -2901,7 +2927,7 @@ void Node::_bind_methods() {
}
String Node::_get_name_num_separator() {
- switch (ProjectSettings::get_singleton()->get("node/name_num_separator").operator int()) {
+ switch (ProjectSettings::get_singleton()->get("editor/node_naming/name_num_separator").operator int()) {
case 0:
return "";
case 1:
diff --git a/scene/main/node.h b/scene/main/node.h
index a0dca75791..66104b5cf5 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -80,7 +80,7 @@ private:
struct NetData {
StringName name;
- MultiplayerAPI::RPCMode mode;
+ MultiplayerAPI::RPCMode mode = MultiplayerAPI::RPCMode::RPC_MODE_DISABLED;
};
struct Data {
@@ -297,7 +297,7 @@ public:
struct GroupInfo {
StringName name;
- bool persistent;
+ bool persistent = false;
};
void get_groups(List<GroupInfo> *p_groups) const;
@@ -362,6 +362,9 @@ public:
Node *duplicate_and_reown(const Map<Node *, Node *> &p_reown_map) const;
#ifdef TOOLS_ENABLED
Node *duplicate_from_editor(Map<const Node *, Node *> &r_duplimap) const;
+ Node *duplicate_from_editor(Map<const Node *, Node *> &r_duplimap, const Map<RES, RES> &p_resource_remap) const;
+ void remap_node_resources(Node *p_node, const Map<RES, RES> &p_resource_remap) const;
+ void remap_nested_resources(RES p_resource, const Map<RES, RES> &p_resource_remap) const;
#endif
// used by editors, to save what has changed only
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index f18ac3b801..806ae9280d 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -90,10 +90,7 @@ void SceneTreeTimer::release_connections() {
}
}
-SceneTreeTimer::SceneTreeTimer() {
- time_left = 0;
- process_pause = true;
-}
+SceneTreeTimer::SceneTreeTimer() {}
void SceneTree::tree_changed() {
tree_version++;
@@ -409,6 +406,7 @@ bool SceneTree::physics_process(float p_time) {
emit_signal("physics_frame");
_notify_group_pause("physics_process_internal", Node::NOTIFICATION_INTERNAL_PHYSICS_PROCESS);
+ call_group_flags(GROUP_CALL_REALTIME, "_viewports", "_process_picking");
_notify_group_pause("physics_process", Node::NOTIFICATION_PHYSICS_PROCESS);
_flush_ugc();
MessageQueue::get_singleton()->flush(); //small little hack
@@ -486,7 +484,7 @@ bool SceneTree::process(float p_time) {
if (Engine::get_singleton()->is_editor_hint()) {
//simple hack to reload fallback environment if it changed from editor
- String env_path = ProjectSettings::get_singleton()->get("rendering/environment/default_environment");
+ String env_path = ProjectSettings::get_singleton()->get("rendering/environment/defaults/default_environment");
env_path = env_path.strip_edges(); //user may have added a space or two
String cpath;
Ref<Environment> fallback = get_root()->get_world_3d()->get_fallback_environment();
@@ -498,7 +496,7 @@ bool SceneTree::process(float p_time) {
fallback = ResourceLoader::load(env_path);
if (fallback.is_null()) {
//could not load fallback, set as empty
- ProjectSettings::get_singleton()->set("rendering/environment/default_environment", "");
+ ProjectSettings::get_singleton()->set("rendering/environment/defaults/default_environment", "");
}
} else {
fallback.unref();
@@ -1351,34 +1349,54 @@ SceneTree::SceneTree() {
root->set_as_audio_listener_2d(true);
current_scene = nullptr;
- const int msaa_mode = GLOBAL_DEF("rendering/quality/screen_filters/msaa", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/msaa", PropertyInfo(Variant::INT, "rendering/quality/screen_filters/msaa", PROPERTY_HINT_ENUM, "Disabled (Fastest),2x (Fast),4x (Average),8x (Slow),16x (Slower)"));
+ const int msaa_mode = GLOBAL_DEF("rendering/anti_aliasing/quality/msaa", 0);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/quality/msaa", PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa", PROPERTY_HINT_ENUM, "Disabled (Fastest),2x (Fast),4x (Average),8x (Slow),16x (Slower)"));
root->set_msaa(Viewport::MSAA(msaa_mode));
- const int ssaa_mode = GLOBAL_DEF("rendering/quality/screen_filters/screen_space_aa", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/screen_space_aa", PropertyInfo(Variant::INT, "rendering/quality/screen_filters/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)"));
+ const int ssaa_mode = GLOBAL_DEF("rendering/anti_aliasing/quality/screen_space_aa", 0);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/quality/screen_space_aa", PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)"));
root->set_screen_space_aa(Viewport::ScreenSpaceAA(ssaa_mode));
- const bool use_debanding = GLOBAL_DEF("rendering/quality/screen_filters/use_debanding", false);
+ const bool use_debanding = GLOBAL_DEF("rendering/anti_aliasing/quality/use_debanding", false);
root->set_use_debanding(use_debanding);
- float lod_threshold = GLOBAL_DEF("rendering/quality/mesh_lod/threshold_pixels", 1.0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/mesh_lod/threshold_pixels", PropertyInfo(Variant::FLOAT, "rendering/quality/mesh_lod/threshold_pixels", PROPERTY_HINT_RANGE, "0,1024,0.1"));
+ float lod_threshold = GLOBAL_DEF("rendering/mesh_lod/lod_change/threshold_pixels", 1.0);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/mesh_lod/lod_change/threshold_pixels", PropertyInfo(Variant::FLOAT, "rendering/mesh_lod/lod_change/threshold_pixels", PROPERTY_HINT_RANGE, "0,1024,0.1"));
root->set_lod_threshold(lod_threshold);
- bool snap_2d_transforms = GLOBAL_DEF("rendering/quality/2d/snap_2d_transforms_to_pixel", false);
+ bool snap_2d_transforms = GLOBAL_DEF("rendering/2d/snap/snap_2d_transforms_to_pixel", false);
root->set_snap_2d_transforms_to_pixel(snap_2d_transforms);
- bool snap_2d_vertices = GLOBAL_DEF("rendering/quality/2d/snap_2d_vertices_to_pixel", false);
+ bool snap_2d_vertices = GLOBAL_DEF("rendering/2d/snap/snap_2d_vertices_to_pixel", false);
root->set_snap_2d_vertices_to_pixel(snap_2d_vertices);
- Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_DEF("rendering/quality/2d_sdf/oversize", 1)));
+ int shadowmap_size = GLOBAL_DEF("rendering/shadows/shadow_atlas/size", 4096);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/size", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/size", PROPERTY_HINT_RANGE, "256,16384"));
+ GLOBAL_DEF("rendering/shadows/shadow_atlas/size.mobile", 2048);
+ bool shadowmap_16_bits = GLOBAL_DEF("rendering/shadows/shadow_atlas/16_bits", true);
+ int atlas_q0 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_0_subdiv", 2);
+ int atlas_q1 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_1_subdiv", 2);
+ int atlas_q2 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_2_subdiv", 3);
+ int atlas_q3 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_3_subdiv", 4);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_0_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_1_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_2_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_3_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
+
+ root->set_shadow_atlas_size(shadowmap_size);
+ root->set_shadow_atlas_16_bits(shadowmap_16_bits);
+ root->set_shadow_atlas_quadrant_subdiv(0, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q0));
+ root->set_shadow_atlas_quadrant_subdiv(1, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q1));
+ root->set_shadow_atlas_quadrant_subdiv(2, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q2));
+ root->set_shadow_atlas_quadrant_subdiv(3, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q3));
+
+ Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_DEF("rendering/2d/sdf/oversize", 1)));
root->set_sdf_oversize(sdf_oversize);
- Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_DEF("rendering/quality/2d_sdf/scale", 1)));
+ Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_DEF("rendering/2d/sdf/scale", 1)));
root->set_sdf_scale(sdf_scale);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/2d_sdf/oversize", PropertyInfo(Variant::INT, "rendering/quality/2d_sdf/oversize", PROPERTY_HINT_ENUM, "100%,120%,150%,200%"));
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/2d_sdf/scale", PropertyInfo(Variant::INT, "rendering/quality/2d_sdf/scale", PROPERTY_HINT_ENUM, "100%,50%,25%"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/sdf/oversize", PropertyInfo(Variant::INT, "rendering/2d/sdf/oversize", PROPERTY_HINT_ENUM, "100%,120%,150%,200%"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/sdf/scale", PropertyInfo(Variant::INT, "rendering/2d/sdf/scale", PROPERTY_HINT_ENUM, "100%,50%,25%"));
{ // Load default fallback environment.
// Get possible extensions.
@@ -1392,9 +1410,9 @@ SceneTree::SceneTree() {
ext_hint += "*." + E->get();
}
// Get path.
- String env_path = GLOBAL_DEF("rendering/environment/default_environment", "");
+ String env_path = GLOBAL_DEF("rendering/environment/defaults/default_environment", "");
// Setup property.
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/default_environment", PropertyInfo(Variant::STRING, "rendering/viewport/default_environment", PROPERTY_HINT_FILE, ext_hint));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/defaults/default_environment", PropertyInfo(Variant::STRING, "rendering/viewport/default_environment", PROPERTY_HINT_FILE, ext_hint));
env_path = env_path.strip_edges();
if (env_path != String()) {
Ref<Environment> env = ResourceLoader::load(env_path);
@@ -1403,7 +1421,7 @@ SceneTree::SceneTree() {
} else {
if (Engine::get_singleton()->is_editor_hint()) {
// File was erased, clear the field.
- ProjectSettings::get_singleton()->set("rendering/environment/default_environment", "");
+ ProjectSettings::get_singleton()->set("rendering/environment/defaults/default_environment", "");
} else {
// File was erased, notify user.
ERR_PRINT(RTR("Default Environment as specified in Project Settings (Rendering -> Environment -> Default Environment) could not be loaded."));
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index 748908c8a6..35622c2031 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -51,8 +51,8 @@ class SceneDebugger;
class SceneTreeTimer : public Reference {
GDCLASS(SceneTreeTimer, Reference);
- float time_left;
- bool process_pause;
+ float time_left = 0.0;
+ bool process_pause = true;
protected:
static void _bind_methods();
@@ -80,8 +80,7 @@ public:
private:
struct Group {
Vector<Node *> nodes;
- bool changed;
- Group() { changed = false; };
+ bool changed = false;
};
Window *root = nullptr;
diff --git a/scene/main/shader_globals_override.cpp b/scene/main/shader_globals_override.cpp
index 4485cffff5..b6b2982155 100644
--- a/scene/main/shader_globals_override.cpp
+++ b/scene/main/shader_globals_override.cpp
@@ -277,6 +277,4 @@ void ShaderGlobalsOverride::_bind_methods() {
ClassDB::bind_method(D_METHOD("_activate"), &ShaderGlobalsOverride::_activate);
}
-ShaderGlobalsOverride::ShaderGlobalsOverride() {
- active = false;
-}
+ShaderGlobalsOverride::ShaderGlobalsOverride() {}
diff --git a/scene/main/shader_globals_override.h b/scene/main/shader_globals_override.h
index 9e666a0ec5..8d8794d465 100644
--- a/scene/main/shader_globals_override.h
+++ b/scene/main/shader_globals_override.h
@@ -43,7 +43,7 @@ class ShaderGlobalsOverride : public Node {
StringName *_remap(const StringName &p_name) const;
- bool active;
+ bool active = false;
mutable HashMap<StringName, Override> overrides;
mutable HashMap<StringName, StringName> param_remaps;
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index d7b2292ff5..3661b6c394 100644
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -217,12 +217,4 @@ void Timer::_bind_methods() {
BIND_ENUM_CONSTANT(TIMER_PROCESS_IDLE);
}
-Timer::Timer() {
- timer_process_mode = TIMER_PROCESS_IDLE;
- autostart = false;
- wait_time = 1;
- one_shot = false;
- time_left = -1;
- processing = false;
- paused = false;
-}
+Timer::Timer() {}
diff --git a/scene/main/timer.h b/scene/main/timer.h
index 0604a2d990..672290cf50 100644
--- a/scene/main/timer.h
+++ b/scene/main/timer.h
@@ -36,13 +36,13 @@
class Timer : public Node {
GDCLASS(Timer, Node);
- float wait_time;
- bool one_shot;
- bool autostart;
- bool processing;
- bool paused;
+ float wait_time = 1.0;
+ bool one_shot = false;
+ bool autostart = false;
+ bool processing = false;
+ bool paused = false;
- double time_left;
+ double time_left = -1.0;
protected:
void _notification(int p_what);
@@ -78,7 +78,7 @@ public:
Timer();
private:
- TimerProcessMode timer_process_mode;
+ TimerProcessMode timer_process_mode = TIMER_PROCESS_IDLE;
void _set_process(bool p_process, bool p_force = false);
};
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 31496366de..54b670df6c 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -144,7 +144,6 @@ void ViewportTexture::_bind_methods() {
}
ViewportTexture::ViewportTexture() {
- vp = nullptr;
set_local_to_scene(true);
}
@@ -184,26 +183,6 @@ public:
/////////////////////////////////////
-Viewport::GUI::GUI() {
- embed_subwindows_hint = false;
- embedding_subwindows = false;
-
- dragging = false;
- mouse_focus = nullptr;
- forced_mouse_focus = false;
- mouse_click_grabber = nullptr;
- mouse_focus_mask = 0;
- key_focus = nullptr;
- mouse_over = nullptr;
- drag_mouse_over = nullptr;
-
- tooltip_control = nullptr;
- tooltip_popup = nullptr;
- tooltip_label = nullptr;
-}
-
-/////////////////////////////////////
-
void Viewport::update_worlds() {
if (!is_inside_tree()) {
return;
@@ -299,6 +278,11 @@ void Viewport::_sub_window_update(Window *p_window) {
int x = (r.size.width - title_text.get_size().x) / 2;
int y = (-title_height - title_text.get_size().y) / 2;
+ Color font_outline_color = p_window->get_theme_color("title_outline_modulate");
+ int outline_size = p_window->get_theme_constant("title_outline_size");
+ if (outline_size > 0 && font_outline_color.a > 0) {
+ title_text.draw_outline(sw.canvas_item, r.position + Point2(x, y), outline_size, font_outline_color);
+ }
title_text.draw(sw.canvas_item, r.position + Point2(x, y), title_color);
bool hl = gui.subwindow_focused == sw.window && gui.subwindow_drag == SUB_WINDOW_DRAG_CLOSE && gui.subwindow_drag_close_inside;
@@ -468,7 +452,7 @@ void Viewport::_notification(int p_what) {
//3D
PhysicsServer3D::get_singleton()->space_set_debug_contacts(find_world_3d()->get_space(), get_tree()->get_collision_debug_contact_count());
contact_3d_debug_multimesh = RenderingServer::get_singleton()->multimesh_create();
- RenderingServer::get_singleton()->multimesh_allocate(contact_3d_debug_multimesh, get_tree()->get_collision_debug_contact_count(), RS::MULTIMESH_TRANSFORM_3D, true);
+ RenderingServer::get_singleton()->multimesh_allocate_data(contact_3d_debug_multimesh, get_tree()->get_collision_debug_contact_count(), RS::MULTIMESH_TRANSFORM_3D, true);
RenderingServer::get_singleton()->multimesh_set_visible_instances(contact_3d_debug_multimesh, 0);
RenderingServer::get_singleton()->multimesh_set_mesh(contact_3d_debug_multimesh, get_tree()->get_debug_contact_mesh()->get_rid());
contact_3d_debug_instance = RenderingServer::get_singleton()->instance_create();
@@ -567,280 +551,297 @@ void Viewport::_notification(int p_what) {
int point_count = PhysicsServer3D::get_singleton()->space_get_contact_count(find_world_3d()->get_space());
RS::get_singleton()->multimesh_set_visible_instances(contact_3d_debug_multimesh, point_count);
+
+ for (int i = 0; i < point_count; i++) {
+ Transform point_transform;
+ point_transform.origin = points[i];
+ RS::get_singleton()->multimesh_instance_set_transform(contact_3d_debug_multimesh, i, point_transform);
+ }
}
+ } break;
+ case NOTIFICATION_WM_MOUSE_EXIT: {
+ _drop_physics_mouseover();
+
+ // Unlike on loss of focus (NOTIFICATION_WM_WINDOW_FOCUS_OUT), do not
+ // drop the gui mouseover here, as a scrollbar may be dragged while the
+ // mouse is outside the window (without the window having lost focus).
+ // See bug #39634
+ } break;
+ case NOTIFICATION_WM_WINDOW_FOCUS_OUT: {
+ _drop_physics_mouseover();
+
+ if (gui.mouse_focus && !gui.forced_mouse_focus) {
+ _drop_mouse_focus();
+ }
+ } break;
+ }
+}
+
+void Viewport::_process_picking() {
+ if (!is_inside_tree()) {
+ return;
+ }
+ if (!physics_object_picking) {
+ return;
+ }
+ if (to_screen_rect != Rect2i() && Input::get_singleton()->get_mouse_mode() == Input::MOUSE_MODE_CAPTURED) {
+ return;
+ }
+
+ _drop_physics_mouseover(true);
- if (physics_object_picking && (to_screen_rect == Rect2i() || Input::get_singleton()->get_mouse_mode() != Input::MOUSE_MODE_CAPTURED)) {
#ifndef _3D_DISABLED
- Vector2 last_pos(1e20, 1e20);
- CollisionObject3D *last_object = nullptr;
- ObjectID last_id;
+ Vector2 last_pos(1e20, 1e20);
+ CollisionObject3D *last_object = nullptr;
+ ObjectID last_id;
#endif
- PhysicsDirectSpaceState3D::RayResult result;
- PhysicsDirectSpaceState2D *ss2d = PhysicsServer2D::get_singleton()->space_get_direct_state(find_world_2d()->get_space());
-
- 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<InputEventMouse> m = E->get();
- if (m.is_valid()) {
- has_mouse_event = true;
- break;
- }
- }
+ PhysicsDirectSpaceState3D::RayResult result;
+ PhysicsDirectSpaceState2D *ss2d = PhysicsServer2D::get_singleton()->space_get_direct_state(find_world_2d()->get_space());
+
+ 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<InputEventMouse> m = E->get();
+ if (m.is_valid()) {
+ has_mouse_event = true;
+ break;
+ }
+ }
- 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);
- mm->set_shift(physics_last_mouse_state.shift);
- mm->set_control(physics_last_mouse_state.control);
- mm->set_metakey(physics_last_mouse_state.meta);
- mm->set_button_mask(physics_last_mouse_state.mouse_mask);
- physics_picking_events.push_back(mm);
- }
- }
+ if (!has_mouse_event) {
+ Ref<InputEventMouseMotion> mm;
+ mm.instance();
- while (physics_picking_events.size()) {
- Ref<InputEvent> ev = physics_picking_events.front()->get();
- physics_picking_events.pop_front();
+ 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);
+ mm->set_shift(physics_last_mouse_state.shift);
+ mm->set_control(physics_last_mouse_state.control);
+ mm->set_metakey(physics_last_mouse_state.meta);
+ mm->set_button_mask(physics_last_mouse_state.mouse_mask);
+ physics_picking_events.push_back(mm);
+ }
+ }
- Vector2 pos;
- bool is_mouse = false;
+ while (physics_picking_events.size()) {
+ Ref<InputEvent> ev = physics_picking_events.front()->get();
+ physics_picking_events.pop_front();
- Ref<InputEventMouseMotion> mm = ev;
+ Vector2 pos;
+ bool is_mouse = false;
- if (mm.is_valid()) {
- pos = mm->get_position();
- is_mouse = true;
+ Ref<InputEventMouseMotion> mm = ev;
- physics_has_last_mousepos = true;
- physics_last_mousepos = pos;
- physics_last_mouse_state.alt = mm->get_alt();
- physics_last_mouse_state.shift = mm->get_shift();
- physics_last_mouse_state.control = mm->get_control();
- physics_last_mouse_state.meta = mm->get_metakey();
- physics_last_mouse_state.mouse_mask = mm->get_button_mask();
- }
+ if (mm.is_valid()) {
+ pos = mm->get_position();
+ is_mouse = true;
- Ref<InputEventMouseButton> mb = ev;
+ physics_has_last_mousepos = true;
+ physics_last_mousepos = pos;
+ physics_last_mouse_state.alt = mm->get_alt();
+ physics_last_mouse_state.shift = mm->get_shift();
+ physics_last_mouse_state.control = mm->get_control();
+ physics_last_mouse_state.meta = mm->get_metakey();
+ physics_last_mouse_state.mouse_mask = mm->get_button_mask();
+ }
- if (mb.is_valid()) {
- pos = mb->get_position();
- is_mouse = true;
+ Ref<InputEventMouseButton> mb = ev;
- 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();
- physics_last_mouse_state.meta = mb->get_metakey();
+ if (mb.is_valid()) {
+ pos = mb->get_position();
+ is_mouse = true;
- if (mb->is_pressed()) {
- 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));
+ 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();
+ physics_last_mouse_state.meta = mb->get_metakey();
- // 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;
- }
- }
- }
+ if (mb->is_pressed()) {
+ 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));
- Ref<InputEventKey> k = ev;
- if (k.is_valid()) {
- //only for mask
- physics_last_mouse_state.alt = k->get_alt();
- physics_last_mouse_state.shift = k->get_shift();
- physics_last_mouse_state.control = k->get_control();
- physics_last_mouse_state.meta = k->get_metakey();
- continue;
- }
+ // 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;
+ }
+ }
+ }
- Ref<InputEventScreenDrag> sd = ev;
+ Ref<InputEventKey> k = ev;
+ if (k.is_valid()) {
+ //only for mask
+ physics_last_mouse_state.alt = k->get_alt();
+ physics_last_mouse_state.shift = k->get_shift();
+ physics_last_mouse_state.control = k->get_control();
+ physics_last_mouse_state.meta = k->get_metakey();
+ continue;
+ }
- if (sd.is_valid()) {
- pos = sd->get_position();
- }
+ Ref<InputEventScreenDrag> sd = ev;
- Ref<InputEventScreenTouch> st = ev;
+ if (sd.is_valid()) {
+ pos = sd->get_position();
+ }
- if (st.is_valid()) {
- pos = st->get_position();
- }
+ Ref<InputEventScreenTouch> st = ev;
- if (ss2d) {
- //send to 2D
+ if (st.is_valid()) {
+ pos = st->get_position();
+ }
- uint64_t frame = get_tree()->get_frame();
+ if (ss2d) {
+ //send to 2D
- PhysicsDirectSpaceState2D::ShapeResult res[64];
- for (Set<CanvasLayer *>::Element *E = canvas_layers.front(); E; E = E->next()) {
- Transform2D canvas_transform;
- ObjectID canvas_layer_id;
- if (E->get()) {
- // A descendant CanvasLayer
- canvas_transform = E->get()->get_transform();
- canvas_layer_id = E->get()->get_instance_id();
- } else {
- // This Viewport's builtin canvas
- canvas_transform = get_canvas_transform();
- canvas_layer_id = ObjectID();
- }
+ uint64_t frame = get_tree()->get_frame();
+
+ PhysicsDirectSpaceState2D::ShapeResult res[64];
+ for (Set<CanvasLayer *>::Element *E = canvas_layers.front(); E; E = E->next()) {
+ Transform2D canvas_transform;
+ ObjectID canvas_layer_id;
+ if (E->get()) {
+ // A descendant CanvasLayer
+ canvas_transform = E->get()->get_transform();
+ canvas_layer_id = E->get()->get_instance_id();
+ } else {
+ // This Viewport's builtin canvas
+ canvas_transform = get_canvas_transform();
+ canvas_layer_id = ObjectID();
+ }
- Vector2 point = canvas_transform.affine_inverse().xform(pos);
-
- int rc = ss2d->intersect_point_on_canvas(point, canvas_layer_id, res, 64, Set<RID>(), 0xFFFFFFFF, true, true, true);
- for (int i = 0; i < rc; i++) {
- if (res[i].collider_id.is_valid() && res[i].collider) {
- CollisionObject2D *co = Object::cast_to<CollisionObject2D>(res[i].collider);
- if (co) {
- bool send_event = true;
- if (is_mouse) {
- Map<ObjectID, uint64_t>::Element *F = physics_2d_mouseover.find(res[i].collider_id);
-
- if (!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;
- }
- }
- }
-
- if (send_event) {
- co->_input_event(this, ev, res[i].shape);
- }
+ Vector2 point = canvas_transform.affine_inverse().xform(pos);
+
+ int rc = ss2d->intersect_point_on_canvas(point, canvas_layer_id, res, 64, Set<RID>(), 0xFFFFFFFF, true, true, true);
+ for (int i = 0; i < rc; i++) {
+ if (res[i].collider_id.is_valid() && res[i].collider) {
+ CollisionObject2D *co = Object::cast_to<CollisionObject2D>(res[i].collider);
+ if (co && co->can_process()) {
+ bool send_event = true;
+ if (is_mouse) {
+ Map<ObjectID, uint64_t>::Element *F = physics_2d_mouseover.find(res[i].collider_id);
+
+ if (!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;
}
}
}
- }
- 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) {
- CollisionObject2D *co = Object::cast_to<CollisionObject2D>(o);
- if (co) {
- co->_mouse_exit();
- }
- }
- to_erase.push_back(E);
- }
+ if (send_event) {
+ co->_input_event(this, ev, res[i].shape);
}
+ }
+ }
+ }
+ }
- while (to_erase.size()) {
- physics_2d_mouseover.erase(to_erase.front()->get());
- to_erase.pop_front();
+ 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) {
+ CollisionObject2D *co = Object::cast_to<CollisionObject2D>(o);
+ if (co) {
+ co->_mouse_exit();
}
}
+ to_erase.push_back(E);
}
+ }
+
+ while (to_erase.size()) {
+ physics_2d_mouseover.erase(to_erase.front()->get());
+ to_erase.pop_front();
+ }
+ }
+ }
#ifndef _3D_DISABLED
- bool captured = false;
-
- if (physics_object_capture.is_valid()) {
- CollisionObject3D *co = Object::cast_to<CollisionObject3D>(ObjectDB::get_instance(physics_object_capture));
- if (co && camera) {
- _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 = ObjectID();
- }
+ bool captured = false;
+
+ if (physics_object_capture.is_valid()) {
+ CollisionObject3D *co = Object::cast_to<CollisionObject3D>(ObjectDB::get_instance(physics_object_capture));
+ if (co && camera) {
+ _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 = ObjectID();
+ }
- } else {
- physics_object_capture = ObjectID();
+ } else {
+ physics_object_capture = ObjectID();
+ }
+ }
+
+ if (captured) {
+ //none
+ } else if (pos == last_pos) {
+ if (last_id.is_valid()) {
+ if (ObjectDB::get_instance(last_id) && last_object) {
+ //good, exists
+ _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;
+ }
+ }
+ }
+ } else {
+ if (camera) {
+ Vector3 from = camera->project_ray_origin(pos);
+ Vector3 dir = camera->project_ray_normal(pos);
+
+ PhysicsDirectSpaceState3D *space = PhysicsServer3D::get_singleton()->space_get_direct_state(find_world_3d()->get_space());
+ if (space) {
+ bool col = space->intersect_ray(from, from + dir * 10000, result, Set<RID>(), 0xFFFFFFFF, true, true, true);
+ ObjectID new_collider;
+ if (col) {
+ CollisionObject3D *co = Object::cast_to<CollisionObject3D>(result.collider);
+ if (co && co->can_process()) {
+ _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;
+ if (co->get_capture_input_on_drag() && mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
+ physics_object_capture = last_id;
+ }
}
}
- if (captured) {
- //none
- } else if (pos == last_pos) {
- if (last_id.is_valid()) {
- if (ObjectDB::get_instance(last_id) && last_object) {
- //good, exists
- _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;
- }
+ if (is_mouse && new_collider != physics_object_over) {
+ if (physics_object_over.is_valid()) {
+ CollisionObject3D *co = Object::cast_to<CollisionObject3D>(ObjectDB::get_instance(physics_object_over));
+ if (co) {
+ co->_mouse_exit();
}
}
- } else {
- if (camera) {
- Vector3 from = camera->project_ray_origin(pos);
- Vector3 dir = camera->project_ray_normal(pos);
-
- PhysicsDirectSpaceState3D *space = PhysicsServer3D::get_singleton()->space_get_direct_state(find_world_3d()->get_space());
- if (space) {
- bool col = space->intersect_ray(from, from + dir * 10000, result, Set<RID>(), 0xFFFFFFFF, true, true, true);
- ObjectID new_collider;
- if (col) {
- CollisionObject3D *co = Object::cast_to<CollisionObject3D>(result.collider);
- if (co) {
- _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;
- if (co->get_capture_input_on_drag() && mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
- physics_object_capture = last_id;
- }
- }
- }
- if (is_mouse && new_collider != physics_object_over) {
- if (physics_object_over.is_valid()) {
- CollisionObject3D *co = Object::cast_to<CollisionObject3D>(ObjectDB::get_instance(physics_object_over));
- if (co) {
- co->_mouse_exit();
- }
- }
-
- if (new_collider.is_valid()) {
- CollisionObject3D *co = Object::cast_to<CollisionObject3D>(ObjectDB::get_instance(new_collider));
- if (co) {
- co->_mouse_enter();
- }
- }
-
- physics_object_over = new_collider;
- }
+ if (new_collider.is_valid()) {
+ CollisionObject3D *co = Object::cast_to<CollisionObject3D>(ObjectDB::get_instance(new_collider));
+ if (co) {
+ co->_mouse_enter();
}
-
- last_pos = pos;
}
+
+ physics_object_over = new_collider;
}
-#endif
}
- }
-
- } break;
- case NOTIFICATION_WM_MOUSE_EXIT: {
- _drop_physics_mouseover();
-
- // Unlike on loss of focus (NOTIFICATION_WM_WINDOW_FOCUS_OUT), do not
- // drop the gui mouseover here, as a scrollbar may be dragged while the
- // mouse is outside the window (without the window having lost focus).
- // See bug #39634
- } break;
- case NOTIFICATION_WM_WINDOW_FOCUS_OUT: {
- _drop_physics_mouseover();
- if (gui.mouse_focus && !gui.forced_mouse_focus) {
- _drop_mouse_focus();
+ last_pos = pos;
}
- } break;
+ }
+#endif
}
}
@@ -1416,18 +1417,26 @@ Ref<ViewportTexture> Viewport::get_texture() const {
}
void Viewport::set_shadow_atlas_size(int p_size) {
- if (shadow_atlas_size == p_size) {
- return;
- }
-
shadow_atlas_size = p_size;
- RS::get_singleton()->viewport_set_shadow_atlas_size(viewport, p_size);
+ RS::get_singleton()->viewport_set_shadow_atlas_size(viewport, p_size, shadow_atlas_16_bits);
}
int Viewport::get_shadow_atlas_size() const {
return shadow_atlas_size;
}
+void Viewport::set_shadow_atlas_16_bits(bool p_16_bits) {
+ if (shadow_atlas_16_bits == p_16_bits) {
+ return;
+ }
+
+ shadow_atlas_16_bits = p_16_bits;
+ RS::get_singleton()->viewport_set_shadow_atlas_size(viewport, shadow_atlas_size, shadow_atlas_16_bits);
+}
+
+bool Viewport::get_shadow_atlas_16_bits() const {
+ return shadow_atlas_16_bits;
+}
void Viewport::set_shadow_atlas_quadrant_subdiv(int p_quadrant, ShadowAtlasQuadrantSubdiv p_subdiv) {
ERR_FAIL_INDEX(p_quadrant, 4);
ERR_FAIL_INDEX(p_subdiv, SHADOW_ATLAS_QUADRANT_SUBDIV_MAX);
@@ -2574,28 +2583,41 @@ void Viewport::_drop_mouse_focus() {
}
}
-void Viewport::_drop_physics_mouseover() {
+void Viewport::_drop_physics_mouseover(bool p_paused_only) {
physics_has_last_mousepos = false;
- while (physics_2d_mouseover.size()) {
- Object *o = ObjectDB::get_instance(physics_2d_mouseover.front()->key());
+ List<Map<ObjectID, uint64_t>::Element *> to_erase;
+
+ for (Map<ObjectID, uint64_t>::Element *E = physics_2d_mouseover.front(); E; E = E->next()) {
+ Object *o = ObjectDB::get_instance(E->key());
if (o) {
CollisionObject2D *co = Object::cast_to<CollisionObject2D>(o);
- co->_mouse_exit();
+ if (co) {
+ if (p_paused_only && co->can_process()) {
+ continue;
+ }
+ co->_mouse_exit();
+ to_erase.push_back(E);
+ }
}
- physics_2d_mouseover.erase(physics_2d_mouseover.front());
+ }
+
+ while (to_erase.size()) {
+ physics_2d_mouseover.erase(to_erase.front()->get());
+ to_erase.pop_front();
}
#ifndef _3D_DISABLED
if (physics_object_over.is_valid()) {
CollisionObject3D *co = Object::cast_to<CollisionObject3D>(ObjectDB::get_instance(physics_object_over));
if (co) {
- co->_mouse_exit();
+ if (!(p_paused_only && co->can_process())) {
+ co->_mouse_exit();
+ physics_object_over = ObjectID();
+ physics_object_capture = ObjectID();
+ }
}
}
-
- physics_object_over = ObjectID();
- physics_object_capture = ObjectID();
#endif
}
@@ -3481,6 +3503,9 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_shadow_atlas_size", "size"), &Viewport::set_shadow_atlas_size);
ClassDB::bind_method(D_METHOD("get_shadow_atlas_size"), &Viewport::get_shadow_atlas_size);
+ ClassDB::bind_method(D_METHOD("set_shadow_atlas_16_bits", "enable"), &Viewport::set_shadow_atlas_16_bits);
+ ClassDB::bind_method(D_METHOD("get_shadow_atlas_16_bits"), &Viewport::get_shadow_atlas_16_bits);
+
ClassDB::bind_method(D_METHOD("set_snap_controls_to_pixels", "enabled"), &Viewport::set_snap_controls_to_pixels);
ClassDB::bind_method(D_METHOD("is_snap_controls_to_pixels_enabled"), &Viewport::is_snap_controls_to_pixels_enabled);
@@ -3518,6 +3543,8 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_lod_threshold", "pixels"), &Viewport::set_lod_threshold);
ClassDB::bind_method(D_METHOD("get_lod_threshold"), &Viewport::get_lod_threshold);
+ ClassDB::bind_method(D_METHOD("_process_picking"), &Viewport::_process_picking);
+
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "own_world_3d"), "set_use_own_world_3d", "is_using_own_world_3d");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "world_3d", PROPERTY_HINT_RESOURCE_TYPE, "World3D"), "set_world_3d", "get_world_3d");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "world_2d", PROPERTY_HINT_RESOURCE_TYPE, "World2D", 0), "set_world_2d", "get_world_2d");
@@ -3548,6 +3575,7 @@ void Viewport::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "sdf_scale", PROPERTY_HINT_ENUM, "100%,50%,25%"), "set_sdf_scale", "get_sdf_scale");
ADD_GROUP("Shadow Atlas", "shadow_atlas_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_atlas_size"), "set_shadow_atlas_size", "get_shadow_atlas_size");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_atlas_16_bits"), "set_shadow_atlas_16_bits", "get_shadow_atlas_16_bits");
ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_0", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 0);
ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_1", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 1);
ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_2", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 2);
@@ -3644,25 +3672,12 @@ Viewport::Viewport() {
viewport_textures.insert(default_texture.ptr());
default_texture->proxy = RS::get_singleton()->texture_proxy_create(texture_rid);
- audio_listener = false;
//internal_listener_2d = SpatialSound2DServer::get_singleton()->listener_create();
- audio_listener_2d = false;
- transparent_bg = false;
- parent = nullptr;
- listener = nullptr;
- camera = nullptr;
- override_canvas_transform = false;
canvas_layers.insert(nullptr); // This eases picking code (interpreted as the canvas of the Viewport)
- gen_mipmaps = false;
-
//clear=true;
+ set_shadow_atlas_size(shadow_atlas_size);
- physics_object_picking = false;
- physics_has_last_mousepos = false;
- physics_last_mousepos = Vector2(Math_INF, Math_INF);
-
- shadow_atlas_size = 0;
for (int i = 0; i < 4; i++) {
shadow_atlas_quadrant_subdiv[i] = SHADOW_ATLAS_QUADRANT_SUBDIV_MAX;
}
@@ -3679,50 +3694,11 @@ Viewport::Viewport() {
unhandled_input_group = "_vp_unhandled_input" + id;
unhandled_key_input_group = "_vp_unhandled_key_input" + id;
- disable_input = false;
-
// Window tooltip.
- gui.tooltip_timer = -1;
-
gui.tooltip_delay = GLOBAL_DEF("gui/timers/tooltip_delay_sec", 0.5);
ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/tooltip_delay_sec", PropertyInfo(Variant::FLOAT, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); // No negative numbers
- gui.tooltip_control = nullptr;
- gui.tooltip_label = nullptr;
- gui.drag_preview = nullptr;
- gui.drag_attempted = false;
- gui.canvas_sort_index = 0;
- gui.roots_order_dirty = false;
- gui.mouse_focus = nullptr;
- gui.forced_mouse_focus = false;
- gui.last_mouse_focus = nullptr;
- gui.subwindow_focused = nullptr;
- gui.subwindow_drag = SUB_WINDOW_DRAG_DISABLED;
-
- msaa = MSAA_DISABLED;
- screen_space_aa = SCREEN_SPACE_AA_DISABLED;
- debug_draw = DEBUG_DRAW_DISABLED;
-
- snap_controls_to_pixels = true;
- snap_2d_transforms_to_pixel = false;
- snap_2d_vertices_to_pixel = false;
-
- physics_last_mouse_state.alt = false;
- physics_last_mouse_state.control = false;
- physics_last_mouse_state.shift = false;
- physics_last_mouse_state.meta = false;
- physics_last_mouse_state.mouse_mask = 0;
- local_input_handled = false;
- handle_input_locally = true;
-
- size_allocated = false;
-
- default_canvas_item_texture_filter = DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR;
- default_canvas_item_texture_repeat = DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED;
-
- sdf_oversize = SDF_OVERSIZE_120_PERCENT;
- sdf_scale = SDF_SCALE_50_PERCENT;
- set_sdf_oversize(SDF_OVERSIZE_120_PERCENT); //set to server
+ set_sdf_oversize(sdf_oversize); //set to server
}
Viewport::~Viewport() {
@@ -3854,12 +3830,6 @@ void SubViewport::_bind_methods() {
BIND_ENUM_CONSTANT(UPDATE_ALWAYS);
}
-SubViewport::SubViewport() {
- xr = false;
- size_2d_override_stretch = false;
- update_mode = UPDATE_WHEN_VISIBLE;
- clear_mode = CLEAR_MODE_ALWAYS;
-}
+SubViewport::SubViewport() {}
-SubViewport::~SubViewport() {
-}
+SubViewport::~SubViewport() {}
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 7473b6937f..2a0026a561 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -56,7 +56,7 @@ class ViewportTexture : public Texture2D {
NodePath path;
friend class Viewport;
- Viewport *vp;
+ Viewport *vp = nullptr;
mutable RID proxy_ph;
mutable RID proxy;
@@ -186,9 +186,9 @@ public:
private:
friend class ViewportTexture;
- Viewport *parent;
+ Viewport *parent = nullptr;
- Listener3D *listener;
+ Listener3D *listener = nullptr;
Set<Listener3D *> listeners;
struct CameraOverrideData {
@@ -197,11 +197,11 @@ private:
PROJECTION_PERSPECTIVE,
PROJECTION_ORTHOGONAL
};
- Projection projection;
- float fov;
- float size;
- float z_near;
- float z_far;
+ Projection projection = Projection::PROJECTION_PERSPECTIVE;
+ float fov = 0.0;
+ float size = 0.0;
+ float z_near = 0.0;
+ float z_far = 0.0;
RID rid;
operator bool() const {
@@ -209,7 +209,7 @@ private:
}
} camera_override;
- Camera3D *camera;
+ Camera3D *camera = nullptr;
Set<Camera3D *> cameras;
Set<CanvasLayer *> canvas_layers;
@@ -217,13 +217,13 @@ private:
RID current_canvas;
RID subwindow_canvas;
- bool audio_listener;
+ bool audio_listener = false;
RID internal_listener;
- bool audio_listener_2d;
+ bool audio_listener_2d = false;
RID internal_listener_2d;
- bool override_canvas_transform;
+ bool override_canvas_transform = false;
Transform2D canvas_transform_override;
Transform2D canvas_transform;
@@ -232,7 +232,7 @@ private:
Size2i size;
Size2i size_2d_override;
- bool size_allocated;
+ bool size_allocated = false;
RID contact_2d_debug;
RID contact_3d_debug_multimesh;
@@ -240,36 +240,36 @@ private:
Rect2 last_vp_rect;
- bool transparent_bg;
+ bool transparent_bg = false;
bool filter;
- bool gen_mipmaps;
+ bool gen_mipmaps = false;
- bool snap_controls_to_pixels;
- bool snap_2d_transforms_to_pixel;
- bool snap_2d_vertices_to_pixel;
+ bool snap_controls_to_pixels = true;
+ bool snap_2d_transforms_to_pixel = false;
+ bool snap_2d_vertices_to_pixel = false;
- bool physics_object_picking;
+ bool physics_object_picking = false;
List<Ref<InputEvent>> physics_picking_events;
ObjectID physics_object_capture;
ObjectID physics_object_over;
Transform physics_last_object_transform;
Transform physics_last_camera_transform;
ObjectID physics_last_id;
- bool physics_has_last_mousepos;
- Vector2 physics_last_mousepos;
+ bool physics_has_last_mousepos = false;
+ Vector2 physics_last_mousepos = Vector2(Math_INF, Math_INF);
struct {
- bool alt;
- bool control;
- bool shift;
- bool meta;
- int mouse_mask;
+ bool alt = false;
+ bool control = false;
+ bool shift = false;
+ bool meta = false;
+ int mouse_mask = 0;
} physics_last_mouse_state;
void _collision_object_input_event(CollisionObject3D *p_object, Camera3D *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;
+ bool handle_input_locally = true;
+ bool local_input_handled = false;
Map<ObjectID, uint64_t> physics_2d_mouseover;
@@ -294,21 +294,22 @@ private:
RID texture_rid;
- DebugDraw debug_draw;
+ DebugDraw debug_draw = DEBUG_DRAW_DISABLED;
- int shadow_atlas_size;
+ int shadow_atlas_size = 2048;
+ bool shadow_atlas_16_bits = true;
ShadowAtlasQuadrantSubdiv shadow_atlas_quadrant_subdiv[4];
- MSAA msaa;
- ScreenSpaceAA screen_space_aa;
+ MSAA msaa = MSAA_DISABLED;
+ ScreenSpaceAA screen_space_aa = SCREEN_SPACE_AA_DISABLED;
bool use_debanding = false;
float lod_threshold = 1.0;
Ref<ViewportTexture> default_texture;
Set<ViewportTexture *> viewport_textures;
- SDFOversize sdf_oversize;
- SDFScale sdf_scale;
+ SDFOversize sdf_oversize = SDF_OVERSIZE_120_PERCENT;
+ SDFScale sdf_scale = SDF_SCALE_50_PERCENT;
enum SubWindowDrag {
SUB_WINDOW_DRAG_DISABLED,
@@ -331,60 +332,58 @@ private:
};
struct SubWindow {
- Window *window;
+ Window *window = nullptr;
RID canvas_item;
};
struct GUI {
// info used when this is a window
- bool forced_mouse_focus; //used for menu buttons
- bool key_event_accepted;
- Control *mouse_focus;
- Control *last_mouse_focus;
- Control *mouse_click_grabber;
- int mouse_focus_mask;
- Control *key_focus;
- Control *mouse_over;
- Control *drag_mouse_over;
+ bool forced_mouse_focus = false; //used for menu buttons
+ bool key_event_accepted = false;
+ Control *mouse_focus = nullptr;
+ Control *last_mouse_focus = nullptr;
+ Control *mouse_click_grabber = nullptr;
+ int mouse_focus_mask = 0;
+ Control *key_focus = nullptr;
+ Control *mouse_over = nullptr;
+ Control *drag_mouse_over = nullptr;
Vector2 drag_mouse_over_pos;
- Control *tooltip_control;
- Window *tooltip_popup;
- Label *tooltip_label;
+ Control *tooltip_control = nullptr;
+ Window *tooltip_popup = nullptr;
+ Label *tooltip_label = nullptr;
Point2 tooltip_pos;
Point2 last_mouse_pos;
Point2 drag_accum;
- bool drag_attempted;
+ bool drag_attempted = false;
Variant drag_data;
- Control *drag_preview;
- float tooltip_timer;
- float tooltip_delay;
+ Control *drag_preview = nullptr;
+ float tooltip_timer = -1.0;
+ float tooltip_delay = 0.0;
Transform2D focus_inv_xform;
- bool roots_order_dirty;
+ bool roots_order_dirty = false;
List<Control *> roots;
- int canvas_sort_index; //for sorting items with canvas as root
- bool dragging;
- bool embed_subwindows_hint;
- bool embedding_subwindows;
+ int canvas_sort_index = 0; //for sorting items with canvas as root
+ bool dragging = false;
+ bool embed_subwindows_hint = false;
+ bool embedding_subwindows = false;
- Window *subwindow_focused;
- SubWindowDrag subwindow_drag;
+ Window *subwindow_focused = nullptr;
+ SubWindowDrag subwindow_drag = SUB_WINDOW_DRAG_DISABLED;
Vector2 subwindow_drag_from;
Vector2 subwindow_drag_pos;
Rect2i subwindow_drag_close_rect;
- bool subwindow_drag_close_inside;
+ bool subwindow_drag_close_inside = false;
SubWindowResize subwindow_resize_mode;
Rect2i subwindow_resize_from_rect;
Vector<SubWindow> sub_windows;
-
- GUI();
} gui;
- DefaultCanvasItemTextureFilter default_canvas_item_texture_filter;
- DefaultCanvasItemTextureRepeat default_canvas_item_texture_repeat;
+ DefaultCanvasItemTextureFilter default_canvas_item_texture_filter = DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR;
+ DefaultCanvasItemTextureRepeat default_canvas_item_texture_repeat = DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED;
- bool disable_input;
+ bool disable_input = false;
void _gui_call_input(Control *p_control, const Ref<InputEvent> &p_input);
void _gui_call_notification(Control *p_control, int p_what);
@@ -449,7 +448,7 @@ private:
void _canvas_layer_remove(CanvasLayer *p_canvas_layer);
void _drop_mouse_focus();
- void _drop_physics_mouseover();
+ void _drop_physics_mouseover(bool p_paused_only = false);
void _update_canvas_items(Node *p_node);
@@ -478,6 +477,7 @@ protected:
bool _is_size_allocated() const;
void _notification(int p_what);
+ void _process_picking();
static void _bind_methods();
virtual void _validate_property(PropertyInfo &property) const override;
@@ -537,6 +537,9 @@ public:
void set_shadow_atlas_size(int p_size);
int get_shadow_atlas_size() const;
+ void set_shadow_atlas_16_bits(bool p_16_bits);
+ bool get_shadow_atlas_16_bits() const;
+
void set_shadow_atlas_quadrant_subdiv(int p_quadrant, ShadowAtlasQuadrantSubdiv p_subdiv);
ShadowAtlasQuadrantSubdiv get_shadow_atlas_quadrant_subdiv(int p_quadrant) const;
@@ -646,10 +649,10 @@ public:
};
private:
- UpdateMode update_mode;
- ClearMode clear_mode;
- bool xr;
- bool size_2d_override_stretch;
+ UpdateMode update_mode = UPDATE_WHEN_VISIBLE;
+ ClearMode clear_mode = CLEAR_MODE_ALWAYS;
+ bool xr = false;
+ bool size_2d_override_stretch = false;
protected:
static void _bind_methods();
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 0a541a2d07..fc9bbeab94 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -1283,14 +1283,14 @@ bool Window::is_layout_rtl() const {
if (parent) {
return parent->is_layout_rtl();
} else {
- if (GLOBAL_GET("display/window/force_right_to_left_layout_direction")) {
+ if (GLOBAL_GET("internationalization/rendering/force_right_to_left_layout_direction")) {
return true;
}
String locale = TranslationServer::get_singleton()->get_tool_locale();
return TS->is_locale_right_to_left(locale);
}
} else if (layout_dir == LAYOUT_DIRECTION_LOCALE) {
- if (GLOBAL_GET("display/window/force_right_to_left_layout_direction")) {
+ if (GLOBAL_GET("internationalization/rendering/force_right_to_left_layout_direction")) {
return true;
}
String locale = TranslationServer::get_singleton()->get_tool_locale();
@@ -1466,11 +1466,6 @@ void Window::_bind_methods() {
}
Window::Window() {
- for (int i = 0; i < FLAG_MAX; i++) {
- flags[i] = false;
- }
- content_scale_mode = CONTENT_SCALE_MODE_DISABLED;
- content_scale_aspect = CONTENT_SCALE_ASPECT_IGNORE;
RS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), RS::VIEWPORT_UPDATE_DISABLED);
}
diff --git a/scene/main/window.h b/scene/main/window.h
index 2ffeff03ff..38846ed00e 100644
--- a/scene/main/window.h
+++ b/scene/main/window.h
@@ -90,7 +90,7 @@ private:
mutable Size2i min_size;
mutable Size2i max_size;
mutable Mode mode = MODE_WINDOWED;
- mutable bool flags[FLAG_MAX];
+ mutable bool flags[FLAG_MAX] = {};
bool visible = true;
bool focused = false;
@@ -106,8 +106,8 @@ private:
void _update_child_controls();
Size2i content_scale_size;
- ContentScaleMode content_scale_mode;
- ContentScaleAspect content_scale_aspect;
+ ContentScaleMode content_scale_mode = CONTENT_SCALE_MODE_DISABLED;
+ ContentScaleAspect content_scale_aspect = CONTENT_SCALE_ASPECT_IGNORE;
void _make_window();
void _clear_window();
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index c349d090d8..51d4643883 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -557,19 +557,14 @@ void register_scene_types() {
ClassDB::register_class<VisualShaderNodeDeterminant>();
ClassDB::register_class<VisualShaderNodeScalarDerivativeFunc>();
ClassDB::register_class<VisualShaderNodeVectorDerivativeFunc>();
- ClassDB::register_class<VisualShaderNodeScalarClamp>();
- ClassDB::register_class<VisualShaderNodeVectorClamp>();
+ ClassDB::register_class<VisualShaderNodeClamp>();
ClassDB::register_class<VisualShaderNodeFaceForward>();
ClassDB::register_class<VisualShaderNodeOuterProduct>();
- ClassDB::register_class<VisualShaderNodeVectorScalarStep>();
- ClassDB::register_class<VisualShaderNodeScalarSmoothStep>();
- ClassDB::register_class<VisualShaderNodeVectorSmoothStep>();
- ClassDB::register_class<VisualShaderNodeVectorScalarSmoothStep>();
+ ClassDB::register_class<VisualShaderNodeSmoothStep>();
+ ClassDB::register_class<VisualShaderNodeStep>();
ClassDB::register_class<VisualShaderNodeVectorDistance>();
ClassDB::register_class<VisualShaderNodeVectorRefract>();
- ClassDB::register_class<VisualShaderNodeScalarInterp>();
- ClassDB::register_class<VisualShaderNodeVectorInterp>();
- ClassDB::register_class<VisualShaderNodeVectorScalarMix>();
+ ClassDB::register_class<VisualShaderNodeMix>();
ClassDB::register_class<VisualShaderNodeVectorCompose>();
ClassDB::register_class<VisualShaderNodeTransformCompose>();
ClassDB::register_class<VisualShaderNodeVectorDecompose>();
@@ -595,7 +590,6 @@ void register_scene_types() {
ClassDB::register_class<VisualShaderNodeCubemapUniform>();
ClassDB::register_class<VisualShaderNodeIf>();
ClassDB::register_class<VisualShaderNodeSwitch>();
- ClassDB::register_class<VisualShaderNodeScalarSwitch>();
ClassDB::register_class<VisualShaderNodeFresnel>();
ClassDB::register_class<VisualShaderNodeExpression>();
ClassDB::register_class<VisualShaderNodeGlobalExpression>();
@@ -935,6 +929,16 @@ void register_scene_types() {
ClassDB::add_compatibility_class("VisualShaderNodeScalarFunc", "VisualShaderNodeFloatFunc");
ClassDB::add_compatibility_class("VisualShaderNodeScalarOp", "VisualShaderNodeFloatOp");
ClassDB::add_compatibility_class("VisualShaderNodeScalarUniform", "VisualShaderNodeFloatUniform");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarClamp", "VisualShaderNodeClamp");
+ ClassDB::add_compatibility_class("VisualShaderNodeVectorClamp", "VisualShaderNodeClamp");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarInterp", "VisualShaderNodeMix");
+ ClassDB::add_compatibility_class("VisualShaderNodeVectorInterp", "VisualShaderNodeMix");
+ ClassDB::add_compatibility_class("VisualShaderNodeVectorScalarMix", "VisualShaderNodeMix");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarSmoothStep", "VisualShaderNodeSmoothStep");
+ ClassDB::add_compatibility_class("VisualShaderNodeVectorSmoothStep", "VisualShaderNodeSmoothStep");
+ ClassDB::add_compatibility_class("VisualShaderNodeVectorScalarSmoothStep", "VisualShaderNodeSmoothStep");
+ ClassDB::add_compatibility_class("VisualShaderNodeVectorScalarStep", "VisualShaderNodeStep");
+ ClassDB::add_compatibility_class("VisualShaderNodeScalarSwitch", "VisualShaderNodeSwitch");
ClassDB::add_compatibility_class("World", "World3D");
ClassDB::add_compatibility_class("StreamTexture", "StreamTexture2D");
ClassDB::add_compatibility_class("Light2D", "PointLight2D");
@@ -944,10 +948,10 @@ void register_scene_types() {
OS::get_singleton()->yield(); //may take time to init
for (int i = 0; i < 20; i++) {
- GLOBAL_DEF(vformat("layer_names/2d_render/layer_%d", i), "");
- GLOBAL_DEF(vformat("layer_names/2d_physics/layer_%d", i), "");
- GLOBAL_DEF(vformat("layer_names/3d_render/layer_%d", i), "");
- GLOBAL_DEF(vformat("layer_names/3d_physics/layer_%d", i), "");
+ GLOBAL_DEF_BASIC(vformat("layer_names/2d_render/layer_%d", i), "");
+ GLOBAL_DEF_BASIC(vformat("layer_names/2d_physics/layer_%d", i), "");
+ GLOBAL_DEF_BASIC(vformat("layer_names/3d_render/layer_%d", i), "");
+ GLOBAL_DEF_BASIC(vformat("layer_names/3d_physics/layer_%d", i), "");
}
bool default_theme_hidpi = GLOBAL_DEF("gui/theme/use_hidpi", false);
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 796fe1d106..cc1dafd0db 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -580,6 +580,10 @@ void Animation::_get_property_list(List<PropertyInfo> *p_list) const {
}
}
+void Animation::reset_state() {
+ clear();
+}
+
int Animation::add_track(TrackType p_type, int p_at_pos) {
if (p_at_pos < 0 || p_at_pos >= tracks.size()) {
p_at_pos = tracks.size();
@@ -1604,7 +1608,7 @@ T Animation::_interpolate(const Vector<TKey<T>> &p_keys, float p_time, Interpola
bool result = true;
int next = 0;
- float c = 0;
+ float c = 0.0;
// prepare for all cases of interpolation
if (loop && p_loop_wrap) {
@@ -2278,8 +2282,8 @@ float Animation::bezier_track_interpolate(int p_track, float p_time) const {
int iterations = 10;
float duration = bt->values[idx + 1].time - bt->values[idx].time; // time duration between our two keyframes
- float low = 0; // 0% of the current animation segment
- float high = 1; // 100% of the current animation segment
+ float low = 0.0; // 0% of the current animation segment
+ float high = 1.0; // 100% of the current animation segment
float middle;
Vector2 start(0, bt->values[idx].value.value);
@@ -2836,7 +2840,7 @@ bool Animation::_transform_track_optimize_key(const TKey<TransformKey> &t0, cons
erase = true;
} else {
erase = true;
- real_t lt = -1;
+ real_t lt = -1.0;
for (int j = 0; j < 3; j++) {
//search for t on first, one must be it
if (t[j] != -1) {
@@ -2919,11 +2923,7 @@ void Animation::optimize(float p_allowed_linear_err, float p_allowed_angular_err
}
}
-Animation::Animation() {
- step = 0.1;
- loop = false;
- length = 1;
-}
+Animation::Animation() {}
Animation::~Animation() {
for (int i = 0; i < tracks.size(); i++) {
diff --git a/scene/resources/animation.h b/scene/resources/animation.h
index fa374e6ad2..fd22cc445c 100644
--- a/scene/resources/animation.h
+++ b/scene/resources/animation.h
@@ -65,28 +65,19 @@ public:
private:
struct Track {
- TrackType type;
- InterpolationType interpolation;
- bool loop_wrap;
+ TrackType type = TrackType::TYPE_ANIMATION;
+ InterpolationType interpolation = INTERPOLATION_LINEAR;
+ bool loop_wrap = true;
NodePath path; // path to something
- bool imported;
- bool enabled;
- Track() {
- interpolation = INTERPOLATION_LINEAR;
- imported = false;
- loop_wrap = true;
- enabled = true;
- }
+ bool imported = false;
+ bool enabled = false;
+ Track() {}
virtual ~Track() {}
};
struct Key {
- float transition;
- float time; // time in secs
- Key() {
- transition = 1;
- time = 0;
- }
+ float transition = 1.0;
+ float time = 0.0; // time in secs
};
// transform key holds either Vector3 or Quaternion
@@ -112,13 +103,12 @@ private:
/* PROPERTY VALUE TRACK */
struct ValueTrack : public Track {
- UpdateMode update_mode;
- bool update_on_seek;
+ UpdateMode update_mode = UPDATE_CONTINUOUS;
+ bool update_on_seek = false;
Vector<TKey<Variant>> values;
ValueTrack() {
type = TYPE_VALUE;
- update_mode = UPDATE_CONTINUOUS;
}
};
@@ -139,7 +129,7 @@ private:
struct BezierKey {
Vector2 in_handle; //relative (x always <0)
Vector2 out_handle; //relative (x always >0)
- float value;
+ float value = 0.0;
};
struct BezierTrack : public Track {
@@ -154,11 +144,9 @@ private:
struct AudioKey {
RES stream;
- float start_offset; //offset from start
- float end_offset; //offset from end, if 0 then full length or infinite
+ float start_offset = 0.0; //offset from start
+ float end_offset = 0.0; //offset from end, if 0 then full length or infinite
AudioKey() {
- start_offset = 0;
- end_offset = 0;
}
};
@@ -217,9 +205,9 @@ private:
_FORCE_INLINE_ void _value_track_get_key_indices_in_range(const ValueTrack *vt, float from_time, float to_time, List<int> *p_indices) const;
_FORCE_INLINE_ void _method_track_get_key_indices_in_range(const MethodTrack *mt, float from_time, float to_time, List<int> *p_indices) const;
- float length;
- float step;
- bool loop;
+ float length = 1.0;
+ float step = 0.1;
+ bool loop = false;
// bind helpers
private:
@@ -264,6 +252,8 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ virtual void reset_state() override;
+
static void _bind_methods();
public:
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index 8fdb004e65..06a91fb2f8 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -403,11 +403,7 @@ void AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, in
}
}
-AudioStreamPlaybackSample::AudioStreamPlaybackSample() {
- active = false;
- offset = 0;
- sign = 1;
-}
+AudioStreamPlaybackSample::AudioStreamPlaybackSample() {}
/////////////////////
@@ -651,16 +647,7 @@ void AudioStreamSample::_bind_methods() {
BIND_ENUM_CONSTANT(LOOP_BACKWARD);
}
-AudioStreamSample::AudioStreamSample() {
- format = FORMAT_8_BITS;
- loop_mode = LOOP_DISABLED;
- stereo = false;
- loop_begin = 0;
- loop_end = 0;
- mix_rate = 44100;
- data = nullptr;
- data_bytes = 0;
-}
+AudioStreamSample::AudioStreamSample() {}
AudioStreamSample::~AudioStreamSample() {
if (data) {
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h
index ba475c0888..70b8ba79ad 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_sample.h
@@ -44,19 +44,19 @@ class AudioStreamPlaybackSample : public AudioStreamPlayback {
};
struct IMA_ADPCM_State {
- int16_t step_index;
- int32_t predictor;
+ int16_t step_index = 0;
+ int32_t predictor = 0;
/* values at loop point */
- int16_t loop_step_index;
- int32_t loop_predictor;
- int32_t last_nibble;
- int32_t loop_pos;
- int32_t window_ofs;
+ int16_t loop_step_index = 0;
+ int32_t loop_predictor = 0;
+ int32_t last_nibble = 0;
+ int32_t loop_pos = 0;
+ int32_t window_ofs = 0;
} ima_adpcm[2];
- int64_t offset;
- int sign;
- bool active;
+ int64_t offset = 0;
+ int sign = 1;
+ bool active = false;
friend class AudioStreamSample;
Ref<AudioStreamSample> base;
@@ -103,14 +103,14 @@ private:
DATA_PAD = 16 //padding for interpolation
};
- Format format;
- LoopMode loop_mode;
- bool stereo;
- int loop_begin;
- int loop_end;
- int mix_rate;
- void *data;
- uint32_t data_bytes;
+ Format format = FORMAT_8_BITS;
+ LoopMode loop_mode = LOOP_DISABLED;
+ bool stereo = false;
+ int loop_begin = 0;
+ int loop_end = 0;
+ int mix_rate = 44100;
+ void *data = nullptr;
+ uint32_t data_bytes = 0;
protected:
static void _bind_methods();
diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp
index dfb7a1fdfb..8ffc7b4b4c 100644
--- a/scene/resources/bit_map.cpp
+++ b/scene/resources/bit_map.cpp
@@ -346,7 +346,7 @@ static Vector<Vector2> rdp(const Vector<Vector2> &v, float optimization) {
}
int index = -1;
- float dist = 0;
+ float dist = 0.0;
//not looping first and last point
for (size_t i = 1, size = v.size(); i < size - 1; ++i) {
float cdist = perpendicular_distance(v[i], v[0], v[v.size() - 1]);
@@ -406,8 +406,8 @@ static Vector<Vector2> reduce(const Vector<Vector2> &points, const Rect2i &rect,
struct FillBitsStackEntry {
Point2i pos;
- int i;
- int j;
+ int i = 0;
+ int j = 0;
};
static void fill_bits(const BitMap *p_src, Ref<BitMap> &p_map, const Point2i &p_pos, const Rect2i &rect) {
@@ -677,9 +677,6 @@ void BitMap::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data");
}
-BitMap::BitMap() {
- width = 0;
- height = 0;
-}
+BitMap::BitMap() {}
//////////////////////////////////////
diff --git a/scene/resources/bit_map.h b/scene/resources/bit_map.h
index 7414265cee..68fd0b999a 100644
--- a/scene/resources/bit_map.h
+++ b/scene/resources/bit_map.h
@@ -40,8 +40,8 @@ class BitMap : public Resource {
OBJ_SAVE_TYPE(BitMap);
Vector<uint8_t> bitmask;
- int width;
- int height;
+ int width = 0;
+ int height = 0;
Vector<Vector2> _march_square(const Rect2i &rect, const Point2i &start) const;
diff --git a/scene/resources/box_shape_3d.cpp b/scene/resources/box_shape_3d.cpp
index fadbf21e43..6e7adc0bd7 100644
--- a/scene/resources/box_shape_3d.cpp
+++ b/scene/resources/box_shape_3d.cpp
@@ -60,7 +60,6 @@ void BoxShape3D::set_size(const Vector3 &p_size) {
size = p_size;
_update_shape();
notify_change_to_owners();
- _change_notify("size");
}
Vector3 BoxShape3D::get_size() const {
diff --git a/scene/resources/camera_effects.cpp b/scene/resources/camera_effects.cpp
index 695b14939f..4038338e1e 100644
--- a/scene/resources/camera_effects.cpp
+++ b/scene/resources/camera_effects.cpp
@@ -41,7 +41,7 @@ RID CameraEffects::get_rid() const {
void CameraEffects::set_dof_blur_far_enabled(bool p_enabled) {
dof_blur_far_enabled = p_enabled;
_update_dof_blur();
- _change_notify();
+ notify_property_list_changed();
}
bool CameraEffects::is_dof_blur_far_enabled() const {
@@ -69,7 +69,7 @@ float CameraEffects::get_dof_blur_far_transition() const {
void CameraEffects::set_dof_blur_near_enabled(bool p_enabled) {
dof_blur_near_enabled = p_enabled;
_update_dof_blur();
- _change_notify();
+ notify_property_list_changed();
}
bool CameraEffects::is_dof_blur_near_enabled() const {
diff --git a/scene/resources/camera_effects.h b/scene/resources/camera_effects.h
index cf12b6d3c0..28aa6b8660 100644
--- a/scene/resources/camera_effects.h
+++ b/scene/resources/camera_effects.h
@@ -42,12 +42,12 @@ private:
// DOF blur
bool dof_blur_far_enabled = false;
- float dof_blur_far_distance = 10;
- float dof_blur_far_transition = 5;
+ float dof_blur_far_distance = 10.0;
+ float dof_blur_far_transition = 5.0;
bool dof_blur_near_enabled = false;
- float dof_blur_near_distance = 2;
- float dof_blur_near_transition = 1;
+ float dof_blur_near_distance = 2.0;
+ float dof_blur_near_transition = 1.0;
float dof_blur_amount = 0.1;
void _update_dof_blur();
diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp
index 6041f4a8b0..3725d855f4 100644
--- a/scene/resources/capsule_shape_2d.cpp
+++ b/scene/resources/capsule_shape_2d.cpp
@@ -36,12 +36,13 @@
Vector<Vector2> CapsuleShape2D::_get_points() const {
Vector<Vector2> points;
+ const real_t turn_step = Math_TAU / 24.0;
for (int i = 0; i < 24; i++) {
Vector2 ofs = Vector2(0, (i > 6 && i <= 18) ? -get_height() * 0.5 : get_height() * 0.5);
- points.push_back(Vector2(Math::sin(i * Math_PI * 2 / 24.0), Math::cos(i * Math_PI * 2 / 24.0)) * get_radius() + ofs);
+ points.push_back(Vector2(Math::sin(i * turn_step), Math::cos(i * turn_step)) * get_radius() + ofs);
if (i == 6 || i == 18) {
- points.push_back(Vector2(Math::sin(i * Math_PI * 2 / 24.0), Math::cos(i * Math_PI * 2 / 24.0)) * get_radius() - ofs);
+ points.push_back(Vector2(Math::sin(i * turn_step), Math::cos(i * turn_step)) * get_radius() - ofs);
}
}
@@ -111,7 +112,5 @@ void CapsuleShape2D::_bind_methods() {
CapsuleShape2D::CapsuleShape2D() :
Shape2D(PhysicsServer2D::get_singleton()->capsule_shape_create()) {
- radius = 10;
- height = 20;
_update_shape();
}
diff --git a/scene/resources/capsule_shape_2d.h b/scene/resources/capsule_shape_2d.h
index 8c8c1b259b..439b67e8c3 100644
--- a/scene/resources/capsule_shape_2d.h
+++ b/scene/resources/capsule_shape_2d.h
@@ -36,8 +36,8 @@
class CapsuleShape2D : public Shape2D {
GDCLASS(CapsuleShape2D, Shape2D);
- real_t height;
- real_t radius;
+ real_t height = 20.0;
+ real_t radius = 10.0;
void _update_shape();
Vector<Vector2> _get_points() const;
diff --git a/scene/resources/capsule_shape_3d.cpp b/scene/resources/capsule_shape_3d.cpp
index a0b454a00f..226fe1ecd2 100644
--- a/scene/resources/capsule_shape_3d.cpp
+++ b/scene/resources/capsule_shape_3d.cpp
@@ -82,7 +82,6 @@ void CapsuleShape3D::set_radius(float p_radius) {
radius = p_radius;
_update_shape();
notify_change_to_owners();
- _change_notify("radius");
}
float CapsuleShape3D::get_radius() const {
@@ -93,7 +92,6 @@ void CapsuleShape3D::set_height(float p_height) {
height = p_height;
_update_shape();
notify_change_to_owners();
- _change_notify("height");
}
float CapsuleShape3D::get_height() const {
@@ -112,7 +110,5 @@ void CapsuleShape3D::_bind_methods() {
CapsuleShape3D::CapsuleShape3D() :
Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_CAPSULE)) {
- radius = 1.0;
- height = 1.0;
_update_shape();
}
diff --git a/scene/resources/capsule_shape_3d.h b/scene/resources/capsule_shape_3d.h
index b5b8912445..25645ecf9d 100644
--- a/scene/resources/capsule_shape_3d.h
+++ b/scene/resources/capsule_shape_3d.h
@@ -35,8 +35,8 @@
class CapsuleShape3D : public Shape3D {
GDCLASS(CapsuleShape3D, Shape3D);
- float radius;
- float height;
+ float radius = 1.0;
+ float height = 1.0;
protected:
static void _bind_methods();
diff --git a/scene/resources/circle_shape_2d.cpp b/scene/resources/circle_shape_2d.cpp
index ba49587d9d..735bf47482 100644
--- a/scene/resources/circle_shape_2d.cpp
+++ b/scene/resources/circle_shape_2d.cpp
@@ -71,8 +71,9 @@ real_t CircleShape2D::get_enclosing_radius() const {
void CircleShape2D::draw(const RID &p_to_rid, const Color &p_color) {
Vector<Vector2> points;
+ const real_t turn_step = Math_TAU / 24.0;
for (int i = 0; i < 24; i++) {
- points.push_back(Vector2(Math::cos(i * Math_PI * 2 / 24.0), Math::sin(i * Math_PI * 2 / 24.0)) * get_radius());
+ points.push_back(Vector2(Math::cos(i * turn_step), Math::sin(i * turn_step)) * get_radius());
}
Vector<Color> col;
@@ -82,6 +83,5 @@ void CircleShape2D::draw(const RID &p_to_rid, const Color &p_color) {
CircleShape2D::CircleShape2D() :
Shape2D(PhysicsServer2D::get_singleton()->circle_shape_create()) {
- radius = 10;
_update_shape();
}
diff --git a/scene/resources/circle_shape_2d.h b/scene/resources/circle_shape_2d.h
index a066b773ef..333f299236 100644
--- a/scene/resources/circle_shape_2d.h
+++ b/scene/resources/circle_shape_2d.h
@@ -36,7 +36,7 @@
class CircleShape2D : public Shape2D {
GDCLASS(CircleShape2D, Shape2D);
- real_t radius;
+ real_t radius = 10.0;
void _update_shape();
protected:
diff --git a/scene/resources/concave_polygon_shape_2d.cpp b/scene/resources/concave_polygon_shape_2d.cpp
index 3d6df3bb9c..0c767c8a52 100644
--- a/scene/resources/concave_polygon_shape_2d.cpp
+++ b/scene/resources/concave_polygon_shape_2d.cpp
@@ -98,7 +98,7 @@ Rect2 ConcavePolygonShape2D::get_rect() const {
real_t ConcavePolygonShape2D::get_enclosing_radius() const {
Vector<Vector2> data = get_segments();
const Vector2 *read = data.ptr();
- real_t r = 0;
+ real_t r = 0.0;
for (int i(0); i < data.size(); i++) {
r = MAX(read[i].length_squared(), r);
}
diff --git a/scene/resources/concave_polygon_shape_3d.cpp b/scene/resources/concave_polygon_shape_3d.cpp
index 358c99ad09..f067695d7d 100644
--- a/scene/resources/concave_polygon_shape_3d.cpp
+++ b/scene/resources/concave_polygon_shape_3d.cpp
@@ -63,7 +63,7 @@ Vector<Vector3> ConcavePolygonShape3D::get_debug_mesh_lines() const {
real_t ConcavePolygonShape3D::get_enclosing_radius() const {
Vector<Vector3> data = get_faces();
const Vector3 *read = data.ptr();
- real_t r = 0;
+ real_t r = 0.0;
for (int i(0); i < data.size(); i++) {
r = MAX(read[i].length_squared(), r);
}
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp
index 656e064356..b4b200a7ff 100644
--- a/scene/resources/convex_polygon_shape_2d.cpp
+++ b/scene/resources/convex_polygon_shape_2d.cpp
@@ -91,7 +91,7 @@ Rect2 ConvexPolygonShape2D::get_rect() const {
}
real_t ConvexPolygonShape2D::get_enclosing_radius() const {
- real_t r = 0;
+ real_t r = 0.0;
for (int i(0); i < get_points().size(); i++) {
r = MAX(get_points()[i].length_squared(), r);
}
diff --git a/scene/resources/convex_polygon_shape_3d.cpp b/scene/resources/convex_polygon_shape_3d.cpp
index 770d547231..9e030bc077 100644
--- a/scene/resources/convex_polygon_shape_3d.cpp
+++ b/scene/resources/convex_polygon_shape_3d.cpp
@@ -56,7 +56,7 @@ Vector<Vector3> ConvexPolygonShape3D::get_debug_mesh_lines() const {
real_t ConvexPolygonShape3D::get_enclosing_radius() const {
Vector<Vector3> data = get_points();
const Vector3 *read = data.ptr();
- real_t r = 0;
+ real_t r = 0.0;
for (int i(0); i < data.size(); i++) {
r = MAX(read[i].length_squared(), r);
}
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 123c77a036..bc479e557a 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -47,11 +47,6 @@ static _FORCE_INLINE_ T _bezier_interp(real_t t, T start, T control_1, T control
const char *Curve::SIGNAL_RANGE_CHANGED = "range_changed";
Curve::Curve() {
- _bake_resolution = 100;
- _baked_cache_dirty = false;
- _min_value = 0;
- _max_value = 1;
- _minmax_set_once = 0b00;
}
int Curve::add_point(Vector2 p_pos, real_t left_tangent, real_t right_tangent, TangentMode left_mode, TangentMode right_mode) {
@@ -683,7 +678,7 @@ void Curve2D::_bake() const {
for (int i = 0; i < points.size() - 1; i++) {
float step = 0.1; // at least 10 substeps ought to be enough?
- float p = 0;
+ float p = 0.0;
while (p < 1.0) {
float np = p + step;
@@ -993,12 +988,9 @@ void Curve2D::_bind_methods() {
}
Curve2D::Curve2D() {
- baked_cache_dirty = false;
- baked_max_ofs = 0;
/* add_point(Vector2(-1,0,0));
add_point(Vector2(0,2,0));
add_point(Vector2(0,3,5));*/
- bake_interval = 5;
}
/***********************************************************************************/
@@ -1178,7 +1170,7 @@ void Curve3D::_bake() const {
for (int i = 0; i < points.size() - 1; i++) {
float step = 0.1; // at least 10 substeps ought to be enough?
- float p = 0;
+ float p = 0.0;
while (p < 1.0) {
float np = p + step;
@@ -1669,11 +1661,7 @@ void Curve3D::_bind_methods() {
}
Curve3D::Curve3D() {
- baked_cache_dirty = false;
- baked_max_ofs = 0;
/* add_point(Vector3(-1,0,0));
add_point(Vector3(0,2,0));
add_point(Vector3(0,3,5));*/
- bake_interval = 0.2;
- up_vector_enabled = true;
}
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index f33f3c5abe..402c893cd8 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -51,21 +51,17 @@ public:
struct Point {
Vector2 pos;
- real_t left_tangent;
- real_t right_tangent;
- TangentMode left_mode;
- TangentMode right_mode;
+ real_t left_tangent = 0.0;
+ real_t right_tangent = 0.0;
+ TangentMode left_mode = TANGENT_FREE;
+ TangentMode right_mode = TANGENT_FREE;
Point() {
- left_tangent = 0;
- right_tangent = 0;
- left_mode = TANGENT_FREE;
- right_mode = TANGENT_FREE;
}
Point(Vector2 p_pos,
- real_t p_left = 0,
- real_t p_right = 0,
+ real_t p_left = 0.0,
+ real_t p_right = 0.0,
TangentMode p_left_mode = TANGENT_FREE,
TangentMode p_right_mode = TANGENT_FREE) {
pos = p_pos;
@@ -137,12 +133,12 @@ private:
void mark_dirty();
Vector<Point> _points;
- bool _baked_cache_dirty;
+ bool _baked_cache_dirty = false;
Vector<real_t> _baked_cache;
- int _bake_resolution;
- float _min_value;
- float _max_value;
- int _minmax_set_once; // Encodes whether min and max have been set a first time, first bit for min and second for max.
+ int _bake_resolution = 100;
+ float _min_value = 0.0;
+ float _max_value = 1.0;
+ int _minmax_set_once = 0b00; // Encodes whether min and max have been set a first time, first bit for min and second for max.
};
VARIANT_ENUM_CAST(Curve::TangentMode)
@@ -159,17 +155,17 @@ class Curve2D : public Resource {
Vector<Point> points;
struct BakedPoint {
- float ofs;
+ float ofs = 0.0;
Vector2 point;
};
- mutable bool baked_cache_dirty;
+ mutable bool baked_cache_dirty = false;
mutable PackedVector2Array baked_point_cache;
- mutable float baked_max_ofs;
+ mutable float baked_max_ofs = 0.0;
void _bake() const;
- float bake_interval;
+ float bake_interval = 5.0;
void _bake_segment2d(Map<float, Vector2> &r_bake, float p_begin, float p_end, const Vector2 &p_a, const Vector2 &p_out, const Vector2 &p_b, const Vector2 &p_in, int p_depth, int p_max_depth, float p_tol) const;
Dictionary _get_data() const;
@@ -214,28 +210,26 @@ class Curve3D : public Resource {
Vector3 in;
Vector3 out;
Vector3 pos;
- float tilt;
-
- Point() { tilt = 0; }
+ float tilt = 0.0;
};
Vector<Point> points;
struct BakedPoint {
- float ofs;
+ float ofs = 0.0;
Vector3 point;
};
- mutable bool baked_cache_dirty;
+ mutable bool baked_cache_dirty = false;
mutable PackedVector3Array baked_point_cache;
mutable PackedFloat32Array baked_tilt_cache;
mutable PackedVector3Array baked_up_vector_cache;
- mutable float baked_max_ofs;
+ mutable float baked_max_ofs = 0.0;
void _bake() const;
- float bake_interval;
- bool up_vector_enabled;
+ float bake_interval = 0.2;
+ bool up_vector_enabled = true;
void _bake_segment3d(Map<float, Vector3> &r_bake, float p_begin, float p_end, const Vector3 &p_a, const Vector3 &p_out, const Vector3 &p_b, const Vector3 &p_in, int p_depth, int p_max_depth, float p_tol) const;
Dictionary _get_data() const;
diff --git a/scene/resources/cylinder_shape_3d.cpp b/scene/resources/cylinder_shape_3d.cpp
index 3e9cdca872..63bdc8d26d 100644
--- a/scene/resources/cylinder_shape_3d.cpp
+++ b/scene/resources/cylinder_shape_3d.cpp
@@ -75,7 +75,6 @@ void CylinderShape3D::set_radius(float p_radius) {
radius = p_radius;
_update_shape();
notify_change_to_owners();
- _change_notify("radius");
}
float CylinderShape3D::get_radius() const {
@@ -86,7 +85,6 @@ void CylinderShape3D::set_height(float p_height) {
height = p_height;
_update_shape();
notify_change_to_owners();
- _change_notify("height");
}
float CylinderShape3D::get_height() const {
@@ -105,7 +103,5 @@ void CylinderShape3D::_bind_methods() {
CylinderShape3D::CylinderShape3D() :
Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_CYLINDER)) {
- radius = 1.0;
- height = 2.0;
_update_shape();
}
diff --git a/scene/resources/cylinder_shape_3d.h b/scene/resources/cylinder_shape_3d.h
index 93e8345727..d1b8364672 100644
--- a/scene/resources/cylinder_shape_3d.h
+++ b/scene/resources/cylinder_shape_3d.h
@@ -35,8 +35,8 @@
class CylinderShape3D : public Shape3D {
GDCLASS(CylinderShape3D, Shape3D);
- float radius;
- float height;
+ float radius = 1.0;
+ float height = 2.0;
protected:
static void _bind_methods();
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 982239fe4e..943176537b 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -43,7 +43,7 @@
typedef Map<const void *, Ref<ImageTexture>> TexCacheMap;
static TexCacheMap *tex_cache;
-static float scale = 1;
+static float scale = 1.0;
template <class T>
static Ref<StyleBoxTexture> make_stylebox(T p_src, float p_left, float p_top, float p_right, float p_bottom, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1, bool p_draw_center = true) {
@@ -115,6 +115,7 @@ static Ref<Texture2D> flip_icon(Ref<Texture2D> p_texture, bool p_flip_y = false,
Ref<ImageTexture> texture(memnew(ImageTexture));
Ref<Image> img = p_texture->get_data();
+ img = img->duplicate();
if (p_flip_y) {
img->flip_y();
@@ -146,12 +147,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// Font Colors
Color control_font_color = Color(0.88, 0.88, 0.88);
- Color control_font_color_lower = Color(0.63, 0.63, 0.63);
- Color control_font_color_low = Color(0.69, 0.69, 0.69);
- Color control_font_color_hover = Color(0.94, 0.94, 0.94);
- Color control_font_color_disabled = Color(0.9, 0.9, 0.9, 0.2);
- Color control_font_color_pressed = Color(1, 1, 1);
- Color font_color_selection = Color(0.49, 0.49, 0.49);
+ Color control_font_lower_color = Color(0.63, 0.63, 0.63);
+ Color control_font_low_color = Color(0.69, 0.69, 0.69);
+ Color control_font_hover_color = Color(0.94, 0.94, 0.94);
+ Color control_font_disabled_color = Color(0.9, 0.9, 0.9, 0.2);
+ Color control_font_pressed_color = Color(1, 1, 1);
+
+ Color control_selection_color = Color(0.49, 0.49, 0.49);
// Panel
@@ -184,10 +186,17 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("outline_size", "Button", 0 * scale);
theme->set_color("font_color", "Button", control_font_color);
- theme->set_color("font_color_pressed", "Button", control_font_color_pressed);
- theme->set_color("font_color_hover", "Button", control_font_color_hover);
- theme->set_color("font_color_disabled", "Button", control_font_color_disabled);
- theme->set_color("font_outline_modulate", "Button", Color(1, 1, 1));
+ theme->set_color("font_pressed_color", "Button", control_font_pressed_color);
+ theme->set_color("font_hover_color", "Button", control_font_hover_color);
+ theme->set_color("font_hover_pressed_color", "Button", control_font_pressed_color);
+ theme->set_color("font_disabled_color", "Button", control_font_disabled_color);
+ theme->set_color("font_outline_color", "Button", Color(1, 1, 1));
+
+ theme->set_color("icon_normal_color", "Button", Color(1, 1, 1, 1));
+ theme->set_color("icon_pressed_color", "Button", Color(1, 1, 1, 1));
+ theme->set_color("icon_hover_color", "Button", Color(1, 1, 1, 1));
+ theme->set_color("icon_hover_pressed_color", "Button", Color(1, 1, 1, 1));
+ theme->set_color("icon_disabled_color", "Button", Color(1, 1, 1, 1));
theme->set_constant("hseparation", "Button", 2 * scale);
@@ -199,9 +208,11 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "LinkButton", -1);
theme->set_color("font_color", "LinkButton", control_font_color);
- theme->set_color("font_color_pressed", "LinkButton", control_font_color_pressed);
- theme->set_color("font_color_hover", "LinkButton", control_font_color_hover);
+ theme->set_color("font_pressed_color", "LinkButton", control_font_pressed_color);
+ theme->set_color("font_hover_color", "LinkButton", control_font_hover_color);
+ theme->set_color("font_outline_color", "LinkButton", Color(1, 1, 1));
+ theme->set_constant("outline_size", "LinkButton", 0);
theme->set_constant("underline_spacing", "LinkButton", 2 * scale);
// ColorPickerButton
@@ -216,11 +227,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "ColorPickerButton", -1);
theme->set_color("font_color", "ColorPickerButton", Color(1, 1, 1, 1));
- theme->set_color("font_color_pressed", "ColorPickerButton", Color(0.8, 0.8, 0.8, 1));
- theme->set_color("font_color_hover", "ColorPickerButton", Color(1, 1, 1, 1));
- theme->set_color("font_color_disabled", "ColorPickerButton", Color(0.9, 0.9, 0.9, 0.3));
+ theme->set_color("font_pressed_color", "ColorPickerButton", Color(0.8, 0.8, 0.8, 1));
+ theme->set_color("font_hover_color", "ColorPickerButton", Color(1, 1, 1, 1));
+ theme->set_color("font_disabled_color", "ColorPickerButton", Color(0.9, 0.9, 0.9, 0.3));
+ theme->set_color("font_outline_color", "ColorPickerButton", Color(1, 1, 1));
theme->set_constant("hseparation", "ColorPickerButton", 2 * scale);
+ theme->set_constant("outline_size", "ColorPickerButton", 0);
// OptionButton
@@ -253,12 +266,14 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "OptionButton", -1);
theme->set_color("font_color", "OptionButton", control_font_color);
- theme->set_color("font_color_pressed", "OptionButton", control_font_color_pressed);
- theme->set_color("font_color_hover", "OptionButton", control_font_color_hover);
- theme->set_color("font_color_disabled", "OptionButton", control_font_color_disabled);
+ theme->set_color("font_pressed_color", "OptionButton", control_font_pressed_color);
+ theme->set_color("font_hover_color", "OptionButton", control_font_hover_color);
+ theme->set_color("font_disabled_color", "OptionButton", control_font_disabled_color);
+ theme->set_color("font_outline_color", "OptionButton", Color(1, 1, 1));
theme->set_constant("hseparation", "OptionButton", 2 * scale);
theme->set_constant("arrow_margin", "OptionButton", 2 * scale);
+ theme->set_constant("outline_size", "OptionButton", 0);
// MenuButton
@@ -272,11 +287,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "MenuButton", -1);
theme->set_color("font_color", "MenuButton", control_font_color);
- theme->set_color("font_color_pressed", "MenuButton", control_font_color_pressed);
- theme->set_color("font_color_hover", "MenuButton", control_font_color_hover);
- theme->set_color("font_color_disabled", "MenuButton", Color(1, 1, 1, 0.3));
+ theme->set_color("font_pressed_color", "MenuButton", control_font_pressed_color);
+ theme->set_color("font_hover_color", "MenuButton", control_font_hover_color);
+ theme->set_color("font_disabled_color", "MenuButton", Color(1, 1, 1, 0.3));
+ theme->set_color("font_outline_color", "MenuButton", Color(1, 1, 1));
theme->set_constant("hseparation", "MenuButton", 3 * scale);
+ theme->set_constant("outline_size", "MenuButton", 0);
// CheckBox
@@ -307,13 +324,15 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "CheckBox", -1);
theme->set_color("font_color", "CheckBox", control_font_color);
- theme->set_color("font_color_pressed", "CheckBox", control_font_color_pressed);
- theme->set_color("font_color_hover", "CheckBox", control_font_color_hover);
- theme->set_color("font_color_hover_pressed", "CheckBox", control_font_color_pressed);
- theme->set_color("font_color_disabled", "CheckBox", control_font_color_disabled);
+ theme->set_color("font_pressed_color", "CheckBox", control_font_pressed_color);
+ theme->set_color("font_hover_color", "CheckBox", control_font_hover_color);
+ theme->set_color("font_hover_pressed_color", "CheckBox", control_font_pressed_color);
+ theme->set_color("font_disabled_color", "CheckBox", control_font_disabled_color);
+ theme->set_color("font_outline_color", "CheckBox", Color(1, 1, 1));
theme->set_constant("hseparation", "CheckBox", 4 * scale);
theme->set_constant("check_vadjust", "CheckBox", 0 * scale);
+ theme->set_constant("outline_size", "CheckBox", 0);
// CheckButton
@@ -344,13 +363,15 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "CheckButton", -1);
theme->set_color("font_color", "CheckButton", control_font_color);
- theme->set_color("font_color_pressed", "CheckButton", control_font_color_pressed);
- theme->set_color("font_color_hover", "CheckButton", control_font_color_hover);
- theme->set_color("font_color_hover_pressed", "CheckButton", control_font_color_pressed);
- theme->set_color("font_color_disabled", "CheckButton", control_font_color_disabled);
+ theme->set_color("font_pressed_color", "CheckButton", control_font_pressed_color);
+ theme->set_color("font_hover_color", "CheckButton", control_font_hover_color);
+ theme->set_color("font_hover_pressed_color", "CheckButton", control_font_pressed_color);
+ theme->set_color("font_disabled_color", "CheckButton", control_font_disabled_color);
+ theme->set_color("font_outline_color", "CheckButton", Color(1, 1, 1));
theme->set_constant("hseparation", "CheckButton", 4 * scale);
theme->set_constant("check_vadjust", "CheckButton", 0 * scale);
+ theme->set_constant("outline_size", "CheckButton", 0);
// Label
@@ -359,12 +380,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "Label", -1);
theme->set_color("font_color", "Label", Color(1, 1, 1));
- theme->set_color("font_color_shadow", "Label", Color(0, 0, 0, 0));
- theme->set_color("font_outline_modulate", "Label", Color(1, 1, 1));
+ theme->set_color("font_shadow_color", "Label", Color(0, 0, 0, 0));
+ theme->set_color("font_outline_color", "Label", Color(1, 1, 1));
theme->set_constant("shadow_offset_x", "Label", 1 * scale);
theme->set_constant("shadow_offset_y", "Label", 1 * scale);
- theme->set_constant("outline_size", "Label", 0 * scale);
+ theme->set_constant("outline_size", "Label", 0);
theme->set_constant("shadow_outline_size", "Label", 1 * scale);
theme->set_constant("line_spacing", "Label", 3 * scale);
@@ -378,14 +399,16 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "LineEdit", -1);
theme->set_color("font_color", "LineEdit", control_font_color);
- theme->set_color("font_color_selected", "LineEdit", Color(0, 0, 0));
- theme->set_color("font_color_uneditable", "LineEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
- theme->set_color("cursor_color", "LineEdit", control_font_color_hover);
- theme->set_color("selection_color", "LineEdit", font_color_selection);
+ theme->set_color("font_selected_color", "LineEdit", Color(0, 0, 0));
+ theme->set_color("font_uneditable_color", "LineEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
+ theme->set_color("font_outline_color", "LineEdit", Color(1, 1, 1));
+ theme->set_color("cursor_color", "LineEdit", control_font_hover_color);
+ theme->set_color("selection_color", "LineEdit", control_selection_color);
theme->set_color("clear_button_color", "LineEdit", control_font_color);
- theme->set_color("clear_button_color_pressed", "LineEdit", control_font_color_pressed);
+ theme->set_color("clear_button_color_pressed", "LineEdit", control_font_pressed_color);
- theme->set_constant("minimum_spaces", "LineEdit", 12 * scale);
+ theme->set_constant("minimum_character_width", "LineEdit", 4);
+ theme->set_constant("outline_size", "LineEdit", 0);
theme->set_icon("clear", "LineEdit", make_icon(line_edit_clear_png));
@@ -397,8 +420,11 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("font", "ProgressBar", Ref<Font>());
theme->set_font_size("font_size", "ProgressBar", -1);
- theme->set_color("font_color", "ProgressBar", control_font_color_hover);
- theme->set_color("font_color_shadow", "ProgressBar", Color(0, 0, 0));
+ theme->set_color("font_color", "ProgressBar", control_font_hover_color);
+ theme->set_color("font_shadow_color", "ProgressBar", Color(0, 0, 0));
+ theme->set_color("font_outline_color", "ProgressBar", Color(1, 1, 1));
+
+ theme->set_constant("outline_size", "ProgressBar", 0);
// TextEdit
@@ -417,12 +443,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("completion_background_color", "TextEdit", Color(0.17, 0.16, 0.2));
theme->set_color("completion_selected_color", "TextEdit", Color(0.26, 0.26, 0.27));
theme->set_color("completion_existing_color", "TextEdit", Color(0.87, 0.87, 0.87, 0.13));
- theme->set_color("completion_scroll_color", "TextEdit", control_font_color_pressed);
+ theme->set_color("completion_scroll_color", "TextEdit", control_font_pressed_color);
theme->set_color("completion_font_color", "TextEdit", Color(0.67, 0.67, 0.67));
theme->set_color("font_color", "TextEdit", control_font_color);
- theme->set_color("font_color_selected", "TextEdit", Color(0, 0, 0));
- theme->set_color("font_color_readonly", "TextEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
- theme->set_color("selection_color", "TextEdit", font_color_selection);
+ theme->set_color("font_selected_color", "TextEdit", Color(0, 0, 0));
+ theme->set_color("font_readonly_color", "TextEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
+ theme->set_color("font_outline_color", "TextEdit", Color(1, 1, 1));
+ theme->set_color("selection_color", "TextEdit", control_selection_color);
theme->set_color("mark_color", "TextEdit", Color(1.0, 0.4, 0.4, 0.4));
theme->set_color("code_folding_color", "TextEdit", Color(0.8, 0.8, 0.8, 0.8));
theme->set_color("current_line_color", "TextEdit", Color(0.25, 0.25, 0.26, 0.8));
@@ -435,8 +462,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("completion_max_width", "TextEdit", 50);
theme->set_constant("completion_scroll_width", "TextEdit", 3);
theme->set_constant("line_spacing", "TextEdit", 4 * scale);
+ theme->set_constant("outline_size", "TextEdit", 0);
// CodeEdit
+
theme->set_stylebox("normal", "CodeEdit", make_stylebox(tree_bg_png, 3, 3, 3, 3, 0, 0, 0, 0));
theme->set_stylebox("focus", "CodeEdit", focus);
theme->set_stylebox("read_only", "CodeEdit", make_stylebox(tree_bg_disabled_png, 4, 4, 4, 4, 0, 0, 0, 0));
@@ -457,12 +486,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_color("completion_background_color", "CodeEdit", Color(0.17, 0.16, 0.2));
theme->set_color("completion_selected_color", "CodeEdit", Color(0.26, 0.26, 0.27));
theme->set_color("completion_existing_color", "CodeEdit", Color(0.87, 0.87, 0.87, 0.13));
- theme->set_color("completion_scroll_color", "CodeEdit", control_font_color_pressed);
+ theme->set_color("completion_scroll_color", "CodeEdit", control_font_pressed_color);
theme->set_color("completion_font_color", "CodeEdit", Color(0.67, 0.67, 0.67));
theme->set_color("font_color", "CodeEdit", control_font_color);
- theme->set_color("font_color_selected", "CodeEdit", Color(0, 0, 0));
- theme->set_color("font_color_readonly", "CodeEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
- theme->set_color("selection_color", "CodeEdit", font_color_selection);
+ theme->set_color("font_selected_color", "CodeEdit", Color(0, 0, 0));
+ theme->set_color("font_readonly_color", "CodeEdit", Color(control_font_color.r, control_font_color.g, control_font_color.b, 0.5f));
+ theme->set_color("font_outline_color", "CodeEdit", Color(1, 1, 1));
+ theme->set_color("selection_color", "CodeEdit", control_selection_color);
theme->set_color("mark_color", "CodeEdit", Color(1.0, 0.4, 0.4, 0.4));
theme->set_color("bookmark_color", "CodeEdit", Color(0.5, 0.64, 1, 0.8));
theme->set_color("breakpoint_color", "CodeEdit", Color(0.9, 0.29, 0.3));
@@ -480,6 +510,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("completion_max_width", "CodeEdit", 50);
theme->set_constant("completion_scroll_width", "CodeEdit", 3);
theme->set_constant("line_spacing", "CodeEdit", 4 * scale);
+ theme->set_constant("outline_size", "CodeEdit", 0);
Ref<Texture2D> empty_icon = memnew(ImageTexture);
@@ -535,7 +566,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_icon("updown", "SpinBox", make_icon(spinbox_updown_png));
- //scroll container
+ // ScrollContainer
+
Ref<StyleBoxEmpty> empty;
empty.instance();
theme->set_stylebox("bg", "ScrollContainer", empty);
@@ -547,7 +579,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("scaleborder_size", "Window", 4 * scale);
theme->set_font("title_font", "Window", large_font);
+ theme->set_font_size("title_font_size", "Window", -1);
+
theme->set_color("title_color", "Window", Color(0, 0, 0));
+ theme->set_color("title_outline_modulate", "Window", Color(1, 1, 1));
+
+ theme->set_constant("title_outline_size", "Window", 0);
theme->set_constant("title_height", "Window", 20 * scale);
theme->set_constant("resize_margin", "Window", 4 * scale);
@@ -598,13 +635,17 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "PopupMenu", -1);
theme->set_color("font_color", "PopupMenu", control_font_color);
- theme->set_color("font_color_accel", "PopupMenu", Color(0.7, 0.7, 0.7, 0.8));
- theme->set_color("font_color_disabled", "PopupMenu", Color(0.4, 0.4, 0.4, 0.8));
- theme->set_color("font_color_hover", "PopupMenu", control_font_color);
- theme->set_color("font_color_separator", "PopupMenu", control_font_color);
+ theme->set_color("font_accelerator_color", "PopupMenu", Color(0.7, 0.7, 0.7, 0.8));
+ theme->set_color("font_disabled_color", "PopupMenu", Color(0.4, 0.4, 0.4, 0.8));
+ theme->set_color("font_hover_color", "PopupMenu", control_font_color);
+ theme->set_color("font_separator_color", "PopupMenu", control_font_color);
+ theme->set_color("font_outline_color", "PopupMenu", Color(1, 1, 1));
theme->set_constant("hseparation", "PopupMenu", 4 * scale);
theme->set_constant("vseparation", "PopupMenu", 4 * scale);
+ theme->set_constant("outline_size", "PopupMenu", 0);
+ theme->set_constant("item_start_padding", "PopupMenu", 2 * scale);
+ theme->set_constant("item_end_padding", "PopupMenu", 2 * scale);
// GraphNode
@@ -671,12 +712,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "Tree", -1);
theme->set_color("title_button_color", "Tree", control_font_color);
- theme->set_color("font_color", "Tree", control_font_color_low);
- theme->set_color("font_color_selected", "Tree", control_font_color_pressed);
+ theme->set_color("font_color", "Tree", control_font_low_color);
+ theme->set_color("font_selected_color", "Tree", control_font_pressed_color);
+ theme->set_color("font_outline_color", "Tree", Color(1, 1, 1));
theme->set_color("guide_color", "Tree", Color(0, 0, 0, 0.1));
theme->set_color("drop_position_color", "Tree", Color(1, 0.3, 0.2));
theme->set_color("relationship_line_color", "Tree", Color(0.27, 0.27, 0.27));
- theme->set_color("custom_button_font_highlight", "Tree", control_font_color_hover);
+ theme->set_color("custom_button_font_highlight", "Tree", control_font_hover_color);
theme->set_constant("hseparation", "Tree", 4 * scale);
theme->set_constant("vseparation", "Tree", 4 * scale);
@@ -686,8 +728,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("draw_guides", "Tree", 1);
theme->set_constant("scroll_border", "Tree", 4);
theme->set_constant("scroll_speed", "Tree", 12);
+ theme->set_constant("outline_size", "Tree", 0);
// ItemList
+
Ref<StyleBoxTexture> item_selected = make_stylebox(selection_png, 4, 4, 4, 4, 8, 2, 8, 2);
Ref<StyleBoxTexture> item_selected_oof = make_stylebox(selection_oof_png, 4, 4, 4, 4, 8, 2, 8, 2);
@@ -701,14 +745,17 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("font", "ItemList", Ref<Font>());
theme->set_font_size("font_size", "ItemList", -1);
- theme->set_color("font_color", "ItemList", control_font_color_lower);
- theme->set_color("font_color_selected", "ItemList", control_font_color_pressed);
+ theme->set_color("font_color", "ItemList", control_font_lower_color);
+ theme->set_color("font_selected_color", "ItemList", control_font_pressed_color);
+ theme->set_color("font_outline_color", "ItemList", Color(1, 1, 1));
theme->set_color("guide_color", "ItemList", Color(0, 0, 0, 0.1));
theme->set_stylebox("selected", "ItemList", item_selected_oof);
theme->set_stylebox("selected_focus", "ItemList", item_selected);
theme->set_stylebox("cursor", "ItemList", focus);
theme->set_stylebox("cursor_unfocused", "ItemList", focus);
+ theme->set_constant("outline_size", "ItemList", 0);
+
// TabContainer
Ref<StyleBoxTexture> tc_sb = sb_expand(make_stylebox(tab_container_bg_png, 4, 4, 4, 4, 4, 4, 4, 4), 3, 3, 3, 3);
@@ -716,8 +763,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
tc_sb->set_expand_margin_size(SIDE_TOP, 2 * scale);
tc_sb->set_default_margin(SIDE_TOP, 8 * scale);
- 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_selected", "TabContainer", sb_expand(make_stylebox(tab_current_png, 4, 4, 4, 1, 16, 4, 16, 4), 2, 2, 2, 2));
+ theme->set_stylebox("tab_unselected", "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);
@@ -731,17 +778,19 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("font", "TabContainer", Ref<Font>());
theme->set_font_size("font_size", "TabContainer", -1);
- theme->set_color("font_color_fg", "TabContainer", control_font_color_hover);
- theme->set_color("font_color_bg", "TabContainer", control_font_color_low);
- theme->set_color("font_color_disabled", "TabContainer", control_font_color_disabled);
+ theme->set_color("font_selected_color", "TabContainer", control_font_hover_color);
+ theme->set_color("font_unselected_color", "TabContainer", control_font_low_color);
+ theme->set_color("font_disabled_color", "TabContainer", control_font_disabled_color);
+ theme->set_color("font_outline_color", "TabContainer", Color(1, 1, 1));
theme->set_constant("side_margin", "TabContainer", 8 * scale);
theme->set_constant("icon_separation", "TabContainer", 4 * scale);
+ theme->set_constant("outline_size", "TabContainer", 0);
// Tabs
- 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_selected", "Tabs", sb_expand(make_stylebox(tab_current_png, 4, 3, 4, 1, 16, 3, 16, 2), 2, 2, 2, 2));
+ theme->set_stylebox("tab_unselected", "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));
@@ -756,11 +805,13 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font("font", "Tabs", Ref<Font>());
theme->set_font_size("font_size", "Tabs", -1);
- theme->set_color("font_color_fg", "Tabs", control_font_color_hover);
- theme->set_color("font_color_bg", "Tabs", control_font_color_low);
- theme->set_color("font_color_disabled", "Tabs", control_font_color_disabled);
+ theme->set_color("font_selected_color", "Tabs", control_font_hover_color);
+ theme->set_color("font_unselected_color", "Tabs", control_font_low_color);
+ theme->set_color("font_disabled_color", "Tabs", control_font_disabled_color);
+ theme->set_color("font_outline_color", "Tabs", Color(1, 1, 1));
theme->set_constant("hseparation", "Tabs", 4 * scale);
+ theme->set_constant("outline_size", "Tabs", 0);
// Separators
@@ -817,10 +868,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("font_size", "TooltipLabel", -1);
theme->set_color("font_color", "TooltipLabel", Color(0, 0, 0));
- theme->set_color("font_color_shadow", "TooltipLabel", Color(0, 0, 0, 0.1));
+ theme->set_color("font_shadow_color", "TooltipLabel", Color(0, 0, 0, 0.1));
+ theme->set_color("font_outline_color", "TooltipLabel", Color(1, 1, 1));
theme->set_constant("shadow_offset_x", "TooltipLabel", 1);
theme->set_constant("shadow_offset_y", "TooltipLabel", 1);
+ theme->set_constant("outline_size", "TooltipLabel", 0);
// RichTextLabel
@@ -840,10 +893,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_font_size("mono_font_size", "RichTextLabel", -1);
theme->set_color("default_color", "RichTextLabel", Color(1, 1, 1));
- theme->set_color("font_color_selected", "RichTextLabel", font_color_selection);
+ theme->set_color("font_selected_color", "RichTextLabel", Color(0, 0, 0));
theme->set_color("selection_color", "RichTextLabel", Color(0.1, 0.1, 1, 0.8));
- theme->set_color("font_color_shadow", "RichTextLabel", Color(0, 0, 0, 0));
+ theme->set_color("font_shadow_color", "RichTextLabel", Color(0, 0, 0, 0));
+
+ theme->set_color("font_outline_color", "RichTextLabel", Color(1, 1, 1));
theme->set_constant("shadow_offset_x", "RichTextLabel", 1 * scale);
theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * scale);
@@ -853,9 +908,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("table_hseparation", "RichTextLabel", 3 * scale);
theme->set_constant("table_vseparation", "RichTextLabel", 3 * scale);
+ theme->set_constant("outline_size", "RichTextLabel", 0);
+
theme->set_color("table_odd_row_bg", "RichTextLabel", Color(0, 0, 0, 0));
theme->set_color("table_even_row_bg", "RichTextLabel", Color(0, 0, 0, 0));
theme->set_color("table_border", "RichTextLabel", Color(0, 0, 0, 0));
+
// Containers
theme->set_stylebox("bg", "VSplitContainer", make_stylebox(vsplit_bg_png, 1, 1, 1, 1));
@@ -895,6 +953,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("bezier_len_neg", "GraphEdit", 160 * scale);
// Visual Node Ports
+
theme->set_constant("port_grab_distance_horizontal", "GraphEdit", 48 * scale);
theme->set_constant("port_grab_distance_vertical", "GraphEdit", 6 * scale);
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index b7b5f72fcd..6f6af93848 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -44,7 +44,7 @@ RID Environment::get_rid() const {
void Environment::set_background(BGMode p_bg) {
bg_mode = p_bg;
RS::get_singleton()->environment_set_background(environment, RS::EnvironmentBG(p_bg));
- _change_notify();
+ notify_property_list_changed();
if (bg_mode != BG_SKY) {
set_fog_aerial_perspective(0.0);
}
@@ -138,7 +138,7 @@ Color Environment::get_ambient_light_color() const {
void Environment::set_ambient_source(AmbientSource p_source) {
ambient_source = p_source;
_update_ambient_light();
- _change_notify();
+ notify_property_list_changed();
}
Environment::AmbientSource Environment::get_ambient_source() const {
@@ -166,7 +166,7 @@ float Environment::get_ambient_light_sky_contribution() const {
void Environment::set_reflection_source(ReflectionSource p_source) {
reflection_source = p_source;
_update_ambient_light();
- _change_notify();
+ notify_property_list_changed();
}
Environment::ReflectionSource Environment::get_reflection_source() const {
@@ -224,7 +224,7 @@ float Environment::get_tonemap_white() const {
void Environment::set_tonemap_auto_exposure_enabled(bool p_enabled) {
tonemap_auto_exposure_enabled = p_enabled;
_update_tonemap();
- _change_notify();
+ notify_property_list_changed();
}
bool Environment::is_tonemap_auto_exposure_enabled() const {
@@ -285,7 +285,7 @@ void Environment::_update_tonemap() {
void Environment::set_ssr_enabled(bool p_enabled) {
ssr_enabled = p_enabled;
_update_ssr();
- _change_notify();
+ notify_property_list_changed();
}
bool Environment::is_ssr_enabled() const {
@@ -343,7 +343,7 @@ void Environment::_update_ssr() {
void Environment::set_ssao_enabled(bool p_enabled) {
ssao_enabled = p_enabled;
_update_ssao();
- _change_notify();
+ notify_property_list_changed();
}
bool Environment::is_ssao_enabled() const {
@@ -458,8 +458,6 @@ Environment::SDFGICascades Environment::get_sdfgi_cascades() const {
void Environment::set_sdfgi_min_cell_size(float p_size) {
sdfgi_min_cell_size = p_size;
- _change_notify("sdfgi_max_distance");
- _change_notify("sdfgi_cascade0_distance");
_update_sdfgi();
}
@@ -475,8 +473,6 @@ void Environment::set_sdfgi_max_distance(float p_distance) {
p_distance *= 0.5; //halve for each cascade
}
sdfgi_min_cell_size = p_distance;
- _change_notify("sdfgi_min_cell_size");
- _change_notify("sdfgi_cascade0_distance");
_update_sdfgi();
}
@@ -493,8 +489,6 @@ float Environment::get_sdfgi_max_distance() const {
void Environment::set_sdfgi_cascade0_distance(float p_distance) {
sdfgi_min_cell_size = p_distance / 64.0;
- _change_notify("sdfgi_min_cell_size");
- _change_notify("sdfgi_max_distance");
_update_sdfgi();
}
@@ -520,13 +514,12 @@ bool Environment::is_sdfgi_using_occlusion() const {
return sdfgi_use_occlusion;
}
-void Environment::set_sdfgi_use_multi_bounce(bool p_enabled) {
- sdfgi_use_multibounce = p_enabled;
+void Environment::set_sdfgi_bounce_feedback(float p_amount) {
+ sdfgi_bounce_feedback = p_amount;
_update_sdfgi();
}
-
-bool Environment::is_sdfgi_using_multi_bounce() const {
- return sdfgi_use_multibounce;
+float Environment::get_sdfgi_bounce_feedback() const {
+ return sdfgi_bounce_feedback;
}
void Environment::set_sdfgi_read_sky_light(bool p_enabled) {
@@ -573,7 +566,7 @@ void Environment::_update_sdfgi() {
sdfgi_min_cell_size,
RS::EnvironmentSDFGIYScale(sdfgi_y_scale),
sdfgi_use_occlusion,
- sdfgi_use_multibounce,
+ sdfgi_bounce_feedback,
sdfgi_read_sky_light,
sdfgi_energy,
sdfgi_normal_bias,
@@ -585,7 +578,7 @@ void Environment::_update_sdfgi() {
void Environment::set_glow_enabled(bool p_enabled) {
glow_enabled = p_enabled;
_update_glow();
- _change_notify();
+ notify_property_list_changed();
}
bool Environment::is_glow_enabled() const {
@@ -655,7 +648,7 @@ float Environment::get_glow_bloom() const {
void Environment::set_glow_blend_mode(GlowBlendMode p_mode) {
glow_blend_mode = p_mode;
_update_glow();
- _change_notify();
+ notify_property_list_changed();
}
Environment::GlowBlendMode Environment::get_glow_blend_mode() const {
@@ -723,7 +716,7 @@ void Environment::_update_glow() {
void Environment::set_fog_enabled(bool p_enabled) {
fog_enabled = p_enabled;
_update_fog();
- _change_notify();
+ notify_property_list_changed();
}
bool Environment::is_fog_enabled() const {
@@ -797,13 +790,13 @@ void Environment::_update_fog() {
// Volumetric Fog
void Environment::_update_volumetric_fog() {
- RS::get_singleton()->environment_set_volumetric_fog(environment, volumetric_fog_enabled, volumetric_fog_density, volumetric_fog_light, volumetric_fog_light_energy, volumetric_fog_length, volumetric_fog_detail_spread, volumetric_fog_gi_inject, RS::EnvVolumetricFogShadowFilter(volumetric_fog_shadow_filter));
+ RS::get_singleton()->environment_set_volumetric_fog(environment, volumetric_fog_enabled, volumetric_fog_density, volumetric_fog_light, volumetric_fog_light_energy, volumetric_fog_length, volumetric_fog_detail_spread, volumetric_fog_gi_inject, volumetric_fog_temporal_reproject, volumetric_fog_temporal_reproject_amount);
}
void Environment::set_volumetric_fog_enabled(bool p_enable) {
volumetric_fog_enabled = p_enable;
_update_volumetric_fog();
- _change_notify();
+ notify_property_list_changed();
}
bool Environment::is_volumetric_fog_enabled() const {
@@ -854,13 +847,20 @@ float Environment::get_volumetric_fog_gi_inject() const {
return volumetric_fog_gi_inject;
}
-void Environment::set_volumetric_fog_shadow_filter(VolumetricFogShadowFilter p_filter) {
- volumetric_fog_shadow_filter = p_filter;
+void Environment::set_volumetric_fog_temporal_reprojection_enabled(bool p_enable) {
+ volumetric_fog_temporal_reproject = p_enable;
+ _update_volumetric_fog();
+}
+bool Environment::is_volumetric_fog_temporal_reprojection_enabled() const {
+ return volumetric_fog_temporal_reproject;
+}
+void Environment::set_volumetric_fog_temporal_reprojection_amount(float p_amount) {
+ volumetric_fog_temporal_reproject_amount = p_amount;
_update_volumetric_fog();
}
-Environment::VolumetricFogShadowFilter Environment::get_volumetric_fog_shadow_filter() const {
- return volumetric_fog_shadow_filter;
+float Environment::get_volumetric_fog_temporal_reprojection_amount() const {
+ return volumetric_fog_temporal_reproject_amount;
}
// Adjustment
@@ -868,7 +868,7 @@ Environment::VolumetricFogShadowFilter Environment::get_volumetric_fog_shadow_fi
void Environment::set_adjustment_enabled(bool p_enabled) {
adjustment_enabled = p_enabled;
_update_adjustment();
- _change_notify();
+ notify_property_list_changed();
}
bool Environment::is_adjustment_enabled() const {
@@ -1200,8 +1200,8 @@ void Environment::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_sdfgi_y_scale"), &Environment::get_sdfgi_y_scale);
ClassDB::bind_method(D_METHOD("set_sdfgi_use_occlusion", "enable"), &Environment::set_sdfgi_use_occlusion);
ClassDB::bind_method(D_METHOD("is_sdfgi_using_occlusion"), &Environment::is_sdfgi_using_occlusion);
- ClassDB::bind_method(D_METHOD("set_sdfgi_use_multi_bounce", "enable"), &Environment::set_sdfgi_use_multi_bounce);
- ClassDB::bind_method(D_METHOD("is_sdfgi_using_multi_bounce"), &Environment::is_sdfgi_using_multi_bounce);
+ ClassDB::bind_method(D_METHOD("set_sdfgi_bounce_feedback", "amount"), &Environment::set_sdfgi_bounce_feedback);
+ ClassDB::bind_method(D_METHOD("get_sdfgi_bounce_feedback"), &Environment::get_sdfgi_bounce_feedback);
ClassDB::bind_method(D_METHOD("set_sdfgi_read_sky_light", "enable"), &Environment::set_sdfgi_read_sky_light);
ClassDB::bind_method(D_METHOD("is_sdfgi_reading_sky_light"), &Environment::is_sdfgi_reading_sky_light);
ClassDB::bind_method(D_METHOD("set_sdfgi_energy", "amount"), &Environment::set_sdfgi_energy);
@@ -1213,9 +1213,9 @@ void Environment::_bind_methods() {
ADD_GROUP("SDFGI", "sdfgi_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sdfgi_enabled"), "set_sdfgi_enabled", "is_sdfgi_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sdfgi_use_multi_bounce"), "set_sdfgi_use_multi_bounce", "is_sdfgi_using_multi_bounce");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sdfgi_use_occlusion"), "set_sdfgi_use_occlusion", "is_sdfgi_using_occlusion");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sdfgi_read_sky_light"), "set_sdfgi_read_sky_light", "is_sdfgi_reading_sky_light");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sdfgi_bounce_feedback", PROPERTY_HINT_RANGE, "0,1.99,0.01"), "set_sdfgi_bounce_feedback", "get_sdfgi_bounce_feedback");
ADD_PROPERTY(PropertyInfo(Variant::INT, "sdfgi_cascades", PROPERTY_HINT_ENUM, "4 Cascades,6 Cascades,8 Cascades"), "set_sdfgi_cascades", "get_sdfgi_cascades");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sdfgi_min_cell_size", PROPERTY_HINT_RANGE, "0.01,64,0.01"), "set_sdfgi_min_cell_size", "get_sdfgi_min_cell_size");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "sdfgi_cascade0_distance", PROPERTY_HINT_RANGE, "0.1,16384,0.1,or_greater"), "set_sdfgi_cascade0_distance", "get_sdfgi_cascade0_distance");
@@ -1317,8 +1317,10 @@ void Environment::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_volumetric_fog_detail_spread"), &Environment::get_volumetric_fog_detail_spread);
ClassDB::bind_method(D_METHOD("set_volumetric_fog_gi_inject", "gi_inject"), &Environment::set_volumetric_fog_gi_inject);
ClassDB::bind_method(D_METHOD("get_volumetric_fog_gi_inject"), &Environment::get_volumetric_fog_gi_inject);
- ClassDB::bind_method(D_METHOD("set_volumetric_fog_shadow_filter", "shadow_filter"), &Environment::set_volumetric_fog_shadow_filter);
- ClassDB::bind_method(D_METHOD("get_volumetric_fog_shadow_filter"), &Environment::get_volumetric_fog_shadow_filter);
+ ClassDB::bind_method(D_METHOD("set_volumetric_fog_temporal_reprojection_enabled", "enabled"), &Environment::set_volumetric_fog_temporal_reprojection_enabled);
+ ClassDB::bind_method(D_METHOD("is_volumetric_fog_temporal_reprojection_enabled"), &Environment::is_volumetric_fog_temporal_reprojection_enabled);
+ ClassDB::bind_method(D_METHOD("set_volumetric_fog_temporal_reprojection_amount", "temporal_reprojection_amount"), &Environment::set_volumetric_fog_temporal_reprojection_amount);
+ ClassDB::bind_method(D_METHOD("get_volumetric_fog_temporal_reprojection_amount"), &Environment::get_volumetric_fog_temporal_reprojection_amount);
ADD_GROUP("Volumetric Fog", "volumetric_fog_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "volumetric_fog_enabled"), "set_volumetric_fog_enabled", "is_volumetric_fog_enabled");
@@ -1328,7 +1330,9 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volumetric_fog_gi_inject", PROPERTY_HINT_EXP_RANGE, "0.00,16,0.01"), "set_volumetric_fog_gi_inject", "get_volumetric_fog_gi_inject");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volumetric_fog_length", PROPERTY_HINT_RANGE, "0,1024,0.01,or_greater"), "set_volumetric_fog_length", "get_volumetric_fog_length");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volumetric_fog_detail_spread", PROPERTY_HINT_EXP_EASING, "0.01,16,0.01"), "set_volumetric_fog_detail_spread", "get_volumetric_fog_detail_spread");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "volumetric_fog_shadow_filter", PROPERTY_HINT_ENUM, "Disabled,Low,Medium,High"), "set_volumetric_fog_shadow_filter", "get_volumetric_fog_shadow_filter");
+ ADD_SUBGROUP("Temporal Reprojection", "volumetric_fog_temporal_reprojection_");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "volumetric_fog_temporal_reprojection_enabled"), "set_volumetric_fog_temporal_reprojection_enabled", "is_volumetric_fog_temporal_reprojection_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "volumetric_fog_temporal_reprojection_amount", PROPERTY_HINT_RANGE, "0.0,0.999,0.001"), "set_volumetric_fog_temporal_reprojection_amount", "get_volumetric_fog_temporal_reprojection_amount");
// Adjustment
@@ -1417,7 +1421,7 @@ Environment::Environment() {
_update_fog();
_update_adjustment();
_update_volumetric_fog();
- _change_notify();
+ notify_property_list_changed();
}
Environment::~Environment() {
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 1676a28b39..0df2c3cc27 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -103,7 +103,7 @@ private:
// Background
BGMode bg_mode = BG_CLEAR_COLOR;
Ref<Sky> bg_sky;
- float bg_sky_custom_fov = 0;
+ float bg_sky_custom_fov = 0.0;
Vector3 bg_sky_rotation;
Color bg_color;
float bg_energy = 1.0;
@@ -125,7 +125,7 @@ private:
float tonemap_white = 1.0;
bool tonemap_auto_exposure_enabled = false;
float tonemap_auto_exposure_min = 0.05;
- float tonemap_auto_exposure_max = 8;
+ float tonemap_auto_exposure_max = 8.0;
float tonemap_auto_exposure_speed = 0.5;
float tonemap_auto_exposure_grey = 0.4;
void _update_tonemap();
@@ -156,7 +156,7 @@ private:
float sdfgi_min_cell_size = 0.2;
SDFGIYScale sdfgi_y_scale = SDFGI_Y_SCALE_DISABLED;
bool sdfgi_use_occlusion = false;
- bool sdfgi_use_multibounce = false;
+ float sdfgi_bounce_feedback = 0.0;
bool sdfgi_read_sky_light = false;
float sdfgi_energy = 1.0;
float sdfgi_normal_bias = 1.1;
@@ -196,8 +196,9 @@ private:
float volumetric_fog_light_energy = 1.0;
float volumetric_fog_length = 64.0;
float volumetric_fog_detail_spread = 2.0;
- VolumetricFogShadowFilter volumetric_fog_shadow_filter = VOLUMETRIC_FOG_SHADOW_FILTER_LOW;
float volumetric_fog_gi_inject = 0.0;
+ bool volumetric_fog_temporal_reproject = true;
+ float volumetric_fog_temporal_reproject_amount = 0.9;
void _update_volumetric_fog();
// Adjustment
@@ -317,8 +318,8 @@ public:
SDFGIYScale get_sdfgi_y_scale() const;
void set_sdfgi_use_occlusion(bool p_enabled);
bool is_sdfgi_using_occlusion() const;
- void set_sdfgi_use_multi_bounce(bool p_enabled);
- bool is_sdfgi_using_multi_bounce() const;
+ void set_sdfgi_bounce_feedback(float p_amount);
+ float get_sdfgi_bounce_feedback() const;
void set_sdfgi_read_sky_light(bool p_enabled);
bool is_sdfgi_reading_sky_light() const;
void set_sdfgi_energy(float p_energy);
@@ -385,10 +386,12 @@ public:
float get_volumetric_fog_length() const;
void set_volumetric_fog_detail_spread(float p_detail_spread);
float get_volumetric_fog_detail_spread() const;
- void set_volumetric_fog_shadow_filter(VolumetricFogShadowFilter p_filter);
- VolumetricFogShadowFilter get_volumetric_fog_shadow_filter() const;
void set_volumetric_fog_gi_inject(float p_gi_inject);
float get_volumetric_fog_gi_inject() const;
+ void set_volumetric_fog_temporal_reprojection_enabled(bool p_enable);
+ bool is_volumetric_fog_temporal_reprojection_enabled() const;
+ void set_volumetric_fog_temporal_reprojection_amount(float p_amount);
+ float get_volumetric_fog_temporal_reprojection_amount() const;
// Adjustment
void set_adjustment_enabled(bool p_enabled);
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 1c06d7b519..702f2ed1c8 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -50,6 +50,9 @@ void FontData::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_underline_position", "size"), &FontData::get_underline_position);
ClassDB::bind_method(D_METHOD("get_underline_thickness", "size"), &FontData::get_underline_thickness);
+ ClassDB::bind_method(D_METHOD("get_spacing", "type"), &FontData::get_spacing);
+ ClassDB::bind_method(D_METHOD("set_spacing", "type", "value"), &FontData::set_spacing);
+
ClassDB::bind_method(D_METHOD("set_antialiased", "antialiased"), &FontData::set_antialiased);
ClassDB::bind_method(D_METHOD("get_antialiased"), &FontData::get_antialiased);
@@ -100,6 +103,13 @@ void FontData::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "distance_field_hint"), "set_distance_field_hint", "get_distance_field_hint");
ADD_PROPERTY(PropertyInfo(Variant::INT, "hinting", PROPERTY_HINT_ENUM, "None,Light,Normal"), "set_hinting", "get_hinting");
+
+ ADD_GROUP("Extra Spacing", "extra_spacing");
+ ADD_PROPERTYI(PropertyInfo(Variant::INT, "extra_spacing_glyph"), "set_spacing", "get_spacing", SPACING_GLYPH);
+ ADD_PROPERTYI(PropertyInfo(Variant::INT, "extra_spacing_space"), "set_spacing", "get_spacing", SPACING_SPACE);
+
+ BIND_ENUM_CONSTANT(SPACING_GLYPH);
+ BIND_ENUM_CONSTANT(SPACING_SPACE);
}
bool FontData::_set(const StringName &p_name, const Variant &p_value) {
@@ -177,6 +187,14 @@ void FontData::_get_property_list(List<PropertyInfo> *p_list) const {
}
}
+void FontData::reset_state() {
+ if (rid != RID()) {
+ TS->free(rid);
+ }
+ base_size = 16;
+ path = String();
+}
+
RID FontData::get_rid() const {
return rid;
}
@@ -281,6 +299,27 @@ double FontData::get_variation(const String &p_name) const {
return TS->font_get_variation(rid, p_name);
}
+int FontData::get_spacing(int p_type) const {
+ if (rid == RID()) {
+ return 0;
+ }
+ if (p_type == SPACING_GLYPH) {
+ return TS->font_get_spacing_glyph(rid);
+ } else {
+ return TS->font_get_spacing_space(rid);
+ }
+}
+
+void FontData::set_spacing(int p_type, int p_value) {
+ ERR_FAIL_COND(rid == RID());
+ if (p_type == SPACING_GLYPH) {
+ TS->font_set_spacing_glyph(rid, p_value);
+ } else {
+ TS->font_set_spacing_space(rid, p_value);
+ }
+ emit_changed();
+}
+
void FontData::set_antialiased(bool p_antialiased) {
ERR_FAIL_COND(rid == RID());
TS->font_set_antialiased(rid, p_antialiased);
@@ -509,7 +548,7 @@ void Font::_data_changed() {
cache_wrap.clear();
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
bool Font::_set(const StringName &p_name, const Variant &p_value) {
@@ -588,6 +627,14 @@ void Font::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::OBJECT, "data/" + itos(data.size()), PROPERTY_HINT_RESOURCE_TYPE, "FontData"));
}
+void Font::reset_state() {
+ spacing_top = 0;
+ spacing_bottom = 0;
+ cache.clear();
+ cache_wrap.clear();
+ data.clear();
+}
+
void Font::add_data(const Ref<FontData> &p_data) {
ERR_FAIL_COND(p_data.is_null());
data.push_back(p_data);
@@ -600,7 +647,7 @@ void Font::add_data(const Ref<FontData> &p_data) {
cache_wrap.clear();
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
void Font::set_data(int p_idx, const Ref<FontData> &p_data) {
@@ -621,7 +668,7 @@ void Font::set_data(int p_idx, const Ref<FontData> &p_data) {
cache_wrap.clear();
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
int Font::get_data_count() const {
@@ -646,7 +693,7 @@ void Font::remove_data(int p_idx) {
cache_wrap.clear();
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
Dictionary Font::get_feature_list() const {
@@ -718,7 +765,7 @@ void Font::set_spacing(int p_type, int p_value) {
}
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
// Drawing string and string sizes, cached.
@@ -781,6 +828,8 @@ Size2 Font::get_multiline_string_size(const String &p_text, float p_width, int p
}
void Font::draw_string(RID p_canvas_item, const Point2 &p_pos, const String &p_text, HAlign p_align, float p_width, int p_size, const Color &p_modulate, int p_outline_size, const Color &p_outline_modulate, uint8_t p_flags) const {
+ ERR_FAIL_COND(data.is_empty());
+
uint64_t hash = p_text.hash64();
hash = hash_djb2_one_64(p_size, hash);
@@ -811,6 +860,8 @@ void Font::draw_string(RID p_canvas_item, const Point2 &p_pos, const String &p_t
}
void Font::draw_multiline_string(RID p_canvas_item, const Point2 &p_pos, const String &p_text, HAlign p_align, float p_width, int p_max_lines, int p_size, const Color &p_modulate, int p_outline_size, const Color &p_outline_modulate, uint8_t p_flags) const {
+ ERR_FAIL_COND(data.is_empty());
+
uint64_t hash = p_text.hash64();
hash = hash_djb2_one_64(p_size, hash);
@@ -951,7 +1002,7 @@ Font::~Font() {
/*************************************************************************/
-RES ResourceFormatLoaderFont::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderFont::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_FILE_CANT_OPEN;
}
@@ -1006,7 +1057,7 @@ String ResourceFormatLoaderFont::get_resource_type(const String &p_path) const {
#ifndef DISABLE_DEPRECATED
-RES ResourceFormatLoaderCompatFont::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderCompatFont::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_FILE_CANT_OPEN;
}
diff --git a/scene/resources/font.h b/scene/resources/font.h
index 086226c082..56b5acde1a 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -42,6 +42,13 @@
class FontData : public Resource {
GDCLASS(FontData, Resource);
+public:
+ enum SpacingType {
+ SPACING_GLYPH,
+ SPACING_SPACE,
+ };
+
+private:
RID rid;
int base_size = 16;
String path;
@@ -53,6 +60,8 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ virtual void reset_state() override;
+
public:
virtual RID get_rid() const override;
@@ -76,6 +85,9 @@ public:
float get_underline_position(int p_size) const;
float get_underline_thickness(int p_size) const;
+ int get_spacing(int p_type) const;
+ void set_spacing(int p_type, int p_value);
+
void set_antialiased(bool p_antialiased);
bool get_antialiased() const;
@@ -132,7 +144,7 @@ class Font : public Resource {
public:
enum SpacingType {
SPACING_TOP,
- SPACING_BOTTOM
+ SPACING_BOTTOM,
};
private:
@@ -151,6 +163,8 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ virtual void reset_state() override;
+
void _data_changed();
public:
@@ -195,13 +209,14 @@ public:
~Font();
};
+VARIANT_ENUM_CAST(FontData::SpacingType);
VARIANT_ENUM_CAST(Font::SpacingType);
/*************************************************************************/
class ResourceFormatLoaderFont : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
@@ -212,7 +227,7 @@ public:
class ResourceFormatLoaderCompatFont : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
diff --git a/scene/resources/gradient.cpp b/scene/resources/gradient.cpp
index b87235518f..7b9b942142 100644
--- a/scene/resources/gradient.cpp
+++ b/scene/resources/gradient.cpp
@@ -39,7 +39,6 @@ Gradient::Gradient() {
points.write[0].offset = 0;
points.write[1].color = Color(1, 1, 1, 1);
points.write[1].offset = 1;
- is_sorted = true;
}
Gradient::~Gradient() {
diff --git a/scene/resources/gradient.h b/scene/resources/gradient.h
index 344a3fd283..cf5b179c45 100644
--- a/scene/resources/gradient.h
+++ b/scene/resources/gradient.h
@@ -39,7 +39,7 @@ class Gradient : public Resource {
public:
struct Point {
- float offset;
+ float offset = 0.0;
Color color;
bool operator<(const Point &p_ponit) const {
return offset < p_ponit.offset;
@@ -48,7 +48,7 @@ public:
private:
Vector<Point> points;
- bool is_sorted;
+ bool is_sorted = true;
_FORCE_INLINE_ void _update_sorting() {
if (!is_sorted) {
points.sort();
diff --git a/scene/resources/height_map_shape_3d.cpp b/scene/resources/height_map_shape_3d.cpp
index a32cc1c4df..5593bb766f 100644
--- a/scene/resources/height_map_shape_3d.cpp
+++ b/scene/resources/height_map_shape_3d.cpp
@@ -107,8 +107,6 @@ void HeightMapShape3D::set_map_width(int p_new) {
_update_shape();
notify_change_to_owners();
- _change_notify("map_width");
- _change_notify("map_data");
}
}
@@ -133,8 +131,6 @@ void HeightMapShape3D::set_map_depth(int p_new) {
_update_shape();
notify_change_to_owners();
- _change_notify("map_depth");
- _change_notify("map_data");
}
}
@@ -171,7 +167,6 @@ void HeightMapShape3D::set_map_data(PackedFloat32Array p_new) {
_update_shape();
notify_change_to_owners();
- _change_notify("map_data");
}
PackedFloat32Array HeightMapShape3D::get_map_data() const {
@@ -193,16 +188,12 @@ void HeightMapShape3D::_bind_methods() {
HeightMapShape3D::HeightMapShape3D() :
Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_HEIGHTMAP)) {
- map_width = 2;
- map_depth = 2;
map_data.resize(map_width * map_depth);
real_t *w = map_data.ptrw();
w[0] = 0.0;
w[1] = 0.0;
w[2] = 0.0;
w[3] = 0.0;
- min_height = 0.0;
- max_height = 0.0;
_update_shape();
}
diff --git a/scene/resources/height_map_shape_3d.h b/scene/resources/height_map_shape_3d.h
index eda405fc06..6fc88cff90 100644
--- a/scene/resources/height_map_shape_3d.h
+++ b/scene/resources/height_map_shape_3d.h
@@ -36,11 +36,11 @@
class HeightMapShape3D : public Shape3D {
GDCLASS(HeightMapShape3D, Shape3D);
- int map_width;
- int map_depth;
+ int map_width = 2;
+ int map_depth = 2;
PackedFloat32Array map_data;
- float min_height;
- float max_height;
+ float min_height = 0.0;
+ float max_height = 0.0;
protected:
static void _bind_methods();
diff --git a/scene/resources/line_shape_2d.cpp b/scene/resources/line_shape_2d.cpp
index 2b08c21c34..d206f12287 100644
--- a/scene/resources/line_shape_2d.cpp
+++ b/scene/resources/line_shape_2d.cpp
@@ -113,7 +113,5 @@ void LineShape2D::_bind_methods() {
LineShape2D::LineShape2D() :
Shape2D(PhysicsServer2D::get_singleton()->line_shape_create()) {
- normal = Vector2(0, 1);
- distance = 0;
_update_shape();
}
diff --git a/scene/resources/line_shape_2d.h b/scene/resources/line_shape_2d.h
index 043be1eebe..9f0405ad29 100644
--- a/scene/resources/line_shape_2d.h
+++ b/scene/resources/line_shape_2d.h
@@ -36,8 +36,8 @@
class LineShape2D : public Shape2D {
GDCLASS(LineShape2D, Shape2D);
- Vector2 normal;
- real_t distance;
+ Vector2 normal = Vector2(0, 1);
+ real_t distance = 0.0;
void _update_shape();
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 445c0d9677..062d921855 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -192,7 +192,7 @@ Variant ShaderMaterial::property_get_revert(const String &p_name) {
void ShaderMaterial::set_shader(const Ref<Shader> &p_shader) {
// Only connect/disconnect the signal when running in the editor.
- // This can be a slow operation, and `_change_notify()` (which is called by `_shader_changed()`)
+ // This can be a slow operation, and `notify_property_list_changed()` (which is called by `_shader_changed()`)
// does nothing in non-editor builds anyway. See GH-34741 for details.
if (shader.is_valid() && Engine::get_singleton()->is_editor_hint()) {
shader->disconnect("changed", callable_mp(this, &ShaderMaterial::_shader_changed));
@@ -210,7 +210,7 @@ void ShaderMaterial::set_shader(const Ref<Shader> &p_shader) {
}
RS::get_singleton()->material_set_shader(_get_material(), rid);
- _change_notify(); //properties for shader exposed
+ notify_property_list_changed(); //properties for shader exposed
emit_changed();
}
@@ -227,7 +227,7 @@ Variant ShaderMaterial::get_shader_param(const StringName &p_param) const {
}
void ShaderMaterial::_shader_changed() {
- _change_notify(); //update all properties
+ notify_property_list_changed(); //update all properties
}
void ShaderMaterial::_bind_methods() {
@@ -735,7 +735,7 @@ void BaseMaterial3D::_update_shader() {
if (flags[FLAG_SRGB_VERTEX_COLOR]) {
code += "\tif (!OUTPUT_IS_SRGB) {\n";
- code += "\t\tCOLOR.rgb = mix( pow((COLOR.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), COLOR.rgb* (1.0 / 12.92), lessThan(COLOR.rgb,vec3(0.04045)) );\n";
+ code += "\t\tCOLOR.rgb = mix(pow((COLOR.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), COLOR.rgb * (1.0 / 12.92), lessThan(COLOR.rgb, vec3(0.04045)));\n";
code += "\t}\n";
}
if (flags[FLAG_USE_POINT_SIZE]) {
@@ -1489,7 +1489,7 @@ void BaseMaterial3D::set_transparency(Transparency p_transparency) {
transparency = p_transparency;
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
BaseMaterial3D::Transparency BaseMaterial3D::get_transparency() const {
@@ -1503,7 +1503,7 @@ void BaseMaterial3D::set_alpha_antialiasing(AlphaAntiAliasing p_alpha_aa) {
alpha_antialiasing_mode = p_alpha_aa;
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
BaseMaterial3D::AlphaAntiAliasing BaseMaterial3D::get_alpha_antialiasing() const {
@@ -1517,7 +1517,7 @@ void BaseMaterial3D::set_shading_mode(ShadingMode p_shading_mode) {
shading_mode = p_shading_mode;
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
BaseMaterial3D::ShadingMode BaseMaterial3D::get_shading_mode() const {
@@ -1585,7 +1585,7 @@ void BaseMaterial3D::set_flag(Flags p_flag, bool p_enabled) {
flags[p_flag] = p_enabled;
if (p_flag == FLAG_USE_SHADOW_TO_OPACITY || p_flag == FLAG_USE_TEXTURE_REPEAT || p_flag == FLAG_SUBSURFACE_MODE_SKIN) {
- _change_notify();
+ notify_property_list_changed();
}
_queue_shader_change();
}
@@ -1602,7 +1602,7 @@ void BaseMaterial3D::set_feature(Feature p_feature, bool p_enabled) {
}
features[p_feature] = p_enabled;
- _change_notify();
+ notify_property_list_changed();
_queue_shader_change();
}
@@ -1620,7 +1620,7 @@ void BaseMaterial3D::set_texture(TextureParam p_param, const Ref<Texture2D> &p_t
RS::get_singleton()->material_set_param(_get_material(), shader_names->albedo_texture_size,
Vector2i(p_texture->get_width(), p_texture->get_height()));
}
- _change_notify();
+ notify_property_list_changed();
_queue_shader_change();
}
@@ -1860,7 +1860,7 @@ float BaseMaterial3D::get_uv2_triplanar_blend_sharpness() const {
void BaseMaterial3D::set_billboard_mode(BillboardMode p_mode) {
billboard_mode = p_mode;
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
BaseMaterial3D::BillboardMode BaseMaterial3D::get_billboard_mode() const {
@@ -1897,7 +1897,7 @@ bool BaseMaterial3D::get_particles_anim_loop() const {
void BaseMaterial3D::set_heightmap_deep_parallax(bool p_enable) {
deep_parallax = p_enable;
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
bool BaseMaterial3D::is_heightmap_deep_parallax_enabled() const {
@@ -1943,7 +1943,7 @@ bool BaseMaterial3D::get_heightmap_deep_parallax_flip_binormal() const {
void BaseMaterial3D::set_grow_enabled(bool p_enable) {
grow_enabled = p_enable;
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
bool BaseMaterial3D::is_grow_enabled() const {
@@ -2093,7 +2093,7 @@ void BaseMaterial3D::set_on_top_of_alpha() {
void BaseMaterial3D::set_proximity_fade(bool p_enable) {
proximity_fade_enabled = p_enable;
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
bool BaseMaterial3D::is_proximity_fade_enabled() const {
@@ -2112,7 +2112,7 @@ float BaseMaterial3D::get_proximity_fade_distance() const {
void BaseMaterial3D::set_distance_fade(DistanceFadeMode p_mode) {
distance_fade = p_mode;
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
BaseMaterial3D::DistanceFadeMode BaseMaterial3D::get_distance_fade() const {
@@ -2655,9 +2655,6 @@ BaseMaterial3D::BaseMaterial3D(bool p_orm) :
element(this) {
orm = p_orm;
// Initialize to the same values as the shader
- shading_mode = SHADING_MODE_PER_PIXEL;
- transparency = TRANSPARENCY_DISABLED;
- alpha_antialiasing_mode = ALPHA_ANTIALIASING_OFF;
set_albedo(Color(1.0, 1.0, 1.0, 1.0));
set_specular(0.5);
set_roughness(1.0);
@@ -2689,7 +2686,6 @@ BaseMaterial3D::BaseMaterial3D(bool p_orm) :
set_particles_anim_h_frames(1);
set_particles_anim_v_frames(1);
set_particles_anim_loop(false);
- emission_op = EMISSION_OP_ADD;
set_transparency(TRANSPARENCY_DISABLED);
set_alpha_antialiasing(ALPHA_ANTIALIASING_OFF);
@@ -2697,8 +2693,6 @@ BaseMaterial3D::BaseMaterial3D(bool p_orm) :
set_alpha_hash_scale(1.0);
set_alpha_antialiasing_edge(0.3);
- proximity_fade_enabled = false;
- distance_fade = DISTANCE_FADE_DISABLED;
set_proximity_fade_distance(1);
set_distance_fade_min_distance(0);
set_distance_fade_max_distance(10);
@@ -2710,35 +2704,14 @@ BaseMaterial3D::BaseMaterial3D(bool p_orm) :
set_ao_texture_channel(TEXTURE_CHANNEL_RED);
set_refraction_texture_channel(TEXTURE_CHANNEL_RED);
- grow_enabled = false;
set_grow(0.0);
- deep_parallax = false;
- heightmap_parallax_flip_tangent = false;
- heightmap_parallax_flip_binormal = false;
set_heightmap_deep_parallax_min_layers(8);
set_heightmap_deep_parallax_max_layers(32);
set_heightmap_deep_parallax_flip_tangent(false); //also sets binormal
- detail_uv = DETAIL_UV_1;
- blend_mode = BLEND_MODE_MIX;
- detail_blend_mode = BLEND_MODE_MIX;
- depth_draw_mode = DEPTH_DRAW_OPAQUE_ONLY;
- cull_mode = CULL_BACK;
- for (int i = 0; i < FLAG_MAX; i++) {
- flags[i] = false;
- }
flags[FLAG_USE_TEXTURE_REPEAT] = true;
- diffuse_mode = DIFFUSE_BURLEY;
- specular_mode = SPECULAR_SCHLICK_GGX;
-
- for (int i = 0; i < FEATURE_MAX; i++) {
- features[i] = false;
- }
-
- texture_filter = TEXTURE_FILTER_LINEAR_WITH_MIPMAPS;
-
_queue_shader_change();
}
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 0048b43c8b..70452a5f74 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -330,7 +330,7 @@ private:
struct ShaderData {
RID shader;
- int users;
+ int users = 0;
};
static Map<MaterialKey, ShaderData> shader_map;
@@ -468,16 +468,16 @@ private:
float alpha_scissor_threshold;
float alpha_hash_scale;
float alpha_antialiasing_edge;
- bool grow_enabled;
+ bool grow_enabled = false;
float ao_light_affect;
float grow;
int particles_anim_h_frames;
int particles_anim_v_frames;
bool particles_anim_loop;
- Transparency transparency;
- ShadingMode shading_mode;
+ Transparency transparency = TRANSPARENCY_DISABLED;
+ ShadingMode shading_mode = SHADING_MODE_PER_PIXEL;
- TextureFilter texture_filter;
+ TextureFilter texture_filter = TEXTURE_FILTER_LINEAR_WITH_MIPMAPS;
Vector3 uv1_scale;
Vector3 uv1_offset;
@@ -487,39 +487,39 @@ private:
Vector3 uv2_offset;
float uv2_triplanar_sharpness;
- DetailUV detail_uv;
+ DetailUV detail_uv = DETAIL_UV_1;
- bool deep_parallax;
+ bool deep_parallax = false;
int deep_parallax_min_layers;
int deep_parallax_max_layers;
- bool heightmap_parallax_flip_tangent;
- bool heightmap_parallax_flip_binormal;
+ bool heightmap_parallax_flip_tangent = false;
+ bool heightmap_parallax_flip_binormal = false;
- bool proximity_fade_enabled;
+ bool proximity_fade_enabled = false;
float proximity_fade_distance;
- DistanceFadeMode distance_fade;
+ DistanceFadeMode distance_fade = DISTANCE_FADE_DISABLED;
float distance_fade_max_distance;
float distance_fade_min_distance;
- BlendMode blend_mode;
- BlendMode detail_blend_mode;
- DepthDrawMode depth_draw_mode;
- CullMode cull_mode;
- bool flags[FLAG_MAX];
- SpecularMode specular_mode;
- DiffuseMode diffuse_mode;
+ BlendMode blend_mode = BLEND_MODE_MIX;
+ BlendMode detail_blend_mode = BLEND_MODE_MIX;
+ DepthDrawMode depth_draw_mode = DEPTH_DRAW_OPAQUE_ONLY;
+ CullMode cull_mode = CULL_BACK;
+ bool flags[FLAG_MAX] = {};
+ SpecularMode specular_mode = SPECULAR_SCHLICK_GGX;
+ DiffuseMode diffuse_mode = DIFFUSE_BURLEY;
BillboardMode billboard_mode;
- EmissionOperator emission_op;
+ EmissionOperator emission_op = EMISSION_OP_ADD;
TextureChannel metallic_texture_channel;
TextureChannel roughness_texture_channel;
TextureChannel ao_texture_channel;
TextureChannel refraction_texture_channel;
- AlphaAntiAliasing alpha_antialiasing_mode;
+ AlphaAntiAliasing alpha_antialiasing_mode = ALPHA_ANTIALIASING_OFF;
- bool features[FEATURE_MAX];
+ bool features[FEATURE_MAX] = {};
Ref<Texture2D> textures[TEXTURE_MAX];
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 32fede1e5f..1a2b21299a 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -1095,6 +1095,15 @@ bool ArrayMesh::_get(const StringName &p_name, Variant &r_ret) const {
return true;
}
+void ArrayMesh::reset_state() {
+ clear_surfaces();
+ clear_blend_shapes();
+
+ aabb = AABB();
+ blend_shape_mode = BLEND_SHAPE_MODE_RELATIVE;
+ custom_aabb = AABB();
+}
+
void ArrayMesh::_get_property_list(List<PropertyInfo> *p_list) const {
if (_is_generated()) {
return;
@@ -1156,7 +1165,7 @@ void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const
RenderingServer::get_singleton()->mesh_add_surface(mesh, sd);
clear_cache();
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -1278,7 +1287,6 @@ void ArrayMesh::surface_set_material(int p_idx, const Ref<Material> &p_material)
surfaces.write[p_idx].material = p_material;
RenderingServer::get_singleton()->mesh_surface_set_material(mesh, p_idx, p_material.is_null() ? RID() : p_material->get_rid());
- _change_notify("material");
emit_changed();
}
@@ -1375,8 +1383,8 @@ bool (*array_mesh_lightmap_unwrap_callback)(float p_texel_size, const float *p_v
struct ArrayMeshLightmapSurface {
Ref<Material> material;
LocalVector<SurfaceTool::Vertex> vertices;
- Mesh::PrimitiveType primitive;
- uint32_t format;
+ Mesh::PrimitiveType primitive = Mesh::PrimitiveType::PRIMITIVE_MAX;
+ uint32_t format = 0;
};
Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texel_size) {
@@ -1565,6 +1573,19 @@ Error ArrayMesh::lightmap_unwrap_cached(int *&r_cache_data, unsigned int &r_cach
return OK;
}
+void ArrayMesh::set_shadow_mesh(const Ref<ArrayMesh> &p_mesh) {
+ shadow_mesh = p_mesh;
+ if (shadow_mesh.is_valid()) {
+ RS::get_singleton()->mesh_set_shadow_mesh(mesh, shadow_mesh->get_rid());
+ } else {
+ RS::get_singleton()->mesh_set_shadow_mesh(mesh, RID());
+ }
+}
+
+Ref<ArrayMesh> ArrayMesh::get_shadow_mesh() const {
+ return shadow_mesh;
+}
+
void ArrayMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_blend_shape", "name"), &ArrayMesh::add_blend_shape);
ClassDB::bind_method(D_METHOD("get_blend_shape_count"), &ArrayMesh::get_blend_shape_count);
@@ -1596,6 +1617,9 @@ void ArrayMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_custom_aabb", "aabb"), &ArrayMesh::set_custom_aabb);
ClassDB::bind_method(D_METHOD("get_custom_aabb"), &ArrayMesh::get_custom_aabb);
+ ClassDB::bind_method(D_METHOD("set_shadow_mesh", "mesh"), &ArrayMesh::set_shadow_mesh);
+ ClassDB::bind_method(D_METHOD("get_shadow_mesh"), &ArrayMesh::get_shadow_mesh);
+
ClassDB::bind_method(D_METHOD("_set_blend_shape_names", "blend_shape_names"), &ArrayMesh::_set_blend_shape_names);
ClassDB::bind_method(D_METHOD("_get_blend_shape_names"), &ArrayMesh::_get_blend_shape_names);
@@ -1606,6 +1630,7 @@ void ArrayMesh::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "_surfaces", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_surfaces", "_get_surfaces");
ADD_PROPERTY(PropertyInfo(Variant::INT, "blend_shape_mode", PROPERTY_HINT_ENUM, "Normalized,Relative"), "set_blend_shape_mode", "get_blend_shape_mode");
ADD_PROPERTY(PropertyInfo(Variant::AABB, "custom_aabb", PROPERTY_HINT_NONE, ""), "set_custom_aabb", "get_custom_aabb");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shadow_mesh", PROPERTY_HINT_RESOURCE_TYPE, "ArrayMesh"), "set_shadow_mesh", "get_shadow_mesh");
}
void ArrayMesh::reload_from_file() {
@@ -1616,13 +1641,12 @@ void ArrayMesh::reload_from_file() {
Resource::reload_from_file();
- _change_notify();
+ notify_property_list_changed();
}
ArrayMesh::ArrayMesh() {
//mesh is now created on demand
//mesh = RenderingServer::get_singleton()->mesh_create();
- blend_shape_mode = BLEND_SHAPE_MODE_RELATIVE;
}
ArrayMesh::~ArrayMesh() {
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index 2f25ecd60b..2ce519e644 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -176,23 +176,24 @@ class ArrayMesh : public Mesh {
Array _get_surfaces() const;
void _set_surfaces(const Array &p_data);
+ Ref<ArrayMesh> shadow_mesh;
private:
struct Surface {
- uint32_t format;
- int array_length;
- int index_array_length;
- PrimitiveType primitive;
+ uint32_t format = 0;
+ int array_length = 0;
+ int index_array_length = 0;
+ PrimitiveType primitive = PrimitiveType::PRIMITIVE_MAX;
String name;
AABB aabb;
Ref<Material> material;
- bool is_2d;
+ bool is_2d = false;
};
Vector<Surface> surfaces;
mutable RID mesh;
AABB aabb;
- BlendShapeMode blend_shape_mode;
+ BlendShapeMode blend_shape_mode = BLEND_SHAPE_MODE_RELATIVE;
Vector<StringName> blend_shapes;
AABB custom_aabb;
@@ -206,6 +207,8 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ virtual void reset_state() override;
+
static void _bind_methods();
public:
@@ -259,6 +262,9 @@ public:
virtual void reload_from_file() override;
+ void set_shadow_mesh(const Ref<ArrayMesh> &p_mesh);
+ Ref<ArrayMesh> get_shadow_mesh() const;
+
ArrayMesh();
~ArrayMesh();
diff --git a/scene/resources/mesh_data_tool.h b/scene/resources/mesh_data_tool.h
index d8b8d85900..f5c8f11437 100644
--- a/scene/resources/mesh_data_tool.h
+++ b/scene/resources/mesh_data_tool.h
@@ -36,7 +36,7 @@
class MeshDataTool : public Reference {
GDCLASS(MeshDataTool, Reference);
- int format;
+ int format = 0;
struct Vertex {
Vector3 vertex;
Color color;
@@ -54,7 +54,7 @@ class MeshDataTool : public Reference {
Vector<Vertex> vertices;
struct Edge {
- int vertex[2];
+ int vertex[2] = {};
Vector<int> faces;
Variant meta;
};
@@ -62,8 +62,8 @@ class MeshDataTool : public Reference {
Vector<Edge> edges;
struct Face {
- int v[3];
- int edges[3];
+ int v[3] = {};
+ int edges[3] = {};
Variant meta;
};
diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp
index 96d3a5750e..ad90481fbd 100644
--- a/scene/resources/mesh_library.cpp
+++ b/scene/resources/mesh_library.cpp
@@ -109,14 +109,14 @@ void MeshLibrary::create_item(int p_item) {
ERR_FAIL_COND(p_item < 0);
ERR_FAIL_COND(item_map.has(p_item));
item_map[p_item] = Item();
- _change_notify();
+ notify_property_list_changed();
}
void MeshLibrary::set_item_name(int p_item, const String &p_name) {
ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
item_map[p_item].name = p_name;
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
void MeshLibrary::set_item_mesh(int p_item, const Ref<Mesh> &p_mesh) {
@@ -124,25 +124,25 @@ void MeshLibrary::set_item_mesh(int p_item, const Ref<Mesh> &p_mesh) {
item_map[p_item].mesh = p_mesh;
notify_change_to_owners();
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
void MeshLibrary::set_item_shapes(int p_item, const Vector<ShapeData> &p_shapes) {
ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
item_map[p_item].shapes = p_shapes;
- _change_notify();
+ notify_property_list_changed();
notify_change_to_owners();
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
void MeshLibrary::set_item_navmesh(int p_item, const Ref<NavigationMesh> &p_navmesh) {
ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
item_map[p_item].navmesh = p_navmesh;
- _change_notify();
+ notify_property_list_changed();
notify_change_to_owners();
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
void MeshLibrary::set_item_navmesh_transform(int p_item, const Transform &p_transform) {
@@ -150,14 +150,14 @@ void MeshLibrary::set_item_navmesh_transform(int p_item, const Transform &p_tran
item_map[p_item].navmesh_transform = p_transform;
notify_change_to_owners();
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
void MeshLibrary::set_item_preview(int p_item, const Ref<Texture2D> &p_preview) {
ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
item_map[p_item].preview = p_preview;
emit_changed();
- _change_notify();
+ notify_property_list_changed();
}
String MeshLibrary::get_item_name(int p_item) const {
@@ -198,14 +198,14 @@ void MeshLibrary::remove_item(int p_item) {
ERR_FAIL_COND_MSG(!item_map.has(p_item), "Requested for nonexistent MeshLibrary item '" + itos(p_item) + "'.");
item_map.erase(p_item);
notify_change_to_owners();
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
void MeshLibrary::clear() {
item_map.clear();
notify_change_to_owners();
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -264,6 +264,9 @@ Array MeshLibrary::_get_item_shapes(int p_item) const {
return ret;
}
+void MeshLibrary::reset_state() {
+ clear();
+}
void MeshLibrary::_bind_methods() {
ClassDB::bind_method(D_METHOD("create_item", "id"), &MeshLibrary::create_item);
ClassDB::bind_method(D_METHOD("set_item_name", "id", "name"), &MeshLibrary::set_item_name);
diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h
index 5c302fcf08..1da624c275 100644
--- a/scene/resources/mesh_library.h
+++ b/scene/resources/mesh_library.h
@@ -65,6 +65,7 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ virtual void reset_state() override;
static void _bind_methods();
public:
diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp
index 050e398ca4..4991887eb3 100644
--- a/scene/resources/multimesh.cpp
+++ b/scene/resources/multimesh.cpp
@@ -217,7 +217,7 @@ Ref<Mesh> MultiMesh::get_mesh() const {
void MultiMesh::set_instance_count(int p_count) {
ERR_FAIL_COND(p_count < 0);
- RenderingServer::get_singleton()->multimesh_allocate(multimesh, p_count, RS::MultimeshTransformFormat(transform_format), use_colors, use_custom_data);
+ RenderingServer::get_singleton()->multimesh_allocate_data(multimesh, p_count, RS::MultimeshTransformFormat(transform_format), use_colors, use_custom_data);
instance_count = p_count;
}
@@ -361,11 +361,6 @@ void MultiMesh::_bind_methods() {
MultiMesh::MultiMesh() {
multimesh = RenderingServer::get_singleton()->multimesh_create();
- use_colors = false;
- use_custom_data = false;
- transform_format = TRANSFORM_2D;
- visible_instance_count = -1;
- instance_count = 0;
}
MultiMesh::~MultiMesh() {
diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h
index 633d754b8e..ca5c42d47a 100644
--- a/scene/resources/multimesh.h
+++ b/scene/resources/multimesh.h
@@ -47,11 +47,11 @@ public:
private:
Ref<Mesh> mesh;
RID multimesh;
- TransformFormat transform_format;
- bool use_colors;
- bool use_custom_data;
- int instance_count;
- int visible_instance_count;
+ TransformFormat transform_format = TRANSFORM_2D;
+ bool use_colors = false;
+ bool use_custom_data = false;
+ int instance_count = 0;
+ int visible_instance_count = -1;
protected:
static void _bind_methods();
diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp
index 43c3ef4edc..84f3c23f77 100644
--- a/scene/resources/navigation_mesh.cpp
+++ b/scene/resources/navigation_mesh.cpp
@@ -74,7 +74,7 @@ int NavigationMesh::get_sample_partition_type() const {
void NavigationMesh::set_parsed_geometry_type(int p_value) {
ERR_FAIL_COND(p_value >= PARSED_GEOMETRY_MAX);
parsed_geometry_type = static_cast<ParsedGeometryType>(p_value);
- _change_notify();
+ notify_property_list_changed();
}
int NavigationMesh::get_parsed_geometry_type() const {
@@ -106,7 +106,7 @@ bool NavigationMesh::get_collision_mask_bit(int p_bit) const {
void NavigationMesh::set_source_geometry_mode(int p_geometry_mode) {
ERR_FAIL_INDEX(p_geometry_mode, SOURCE_GEOMETRY_MAX);
source_geometry_mode = static_cast<SourceGeometryMode>(p_geometry_mode);
- _change_notify();
+ notify_property_list_changed();
}
int NavigationMesh::get_source_geometry_mode() const {
@@ -251,7 +251,7 @@ bool NavigationMesh::get_filter_walkable_low_height_spans() const {
void NavigationMesh::set_vertices(const Vector<Vector3> &p_vertices) {
vertices = p_vertices;
- _change_notify();
+ notify_property_list_changed();
}
Vector<Vector3> NavigationMesh::get_vertices() const {
@@ -263,7 +263,7 @@ void NavigationMesh::_set_polygons(const Array &p_array) {
for (int i = 0; i < p_array.size(); i++) {
polygons.write[i].indices = p_array[i];
}
- _change_notify();
+ notify_property_list_changed();
}
Array NavigationMesh::_get_polygons() const {
@@ -280,7 +280,7 @@ void NavigationMesh::add_polygon(const Vector<int> &p_polygon) {
Polygon polygon;
polygon.indices = p_polygon;
polygons.push_back(polygon);
- _change_notify();
+ notify_property_list_changed();
}
int NavigationMesh::get_polygon_count() const {
@@ -510,27 +510,4 @@ void NavigationMesh::_validate_property(PropertyInfo &property) const {
}
}
-NavigationMesh::NavigationMesh() {
- cell_size = 0.3f;
- cell_height = 0.2f;
- agent_height = 2.0f;
- agent_radius = 0.6f;
- agent_max_climb = 0.9f;
- agent_max_slope = 45.0f;
- region_min_size = 8.0f;
- region_merge_size = 20.0f;
- edge_max_length = 12.0f;
- edge_max_error = 1.3f;
- verts_per_poly = 6.0f;
- detail_sample_distance = 6.0f;
- detail_sample_max_error = 1.0f;
-
- partition_type = SAMPLE_PARTITION_WATERSHED;
- parsed_geometry_type = PARSED_GEOMETRY_MESH_INSTANCES;
- collision_mask = 0xFFFFFFFF;
- source_geometry_mode = SOURCE_GEOMETRY_NAVMESH_CHILDREN;
- source_group_name = "navmesh";
- filter_low_hanging_obstacles = false;
- filter_ledge_spans = false;
- filter_walkable_low_height_spans = false;
-}
+NavigationMesh::NavigationMesh() {}
diff --git a/scene/resources/navigation_mesh.h b/scene/resources/navigation_mesh.h
index 693c4184bc..966221c7c6 100644
--- a/scene/resources/navigation_mesh.h
+++ b/scene/resources/navigation_mesh.h
@@ -82,30 +82,30 @@ public:
};
protected:
- float cell_size;
- float cell_height;
- float agent_height;
- float agent_radius;
- float agent_max_climb;
- float agent_max_slope;
- float region_min_size;
- float region_merge_size;
- float edge_max_length;
- float edge_max_error;
- float verts_per_poly;
- float detail_sample_distance;
- float detail_sample_max_error;
-
- SamplePartitionType partition_type;
- ParsedGeometryType parsed_geometry_type;
- uint32_t collision_mask;
-
- SourceGeometryMode source_geometry_mode;
- StringName source_group_name;
-
- bool filter_low_hanging_obstacles;
- bool filter_ledge_spans;
- bool filter_walkable_low_height_spans;
+ float cell_size = 0.3f;
+ float cell_height = 0.2f;
+ float agent_height = 2.0f;
+ float agent_radius = 0.6f;
+ float agent_max_climb = 0.9f;
+ float agent_max_slope = 45.0f;
+ float region_min_size = 8.0f;
+ float region_merge_size = 20.0f;
+ float edge_max_length = 12.0f;
+ float edge_max_error = 1.3f;
+ float verts_per_poly = 6.0f;
+ float detail_sample_distance = 6.0f;
+ float detail_sample_max_error = 1.0f;
+
+ SamplePartitionType partition_type = SAMPLE_PARTITION_WATERSHED;
+ ParsedGeometryType parsed_geometry_type = PARSED_GEOMETRY_MESH_INSTANCES;
+ uint32_t collision_mask = 0xFFFFFFFF;
+
+ SourceGeometryMode source_geometry_mode = SOURCE_GEOMETRY_NAVMESH_CHILDREN;
+ StringName source_group_name = "navmesh";
+
+ bool filter_low_hanging_obstacles = false;
+ bool filter_ledge_spans = false;
+ bool filter_walkable_low_height_spans = false;
public:
// Recast settings
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 794b281100..beb365d44e 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -1589,8 +1589,6 @@ void SceneState::_bind_methods() {
}
SceneState::SceneState() {
- base_scene_idx = -1;
- last_modified_time = 0;
}
////////////////
@@ -1663,6 +1661,9 @@ void PackedScene::set_path(const String &p_path, bool p_take_over) {
Resource::set_path(p_path, p_take_over);
}
+void PackedScene::reset_state() {
+ clear();
+}
void PackedScene::_bind_methods() {
ClassDB::bind_method(D_METHOD("pack", "path"), &PackedScene::pack);
ClassDB::bind_method(D_METHOD("instance", "edit_state"), &PackedScene::instance, DEFVAL(GEN_EDIT_STATE_DISABLED));
diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h
index a31dcd8d39..78a0aeaa9a 100644
--- a/scene/resources/packed_scene.h
+++ b/scene/resources/packed_scene.h
@@ -44,7 +44,7 @@ class SceneState : public Reference {
mutable HashMap<NodePath, int> node_path_cache;
mutable Map<int, int> base_scene_node_remap;
- int base_scene_idx;
+ int base_scene_idx = -1;
enum {
NO_PARENT_SAVED = 0x7FFFFFFF,
@@ -53,16 +53,16 @@ class SceneState : public Reference {
};
struct NodeData {
- int parent;
- int owner;
- int type;
- int name;
- int instance;
- int index;
+ int parent = 0;
+ int owner = 0;
+ int type = 0;
+ int name = 0;
+ int instance = 0;
+ int index = 0;
struct Property {
- int name;
- int value;
+ int name = 0;
+ int value = 0;
};
Vector<Property> properties;
@@ -71,18 +71,17 @@ class SceneState : public Reference {
struct PackState {
Ref<SceneState> state;
- int node;
- PackState() { node = -1; }
+ int node = -1;
};
Vector<NodeData> nodes;
struct ConnectionData {
- int from;
- int to;
- int signal;
- int method;
- int flags;
+ int from = 0;
+ int to = 0;
+ int signal = 0;
+ int method = 0;
+ int flags = 0;
Vector<int> binds;
};
@@ -93,7 +92,7 @@ class SceneState : public Reference {
String path;
- uint64_t last_modified_time;
+ uint64_t last_modified_time = 0;
_FORCE_INLINE_ Ref<SceneState> _get_base_scene_state() const;
@@ -201,6 +200,7 @@ class PackedScene : public Resource {
protected:
virtual bool editor_can_reload_from_file() override { return false; } // this is handled by editor better
static void _bind_methods();
+ virtual void reset_state() override;
public:
enum GenEditState {
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp
index 3aa9f9b3bc..167540eb77 100644
--- a/scene/resources/particles_material.cpp
+++ b/scene/resources/particles_material.cpp
@@ -305,6 +305,7 @@ void ParticlesMaterial::_update_shader() {
code += " ivec2 emission_tex_size = textureSize(emission_texture_points, 0);\n";
code += " ivec2 emission_tex_ofs = ivec2(point % emission_tex_size.x, point / emission_tex_size.x);\n";
}
+ code += " float tv = 0.0;\n";
code += " if (RESTART) {\n";
if (tex_parameters[PARAM_ANGLE].is_valid()) {
@@ -407,64 +408,65 @@ void ParticlesMaterial::_update_shader() {
code += " } else {\n";
code += " CUSTOM.y += DELTA / LIFETIME;\n";
+ code += " tv = CUSTOM.y / CUSTOM.w;\n";
if (tex_parameters[PARAM_INITIAL_LINEAR_VELOCITY].is_valid()) {
- code += " float tex_linear_velocity = textureLod(linear_velocity_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_linear_velocity = textureLod(linear_velocity_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_linear_velocity = 0.0;\n";
}
if (particle_flags[PARTICLE_FLAG_DISABLE_Z]) {
if (tex_parameters[PARAM_ORBIT_VELOCITY].is_valid()) {
- code += " float tex_orbit_velocity = textureLod(orbit_velocity_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_orbit_velocity = textureLod(orbit_velocity_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_orbit_velocity = 0.0;\n";
}
}
if (tex_parameters[PARAM_ANGULAR_VELOCITY].is_valid()) {
- code += " float tex_angular_velocity = textureLod(angular_velocity_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_angular_velocity = textureLod(angular_velocity_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_angular_velocity = 0.0;\n";
}
if (tex_parameters[PARAM_LINEAR_ACCEL].is_valid()) {
- code += " float tex_linear_accel = textureLod(linear_accel_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_linear_accel = textureLod(linear_accel_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_linear_accel = 0.0;\n";
}
if (tex_parameters[PARAM_RADIAL_ACCEL].is_valid()) {
- code += " float tex_radial_accel = textureLod(radial_accel_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_radial_accel = textureLod(radial_accel_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_radial_accel = 0.0;\n";
}
if (tex_parameters[PARAM_TANGENTIAL_ACCEL].is_valid()) {
- code += " float tex_tangent_accel = textureLod(tangent_accel_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_tangent_accel = textureLod(tangent_accel_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_tangent_accel = 0.0;\n";
}
if (tex_parameters[PARAM_DAMPING].is_valid()) {
- code += " float tex_damping = textureLod(damping_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_damping = textureLod(damping_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_damping = 0.0;\n";
}
if (tex_parameters[PARAM_ANGLE].is_valid()) {
- code += " float tex_angle = textureLod(angle_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_angle = textureLod(angle_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_angle = 0.0;\n";
}
if (tex_parameters[PARAM_ANIM_SPEED].is_valid()) {
- code += " float tex_anim_speed = textureLod(anim_speed_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_anim_speed = textureLod(anim_speed_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_anim_speed = 0.0;\n";
}
if (tex_parameters[PARAM_ANIM_OFFSET].is_valid()) {
- code += " float tex_anim_offset = textureLod(anim_offset_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_anim_offset = textureLod(anim_offset_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_anim_offset = 0.0;\n";
}
@@ -526,13 +528,13 @@ void ParticlesMaterial::_update_shader() {
// apply color
// apply hue rotation
if (tex_parameters[PARAM_SCALE].is_valid()) {
- code += " float tex_scale = textureLod(scale_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_scale = textureLod(scale_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_scale = 1.0;\n";
}
if (tex_parameters[PARAM_HUE_VARIATION].is_valid()) {
- code += " float tex_hue_variation = textureLod(hue_variation_texture, vec2(CUSTOM.y, 0.0), 0.0).r;\n";
+ code += " float tex_hue_variation = textureLod(hue_variation_texture, vec2(tv, 0.0), 0.0).r;\n";
} else {
code += " float tex_hue_variation = 0.0;\n";
}
@@ -553,7 +555,7 @@ void ParticlesMaterial::_update_shader() {
code += " vec4(1.250, -1.050, -0.203, 0.0),\n";
code += " vec4(0.000, 0.000, 0.000, 0.0)) * hue_rot_s;\n";
if (color_ramp.is_valid()) {
- code += " COLOR = hue_rot_mat * textureLod(color_ramp, vec2(CUSTOM.y, 0.0), 0.0);\n";
+ code += " COLOR = hue_rot_mat * textureLod(color_ramp, vec2(tv, 0.0), 0.0);\n";
} else {
code += " COLOR = hue_rot_mat * color_value;\n";
}
@@ -909,7 +911,7 @@ void ParticlesMaterial::set_color_ramp(const Ref<Texture2D> &p_texture) {
color_ramp = p_texture;
RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->color_ramp, p_texture);
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
Ref<Texture2D> ParticlesMaterial::get_color_ramp() const {
@@ -921,7 +923,7 @@ void ParticlesMaterial::set_particle_flag(ParticleFlags p_particle_flag, bool p_
particle_flags[p_particle_flag] = p_enable;
_queue_shader_change();
if (p_particle_flag == PARTICLE_FLAG_DISABLE_Z) {
- _change_notify();
+ notify_property_list_changed();
}
}
@@ -933,7 +935,7 @@ bool ParticlesMaterial::get_particle_flag(ParticleFlags p_particle_flag) const {
void ParticlesMaterial::set_emission_shape(EmissionShape p_shape) {
ERR_FAIL_INDEX(p_shape, EMISSION_SHAPE_MAX);
emission_shape = p_shape;
- _change_notify();
+ notify_property_list_changed();
_queue_shader_change();
}
@@ -1064,7 +1066,7 @@ void ParticlesMaterial::_validate_property(PropertyInfo &property) const {
void ParticlesMaterial::set_sub_emitter_mode(SubEmitterMode p_sub_emitter_mode) {
sub_emitter_mode = p_sub_emitter_mode;
_queue_shader_change();
- _change_notify();
+ notify_property_list_changed();
}
ParticlesMaterial::SubEmitterMode ParticlesMaterial::get_sub_emitter_mode() const {
@@ -1368,7 +1370,6 @@ ParticlesMaterial::ParticlesMaterial() :
set_emission_box_extents(Vector3(1, 1, 1));
set_gravity(Vector3(0, -9.8, 0));
set_lifetime_randomness(0);
- emission_point_count = 1;
set_sub_emitter_mode(SUB_EMITTER_DISABLED);
set_sub_emitter_frequency(4);
@@ -1391,7 +1392,6 @@ ParticlesMaterial::ParticlesMaterial() :
set_color(Color(1, 1, 1, 1));
- current_key.key = 0;
current_key.invalid_key = 1;
_queue_shader_change();
diff --git a/scene/resources/particles_material.h b/scene/resources/particles_material.h
index 49b48a01b7..3f874bd68c 100644
--- a/scene/resources/particles_material.h
+++ b/scene/resources/particles_material.h
@@ -100,7 +100,7 @@ private:
uint32_t collision_scale : 1;
};
- uint32_t key;
+ uint32_t key = 0;
bool operator<(const MaterialKey &p_key) const {
return key < p_key.key;
@@ -109,7 +109,7 @@ private:
struct ShaderData {
RID shader;
- int users;
+ int users = 0;
};
static Map<MaterialKey, ShaderData> shader_map;
@@ -235,7 +235,7 @@ private:
Ref<Texture2D> emission_point_texture;
Ref<Texture2D> emission_normal_texture;
Ref<Texture2D> emission_color_texture;
- int emission_point_count;
+ int emission_point_count = 1;
bool anim_loop;
diff --git a/scene/resources/physics_material.h b/scene/resources/physics_material.h
index dfb2d1480b..d302800823 100644
--- a/scene/resources/physics_material.h
+++ b/scene/resources/physics_material.h
@@ -39,9 +39,9 @@ class PhysicsMaterial : public Resource {
OBJ_SAVE_TYPE(PhysicsMaterial);
RES_BASE_EXTENSION("phymat");
- real_t friction = 1;
+ real_t friction = 1.0;
bool rough = false;
- real_t bounce = 0;
+ real_t bounce = 0.0;
bool absorbent = false;
protected:
diff --git a/scene/resources/polygon_path_finder.h b/scene/resources/polygon_path_finder.h
index 410e1dba52..2f3cb634fb 100644
--- a/scene/resources/polygon_path_finder.h
+++ b/scene/resources/polygon_path_finder.h
@@ -39,13 +39,13 @@ class PolygonPathFinder : public Resource {
struct Point {
Vector2 pos;
Set<int> connections;
- float distance;
- float penalty;
- int prev;
+ float distance = 0.0;
+ float penalty = 0.0;
+ int prev = 0;
};
struct Edge {
- int points[2];
+ int points[2] = {};
_FORCE_INLINE_ bool operator<(const Edge &p_edge) const {
if (points[0] == p_edge.points[0]) {
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index a6e9e7b5d2..ba6c4591c9 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -214,7 +214,7 @@ void PrimitiveMesh::set_material(const Ref<Material> &p_material) {
if (!pending_request) {
// just apply it, else it'll happen when _update is called.
RenderingServer::get_singleton()->mesh_surface_set_material(mesh, 0, material.is_null() ? RID() : material->get_rid());
- _change_notify();
+ notify_property_list_changed();
emit_changed();
};
}
@@ -247,18 +247,7 @@ bool PrimitiveMesh::get_flip_faces() const {
}
PrimitiveMesh::PrimitiveMesh() {
- flip_faces = false;
- // defaults
mesh = RenderingServer::get_singleton()->mesh_create();
-
- // assume primitive triangles as the type, correct for all but one and it will change this :)
- primitive_type = Mesh::PRIMITIVE_TRIANGLES;
-
- // make sure we do an update after we've finished constructing our object
- pending_request = true;
-
- array_len = 0;
- index_array_len = 0;
}
PrimitiveMesh::~PrimitiveMesh() {
@@ -304,8 +293,8 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
u = i;
u /= radial_segments;
- x = -sin(u * (Math_PI * 2.0));
- z = cos(u * (Math_PI * 2.0));
+ x = -sin(u * Math_TAU);
+ z = cos(u * Math_TAU);
Vector3 p = Vector3(x * radius * w, y, -z * radius * w);
points.push_back(p + Vector3(0.0, 0.5 * mid_height, 0.0));
@@ -343,8 +332,8 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
u = i;
u /= radial_segments;
- x = -sin(u * (Math_PI * 2.0));
- z = cos(u * (Math_PI * 2.0));
+ x = -sin(u * Math_TAU);
+ z = cos(u * Math_TAU);
Vector3 p = Vector3(x * radius, y, -z * radius);
points.push_back(p);
@@ -383,8 +372,8 @@ void CapsuleMesh::_create_mesh_array(Array &p_arr) const {
float u2 = i;
u2 /= radial_segments;
- x = -sin(u2 * (Math_PI * 2.0));
- z = cos(u2 * (Math_PI * 2.0));
+ x = -sin(u2 * Math_TAU);
+ z = cos(u2 * Math_TAU);
Vector3 p = Vector3(x * radius * w, y, -z * radius * w);
points.push_back(p + Vector3(0.0, -0.5 * mid_height, 0.0));
@@ -468,13 +457,7 @@ int CapsuleMesh::get_rings() const {
return rings;
}
-CapsuleMesh::CapsuleMesh() {
- // defaults
- radius = 1.0;
- mid_height = 1.0;
- radial_segments = 64;
- rings = 8;
-}
+CapsuleMesh::CapsuleMesh() {}
/**
BoxMesh
@@ -725,13 +708,7 @@ int BoxMesh::get_subdivide_depth() const {
return subdivide_d;
}
-BoxMesh::BoxMesh() {
- // defaults
- size = Vector3(2.0, 2.0, 2.0);
- subdivide_w = 0;
- subdivide_h = 0;
- subdivide_d = 0;
-}
+BoxMesh::BoxMesh() {}
/**
CylinderMesh
@@ -769,8 +746,8 @@ void CylinderMesh::_create_mesh_array(Array &p_arr) const {
u = i;
u /= radial_segments;
- x = sin(u * (Math_PI * 2.0));
- z = cos(u * (Math_PI * 2.0));
+ x = sin(u * Math_TAU);
+ z = cos(u * Math_TAU);
Vector3 p = Vector3(x * radius, y, z * radius);
points.push_back(p);
@@ -809,8 +786,8 @@ void CylinderMesh::_create_mesh_array(Array &p_arr) const {
float r = i;
r /= radial_segments;
- x = sin(r * (Math_PI * 2.0));
- z = cos(r * (Math_PI * 2.0));
+ x = sin(r * Math_TAU);
+ z = cos(r * Math_TAU);
u = ((x + 1.0) * 0.25);
v = 0.5 + ((z + 1.0) * 0.25);
@@ -845,8 +822,8 @@ void CylinderMesh::_create_mesh_array(Array &p_arr) const {
float r = i;
r /= radial_segments;
- x = sin(r * (Math_PI * 2.0));
- z = cos(r * (Math_PI * 2.0));
+ x = sin(r * Math_TAU);
+ z = cos(r * Math_TAU);
u = 0.5 + ((x + 1.0) * 0.25);
v = 1.0 - ((z + 1.0) * 0.25);
@@ -938,14 +915,7 @@ int CylinderMesh::get_rings() const {
return rings;
}
-CylinderMesh::CylinderMesh() {
- // defaults
- top_radius = 1.0;
- bottom_radius = 1.0;
- height = 2.0;
- radial_segments = 64;
- rings = 4;
-}
+CylinderMesh::CylinderMesh() {}
/**
PlaneMesh
@@ -1053,12 +1023,7 @@ int PlaneMesh::get_subdivide_depth() const {
return subdivide_d;
}
-PlaneMesh::PlaneMesh() {
- // defaults
- size = Size2(2.0, 2.0);
- subdivide_w = 0;
- subdivide_d = 0;
-}
+PlaneMesh::PlaneMesh() {}
/**
PrismMesh
@@ -1338,14 +1303,7 @@ int PrismMesh::get_subdivide_depth() const {
return subdivide_d;
}
-PrismMesh::PrismMesh() {
- // defaults
- left_to_right = 0.5;
- size = Vector3(2.0, 2.0, 2.0);
- subdivide_w = 0;
- subdivide_h = 0;
- subdivide_d = 0;
-}
+PrismMesh::PrismMesh() {}
/**
QuadMesh
@@ -1409,7 +1367,6 @@ void QuadMesh::_bind_methods() {
QuadMesh::QuadMesh() {
primitive_type = PRIMITIVE_TRIANGLES;
- size = Size2(1.0, 1.0);
}
void QuadMesh::set_size(const Size2 &p_size) {
@@ -1458,8 +1415,8 @@ void SphereMesh::_create_mesh_array(Array &p_arr) const {
float u = i;
u /= radial_segments;
- x = sin(u * (Math_PI * 2.0));
- z = cos(u * (Math_PI * 2.0));
+ x = sin(u * Math_TAU);
+ z = cos(u * Math_TAU);
if (is_hemisphere && y < 0.0) {
points.push_back(Vector3(x * radius * w, 0.0, z * radius * w));
@@ -1561,14 +1518,7 @@ bool SphereMesh::get_is_hemisphere() const {
return is_hemisphere;
}
-SphereMesh::SphereMesh() {
- // defaults
- radius = 1.0;
- height = 2.0;
- radial_segments = 64;
- rings = 32;
- is_hemisphere = false;
-}
+SphereMesh::SphereMesh() {}
/**
PointMesh
diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h
index d0ca4b10e7..bb3df9d10e 100644
--- a/scene/resources/primitive_meshes.h
+++ b/scene/resources/primitive_meshes.h
@@ -49,17 +49,19 @@ private:
mutable AABB aabb;
AABB custom_aabb;
- mutable int array_len;
- mutable int index_array_len;
+ mutable int array_len = 0;
+ mutable int index_array_len = 0;
Ref<Material> material;
- bool flip_faces;
+ bool flip_faces = false;
- mutable bool pending_request;
+ // make sure we do an update after we've finished constructing our object
+ mutable bool pending_request = true;
void _update() const;
protected:
- Mesh::PrimitiveType primitive_type;
+ // assume primitive triangles as the type, correct for all but one and it will change this :)
+ Mesh::PrimitiveType primitive_type = Mesh::PRIMITIVE_TRIANGLES;
static void _bind_methods();
@@ -104,10 +106,10 @@ class CapsuleMesh : public PrimitiveMesh {
GDCLASS(CapsuleMesh, PrimitiveMesh);
private:
- float radius;
- float mid_height;
- int radial_segments;
- int rings;
+ float radius = 1.0;
+ float mid_height = 1.0;
+ int radial_segments = 64;
+ int rings = 8;
protected:
static void _bind_methods();
@@ -136,10 +138,10 @@ class BoxMesh : public PrimitiveMesh {
GDCLASS(BoxMesh, PrimitiveMesh);
private:
- Vector3 size;
- int subdivide_w;
- int subdivide_h;
- int subdivide_d;
+ Vector3 size = Vector3(2.0, 2.0, 2.0);
+ int subdivide_w = 0;
+ int subdivide_h = 0;
+ int subdivide_d = 0;
protected:
static void _bind_methods();
@@ -169,11 +171,11 @@ class CylinderMesh : public PrimitiveMesh {
GDCLASS(CylinderMesh, PrimitiveMesh);
private:
- float top_radius;
- float bottom_radius;
- float height;
- int radial_segments;
- int rings;
+ float top_radius = 1.0;
+ float bottom_radius = 1.0;
+ float height = 2.0;
+ int radial_segments = 64;
+ int rings = 4;
protected:
static void _bind_methods();
@@ -205,9 +207,9 @@ class PlaneMesh : public PrimitiveMesh {
GDCLASS(PlaneMesh, PrimitiveMesh);
private:
- Size2 size;
- int subdivide_w;
- int subdivide_d;
+ Size2 size = Size2(2.0, 2.0);
+ int subdivide_w = 0;
+ int subdivide_d = 0;
protected:
static void _bind_methods();
@@ -233,11 +235,11 @@ class PrismMesh : public PrimitiveMesh {
GDCLASS(PrismMesh, PrimitiveMesh);
private:
- float left_to_right;
- Vector3 size;
- int subdivide_w;
- int subdivide_h;
- int subdivide_d;
+ float left_to_right = 0.5;
+ Vector3 size = Vector3(2.0, 2.0, 2.0);
+ int subdivide_w = 0;
+ int subdivide_h = 0;
+ int subdivide_d = 0;
protected:
static void _bind_methods();
@@ -270,7 +272,7 @@ class QuadMesh : public PrimitiveMesh {
GDCLASS(QuadMesh, PrimitiveMesh);
private:
- Size2 size;
+ Size2 size = Size2(1.0, 1.0);
protected:
static void _bind_methods();
@@ -290,11 +292,11 @@ class SphereMesh : public PrimitiveMesh {
GDCLASS(SphereMesh, PrimitiveMesh);
private:
- float radius;
- float height;
- int radial_segments;
- int rings;
- bool is_hemisphere;
+ float radius = 1.0;
+ float height = 2.0;
+ int radial_segments = 64;
+ int rings = 32;
+ bool is_hemisphere = false;
protected:
static void _bind_methods();
diff --git a/scene/resources/ray_shape_2d.cpp b/scene/resources/ray_shape_2d.cpp
index 98fd160810..d2125445fa 100644
--- a/scene/resources/ray_shape_2d.cpp
+++ b/scene/resources/ray_shape_2d.cpp
@@ -45,7 +45,7 @@ void RayShape2D::draw(const RID &p_to_rid, const Color &p_color) {
Vector2 tip = Vector2(0, get_length());
RS::get_singleton()->canvas_item_add_line(p_to_rid, Vector2(), tip, p_color, 3);
Vector<Vector2> pts;
- float tsize = 4;
+ float tsize = 4.0;
pts.push_back(tip + Vector2(0, tsize));
pts.push_back(tip + Vector2(Math_SQRT12 * tsize, 0));
pts.push_back(tip + Vector2(-Math_SQRT12 * tsize, 0));
@@ -99,7 +99,5 @@ bool RayShape2D::get_slips_on_slope() const {
RayShape2D::RayShape2D() :
Shape2D(PhysicsServer2D::get_singleton()->ray_shape_create()) {
- length = 20;
- slips_on_slope = false;
_update_shape();
}
diff --git a/scene/resources/ray_shape_2d.h b/scene/resources/ray_shape_2d.h
index 3570b7be52..56ecfa2722 100644
--- a/scene/resources/ray_shape_2d.h
+++ b/scene/resources/ray_shape_2d.h
@@ -36,8 +36,8 @@
class RayShape2D : public Shape2D {
GDCLASS(RayShape2D, Shape2D);
- real_t length;
- bool slips_on_slope;
+ real_t length = 20.0;
+ bool slips_on_slope = false;
void _update_shape();
diff --git a/scene/resources/ray_shape_3d.cpp b/scene/resources/ray_shape_3d.cpp
index a332bb575f..5446b4daab 100644
--- a/scene/resources/ray_shape_3d.cpp
+++ b/scene/resources/ray_shape_3d.cpp
@@ -56,7 +56,6 @@ void RayShape3D::set_length(float p_length) {
length = p_length;
_update_shape();
notify_change_to_owners();
- _change_notify("length");
}
float RayShape3D::get_length() const {
@@ -67,7 +66,6 @@ void RayShape3D::set_slips_on_slope(bool p_active) {
slips_on_slope = p_active;
_update_shape();
notify_change_to_owners();
- _change_notify("slips_on_slope");
}
bool RayShape3D::get_slips_on_slope() const {
@@ -87,12 +85,7 @@ void RayShape3D::_bind_methods() {
RayShape3D::RayShape3D() :
Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_RAY)) {
- length = 1.0;
- slips_on_slope = false;
-
/* Code copied from setters to prevent the use of uninitialized variables */
_update_shape();
notify_change_to_owners();
- _change_notify("length");
- _change_notify("slips_on_slope");
}
diff --git a/scene/resources/ray_shape_3d.h b/scene/resources/ray_shape_3d.h
index 2c27d56c63..2da6311321 100644
--- a/scene/resources/ray_shape_3d.h
+++ b/scene/resources/ray_shape_3d.h
@@ -34,8 +34,8 @@
class RayShape3D : public Shape3D {
GDCLASS(RayShape3D, Shape3D);
- float length;
- bool slips_on_slope;
+ float length = 1.0;
+ bool slips_on_slope = false;
protected:
static void _bind_methods();
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 433e3392e3..7ca532e1d6 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -114,23 +114,8 @@ Error ResourceLoaderText::_parse_sub_resource(VariantParser::Stream *p_stream, R
}
int index = token.value;
-
- if (use_nocache) {
- r_res = int_resources[index];
- } else {
- String path = local_path + "::" + itos(index);
-
- if (!ignore_resource_parsing) {
- if (!ResourceCache::has(path)) {
- r_err_str = "Can't load cached sub-resource: " + path;
- return ERR_PARSE_ERROR;
- }
-
- r_res = RES(ResourceCache::get(path));
- } else {
- r_res = RES();
- }
- }
+ ERR_FAIL_COND_V(!int_resources.has(index), ERR_INVALID_PARAMETER);
+ r_res = int_resources[index];
VariantParser::get_token(p_stream, token, line, r_err_str);
if (token.type != VariantParser::TK_PARENTHESIS_CLOSE) {
@@ -440,7 +425,7 @@ Error ResourceLoaderText::load() {
er.type = type;
if (use_sub_threads) {
- Error err = ResourceLoader::load_threaded_request(path, type, use_sub_threads, local_path);
+ Error err = ResourceLoader::load_threaded_request(path, type, use_sub_threads, ResourceFormatLoader::CACHE_MODE_REUSE, local_path);
if (err != OK) {
if (ResourceLoader::get_abort_on_missing_resources()) {
@@ -517,29 +502,44 @@ Error ResourceLoaderText::load() {
//bool exists=ResourceCache::has(path);
Ref<Resource> res;
+ bool do_assign = false;
- if (use_nocache || !ResourceCache::has(path)) { //only if it doesn't exist
-
- Object *obj = ClassDB::instance(type);
- if (!obj) {
- error_text += "Can't create sub resource of type: " + type;
- _printerr();
- error = ERR_FILE_CORRUPT;
- return error;
+ if (cache_mode == ResourceFormatLoader::CACHE_MODE_REPLACE && ResourceCache::has(path)) {
+ //reuse existing
+ Resource *r = ResourceCache::get(path);
+ if (r && r->get_class() == type) {
+ res = Ref<Resource>(r);
+ res->reset_state();
+ do_assign = true;
}
+ }
- Resource *r = Object::cast_to<Resource>(obj);
- if (!r) {
- error_text += "Can't create sub resource of type, because not a resource: " + type;
- _printerr();
- error = ERR_FILE_CORRUPT;
- return error;
- }
+ if (res.is_null()) { //not reuse
+ if (cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE && ResourceCache::has(path)) { //only if it doesn't exist
+ //cached, do not assign
+ Resource *r = ResourceCache::get(path);
+ res = Ref<Resource>(r);
+ } else {
+ //create
- res = Ref<Resource>(r);
- int_resources[id] = res;
- if (!use_nocache) {
- res->set_path(path);
+ Object *obj = ClassDB::instance(type);
+ if (!obj) {
+ error_text += "Can't create sub resource of type: " + type;
+ _printerr();
+ error = ERR_FILE_CORRUPT;
+ return error;
+ }
+
+ Resource *r = Object::cast_to<Resource>(obj);
+ if (!r) {
+ error_text += "Can't create sub resource of type, because not a resource: " + type;
+ _printerr();
+ error = ERR_FILE_CORRUPT;
+ return error;
+ }
+
+ res = Ref<Resource>(r);
+ do_assign = true;
}
}
@@ -557,7 +557,7 @@ Error ResourceLoaderText::load() {
}
if (assign != String()) {
- if (res.is_valid()) {
+ if (do_assign) {
res->set(assign, value);
}
//it's assignment
@@ -572,6 +572,11 @@ Error ResourceLoaderText::load() {
}
}
+ int_resources[id] = res; //always assign int resources
+ if (do_assign && cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE) {
+ res->set_path(path, cache_mode == ResourceFormatLoader::CACHE_MODE_REPLACE);
+ }
+
if (progress && resources_total > 0) {
*progress = resource_current / float(resources_total);
}
@@ -589,23 +594,33 @@ Error ResourceLoaderText::load() {
return error;
}
- Object *obj = ClassDB::instance(res_type);
- if (!obj) {
- error_text += "Can't create sub resource of type: " + res_type;
- _printerr();
- error = ERR_FILE_CORRUPT;
- return error;
+ if (cache_mode == ResourceFormatLoader::CACHE_MODE_REPLACE && ResourceCache::has(local_path)) {
+ Resource *r = ResourceCache::get(local_path);
+ if (r->get_class() == res_type) {
+ r->reset_state();
+ resource = Ref<Resource>(r);
+ }
}
- Resource *r = Object::cast_to<Resource>(obj);
- if (!r) {
- error_text += "Can't create sub resource of type, because not a resource: " + res_type;
- _printerr();
- error = ERR_FILE_CORRUPT;
- return error;
- }
+ if (!resource.is_valid()) {
+ Object *obj = ClassDB::instance(res_type);
+ if (!obj) {
+ error_text += "Can't create sub resource of type: " + res_type;
+ _printerr();
+ error = ERR_FILE_CORRUPT;
+ return error;
+ }
+
+ Resource *r = Object::cast_to<Resource>(obj);
+ if (!r) {
+ error_text += "Can't create sub resource of type, because not a resource: " + res_type;
+ _printerr();
+ error = ERR_FILE_CORRUPT;
+ return error;
+ }
- resource = Ref<Resource>(r);
+ resource = Ref<Resource>(r);
+ }
resource_current++;
@@ -620,7 +635,7 @@ Error ResourceLoaderText::load() {
_printerr();
} else {
error = OK;
- if (!use_nocache) {
+ if (cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE) {
if (!ResourceCache::has(res_path)) {
resource->set_path(res_path);
}
@@ -668,7 +683,7 @@ Error ResourceLoaderText::load() {
error = OK;
//get it here
resource = packed_scene;
- if (!use_nocache && !ResourceCache::has(res_path)) {
+ if (cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE && !ResourceCache::has(res_path)) {
packed_scene->set_path(res_path);
}
@@ -699,18 +714,7 @@ void ResourceLoaderText::set_translation_remapped(bool p_remapped) {
translation_remapped = p_remapped;
}
-ResourceLoaderText::ResourceLoaderText() {
- use_nocache = false;
-
- resources_total = 0;
- resource_current = 0;
-
- progress = nullptr;
- lines = false;
- translation_remapped = false;
- use_sub_threads = false;
- error = OK;
-}
+ResourceLoaderText::ResourceLoaderText() {}
ResourceLoaderText::~ResourceLoaderText() {
memdelete(f);
@@ -1252,7 +1256,7 @@ String ResourceLoaderText::recognize(FileAccess *p_f) {
/////////////////////
-RES ResourceFormatLoaderText::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderText::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_CANT_OPEN;
}
@@ -1265,7 +1269,7 @@ RES ResourceFormatLoaderText::load(const String &p_path, const String &p_origina
ResourceLoaderText loader;
String path = p_original_path != "" ? p_original_path : p_path;
- loader.use_nocache = p_no_cache;
+ loader.cache_mode = p_cache_mode;
loader.use_sub_threads = p_use_sub_threads;
loader.local_path = ProjectSettings::get_singleton()->localize_path(path);
loader.progress = r_progress;
diff --git a/scene/resources/resource_format_text.h b/scene/resources/resource_format_text.h
index e67a13d41a..2dc683415d 100644
--- a/scene/resources/resource_format_text.h
+++ b/scene/resources/resource_format_text.h
@@ -38,12 +38,12 @@
#include "scene/resources/packed_scene.h"
class ResourceLoaderText {
- bool translation_remapped;
+ bool translation_remapped = false;
String local_path;
String res_path;
String error_text;
- FileAccess *f;
+ FileAccess *f = nullptr;
VariantParser::StreamFile stream;
@@ -53,28 +53,28 @@ class ResourceLoaderText {
String type;
};
- bool is_scene;
+ bool is_scene = false;
String res_type;
- bool ignore_resource_parsing;
+ bool ignore_resource_parsing = false;
//Map<String,String> remaps;
Map<int, ExtResource> ext_resources;
Map<int, RES> int_resources;
- int resources_total;
- int resource_current;
+ int resources_total = 0;
+ int resource_current = 0;
String resource_type;
VariantParser::Tag next_tag;
- bool use_nocache;
+ ResourceFormatLoader::CacheMode cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE;
- bool use_sub_threads;
- float *progress;
+ bool use_sub_threads = false;
+ float *progress = nullptr;
- mutable int lines;
+ mutable int lines = 0;
Map<String, String> remaps;
//void _printerr();
@@ -107,7 +107,7 @@ class ResourceLoaderText {
friend class ResourceFormatLoaderText;
- Error error;
+ Error error = OK;
RES resource;
@@ -134,7 +134,7 @@ public:
class ResourceFormatLoaderText : public ResourceFormatLoader {
public:
static ResourceFormatLoaderText *singleton;
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
@@ -152,11 +152,11 @@ class ResourceFormatSaverTextInstance {
Ref<PackedScene> packed_scene;
- bool takeover_paths;
- bool relative_paths;
- bool bundle_resources;
- bool skip_editor;
- FileAccess *f;
+ bool takeover_paths = false;
+ bool relative_paths = false;
+ bool bundle_resources = false;
+ bool skip_editor = false;
+ FileAccess *f = nullptr;
struct NonPersistentKey { //for resource properties generated on the fly
RES base;
@@ -173,7 +173,7 @@ class ResourceFormatSaverTextInstance {
struct ResourceSort {
RES resource;
- int index;
+ int index = 0;
bool operator<(const ResourceSort &p_right) const {
return index < p_right.index;
}
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index 53f3dd1a4b..77c6199794 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -152,9 +152,7 @@ void Shader::_bind_methods() {
}
Shader::Shader() {
- mode = MODE_SPATIAL;
shader = RenderingServer::get_singleton()->shader_create();
- params_cache_dirty = true;
}
Shader::~Shader() {
@@ -163,7 +161,7 @@ Shader::~Shader() {
////////////
-RES ResourceFormatLoaderShader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderShader::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
if (r_error) {
*r_error = ERR_FILE_CANT_OPEN;
}
diff --git a/scene/resources/shader.h b/scene/resources/shader.h
index a3f9330055..6563181ca2 100644
--- a/scene/resources/shader.h
+++ b/scene/resources/shader.h
@@ -51,12 +51,12 @@ public:
private:
RID shader;
- Mode mode;
+ Mode mode = MODE_SPATIAL;
// hack the name of performance
// shaders keep a list of ShaderMaterial -> RenderingServer name translations, to make
// conversion fast and save memory.
- mutable bool params_cache_dirty;
+ mutable bool params_cache_dirty = true;
mutable Map<StringName, StringName> params_cache; //map a shader param to a material param..
Map<StringName, Ref<Texture2D>> default_textures;
@@ -102,7 +102,7 @@ VARIANT_ENUM_CAST(Shader::Mode);
class ResourceFormatLoaderShader : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp
index 6f3897b0cd..f8a5855d33 100644
--- a/scene/resources/shape_2d.cpp
+++ b/scene/resources/shape_2d.cpp
@@ -107,7 +107,6 @@ void Shape2D::_bind_methods() {
Shape2D::Shape2D(const RID &p_rid) {
shape = p_rid;
- custom_bias = 0;
}
Shape2D::~Shape2D() {
diff --git a/scene/resources/shape_2d.h b/scene/resources/shape_2d.h
index f5814c42f8..7b00e7e426 100644
--- a/scene/resources/shape_2d.h
+++ b/scene/resources/shape_2d.h
@@ -38,7 +38,7 @@ class Shape2D : public Resource {
OBJ_SAVE_TYPE(Shape2D);
RID shape;
- real_t custom_bias;
+ real_t custom_bias = 0.0;
protected:
static void _bind_methods();
diff --git a/scene/resources/skin.cpp b/scene/resources/skin.cpp
index e2df965138..fee8fdbde2 100644
--- a/scene/resources/skin.cpp
+++ b/scene/resources/skin.cpp
@@ -58,7 +58,7 @@ void Skin::set_bind_name(int p_index, const StringName &p_name) {
binds_ptr[p_index].name = p_name;
emit_changed();
if (notify_change) {
- _change_notify();
+ notify_property_list_changed();
}
}
@@ -81,6 +81,10 @@ void Skin::clear_binds() {
emit_changed();
}
+void Skin::reset_state() {
+ clear_binds();
+}
+
bool Skin::_set(const StringName &p_name, const Variant &p_value) {
String name = p_name;
if (name == "bind_count") {
@@ -153,6 +157,4 @@ void Skin::_bind_methods() {
}
Skin::Skin() {
- bind_count = 0;
- binds_ptr = nullptr;
}
diff --git a/scene/resources/skin.h b/scene/resources/skin.h
index 64fe24bbe4..f5d64f96aa 100644
--- a/scene/resources/skin.h
+++ b/scene/resources/skin.h
@@ -44,14 +44,15 @@ class Skin : public Resource {
Vector<Bind> binds;
- Bind *binds_ptr;
- int bind_count;
+ Bind *binds_ptr = nullptr;
+ int bind_count = 0;
protected:
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ virtual void reset_state() override;
static void _bind_methods();
public:
diff --git a/scene/resources/sky.cpp b/scene/resources/sky.cpp
index 8fcd92bb89..71424ba8ac 100644
--- a/scene/resources/sky.cpp
+++ b/scene/resources/sky.cpp
@@ -102,8 +102,6 @@ void Sky::_bind_methods() {
}
Sky::Sky() {
- mode = PROCESS_MODE_AUTOMATIC;
- radiance_size = RADIANCE_SIZE_256;
sky = RS::get_singleton()->sky_create();
}
diff --git a/scene/resources/sky.h b/scene/resources/sky.h
index 46f645a53d..f0226d321d 100644
--- a/scene/resources/sky.h
+++ b/scene/resources/sky.h
@@ -59,8 +59,8 @@ public:
private:
RID sky;
- ProcessMode mode;
- RadianceSize radiance_size;
+ ProcessMode mode = PROCESS_MODE_AUTOMATIC;
+ RadianceSize radiance_size = RADIANCE_SIZE_256;
Ref<Material> sky_material;
protected:
diff --git a/scene/resources/sky_material.cpp b/scene/resources/sky_material.cpp
index 1cdabe4662..b2efecb1cb 100644
--- a/scene/resources/sky_material.cpp
+++ b/scene/resources/sky_material.cpp
@@ -522,53 +522,59 @@ PhysicalSkyMaterial::PhysicalSkyMaterial() {
code += "}\n\n";
code += "void fragment() {\n";
- code += "\tfloat zenith_angle = clamp( dot(UP, normalize(LIGHT0_DIRECTION)), -1.0, 1.0 );\n";
- code += "\tfloat sun_energy = max(0.0, 1.0 - exp(-((PI * 0.5) - acos(zenith_angle)))) * SUN_ENERGY * LIGHT0_ENERGY;\n";
- code += "\tfloat sun_fade = 1.0 - clamp(1.0 - exp(LIGHT0_DIRECTION.y), 0.0, 1.0);\n\n";
-
- code += "\t// rayleigh coefficients\n";
- code += "\tfloat rayleigh_coefficient = rayleigh - ( 1.0 * ( 1.0 - sun_fade ) );\n";
- code += "\tvec3 rayleigh_beta = rayleigh_coefficient * rayleigh_color.rgb * 0.0001;\n";
- code += "\t// mie coefficients from Preetham\n";
- code += "\tvec3 mie_beta = turbidity * mie * mie_color.rgb * 0.000434;\n\n";
-
- code += "\t// optical length\n";
- code += "\tfloat zenith = acos(max(0.0, dot(UP, EYEDIR)));\n";
- code += "\tfloat optical_mass = 1.0 / (cos(zenith) + 0.15 * pow(93.885 - degrees(zenith), -1.253));\n";
- code += "\tfloat rayleigh_scatter = rayleigh_zenith_size * optical_mass;\n";
- code += "\tfloat mie_scatter = mie_zenith_size * optical_mass;\n\n";
-
- code += "\t// light extinction based on thickness of atmosphere\n";
- code += "\tvec3 extinction = exp(-(rayleigh_beta * rayleigh_scatter + mie_beta * mie_scatter));\n\n";
-
- code += "\t// in scattering\n";
- code += "\tfloat cos_theta = dot(EYEDIR, normalize(LIGHT0_DIRECTION));\n\n";
-
- code += "\tfloat rayleigh_phase = (3.0 / (16.0 * PI)) * (1.0 + pow(cos_theta * 0.5 + 0.5, 2.0));\n";
- code += "\tvec3 betaRTheta = rayleigh_beta * rayleigh_phase;\n\n";
-
- code += "\tfloat mie_phase = henyey_greenstein(cos_theta, mie_eccentricity);\n";
- code += "\tvec3 betaMTheta = mie_beta * mie_phase;\n\n";
-
- code += "\tvec3 Lin = pow(sun_energy * ((betaRTheta + betaMTheta) / (rayleigh_beta + mie_beta)) * (1.0 - extinction), vec3(1.5));\n";
- code += "\t// Hack from https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Sky.js\n";
- code += "\tLin *= mix(vec3(1.0), pow(sun_energy * ((betaRTheta + betaMTheta) / (rayleigh_beta + mie_beta)) * extinction, vec3(0.5)), clamp(pow(1.0 - zenith_angle, 5.0), 0.0, 1.0));\n\n";
-
- code += "\t// Hack in the ground color\n";
- code += "\tLin *= mix(ground_color.rgb, vec3(1.0), smoothstep(-0.1, 0.1, dot(UP, EYEDIR)));\n\n";
-
- code += "\t// Solar disk and out-scattering\n";
- code += "\tfloat sunAngularDiameterCos = cos(LIGHT0_SIZE * sun_disk_scale);\n";
- code += "\tfloat sunAngularDiameterCos2 = cos(LIGHT0_SIZE * sun_disk_scale*0.5);\n";
- code += "\tfloat sundisk = smoothstep(sunAngularDiameterCos, sunAngularDiameterCos2, cos_theta);\n";
- code += "\tvec3 L0 = (sun_energy * 1900.0 * extinction) * sundisk * LIGHT0_COLOR;\n";
- code += "\tL0 += texture(night_sky, SKY_COORDS).xyz * extinction;\n\n";
-
- code += "\tvec3 color = (Lin + L0) * 0.04;\n";
- code += "\tCOLOR = pow(color, vec3(1.0 / (1.2 + (1.2 * sun_fade))));\n";
- code += "\tCOLOR *= exposure;\n";
- code += "\t// Make optional, eliminates banding\n";
- code += "\tCOLOR += (hash(EYEDIR * 1741.9782) * 0.08 - 0.04) * 0.016 * dither_strength;\n";
+ code += "\tif (LIGHT0_ENABLED) {\n";
+ code += "\t\tfloat zenith_angle = clamp( dot(UP, normalize(LIGHT0_DIRECTION)), -1.0, 1.0 );\n";
+ code += "\t\tfloat sun_energy = max(0.0, 1.0 - exp(-((PI * 0.5) - acos(zenith_angle)))) * SUN_ENERGY * LIGHT0_ENERGY;\n";
+ code += "\t\tfloat sun_fade = 1.0 - clamp(1.0 - exp(LIGHT0_DIRECTION.y), 0.0, 1.0);\n\n";
+
+ code += "\t\t// rayleigh coefficients\n";
+ code += "\t\tfloat rayleigh_coefficient = rayleigh - ( 1.0 * ( 1.0 - sun_fade ) );\n";
+ code += "\t\tvec3 rayleigh_beta = rayleigh_coefficient * rayleigh_color.rgb * 0.0001;\n";
+ code += "\t\t// mie coefficients from Preetham\n";
+ code += "\t\tvec3 mie_beta = turbidity * mie * mie_color.rgb * 0.000434;\n\n";
+
+ code += "\t\t// optical length\n";
+ code += "\t\tfloat zenith = acos(max(0.0, dot(UP, EYEDIR)));\n";
+ code += "\t\tfloat optical_mass = 1.0 / (cos(zenith) + 0.15 * pow(93.885 - degrees(zenith), -1.253));\n";
+ code += "\t\tfloat rayleigh_scatter = rayleigh_zenith_size * optical_mass;\n";
+ code += "\t\tfloat mie_scatter = mie_zenith_size * optical_mass;\n\n";
+
+ code += "\t\t// light extinction based on thickness of atmosphere\n";
+ code += "\t\tvec3 extinction = exp(-(rayleigh_beta * rayleigh_scatter + mie_beta * mie_scatter));\n\n";
+
+ code += "\t\t// in scattering\n";
+ code += "\t\tfloat cos_theta = dot(EYEDIR, normalize(LIGHT0_DIRECTION));\n\n";
+
+ code += "\t\tfloat rayleigh_phase = (3.0 / (16.0 * PI)) * (1.0 + pow(cos_theta * 0.5 + 0.5, 2.0));\n";
+ code += "\t\tvec3 betaRTheta = rayleigh_beta * rayleigh_phase;\n\n";
+
+ code += "\t\tfloat mie_phase = henyey_greenstein(cos_theta, mie_eccentricity);\n";
+ code += "\t\tvec3 betaMTheta = mie_beta * mie_phase;\n\n";
+
+ code += "\t\tvec3 Lin = pow(sun_energy * ((betaRTheta + betaMTheta) / (rayleigh_beta + mie_beta)) * (1.0 - extinction), vec3(1.5));\n";
+ code += "\t\t// Hack from https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Sky.js\n";
+ code += "\t\tLin *= mix(vec3(1.0), pow(sun_energy * ((betaRTheta + betaMTheta) / (rayleigh_beta + mie_beta)) * extinction, vec3(0.5)), clamp(pow(1.0 - zenith_angle, 5.0), 0.0, 1.0));\n\n";
+
+ code += "\t\t// Hack in the ground color\n";
+ code += "\t\tLin *= mix(ground_color.rgb, vec3(1.0), smoothstep(-0.1, 0.1, dot(UP, EYEDIR)));\n\n";
+
+ code += "\t\t// Solar disk and out-scattering\n";
+ code += "\t\tfloat sunAngularDiameterCos = cos(LIGHT0_SIZE * sun_disk_scale);\n";
+ code += "\t\tfloat sunAngularDiameterCos2 = cos(LIGHT0_SIZE * sun_disk_scale*0.5);\n";
+ code += "\t\tfloat sundisk = smoothstep(sunAngularDiameterCos, sunAngularDiameterCos2, cos_theta);\n";
+ code += "\t\tvec3 L0 = (sun_energy * 1900.0 * extinction) * sundisk * LIGHT0_COLOR;\n";
+ code += "\t\tL0 += texture(night_sky, SKY_COORDS).xyz * extinction;\n\n";
+
+ code += "\t\tvec3 color = (Lin + L0) * 0.04;\n";
+ code += "\t\tCOLOR = pow(color, vec3(1.0 / (1.2 + (1.2 * sun_fade))));\n";
+ code += "\t\tCOLOR *= exposure;\n";
+ code += "\t\t// Make optional, eliminates banding\n";
+ code += "\t\tCOLOR += (hash(EYEDIR * 1741.9782) * 0.08 - 0.04) * 0.016 * dither_strength;\n";
+ code += "\t} else {\n";
+ code += "\t\t// There is no sun, so display night_sky and nothing else\n";
+ code += "\t\tCOLOR = texture(night_sky, SKY_COORDS).xyz * 0.04;\n";
+ code += "\t\tCOLOR *= exposure;\n";
+ code += "\t}\n";
code += "}\n";
shader = RS::get_singleton()->shader_create();
@@ -591,5 +597,4 @@ PhysicalSkyMaterial::PhysicalSkyMaterial() {
PhysicalSkyMaterial::~PhysicalSkyMaterial() {
RS::get_singleton()->free(shader);
- RS::get_singleton()->material_set_shader(_get_material(), RID());
}
diff --git a/scene/resources/sphere_shape_3d.cpp b/scene/resources/sphere_shape_3d.cpp
index 008cb3e1d6..e4b4398063 100644
--- a/scene/resources/sphere_shape_3d.cpp
+++ b/scene/resources/sphere_shape_3d.cpp
@@ -66,7 +66,6 @@ void SphereShape3D::set_radius(float p_radius) {
radius = p_radius;
_update_shape();
notify_change_to_owners();
- _change_notify("radius");
}
float SphereShape3D::get_radius() const {
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index a9d8eeef1c..9b80224c3f 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -123,7 +123,6 @@ void StyleBoxTexture::set_texture(Ref<Texture2D> p_texture) {
}
emit_signal("texture_changed");
emit_changed();
- _change_notify("texture");
}
Ref<Texture2D> StyleBoxTexture::get_texture() const {
@@ -135,13 +134,6 @@ void StyleBoxTexture::set_margin_size(Side p_side, float p_size) {
margin[p_side] = p_size;
emit_changed();
- static const char *margin_prop[4] = {
- "content_margin_left",
- "content_margin_top",
- "content_margin_right",
- "content_margin_bottom",
- };
- _change_notify(margin_prop[p_side]);
}
float StyleBoxTexture::get_margin_size(Side p_side) const {
@@ -228,7 +220,6 @@ void StyleBoxTexture::set_region_rect(const Rect2 &p_region_rect) {
region_rect = p_region_rect;
emit_changed();
- _change_notify("region");
}
Rect2 StyleBoxTexture::get_region_rect() const {
@@ -320,20 +311,9 @@ void StyleBoxTexture::_bind_methods() {
BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_TILE_FIT);
}
-StyleBoxTexture::StyleBoxTexture() {
- for (int i = 0; i < 4; i++) {
- margin[i] = 0;
- expand_margin[i] = 0;
- }
- draw_center = true;
- modulate = Color(1, 1, 1, 1);
+StyleBoxTexture::StyleBoxTexture() {}
- axis_h = AXIS_STRETCH_MODE_STRETCH;
- axis_v = AXIS_STRETCH_MODE_STRETCH;
-}
-
-StyleBoxTexture::~StyleBoxTexture() {
-}
+StyleBoxTexture::~StyleBoxTexture() {}
////////////////
@@ -576,8 +556,8 @@ inline void draw_ring(Vector<Vector2> &verts, Vector<int> &indices, Vector<Color
color = outer_color;
corner_point = outer_points[corner_index];
}
- float x = radius * (float)cos((double)corner_index * Math_PI / 2.0 + (double)detail / (double)adapted_corner_detail * Math_PI / 2.0 + Math_PI) + corner_point.x;
- float y = radius * (float)sin((double)corner_index * Math_PI / 2.0 + (double)detail / (double)adapted_corner_detail * Math_PI / 2.0 + Math_PI) + corner_point.y;
+ real_t x = radius * (real_t)cos((corner_index + detail / (double)adapted_corner_detail) * (Math_TAU / 4.0) + Math_PI) + corner_point.x;
+ real_t y = radius * (real_t)sin((corner_index + detail / (double)adapted_corner_detail) * (Math_TAU / 4.0) + Math_PI) + corner_point.y;
verts.push_back(Vector2(x, y));
colors.push_back(color);
}
@@ -888,38 +868,9 @@ void StyleBoxFlat::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "anti_aliasing_size", PROPERTY_HINT_RANGE, "1,5,1"), "set_aa_size", "get_aa_size");
}
-StyleBoxFlat::StyleBoxFlat() {
- bg_color = Color(0.6, 0.6, 0.6);
- shadow_color = Color(0, 0, 0, 0.6);
- border_color = Color(0.8, 0.8, 0.8);
-
- blend_border = false;
- draw_center = true;
- anti_aliased = true;
-
- shadow_size = 0;
- shadow_offset = Point2(0, 0);
- corner_detail = 8;
- aa_size = 1;
-
- border_width[0] = 0;
- border_width[1] = 0;
- border_width[2] = 0;
- border_width[3] = 0;
-
- expand_margin[0] = 0;
- expand_margin[1] = 0;
- expand_margin[2] = 0;
- expand_margin[3] = 0;
-
- corner_radius[0] = 0;
- corner_radius[1] = 0;
- corner_radius[2] = 0;
- corner_radius[3] = 0;
-}
+StyleBoxFlat::StyleBoxFlat() {}
-StyleBoxFlat::~StyleBoxFlat() {
-}
+StyleBoxFlat::~StyleBoxFlat() {}
void StyleBoxLine::set_color(const Color &p_color) {
color = p_color;
@@ -986,8 +937,17 @@ void StyleBoxLine::_bind_methods() {
}
float StyleBoxLine::get_style_margin(Side p_side) const {
- ERR_FAIL_INDEX_V((int)p_side, 4, thickness);
- return thickness;
+ ERR_FAIL_INDEX_V((int)p_side, 4, 0);
+
+ if (vertical) {
+ if (p_side == SIDE_LEFT || p_side == SIDE_RIGHT) {
+ return thickness / 2.0;
+ }
+ } else if (p_side == SIDE_TOP || p_side == SIDE_BOTTOM) {
+ return thickness / 2.0;
+ }
+
+ return 0;
}
Size2 StyleBoxLine::get_center_size() const {
@@ -1011,12 +971,6 @@ void StyleBoxLine::draw(RID p_canvas_item, const Rect2 &p_rect) const {
vs->canvas_item_add_rect(p_canvas_item, r, color);
}
-StyleBoxLine::StyleBoxLine() {
- grow_begin = 1.0;
- grow_end = 1.0;
- thickness = 1;
- color = Color(0.0, 0.0, 0.0);
- vertical = false;
-}
+StyleBoxLine::StyleBoxLine() {}
StyleBoxLine::~StyleBoxLine() {}
diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h
index c133f0c825..8a273afbfd 100644
--- a/scene/resources/style_box.h
+++ b/scene/resources/style_box.h
@@ -86,14 +86,14 @@ public:
};
private:
- float expand_margin[4];
- float margin[4];
+ float expand_margin[4] = {};
+ float margin[4] = {};
Rect2 region_rect;
Ref<Texture2D> texture;
- bool draw_center;
- Color modulate;
- AxisStretchMode axis_h;
- AxisStretchMode axis_v;
+ bool draw_center = true;
+ Color modulate = Color(1, 1, 1, 1);
+ AxisStretchMode axis_h = AXIS_STRETCH_MODE_STRETCH;
+ AxisStretchMode axis_v = AXIS_STRETCH_MODE_STRETCH;
protected:
virtual float get_style_margin(Side p_side) const override;
@@ -139,22 +139,22 @@ VARIANT_ENUM_CAST(StyleBoxTexture::AxisStretchMode)
class StyleBoxFlat : public StyleBox {
GDCLASS(StyleBoxFlat, StyleBox);
- Color bg_color;
- Color shadow_color;
- Color border_color;
+ Color bg_color = Color(0.6, 0.6, 0.6);
+ Color shadow_color = Color(0, 0, 0, 0.6);
+ Color border_color = Color(0.8, 0.8, 0.8);
- int border_width[4];
- int expand_margin[4];
- int corner_radius[4];
+ int border_width[4] = {};
+ int expand_margin[4] = {};
+ int corner_radius[4] = {};
- bool draw_center;
- bool blend_border;
- bool anti_aliased;
+ bool draw_center = true;
+ bool blend_border = false;
+ bool anti_aliased = true;
- int corner_detail;
- int shadow_size;
+ int corner_detail = 8;
+ int shadow_size = 0;
Point2 shadow_offset;
- int aa_size;
+ int aa_size = 1;
protected:
virtual float get_style_margin(Side p_side) const override;
@@ -231,10 +231,10 @@ public:
class StyleBoxLine : public StyleBox {
GDCLASS(StyleBoxLine, StyleBox);
Color color;
- int thickness;
- bool vertical;
- float grow_begin;
- float grow_end;
+ int thickness = 1;
+ bool vertical = false;
+ float grow_begin = 1.0;
+ float grow_end = 1.0;
protected:
virtual float get_style_margin(Side p_side) const override;
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index dbf5268762..5ce3532d42 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -160,7 +160,7 @@ void SurfaceTool::add_vertex(const Vector3 &p_vertex) {
//cap
weights.resize(expected_vertices);
//renormalize
- float total = 0;
+ float total = 0.0;
for (int i = 0; i < expected_vertices; i++) {
total += weights[i].weight;
}
@@ -1196,12 +1196,7 @@ void SurfaceTool::_bind_methods() {
}
SurfaceTool::SurfaceTool() {
- first = false;
- begun = false;
for (int i = 0; i < RS::ARRAY_CUSTOM_COUNT; i++) {
last_custom_format[i] = CUSTOM_MAX;
}
- primitive = Mesh::PRIMITIVE_LINES;
- skin_weights = SKIN_4_WEIGHTS;
- format = 0;
}
diff --git a/scene/resources/surface_tool.h b/scene/resources/surface_tool.h
index ea6069e7c1..17efdcba71 100644
--- a/scene/resources/surface_tool.h
+++ b/scene/resources/surface_tool.h
@@ -89,17 +89,17 @@ private:
};
struct WeightSort {
- int index;
- float weight;
+ int index = 0;
+ float weight = 0.0;
bool operator<(const WeightSort &p_right) const {
return weight < p_right.weight;
}
};
- bool begun;
- bool first;
- Mesh::PrimitiveType primitive;
- uint32_t format;
+ bool begun = false;
+ bool first = false;
+ Mesh::PrimitiveType primitive = Mesh::PRIMITIVE_LINES;
+ uint32_t format = 0;
Ref<Material> material;
//arrays
LocalVector<Vertex> vertex_array;
@@ -115,7 +115,7 @@ private:
Plane last_tangent;
uint32_t last_smooth_group = 0;
- SkinWeightCount skin_weights;
+ SkinWeightCount skin_weights = SKIN_4_WEIGHTS;
Color last_custom[RS::ARRAY_CUSTOM_COUNT];
diff --git a/scene/resources/syntax_highlighter.cpp b/scene/resources/syntax_highlighter.cpp
index f3f881a774..9dd00849f4 100644
--- a/scene/resources/syntax_highlighter.cpp
+++ b/scene/resources/syntax_highlighter.cpp
@@ -110,16 +110,13 @@ TextEdit *SyntaxHighlighter::get_text_edit() {
}
void SyntaxHighlighter::_bind_methods() {
- ClassDB::bind_method(D_METHOD("get_line_syntax_highlighting", "p_line"), &SyntaxHighlighter::get_line_syntax_highlighting);
+ ClassDB::bind_method(D_METHOD("get_line_syntax_highlighting", "line"), &SyntaxHighlighter::get_line_syntax_highlighting);
ClassDB::bind_method(D_METHOD("update_cache"), &SyntaxHighlighter::update_cache);
ClassDB::bind_method(D_METHOD("clear_highlighting_cache"), &SyntaxHighlighter::clear_highlighting_cache);
ClassDB::bind_method(D_METHOD("get_text_edit"), &SyntaxHighlighter::get_text_edit);
- ClassDB::bind_method(D_METHOD("_get_line_syntax_highlighting", "p_line"), &SyntaxHighlighter::_get_line_syntax_highlighting);
- ClassDB::bind_method(D_METHOD("_update_cache"), &SyntaxHighlighter::_update_cache);
- ClassDB::bind_method(D_METHOD("_clear_highlighting_cache"), &SyntaxHighlighter::_clear_highlighting_cache);
-
- BIND_VMETHOD(MethodInfo(Variant::DICTIONARY, "_get_line_syntax_highlighting", PropertyInfo(Variant::INT, "p_line")));
+ BIND_VMETHOD(MethodInfo(Variant::DICTIONARY, "_get_line_syntax_highlighting", PropertyInfo(Variant::INT, "line")));
+ BIND_VMETHOD(MethodInfo("_clear_highlighting_cache"));
BIND_VMETHOD(MethodInfo("_update_cache"));
}
@@ -576,11 +573,11 @@ void CodeHighlighter::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear_member_keyword_colors"), &CodeHighlighter::clear_member_keyword_colors);
ClassDB::bind_method(D_METHOD("get_member_keyword_colors"), &CodeHighlighter::get_member_keyword_colors);
- ClassDB::bind_method(D_METHOD("add_color_region", "p_start_key", "p_end_key", "p_color", "p_line_only"), &CodeHighlighter::add_color_region, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("remove_color_region", "p_start_key"), &CodeHighlighter::remove_color_region);
- ClassDB::bind_method(D_METHOD("has_color_region", "p_start_key"), &CodeHighlighter::has_color_region);
+ ClassDB::bind_method(D_METHOD("add_color_region", "start_key", "end_key", "color", "line_only"), &CodeHighlighter::add_color_region, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("remove_color_region", "start_key"), &CodeHighlighter::remove_color_region);
+ ClassDB::bind_method(D_METHOD("has_color_region", "start_key"), &CodeHighlighter::has_color_region);
- ClassDB::bind_method(D_METHOD("set_color_regions", "p_color_regions"), &CodeHighlighter::set_color_regions);
+ ClassDB::bind_method(D_METHOD("set_color_regions", "color_regions"), &CodeHighlighter::set_color_regions);
ClassDB::bind_method(D_METHOD("clear_color_regions"), &CodeHighlighter::clear_color_regions);
ClassDB::bind_method(D_METHOD("get_color_regions"), &CodeHighlighter::get_color_regions);
diff --git a/scene/resources/syntax_highlighter.h b/scene/resources/syntax_highlighter.h
index c9db8e31a2..f3964b0c8f 100644
--- a/scene/resources/syntax_highlighter.h
+++ b/scene/resources/syntax_highlighter.h
@@ -75,7 +75,7 @@ private:
Color color;
String start_key;
String end_key;
- bool line_only;
+ bool line_only = false;
};
Vector<ColorRegion> color_regions;
Map<int, int> color_region_cache;
diff --git a/scene/resources/text_line.cpp b/scene/resources/text_line.cpp
index ed69c093cf..925867a1f2 100644
--- a/scene/resources/text_line.cpp
+++ b/scene/resources/text_line.cpp
@@ -167,6 +167,7 @@ void TextLine::set_bidi_override(const Vector<Vector2i> &p_override) {
}
bool TextLine::add_string(const String &p_text, const Ref<Font> &p_fonts, int p_size, const Dictionary &p_opentype_features, const String &p_language) {
+ ERR_FAIL_COND_V(p_fonts.is_null(), false);
bool res = TS->shaped_text_add_string(rid, p_text, p_fonts->get_rids(), p_size, p_opentype_features, p_language);
spacing_top = p_fonts->get_spacing(Font::SPACING_TOP);
spacing_bottom = p_fonts->get_spacing(Font::SPACING_BOTTOM);
diff --git a/scene/resources/text_line.h b/scene/resources/text_line.h
index 3e0a74a84b..74d4f2c32c 100644
--- a/scene/resources/text_line.h
+++ b/scene/resources/text_line.h
@@ -45,7 +45,7 @@ class TextLine : public Reference {
bool dirty = true;
- float width = -1;
+ float width = -1.0;
uint8_t flags = TextServer::JUSTIFICATION_WORD_BOUND | TextServer::JUSTIFICATION_KASHIDA;
HAlign align = HALIGN_LEFT;
diff --git a/scene/resources/text_paragraph.cpp b/scene/resources/text_paragraph.cpp
index 94957df510..444a4bb22a 100644
--- a/scene/resources/text_paragraph.cpp
+++ b/scene/resources/text_paragraph.cpp
@@ -243,6 +243,7 @@ TextServer::Orientation TextParagraph::get_orientation() const {
}
bool TextParagraph::set_dropcap(const String &p_text, const Ref<Font> &p_fonts, int p_size, const Rect2 &p_dropcap_margins, const Dictionary &p_opentype_features, const String &p_language) {
+ ERR_FAIL_COND_V(p_fonts.is_null(), false);
TS->shaped_text_clear(dropcap_rid);
dropcap_margins = p_dropcap_margins;
bool res = TS->shaped_text_add_string(dropcap_rid, p_text, p_fonts->get_rids(), p_size, p_opentype_features, p_language);
@@ -257,6 +258,7 @@ void TextParagraph::clear_dropcap() {
}
bool TextParagraph::add_string(const String &p_text, const Ref<Font> &p_fonts, int p_size, const Dictionary &p_opentype_features, const String &p_language) {
+ ERR_FAIL_COND_V(p_fonts.is_null(), false);
bool res = TS->shaped_text_add_string(rid, p_text, p_fonts->get_rids(), p_size, p_opentype_features, p_language);
spacing_top = p_fonts->get_spacing(Font::SPACING_TOP);
spacing_bottom = p_fonts->get_spacing(Font::SPACING_BOTTOM);
diff --git a/scene/resources/text_paragraph.h b/scene/resources/text_paragraph.h
index e58c157b01..a16fa8c3c4 100644
--- a/scene/resources/text_paragraph.h
+++ b/scene/resources/text_paragraph.h
@@ -50,7 +50,7 @@ class TextParagraph : public Reference {
bool dirty_lines = true;
- float width = -1;
+ float width = -1.0;
uint8_t flags = TextServer::BREAK_MANDATORY | TextServer::BREAK_WORD_BOUND | TextServer::JUSTIFICATION_WORD_BOUND | TextServer::JUSTIFICATION_KASHIDA;
HAlign align = HALIGN_LEFT;
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 342a97fd85..8cccf81659 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -94,7 +94,7 @@ void ImageTexture::reload_from_file() {
create_from_image(img);
} else {
Resource::reload_from_file();
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
}
@@ -146,7 +146,7 @@ void ImageTexture::_reload_hook(const RID &p_hook) {
RID new_texture = RenderingServer::get_singleton()->texture_2d_create(img);
RenderingServer::get_singleton()->texture_replace(texture, new_texture);
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -163,7 +163,7 @@ void ImageTexture::create_from_image(const Ref<Image> &p_image) {
RID new_texture = RenderingServer::get_singleton()->texture_2d_create(p_image);
RenderingServer::get_singleton()->texture_replace(texture, new_texture);
}
- _change_notify();
+ notify_property_list_changed();
emit_changed();
image_stored = true;
@@ -189,7 +189,7 @@ void ImageTexture::update(const Ref<Image> &p_image, bool p_immediate) {
RenderingServer::get_singleton()->texture_2d_update(texture, p_image);
}
- _change_notify();
+ notify_property_list_changed();
emit_changed();
alpha_cache.unref();
@@ -310,12 +310,7 @@ void ImageTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("_reload_hook", "rid"), &ImageTexture::_reload_hook);
}
-ImageTexture::ImageTexture() {
- w = h = 0;
- image_stored = false;
- mipmaps = false;
- format = Image::FORMAT_L8;
-}
+ImageTexture::ImageTexture() {}
ImageTexture::~ImageTexture() {
if (texture.is_valid()) {
@@ -617,7 +612,7 @@ Error StreamTexture2D::load(const String &p_path) {
}
#endif
- _change_notify();
+ notify_property_list_changed();
emit_changed();
return OK;
}
@@ -733,11 +728,7 @@ void StreamTexture2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "load_path", PROPERTY_HINT_FILE, "*.stex"), "load", "get_load_path");
}
-StreamTexture2D::StreamTexture2D() {
- format = Image::FORMAT_MAX;
- w = 0;
- h = 0;
-}
+StreamTexture2D::StreamTexture2D() {}
StreamTexture2D::~StreamTexture2D() {
if (texture.is_valid()) {
@@ -745,7 +736,7 @@ StreamTexture2D::~StreamTexture2D() {
}
}
-RES ResourceFormatLoaderStreamTexture2D::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderStreamTexture2D::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
Ref<StreamTexture2D> st;
st.instance();
Error err = st->load(p_path);
@@ -968,7 +959,7 @@ Error StreamTexture3D::load(const String &p_path) {
RenderingServer::get_singleton()->texture_set_path(texture, p_path);
}
- _change_notify();
+ notify_property_list_changed();
emit_changed();
return OK;
}
@@ -1033,13 +1024,7 @@ void StreamTexture3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "load_path", PROPERTY_HINT_FILE, "*.stex"), "load", "get_load_path");
}
-StreamTexture3D::StreamTexture3D() {
- format = Image::FORMAT_MAX;
- w = 0;
- h = 0;
- d = 0;
- mipmaps = false;
-}
+StreamTexture3D::StreamTexture3D() {}
StreamTexture3D::~StreamTexture3D() {
if (texture.is_valid()) {
@@ -1049,7 +1034,7 @@ StreamTexture3D::~StreamTexture3D() {
/////////////////////////////
-RES ResourceFormatLoaderStreamTexture3D::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderStreamTexture3D::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
Ref<StreamTexture3D> st;
st.instance();
Error err = st->load(p_path);
@@ -1125,7 +1110,6 @@ void AtlasTexture::set_atlas(const Ref<Texture2D> &p_atlas) {
}
atlas = p_atlas;
emit_changed();
- _change_notify("atlas");
}
Ref<Texture2D> AtlasTexture::get_atlas() const {
@@ -1138,7 +1122,6 @@ void AtlasTexture::set_region(const Rect2 &p_region) {
}
region = p_region;
emit_changed();
- _change_notify("region");
}
Rect2 AtlasTexture::get_region() const {
@@ -1151,7 +1134,6 @@ void AtlasTexture::set_margin(const Rect2 &p_margin) {
}
margin = p_margin;
emit_changed();
- _change_notify("margin");
}
Rect2 AtlasTexture::get_margin() const {
@@ -1161,7 +1143,6 @@ Rect2 AtlasTexture::get_margin() const {
void AtlasTexture::set_filter_clip(const bool p_enable) {
filter_clip = p_enable;
emit_changed();
- _change_notify("filter_clip");
}
bool AtlasTexture::has_filter_clip() const {
@@ -1295,9 +1276,7 @@ bool AtlasTexture::is_pixel_opaque(int p_x, int p_y) const {
return atlas->is_pixel_opaque(x, y);
}
-AtlasTexture::AtlasTexture() {
- filter_clip = false;
-}
+AtlasTexture::AtlasTexture() {}
/////////////////////////////////////////
@@ -1698,9 +1677,7 @@ RID CurveTexture::get_rid() const {
return _texture;
}
-CurveTexture::CurveTexture() {
- _width = 2048;
-}
+CurveTexture::CurveTexture() {}
CurveTexture::~CurveTexture() {
if (_texture.is_valid()) {
@@ -1711,9 +1688,6 @@ CurveTexture::~CurveTexture() {
//////////////////
GradientTexture::GradientTexture() {
- update_pending = false;
- width = 2048;
-
_queue_update();
}
@@ -1926,7 +1900,7 @@ void AnimatedTexture::_update_proxy() {
}
}
time -= frame_limit;
- _change_notify("current_frame");
+
} else {
break;
}
@@ -2128,28 +2102,12 @@ AnimatedTexture::AnimatedTexture() {
proxy = RS::get_singleton()->texture_proxy_create(proxy_ph);
RenderingServer::get_singleton()->texture_set_force_redraw_if_visible(proxy, true);
- time = 0;
- frame_count = 1;
- fps = 4;
- prev_ticks = 0;
- current_frame = 0;
- pause = false;
- oneshot = false;
RenderingServer::get_singleton()->connect("frame_pre_draw", callable_mp(this, &AnimatedTexture::_update_proxy));
-
-#ifndef NO_THREADS
- rw_lock = RWLock::create();
-#else
- rw_lock = nullptr;
-#endif
}
AnimatedTexture::~AnimatedTexture() {
RS::get_singleton()->free(proxy);
RS::get_singleton()->free(proxy_ph);
- if (rw_lock) {
- memdelete(rw_lock);
- }
}
///////////////////////////////
@@ -2297,11 +2255,6 @@ void ImageTextureLayered::_bind_methods() {
ImageTextureLayered::ImageTextureLayered(LayeredType p_layered_type) {
layered_type = p_layered_type;
- format = Image::FORMAT_MAX;
-
- width = 0;
- height = 0;
- layers = 0;
}
ImageTextureLayered::~ImageTextureLayered() {
@@ -2398,7 +2351,7 @@ Error StreamTextureLayered::load(const String &p_path) {
RenderingServer::get_singleton()->texture_set_path(texture, p_path);
}
- _change_notify();
+ notify_property_list_changed();
emit_changed();
return OK;
}
@@ -2469,11 +2422,6 @@ void StreamTextureLayered::_bind_methods() {
StreamTextureLayered::StreamTextureLayered(LayeredType p_type) {
layered_type = p_type;
- format = Image::FORMAT_MAX;
- w = 0;
- h = 0;
- layers = 0;
- mipmaps = false;
}
StreamTextureLayered::~StreamTextureLayered() {
@@ -2484,7 +2432,7 @@ StreamTextureLayered::~StreamTextureLayered() {
/////////////////////////////////////////////////
-RES ResourceFormatLoaderStreamTextureLayered::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) {
+RES ResourceFormatLoaderStreamTextureLayered::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {
Ref<StreamTextureLayered> st;
if (p_path.get_extension().to_lower() == "stexarray") {
Ref<StreamTexture2DArray> s;
@@ -2602,7 +2550,7 @@ Ref<Image> CameraTexture::get_data() const {
void CameraTexture::set_camera_feed_id(int p_new_id) {
camera_feed_id = p_new_id;
- _change_notify();
+ notify_property_list_changed();
}
int CameraTexture::get_camera_feed_id() const {
@@ -2611,7 +2559,7 @@ int CameraTexture::get_camera_feed_id() const {
void CameraTexture::set_which_feed(CameraServer::FeedImage p_which) {
which_feed = p_which;
- _change_notify();
+ notify_property_list_changed();
}
CameraServer::FeedImage CameraTexture::get_which_feed() const {
@@ -2622,7 +2570,7 @@ void CameraTexture::set_camera_active(bool p_active) {
Ref<CameraFeed> feed = CameraServer::get_singleton()->get_feed_by_id(camera_feed_id);
if (feed.is_valid()) {
feed->set_active(p_active);
- _change_notify();
+ notify_property_list_changed();
}
}
@@ -2635,10 +2583,7 @@ bool CameraTexture::get_camera_active() const {
}
}
-CameraTexture::CameraTexture() {
- camera_feed_id = 0;
- which_feed = CameraServer::FEED_RGBA_IMAGE;
-}
+CameraTexture::CameraTexture() {}
CameraTexture::~CameraTexture() {
// nothing to do here yet
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 3bbce050f7..a0d917fd86 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -83,12 +83,13 @@ class ImageTexture : public Texture2D {
RES_BASE_EXTENSION("tex");
mutable RID texture;
- Image::Format format;
- bool mipmaps;
- int w, h;
+ Image::Format format = Image::FORMAT_L8;
+ bool mipmaps = false;
+ int w = 0;
+ int h = 0;
Size2 size_override;
mutable Ref<BitMap> alpha_cache;
- bool image_stored;
+ bool image_stored = false;
protected:
virtual void reload_from_file() override;
@@ -160,8 +161,9 @@ private:
Error _load_data(const String &p_path, int &tw, int &th, int &tw_custom, int &th_custom, Ref<Image> &image, bool &r_request_3d, bool &r_request_normal, bool &r_request_roughness, int &mipmap_limit, int p_size_limit = 0);
String path_to_file;
mutable RID texture;
- Image::Format format;
- int w, h;
+ Image::Format format = Image::FORMAT_MAX;
+ int w = 0;
+ int h = 0;
mutable Ref<BitMap> alpha_cache;
virtual void reload_from_file() override;
@@ -209,7 +211,7 @@ public:
class ResourceFormatLoaderStreamTexture2D : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
@@ -223,7 +225,7 @@ protected:
Ref<Texture2D> atlas;
Rect2 region;
Rect2 margin;
- bool filter_clip;
+ bool filter_clip = false;
static void _bind_methods();
@@ -370,12 +372,12 @@ class ImageTextureLayered : public TextureLayered {
LayeredType layered_type;
mutable RID texture;
- Image::Format format;
+ Image::Format format = Image::FORMAT_MAX;
- int width;
- int height;
- int layers;
- bool mipmaps;
+ int width = 0;
+ int height = 0;
+ int layers = 0;
+ bool mipmaps = false;
Error _create_from_images(const Array &p_images);
@@ -453,10 +455,12 @@ private:
Error _load_data(const String &p_path, Vector<Ref<Image>> &images, int &mipmap_limit, int p_size_limit = 0);
String path_to_file;
mutable RID texture;
- Image::Format format;
- int w, h, layers;
- bool mipmaps;
- LayeredType layered_type;
+ Image::Format format = Image::FORMAT_MAX;
+ int w = 0;
+ int h = 0;
+ int layers = 0;
+ bool mipmaps = false;
+ LayeredType layered_type = LayeredType::LAYERED_TYPE_2D_ARRAY;
virtual void reload_from_file() override;
@@ -509,7 +513,7 @@ public:
class ResourceFormatLoaderStreamTextureLayered : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
@@ -594,9 +598,11 @@ private:
Error _load_data(const String &p_path, Vector<Ref<Image>> &r_data, Image::Format &r_format, int &r_width, int &r_height, int &r_depth, bool &r_mipmaps);
String path_to_file;
mutable RID texture;
- Image::Format format;
- int w, h, d;
- bool mipmaps;
+ Image::Format format = Image::FORMAT_MAX;
+ int w = 0;
+ int h = 0;
+ int d = 0;
+ bool mipmaps = false;
virtual void reload_from_file() override;
@@ -625,7 +631,7 @@ public:
class ResourceFormatLoaderStreamTexture3D : public ResourceFormatLoader {
public:
- virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, bool p_no_cache = false);
+ virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
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;
@@ -638,7 +644,7 @@ class CurveTexture : public Texture2D {
private:
mutable RID _texture;
Ref<Curve> _curve;
- int _width;
+ int _width = 2048;
void _update();
@@ -680,7 +686,7 @@ class GradientTexture : public Texture2D {
public:
struct Point {
- float offset;
+ float offset = 0.0;
Color color;
bool operator<(const Point &p_ponit) const {
return offset < p_ponit.offset;
@@ -689,9 +695,9 @@ public:
private:
Ref<Gradient> gradient;
- bool update_pending;
+ bool update_pending = false;
RID texture;
- int width;
+ int width = 2048;
void _queue_update();
void _update();
@@ -745,7 +751,7 @@ class AnimatedTexture : public Texture2D {
GDCLASS(AnimatedTexture, Texture2D);
//use readers writers lock for this, since its far more times read than written to
- RWLock *rw_lock;
+ RWLock rw_lock;
public:
enum {
@@ -758,23 +764,19 @@ private:
struct Frame {
Ref<Texture2D> texture;
- float delay_sec;
-
- Frame() {
- delay_sec = 0;
- }
+ float delay_sec = 0.0;
};
Frame frames[MAX_FRAMES];
- int frame_count;
- int current_frame;
- bool pause;
- bool oneshot;
- float fps;
+ int frame_count = 1.0;
+ int current_frame = 0;
+ bool pause = false;
+ bool oneshot = false;
+ float fps = 4.0;
- float time;
+ float time = 0.0;
- uint64_t prev_ticks;
+ uint64_t prev_ticks = 0;
void _update_proxy();
@@ -822,8 +824,8 @@ class CameraTexture : public Texture2D {
GDCLASS(CameraTexture, Texture2D);
private:
- int camera_feed_id;
- CameraServer::FeedImage which_feed;
+ int camera_feed_id = 0;
+ CameraServer::FeedImage which_feed = CameraServer::FEED_RGBA_IMAGE;
protected:
static void _bind_methods();
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index 5279f59d77..0405ea98bb 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -358,7 +358,7 @@ void Theme::set_default_theme_font(const Ref<Font> &p_default_font) {
default_theme_font->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(), CONNECT_REFERENCE_COUNTED);
}
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -373,7 +373,7 @@ void Theme::set_default_theme_font_size(int p_font_size) {
default_theme_font_size = p_font_size;
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -436,7 +436,7 @@ void Theme::set_icon(const StringName &p_name, const StringName &p_node_type, co
}
if (new_value) {
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
}
@@ -463,7 +463,7 @@ void Theme::clear_icon(const StringName &p_name, const StringName &p_node_type)
icon_map[p_node_type].erase(p_name);
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -506,7 +506,7 @@ void Theme::set_stylebox(const StringName &p_name, const StringName &p_node_type
}
if (new_value) {
- _change_notify();
+ notify_property_list_changed();
}
emit_changed();
}
@@ -533,7 +533,7 @@ void Theme::clear_stylebox(const StringName &p_name, const StringName &p_node_ty
style_map[p_node_type].erase(p_name);
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -576,7 +576,7 @@ void Theme::set_font(const StringName &p_name, const StringName &p_node_type, co
}
if (new_value) {
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
}
@@ -604,7 +604,7 @@ void Theme::clear_font(const StringName &p_name, const StringName &p_node_type)
}
font_map[p_node_type].erase(p_name);
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -637,7 +637,7 @@ void Theme::set_font_size(const StringName &p_name, const StringName &p_node_typ
font_size_map[p_node_type][p_name] = p_font_size;
if (new_value) {
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
}
@@ -661,7 +661,7 @@ void Theme::clear_font_size(const StringName &p_name, const StringName &p_node_t
ERR_FAIL_COND(!font_size_map[p_node_type].has(p_name));
font_size_map[p_node_type].erase(p_name);
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -685,7 +685,7 @@ void Theme::set_color(const StringName &p_name, const StringName &p_node_type, c
color_map[p_node_type][p_name] = p_color;
if (new_value) {
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
}
@@ -707,7 +707,7 @@ void Theme::clear_color(const StringName &p_name, const StringName &p_node_type)
ERR_FAIL_COND(!color_map[p_node_type].has(p_name));
color_map[p_node_type].erase(p_name);
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -739,7 +739,7 @@ void Theme::set_constant(const StringName &p_name, const StringName &p_node_type
constant_map[p_node_type][p_name] = p_constant;
if (new_value) {
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
}
@@ -761,7 +761,7 @@ void Theme::clear_constant(const StringName &p_name, const StringName &p_node_ty
ERR_FAIL_COND(!constant_map[p_node_type].has(p_name));
constant_map[p_node_type].erase(p_name);
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -835,7 +835,7 @@ void Theme::clear() {
color_map.clear();
constant_map.clear();
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -887,7 +887,7 @@ void Theme::copy_theme(const Ref<Theme> &p_other) {
color_map = p_other->color_map;
constant_map = p_other->constant_map;
- _change_notify();
+ notify_property_list_changed();
emit_changed();
}
@@ -930,6 +930,9 @@ void Theme::get_type_list(List<StringName> *p_list) const {
}
}
+void Theme::reset_state() {
+ clear();
+}
void Theme::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_icon", "name", "node_type", "texture"), &Theme::set_icon);
ClassDB::bind_method(D_METHOD("get_icon", "name", "node_type"), &Theme::get_icon);
diff --git a/scene/resources/theme.h b/scene/resources/theme.h
index c802ba2536..35481126ea 100644
--- a/scene/resources/theme.h
+++ b/scene/resources/theme.h
@@ -80,6 +80,8 @@ protected:
static void _bind_methods();
+ virtual void reset_state() override;
+
public:
static Ref<Theme> get_default();
static void set_default(const Ref<Theme> &p_default);
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index ae536a2928..84be69d0d6 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -369,14 +369,14 @@ void TileSet::create_tile(int p_id) {
ERR_FAIL_COND(tile_map.has(p_id));
tile_map[p_id] = TileData();
tile_map[p_id].autotile_data = AutotileData();
- _change_notify("");
+ notify_property_list_changed();
emit_changed();
}
void TileSet::autotile_set_bitmask_mode(int p_id, BitmaskMode p_mode) {
ERR_FAIL_COND(!tile_map.has(p_id));
tile_map[p_id].autotile_data.bitmask_mode = p_mode;
- _change_notify("");
+ notify_property_list_changed();
emit_changed();
}
@@ -389,7 +389,6 @@ void TileSet::tile_set_texture(int p_id, const Ref<Texture2D> &p_texture) {
ERR_FAIL_COND(!tile_map.has(p_id));
tile_map[p_id].texture = p_texture;
emit_changed();
- _change_notify("texture");
}
Ref<Texture2D> TileSet::tile_get_texture(int p_id) const {
@@ -412,7 +411,6 @@ void TileSet::tile_set_modulate(int p_id, const Color &p_modulate) {
ERR_FAIL_COND(!tile_map.has(p_id));
tile_map[p_id].modulate = p_modulate;
emit_changed();
- _change_notify("modulate");
}
Color TileSet::tile_get_modulate(int p_id) const {
@@ -435,7 +433,6 @@ void TileSet::tile_set_region(int p_id, const Rect2 &p_region) {
ERR_FAIL_COND(!tile_map.has(p_id));
tile_map[p_id].region = p_region;
emit_changed();
- _change_notify("region");
}
Rect2 TileSet::tile_get_region(int p_id) const {
@@ -447,7 +444,6 @@ void TileSet::tile_set_tile_mode(int p_id, TileMode p_tile_mode) {
ERR_FAIL_COND(!tile_map.has(p_id));
tile_map[p_id].tile_mode = p_tile_mode;
emit_changed();
- _change_notify("tile_mode");
}
TileSet::TileMode TileSet::tile_get_tile_mode(int p_id) const {
@@ -669,7 +665,6 @@ void TileSet::tile_set_name(int p_id, const String &p_name) {
ERR_FAIL_COND(!tile_map.has(p_id));
tile_map[p_id].name = p_name;
emit_changed();
- _change_notify("name");
}
String TileSet::tile_get_name(int p_id) const {
@@ -1060,7 +1055,7 @@ bool TileSet::is_tile_bound(int p_drawn_id, int p_neighbor_id) {
void TileSet::remove_tile(int p_id) {
ERR_FAIL_COND(!tile_map.has(p_id));
tile_map.erase(p_id);
- _change_notify("");
+ notify_property_list_changed();
emit_changed();
}
@@ -1081,9 +1076,13 @@ int TileSet::find_tile_by_name(const String &p_name) const {
return -1;
}
+void TileSet::reset_state() {
+ clear();
+}
+
void TileSet::clear() {
tile_map.clear();
- _change_notify("");
+ notify_property_list_changed();
emit_changed();
}
diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h
index 210520350f..0a8721f35b 100644
--- a/scene/resources/tile_set.h
+++ b/scene/resources/tile_set.h
@@ -136,6 +136,8 @@ protected:
static void _bind_methods();
+ virtual void reset_state() override;
+
public:
void create_tile(int p_id);
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index 72724d5ee1..d8e63e47be 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -675,6 +675,8 @@ void VisualShader::get_node_connections(Type p_type, List<Connection> *r_connect
}
void VisualShader::set_mode(Mode p_mode) {
+ ERR_FAIL_INDEX_MSG(p_mode, Mode::MODE_MAX, vformat("Invalid shader mode: %d.", p_mode));
+
if (shader_mode == p_mode) {
return;
}
@@ -730,7 +732,7 @@ void VisualShader::set_mode(Mode p_mode) {
}
_queue_update();
- _change_notify();
+ notify_property_list_changed();
}
void VisualShader::set_graph_offset(const Vector2 &p_offset) {
@@ -1095,6 +1097,12 @@ bool VisualShader::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
+void VisualShader::reset_state() {
+#ifndef _MSC_VER
+#warning everything needs to be cleared here
+#endif
+ emit_changed();
+}
void VisualShader::_get_property_list(List<PropertyInfo> *p_list) const {
//mode
p_list->push_back(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Node3D,CanvasItem,Particles,Sky"));
@@ -1392,11 +1400,11 @@ bool VisualShader::has_func_name(RenderingServer::ShaderMode p_mode, const Strin
}
void VisualShader::_update_shader() const {
- if (!dirty) {
+ if (!dirty.is_set()) {
return;
}
- dirty = false;
+ dirty.clear();
StringBuilder global_code;
StringBuilder global_code_per_node;
@@ -1582,15 +1590,16 @@ void VisualShader::_update_shader() const {
}
void VisualShader::_queue_update() {
- if (dirty) {
+ if (dirty.is_set()) {
return;
}
- dirty = true;
+ dirty.set();
call_deferred("_update_shader");
}
void VisualShader::_input_type_changed(Type p_type, int p_id) {
+ ERR_FAIL_INDEX(p_type, TYPE_MAX);
//erase connections using this input, as type changed
Graph *g = &graph[p_type];
@@ -1605,7 +1614,7 @@ void VisualShader::_input_type_changed(Type p_type, int p_id) {
}
void VisualShader::rebuild() {
- dirty = true;
+ dirty.set();
_update_shader();
}
@@ -1659,6 +1668,7 @@ void VisualShader::_bind_methods() {
}
VisualShader::VisualShader() {
+ dirty.set();
for (int i = 0; i < TYPE_MAX; i++) {
Ref<VisualShaderNodeOutput> output;
output.instance();
diff --git a/scene/resources/visual_shader.h b/scene/resources/visual_shader.h
index 9396a53e8b..ef724c7650 100644
--- a/scene/resources/visual_shader.h
+++ b/scene/resources/visual_shader.h
@@ -32,6 +32,7 @@
#define VISUAL_SHADER_H
#include "core/string/string_builder.h"
+#include "core/templates/safe_refcount.h"
#include "scene/gui/control.h"
#include "scene/resources/shader.h"
@@ -57,10 +58,10 @@ public:
};
struct Connection {
- int from_node;
- int from_port;
- int to_node;
- int to_port;
+ int from_node = 0;
+ int from_port = 0;
+ int to_node = 0;
+ int to_port = 0;
};
struct DefaultTextureParam {
@@ -90,7 +91,7 @@ private:
Vector2 graph_offset;
struct RenderModeEnums {
- Shader::Mode mode;
+ Shader::Mode mode = Shader::Mode::MODE_MAX;
const char *string;
};
@@ -99,7 +100,7 @@ private:
static RenderModeEnums render_mode_enums[];
- volatile mutable bool dirty = true;
+ mutable SafeFlag dirty;
void _queue_update();
union ConnectionKey {
@@ -107,7 +108,7 @@ private:
uint64_t node : 32;
uint64_t port : 32;
};
- uint64_t key;
+ uint64_t key = 0;
bool operator<(const ConnectionKey &p_key) const {
return key < p_key.key;
}
@@ -126,6 +127,8 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ virtual void reset_state() override;
+
public: // internal methods
void set_shader_type(Type p_type);
Type get_shader_type() const;
@@ -265,7 +268,7 @@ class VisualShaderNodeCustom : public VisualShaderNode {
struct Port {
String name;
- int type;
+ int type = 0;
};
List<Port> input_ports;
@@ -305,9 +308,9 @@ class VisualShaderNodeInput : public VisualShaderNode {
Shader::Mode shader_mode = Shader::MODE_MAX;
struct Port {
- Shader::Mode mode;
- VisualShader::Type shader_type;
- PortType type;
+ Shader::Mode mode = Shader::Mode::MODE_MAX;
+ VisualShader::Type shader_type = VisualShader::Type::TYPE_MAX;
+ PortType type = PortType::PORT_TYPE_MAX;
const char *name;
const char *string;
};
@@ -356,13 +359,13 @@ class VisualShaderNodeOutput : public VisualShaderNode {
public:
friend class VisualShader;
- VisualShader::Type shader_type;
- Shader::Mode shader_mode;
+ VisualShader::Type shader_type = VisualShader::Type::TYPE_MAX;
+ Shader::Mode shader_mode = Shader::Mode::MODE_MAX;
struct Port {
- Shader::Mode mode;
- VisualShader::Type shader_type;
- PortType type;
+ Shader::Mode mode = Shader::Mode::MODE_MAX;
+ VisualShader::Type shader_type = VisualShader::Type::TYPE_MAX;
+ PortType type = PortType::PORT_TYPE_MAX;
const char *name;
const char *string;
};
@@ -519,7 +522,7 @@ protected:
bool editable = false;
struct Port {
- PortType type;
+ PortType type = PortType::PORT_TYPE_MAX;
String name;
};
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp
index 8b60c0a979..d6200059f6 100644
--- a/scene/resources/visual_shader_nodes.cpp
+++ b/scene/resources/visual_shader_nodes.cpp
@@ -2086,9 +2086,6 @@ String VisualShaderNodeIntFunc::get_caption() const {
}
int VisualShaderNodeIntFunc::get_input_port_count() const {
- if (func == FUNC_CLAMP) {
- return 3;
- }
return 1;
}
@@ -2097,15 +2094,6 @@ VisualShaderNodeIntFunc::PortType VisualShaderNodeIntFunc::get_input_port_type(i
}
String VisualShaderNodeIntFunc::get_input_port_name(int p_port) const {
- if (func == FUNC_CLAMP) {
- if (p_port == 0) {
- return "";
- } else if (p_port == 1) {
- return "min";
- } else if (p_port == 2) {
- return "max";
- }
- }
return "";
}
@@ -2122,13 +2110,8 @@ String VisualShaderNodeIntFunc::get_output_port_name(int p_port) const {
}
String VisualShaderNodeIntFunc::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
- if (func == FUNC_CLAMP) {
- return "\t" + p_output_vars[0] + " = clamp(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
- }
-
static const char *int_func_id[FUNC_SIGN + 1] = {
"abs($)",
- "",
"-($)",
"sign($)"
};
@@ -2137,12 +2120,6 @@ String VisualShaderNodeIntFunc::generate_code(Shader::Mode p_mode, VisualShader:
}
void VisualShaderNodeIntFunc::set_function(Function p_func) {
- if (func != p_func) {
- if (p_func == FUNC_CLAMP) {
- set_input_port_default_value(1, 0);
- set_input_port_default_value(2, 0);
- }
- }
func = p_func;
emit_changed();
}
@@ -2161,10 +2138,9 @@ void VisualShaderNodeIntFunc::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_function", "func"), &VisualShaderNodeIntFunc::set_function);
ClassDB::bind_method(D_METHOD("get_function"), &VisualShaderNodeIntFunc::get_function);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Abs,Clamp,Negate,Sign"), "set_function", "get_function");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "function", PROPERTY_HINT_ENUM, "Abs,Negate,Sign"), "set_function", "get_function");
BIND_ENUM_CONSTANT(FUNC_ABS);
- BIND_ENUM_CONSTANT(FUNC_CLAMP);
BIND_ENUM_CONSTANT(FUNC_NEGATE);
BIND_ENUM_CONSTANT(FUNC_SIGN);
}
@@ -2754,21 +2730,31 @@ VisualShaderNodeVectorDerivativeFunc::VisualShaderNodeVectorDerivativeFunc() {
set_input_port_default_value(0, Vector3());
}
-////////////// Scalar Clamp
+////////////// Clamp
-String VisualShaderNodeScalarClamp::get_caption() const {
- return "ScalarClamp";
+String VisualShaderNodeClamp::get_caption() const {
+ return "Clamp";
}
-int VisualShaderNodeScalarClamp::get_input_port_count() const {
+int VisualShaderNodeClamp::get_input_port_count() const {
return 3;
}
-VisualShaderNodeScalarClamp::PortType VisualShaderNodeScalarClamp::get_input_port_type(int p_port) const {
+VisualShaderNodeClamp::PortType VisualShaderNodeClamp::get_input_port_type(int p_port) const {
+ switch (op_type) {
+ case OP_TYPE_FLOAT:
+ return PORT_TYPE_SCALAR;
+ case OP_TYPE_INT:
+ return PORT_TYPE_SCALAR_INT;
+ case OP_TYPE_VECTOR:
+ return PORT_TYPE_VECTOR;
+ default:
+ break;
+ }
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarClamp::get_input_port_name(int p_port) const {
+String VisualShaderNodeClamp::get_input_port_name(int p_port) const {
if (p_port == 0) {
return "";
} else if (p_port == 1) {
@@ -2779,73 +2765,86 @@ String VisualShaderNodeScalarClamp::get_input_port_name(int p_port) const {
return "";
}
-int VisualShaderNodeScalarClamp::get_output_port_count() const {
+int VisualShaderNodeClamp::get_output_port_count() const {
return 1;
}
-VisualShaderNodeScalarClamp::PortType VisualShaderNodeScalarClamp::get_output_port_type(int p_port) const {
+VisualShaderNodeClamp::PortType VisualShaderNodeClamp::get_output_port_type(int p_port) const {
+ switch (op_type) {
+ case OP_TYPE_FLOAT:
+ return PORT_TYPE_SCALAR;
+ case OP_TYPE_INT:
+ return PORT_TYPE_SCALAR_INT;
+ case OP_TYPE_VECTOR:
+ return PORT_TYPE_VECTOR;
+ default:
+ break;
+ }
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarClamp::get_output_port_name(int p_port) const {
+String VisualShaderNodeClamp::get_output_port_name(int p_port) const {
return "";
}
-String VisualShaderNodeScalarClamp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+String VisualShaderNodeClamp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
return "\t" + p_output_vars[0] + " = clamp(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
}
-VisualShaderNodeScalarClamp::VisualShaderNodeScalarClamp() {
- set_input_port_default_value(0, 0.0);
- set_input_port_default_value(1, 0.0);
- set_input_port_default_value(2, 1.0);
-}
-
-////////////// Vector Clamp
-
-String VisualShaderNodeVectorClamp::get_caption() const {
- return "VectorClamp";
-}
-
-int VisualShaderNodeVectorClamp::get_input_port_count() const {
- return 3;
-}
-
-VisualShaderNodeVectorClamp::PortType VisualShaderNodeVectorClamp::get_input_port_type(int p_port) const {
- return PORT_TYPE_VECTOR;
-}
-
-String VisualShaderNodeVectorClamp::get_input_port_name(int p_port) const {
- if (p_port == 0) {
- return "";
- } else if (p_port == 1) {
- return "min";
- } else if (p_port == 2) {
- return "max";
+void VisualShaderNodeClamp::set_op_type(OpType p_op_type) {
+ ERR_FAIL_INDEX((int)p_op_type, OP_TYPE_MAX);
+ if (op_type == p_op_type) {
+ return;
}
- return "";
+ switch (p_op_type) {
+ case OP_TYPE_FLOAT:
+ set_input_port_default_value(0, 0.0);
+ set_input_port_default_value(1, 0.0);
+ set_input_port_default_value(2, 0.0);
+ break;
+ case OP_TYPE_INT:
+ set_input_port_default_value(0, 0);
+ set_input_port_default_value(1, 0);
+ set_input_port_default_value(2, 0);
+ break;
+ case OP_TYPE_VECTOR:
+ set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0));
+ set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0));
+ set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0));
+ break;
+ default:
+ break;
+ }
+ op_type = p_op_type;
+ emit_changed();
}
-int VisualShaderNodeVectorClamp::get_output_port_count() const {
- return 1;
+VisualShaderNodeClamp::OpType VisualShaderNodeClamp::get_op_type() const {
+ return op_type;
}
-VisualShaderNodeVectorClamp::PortType VisualShaderNodeVectorClamp::get_output_port_type(int p_port) const {
- return PORT_TYPE_VECTOR;
+Vector<StringName> VisualShaderNodeClamp::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("op_type");
+ return props;
}
-String VisualShaderNodeVectorClamp::get_output_port_name(int p_port) const {
- return "";
-}
+void VisualShaderNodeClamp::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_op_type", "type"), &VisualShaderNodeClamp::set_op_type);
+ ClassDB::bind_method(D_METHOD("get_op_type"), &VisualShaderNodeClamp::get_op_type);
-String VisualShaderNodeVectorClamp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
- return "\t" + p_output_vars[0] + " = clamp(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "op_type", PROPERTY_HINT_ENUM, "Float,Int,Vector"), "set_op_type", "get_op_type");
+
+ BIND_ENUM_CONSTANT(OP_TYPE_FLOAT);
+ BIND_ENUM_CONSTANT(OP_TYPE_INT);
+ BIND_ENUM_CONSTANT(OP_TYPE_VECTOR);
+ BIND_ENUM_CONSTANT(OP_TYPE_MAX);
}
-VisualShaderNodeVectorClamp::VisualShaderNodeVectorClamp() {
- set_input_port_default_value(0, Vector3(0, 0, 0));
- set_input_port_default_value(1, Vector3(0, 0, 0));
- set_input_port_default_value(2, Vector3(1, 1, 1));
+VisualShaderNodeClamp::VisualShaderNodeClamp() {
+ set_input_port_default_value(0, 0.0);
+ set_input_port_default_value(1, 0.0);
+ set_input_port_default_value(2, 1.0);
}
////////////// FaceForward
@@ -2943,24 +2942,39 @@ VisualShaderNodeOuterProduct::VisualShaderNodeOuterProduct() {
set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0));
}
-////////////// Vector-Scalar Step
+////////////// Step
-String VisualShaderNodeVectorScalarStep::get_caption() const {
- return "VectorScalarStep";
+String VisualShaderNodeStep::get_caption() const {
+ return "Step";
}
-int VisualShaderNodeVectorScalarStep::get_input_port_count() const {
+int VisualShaderNodeStep::get_input_port_count() const {
return 2;
}
-VisualShaderNodeVectorScalarStep::PortType VisualShaderNodeVectorScalarStep::get_input_port_type(int p_port) const {
- if (p_port == 0) {
- return PORT_TYPE_SCALAR;
+VisualShaderNodeStep::PortType VisualShaderNodeStep::get_input_port_type(int p_port) const {
+ switch (op_type) {
+ case OP_TYPE_SCALAR:
+ return PORT_TYPE_SCALAR;
+ case OP_TYPE_VECTOR:
+ return PORT_TYPE_VECTOR;
+ case OP_TYPE_VECTOR_SCALAR:
+ switch (p_port) {
+ case 0:
+ return PORT_TYPE_SCALAR;
+ case 1:
+ return PORT_TYPE_VECTOR;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
}
- return PORT_TYPE_VECTOR;
+ return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeVectorScalarStep::get_input_port_name(int p_port) const {
+String VisualShaderNodeStep::get_input_port_name(int p_port) const {
if (p_port == 0) {
return "edge";
} else if (p_port == 1) {
@@ -2969,89 +2983,131 @@ String VisualShaderNodeVectorScalarStep::get_input_port_name(int p_port) const {
return "";
}
-int VisualShaderNodeVectorScalarStep::get_output_port_count() const {
+int VisualShaderNodeStep::get_output_port_count() const {
return 1;
}
-VisualShaderNodeVectorScalarStep::PortType VisualShaderNodeVectorScalarStep::get_output_port_type(int p_port) const {
- return PORT_TYPE_VECTOR;
+VisualShaderNodeStep::PortType VisualShaderNodeStep::get_output_port_type(int p_port) const {
+ switch (op_type) {
+ case OP_TYPE_SCALAR:
+ return PORT_TYPE_SCALAR;
+ case OP_TYPE_VECTOR:
+ return PORT_TYPE_VECTOR;
+ case OP_TYPE_VECTOR_SCALAR:
+ return PORT_TYPE_VECTOR;
+ default:
+ break;
+ }
+ return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeVectorScalarStep::get_output_port_name(int p_port) const {
+String VisualShaderNodeStep::get_output_port_name(int p_port) const {
return "";
}
-String VisualShaderNodeVectorScalarStep::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
- return "\t" + p_output_vars[0] + " = step(" + p_input_vars[0] + ", " + p_input_vars[1] + ");\n";
-}
-
-VisualShaderNodeVectorScalarStep::VisualShaderNodeVectorScalarStep() {
- set_input_port_default_value(0, 0.0);
- set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0));
-}
-
-////////////// Scalar SmoothStep
-
-String VisualShaderNodeScalarSmoothStep::get_caption() const {
- return "ScalarSmoothStep";
-}
-
-int VisualShaderNodeScalarSmoothStep::get_input_port_count() const {
- return 3;
+void VisualShaderNodeStep::set_op_type(OpType p_op_type) {
+ ERR_FAIL_INDEX((int)p_op_type, OP_TYPE_MAX);
+ if (op_type == p_op_type) {
+ return;
+ }
+ switch (p_op_type) {
+ case OP_TYPE_SCALAR:
+ if (op_type == OP_TYPE_VECTOR) {
+ set_input_port_default_value(0, 0.0); // edge
+ }
+ if (op_type == OP_TYPE_VECTOR || op_type == OP_TYPE_VECTOR_SCALAR) {
+ set_input_port_default_value(1, 0.0); // x
+ }
+ break;
+ case OP_TYPE_VECTOR:
+ if (op_type == OP_TYPE_SCALAR || op_type == OP_TYPE_VECTOR_SCALAR) {
+ set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0)); // edge
+ }
+ if (op_type == OP_TYPE_SCALAR) {
+ set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0)); // x
+ }
+ break;
+ case OP_TYPE_VECTOR_SCALAR:
+ if (op_type == OP_TYPE_VECTOR) {
+ set_input_port_default_value(0, 0.0); // edge
+ }
+ if (op_type == OP_TYPE_SCALAR) {
+ set_input_port_default_value(1, 0.0); // x
+ }
+ break;
+ default:
+ break;
+ }
+ op_type = p_op_type;
+ emit_changed();
}
-VisualShaderNodeScalarSmoothStep::PortType VisualShaderNodeScalarSmoothStep::get_input_port_type(int p_port) const {
- return PORT_TYPE_SCALAR;
+VisualShaderNodeStep::OpType VisualShaderNodeStep::get_op_type() const {
+ return op_type;
}
-String VisualShaderNodeScalarSmoothStep::get_input_port_name(int p_port) const {
- if (p_port == 0) {
- return "edge0";
- } else if (p_port == 1) {
- return "edge1";
- } else if (p_port == 2) {
- return "x";
- }
- return "";
+String VisualShaderNodeStep::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+ return "\t" + p_output_vars[0] + " = step(" + p_input_vars[0] + ", " + p_input_vars[1] + ");\n";
}
-int VisualShaderNodeScalarSmoothStep::get_output_port_count() const {
- return 1;
+Vector<StringName> VisualShaderNodeStep::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("op_type");
+ return props;
}
-VisualShaderNodeScalarSmoothStep::PortType VisualShaderNodeScalarSmoothStep::get_output_port_type(int p_port) const {
- return PORT_TYPE_SCALAR;
-}
+void VisualShaderNodeStep::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_op_type", "type"), &VisualShaderNodeStep::set_op_type);
+ ClassDB::bind_method(D_METHOD("get_op_type"), &VisualShaderNodeStep::get_op_type);
-String VisualShaderNodeScalarSmoothStep::get_output_port_name(int p_port) const {
- return "";
-}
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "op_type", PROPERTY_HINT_ENUM, "Scalar,Vector,VectorScalar"), "set_op_type", "get_op_type");
-String VisualShaderNodeScalarSmoothStep::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
- return "\t" + p_output_vars[0] + " = smoothstep(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
+ BIND_ENUM_CONSTANT(OP_TYPE_SCALAR);
+ BIND_ENUM_CONSTANT(OP_TYPE_VECTOR);
+ BIND_ENUM_CONSTANT(OP_TYPE_VECTOR_SCALAR);
+ BIND_ENUM_CONSTANT(OP_TYPE_MAX);
}
-VisualShaderNodeScalarSmoothStep::VisualShaderNodeScalarSmoothStep() {
+VisualShaderNodeStep::VisualShaderNodeStep() {
set_input_port_default_value(0, 0.0);
set_input_port_default_value(1, 0.0);
- set_input_port_default_value(2, 0.0);
}
-////////////// Vector SmoothStep
+////////////// SmoothStep
-String VisualShaderNodeVectorSmoothStep::get_caption() const {
- return "VectorSmoothStep";
+String VisualShaderNodeSmoothStep::get_caption() const {
+ return "SmoothStep";
}
-int VisualShaderNodeVectorSmoothStep::get_input_port_count() const {
+int VisualShaderNodeSmoothStep::get_input_port_count() const {
return 3;
}
-VisualShaderNodeVectorSmoothStep::PortType VisualShaderNodeVectorSmoothStep::get_input_port_type(int p_port) const {
- return PORT_TYPE_VECTOR;
+VisualShaderNodeSmoothStep::PortType VisualShaderNodeSmoothStep::get_input_port_type(int p_port) const {
+ switch (op_type) {
+ case OP_TYPE_SCALAR:
+ return PORT_TYPE_SCALAR;
+ case OP_TYPE_VECTOR:
+ return PORT_TYPE_VECTOR;
+ case OP_TYPE_VECTOR_SCALAR:
+ switch (p_port) {
+ case 0:
+ return PORT_TYPE_SCALAR; // edge0
+ case 1:
+ return PORT_TYPE_SCALAR; // edge1
+ case 2:
+ return PORT_TYPE_VECTOR; // x
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeVectorSmoothStep::get_input_port_name(int p_port) const {
+String VisualShaderNodeSmoothStep::get_input_port_name(int p_port) const {
if (p_port == 0) {
return "edge0";
} else if (p_port == 1) {
@@ -3062,78 +3118,98 @@ String VisualShaderNodeVectorSmoothStep::get_input_port_name(int p_port) const {
return "";
}
-int VisualShaderNodeVectorSmoothStep::get_output_port_count() const {
+int VisualShaderNodeSmoothStep::get_output_port_count() const {
return 1;
}
-VisualShaderNodeVectorSmoothStep::PortType VisualShaderNodeVectorSmoothStep::get_output_port_type(int p_port) const {
- return PORT_TYPE_VECTOR;
+VisualShaderNodeSmoothStep::PortType VisualShaderNodeSmoothStep::get_output_port_type(int p_port) const {
+ switch (op_type) {
+ case OP_TYPE_SCALAR:
+ return PORT_TYPE_SCALAR;
+ case OP_TYPE_VECTOR:
+ return PORT_TYPE_VECTOR;
+ case OP_TYPE_VECTOR_SCALAR:
+ return PORT_TYPE_VECTOR;
+ default:
+ break;
+ }
+ return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeVectorSmoothStep::get_output_port_name(int p_port) const {
+String VisualShaderNodeSmoothStep::get_output_port_name(int p_port) const {
return "";
}
-String VisualShaderNodeVectorSmoothStep::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
- return "\t" + p_output_vars[0] + " = smoothstep(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
-}
-
-VisualShaderNodeVectorSmoothStep::VisualShaderNodeVectorSmoothStep() {
- set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0));
- set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0));
- set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0));
-}
-
-////////////// Vector-Scalar SmoothStep
-
-String VisualShaderNodeVectorScalarSmoothStep::get_caption() const {
- return "VectorScalarSmoothStep";
-}
-
-int VisualShaderNodeVectorScalarSmoothStep::get_input_port_count() const {
- return 3;
-}
-
-VisualShaderNodeVectorScalarSmoothStep::PortType VisualShaderNodeVectorScalarSmoothStep::get_input_port_type(int p_port) const {
- if (p_port == 0) {
- return PORT_TYPE_SCALAR;
- } else if (p_port == 1) {
- return PORT_TYPE_SCALAR;
+void VisualShaderNodeSmoothStep::set_op_type(OpType p_op_type) {
+ ERR_FAIL_INDEX((int)p_op_type, OP_TYPE_MAX);
+ if (op_type == p_op_type) {
+ return;
+ }
+ switch (p_op_type) {
+ case OP_TYPE_SCALAR:
+ if (op_type == OP_TYPE_VECTOR) {
+ set_input_port_default_value(0, 0.0); // edge0
+ set_input_port_default_value(1, 0.0); // edge1
+ }
+ if (op_type == OP_TYPE_VECTOR || op_type == OP_TYPE_VECTOR_SCALAR) {
+ set_input_port_default_value(2, 0.0); // x
+ }
+ break;
+ case OP_TYPE_VECTOR:
+ if (op_type == OP_TYPE_SCALAR || op_type == OP_TYPE_VECTOR_SCALAR) {
+ set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0)); // edge0
+ set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0)); // edge1
+ }
+ if (op_type == OP_TYPE_SCALAR) {
+ set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0)); // x
+ }
+ break;
+ case OP_TYPE_VECTOR_SCALAR:
+ if (op_type == OP_TYPE_VECTOR) {
+ set_input_port_default_value(0, 0.0); // edge0
+ set_input_port_default_value(1, 0.0); // edge1
+ }
+ if (op_type == OP_TYPE_SCALAR) {
+ set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0)); // x
+ }
+ break;
+ default:
+ break;
}
- return PORT_TYPE_VECTOR;
+ op_type = p_op_type;
+ emit_changed();
}
-String VisualShaderNodeVectorScalarSmoothStep::get_input_port_name(int p_port) const {
- if (p_port == 0) {
- return "edge0";
- } else if (p_port == 1) {
- return "edge1";
- } else if (p_port == 2) {
- return "x";
- }
- return "";
+VisualShaderNodeSmoothStep::OpType VisualShaderNodeSmoothStep::get_op_type() const {
+ return op_type;
}
-int VisualShaderNodeVectorScalarSmoothStep::get_output_port_count() const {
- return 1;
+String VisualShaderNodeSmoothStep::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+ return "\t" + p_output_vars[0] + " = smoothstep(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
}
-VisualShaderNodeVectorScalarSmoothStep::PortType VisualShaderNodeVectorScalarSmoothStep::get_output_port_type(int p_port) const {
- return PORT_TYPE_VECTOR;
+Vector<StringName> VisualShaderNodeSmoothStep::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("op_type");
+ return props;
}
-String VisualShaderNodeVectorScalarSmoothStep::get_output_port_name(int p_port) const {
- return "";
-}
+void VisualShaderNodeSmoothStep::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_op_type", "type"), &VisualShaderNodeSmoothStep::set_op_type);
+ ClassDB::bind_method(D_METHOD("get_op_type"), &VisualShaderNodeSmoothStep::get_op_type);
-String VisualShaderNodeVectorScalarSmoothStep::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
- return "\t" + p_output_vars[0] + " = smoothstep(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "op_type", PROPERTY_HINT_ENUM, "Scalar,Vector,VectorScalar"), "set_op_type", "get_op_type");
+
+ BIND_ENUM_CONSTANT(OP_TYPE_SCALAR);
+ BIND_ENUM_CONSTANT(OP_TYPE_VECTOR);
+ BIND_ENUM_CONSTANT(OP_TYPE_VECTOR_SCALAR);
+ BIND_ENUM_CONSTANT(OP_TYPE_MAX);
}
-VisualShaderNodeVectorScalarSmoothStep::VisualShaderNodeVectorScalarSmoothStep() {
+VisualShaderNodeSmoothStep::VisualShaderNodeSmoothStep() {
set_input_port_default_value(0, 0.0);
set_input_port_default_value(1, 0.0);
- set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0));
+ set_input_port_default_value(2, 0.0);
}
////////////// Distance
@@ -3231,21 +3307,37 @@ VisualShaderNodeVectorRefract::VisualShaderNodeVectorRefract() {
set_input_port_default_value(2, 0.0);
}
-////////////// Scalar Mix
+////////////// Mix
-String VisualShaderNodeScalarInterp::get_caption() const {
- return "ScalarMix";
+String VisualShaderNodeMix::get_caption() const {
+ return "Mix";
}
-int VisualShaderNodeScalarInterp::get_input_port_count() const {
+int VisualShaderNodeMix::get_input_port_count() const {
return 3;
}
-VisualShaderNodeScalarInterp::PortType VisualShaderNodeScalarInterp::get_input_port_type(int p_port) const {
+VisualShaderNodeMix::PortType VisualShaderNodeMix::get_input_port_type(int p_port) const {
+ switch (op_type) {
+ case OP_TYPE_SCALAR:
+ return PORT_TYPE_SCALAR;
+ case OP_TYPE_VECTOR:
+ if (p_port == 2) {
+ return PORT_TYPE_VECTOR;
+ }
+ return PORT_TYPE_VECTOR;
+ case OP_TYPE_VECTOR_SCALAR:
+ if (p_port == 2) {
+ return PORT_TYPE_SCALAR;
+ }
+ return PORT_TYPE_VECTOR;
+ default:
+ break;
+ }
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarInterp::get_input_port_name(int p_port) const {
+String VisualShaderNodeMix::get_input_port_name(int p_port) const {
if (p_port == 0) {
return "a";
} else if (p_port == 1) {
@@ -3255,121 +3347,92 @@ String VisualShaderNodeScalarInterp::get_input_port_name(int p_port) const {
}
}
-int VisualShaderNodeScalarInterp::get_output_port_count() const {
+int VisualShaderNodeMix::get_output_port_count() const {
return 1;
}
-VisualShaderNodeScalarInterp::PortType VisualShaderNodeScalarInterp::get_output_port_type(int p_port) const {
+VisualShaderNodeMix::PortType VisualShaderNodeMix::get_output_port_type(int p_port) const {
+ switch (op_type) {
+ case OP_TYPE_SCALAR:
+ return PORT_TYPE_SCALAR;
+ case OP_TYPE_VECTOR:
+ return PORT_TYPE_VECTOR;
+ case OP_TYPE_VECTOR_SCALAR:
+ return PORT_TYPE_VECTOR;
+ default:
+ break;
+ }
return PORT_TYPE_SCALAR;
}
-String VisualShaderNodeScalarInterp::get_output_port_name(int p_port) const {
+String VisualShaderNodeMix::get_output_port_name(int p_port) const {
return "mix";
}
-String VisualShaderNodeScalarInterp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
- return "\t" + p_output_vars[0] + " = mix(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
-}
-
-VisualShaderNodeScalarInterp::VisualShaderNodeScalarInterp() {
- set_input_port_default_value(0, 0.0);
- set_input_port_default_value(1, 1.0);
- set_input_port_default_value(2, 0.5);
-}
-
-////////////// Vector Mix
-
-String VisualShaderNodeVectorInterp::get_caption() const {
- return "VectorMix";
-}
-
-int VisualShaderNodeVectorInterp::get_input_port_count() const {
- return 3;
-}
-
-VisualShaderNodeVectorInterp::PortType VisualShaderNodeVectorInterp::get_input_port_type(int p_port) const {
- return PORT_TYPE_VECTOR;
-}
-
-String VisualShaderNodeVectorInterp::get_input_port_name(int p_port) const {
- if (p_port == 0) {
- return "a";
- } else if (p_port == 1) {
- return "b";
- } else {
- return "weight";
+void VisualShaderNodeMix::set_op_type(OpType p_op_type) {
+ ERR_FAIL_INDEX((int)p_op_type, OP_TYPE_MAX);
+ if (op_type == p_op_type) {
+ return;
+ }
+ switch (p_op_type) {
+ case OP_TYPE_SCALAR:
+ set_input_port_default_value(0, 0.0); // a
+ set_input_port_default_value(1, 1.0); // b
+ if (op_type == OP_TYPE_VECTOR) {
+ set_input_port_default_value(2, 0.5); // weight
+ }
+ break;
+ case OP_TYPE_VECTOR:
+ set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0)); // a
+ set_input_port_default_value(1, Vector3(1.0, 1.0, 1.0)); // b
+ if (op_type == OP_TYPE_SCALAR || op_type == OP_TYPE_VECTOR_SCALAR) {
+ set_input_port_default_value(2, Vector3(0.5, 0.5, 0.5)); // weight
+ }
+ break;
+ case OP_TYPE_VECTOR_SCALAR:
+ set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0)); // a
+ set_input_port_default_value(1, Vector3(1.0, 1.0, 1.0)); // b
+ if (op_type == OP_TYPE_VECTOR) {
+ set_input_port_default_value(2, 0.5); // weight
+ }
+ break;
+ default:
+ break;
}
+ op_type = p_op_type;
+ emit_changed();
}
-int VisualShaderNodeVectorInterp::get_output_port_count() const {
- return 1;
-}
-
-VisualShaderNodeVectorInterp::PortType VisualShaderNodeVectorInterp::get_output_port_type(int p_port) const {
- return PORT_TYPE_VECTOR;
-}
-
-String VisualShaderNodeVectorInterp::get_output_port_name(int p_port) const {
- return "mix";
+VisualShaderNodeMix::OpType VisualShaderNodeMix::get_op_type() const {
+ return op_type;
}
-String VisualShaderNodeVectorInterp::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
+String VisualShaderNodeMix::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
return "\t" + p_output_vars[0] + " = mix(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
}
-VisualShaderNodeVectorInterp::VisualShaderNodeVectorInterp() {
- set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0));
- set_input_port_default_value(1, Vector3(1.0, 1.0, 1.0));
- set_input_port_default_value(2, Vector3(0.5, 0.5, 0.5));
-}
-
-////////////// Vector Mix (by scalar)
-
-String VisualShaderNodeVectorScalarMix::get_caption() const {
- return "VectorScalarMix";
-}
-
-int VisualShaderNodeVectorScalarMix::get_input_port_count() const {
- return 3;
-}
-
-VisualShaderNodeVectorScalarMix::PortType VisualShaderNodeVectorScalarMix::get_input_port_type(int p_port) const {
- if (p_port == 2) {
- return PORT_TYPE_SCALAR;
- }
- return PORT_TYPE_VECTOR;
-}
-
-String VisualShaderNodeVectorScalarMix::get_input_port_name(int p_port) const {
- if (p_port == 0) {
- return "a";
- } else if (p_port == 1) {
- return "b";
- } else {
- return "weight";
- }
-}
-
-int VisualShaderNodeVectorScalarMix::get_output_port_count() const {
- return 1;
+Vector<StringName> VisualShaderNodeMix::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("op_type");
+ return props;
}
-VisualShaderNodeVectorScalarMix::PortType VisualShaderNodeVectorScalarMix::get_output_port_type(int p_port) const {
- return PORT_TYPE_VECTOR;
-}
+void VisualShaderNodeMix::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_op_type", "type"), &VisualShaderNodeMix::set_op_type);
+ ClassDB::bind_method(D_METHOD("get_op_type"), &VisualShaderNodeMix::get_op_type);
-String VisualShaderNodeVectorScalarMix::get_output_port_name(int p_port) const {
- return "mix";
-}
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "op_type", PROPERTY_HINT_ENUM, "Scalar,Vector,VectorScalar"), "set_op_type", "get_op_type");
-String VisualShaderNodeVectorScalarMix::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
- return "\t" + p_output_vars[0] + " = mix(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
+ BIND_ENUM_CONSTANT(OP_TYPE_SCALAR);
+ BIND_ENUM_CONSTANT(OP_TYPE_VECTOR);
+ BIND_ENUM_CONSTANT(OP_TYPE_VECTOR_SCALAR);
+ BIND_ENUM_CONSTANT(OP_TYPE_MAX);
}
-VisualShaderNodeVectorScalarMix::VisualShaderNodeVectorScalarMix() {
- set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0));
- set_input_port_default_value(1, Vector3(1.0, 1.0, 1.0));
- set_input_port_default_value(2, 0.5);
+VisualShaderNodeMix::VisualShaderNodeMix() {
+ set_input_port_default_value(0, 0.0); // a
+ set_input_port_default_value(1, 1.0); // b
+ set_input_port_default_value(2, 0.5); // weight
}
////////////// Vector Compose
@@ -4847,7 +4910,7 @@ VisualShaderNodeIf::VisualShaderNodeIf() {
////////////// Switch
String VisualShaderNodeSwitch::get_caption() const {
- return "VectorSwitch";
+ return "Switch";
}
int VisualShaderNodeSwitch::get_input_port_count() const {
@@ -4858,7 +4921,23 @@ VisualShaderNodeSwitch::PortType VisualShaderNodeSwitch::get_input_port_type(int
if (p_port == 0) {
return PORT_TYPE_BOOLEAN;
}
- return PORT_TYPE_VECTOR;
+ if (p_port == 1 || p_port == 2) {
+ switch (op_type) {
+ case OP_TYPE_FLOAT:
+ return PORT_TYPE_SCALAR;
+ case OP_TYPE_INT:
+ return PORT_TYPE_SCALAR_INT;
+ case OP_TYPE_VECTOR:
+ return PORT_TYPE_VECTOR;
+ case OP_TYPE_BOOLEAN:
+ return PORT_TYPE_BOOLEAN;
+ case OP_TYPE_TRANSFORM:
+ return PORT_TYPE_TRANSFORM;
+ default:
+ break;
+ }
+ }
+ return PORT_TYPE_SCALAR;
}
String VisualShaderNodeSwitch::get_input_port_name(int p_port) const {
@@ -4879,13 +4958,84 @@ int VisualShaderNodeSwitch::get_output_port_count() const {
}
VisualShaderNodeSwitch::PortType VisualShaderNodeSwitch::get_output_port_type(int p_port) const {
- return PORT_TYPE_VECTOR;
+ switch (op_type) {
+ case OP_TYPE_FLOAT:
+ return PORT_TYPE_SCALAR;
+ case OP_TYPE_INT:
+ return PORT_TYPE_SCALAR_INT;
+ case OP_TYPE_VECTOR:
+ return PORT_TYPE_VECTOR;
+ case OP_TYPE_BOOLEAN:
+ return PORT_TYPE_BOOLEAN;
+ case OP_TYPE_TRANSFORM:
+ return PORT_TYPE_TRANSFORM;
+ default:
+ break;
+ }
+ return PORT_TYPE_SCALAR;
}
String VisualShaderNodeSwitch::get_output_port_name(int p_port) const {
return "result";
}
+void VisualShaderNodeSwitch::set_op_type(OpType p_op_type) {
+ ERR_FAIL_INDEX((int)p_op_type, OP_TYPE_MAX);
+ if (op_type == p_op_type) {
+ return;
+ }
+ switch (p_op_type) {
+ case OP_TYPE_FLOAT:
+ set_input_port_default_value(1, 1.0);
+ set_input_port_default_value(2, 0.0);
+ break;
+ case OP_TYPE_INT:
+ set_input_port_default_value(1, 1);
+ set_input_port_default_value(2, 0);
+ break;
+ case OP_TYPE_VECTOR:
+ set_input_port_default_value(1, Vector3(1.0, 1.0, 1.0));
+ set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0));
+ break;
+ case OP_TYPE_BOOLEAN:
+ set_input_port_default_value(1, true);
+ set_input_port_default_value(2, false);
+ break;
+ case OP_TYPE_TRANSFORM:
+ set_input_port_default_value(1, Transform());
+ set_input_port_default_value(2, Transform());
+ break;
+ default:
+ break;
+ }
+ op_type = p_op_type;
+ emit_changed();
+}
+
+VisualShaderNodeSwitch::OpType VisualShaderNodeSwitch::get_op_type() const {
+ return op_type;
+}
+
+Vector<StringName> VisualShaderNodeSwitch::get_editable_properties() const {
+ Vector<StringName> props;
+ props.push_back("op_type");
+ return props;
+}
+
+void VisualShaderNodeSwitch::_bind_methods() { // static
+ ClassDB::bind_method(D_METHOD("set_op_type", "type"), &VisualShaderNodeSwitch::set_op_type);
+ ClassDB::bind_method(D_METHOD("get_op_type"), &VisualShaderNodeSwitch::get_op_type);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "op_type", PROPERTY_HINT_ENUM, "Float,Int,Vector,Boolean,Transform"), "set_op_type", "get_op_type");
+
+ BIND_ENUM_CONSTANT(OP_TYPE_FLOAT);
+ BIND_ENUM_CONSTANT(OP_TYPE_INT);
+ BIND_ENUM_CONSTANT(OP_TYPE_VECTOR);
+ BIND_ENUM_CONSTANT(OP_TYPE_BOOLEAN);
+ BIND_ENUM_CONSTANT(OP_TYPE_TRANSFORM);
+ BIND_ENUM_CONSTANT(OP_TYPE_MAX);
+}
+
String VisualShaderNodeSwitch::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const {
String code;
code += "\tif(" + p_input_vars[0] + ")\n";
@@ -4902,29 +5052,6 @@ String VisualShaderNodeSwitch::generate_code(Shader::Mode p_mode, VisualShader::
VisualShaderNodeSwitch::VisualShaderNodeSwitch() {
simple_decl = false;
set_input_port_default_value(0, false);
- set_input_port_default_value(1, Vector3(1.0, 1.0, 1.0));
- set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0));
-}
-
-////////////// Switch(scalar)
-
-String VisualShaderNodeScalarSwitch::get_caption() const {
- return "ScalarSwitch";
-}
-
-VisualShaderNodeScalarSwitch::PortType VisualShaderNodeScalarSwitch::get_input_port_type(int p_port) const {
- if (p_port == 0) {
- return PORT_TYPE_BOOLEAN;
- }
- return PORT_TYPE_SCALAR;
-}
-
-VisualShaderNodeScalarSwitch::PortType VisualShaderNodeScalarSwitch::get_output_port_type(int p_port) const {
- return PORT_TYPE_SCALAR;
-}
-
-VisualShaderNodeScalarSwitch::VisualShaderNodeScalarSwitch() {
- set_input_port_default_value(0, false);
set_input_port_default_value(1, 1.0);
set_input_port_default_value(2, 0.0);
}
@@ -5384,16 +5511,22 @@ String VisualShaderNodeMultiplyAdd::generate_code(Shader::Mode p_mode, VisualSha
void VisualShaderNodeMultiplyAdd::set_op_type(OpType p_op_type) {
ERR_FAIL_INDEX((int)p_op_type, OP_TYPE_MAX);
- if (p_op_type != op_type) {
- if (p_op_type == OP_TYPE_SCALAR) {
+ if (op_type == p_op_type) {
+ return;
+ }
+ switch (p_op_type) {
+ case OP_TYPE_SCALAR:
set_input_port_default_value(0, 0.0);
set_input_port_default_value(1, 0.0);
set_input_port_default_value(2, 0.0);
- } else {
+ break;
+ case OP_TYPE_VECTOR:
set_input_port_default_value(0, Vector3(0.0, 0.0, 0.0));
set_input_port_default_value(1, Vector3(0.0, 0.0, 0.0));
set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0));
- }
+ break;
+ default:
+ break;
}
op_type = p_op_type;
emit_changed();
diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h
index e968bbae25..a5d0fe4649 100644
--- a/scene/resources/visual_shader_nodes.h
+++ b/scene/resources/visual_shader_nodes.h
@@ -826,7 +826,6 @@ class VisualShaderNodeIntFunc : public VisualShaderNode {
public:
enum Function {
FUNC_ABS,
- FUNC_CLAMP,
FUNC_NEGATE,
FUNC_SIGN,
};
@@ -1088,29 +1087,20 @@ public:
/// CLAMP
///////////////////////////////////////
-class VisualShaderNodeScalarClamp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarClamp, VisualShaderNode);
+class VisualShaderNodeClamp : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeClamp, VisualShaderNode);
public:
- virtual String get_caption() const override;
-
- virtual int get_input_port_count() const override;
- virtual PortType get_input_port_type(int p_port) const override;
- virtual String get_input_port_name(int p_port) const override;
-
- virtual int get_output_port_count() const override;
- virtual PortType get_output_port_type(int p_port) const override;
- virtual String get_output_port_name(int p_port) const override;
-
- virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
-
- VisualShaderNodeScalarClamp();
-};
-
-///////////////////////////////////////
+ enum OpType {
+ OP_TYPE_FLOAT,
+ OP_TYPE_INT,
+ OP_TYPE_VECTOR,
+ OP_TYPE_MAX,
+ };
-class VisualShaderNodeVectorClamp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorClamp, VisualShaderNode);
+protected:
+ OpType op_type = OP_TYPE_FLOAT;
+ static void _bind_methods();
public:
virtual String get_caption() const override;
@@ -1123,11 +1113,18 @@ public:
virtual PortType get_output_port_type(int p_port) const override;
virtual String get_output_port_name(int p_port) const override;
+ void set_op_type(OpType p_type);
+ OpType get_op_type() const;
+
+ virtual Vector<StringName> get_editable_properties() const override;
+
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
- VisualShaderNodeVectorClamp();
+ VisualShaderNodeClamp();
};
+VARIANT_ENUM_CAST(VisualShaderNodeClamp::OpType)
+
///////////////////////////////////////
/// DERIVATIVE FUNCTIONS
///////////////////////////////////////
@@ -1260,8 +1257,20 @@ public:
/// STEP
///////////////////////////////////////
-class VisualShaderNodeVectorScalarStep : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorScalarStep, VisualShaderNode);
+class VisualShaderNodeStep : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeStep, VisualShaderNode);
+
+public:
+ enum OpType {
+ OP_TYPE_SCALAR,
+ OP_TYPE_VECTOR,
+ OP_TYPE_VECTOR_SCALAR,
+ OP_TYPE_MAX,
+ };
+
+protected:
+ OpType op_type = OP_TYPE_SCALAR;
+ static void _bind_methods();
public:
virtual String get_caption() const override;
@@ -1274,38 +1283,36 @@ public:
virtual PortType get_output_port_type(int p_port) const override;
virtual String get_output_port_name(int p_port) const override;
+ void set_op_type(OpType p_type);
+ OpType get_op_type() const;
+
+ virtual Vector<StringName> get_editable_properties() const override;
+
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
- VisualShaderNodeVectorScalarStep();
+ VisualShaderNodeStep();
};
+VARIANT_ENUM_CAST(VisualShaderNodeStep::OpType)
+
///////////////////////////////////////
/// SMOOTHSTEP
///////////////////////////////////////
-class VisualShaderNodeScalarSmoothStep : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarSmoothStep, VisualShaderNode);
+class VisualShaderNodeSmoothStep : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeSmoothStep, VisualShaderNode);
public:
- virtual String get_caption() const override;
-
- virtual int get_input_port_count() const override;
- virtual PortType get_input_port_type(int p_port) const override;
- virtual String get_input_port_name(int p_port) const override;
-
- virtual int get_output_port_count() const override;
- virtual PortType get_output_port_type(int p_port) const override;
- virtual String get_output_port_name(int p_port) const override;
-
- virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
-
- VisualShaderNodeScalarSmoothStep();
-};
-
-///////////////////////////////////////
+ enum OpType {
+ OP_TYPE_SCALAR,
+ OP_TYPE_VECTOR,
+ OP_TYPE_VECTOR_SCALAR,
+ OP_TYPE_MAX,
+ };
-class VisualShaderNodeVectorSmoothStep : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorSmoothStep, VisualShaderNode);
+protected:
+ OpType op_type = OP_TYPE_SCALAR;
+ static void _bind_methods();
public:
virtual String get_caption() const override;
@@ -1318,32 +1325,18 @@ public:
virtual PortType get_output_port_type(int p_port) const override;
virtual String get_output_port_name(int p_port) const override;
- virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
-
- VisualShaderNodeVectorSmoothStep();
-};
-
-///////////////////////////////////////
-
-class VisualShaderNodeVectorScalarSmoothStep : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorScalarSmoothStep, VisualShaderNode);
-
-public:
- virtual String get_caption() const override;
-
- virtual int get_input_port_count() const override;
- virtual PortType get_input_port_type(int p_port) const override;
- virtual String get_input_port_name(int p_port) const override;
+ void set_op_type(OpType p_type);
+ OpType get_op_type() const;
- virtual int get_output_port_count() const override;
- virtual PortType get_output_port_type(int p_port) const override;
- virtual String get_output_port_name(int p_port) const override;
+ virtual Vector<StringName> get_editable_properties() const override;
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
- VisualShaderNodeVectorScalarSmoothStep();
+ VisualShaderNodeSmoothStep();
};
+VARIANT_ENUM_CAST(VisualShaderNodeSmoothStep::OpType)
+
///////////////////////////////////////
/// DISTANCE
///////////////////////////////////////
@@ -1394,29 +1387,20 @@ public:
/// MIX
///////////////////////////////////////
-class VisualShaderNodeScalarInterp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeScalarInterp, VisualShaderNode);
+class VisualShaderNodeMix : public VisualShaderNode {
+ GDCLASS(VisualShaderNodeMix, VisualShaderNode);
public:
- virtual String get_caption() const override;
-
- virtual int get_input_port_count() const override;
- virtual PortType get_input_port_type(int p_port) const override;
- virtual String get_input_port_name(int p_port) const override;
-
- virtual int get_output_port_count() const override;
- virtual PortType get_output_port_type(int p_port) const override;
- virtual String get_output_port_name(int p_port) const override;
-
- virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
-
- VisualShaderNodeScalarInterp();
-};
-
-///////////////////////////////////////
+ enum OpType {
+ OP_TYPE_SCALAR,
+ OP_TYPE_VECTOR,
+ OP_TYPE_VECTOR_SCALAR,
+ OP_TYPE_MAX,
+ };
-class VisualShaderNodeVectorInterp : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorInterp, VisualShaderNode);
+protected:
+ OpType op_type = OP_TYPE_SCALAR;
+ static void _bind_methods();
public:
virtual String get_caption() const override;
@@ -1429,32 +1413,18 @@ public:
virtual PortType get_output_port_type(int p_port) const override;
virtual String get_output_port_name(int p_port) const override;
- virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
-
- VisualShaderNodeVectorInterp();
-};
-
-///////////////////////////////////////
-
-class VisualShaderNodeVectorScalarMix : public VisualShaderNode {
- GDCLASS(VisualShaderNodeVectorScalarMix, VisualShaderNode);
-
-public:
- virtual String get_caption() const override;
-
- virtual int get_input_port_count() const override;
- virtual PortType get_input_port_type(int p_port) const override;
- virtual String get_input_port_name(int p_port) const override;
+ void set_op_type(OpType p_type);
+ OpType get_op_type() const;
- virtual int get_output_port_count() const override;
- virtual PortType get_output_port_type(int p_port) const override;
- virtual String get_output_port_name(int p_port) const override;
+ virtual Vector<StringName> get_editable_properties() const override;
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
- VisualShaderNodeVectorScalarMix();
+ VisualShaderNodeMix();
};
+VARIANT_ENUM_CAST(VisualShaderNodeMix::OpType)
+
///////////////////////////////////////
/// COMPOSE
///////////////////////////////////////
@@ -2023,6 +1993,21 @@ class VisualShaderNodeSwitch : public VisualShaderNode {
GDCLASS(VisualShaderNodeSwitch, VisualShaderNode);
public:
+ enum OpType {
+ OP_TYPE_FLOAT,
+ OP_TYPE_INT,
+ OP_TYPE_VECTOR,
+ OP_TYPE_BOOLEAN,
+ OP_TYPE_TRANSFORM,
+ OP_TYPE_MAX,
+ };
+
+protected:
+ OpType op_type = OP_TYPE_FLOAT;
+
+ static void _bind_methods();
+
+public:
virtual String get_caption() const override;
virtual int get_input_port_count() const override;
@@ -2033,22 +2018,17 @@ public:
virtual PortType get_output_port_type(int p_port) const override;
virtual String get_output_port_name(int p_port) const override;
+ void set_op_type(OpType p_type);
+ OpType get_op_type() const;
+
+ virtual Vector<StringName> get_editable_properties() const override;
+
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override;
VisualShaderNodeSwitch();
};
-class VisualShaderNodeScalarSwitch : public VisualShaderNodeSwitch {
- GDCLASS(VisualShaderNodeScalarSwitch, VisualShaderNodeSwitch);
-
-public:
- virtual String get_caption() const override;
-
- virtual PortType get_input_port_type(int p_port) const override;
- virtual PortType get_output_port_type(int p_port) const override;
-
- VisualShaderNodeScalarSwitch();
-};
+VARIANT_ENUM_CAST(VisualShaderNodeSwitch::OpType)
///////////////////////////////////////
/// FRESNEL
diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp
index cadbd93fed..156c7d0576 100644
--- a/scene/resources/world_2d.cpp
+++ b/scene/resources/world_2d.cpp
@@ -39,7 +39,7 @@
struct SpatialIndexer2D {
struct CellRef {
- int ref;
+ int ref = 0;
_FORCE_INLINE_ int inc() {
ref++;
@@ -49,10 +49,6 @@ struct SpatialIndexer2D {
ref--;
return ref;
}
-
- _FORCE_INLINE_ CellRef() {
- ref = 0;
- }
};
struct CellKey {
@@ -61,7 +57,7 @@ struct SpatialIndexer2D {
int32_t x;
int32_t y;
};
- uint64_t key;
+ uint64_t key = 0;
};
bool operator==(const CellKey &p_key) const { return key == p_key.key; }
@@ -86,9 +82,9 @@ struct SpatialIndexer2D {
Map<Viewport *, ViewportData> viewports;
- bool changed;
+ bool changed = false;
- uint64_t pass;
+ uint64_t pass = 0;
void _notifier_update_cells(VisibilityNotifier2D *p_notifier, const Rect2 &p_rect, bool p_add) {
Point2i begin = p_rect.position;
@@ -287,8 +283,6 @@ struct SpatialIndexer2D {
}
SpatialIndexer2D() {
- pass = 0;
- changed = false;
cell_size = GLOBAL_DEF("world/2d/cell_size", 100);
}
};
diff --git a/scene/resources/world_margin_shape_3d.cpp b/scene/resources/world_margin_shape_3d.cpp
index 79cbb3bbe0..28d50e1921 100644
--- a/scene/resources/world_margin_shape_3d.cpp
+++ b/scene/resources/world_margin_shape_3d.cpp
@@ -69,7 +69,6 @@ void WorldMarginShape3D::set_plane(Plane p_plane) {
plane = p_plane;
_update_shape();
notify_change_to_owners();
- _change_notify("plane");
}
Plane WorldMarginShape3D::get_plane() const {
diff --git a/servers/audio/audio_driver_dummy.cpp b/servers/audio/audio_driver_dummy.cpp
index 12cadb9301..a28dcb1015 100644
--- a/servers/audio/audio_driver_dummy.cpp
+++ b/servers/audio/audio_driver_dummy.cpp
@@ -39,16 +39,16 @@ Error AudioDriverDummy::init() {
exit_thread = false;
samples_in = nullptr;
- mix_rate = GLOBAL_GET("audio/mix_rate");
+ mix_rate = GLOBAL_GET("audio/driver/mix_rate");
speaker_mode = SPEAKER_MODE_STEREO;
channels = 2;
- int latency = GLOBAL_GET("audio/output_latency");
+ int latency = GLOBAL_GET("audio/driver/output_latency");
buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
samples_in = memnew_arr(int32_t, buffer_frames * channels);
- thread = Thread::create(AudioDriverDummy::thread_func, this);
+ thread.start(AudioDriverDummy::thread_func, this);
return OK;
};
@@ -86,31 +86,18 @@ AudioDriver::SpeakerMode AudioDriverDummy::get_speaker_mode() const {
};
void AudioDriverDummy::lock() {
- if (!thread) {
- return;
- }
mutex.lock();
};
void AudioDriverDummy::unlock() {
- if (!thread) {
- return;
- }
mutex.unlock();
};
void AudioDriverDummy::finish() {
- if (!thread) {
- return;
- }
-
exit_thread = true;
- Thread::wait_to_finish(thread);
+ thread.wait_to_finish();
if (samples_in) {
memdelete_arr(samples_in);
};
-
- memdelete(thread);
- thread = nullptr;
};
diff --git a/servers/audio/audio_driver_dummy.h b/servers/audio/audio_driver_dummy.h
index 617ffb2c79..7d84e7ffc8 100644
--- a/servers/audio/audio_driver_dummy.h
+++ b/servers/audio/audio_driver_dummy.h
@@ -37,7 +37,7 @@
#include "core/os/thread.h"
class AudioDriverDummy : public AudioDriver {
- Thread *thread = nullptr;
+ Thread thread;
Mutex mutex;
int32_t *samples_in;
diff --git a/servers/audio/audio_filter_sw.cpp b/servers/audio/audio_filter_sw.cpp
index 580e061496..bcfa4c4c37 100644
--- a/servers/audio/audio_filter_sw.cpp
+++ b/servers/audio/audio_filter_sw.cpp
@@ -58,7 +58,7 @@ void AudioFilterSW::prepare_coefficients(Coeffs *p_coeffs) {
final_cutoff = 1; //don't allow less than this
}
- double omega = 2.0 * Math_PI * final_cutoff / sampling_rate;
+ double omega = Math_TAU * final_cutoff / sampling_rate;
double sin_v = Math::sin(omega);
double cos_v = Math::cos(omega);
@@ -132,7 +132,7 @@ void AudioFilterSW::prepare_coefficients(Coeffs *p_coeffs) {
double hicutoff = resonance;
double centercutoff = (cutoff + resonance) / 2.0;
double bandwidth = (Math::log(centercutoff) - Math::log(hicutoff)) / Math::log((double)2);
- omega = 2.0 * Math_PI * centercutoff / sampling_rate;
+ omega = Math_TAU * centercutoff / sampling_rate;
alpha = Math::sin(omega) * Math::sinh(Math::log((double)2) / 2 * bandwidth * omega / Math::sin(omega));
a0 = 1 + alpha;
@@ -197,7 +197,7 @@ void AudioFilterSW::set_stages(int p_stages) { //adjust for multiple stages
/* Fouriertransform kernel to obtain response */
float AudioFilterSW::get_response(float p_freq, Coeffs *p_coeffs) {
- float freq = p_freq / sampling_rate * Math_PI * 2.0f;
+ float freq = p_freq / sampling_rate * Math_TAU;
float cx = p_coeffs->b0, cy = 0.0;
diff --git a/servers/audio/audio_rb_resampler.cpp b/servers/audio/audio_rb_resampler.cpp
index efdcb916ed..3c8a1469cd 100644
--- a/servers/audio/audio_rb_resampler.cpp
+++ b/servers/audio/audio_rb_resampler.cpp
@@ -131,7 +131,7 @@ bool AudioRBResampler::mix(AudioFrame *p_dest, int p_frames) {
src_read = read_space;
}
- rb_read_pos = (rb_read_pos + src_read) & rb_mask;
+ rb_read_pos.set((rb_read_pos.get() + src_read) & rb_mask);
// Create fadeout effect for the end of stream (note that it can be because of slow writer)
if (p_frames - target_todo > 0) {
@@ -183,8 +183,8 @@ Error AudioRBResampler::setup(int p_channels, int p_src_mix_rate, int p_target_m
src_mix_rate = p_src_mix_rate;
target_mix_rate = p_target_mix_rate;
offset = 0;
- rb_read_pos = 0;
- rb_write_pos = 0;
+ rb_read_pos.set(0);
+ rb_write_pos.set(0);
//avoid maybe strange noises upon load
for (unsigned int i = 0; i < (rb_len * channels); i++) {
@@ -205,8 +205,8 @@ void AudioRBResampler::clear() {
memdelete_arr(read_buf);
rb = nullptr;
offset = 0;
- rb_read_pos = 0;
- rb_write_pos = 0;
+ rb_read_pos.set(0);
+ rb_write_pos.set(0);
read_buf = nullptr;
}
@@ -214,8 +214,8 @@ AudioRBResampler::AudioRBResampler() {
rb = nullptr;
offset = 0;
read_buf = nullptr;
- rb_read_pos = 0;
- rb_write_pos = 0;
+ rb_read_pos.set(0);
+ rb_write_pos.set(0);
rb_bits = 0;
rb_len = 0;
diff --git a/servers/audio/audio_rb_resampler.h b/servers/audio/audio_rb_resampler.h
index 7b74e3a2a1..c0f981704b 100644
--- a/servers/audio/audio_rb_resampler.h
+++ b/servers/audio/audio_rb_resampler.h
@@ -32,6 +32,7 @@
#define AUDIO_RB_RESAMPLER_H
#include "core/os/memory.h"
+#include "core/templates/safe_refcount.h"
#include "core/typedefs.h"
#include "servers/audio_server.h"
@@ -44,8 +45,8 @@ struct AudioRBResampler {
uint32_t src_mix_rate;
uint32_t target_mix_rate;
- volatile int rb_read_pos;
- volatile int rb_write_pos;
+ SafeNumeric<int> rb_read_pos;
+ SafeNumeric<int> rb_write_pos;
int32_t offset; //contains the fractional remainder of the resampler
enum {
@@ -62,8 +63,8 @@ struct AudioRBResampler {
public:
_FORCE_INLINE_ void flush() {
- rb_read_pos = 0;
- rb_write_pos = 0;
+ rb_read_pos.set(0);
+ rb_write_pos.set(0);
offset = 0;
}
@@ -78,8 +79,8 @@ public:
_FORCE_INLINE_ int get_writer_space() const {
int space, r, w;
- r = rb_read_pos;
- w = rb_write_pos;
+ r = rb_read_pos.get();
+ w = rb_write_pos.get();
if (r == w) {
space = rb_len - 1;
@@ -95,8 +96,8 @@ public:
_FORCE_INLINE_ int get_reader_space() const {
int space, r, w;
- r = rb_read_pos;
- w = rb_write_pos;
+ r = rb_read_pos.get();
+ w = rb_write_pos.get();
if (r == w) {
space = 0;
@@ -110,48 +111,52 @@ public:
}
_FORCE_INLINE_ bool has_data() const {
- return rb && rb_read_pos != rb_write_pos;
+ return rb && rb_read_pos.get() != rb_write_pos.get();
}
_FORCE_INLINE_ float *get_write_buffer() { return read_buf; }
_FORCE_INLINE_ void write(uint32_t p_frames) {
ERR_FAIL_COND(p_frames >= rb_len);
+ int wp = rb_write_pos.get();
+
switch (channels) {
case 1: {
for (uint32_t i = 0; i < p_frames; i++) {
- rb[rb_write_pos] = read_buf[i];
- rb_write_pos = (rb_write_pos + 1) & rb_mask;
+ rb[wp] = read_buf[i];
+ wp = (wp + 1) & rb_mask;
}
} break;
case 2: {
for (uint32_t i = 0; i < p_frames; i++) {
- rb[(rb_write_pos << 1) + 0] = read_buf[(i << 1) + 0];
- rb[(rb_write_pos << 1) + 1] = read_buf[(i << 1) + 1];
- rb_write_pos = (rb_write_pos + 1) & rb_mask;
+ rb[(wp << 1) + 0] = read_buf[(i << 1) + 0];
+ rb[(wp << 1) + 1] = read_buf[(i << 1) + 1];
+ wp = (wp + 1) & rb_mask;
}
} break;
case 4: {
for (uint32_t i = 0; i < p_frames; i++) {
- rb[(rb_write_pos << 2) + 0] = read_buf[(i << 2) + 0];
- rb[(rb_write_pos << 2) + 1] = read_buf[(i << 2) + 1];
- rb[(rb_write_pos << 2) + 2] = read_buf[(i << 2) + 2];
- rb[(rb_write_pos << 2) + 3] = read_buf[(i << 2) + 3];
- rb_write_pos = (rb_write_pos + 1) & rb_mask;
+ rb[(wp << 2) + 0] = read_buf[(i << 2) + 0];
+ rb[(wp << 2) + 1] = read_buf[(i << 2) + 1];
+ rb[(wp << 2) + 2] = read_buf[(i << 2) + 2];
+ rb[(wp << 2) + 3] = read_buf[(i << 2) + 3];
+ wp = (wp + 1) & rb_mask;
}
} break;
case 6: {
for (uint32_t i = 0; i < p_frames; i++) {
- rb[(rb_write_pos * 6) + 0] = read_buf[(i * 6) + 0];
- rb[(rb_write_pos * 6) + 1] = read_buf[(i * 6) + 1];
- rb[(rb_write_pos * 6) + 2] = read_buf[(i * 6) + 2];
- rb[(rb_write_pos * 6) + 3] = read_buf[(i * 6) + 3];
- rb[(rb_write_pos * 6) + 4] = read_buf[(i * 6) + 4];
- rb[(rb_write_pos * 6) + 5] = read_buf[(i * 6) + 5];
- rb_write_pos = (rb_write_pos + 1) & rb_mask;
+ rb[(wp * 6) + 0] = read_buf[(i * 6) + 0];
+ rb[(wp * 6) + 1] = read_buf[(i * 6) + 1];
+ rb[(wp * 6) + 2] = read_buf[(i * 6) + 2];
+ rb[(wp * 6) + 3] = read_buf[(i * 6) + 3];
+ rb[(wp * 6) + 4] = read_buf[(i * 6) + 4];
+ rb[(wp * 6) + 5] = read_buf[(i * 6) + 5];
+ wp = (wp + 1) & rb_mask;
}
} break;
}
+
+ rb_write_pos.set(wp);
}
int get_channel_count() const;
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index 91fce5d34e..49ac78fad8 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -184,7 +184,7 @@ void AudioStreamPlaybackMicrophone::start(float p_from_pos) {
return;
}
- if (!GLOBAL_GET("audio/enable_audio_input")) {
+ if (!GLOBAL_GET("audio/driver/enable_input")) {
WARN_PRINT("Need to enable Project settings > Audio > Enable Audio Input option to use capturing.");
return;
}
diff --git a/servers/audio/effects/audio_effect_capture.cpp b/servers/audio/effects/audio_effect_capture.cpp
new file mode 100644
index 0000000000..37e4122e50
--- /dev/null
+++ b/servers/audio/effects/audio_effect_capture.cpp
@@ -0,0 +1,140 @@
+/*************************************************************************/
+/* audio_effect_capture.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 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_effect_capture.h"
+
+bool AudioEffectCapture::can_get_buffer(int p_frames) const {
+ return buffer.data_left() >= p_frames;
+}
+
+PackedVector2Array AudioEffectCapture::get_buffer(int p_frames) {
+ ERR_FAIL_COND_V(!buffer_initialized, PackedVector2Array());
+ ERR_FAIL_INDEX_V(p_frames, buffer.size(), PackedVector2Array());
+ int data_left = buffer.data_left();
+ if (data_left < p_frames || p_frames == 0) {
+ return PackedVector2Array();
+ }
+
+ PackedVector2Array ret;
+ ret.resize(p_frames);
+
+ Vector<AudioFrame> streaming_data;
+ streaming_data.resize(p_frames);
+ buffer.read(streaming_data.ptrw(), p_frames);
+ for (int32_t i = 0; i < p_frames; i++) {
+ ret.write[i] = Vector2(streaming_data[i].l, streaming_data[i].r);
+ }
+ return ret;
+}
+
+void AudioEffectCapture::clear_buffer() {
+ const int32_t data_left = buffer.data_left();
+ buffer.advance_read(data_left);
+}
+
+void AudioEffectCapture::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("can_get_buffer", "frames"), &AudioEffectCapture::can_get_buffer);
+ ClassDB::bind_method(D_METHOD("get_buffer", "frames"), &AudioEffectCapture::get_buffer);
+ ClassDB::bind_method(D_METHOD("clear_buffer"), &AudioEffectCapture::clear_buffer);
+ ClassDB::bind_method(D_METHOD("set_buffer_length", "buffer_length_seconds"), &AudioEffectCapture::set_buffer_length);
+ ClassDB::bind_method(D_METHOD("get_buffer_length"), &AudioEffectCapture::get_buffer_length);
+ ClassDB::bind_method(D_METHOD("get_frames_available"), &AudioEffectCapture::get_frames_available);
+ ClassDB::bind_method(D_METHOD("get_discarded_frames"), &AudioEffectCapture::get_discarded_frames);
+ ClassDB::bind_method(D_METHOD("get_buffer_length_frames"), &AudioEffectCapture::get_buffer_length_frames);
+ ClassDB::bind_method(D_METHOD("get_pushed_frames"), &AudioEffectCapture::get_pushed_frames);
+
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "buffer_length", PROPERTY_HINT_RANGE, "0.01,10,0.01"), "set_buffer_length", "get_buffer_length");
+}
+
+Ref<AudioEffectInstance> AudioEffectCapture::instance() {
+ if (!buffer_initialized) {
+ float target_buffer_size = AudioServer::get_singleton()->get_mix_rate() * buffer_length_seconds;
+ ERR_FAIL_COND_V(target_buffer_size <= 0 || target_buffer_size >= (1 << 27), Ref<AudioEffectInstance>());
+ buffer.resize(nearest_shift((int)target_buffer_size));
+ buffer_initialized = true;
+ }
+
+ clear_buffer();
+
+ Ref<AudioEffectCaptureInstance> ins;
+ ins.instance();
+ ins->base = Ref<AudioEffectCapture>(this);
+
+ return ins;
+}
+
+void AudioEffectCapture::set_buffer_length(float p_buffer_length_seconds) {
+ ERR_FAIL_COND(buffer_initialized);
+
+ buffer_length_seconds = p_buffer_length_seconds;
+}
+
+float AudioEffectCapture::get_buffer_length() {
+ return buffer_length_seconds;
+}
+
+int AudioEffectCapture::get_frames_available() const {
+ ERR_FAIL_COND_V(!buffer_initialized, 0);
+ return buffer.data_left();
+}
+
+int64_t AudioEffectCapture::get_discarded_frames() const {
+ return discarded_frames.get();
+}
+
+int AudioEffectCapture::get_buffer_length_frames() const {
+ ERR_FAIL_COND_V(!buffer_initialized, 0);
+ return buffer.size();
+}
+
+int64_t AudioEffectCapture::get_pushed_frames() const {
+ return pushed_frames.get();
+}
+
+void AudioEffectCaptureInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) {
+ RingBuffer<AudioFrame> &buffer = base->buffer;
+
+ for (int i = 0; i < p_frame_count; i++) {
+ p_dst_frames[i] = p_src_frames[i];
+ }
+
+ if (buffer.space_left() >= p_frame_count) {
+ // Add incoming audio frames to the IO ring buffer
+ int32_t ret = buffer.write(p_src_frames, p_frame_count);
+ ERR_FAIL_COND_MSG(ret != p_frame_count, "Failed to add data to effect capture ring buffer despite sufficient space.");
+ base->pushed_frames.add(p_frame_count);
+ } else {
+ base->discarded_frames.add(p_frame_count);
+ }
+}
+
+bool AudioEffectCaptureInstance::process_silence() const {
+ return true;
+}
diff --git a/editor/editor_sub_scene.h b/servers/audio/effects/audio_effect_capture.h
index 428bd5a40e..81d4ed6b0f 100644
--- a/editor/editor_sub_scene.h
+++ b/servers/audio/effects/audio_effect_capture.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* editor_sub_scene.h */
+/* audio_effect_capture.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,44 +28,55 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef EDITOR_SUB_SCENE_H
-#define EDITOR_SUB_SCENE_H
+#ifndef AUDIO_EFFECT_CAPTURE_H
+#define AUDIO_EFFECT_CAPTURE_H
-#include "editor/editor_file_dialog.h"
-#include "scene/gui/dialogs.h"
-#include "scene/gui/tree.h"
+#include "core/config/engine.h"
+#include "core/math/audio_frame.h"
+#include "core/object/reference.h"
+#include "core/templates/vector.h"
+#include "servers/audio/audio_effect.h"
+#include "servers/audio_server.h"
-class EditorSubScene : public ConfirmationDialog {
- GDCLASS(EditorSubScene, ConfirmationDialog);
+class AudioEffectCapture;
- List<Node *> selection;
- LineEdit *path;
- Tree *tree;
- Node *scene;
- bool is_root;
+class AudioEffectCaptureInstance : public AudioEffectInstance {
+ GDCLASS(AudioEffectCaptureInstance, AudioEffectInstance);
+ friend class AudioEffectCapture;
+ Ref<AudioEffectCapture> base;
- EditorFileDialog *file_dialog;
+public:
+ virtual void process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) override;
+ virtual bool process_silence() const override;
+};
- void _fill_tree(Node *p_node, TreeItem *p_parent);
- void _selected_changed();
- void _item_multi_selected(Object *p_object, int p_cell, bool p_selected);
- void _item_activated();
- void _remove_selection_child(Node *p_node);
- void _reown(Node *p_node, List<Node *> *p_to_reown);
+class AudioEffectCapture : public AudioEffect {
+ GDCLASS(AudioEffectCapture, AudioEffect)
+ friend class AudioEffectCaptureInstance;
- void ok_pressed() override;
+ RingBuffer<AudioFrame> buffer;
+ SafeNumeric<uint64_t> discarded_frames;
+ SafeNumeric<uint64_t> pushed_frames;
+ float buffer_length_seconds = 0.1f;
+ bool buffer_initialized = false;
protected:
- void _notification(int p_what);
static void _bind_methods();
- void _path_browse();
- void _path_selected(const String &p_path);
- void _path_changed(const String &p_path);
public:
- void move(Node *p_new_parent, Node *p_new_owner);
- void clear();
- EditorSubScene();
+ virtual Ref<AudioEffectInstance> instance() override;
+
+ void set_buffer_length(float p_buffer_length_seconds);
+ float get_buffer_length();
+
+ bool can_get_buffer(int p_frames) const;
+ PackedVector2Array get_buffer(int p_len);
+ void clear_buffer();
+
+ int get_frames_available() const;
+ int64_t get_discarded_frames() const;
+ int get_buffer_length_frames() const;
+ int64_t get_pushed_frames() const;
};
-#endif // EDITOR_SUB_SCENE_H
+#endif // AUDIO_EFFECT_CAPTURE_H
diff --git a/servers/audio/effects/audio_effect_chorus.cpp b/servers/audio/effects/audio_effect_chorus.cpp
index 1542273a24..76a995eb37 100644
--- a/servers/audio/effects/audio_effect_chorus.cpp
+++ b/servers/audio/effects/audio_effect_chorus.cpp
@@ -84,7 +84,7 @@ void AudioEffectChorusInstance::_process_chunk(const AudioFrame *p_src_frames, A
if (v.cutoff == 0) {
continue;
}
- float auxlp = expf(-2.0 * Math_PI * v.cutoff / mix_rate);
+ float auxlp = expf(-Math_TAU * v.cutoff / mix_rate);
float c1 = 1.0 - auxlp;
float c2 = auxlp;
AudioFrame h = filter_h[vc];
@@ -104,7 +104,7 @@ void AudioEffectChorusInstance::_process_chunk(const AudioFrame *p_src_frames, A
float phase = (float)(local_cycles & AudioEffectChorus::CYCLES_MASK) / (float)(1 << AudioEffectChorus::CYCLES_FRAC);
- float wave_delay = sinf(phase * 2.0 * Math_PI) * max_depth_frames;
+ float wave_delay = sinf(phase * Math_TAU) * max_depth_frames;
int wave_delay_frames = lrint(floor(wave_delay));
float wave_delay_frac = wave_delay - (float)wave_delay_frames;
diff --git a/servers/audio/effects/audio_effect_delay.cpp b/servers/audio/effects/audio_effect_delay.cpp
index f04ab45ec1..ba50eeb0a3 100644
--- a/servers/audio/effects/audio_effect_delay.cpp
+++ b/servers/audio/effects/audio_effect_delay.cpp
@@ -75,7 +75,7 @@ void AudioEffectDelayInstance::_process_chunk(const AudioFrame *p_src_frames, Au
tap2_vol.r *= CLAMP(1.0 + base->tap_2_pan, 0, 1);
// feedback lowpass here
- float lpf_c = expf(-2.0 * Math_PI * base->feedback_lowpass / mix_rate); // 0 .. 10khz
+ float lpf_c = expf(-Math_TAU * base->feedback_lowpass / mix_rate); // 0 .. 10khz
float lpf_ic = 1.0 - lpf_c;
const AudioFrame *src = p_src_frames;
diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp
index 8f713ace22..b79434e7c2 100644
--- a/servers/audio/effects/audio_effect_distortion.cpp
+++ b/servers/audio/effects/audio_effect_distortion.cpp
@@ -36,8 +36,8 @@ void AudioEffectDistortionInstance::process(const AudioFrame *p_src_frames, Audi
const float *src = (const float *)p_src_frames;
float *dst = (float *)p_dst_frames;
- //float lpf_c=expf(-2.0*Math_PI*keep_hf_hz.get()/(mix_rate*(float)OVERSAMPLE));
- float lpf_c = expf(-2.0 * Math_PI * base->keep_hf_hz / (AudioServer::get_singleton()->get_mix_rate()));
+ //float lpf_c=expf(-Math_TAU*keep_hf_hz.get()/(mix_rate*(float)OVERSAMPLE));
+ float lpf_c = expf(-Math_TAU * base->keep_hf_hz / (AudioServer::get_singleton()->get_mix_rate()));
float lpf_ic = 1.0 - lpf_c;
float drive_f = base->drive;
diff --git a/servers/audio/effects/audio_effect_phaser.cpp b/servers/audio/effects/audio_effect_phaser.cpp
index 5e4e183ccf..9b70f03a19 100644
--- a/servers/audio/effects/audio_effect_phaser.cpp
+++ b/servers/audio/effects/audio_effect_phaser.cpp
@@ -38,13 +38,13 @@ void AudioEffectPhaserInstance::process(const AudioFrame *p_src_frames, AudioFra
float dmin = base->range_min / (sampling_rate / 2.0);
float dmax = base->range_max / (sampling_rate / 2.0);
- float increment = 2.f * Math_PI * (base->rate / sampling_rate);
+ float increment = Math_TAU * (base->rate / sampling_rate);
for (int i = 0; i < p_frame_count; i++) {
phase += increment;
- while (phase >= Math_PI * 2.f) {
- phase -= Math_PI * 2.f;
+ while (phase >= Math_TAU) {
+ phase -= Math_TAU;
}
float d = dmin + (dmax - dmin) * ((sin(phase) + 1.f) / 2.f);
diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp
index e8832c92a3..2015ede81f 100644
--- a/servers/audio/effects/audio_effect_record.cpp
+++ b/servers/audio/effects/audio_effect_record.cpp
@@ -118,7 +118,7 @@ void AudioEffectRecordInstance::init() {
#ifdef NO_THREADS
AudioServer::get_singleton()->add_update_callback(&AudioEffectRecordInstance::_update, this);
#else
- io_thread = Thread::create(_thread_callback, this);
+ io_thread.start(_thread_callback, this);
#endif
}
@@ -126,9 +126,7 @@ void AudioEffectRecordInstance::finish() {
#ifdef NO_THREADS
AudioServer::get_singleton()->remove_update_callback(&AudioEffectRecordInstance::_update, this);
#else
- if (thread_active) {
- Thread::wait_to_finish(io_thread);
- }
+ io_thread.wait_to_finish();
#endif
}
diff --git a/servers/audio/effects/audio_effect_record.h b/servers/audio/effects/audio_effect_record.h
index 14e646e29d..b97ec43946 100644
--- a/servers/audio/effects/audio_effect_record.h
+++ b/servers/audio/effects/audio_effect_record.h
@@ -48,7 +48,7 @@ class AudioEffectRecordInstance : public AudioEffectInstance {
Ref<AudioEffectRecord> base;
bool is_recording;
- Thread *io_thread;
+ Thread io_thread;
bool thread_active = false;
Vector<AudioFrame> ring_buffer;
diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
index 7f73f2e880..3f7ab74a74 100644
--- a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
+++ b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp
@@ -110,10 +110,11 @@ void AudioEffectSpectrumAnalyzerInstance::process(const AudioFrame *p_src_frames
while (p_frame_count) {
int to_fill = fft_size * 2 - temporal_fft_pos;
to_fill = MIN(to_fill, p_frame_count);
+ const double to_fill_step = Math_TAU / (double)fft_size;
float *fftw = temporal_fft.ptrw();
for (int i = 0; i < to_fill; i++) { //left and right buffers
- float window = -0.5 * Math::cos(2.0 * Math_PI * (double)temporal_fft_pos / (double)fft_size) + 0.5;
+ float window = -0.5 * Math::cos(to_fill_step * (double)temporal_fft_pos) + 0.5;
fftw[temporal_fft_pos * 2] = window * p_src_frames->l;
fftw[temporal_fft_pos * 2 + 1] = 0;
fftw[(temporal_fft_pos + fft_size * 2) * 2] = window * p_src_frames->r;
diff --git a/servers/audio/effects/eq.cpp b/servers/audio/effects/eq.cpp
index 2181411b9e..e0c3eb6d3a 100644
--- a/servers/audio/effects/eq.cpp
+++ b/servers/audio/effects/eq.cpp
@@ -89,8 +89,8 @@ void EQ::recalculate_band_coefficients() {
double frq_l = round(frq / pow(2.0, octave_size / 2.0));
double side_gain2 = POW2(Math_SQRT12);
- double th = 2.0 * Math_PI * frq / mix_rate;
- double th_l = 2.0 * Math_PI * frq_l / mix_rate;
+ double th = Math_TAU * frq / mix_rate;
+ double th_l = Math_TAU * frq_l / mix_rate;
double c2a = side_gain2 * POW2(cos(th)) - 2.0 * side_gain2 * cos(th_l) * cos(th) + side_gain2 - POW2(sin(th_l));
diff --git a/servers/audio/effects/reverb.cpp b/servers/audio/effects/reverb.cpp
index eb96e21659..7df2f99f67 100644
--- a/servers/audio/effects/reverb.cpp
+++ b/servers/audio/effects/reverb.cpp
@@ -91,7 +91,7 @@ void Reverb::process(float *p_src, float *p_dst, int p_frames) {
}
if (params.hpf > 0) {
- float hpaux = expf(-2.0 * Math_PI * params.hpf * 6000 / params.mix_rate);
+ float hpaux = expf(-Math_TAU * params.hpf * 6000 / params.mix_rate);
float hp_a1 = (1.0 + hpaux) / 2.0;
float hp_a2 = -(1.0 + hpaux) / 2.0;
float hp_b1 = hpaux;
@@ -293,7 +293,7 @@ void Reverb::update_parameters() {
float auxdmp = params.damp / 2.0 + 0.5; //only half the range (0.5 .. 1.0 is enough)
auxdmp *= auxdmp;
- c.damp = expf(-2.0 * Math_PI * auxdmp * 10000 / params.mix_rate); // 0 .. 10khz
+ c.damp = expf(-Math_TAU * auxdmp * 10000 / params.mix_rate); // 0 .. 10khz
}
}
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index d4f7876b4b..138cb6e1f8 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -188,10 +188,10 @@ int AudioDriverManager::get_driver_count() {
}
void AudioDriverManager::initialize(int p_driver) {
- GLOBAL_DEF_RST("audio/enable_audio_input", false);
- GLOBAL_DEF_RST("audio/mix_rate", DEFAULT_MIX_RATE);
- GLOBAL_DEF_RST("audio/output_latency", DEFAULT_OUTPUT_LATENCY);
- GLOBAL_DEF_RST("audio/output_latency.web", 50); // Safer default output_latency for web.
+ GLOBAL_DEF_RST("audio/driver/enable_input", false);
+ GLOBAL_DEF_RST("audio/driver/mix_rate", DEFAULT_MIX_RATE);
+ GLOBAL_DEF_RST("audio/driver/output_latency", DEFAULT_OUTPUT_LATENCY);
+ GLOBAL_DEF_RST("audio/driver/output_latency.web", 50); // Safer default output_latency for web.
int failed_driver = -1;
@@ -401,6 +401,7 @@ void AudioServer::_mix_step() {
for (int k = 0; k < bus->channels.size(); k++) {
if (!bus->channels[k].active) {
+ bus->channels.write[k].peak_volume = AudioFrame(AUDIO_MIN_PEAK_DB, AUDIO_MIN_PEAK_DB);
continue;
}
@@ -434,7 +435,7 @@ void AudioServer::_mix_step() {
}
}
- bus->channels.write[k].peak_volume = AudioFrame(Math::linear2db(peak.l + 0.0000000001), Math::linear2db(peak.r + 0.0000000001));
+ bus->channels.write[k].peak_volume = AudioFrame(Math::linear2db(peak.l + AUDIO_PEAK_OFFSET), Math::linear2db(peak.r + AUDIO_PEAK_OFFSET));
if (!bus->channels[k].used) {
//see if any audio is contained, because channel was not used
@@ -938,9 +939,9 @@ void AudioServer::init_channels_and_buffers() {
}
void AudioServer::init() {
- channel_disable_threshold_db = GLOBAL_DEF_RST("audio/channel_disable_threshold_db", -60.0);
- channel_disable_frames = float(GLOBAL_DEF_RST("audio/channel_disable_time", 2.0)) * get_mix_rate();
- ProjectSettings::get_singleton()->set_custom_property_info("audio/channel_disable_time", PropertyInfo(Variant::FLOAT, "audio/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
+ channel_disable_threshold_db = GLOBAL_DEF_RST("audio/buses/channel_disable_threshold_db", -60.0);
+ channel_disable_frames = float(GLOBAL_DEF_RST("audio/buses/channel_disable_time", 2.0)) * get_mix_rate();
+ ProjectSettings::get_singleton()->set_custom_property_info("audio/buses/channel_disable_time", PropertyInfo(Variant::FLOAT, "audio/buses/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
buffer_size = 1024; //hardcoded for now
init_channels_and_buffers();
@@ -957,7 +958,7 @@ void AudioServer::init() {
set_edited(false); //avoid editors from thinking this was edited
#endif
- GLOBAL_DEF_RST("audio/video_delay_compensation_ms", 0);
+ GLOBAL_DEF_RST("audio/video/video_delay_compensation_ms", 0);
}
void AudioServer::update() {
@@ -1034,7 +1035,7 @@ void AudioServer::update() {
}
void AudioServer::load_default_bus_layout() {
- String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout");
+ String layout_path = ProjectSettings::get_singleton()->get("audio/buses/default_bus_layout");
if (ResourceLoader::exists(layout_path)) {
Ref<AudioBusLayout> default_layout = ResourceLoader::load(layout_path);
diff --git a/servers/audio_server.h b/servers/audio_server.h
index 51fbc59851..a1a373e1ca 100644
--- a/servers/audio_server.h
+++ b/servers/audio_server.h
@@ -199,7 +199,7 @@ private:
last_mix_with_audio = 0;
used = false;
active = false;
- peak_volume = AudioFrame(0, 0);
+ peak_volume = AudioFrame(AUDIO_MIN_PEAK_DB, AUDIO_MIN_PEAK_DB);
}
};
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index 29c1c9fc60..833bae7447 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -504,6 +504,11 @@ void DisplayServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_native_icon", "filename"), &DisplayServer::set_native_icon);
ClassDB::bind_method(D_METHOD("set_icon", "image"), &DisplayServer::set_icon);
+ ClassDB::bind_method(D_METHOD("tablet_get_driver_count"), &DisplayServer::tablet_get_driver_count);
+ ClassDB::bind_method(D_METHOD("tablet_get_driver_name", "idx"), &DisplayServer::tablet_get_driver_name);
+ ClassDB::bind_method(D_METHOD("tablet_get_current_driver"), &DisplayServer::tablet_get_current_driver);
+ ClassDB::bind_method(D_METHOD("tablet_set_current_driver", "name"), &DisplayServer::tablet_set_current_driver);
+
BIND_ENUM_CONSTANT(FEATURE_GLOBAL_MENU);
BIND_ENUM_CONSTANT(FEATURE_SUBWINDOWS);
BIND_ENUM_CONSTANT(FEATURE_TOUCHSCREEN);
diff --git a/servers/display_server.h b/servers/display_server.h
index fc34a2a228..3aab572120 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -83,7 +83,7 @@ protected:
static DisplayServerCreate server_create_functions[MAX_SERVERS];
static int server_create_count;
- friend class RenderingServerDefault;
+ friend class RendererViewport;
virtual void _set_use_vsync(bool p_enable);
public:
@@ -340,6 +340,11 @@ public:
virtual String keyboard_get_layout_language(int p_index) const;
virtual String keyboard_get_layout_name(int p_index) const;
+ virtual int tablet_get_driver_count() const { return 1; };
+ virtual String tablet_get_driver_name(int p_driver) const { return "default"; };
+ virtual String tablet_get_current_driver() const { return "default"; };
+ virtual void tablet_set_current_driver(const String &p_driver){};
+
virtual void process_events() = 0;
virtual void force_process_and_drop_events();
diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h
index 2939b4b99f..2db3961f41 100644
--- a/servers/physics_2d/collision_object_2d_sw.h
+++ b/servers/physics_2d/collision_object_2d_sw.h
@@ -61,7 +61,7 @@ private:
Variant metadata;
bool disabled;
bool one_way_collision;
- float one_way_collision_margin;
+ real_t one_way_collision_margin;
Shape() {
disabled = false;
one_way_collision = false;
@@ -153,7 +153,7 @@ public:
return shapes[p_idx].disabled;
}
- _FORCE_INLINE_ void set_shape_as_one_way_collision(int p_idx, bool p_one_way_collision, float p_margin) {
+ _FORCE_INLINE_ void set_shape_as_one_way_collision(int p_idx, bool p_one_way_collision, real_t p_margin) {
CRASH_BAD_INDEX(p_idx, shapes.size());
shapes.write[p_idx].one_way_collision = p_one_way_collision;
shapes.write[p_idx].one_way_collision_margin = p_margin;
@@ -163,7 +163,7 @@ public:
return shapes[p_idx].one_way_collision;
}
- _FORCE_INLINE_ float get_shape_one_way_collision_margin(int p_idx) const {
+ _FORCE_INLINE_ real_t get_shape_one_way_collision_margin(int p_idx) const {
CRASH_BAD_INDEX(p_idx, shapes.size());
return shapes[p_idx].one_way_collision_margin;
}
diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp
index 3558848dac..f503868ba5 100644
--- a/servers/physics_2d/joints_2d_sw.cpp
+++ b/servers/physics_2d/joints_2d_sw.cpp
@@ -55,6 +55,14 @@
* SOFTWARE.
*/
+void Joint2DSW::copy_settings_from(Joint2DSW *p_joint) {
+ set_self(p_joint->get_self());
+ set_max_force(p_joint->get_max_force());
+ set_bias(p_joint->get_bias());
+ set_max_bias(p_joint->get_max_bias());
+ disable_collisions_between_bodies(p_joint->is_disabled_collisions_between_bodies());
+}
+
static inline real_t k_scalar(Body2DSW *a, Body2DSW *b, const Vector2 &rA, const Vector2 &rB, const Vector2 &n) {
real_t value = 0;
diff --git a/servers/physics_2d/joints_2d_sw.h b/servers/physics_2d/joints_2d_sw.h
index 53e436b539..6050dc2775 100644
--- a/servers/physics_2d/joints_2d_sw.h
+++ b/servers/physics_2d/joints_2d_sw.h
@@ -49,7 +49,12 @@ public:
_FORCE_INLINE_ void set_max_bias(real_t p_bias) { max_bias = p_bias; }
_FORCE_INLINE_ real_t get_max_bias() const { return max_bias; }
- virtual PhysicsServer2D::JointType get_type() const = 0;
+ virtual bool setup(real_t p_step) { return false; }
+ virtual void solve(real_t p_step) {}
+
+ void copy_settings_from(Joint2DSW *p_joint);
+
+ virtual PhysicsServer2D::JointType get_type() const { return PhysicsServer2D::JOINT_TYPE_MAX; }
Joint2DSW(Body2DSW **p_body_ptr = nullptr, int p_body_count = 0) :
Constraint2DSW(p_body_ptr, p_body_count) {
bias = 0;
@@ -76,7 +81,7 @@ class PinJoint2DSW : public Joint2DSW {
real_t softness;
public:
- virtual PhysicsServer2D::JointType get_type() const { return PhysicsServer2D::JOINT_PIN; }
+ virtual PhysicsServer2D::JointType get_type() const { return PhysicsServer2D::JOINT_TYPE_PIN; }
virtual bool setup(real_t p_step);
virtual void solve(real_t p_step);
@@ -113,7 +118,7 @@ class GrooveJoint2DSW : public Joint2DSW {
bool correct;
public:
- virtual PhysicsServer2D::JointType get_type() const { return PhysicsServer2D::JOINT_GROOVE; }
+ virtual PhysicsServer2D::JointType get_type() const { return PhysicsServer2D::JOINT_TYPE_GROOVE; }
virtual bool setup(real_t p_step);
virtual void solve(real_t p_step);
@@ -146,7 +151,7 @@ class DampedSpringJoint2DSW : public Joint2DSW {
real_t v_coef;
public:
- virtual PhysicsServer2D::JointType get_type() const { return PhysicsServer2D::JOINT_DAMPED_SPRING; }
+ virtual PhysicsServer2D::JointType get_type() const { return PhysicsServer2D::JOINT_TYPE_DAMPED_SPRING; }
virtual bool setup(real_t p_step);
virtual void solve(real_t p_step);
diff --git a/servers/physics_2d/physics_server_2d_sw.cpp b/servers/physics_2d/physics_server_2d_sw.cpp
index c4e2489bef..1040437ca7 100644
--- a/servers/physics_2d/physics_server_2d_sw.cpp
+++ b/servers/physics_2d/physics_server_2d_sw.cpp
@@ -667,7 +667,7 @@ void PhysicsServer2DSW::body_set_shape_disabled(RID p_body, int p_shape_idx, boo
body->set_shape_as_disabled(p_shape_idx, p_disabled);
}
-void PhysicsServer2DSW::body_set_shape_as_one_way_collision(RID p_body, int p_shape_idx, bool p_enable, float p_margin) {
+void PhysicsServer2DSW::body_set_shape_as_one_way_collision(RID p_body, int p_shape_idx, bool p_enable, real_t p_margin) {
Body2DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND(!body);
ERR_FAIL_INDEX(p_shape_idx, body->get_shape_count());
@@ -958,7 +958,7 @@ bool PhysicsServer2DSW::body_test_motion(RID p_body, const Transform2D &p_from,
return body->get_space()->test_body_motion(body, p_from, p_motion, p_infinite_inertia, p_margin, r_result, p_exclude_raycast_shapes);
}
-int PhysicsServer2DSW::body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin) {
+int PhysicsServer2DSW::body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin) {
Body2DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND_V(!body, false);
ERR_FAIL_COND_V(!body->get_space(), false);
@@ -985,6 +985,24 @@ PhysicsDirectBodyState2D *PhysicsServer2DSW::body_get_direct_state(RID p_body) {
/* JOINT API */
+RID PhysicsServer2DSW::joint_create() {
+ Joint2DSW *joint = memnew(Joint2DSW);
+ RID joint_rid = joint_owner.make_rid(joint);
+ joint->set_self(joint_rid);
+ return joint_rid;
+}
+
+void PhysicsServer2DSW::joint_clear(RID p_joint) {
+ Joint2DSW *joint = joint_owner.getornull(p_joint);
+ if (joint->get_type() != JOINT_TYPE_MAX) {
+ Joint2DSW *empty_joint = memnew(Joint2DSW);
+ empty_joint->copy_settings_from(joint);
+
+ joint_owner.replace(p_joint, empty_joint);
+ memdelete(joint);
+ }
+}
+
void PhysicsServer2DSW::joint_set_param(RID p_joint, JointParam p_param, real_t p_value) {
Joint2DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
@@ -1048,52 +1066,63 @@ bool PhysicsServer2DSW::joint_is_disabled_collisions_between_bodies(RID p_joint)
return joint->is_disabled_collisions_between_bodies();
}
-RID PhysicsServer2DSW::pin_joint_create(const Vector2 &p_pos, RID p_body_a, RID p_body_b) {
+void PhysicsServer2DSW::joint_make_pin(RID p_joint, const Vector2 &p_pos, RID p_body_a, RID p_body_b) {
Body2DSW *A = body_owner.getornull(p_body_a);
- ERR_FAIL_COND_V(!A, RID());
+ ERR_FAIL_COND(!A);
Body2DSW *B = nullptr;
if (body_owner.owns(p_body_b)) {
B = body_owner.getornull(p_body_b);
- ERR_FAIL_COND_V(!B, RID());
+ ERR_FAIL_COND(!B);
}
+ Joint2DSW *prev_joint = joint_owner.getornull(p_joint);
+ ERR_FAIL_COND(prev_joint == nullptr);
+
Joint2DSW *joint = memnew(PinJoint2DSW(p_pos, A, B));
- RID self = joint_owner.make_rid(joint);
- joint->set_self(self);
- return self;
+ joint_owner.replace(p_joint, joint);
+ joint->copy_settings_from(prev_joint);
+ memdelete(prev_joint);
}
-RID PhysicsServer2DSW::groove_joint_create(const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, RID p_body_a, RID p_body_b) {
+void PhysicsServer2DSW::joint_make_groove(RID p_joint, const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, RID p_body_a, RID p_body_b) {
Body2DSW *A = body_owner.getornull(p_body_a);
- ERR_FAIL_COND_V(!A, RID());
+ ERR_FAIL_COND(!A);
Body2DSW *B = body_owner.getornull(p_body_b);
- ERR_FAIL_COND_V(!B, RID());
+ ERR_FAIL_COND(!B);
+
+ Joint2DSW *prev_joint = joint_owner.getornull(p_joint);
+ ERR_FAIL_COND(prev_joint == nullptr);
Joint2DSW *joint = memnew(GrooveJoint2DSW(p_a_groove1, p_a_groove2, p_b_anchor, A, B));
- RID self = joint_owner.make_rid(joint);
- joint->set_self(self);
- return self;
+
+ joint_owner.replace(p_joint, joint);
+ joint->copy_settings_from(prev_joint);
+ memdelete(prev_joint);
}
-RID PhysicsServer2DSW::damped_spring_joint_create(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, RID p_body_a, RID p_body_b) {
+void PhysicsServer2DSW::joint_make_damped_spring(RID p_joint, const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, RID p_body_a, RID p_body_b) {
Body2DSW *A = body_owner.getornull(p_body_a);
- ERR_FAIL_COND_V(!A, RID());
+ ERR_FAIL_COND(!A);
Body2DSW *B = body_owner.getornull(p_body_b);
- ERR_FAIL_COND_V(!B, RID());
+ ERR_FAIL_COND(!B);
+
+ Joint2DSW *prev_joint = joint_owner.getornull(p_joint);
+ ERR_FAIL_COND(prev_joint == nullptr);
Joint2DSW *joint = memnew(DampedSpringJoint2DSW(p_anchor_a, p_anchor_b, A, B));
- RID self = joint_owner.make_rid(joint);
- joint->set_self(self);
- return self;
+
+ joint_owner.replace(p_joint, joint);
+ joint->copy_settings_from(prev_joint);
+ memdelete(prev_joint);
}
void PhysicsServer2DSW::pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) {
Joint2DSW *j = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!j);
- ERR_FAIL_COND(j->get_type() != JOINT_PIN);
+ ERR_FAIL_COND(j->get_type() != JOINT_TYPE_PIN);
PinJoint2DSW *pin_joint = static_cast<PinJoint2DSW *>(j);
pin_joint->set_param(p_param, p_value);
@@ -1102,7 +1131,7 @@ void PhysicsServer2DSW::pin_joint_set_param(RID p_joint, PinJointParam p_param,
real_t PhysicsServer2DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param) const {
Joint2DSW *j = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!j, 0);
- ERR_FAIL_COND_V(j->get_type() != JOINT_PIN, 0);
+ ERR_FAIL_COND_V(j->get_type() != JOINT_TYPE_PIN, 0);
PinJoint2DSW *pin_joint = static_cast<PinJoint2DSW *>(j);
return pin_joint->get_param(p_param);
@@ -1111,7 +1140,7 @@ real_t PhysicsServer2DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param
void PhysicsServer2DSW::damped_spring_joint_set_param(RID p_joint, DampedSpringParam p_param, real_t p_value) {
Joint2DSW *j = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!j);
- ERR_FAIL_COND(j->get_type() != JOINT_DAMPED_SPRING);
+ ERR_FAIL_COND(j->get_type() != JOINT_TYPE_DAMPED_SPRING);
DampedSpringJoint2DSW *dsj = static_cast<DampedSpringJoint2DSW *>(j);
dsj->set_param(p_param, p_value);
@@ -1120,7 +1149,7 @@ void PhysicsServer2DSW::damped_spring_joint_set_param(RID p_joint, DampedSpringP
real_t PhysicsServer2DSW::damped_spring_joint_get_param(RID p_joint, DampedSpringParam p_param) const {
Joint2DSW *j = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!j, 0);
- ERR_FAIL_COND_V(j->get_type() != JOINT_DAMPED_SPRING, 0);
+ ERR_FAIL_COND_V(j->get_type() != JOINT_TYPE_DAMPED_SPRING, 0);
DampedSpringJoint2DSW *dsj = static_cast<DampedSpringJoint2DSW *>(j);
return dsj->get_param(p_param);
@@ -1128,7 +1157,7 @@ real_t PhysicsServer2DSW::damped_spring_joint_get_param(RID p_joint, DampedSprin
PhysicsServer2D::JointType PhysicsServer2DSW::joint_get_type(RID p_joint) const {
Joint2DSW *joint = joint_owner.getornull(p_joint);
- ERR_FAIL_COND_V(!joint, JOINT_PIN);
+ ERR_FAIL_COND_V(!joint, JOINT_TYPE_PIN);
return joint->get_type();
}
@@ -1325,7 +1354,7 @@ int PhysicsServer2DSW::get_process_info(ProcessInfo p_info) {
PhysicsServer2DSW *PhysicsServer2DSW::singletonsw = nullptr;
-PhysicsServer2DSW::PhysicsServer2DSW() {
+PhysicsServer2DSW::PhysicsServer2DSW(bool p_using_threads) {
singletonsw = this;
BroadPhase2DSW::create_func = BroadPhase2DHashGrid::_create;
//BroadPhase2DSW::create_func=BroadPhase2DBasic::_create;
@@ -1334,10 +1363,6 @@ PhysicsServer2DSW::PhysicsServer2DSW() {
island_count = 0;
active_objects = 0;
collision_pairs = 0;
-#ifdef NO_THREADS
- using_threads = false;
-#else
- using_threads = int(ProjectSettings::get_singleton()->get("physics/2d/thread_model")) == 2;
-#endif
+ using_threads = p_using_threads;
flushing_queries = false;
};
diff --git a/servers/physics_2d/physics_server_2d_sw.h b/servers/physics_2d/physics_server_2d_sw.h
index 3305c0bd3d..65c5df0fce 100644
--- a/servers/physics_2d/physics_server_2d_sw.h
+++ b/servers/physics_2d/physics_server_2d_sw.h
@@ -61,11 +61,11 @@ class PhysicsServer2DSW : public PhysicsServer2D {
PhysicsDirectBodyState2DSW *direct_state;
- mutable RID_PtrOwner<Shape2DSW> shape_owner;
- mutable RID_PtrOwner<Space2DSW> space_owner;
- mutable RID_PtrOwner<Area2DSW> area_owner;
- mutable RID_PtrOwner<Body2DSW> body_owner;
- mutable RID_PtrOwner<Joint2DSW> joint_owner;
+ mutable RID_PtrOwner<Shape2DSW, true> shape_owner;
+ mutable RID_PtrOwner<Space2DSW, true> space_owner;
+ mutable RID_PtrOwner<Area2DSW, true> area_owner;
+ mutable RID_PtrOwner<Body2DSW, true> body_owner;
+ mutable RID_PtrOwner<Joint2DSW, true> joint_owner;
static PhysicsServer2DSW *singletonsw;
@@ -191,7 +191,7 @@ public:
virtual void body_clear_shapes(RID p_body) override;
virtual void body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled) override;
- virtual void body_set_shape_as_one_way_collision(RID p_body, int p_shape_idx, bool p_enable, float p_margin) override;
+ virtual void body_set_shape_as_one_way_collision(RID p_body, int p_shape_idx, bool p_enable, real_t p_margin) override;
virtual void body_attach_object_instance_id(RID p_body, ObjectID p_id) override;
virtual ObjectID body_get_object_instance_id(RID p_body) const override;
@@ -248,22 +248,27 @@ public:
virtual void body_set_pickable(RID p_body, bool p_pickable) override;
virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin = 0.001, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) override;
- virtual int body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin = 0.001) override;
+ virtual int body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin = 0.001) override;
// this function only works on physics process, errors and returns null otherwise
virtual PhysicsDirectBodyState2D *body_get_direct_state(RID p_body) override;
/* JOINT API */
+ virtual RID joint_create() override;
+
+ virtual void joint_clear(RID p_joint) override;
+
virtual void joint_set_param(RID p_joint, JointParam p_param, real_t p_value) override;
virtual real_t joint_get_param(RID p_joint, JointParam p_param) const override;
virtual void joint_disable_collisions_between_bodies(RID p_joint, const bool p_disabled) override;
virtual bool joint_is_disabled_collisions_between_bodies(RID p_joint) const override;
- virtual RID pin_joint_create(const Vector2 &p_pos, RID p_body_a, RID p_body_b = RID()) override;
- virtual RID groove_joint_create(const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, RID p_body_a, RID p_body_b) override;
- virtual RID damped_spring_joint_create(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, RID p_body_a, RID p_body_b = RID()) override;
+ virtual void joint_make_pin(RID p_joint, const Vector2 &p_anchor, RID p_body_a, RID p_body_b = RID()) override;
+ virtual void joint_make_groove(RID p_joint, const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, RID p_body_a, RID p_body_b) override;
+ virtual void joint_make_damped_spring(RID p_joint, const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, RID p_body_a, RID p_body_b = RID()) override;
+
virtual void pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) override;
virtual real_t pin_joint_get_param(RID p_joint, PinJointParam p_param) const override;
virtual void damped_spring_joint_set_param(RID p_joint, DampedSpringParam p_param, real_t p_value) override;
@@ -287,7 +292,7 @@ public:
int get_process_info(ProcessInfo p_info) override;
- PhysicsServer2DSW();
+ PhysicsServer2DSW(bool p_using_threads = false);
~PhysicsServer2DSW() {}
};
diff --git a/servers/physics_2d/physics_server_2d_wrap_mt.cpp b/servers/physics_2d/physics_server_2d_wrap_mt.cpp
index 15d875b3b7..790c87cc44 100644
--- a/servers/physics_2d/physics_server_2d_wrap_mt.cpp
+++ b/servers/physics_2d/physics_server_2d_wrap_mt.cpp
@@ -33,7 +33,7 @@
#include "core/os/os.h"
void PhysicsServer2DWrapMT::thread_exit() {
- exit = true;
+ exit.set();
}
void PhysicsServer2DWrapMT::thread_step(real_t p_delta) {
@@ -52,9 +52,9 @@ void PhysicsServer2DWrapMT::thread_loop() {
physics_2d_server->init();
- exit = false;
- step_thread_up = true;
- while (!exit) {
+ exit.clear();
+ step_thread_up.set();
+ while (!exit.is_set()) {
// flush commands one by one, until exit is requested
command_queue.wait_and_flush_one();
}
@@ -76,7 +76,7 @@ void PhysicsServer2DWrapMT::step(real_t p_step) {
}
void PhysicsServer2DWrapMT::sync() {
- if (thread) {
+ if (create_thread) {
if (first_frame) {
first_frame = false;
} else {
@@ -97,8 +97,8 @@ void PhysicsServer2DWrapMT::end_sync() {
void PhysicsServer2DWrapMT::init() {
if (create_thread) {
//OS::get_singleton()->release_rendering_thread();
- thread = Thread::create(_thread_callback, this);
- while (!step_thread_up) {
+ thread.start(_thread_callback, this);
+ while (!step_thread_up.is_set()) {
OS::get_singleton()->delay_usec(1000);
}
} else {
@@ -107,37 +107,19 @@ void PhysicsServer2DWrapMT::init() {
}
void PhysicsServer2DWrapMT::finish() {
- if (thread) {
+ if (thread.is_started()) {
command_queue.push(this, &PhysicsServer2DWrapMT::thread_exit);
- Thread::wait_to_finish(thread);
- memdelete(thread);
-
- thread = nullptr;
+ thread.wait_to_finish();
} else {
physics_2d_server->finish();
}
-
- line_shape_free_cached_ids();
- ray_shape_free_cached_ids();
- segment_shape_free_cached_ids();
- circle_shape_free_cached_ids();
- rectangle_shape_free_cached_ids();
- capsule_shape_free_cached_ids();
- convex_polygon_shape_free_cached_ids();
- concave_polygon_shape_free_cached_ids();
-
- space_free_cached_ids();
- area_free_cached_ids();
- body_free_cached_ids();
}
PhysicsServer2DWrapMT::PhysicsServer2DWrapMT(PhysicsServer2D *p_contained, bool p_create_thread) :
command_queue(p_create_thread) {
physics_2d_server = p_contained;
create_thread = p_create_thread;
- thread = nullptr;
step_pending = 0;
- step_thread_up = false;
pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
diff --git a/servers/physics_2d/physics_server_2d_wrap_mt.h b/servers/physics_2d/physics_server_2d_wrap_mt.h
index 9207081a51..3577f706de 100644
--- a/servers/physics_2d/physics_server_2d_wrap_mt.h
+++ b/servers/physics_2d/physics_server_2d_wrap_mt.h
@@ -34,6 +34,7 @@
#include "core/config/project_settings.h"
#include "core/os/thread.h"
#include "core/templates/command_queue_mt.h"
+#include "core/templates/safe_refcount.h"
#include "servers/physics_server_2d.h"
#ifdef DEBUG_SYNC
@@ -52,9 +53,9 @@ class PhysicsServer2DWrapMT : public PhysicsServer2D {
Thread::ID server_thread;
Thread::ID main_thread;
- volatile bool exit;
- Thread *thread;
- volatile bool step_thread_up;
+ SafeFlag exit;
+ Thread thread;
+ SafeFlag step_thread_up;
bool create_thread;
Semaphore step_sem;
@@ -73,6 +74,8 @@ public:
#define ServerName PhysicsServer2D
#define ServerNameWrapMT PhysicsServer2DWrapMT
#define server_name physics_2d_server
+#define WRITE_ACTION
+
#include "servers/server_wrap_mt_common.h"
//FUNC1RID(shape,ShapeType); todo fix
@@ -93,7 +96,7 @@ public:
FUNC1RC(real_t, shape_get_custom_solver_bias, RID);
//these work well, but should be used from the main thread only
- bool shape_collide(RID p_shape_A, const Transform2D &p_xform_A, const Vector2 &p_motion_A, RID p_shape_B, const Transform2D &p_xform_B, const Vector2 &p_motion_B, Vector2 *r_results, int p_result_max, int &r_result_count) {
+ bool shape_collide(RID p_shape_A, const Transform2D &p_xform_A, const Vector2 &p_motion_A, RID p_shape_B, const Transform2D &p_xform_B, const Vector2 &p_motion_B, Vector2 *r_results, int p_result_max, int &r_result_count) override {
ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), false);
return physics_2d_server->shape_collide(p_shape_A, p_xform_A, p_motion_A, p_shape_B, p_xform_B, p_motion_B, r_results, p_result_max, r_result_count);
}
@@ -108,18 +111,18 @@ public:
FUNC2RC(real_t, space_get_param, RID, SpaceParameter);
// this function only works on physics process, errors and returns null otherwise
- PhysicsDirectSpaceState2D *space_get_direct_state(RID p_space) {
+ PhysicsDirectSpaceState2D *space_get_direct_state(RID p_space) override {
ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), nullptr);
return physics_2d_server->space_get_direct_state(p_space);
}
FUNC2(space_set_debug_contacts, RID, int);
- virtual Vector<Vector2> space_get_contacts(RID p_space) const {
+ virtual Vector<Vector2> space_get_contacts(RID p_space) const override {
ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), Vector<Vector2>());
return physics_2d_server->space_get_contacts(p_space);
}
- virtual int space_get_contact_count(RID p_space) const {
+ virtual int space_get_contact_count(RID p_space) const override {
ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), 0);
return physics_2d_server->space_get_contact_count(p_space);
}
@@ -189,7 +192,7 @@ public:
FUNC2RC(RID, body_get_shape, RID, int);
FUNC3(body_set_shape_disabled, RID, int, bool);
- FUNC4(body_set_shape_as_one_way_collision, RID, int, bool, float);
+ FUNC4(body_set_shape_as_one_way_collision, RID, int, bool, real_t);
FUNC2(body_remove_shape, RID, int);
FUNC1(body_clear_shapes, RID);
@@ -244,30 +247,34 @@ public:
FUNC4(body_set_force_integration_callback, RID, Object *, const StringName &, const Variant &);
- bool body_collide_shape(RID p_body, int p_body_shape, RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, Vector2 *r_results, int p_result_max, int &r_result_count) {
+ bool body_collide_shape(RID p_body, int p_body_shape, RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, Vector2 *r_results, int p_result_max, int &r_result_count) override {
return physics_2d_server->body_collide_shape(p_body, p_body_shape, p_shape, p_shape_xform, p_motion, r_results, p_result_max, r_result_count);
}
FUNC2(body_set_pickable, RID, bool);
- bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin = 0.001, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) {
+ bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin = 0.001, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) override {
ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), false);
return physics_2d_server->body_test_motion(p_body, p_from, p_motion, p_infinite_inertia, p_margin, r_result, p_exclude_raycast_shapes);
}
- int body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin = 0.001) {
+ int body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin = 0.001) override {
ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), false);
return physics_2d_server->body_test_ray_separation(p_body, p_transform, p_infinite_inertia, r_recover_motion, r_results, p_result_max, p_margin);
}
// this function only works on physics process, errors and returns null otherwise
- PhysicsDirectBodyState2D *body_get_direct_state(RID p_body) {
+ PhysicsDirectBodyState2D *body_get_direct_state(RID p_body) override {
ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), nullptr);
return physics_2d_server->body_get_direct_state(p_body);
}
/* JOINT API */
+ FUNCRID(joint)
+
+ FUNC1(joint_clear, RID)
+
FUNC3(joint_set_param, RID, JointParam, real_t);
FUNC2RC(real_t, joint_get_param, RID, JointParam);
@@ -280,9 +287,9 @@ public:
//TODO need to convert this to FUNCRID, but it's a hassle..
- FUNC3R(RID, pin_joint_create, const Vector2 &, RID, RID);
- FUNC5R(RID, groove_joint_create, const Vector2 &, const Vector2 &, const Vector2 &, RID, RID);
- FUNC4R(RID, damped_spring_joint_create, const Vector2 &, const Vector2 &, RID, RID);
+ FUNC4(joint_make_pin, RID, const Vector2 &, RID, RID);
+ FUNC6(joint_make_groove, RID, const Vector2 &, const Vector2 &, const Vector2 &, RID, RID);
+ FUNC5(joint_make_damped_spring, RID, const Vector2 &, const Vector2 &, RID, RID);
FUNC3(pin_joint_set_param, RID, PinJointParam, real_t);
FUNC2RC(real_t, pin_joint_get_param, RID, PinJointParam);
@@ -297,43 +304,28 @@ public:
FUNC1(free, RID);
FUNC1(set_active, bool);
- virtual void init();
- virtual void step(real_t p_step);
- virtual void sync();
- virtual void end_sync();
- virtual void flush_queries();
- virtual void finish();
+ virtual void init() override;
+ virtual void step(real_t p_step) override;
+ virtual void sync() override;
+ virtual void end_sync() override;
+ virtual void flush_queries() override;
+ virtual void finish() override;
- virtual bool is_flushing_queries() const {
+ virtual bool is_flushing_queries() const override {
return physics_2d_server->is_flushing_queries();
}
- int get_process_info(ProcessInfo p_info) {
+ int get_process_info(ProcessInfo p_info) override {
return physics_2d_server->get_process_info(p_info);
}
PhysicsServer2DWrapMT(PhysicsServer2D *p_contained, bool p_create_thread);
~PhysicsServer2DWrapMT();
- template <class T>
- static PhysicsServer2D *init_server() {
-#ifdef NO_THREADS
- return memnew(T); // Always single unsafe when no threads are available.
-#else
- int tm = GLOBAL_DEF("physics/2d/thread_model", 1);
- if (tm == 0) { // single unsafe
- return memnew(T);
- } else if (tm == 1) { // single safe
- return memnew(PhysicsServer2DWrapMT(memnew(T), false));
- } else { // multi threaded
- return memnew(PhysicsServer2DWrapMT(memnew(T), true));
- }
-#endif
- }
-
#undef ServerNameWrapMT
#undef ServerName
#undef server_name
+#undef WRITE_ACTION
};
#ifdef DEBUG_SYNC
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index 24c73314d8..6e7e802a8b 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -339,10 +339,10 @@ void RectangleShape2DSW::get_supports(const Vector2 &p_normal, Vector2 *r_suppor
}
bool RectangleShape2DSW::contains_point(const Vector2 &p_point) const {
- float x = p_point.x;
- float y = p_point.y;
- float edge_x = half_extents.x;
- float edge_y = half_extents.y;
+ real_t x = p_point.x;
+ real_t y = p_point.y;
+ real_t edge_x = half_extents.x;
+ real_t edge_y = half_extents.y;
return (x >= -edge_x) && (x < edge_x) && (y >= -edge_y) && (y < edge_y);
}
@@ -590,7 +590,11 @@ real_t ConvexPolygonShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2
}
void ConvexPolygonShape2DSW::set_data(const Variant &p_data) {
+#ifdef REAL_T_IS_DOUBLE
+ ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_FLOAT64_ARRAY);
+#else
ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_FLOAT32_ARRAY);
+#endif
if (points) {
memdelete_arr(points);
@@ -829,7 +833,11 @@ int ConcavePolygonShape2DSW::_generate_bvh(BVH *p_bvh, int p_len, int p_depth) {
}
void ConcavePolygonShape2DSW::set_data(const Variant &p_data) {
+#ifdef REAL_T_IS_DOUBLE
+ ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_FLOAT64_ARRAY);
+#else
ERR_FAIL_COND(p_data.get_type() != Variant::PACKED_VECTOR2_ARRAY && p_data.get_type() != Variant::PACKED_FLOAT32_ARRAY);
+#endif
Rect2 aabb;
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 068bc7fc0a..9cbc01d1d3 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -376,6 +376,7 @@ struct _RestCallbackData2D {
Vector2 best_normal;
real_t best_len;
Vector2 valid_dir;
+ real_t valid_depth;
real_t min_allowed_depth;
};
@@ -385,22 +386,24 @@ 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 == 0) {
+ if (len < rd->min_allowed_depth) {
return;
}
- Vector2 normal = contact_rel / len;
-
- if (rd->valid_dir != Vector2() && rd->valid_dir.dot(normal) > -CMP_EPSILON) {
+ if (len <= rd->best_len) {
return;
}
- if (len < rd->min_allowed_depth) {
- return;
- }
+ Vector2 normal = contact_rel / len;
- if (len <= rd->best_len) {
- return;
+ if (rd->valid_dir != Vector2()) {
+ if (len > rd->valid_depth) {
+ return;
+ }
+
+ if (rd->valid_dir.dot(normal) > -CMP_EPSILON) {
+ return;
+ }
}
rd->best_len = len;
@@ -644,7 +647,7 @@ int Space2DSW::test_body_ray_separation(Body2DSW *p_body, const Transform2D &p_t
recover_motion += (b - a) / cbk.amount;
- float depth = a.distance_to(b);
+ real_t depth = a.distance_to(b);
if (depth > result.collision_depth) {
result.collision_depth = depth;
result.collision_point = b;
@@ -739,10 +742,13 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
ExcludedShapeSW excluded_shape_pairs[max_excluded_shape_pairs];
int excluded_shape_pair_count = 0;
- float separation_margin = MIN(p_margin, MAX(0.0, p_motion.length() - CMP_EPSILON)); //don't separate by more than the intended motion
+ real_t motion_length = p_motion.length();
+ Vector2 motion_normal = p_motion / motion_length;
Transform2D body_transform = p_from;
+ bool recovered = false;
+
{
//STEP 1, FREE BODY IF STUCK
@@ -793,7 +799,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
if (col_obj->is_shape_set_as_one_way_collision(shape_idx)) {
cbk.valid_dir = col_obj_shape_xform.get_axis(1).normalized();
- float owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx);
+ real_t owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx);
cbk.valid_depth = MAX(owc_margin, p_margin); //user specified, but never less than actual margin or it won't work
cbk.invalid_by_dir = 0;
@@ -804,7 +810,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
Vector2 lv = b->get_linear_velocity();
//compute displacement from linear velocity
Vector2 motion = lv * PhysicsDirectBodyState2DSW::singleton->step;
- float motion_len = motion.length();
+ real_t motion_len = motion.length();
motion.normalize();
cbk.valid_depth += motion_len * MAX(motion.dot(-cbk.valid_dir), 0.0);
}
@@ -819,7 +825,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
bool did_collide = false;
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, nullptr, separation_margin)) {
+ if (CollisionSolver2DSW::solve(body_shape, body_shape_xform, Vector2(), against_shape, col_obj_shape_xform, Vector2(), cbkres, cbkptr, nullptr, p_margin)) {
did_collide = cbk.passed > current_passed; //more passed, so collision actually existed
}
@@ -845,11 +851,20 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
}
Vector2 recover_motion;
-
for (int i = 0; i < cbk.amount; i++) {
Vector2 a = sr[i * 2 + 0];
Vector2 b = sr[i * 2 + 1];
- recover_motion += (b - a) / cbk.amount;
+
+ // Compute plane on b towards a.
+ Vector2 n = (a - b).normalized();
+ real_t d = n.dot(b);
+
+ // Compute depth on recovered motion.
+ real_t depth = n.dot(a + recover_motion) - d;
+ if (depth > 0.0) {
+ // Only recover if there is penetration.
+ recover_motion -= n * depth * 0.4;
+ }
}
if (recover_motion == Vector2()) {
@@ -857,6 +872,8 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
break;
}
+ recovered = true;
+
body_transform.elements[2] += recover_motion;
body_aabb.position += recover_motion;
@@ -929,7 +946,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
//test initial overlap
if (CollisionSolver2DSW::solve(body_shape, body_shape_xform, Vector2(), against_shape, col_obj_shape_xform, Vector2(), nullptr, nullptr, nullptr, 0)) {
if (col_obj->is_shape_set_as_one_way_collision(col_shape_idx)) {
- continue;
+ Vector2 direction = col_obj_shape_xform.get_axis(1).normalized();
+ if (motion_normal.dot(direction) < 0) {
+ continue;
+ }
}
stuck = true;
@@ -939,13 +959,12 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
//just do kinematic solving
real_t low = 0;
real_t hi = 1;
- Vector2 mnormal = p_motion.normalized();
for (int k = 0; k < 8; k++) { //steps should be customizable..
real_t ofs = (low + hi) * 0.5;
- Vector2 sep = mnormal; //important optimization for this to work fast enough
+ Vector2 sep = motion_normal; //important optimization for this to work fast enough
bool collided = CollisionSolver2DSW::solve(body_shape, body_shape_xform, p_motion * ofs, against_shape, col_obj_shape_xform, Vector2(), nullptr, nullptr, &sep, 0);
if (collided) {
@@ -966,7 +985,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
cbk.valid_depth = 10e20;
- Vector2 sep = mnormal; //important optimization for this to work fast enough
+ Vector2 sep = motion_normal; //important optimization for this to work fast enough
bool collided = CollisionSolver2DSW::solve(body_shape, body_shape_xform, p_motion * (hi + contact_max_allowed_penetration), col_obj->get_shape(col_shape_idx), col_obj_shape_xform, Vector2(), PhysicsServer2DSW::_shape_col_cbk, &cbk, &sep, 0);
if (!collided || cbk.amount == 0) {
continue;
@@ -997,11 +1016,12 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
}
bool collided = false;
- if (safe >= 1) {
- best_shape = -1; //no best shape with cast, reset to -1
- }
- if (safe < 1) {
+ if (recovered || (safe < 1)) {
+ if (safe >= 1) {
+ best_shape = -1; //no best shape with cast, reset to -1
+ }
+
//it collided, let's get the rest info in unsafe advance
Transform2D ugt = body_transform;
ugt.elements[2] += p_motion * unsafe;
@@ -1010,9 +1030,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
rcd.best_len = 0;
rcd.best_object = nullptr;
rcd.best_shape = 0;
- rcd.min_allowed_depth = test_motion_min_contact_depth;
- //optimization
+ // Allowed depth can't be lower than motion length, in order to handle contacts at low speed.
+ rcd.min_allowed_depth = MIN(motion_length, test_motion_min_contact_depth);
+
int from_shape = best_shape != -1 ? best_shape : 0;
int to_shape = best_shape != -1 ? best_shape + 1 : p_body->get_shape_count();
@@ -1060,8 +1081,25 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
if (col_obj->is_shape_set_as_one_way_collision(shape_idx)) {
rcd.valid_dir = col_obj_shape_xform.get_axis(1).normalized();
+
+ real_t owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx);
+ rcd.valid_depth = MAX(owc_margin, p_margin); //user specified, but never less than actual margin or it won't work
+
+ if (col_obj->get_type() == CollisionObject2DSW::TYPE_BODY) {
+ const Body2DSW *b = static_cast<const Body2DSW *>(col_obj);
+ if (b->get_mode() == PhysicsServer2D::BODY_MODE_KINEMATIC || b->get_mode() == PhysicsServer2D::BODY_MODE_RIGID) {
+ //fix for moving platforms (kinematic and dynamic), margin is increased by how much it moved in the given direction
+ Vector2 lv = b->get_linear_velocity();
+ //compute displacement from linear velocity
+ Vector2 motion = lv * PhysicsDirectBodyState2DSW::singleton->step;
+ real_t motion_len = motion.length();
+ motion.normalize();
+ rcd.valid_depth += motion_len * MAX(motion.dot(-rcd.valid_dir), 0.0);
+ }
+ }
} else {
rcd.valid_dir = Vector2();
+ rcd.valid_depth = 0;
}
rcd.object = col_obj;
@@ -1328,7 +1366,7 @@ Space2DSW::Space2DSW() {
constraint_bias = 0.2;
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_linear", 2.0);
- body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI));
+ body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_angular", Math::deg2rad(8.0));
body_time_to_sleep = GLOBAL_DEF("physics/2d/time_before_sleep", 0.5);
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/time_before_sleep", PropertyInfo(Variant::FLOAT, "physics/2d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
diff --git a/servers/physics_3d/body_3d_sw.h b/servers/physics_3d/body_3d_sw.h
index 41578778f6..8e21003a5f 100644
--- a/servers/physics_3d/body_3d_sw.h
+++ b/servers/physics_3d/body_3d_sw.h
@@ -426,7 +426,7 @@ public:
ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3());
return body->contacts[p_contact_idx].local_normal;
}
- virtual float get_contact_impulse(int p_contact_idx) const override {
+ virtual real_t get_contact_impulse(int p_contact_idx) const override {
return 0.0f; // Only implemented for bullet
}
virtual int get_contact_local_shape(int p_contact_idx) const override {
diff --git a/servers/physics_3d/collision_object_3d_sw.cpp b/servers/physics_3d/collision_object_3d_sw.cpp
index b06ade5ed3..293a7e6606 100644
--- a/servers/physics_3d/collision_object_3d_sw.cpp
+++ b/servers/physics_3d/collision_object_3d_sw.cpp
@@ -43,7 +43,7 @@ void CollisionObject3DSW::add_shape(Shape3DSW *p_shape, const Transform &p_trans
p_shape->add_owner(this);
if (!pending_shape_update_list.in_list()) {
- PhysicsServer3DSW::singleton->pending_shape_update_list.add(&pending_shape_update_list);
+ PhysicsServer3DSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list);
}
//_update_shapes();
//_shapes_changed();
@@ -56,7 +56,7 @@ void CollisionObject3DSW::set_shape(int p_index, Shape3DSW *p_shape) {
p_shape->add_owner(this);
if (!pending_shape_update_list.in_list()) {
- PhysicsServer3DSW::singleton->pending_shape_update_list.add(&pending_shape_update_list);
+ PhysicsServer3DSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list);
}
//_update_shapes();
//_shapes_changed();
@@ -68,7 +68,7 @@ void CollisionObject3DSW::set_shape_transform(int p_index, const Transform &p_tr
shapes.write[p_index].xform = p_transform;
shapes.write[p_index].xform_inv = p_transform.affine_inverse();
if (!pending_shape_update_list.in_list()) {
- PhysicsServer3DSW::singleton->pending_shape_update_list.add(&pending_shape_update_list);
+ PhysicsServer3DSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list);
}
//_update_shapes();
//_shapes_changed();
@@ -77,7 +77,7 @@ void CollisionObject3DSW::set_shape_transform(int p_index, const Transform &p_tr
void CollisionObject3DSW::set_shape_as_disabled(int p_idx, bool p_enable) {
shapes.write[p_idx].disabled = p_enable;
if (!pending_shape_update_list.in_list()) {
- PhysicsServer3DSW::singleton->pending_shape_update_list.add(&pending_shape_update_list);
+ PhysicsServer3DSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list);
}
}
@@ -106,7 +106,7 @@ void CollisionObject3DSW::remove_shape(int p_index) {
shapes.remove(p_index);
if (!pending_shape_update_list.in_list()) {
- PhysicsServer3DSW::singleton->pending_shape_update_list.add(&pending_shape_update_list);
+ PhysicsServer3DSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list);
}
//_update_shapes();
//_shapes_changed();
diff --git a/servers/physics_3d/collision_solver_3d_sat.cpp b/servers/physics_3d/collision_solver_3d_sat.cpp
index b8e056f1f4..f507cacdc3 100644
--- a/servers/physics_3d/collision_solver_3d_sat.cpp
+++ b/servers/physics_3d/collision_solver_3d_sat.cpp
@@ -31,7 +31,38 @@
#include "collision_solver_3d_sat.h"
#include "core/math/geometry_3d.h"
-#define _EDGE_IS_VALID_SUPPORT_THRESHOLD 0.02
+#include "gjk_epa.h"
+
+#define fallback_collision_solver gjk_epa_calculate_penetration
+
+// Cylinder SAT analytic methods and face-circle contact points for cylinder-trimesh and cylinder-box collision are based on ODE colliders.
+
+/*
+ * Cylinder-trimesh and Cylinder-box colliders by Alen Ladavac
+ * Ported to ODE by Nguyen Binh
+ */
+
+/*************************************************************************
+ * *
+ * Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. *
+ * All rights reserved. Email: russ@q12.org Web: www.q12.org *
+ * *
+ * This library is free software; you can redistribute it and/or *
+ * modify it under the terms of EITHER: *
+ * (1) The GNU Lesser General Public License as published by the Free *
+ * Software Foundation; either version 2.1 of the License, or (at *
+ * your option) any later version. The text of the GNU Lesser *
+ * General Public License is included with this library in the *
+ * file LICENSE.TXT. *
+ * (2) The BSD-style license that is included with this library in *
+ * the file LICENSE-BSD.TXT. *
+ * *
+ * 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 files *
+ * LICENSE.TXT and LICENSE-BSD.TXT for more details. *
+ * *
+ *************************************************************************/
struct _CollectorCallback {
CollisionSolver3DSW::CallbackResult callback;
@@ -82,6 +113,17 @@ static void _generate_contacts_point_face(const Vector3 *p_points_A, int p_point
p_callback->call(*p_points_A, closest_B);
}
+static void _generate_contacts_point_circle(const Vector3 *p_points_A, int p_point_count_A, const Vector3 *p_points_B, int p_point_count_B, _CollectorCallback *p_callback) {
+#ifdef DEBUG_ENABLED
+ ERR_FAIL_COND(p_point_count_A != 1);
+ ERR_FAIL_COND(p_point_count_B != 3);
+#endif
+
+ Vector3 closest_B = Plane(p_points_B[0], p_points_B[1], p_points_B[2]).project(*p_points_A);
+
+ p_callback->call(*p_points_A, closest_B);
+}
+
static void _generate_contacts_edge_edge(const Vector3 *p_points_A, int p_point_count_A, const Vector3 *p_points_B, int p_point_count_B, _CollectorCallback *p_callback) {
#ifdef DEBUG_ENABLED
ERR_FAIL_COND(p_point_count_A != 2);
@@ -128,6 +170,104 @@ static void _generate_contacts_edge_edge(const Vector3 *p_points_A, int p_point_
p_callback->call(closest_A, closest_B);
}
+static void _generate_contacts_edge_circle(const Vector3 *p_points_A, int p_point_count_A, const Vector3 *p_points_B, int p_point_count_B, _CollectorCallback *p_callback) {
+#ifdef DEBUG_ENABLED
+ ERR_FAIL_COND(p_point_count_A != 2);
+ ERR_FAIL_COND(p_point_count_B != 3);
+#endif
+
+ const Vector3 &circle_B_pos = p_points_B[0];
+ Vector3 circle_B_line_1 = p_points_B[1] - circle_B_pos;
+ Vector3 circle_B_line_2 = p_points_B[2] - circle_B_pos;
+
+ real_t circle_B_radius = circle_B_line_1.length();
+ Vector3 circle_B_normal = circle_B_line_1.cross(circle_B_line_2).normalized();
+
+ Plane circle_plane(circle_B_pos, circle_B_normal);
+
+ static const int max_clip = 2;
+ Vector3 contact_points[max_clip];
+ int num_points = 0;
+
+ // Project edge point in circle plane.
+ const Vector3 &edge_A_1 = p_points_A[0];
+ Vector3 proj_point_1 = circle_plane.project(edge_A_1);
+
+ Vector3 dist_vec = proj_point_1 - circle_B_pos;
+ real_t dist_sq = dist_vec.length_squared();
+
+ // Point 1 is inside disk, add as contact point.
+ if (dist_sq <= circle_B_radius * circle_B_radius) {
+ contact_points[num_points] = edge_A_1;
+ ++num_points;
+ }
+
+ const Vector3 &edge_A_2 = p_points_A[1];
+ Vector3 proj_point_2 = circle_plane.project(edge_A_2);
+
+ Vector3 dist_vec_2 = proj_point_2 - circle_B_pos;
+ real_t dist_sq_2 = dist_vec_2.length_squared();
+
+ // Point 2 is inside disk, add as contact point.
+ if (dist_sq_2 <= circle_B_radius * circle_B_radius) {
+ contact_points[num_points] = edge_A_2;
+ ++num_points;
+ }
+
+ if (num_points < 2) {
+ Vector3 line_vec = proj_point_2 - proj_point_1;
+ real_t line_length_sq = line_vec.length_squared();
+
+ // Create a quadratic formula of the form ax^2 + bx + c = 0
+ real_t a, b, c;
+
+ a = line_length_sq;
+ b = 2.0 * dist_vec.dot(line_vec);
+ c = dist_sq - circle_B_radius * circle_B_radius;
+
+ // Solve for t.
+ real_t sqrtterm = b * b - 4.0 * a * c;
+
+ // If the term we intend to square root is less than 0 then the answer won't be real,
+ // so the line doesn't intersect.
+ if (sqrtterm >= 0) {
+ sqrtterm = Math::sqrt(sqrtterm);
+
+ Vector3 edge_dir = edge_A_2 - edge_A_1;
+
+ real_t fraction_1 = (-b - sqrtterm) / (2.0 * a);
+ if ((fraction_1 > 0.0) && (fraction_1 < 1.0)) {
+ Vector3 face_point_1 = edge_A_1 + fraction_1 * edge_dir;
+ ERR_FAIL_COND(num_points >= max_clip);
+ contact_points[num_points] = face_point_1;
+ ++num_points;
+ }
+
+ real_t fraction_2 = (-b + sqrtterm) / (2.0 * a);
+ if ((fraction_2 > 0.0) && (fraction_2 < 1.0) && !Math::is_equal_approx(fraction_1, fraction_2)) {
+ Vector3 face_point_2 = edge_A_1 + fraction_2 * edge_dir;
+ ERR_FAIL_COND(num_points >= max_clip);
+ contact_points[num_points] = face_point_2;
+ ++num_points;
+ }
+ }
+ }
+
+ // Generate contact points.
+ for (int i = 0; i < num_points; i++) {
+ const Vector3 &contact_point_A = contact_points[i];
+
+ real_t d = circle_plane.distance_to(contact_point_A);
+ Vector3 closest_B = contact_point_A - circle_plane.normal * d;
+
+ if (p_callback->normal.dot(contact_point_A) >= p_callback->normal.dot(closest_B)) {
+ continue;
+ }
+
+ p_callback->call(contact_point_A, closest_B);
+ }
+}
+
static void _generate_contacts_face_face(const Vector3 *p_points_A, int p_point_count_A, const Vector3 *p_points_B, int p_point_count_B, _CollectorCallback *p_callback) {
#ifdef DEBUG_ENABLED
ERR_FAIL_COND(p_point_count_A < 2);
@@ -217,36 +357,229 @@ static void _generate_contacts_face_face(const Vector3 *p_points_A, int p_point_
}
}
-static void _generate_contacts_from_supports(const Vector3 *p_points_A, int p_point_count_A, const Vector3 *p_points_B, int p_point_count_B, _CollectorCallback *p_callback) {
+static void _generate_contacts_face_circle(const Vector3 *p_points_A, int p_point_count_A, const Vector3 *p_points_B, int p_point_count_B, _CollectorCallback *p_callback) {
+#ifdef DEBUG_ENABLED
+ ERR_FAIL_COND(p_point_count_A < 3);
+ ERR_FAIL_COND(p_point_count_B != 3);
+#endif
+
+ const Vector3 &circle_B_pos = p_points_B[0];
+ Vector3 circle_B_line_1 = p_points_B[1] - circle_B_pos;
+ Vector3 circle_B_line_2 = p_points_B[2] - circle_B_pos;
+
+ // Clip face with circle segments.
+ static const int circle_segments = 8;
+ Vector3 circle_points[circle_segments];
+
+ real_t angle_delta = 2.0 * Math_PI / circle_segments;
+
+ for (int i = 0; i < circle_segments; ++i) {
+ Vector3 point_pos = circle_B_pos;
+ point_pos += circle_B_line_1 * Math::cos(i * angle_delta);
+ point_pos += circle_B_line_2 * Math::sin(i * angle_delta);
+ circle_points[i] = point_pos;
+ }
+
+ _generate_contacts_face_face(p_points_A, p_point_count_A, circle_points, circle_segments, p_callback);
+
+ // Clip face with circle plane.
+ Vector3 circle_B_normal = circle_B_line_1.cross(circle_B_line_2).normalized();
+
+ Plane circle_plane(circle_B_pos, circle_B_normal);
+
+ static const int max_clip = 32;
+ Vector3 contact_points[max_clip];
+ int num_points = 0;
+
+ for (int i = 0; i < p_point_count_A; i++) {
+ int i_n = (i + 1) % p_point_count_A;
+
+ const Vector3 &edge0_A = p_points_A[i];
+ const Vector3 &edge1_A = p_points_A[i_n];
+
+ real_t dist0 = circle_plane.distance_to(edge0_A);
+ real_t dist1 = circle_plane.distance_to(edge1_A);
+
+ // First point in front of plane, generate contact point.
+ if (dist0 * circle_plane.d >= 0) {
+ ERR_FAIL_COND(num_points >= max_clip);
+ contact_points[num_points] = edge0_A;
+ ++num_points;
+ }
+
+ // Points on different sides, generate contact point.
+ if (dist0 * dist1 < 0) {
+ // calculate intersection
+ Vector3 rel = edge1_A - edge0_A;
+ real_t den = circle_plane.normal.dot(rel);
+ real_t dist = -(circle_plane.normal.dot(edge0_A) - circle_plane.d) / den;
+ Vector3 inters = edge0_A + rel * dist;
+
+ ERR_FAIL_COND(num_points >= max_clip);
+ contact_points[num_points] = inters;
+ ++num_points;
+ }
+ }
+
+ // Generate contact points.
+ for (int i = 0; i < num_points; i++) {
+ const Vector3 &contact_point_A = contact_points[i];
+
+ real_t d = circle_plane.distance_to(contact_point_A);
+ Vector3 closest_B = contact_point_A - circle_plane.normal * d;
+
+ if (p_callback->normal.dot(contact_point_A) >= p_callback->normal.dot(closest_B)) {
+ continue;
+ }
+
+ p_callback->call(contact_point_A, closest_B);
+ }
+}
+
+static void _generate_contacts_circle_circle(const Vector3 *p_points_A, int p_point_count_A, const Vector3 *p_points_B, int p_point_count_B, _CollectorCallback *p_callback) {
+#ifdef DEBUG_ENABLED
+ ERR_FAIL_COND(p_point_count_A != 3);
+ ERR_FAIL_COND(p_point_count_B != 3);
+#endif
+
+ const Vector3 &circle_A_pos = p_points_A[0];
+ Vector3 circle_A_line_1 = p_points_A[1] - circle_A_pos;
+ Vector3 circle_A_line_2 = p_points_A[2] - circle_A_pos;
+
+ real_t circle_A_radius = circle_A_line_1.length();
+ Vector3 circle_A_normal = circle_A_line_1.cross(circle_A_line_2).normalized();
+
+ const Vector3 &circle_B_pos = p_points_B[0];
+ Vector3 circle_B_line_1 = p_points_B[1] - circle_B_pos;
+ Vector3 circle_B_line_2 = p_points_B[2] - circle_B_pos;
+
+ real_t circle_B_radius = circle_B_line_1.length();
+ Vector3 circle_B_normal = circle_B_line_1.cross(circle_B_line_2).normalized();
+
+ static const int max_clip = 4;
+ Vector3 contact_points[max_clip];
+ int num_points = 0;
+
+ Vector3 centers_diff = circle_B_pos - circle_A_pos;
+ Vector3 norm_proj = circle_A_normal.dot(centers_diff) * circle_A_normal;
+ Vector3 comp_proj = centers_diff - norm_proj;
+ real_t proj_dist = comp_proj.length();
+ if (!Math::is_zero_approx(proj_dist)) {
+ comp_proj /= proj_dist;
+ if ((proj_dist > circle_A_radius - circle_B_radius) && (proj_dist > circle_B_radius - circle_A_radius)) {
+ // Circles are overlapping, use the 2 points of intersection as contacts.
+ real_t radius_a_sqr = circle_A_radius * circle_A_radius;
+ real_t radius_b_sqr = circle_B_radius * circle_B_radius;
+ real_t d_sqr = proj_dist * proj_dist;
+ real_t s = (1.0 + (radius_a_sqr - radius_b_sqr) / d_sqr) * 0.5;
+ real_t h = Math::sqrt(MAX(radius_a_sqr - d_sqr * s * s, 0.0));
+ Vector3 midpoint = circle_A_pos + s * comp_proj * proj_dist;
+ Vector3 h_vec = h * circle_A_normal.cross(comp_proj);
+
+ Vector3 point_A = midpoint + h_vec;
+ contact_points[num_points] = point_A;
+ ++num_points;
+
+ point_A = midpoint - h_vec;
+ contact_points[num_points] = point_A;
+ ++num_points;
+
+ // Add 2 points from circle A and B along the line between the centers.
+ point_A = circle_A_pos + comp_proj * circle_A_radius;
+ contact_points[num_points] = point_A;
+ ++num_points;
+
+ point_A = circle_B_pos - comp_proj * circle_B_radius - norm_proj;
+ contact_points[num_points] = point_A;
+ ++num_points;
+ } // Otherwise one circle is inside the other one, use 3 arbitrary equidistant points.
+ } // Otherwise circles are concentric, use 3 arbitrary equidistant points.
+
+ if (num_points == 0) {
+ // Generate equidistant points.
+ if (circle_A_radius < circle_B_radius) {
+ // Circle A inside circle B.
+ for (int i = 0; i < 3; ++i) {
+ Vector3 circle_A_point = circle_A_pos;
+ circle_A_point += circle_A_line_1 * Math::cos(2.0 * Math_PI * i / 3.0);
+ circle_A_point += circle_A_line_2 * Math::sin(2.0 * Math_PI * i / 3.0);
+
+ contact_points[num_points] = circle_A_point;
+ ++num_points;
+ }
+ } else {
+ // Circle B inside circle A.
+ for (int i = 0; i < 3; ++i) {
+ Vector3 circle_B_point = circle_B_pos;
+ circle_B_point += circle_B_line_1 * Math::cos(2.0 * Math_PI * i / 3.0);
+ circle_B_point += circle_B_line_2 * Math::sin(2.0 * Math_PI * i / 3.0);
+
+ Vector3 circle_A_point = circle_B_point - norm_proj;
+
+ contact_points[num_points] = circle_A_point;
+ ++num_points;
+ }
+ }
+ }
+
+ Plane circle_B_plane(circle_B_pos, circle_B_normal);
+
+ // Generate contact points.
+ for (int i = 0; i < num_points; i++) {
+ const Vector3 &contact_point_A = contact_points[i];
+
+ real_t d = circle_B_plane.distance_to(contact_point_A);
+ Vector3 closest_B = contact_point_A - circle_B_plane.normal * d;
+
+ if (p_callback->normal.dot(contact_point_A) >= p_callback->normal.dot(closest_B)) {
+ continue;
+ }
+
+ p_callback->call(contact_point_A, closest_B);
+ }
+}
+
+static void _generate_contacts_from_supports(const Vector3 *p_points_A, int p_point_count_A, Shape3DSW::FeatureType p_feature_type_A, const Vector3 *p_points_B, int p_point_count_B, Shape3DSW::FeatureType p_feature_type_B, _CollectorCallback *p_callback) {
#ifdef DEBUG_ENABLED
ERR_FAIL_COND(p_point_count_A < 1);
ERR_FAIL_COND(p_point_count_B < 1);
#endif
- static const GenerateContactsFunc generate_contacts_func_table[3][3] = {
+ static const GenerateContactsFunc generate_contacts_func_table[4][4] = {
{
_generate_contacts_point_point,
_generate_contacts_point_edge,
_generate_contacts_point_face,
+ _generate_contacts_point_circle,
},
{
nullptr,
_generate_contacts_edge_edge,
_generate_contacts_face_face,
+ _generate_contacts_edge_circle,
},
{
nullptr,
nullptr,
_generate_contacts_face_face,
- }
+ _generate_contacts_face_circle,
+ },
+ {
+ nullptr,
+ nullptr,
+ nullptr,
+ _generate_contacts_circle_circle,
+ },
};
int pointcount_B;
int pointcount_A;
const Vector3 *points_A;
const Vector3 *points_B;
+ int version_A;
+ int version_B;
- if (p_point_count_A > p_point_count_B) {
+ if (p_feature_type_A > p_feature_type_B) {
//swap
p_callback->swap = !p_callback->swap;
p_callback->normal = -p_callback->normal;
@@ -255,16 +588,17 @@ static void _generate_contacts_from_supports(const Vector3 *p_points_A, int p_po
pointcount_A = p_point_count_B;
points_A = p_points_B;
points_B = p_points_A;
+ version_A = p_feature_type_B;
+ version_B = p_feature_type_A;
} else {
pointcount_B = p_point_count_B;
pointcount_A = p_point_count_A;
points_A = p_points_A;
points_B = p_points_B;
+ version_A = p_feature_type_A;
+ version_B = p_feature_type_B;
}
- int version_A = (pointcount_A > 3 ? 3 : pointcount_A) - 1;
- int version_B = (pointcount_B > 3 ? 3 : pointcount_B) - 1;
-
GenerateContactsFunc contacts_func = generate_contacts_func_table[version_A][version_B];
ERR_FAIL_COND(!contacts_func);
contacts_func(points_A, pointcount_A, points_B, pointcount_B, p_callback);
@@ -346,6 +680,17 @@ public:
return true;
}
+ static _FORCE_INLINE_ void test_contact_points(const Vector3 &p_point_A, const Vector3 &p_point_B, void *p_userdata) {
+ SeparatorAxisTest<ShapeA, ShapeB, withMargin> *separator = (SeparatorAxisTest<ShapeA, ShapeB, withMargin> *)p_userdata;
+ Vector3 axis = (p_point_B - p_point_A);
+ real_t depth = axis.length();
+
+ // Filter out bogus directions with a treshold and re-testing axis.
+ if (separator->best_depth - depth > 0.001) {
+ separator->test_axis(axis / depth);
+ }
+ }
+
_FORCE_INLINE_ void generate_contacts() {
// nothing to do, don't generate
if (best_axis == Vector3(0.0, 0.0, 0.0)) {
@@ -365,7 +710,8 @@ public:
Vector3 supports_A[max_supports];
int support_count_A;
- shape_A->get_supports(transform_A->basis.xform_inv(-best_axis).normalized(), max_supports, supports_A, support_count_A);
+ Shape3DSW::FeatureType support_type_A;
+ shape_A->get_supports(transform_A->basis.xform_inv(-best_axis).normalized(), max_supports, supports_A, support_count_A, support_type_A);
for (int i = 0; i < support_count_A; i++) {
supports_A[i] = transform_A->xform(supports_A[i]);
}
@@ -378,7 +724,8 @@ public:
Vector3 supports_B[max_supports];
int support_count_B;
- shape_B->get_supports(transform_B->basis.xform_inv(best_axis).normalized(), max_supports, supports_B, support_count_B);
+ Shape3DSW::FeatureType support_type_B;
+ shape_B->get_supports(transform_B->basis.xform_inv(best_axis).normalized(), max_supports, supports_B, support_count_B, support_type_B);
for (int i = 0; i < support_count_B; i++) {
supports_B[i] = transform_B->xform(supports_B[i]);
}
@@ -393,7 +740,7 @@ public:
if (callback->prev_axis) {
*callback->prev_axis = best_axis;
}
- _generate_contacts_from_supports(supports_A, support_count_A, supports_B, support_count_B, callback);
+ _generate_contacts_from_supports(supports_A, support_count_A, support_type_A, supports_B, support_count_B, support_type_B, callback);
callback->collided = true;
}
@@ -529,6 +876,61 @@ static void _collision_sphere_capsule(const Shape3DSW *p_a, const Transform &p_t
template <bool withMargin>
static void _collision_sphere_cylinder(const Shape3DSW *p_a, const Transform &p_transform_a, const Shape3DSW *p_b, const Transform &p_transform_b, _CollectorCallback *p_collector, real_t p_margin_a, real_t p_margin_b) {
+ const SphereShape3DSW *sphere_A = static_cast<const SphereShape3DSW *>(p_a);
+ const CylinderShape3DSW *cylinder_B = static_cast<const CylinderShape3DSW *>(p_b);
+
+ SeparatorAxisTest<SphereShape3DSW, CylinderShape3DSW, withMargin> separator(sphere_A, p_transform_a, cylinder_B, p_transform_b, p_collector, p_margin_a, p_margin_b);
+
+ if (!separator.test_previous_axis()) {
+ return;
+ }
+
+ // Cylinder B end caps.
+ Vector3 cylinder_B_axis = p_transform_b.basis.get_axis(1).normalized();
+ if (!separator.test_axis(cylinder_B_axis)) {
+ return;
+ }
+
+ Vector3 cylinder_diff = p_transform_b.origin - p_transform_a.origin;
+
+ // Cylinder B lateral surface.
+ if (!separator.test_axis(cylinder_B_axis.cross(cylinder_diff).cross(cylinder_B_axis).normalized())) {
+ return;
+ }
+
+ // Closest point to cylinder caps.
+ const Vector3 &sphere_center = p_transform_a.origin;
+ Vector3 cyl_axis = p_transform_b.basis.get_axis(1);
+ Vector3 cap_axis = p_transform_b.basis.get_axis(0);
+ real_t height_scale = cyl_axis.length();
+ real_t cap_dist = cylinder_B->get_height() * 0.5 * height_scale;
+ cyl_axis /= height_scale;
+ real_t radius_scale = cap_axis.length();
+ real_t cap_radius = cylinder_B->get_radius() * radius_scale;
+
+ for (int i = 0; i < 2; i++) {
+ Vector3 cap_dir = ((i == 0) ? cyl_axis : -cyl_axis);
+ Vector3 cap_pos = p_transform_b.origin + cap_dir * cap_dist;
+
+ Vector3 closest_point;
+
+ Vector3 diff = sphere_center - cap_pos;
+ Vector3 proj = diff - cap_dir.dot(diff) * cap_dir;
+
+ real_t proj_len = proj.length();
+ if (Math::is_zero_approx(proj_len)) {
+ // Point is equidistant to all circle points.
+ continue;
+ }
+
+ closest_point = cap_pos + (cap_radius / proj_len) * proj;
+
+ if (!separator.test_axis((closest_point - sphere_center).normalized())) {
+ return;
+ }
+ }
+
+ separator.generate_contacts();
}
template <bool withMargin>
@@ -739,7 +1141,7 @@ static void _collision_box_capsule(const Shape3DSW *p_a, const Transform &p_tran
// faces of A
for (int i = 0; i < 3; i++) {
- Vector3 axis = p_transform_a.basis.get_axis(i);
+ Vector3 axis = p_transform_a.basis.get_axis(i).normalized();
if (!separator.test_axis(axis)) {
return;
@@ -826,6 +1228,115 @@ static void _collision_box_capsule(const Shape3DSW *p_a, const Transform &p_tran
template <bool withMargin>
static void _collision_box_cylinder(const Shape3DSW *p_a, const Transform &p_transform_a, const Shape3DSW *p_b, const Transform &p_transform_b, _CollectorCallback *p_collector, real_t p_margin_a, real_t p_margin_b) {
+ const BoxShape3DSW *box_A = static_cast<const BoxShape3DSW *>(p_a);
+ const CylinderShape3DSW *cylinder_B = static_cast<const CylinderShape3DSW *>(p_b);
+
+ SeparatorAxisTest<BoxShape3DSW, CylinderShape3DSW, withMargin> separator(box_A, p_transform_a, cylinder_B, p_transform_b, p_collector, p_margin_a, p_margin_b);
+
+ if (!separator.test_previous_axis()) {
+ return;
+ }
+
+ // Faces of A.
+ for (int i = 0; i < 3; i++) {
+ Vector3 axis = p_transform_a.basis.get_axis(i).normalized();
+
+ if (!separator.test_axis(axis)) {
+ return;
+ }
+ }
+
+ Vector3 cyl_axis = p_transform_b.basis.get_axis(1).normalized();
+
+ // Cylinder end caps.
+ {
+ if (!separator.test_axis(cyl_axis)) {
+ return;
+ }
+ }
+
+ // Edges of A, cylinder lateral surface.
+ for (int i = 0; i < 3; i++) {
+ Vector3 box_axis = p_transform_a.basis.get_axis(i);
+ Vector3 axis = box_axis.cross(cyl_axis);
+ if (Math::is_zero_approx(axis.length_squared())) {
+ continue;
+ }
+
+ if (!separator.test_axis(axis.normalized())) {
+ return;
+ }
+ }
+
+ // Gather points of A.
+ Vector3 vertices_A[8];
+ Vector3 box_extent = box_A->get_half_extents();
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < 2; j++) {
+ for (int k = 0; k < 2; k++) {
+ Vector3 extent = box_extent;
+ extent.x *= (i * 2 - 1);
+ extent.y *= (j * 2 - 1);
+ extent.z *= (k * 2 - 1);
+ Vector3 &point = vertices_A[i * 2 * 2 + j * 2 + k];
+ point = p_transform_a.origin;
+ for (int l = 0; l < 3; l++) {
+ point += p_transform_a.basis.get_axis(l) * extent[l];
+ }
+ }
+ }
+ }
+
+ // Points of A, cylinder lateral surface.
+ for (int i = 0; i < 8; i++) {
+ const Vector3 &point = vertices_A[i];
+ Vector3 axis = Plane(cyl_axis, 0).project(point).normalized();
+
+ if (!separator.test_axis(axis)) {
+ return;
+ }
+ }
+
+ // Edges of A, cylinder end caps rim.
+ int edges_start_A[12] = { 0, 2, 4, 6, 0, 1, 4, 5, 0, 1, 2, 3 };
+ int edges_end_A[12] = { 1, 3, 5, 7, 2, 3, 6, 7, 4, 5, 6, 7 };
+
+ Vector3 cap_axis = cyl_axis * (cylinder_B->get_height() * 0.5);
+
+ for (int i = 0; i < 2; i++) {
+ Vector3 cap_pos = p_transform_b.origin + ((i == 0) ? cap_axis : -cap_axis);
+
+ for (int e = 0; e < 12; e++) {
+ const Vector3 &edge_start = vertices_A[edges_start_A[e]];
+ const Vector3 &edge_end = vertices_A[edges_end_A[e]];
+
+ Vector3 edge_dir = (edge_end - edge_start);
+ edge_dir.normalize();
+
+ real_t edge_dot = edge_dir.dot(cyl_axis);
+ if (Math::is_zero_approx(edge_dot)) {
+ // Edge is perpendicular to cylinder axis.
+ continue;
+ }
+
+ // Calculate intersection between edge and circle plane.
+ Vector3 edge_diff = cap_pos - edge_start;
+ real_t diff_dot = edge_diff.dot(cyl_axis);
+ Vector3 intersection = edge_start + edge_dir * diff_dot / edge_dot;
+
+ // Calculate tangent that touches intersection.
+ Vector3 tangent = (cap_pos - intersection).cross(cyl_axis);
+
+ // Axis is orthogonal both to tangent and edge direction.
+ Vector3 axis = tangent.cross(edge_dir);
+
+ if (!separator.test_axis(axis.normalized())) {
+ return;
+ }
+ }
+ }
+
+ separator.generate_contacts();
}
template <bool withMargin>
@@ -1111,6 +1622,19 @@ static void _collision_capsule_capsule(const Shape3DSW *p_a, const Transform &p_
template <bool withMargin>
static void _collision_capsule_cylinder(const Shape3DSW *p_a, const Transform &p_transform_a, const Shape3DSW *p_b, const Transform &p_transform_b, _CollectorCallback *p_collector, real_t p_margin_a, real_t p_margin_b) {
+ const CapsuleShape3DSW *capsule_A = static_cast<const CapsuleShape3DSW *>(p_a);
+ const CylinderShape3DSW *cylinder_B = static_cast<const CylinderShape3DSW *>(p_b);
+
+ SeparatorAxisTest<CapsuleShape3DSW, CylinderShape3DSW, withMargin> separator(capsule_A, p_transform_a, cylinder_B, p_transform_b, p_collector, p_margin_a, p_margin_b);
+
+ CollisionSolver3DSW::CallbackResult callback = SeparatorAxisTest<CapsuleShape3DSW, CylinderShape3DSW, withMargin>::test_contact_points;
+
+ // Fallback to generic algorithm to find the best separating axis.
+ if (!fallback_collision_solver(p_a, p_transform_a, p_b, p_transform_b, callback, &separator)) {
+ return;
+ }
+
+ separator.generate_contacts();
}
template <bool withMargin>
@@ -1236,14 +1760,165 @@ static void _collision_capsule_face(const Shape3DSW *p_a, const Transform &p_tra
template <bool withMargin>
static void _collision_cylinder_cylinder(const Shape3DSW *p_a, const Transform &p_transform_a, const Shape3DSW *p_b, const Transform &p_transform_b, _CollectorCallback *p_collector, real_t p_margin_a, real_t p_margin_b) {
+ const CylinderShape3DSW *cylinder_A = static_cast<const CylinderShape3DSW *>(p_a);
+ const CylinderShape3DSW *cylinder_B = static_cast<const CylinderShape3DSW *>(p_b);
+
+ SeparatorAxisTest<CylinderShape3DSW, CylinderShape3DSW, withMargin> separator(cylinder_A, p_transform_a, cylinder_B, p_transform_b, p_collector, p_margin_a, p_margin_b);
+
+ Vector3 cylinder_A_axis = p_transform_a.basis.get_axis(1);
+ Vector3 cylinder_B_axis = p_transform_b.basis.get_axis(1);
+
+ if (!separator.test_previous_axis()) {
+ return;
+ }
+
+ // Cylinder A end caps.
+ if (!separator.test_axis(cylinder_A_axis.normalized())) {
+ return;
+ }
+
+ // Cylinder B end caps.
+ if (!separator.test_axis(cylinder_A_axis.normalized())) {
+ return;
+ }
+
+ Vector3 cylinder_diff = p_transform_b.origin - p_transform_a.origin;
+
+ // Cylinder A lateral surface.
+ if (!separator.test_axis(cylinder_A_axis.cross(cylinder_diff).cross(cylinder_A_axis).normalized())) {
+ return;
+ }
+
+ // Cylinder B lateral surface.
+ if (!separator.test_axis(cylinder_B_axis.cross(cylinder_diff).cross(cylinder_B_axis).normalized())) {
+ return;
+ }
+
+ real_t proj = cylinder_A_axis.cross(cylinder_B_axis).cross(cylinder_B_axis).dot(cylinder_A_axis);
+ if (Math::is_zero_approx(proj)) {
+ // Parallel cylinders, handle with specific axes only.
+ // Note: GJKEPA with no margin can lead to degenerate cases in this situation.
+ separator.generate_contacts();
+ return;
+ }
+
+ CollisionSolver3DSW::CallbackResult callback = SeparatorAxisTest<CylinderShape3DSW, CylinderShape3DSW, withMargin>::test_contact_points;
+
+ // Fallback to generic algorithm to find the best separating axis.
+ if (!fallback_collision_solver(p_a, p_transform_a, p_b, p_transform_b, callback, &separator)) {
+ return;
+ }
+
+ separator.generate_contacts();
}
template <bool withMargin>
static void _collision_cylinder_convex_polygon(const Shape3DSW *p_a, const Transform &p_transform_a, const Shape3DSW *p_b, const Transform &p_transform_b, _CollectorCallback *p_collector, real_t p_margin_a, real_t p_margin_b) {
+ const CylinderShape3DSW *cylinder_A = static_cast<const CylinderShape3DSW *>(p_a);
+ const ConvexPolygonShape3DSW *convex_polygon_B = static_cast<const ConvexPolygonShape3DSW *>(p_b);
+
+ SeparatorAxisTest<CylinderShape3DSW, ConvexPolygonShape3DSW, withMargin> separator(cylinder_A, p_transform_a, convex_polygon_B, p_transform_b, p_collector, p_margin_a, p_margin_b);
+
+ CollisionSolver3DSW::CallbackResult callback = SeparatorAxisTest<CylinderShape3DSW, ConvexPolygonShape3DSW, withMargin>::test_contact_points;
+
+ // Fallback to generic algorithm to find the best separating axis.
+ if (!fallback_collision_solver(p_a, p_transform_a, p_b, p_transform_b, callback, &separator)) {
+ return;
+ }
+
+ separator.generate_contacts();
}
template <bool withMargin>
static void _collision_cylinder_face(const Shape3DSW *p_a, const Transform &p_transform_a, const Shape3DSW *p_b, const Transform &p_transform_b, _CollectorCallback *p_collector, real_t p_margin_a, real_t p_margin_b) {
+ const CylinderShape3DSW *cylinder_A = static_cast<const CylinderShape3DSW *>(p_a);
+ const FaceShape3DSW *face_B = static_cast<const FaceShape3DSW *>(p_b);
+
+ SeparatorAxisTest<CylinderShape3DSW, FaceShape3DSW, withMargin> separator(cylinder_A, p_transform_a, face_B, p_transform_b, p_collector, p_margin_a, p_margin_b);
+
+ if (!separator.test_previous_axis()) {
+ return;
+ }
+
+ Vector3 vertex[3] = {
+ p_transform_b.xform(face_B->vertex[0]),
+ p_transform_b.xform(face_B->vertex[1]),
+ p_transform_b.xform(face_B->vertex[2]),
+ };
+
+ // Face B normal.
+ if (!separator.test_axis((vertex[0] - vertex[2]).cross(vertex[0] - vertex[1]).normalized())) {
+ return;
+ }
+
+ Vector3 cyl_axis = p_transform_a.basis.get_axis(1).normalized();
+
+ // Cylinder end caps.
+ {
+ if (!separator.test_axis(cyl_axis)) {
+ return;
+ }
+ }
+
+ // Edges of B, cylinder lateral surface.
+ for (int i = 0; i < 3; i++) {
+ Vector3 edge_axis = vertex[i] - vertex[(i + 1) % 3];
+ Vector3 axis = edge_axis.cross(cyl_axis);
+ if (Math::is_zero_approx(axis.length_squared())) {
+ continue;
+ }
+
+ if (!separator.test_axis(axis.normalized())) {
+ return;
+ }
+ }
+
+ // Points of B, cylinder lateral surface.
+ for (int i = 0; i < 3; i++) {
+ const Vector3 &point = vertex[i];
+ Vector3 axis = Plane(cyl_axis, 0).project(point).normalized();
+
+ if (!separator.test_axis(axis)) {
+ return;
+ }
+ }
+
+ // Edges of B, cylinder end caps rim.
+ Vector3 cap_axis = cyl_axis * (cylinder_A->get_height() * 0.5);
+
+ for (int i = 0; i < 2; i++) {
+ Vector3 cap_pos = p_transform_a.origin + ((i == 0) ? cap_axis : -cap_axis);
+
+ for (int j = 0; j < 3; j++) {
+ const Vector3 &edge_start = vertex[j];
+ const Vector3 &edge_end = vertex[(j + 1) % 3];
+ Vector3 edge_dir = edge_end - edge_start;
+ edge_dir.normalize();
+
+ real_t edge_dot = edge_dir.dot(cyl_axis);
+ if (Math::is_zero_approx(edge_dot)) {
+ // Edge is perpendicular to cylinder axis.
+ continue;
+ }
+
+ // Calculate intersection between edge and circle plane.
+ Vector3 edge_diff = cap_pos - edge_start;
+ real_t diff_dot = edge_diff.dot(cyl_axis);
+ Vector3 intersection = edge_start + edge_dir * diff_dot / edge_dot;
+
+ // Calculate tangent that touches intersection.
+ Vector3 tangent = (cap_pos - intersection).cross(cyl_axis);
+
+ // Axis is orthogonal both to tangent and edge direction.
+ Vector3 axis = tangent.cross(edge_dir);
+
+ if (!separator.test_axis(axis.normalized())) {
+ return;
+ }
+ }
+ }
+
+ separator.generate_contacts();
}
template <bool withMargin>
diff --git a/servers/physics_3d/collision_solver_3d_sw.cpp b/servers/physics_3d/collision_solver_3d_sw.cpp
index 1150696b84..fd9ea00d92 100644
--- a/servers/physics_3d/collision_solver_3d_sw.cpp
+++ b/servers/physics_3d/collision_solver_3d_sw.cpp
@@ -46,8 +46,24 @@ bool CollisionSolver3DSW::solve_static_plane(const Shape3DSW *p_shape_A, const T
static const int max_supports = 16;
Vector3 supports[max_supports];
int support_count;
-
- p_shape_B->get_supports(p_transform_B.basis.xform_inv(-p.normal).normalized(), max_supports, supports, support_count);
+ Shape3DSW::FeatureType support_type;
+ p_shape_B->get_supports(p_transform_B.basis.xform_inv(-p.normal).normalized(), max_supports, supports, support_count, support_type);
+
+ if (support_type == Shape3DSW::FEATURE_CIRCLE) {
+ ERR_FAIL_COND_V(support_count != 3, false);
+
+ Vector3 circle_pos = supports[0];
+ Vector3 circle_axis_1 = supports[1] - circle_pos;
+ Vector3 circle_axis_2 = supports[2] - circle_pos;
+
+ // Use 3 equidistant points on the circle.
+ for (int i = 0; i < 3; ++i) {
+ Vector3 vertex_pos = circle_pos;
+ vertex_pos += circle_axis_1 * Math::cos(2.0 * Math_PI * i / 3.0);
+ vertex_pos += circle_axis_2 * Math::sin(2.0 * Math_PI * i / 3.0);
+ supports[i] = vertex_pos;
+ }
+ }
bool found = false;
@@ -265,8 +281,25 @@ bool CollisionSolver3DSW::solve_distance_plane(const Shape3DSW *p_shape_A, const
static const int max_supports = 16;
Vector3 supports[max_supports];
int support_count;
+ Shape3DSW::FeatureType support_type;
+
+ p_shape_B->get_supports(p_transform_B.basis.xform_inv(-p.normal).normalized(), max_supports, supports, support_count, support_type);
- p_shape_B->get_supports(p_transform_B.basis.xform_inv(-p.normal).normalized(), max_supports, supports, support_count);
+ if (support_type == Shape3DSW::FEATURE_CIRCLE) {
+ ERR_FAIL_COND_V(support_count != 3, false);
+
+ Vector3 circle_pos = supports[0];
+ Vector3 circle_axis_1 = supports[1] - circle_pos;
+ Vector3 circle_axis_2 = supports[2] - circle_pos;
+
+ // Use 3 equidistant points on the circle.
+ for (int i = 0; i < 3; ++i) {
+ Vector3 vertex_pos = circle_pos;
+ vertex_pos += circle_axis_1 * Math::cos(2.0 * Math_PI * i / 3.0);
+ vertex_pos += circle_axis_2 * Math::sin(2.0 * Math_PI * i / 3.0);
+ supports[i] = vertex_pos;
+ }
+ }
bool collided = false;
Vector3 closest;
diff --git a/servers/physics_3d/gjk_epa.cpp b/servers/physics_3d/gjk_epa.cpp
index dafd2feb8b..aa7c11eec5 100644
--- a/servers/physics_3d/gjk_epa.cpp
+++ b/servers/physics_3d/gjk_epa.cpp
@@ -64,7 +64,7 @@ GJK-EPA collision solver by Nathanael Presson, 2008
/* GJK */
#define GJK_MAX_ITERATIONS 128
-#define GJK_ACCURARY ((real_t)0.0001)
+#define GJK_ACCURACY ((real_t)0.0001)
#define GJK_MIN_DISTANCE ((real_t)0.0001)
#define GJK_DUPLICATED_EPS ((real_t)0.0001)
#define GJK_SIMPLEX2_EPS ((real_t)0.0)
@@ -72,10 +72,13 @@ GJK-EPA collision solver by Nathanael Presson, 2008
#define GJK_SIMPLEX4_EPS ((real_t)0.0)
/* EPA */
-#define EPA_MAX_VERTICES 64
+#define EPA_MAX_VERTICES 128
#define EPA_MAX_FACES (EPA_MAX_VERTICES*2)
#define EPA_MAX_ITERATIONS 255
-#define EPA_ACCURACY ((real_t)0.0001)
+// -- GODOT start --
+//#define EPA_ACCURACY ((real_t)0.0001)
+#define EPA_ACCURACY ((real_t)0.00001)
+// -- GODOT end --
#define EPA_FALLBACK (10*EPA_ACCURACY)
#define EPA_PLANE_EPS ((real_t)0.00001)
#define EPA_INSIDE_EPS ((real_t)0.01)
@@ -237,7 +240,7 @@ struct GJK
/* Check for termination */
const real_t omega=vec3_dot(m_ray,w)/rl;
alpha=MAX(omega,alpha);
- if(((rl-alpha)-(GJK_ACCURARY*rl))<=0)
+ if(((rl-alpha)-(GJK_ACCURACY*rl))<=0)
{/* Return old simplex */
removevertice(m_simplices[m_current]);
break;
@@ -466,7 +469,7 @@ struct GJK
if(ng&&(Math::abs(vl)>GJK_SIMPLEX4_EPS))
{
real_t mindist=-1;
- real_t subw[3];
+ real_t subw[3] = {0.f, 0.f, 0.f};
U subm=0;
for(U i=0;i<3;++i)
{
@@ -512,7 +515,6 @@ struct GJK
{
Vector3 n;
real_t d;
- real_t p;
sSV* c[3];
sFace* f[3];
sFace* l[2];
@@ -661,8 +663,7 @@ struct GJK
remove(m_hull,best);
append(m_stock,best);
best=findbest();
- if(best->p>=outer.p) { outer=*best;
-}
+ outer=*best;
} else { m_status=eStatus::InvalidHull;break; }
} else { m_status=eStatus::AccuraryReached;break; }
} else { m_status=eStatus::OutOfVertices;break; }
@@ -688,24 +689,54 @@ struct GJK
}
}
/* Fallback */
- m_status = eStatus::FallBack;
- m_normal = -guess;
- const real_t nl=m_normal.length();
- if(nl>0) {
- m_normal = m_normal/nl;
+ m_status = eStatus::FallBack;
+ m_normal = -guess;
+ const real_t nl = m_normal.length();
+ if (nl > 0) {
+ m_normal = m_normal/nl;
} else {
- m_normal = Vector3(1,0,0);
-}
+ m_normal = Vector3(1,0,0);
+ }
m_depth = 0;
m_result.rank=1;
m_result.c[0]=simplex.c[0];
m_result.p[0]=1;
return(m_status);
}
+
+ bool getedgedist(sFace* face, sSV* a, sSV* b, real_t& dist)
+ {
+ const Vector3 ba = b->w - a->w;
+ const Vector3 n_ab = vec3_cross(ba, face->n); // Outward facing edge normal direction, on triangle plane
+ const real_t a_dot_nab = vec3_dot(a->w, n_ab); // Only care about the sign to determine inside/outside, so not normalization required
+
+ if (a_dot_nab < 0) {
+ // Outside of edge a->b
+ const real_t ba_l2 = ba.length_squared();
+ const real_t a_dot_ba = vec3_dot(a->w, ba);
+ const real_t b_dot_ba = vec3_dot(b->w, ba);
+
+ if (a_dot_ba > 0) {
+ // Pick distance vertex a
+ dist = a->w.length();
+ } else if (b_dot_ba < 0) {
+ // Pick distance vertex b
+ dist = b->w.length();
+ } else {
+ // Pick distance to edge a->b
+ const real_t a_dot_b = vec3_dot(a->w, b->w);
+ dist = Math::sqrt(MAX((a->w.length_squared() * b->w.length_squared() - a_dot_b * a_dot_b) / ba_l2, 0.0));
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
sFace* newface(sSV* a,sSV* b,sSV* c,bool forced)
{
- if(m_stock.root)
- {
+ if (m_stock.root) {
sFace* face=m_stock.root;
remove(m_stock,face);
append(m_hull,face);
@@ -716,23 +747,23 @@ struct GJK
face->n = vec3_cross(b->w-a->w,c->w-a->w);
const real_t l=face->n.length();
const bool v=l>EPA_ACCURACY;
- face->p = MIN(MIN(
- vec3_dot(a->w,vec3_cross(face->n,a->w-b->w)),
- vec3_dot(b->w,vec3_cross(face->n,b->w-c->w))),
- vec3_dot(c->w,vec3_cross(face->n,c->w-a->w))) /
- (v?l:1);
- face->p = face->p>=-EPA_INSIDE_EPS?0:face->p;
- if(v)
- {
- face->d = vec3_dot(a->w,face->n)/l;
+ if (v) {
+ if (!(getedgedist(face, a, b, face->d) ||
+ getedgedist(face, b, c, face->d) ||
+ getedgedist(face, c, a, face->d))) {
+ // Origin projects to the interior of the triangle
+ // Use distance to triangle plane
+ face->d = vec3_dot(a->w, face->n) / l;
+ }
face->n /= l;
- if(forced||(face->d>=-EPA_PLANE_EPS))
- {
+ if (forced||(face->d>=-EPA_PLANE_EPS)) {
return(face);
- } else { m_status=eStatus::NonConvex;
-}
- } else { m_status=eStatus::Degenerated;
-}
+ } else {
+ m_status=eStatus::NonConvex;
+ }
+ } else {
+ m_status=eStatus::Degenerated;
+ }
remove(m_hull,face);
append(m_stock,face);
return(nullptr);
@@ -747,15 +778,13 @@ struct GJK
{
sFace* minf=m_hull.root;
real_t mind=minf->d*minf->d;
- real_t maxp=minf->p;
for(sFace* f=minf->l[1];f;f=f->l[1])
{
const real_t sqd=f->d*f->d;
- if((f->p>=maxp)&&(sqd<mind))
+ if(sqd<mind)
{
minf=f;
mind=sqd;
- maxp=f->p;
}
}
return(minf);
diff --git a/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp b/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp
index 7b10257157..9c4493f4a2 100644
--- a/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp
+++ b/servers/physics_3d/joints/cone_twist_joint_3d_sw.cpp
@@ -92,9 +92,9 @@ ConeTwistJoint3DSW::ConeTwistJoint3DSW(Body3DSW *rbA, Body3DSW *rbB, const Trans
m_rbAFrame = rbAFrame;
m_rbBFrame = rbBFrame;
- m_swingSpan1 = Math_PI / 4.0;
- m_swingSpan2 = Math_PI / 4.0;
- m_twistSpan = Math_PI * 2;
+ m_swingSpan1 = Math_TAU / 8.0;
+ m_swingSpan2 = Math_TAU / 8.0;
+ m_twistSpan = Math_TAU;
m_biasFactor = 0.3f;
m_relaxationFactor = 1.0f;
diff --git a/servers/physics_3d/joints/cone_twist_joint_3d_sw.h b/servers/physics_3d/joints/cone_twist_joint_3d_sw.h
index c38edc5737..4e4d4e7f0c 100644
--- a/servers/physics_3d/joints/cone_twist_joint_3d_sw.h
+++ b/servers/physics_3d/joints/cone_twist_joint_3d_sw.h
@@ -102,7 +102,7 @@ public:
bool m_solveSwingLimit;
public:
- virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_CONE_TWIST; }
+ virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_TYPE_CONE_TWIST; }
virtual bool setup(real_t p_timestep);
virtual void solve(real_t p_timestep);
diff --git a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h
index 2ae6fe85fa..d61a033231 100644
--- a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h
+++ b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.h
@@ -234,7 +234,7 @@ protected:
public:
Generic6DOFJoint3DSW(Body3DSW *rbA, Body3DSW *rbB, const Transform &frameInA, const Transform &frameInB, bool useLinearReferenceFrameA);
- virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_6DOF; }
+ virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_TYPE_6DOF; }
virtual bool setup(real_t p_timestep);
virtual void solve(real_t p_timestep);
diff --git a/servers/physics_3d/joints/hinge_joint_3d_sw.h b/servers/physics_3d/joints/hinge_joint_3d_sw.h
index 028a8b8c72..b6117aa0bc 100644
--- a/servers/physics_3d/joints/hinge_joint_3d_sw.h
+++ b/servers/physics_3d/joints/hinge_joint_3d_sw.h
@@ -96,7 +96,7 @@ class HingeJoint3DSW : public Joint3DSW {
real_t m_appliedImpulse;
public:
- virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_HINGE; }
+ virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_TYPE_HINGE; }
virtual bool setup(real_t p_step);
virtual void solve(real_t p_step);
diff --git a/servers/physics_3d/joints/pin_joint_3d_sw.h b/servers/physics_3d/joints/pin_joint_3d_sw.h
index e28fbec6cd..1875983527 100644
--- a/servers/physics_3d/joints/pin_joint_3d_sw.h
+++ b/servers/physics_3d/joints/pin_joint_3d_sw.h
@@ -74,7 +74,7 @@ class PinJoint3DSW : public Joint3DSW {
Vector3 m_pivotInB;
public:
- virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_PIN; }
+ virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_TYPE_PIN; }
virtual bool setup(real_t p_step);
virtual void solve(real_t p_step);
diff --git a/servers/physics_3d/joints/slider_joint_3d_sw.h b/servers/physics_3d/joints/slider_joint_3d_sw.h
index 196e60d19d..f52f6ace27 100644
--- a/servers/physics_3d/joints/slider_joint_3d_sw.h
+++ b/servers/physics_3d/joints/slider_joint_3d_sw.h
@@ -243,7 +243,7 @@ public:
bool setup(real_t p_step);
void solve(real_t p_step);
- virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_SLIDER; }
+ virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_TYPE_SLIDER; }
};
#endif // SLIDER_JOINT_SW_H
diff --git a/servers/physics_3d/joints_3d_sw.h b/servers/physics_3d/joints_3d_sw.h
index cad05b6702..1fe573c69e 100644
--- a/servers/physics_3d/joints_3d_sw.h
+++ b/servers/physics_3d/joints_3d_sw.h
@@ -36,7 +36,16 @@
class Joint3DSW : public Constraint3DSW {
public:
- virtual PhysicsServer3D::JointType get_type() const = 0;
+ virtual bool setup(real_t p_step) { return false; }
+ virtual void solve(real_t p_step) {}
+
+ void copy_settings_from(Joint3DSW *p_joint) {
+ set_self(p_joint->get_self());
+ set_priority(p_joint->get_priority());
+ disable_collisions_between_bodies(p_joint->is_disabled_collisions_between_bodies());
+ }
+
+ virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_TYPE_MAX; }
_FORCE_INLINE_ Joint3DSW(Body3DSW **p_body_ptr = nullptr, int p_body_count = 0) :
Constraint3DSW(p_body_ptr, p_body_count) {
}
diff --git a/servers/physics_3d/physics_server_3d_sw.cpp b/servers/physics_3d/physics_server_3d_sw.cpp
index 274de8411c..735e9094d2 100644
--- a/servers/physics_3d/physics_server_3d_sw.cpp
+++ b/servers/physics_3d/physics_server_3d_sw.cpp
@@ -43,47 +43,63 @@
#define FLUSH_QUERY_CHECK(m_object) \
ERR_FAIL_COND_MSG(m_object->get_space() && flushing_queries, "Can't change this state while flushing queries. Use call_deferred() or set_deferred() to change monitoring state instead.");
-RID PhysicsServer3DSW::shape_create(ShapeType p_shape) {
- Shape3DSW *shape = nullptr;
- switch (p_shape) {
- case SHAPE_PLANE: {
- shape = memnew(PlaneShape3DSW);
- } break;
- case SHAPE_RAY: {
- shape = memnew(RayShape3DSW);
- } break;
- case SHAPE_SPHERE: {
- shape = memnew(SphereShape3DSW);
- } break;
- case SHAPE_BOX: {
- shape = memnew(BoxShape3DSW);
- } break;
- case SHAPE_CAPSULE: {
- shape = memnew(CapsuleShape3DSW);
- } break;
- case SHAPE_CYLINDER: {
- ERR_FAIL_V_MSG(RID(), "CylinderShape3D is not supported in GodotPhysics3D. Please switch to Bullet in the Project Settings.");
- } break;
- case SHAPE_CONVEX_POLYGON: {
- shape = memnew(ConvexPolygonShape3DSW);
- } break;
- case SHAPE_CONCAVE_POLYGON: {
- shape = memnew(ConcavePolygonShape3DSW);
- } break;
- case SHAPE_HEIGHTMAP: {
- shape = memnew(HeightMapShape3DSW);
- } break;
- case SHAPE_CUSTOM: {
- ERR_FAIL_V(RID());
-
- } break;
- }
-
- RID id = shape_owner.make_rid(shape);
- shape->set_self(id);
-
- return id;
-};
+RID PhysicsServer3DSW::plane_shape_create() {
+ Shape3DSW *shape = memnew(PlaneShape3DSW);
+ RID rid = shape_owner.make_rid(shape);
+ shape->set_self(rid);
+ return rid;
+}
+RID PhysicsServer3DSW::ray_shape_create() {
+ Shape3DSW *shape = memnew(RayShape3DSW);
+ RID rid = shape_owner.make_rid(shape);
+ shape->set_self(rid);
+ return rid;
+}
+RID PhysicsServer3DSW::sphere_shape_create() {
+ Shape3DSW *shape = memnew(SphereShape3DSW);
+ RID rid = shape_owner.make_rid(shape);
+ shape->set_self(rid);
+ return rid;
+}
+RID PhysicsServer3DSW::box_shape_create() {
+ Shape3DSW *shape = memnew(BoxShape3DSW);
+ RID rid = shape_owner.make_rid(shape);
+ shape->set_self(rid);
+ return rid;
+}
+RID PhysicsServer3DSW::capsule_shape_create() {
+ Shape3DSW *shape = memnew(CapsuleShape3DSW);
+ RID rid = shape_owner.make_rid(shape);
+ shape->set_self(rid);
+ return rid;
+}
+RID PhysicsServer3DSW::cylinder_shape_create() {
+ Shape3DSW *shape = memnew(CylinderShape3DSW);
+ RID rid = shape_owner.make_rid(shape);
+ shape->set_self(rid);
+ return rid;
+}
+RID PhysicsServer3DSW::convex_polygon_shape_create() {
+ Shape3DSW *shape = memnew(ConvexPolygonShape3DSW);
+ RID rid = shape_owner.make_rid(shape);
+ shape->set_self(rid);
+ return rid;
+}
+RID PhysicsServer3DSW::concave_polygon_shape_create() {
+ Shape3DSW *shape = memnew(ConcavePolygonShape3DSW);
+ RID rid = shape_owner.make_rid(shape);
+ shape->set_self(rid);
+ return rid;
+}
+RID PhysicsServer3DSW::heightmap_shape_create() {
+ Shape3DSW *shape = memnew(HeightMapShape3DSW);
+ RID rid = shape_owner.make_rid(shape);
+ shape->set_self(rid);
+ return rid;
+}
+RID PhysicsServer3DSW::custom_shape_create() {
+ ERR_FAIL_V(RID());
+}
void PhysicsServer3DSW::shape_set_data(RID p_shape, const Variant &p_data) {
Shape3DSW *shape = shape_owner.getornull(p_shape);
@@ -174,7 +190,7 @@ real_t PhysicsServer3DSW::space_get_param(RID p_space, SpaceParameter p_param) c
PhysicsDirectSpaceState3D *PhysicsServer3DSW::space_get_direct_state(RID p_space) {
Space3DSW *space = space_owner.getornull(p_space);
ERR_FAIL_COND_V(!space, nullptr);
- ERR_FAIL_COND_V_MSG(space->is_locked(), nullptr, "Space state is inaccessible right now, wait for iteration or physics process notification.");
+ ERR_FAIL_COND_V_MSG((using_threads && !doing_sync) || space->is_locked(), nullptr, "Space state is inaccessible right now, wait for iteration or physics process notification.");
return space->get_direct_state();
}
@@ -413,13 +429,6 @@ void PhysicsServer3DSW::area_set_ray_pickable(RID p_area, bool p_enable) {
area->set_ray_pickable(p_enable);
}
-bool PhysicsServer3DSW::area_is_ray_pickable(RID p_area) const {
- Area3DSW *area = area_owner.getornull(p_area);
- ERR_FAIL_COND_V(!area, false);
-
- return area->is_ray_pickable();
-}
-
void PhysicsServer3DSW::area_set_area_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) {
Area3DSW *area = area_owner.getornull(p_area);
ERR_FAIL_COND(!area);
@@ -429,14 +438,8 @@ void PhysicsServer3DSW::area_set_area_monitor_callback(RID p_area, Object *p_rec
/* BODY API */
-RID PhysicsServer3DSW::body_create(BodyMode p_mode, bool p_init_sleeping) {
+RID PhysicsServer3DSW::body_create() {
Body3DSW *body = memnew(Body3DSW);
- if (p_mode != BODY_MODE_RIGID) {
- body->set_mode(p_mode);
- }
- if (p_init_sleeping) {
- body->set_state(BODY_STATE_SLEEPING, p_init_sleeping);
- }
RID rid = body_owner.make_rid(body);
body->set_self(rid);
return rid;
@@ -857,12 +860,6 @@ void PhysicsServer3DSW::body_set_ray_pickable(RID p_body, bool p_enable) {
body->set_ray_pickable(p_enable);
}
-bool PhysicsServer3DSW::body_is_ray_pickable(RID p_body) const {
- Body3DSW *body = body_owner.getornull(p_body);
- ERR_FAIL_COND_V(!body, false);
- return body->is_ray_pickable();
-}
-
bool PhysicsServer3DSW::body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result, bool p_exclude_raycast_shapes) {
Body3DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND_V(!body, false);
@@ -874,7 +871,7 @@ bool PhysicsServer3DSW::body_test_motion(RID p_body, const Transform &p_from, co
return body->get_space()->test_body_motion(body, p_from, p_motion, p_infinite_inertia, body->get_kinematic_margin(), r_result, p_exclude_raycast_shapes);
}
-int PhysicsServer3DSW::body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin) {
+int PhysicsServer3DSW::body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin) {
Body3DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND_V(!body, false);
ERR_FAIL_COND_V(!body->get_space(), false);
@@ -886,6 +883,8 @@ int PhysicsServer3DSW::body_test_ray_separation(RID p_body, const Transform &p_t
}
PhysicsDirectBodyState3D *PhysicsServer3DSW::body_get_direct_state(RID p_body) {
+ ERR_FAIL_COND_V_MSG((using_threads && !doing_sync), nullptr, "Body state is inaccessible right now, wait for iteration or physics process notification.");
+
Body3DSW *body = body_owner.getornull(p_body);
ERR_FAIL_COND_V(!body, nullptr);
ERR_FAIL_COND_V_MSG(body->get_space()->is_locked(), nullptr, "Body state is inaccessible right now, wait for iteration or physics process notification.");
@@ -896,30 +895,52 @@ PhysicsDirectBodyState3D *PhysicsServer3DSW::body_get_direct_state(RID p_body) {
/* JOINT API */
-RID PhysicsServer3DSW::joint_create_pin(RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) {
+RID PhysicsServer3DSW::joint_create() {
+ Joint3DSW *joint = memnew(Joint3DSW);
+ RID rid = joint_owner.make_rid(joint);
+ joint->set_self(rid);
+ return rid;
+}
+
+void PhysicsServer3DSW::joint_clear(RID p_joint) {
+ Joint3DSW *joint = joint_owner.getornull(p_joint);
+ if (joint->get_type() != JOINT_TYPE_MAX) {
+ Joint3DSW *empty_joint = memnew(Joint3DSW);
+ empty_joint->copy_settings_from(joint);
+
+ joint_owner.replace(p_joint, empty_joint);
+ memdelete(joint);
+ }
+}
+
+void PhysicsServer3DSW::joint_make_pin(RID p_joint, RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) {
Body3DSW *body_A = body_owner.getornull(p_body_A);
- ERR_FAIL_COND_V(!body_A, RID());
+ ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
- ERR_FAIL_COND_V(!body_A->get_space(), RID());
+ ERR_FAIL_COND(!body_A->get_space());
p_body_B = body_A->get_space()->get_static_global_body();
}
Body3DSW *body_B = body_owner.getornull(p_body_B);
- ERR_FAIL_COND_V(!body_B, RID());
+ ERR_FAIL_COND(!body_B);
+
+ ERR_FAIL_COND(body_A == body_B);
- ERR_FAIL_COND_V(body_A == body_B, RID());
+ Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(PinJoint3DSW(body_A, p_local_A, body_B, p_local_B));
- RID rid = joint_owner.make_rid(joint);
- joint->set_self(rid);
- return rid;
+
+ joint->copy_settings_from(prev_joint);
+ joint_owner.replace(p_joint, joint);
+ memdelete(prev_joint);
}
void PhysicsServer3DSW::pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
- ERR_FAIL_COND(joint->get_type() != JOINT_PIN);
+ ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_PIN);
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
pin_joint->set_param(p_param, p_value);
}
@@ -927,7 +948,7 @@ void PhysicsServer3DSW::pin_joint_set_param(RID p_joint, PinJointParam p_param,
real_t PhysicsServer3DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
- ERR_FAIL_COND_V(joint->get_type() != JOINT_PIN, 0);
+ ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_PIN, 0);
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
return pin_joint->get_param(p_param);
}
@@ -935,7 +956,7 @@ real_t PhysicsServer3DSW::pin_joint_get_param(RID p_joint, PinJointParam p_param
void PhysicsServer3DSW::pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
- ERR_FAIL_COND(joint->get_type() != JOINT_PIN);
+ ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_PIN);
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
pin_joint->set_pos_a(p_A);
}
@@ -943,7 +964,7 @@ void PhysicsServer3DSW::pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) {
Vector3 PhysicsServer3DSW::pin_joint_get_local_a(RID p_joint) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, Vector3());
- ERR_FAIL_COND_V(joint->get_type() != JOINT_PIN, Vector3());
+ ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_PIN, Vector3());
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
return pin_joint->get_position_a();
}
@@ -951,7 +972,7 @@ Vector3 PhysicsServer3DSW::pin_joint_get_local_a(RID p_joint) const {
void PhysicsServer3DSW::pin_joint_set_local_b(RID p_joint, const Vector3 &p_B) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
- ERR_FAIL_COND(joint->get_type() != JOINT_PIN);
+ ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_PIN);
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
pin_joint->set_pos_b(p_B);
}
@@ -959,55 +980,63 @@ void PhysicsServer3DSW::pin_joint_set_local_b(RID p_joint, const Vector3 &p_B) {
Vector3 PhysicsServer3DSW::pin_joint_get_local_b(RID p_joint) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, Vector3());
- ERR_FAIL_COND_V(joint->get_type() != JOINT_PIN, Vector3());
+ ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_PIN, Vector3());
PinJoint3DSW *pin_joint = static_cast<PinJoint3DSW *>(joint);
return pin_joint->get_position_b();
}
-RID PhysicsServer3DSW::joint_create_hinge(RID p_body_A, const Transform &p_frame_A, RID p_body_B, const Transform &p_frame_B) {
+void PhysicsServer3DSW::joint_make_hinge(RID p_joint, RID p_body_A, const Transform &p_frame_A, RID p_body_B, const Transform &p_frame_B) {
Body3DSW *body_A = body_owner.getornull(p_body_A);
- ERR_FAIL_COND_V(!body_A, RID());
+ ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
- ERR_FAIL_COND_V(!body_A->get_space(), RID());
+ ERR_FAIL_COND(!body_A->get_space());
p_body_B = body_A->get_space()->get_static_global_body();
}
Body3DSW *body_B = body_owner.getornull(p_body_B);
- ERR_FAIL_COND_V(!body_B, RID());
+ ERR_FAIL_COND(!body_B);
+
+ ERR_FAIL_COND(body_A == body_B);
- ERR_FAIL_COND_V(body_A == body_B, RID());
+ Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(HingeJoint3DSW(body_A, body_B, p_frame_A, p_frame_B));
- RID rid = joint_owner.make_rid(joint);
- joint->set_self(rid);
- return rid;
+
+ joint->copy_settings_from(prev_joint);
+ joint_owner.replace(p_joint, joint);
+ memdelete(prev_joint);
}
-RID PhysicsServer3DSW::joint_create_hinge_simple(RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B) {
+void PhysicsServer3DSW::joint_make_hinge_simple(RID p_joint, RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B) {
Body3DSW *body_A = body_owner.getornull(p_body_A);
- ERR_FAIL_COND_V(!body_A, RID());
+ ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
- ERR_FAIL_COND_V(!body_A->get_space(), RID());
+ ERR_FAIL_COND(!body_A->get_space());
p_body_B = body_A->get_space()->get_static_global_body();
}
Body3DSW *body_B = body_owner.getornull(p_body_B);
- ERR_FAIL_COND_V(!body_B, RID());
+ ERR_FAIL_COND(!body_B);
- ERR_FAIL_COND_V(body_A == body_B, RID());
+ ERR_FAIL_COND(body_A == body_B);
+
+ Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(HingeJoint3DSW(body_A, body_B, p_pivot_A, p_pivot_B, p_axis_A, p_axis_B));
- RID rid = joint_owner.make_rid(joint);
- joint->set_self(rid);
- return rid;
+
+ joint->copy_settings_from(prev_joint);
+ joint_owner.replace(p_joint, joint);
+ memdelete(prev_joint);
}
void PhysicsServer3DSW::hinge_joint_set_param(RID p_joint, HingeJointParam p_param, real_t p_value) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
- ERR_FAIL_COND(joint->get_type() != JOINT_HINGE);
+ ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_HINGE);
HingeJoint3DSW *hinge_joint = static_cast<HingeJoint3DSW *>(joint);
hinge_joint->set_param(p_param, p_value);
}
@@ -1015,7 +1044,7 @@ void PhysicsServer3DSW::hinge_joint_set_param(RID p_joint, HingeJointParam p_par
real_t PhysicsServer3DSW::hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
- ERR_FAIL_COND_V(joint->get_type() != JOINT_HINGE, 0);
+ ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_HINGE, 0);
HingeJoint3DSW *hinge_joint = static_cast<HingeJoint3DSW *>(joint);
return hinge_joint->get_param(p_param);
}
@@ -1023,7 +1052,7 @@ real_t PhysicsServer3DSW::hinge_joint_get_param(RID p_joint, HingeJointParam p_p
void PhysicsServer3DSW::hinge_joint_set_flag(RID p_joint, HingeJointFlag p_flag, bool p_value) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
- ERR_FAIL_COND(joint->get_type() != JOINT_HINGE);
+ ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_HINGE);
HingeJoint3DSW *hinge_joint = static_cast<HingeJoint3DSW *>(joint);
hinge_joint->set_flag(p_flag, p_value);
}
@@ -1031,7 +1060,7 @@ void PhysicsServer3DSW::hinge_joint_set_flag(RID p_joint, HingeJointFlag p_flag,
bool PhysicsServer3DSW::hinge_joint_get_flag(RID p_joint, HingeJointFlag p_flag) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, false);
- ERR_FAIL_COND_V(joint->get_type() != JOINT_HINGE, false);
+ ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_HINGE, false);
HingeJoint3DSW *hinge_joint = static_cast<HingeJoint3DSW *>(joint);
return hinge_joint->get_flag(p_flag);
}
@@ -1077,34 +1106,38 @@ bool PhysicsServer3DSW::joint_is_disabled_collisions_between_bodies(RID p_joint)
PhysicsServer3DSW::JointType PhysicsServer3DSW::joint_get_type(RID p_joint) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
- ERR_FAIL_COND_V(!joint, JOINT_PIN);
+ ERR_FAIL_COND_V(!joint, JOINT_TYPE_PIN);
return joint->get_type();
}
-RID PhysicsServer3DSW::joint_create_slider(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) {
+void PhysicsServer3DSW::joint_make_slider(RID p_joint, RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) {
Body3DSW *body_A = body_owner.getornull(p_body_A);
- ERR_FAIL_COND_V(!body_A, RID());
+ ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
- ERR_FAIL_COND_V(!body_A->get_space(), RID());
+ ERR_FAIL_COND(!body_A->get_space());
p_body_B = body_A->get_space()->get_static_global_body();
}
Body3DSW *body_B = body_owner.getornull(p_body_B);
- ERR_FAIL_COND_V(!body_B, RID());
+ ERR_FAIL_COND(!body_B);
- ERR_FAIL_COND_V(body_A == body_B, RID());
+ ERR_FAIL_COND(body_A == body_B);
+
+ Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(SliderJoint3DSW(body_A, body_B, p_local_frame_A, p_local_frame_B));
- RID rid = joint_owner.make_rid(joint);
- joint->set_self(rid);
- return rid;
+
+ joint->copy_settings_from(prev_joint);
+ joint_owner.replace(p_joint, joint);
+ memdelete(prev_joint);
}
void PhysicsServer3DSW::slider_joint_set_param(RID p_joint, SliderJointParam p_param, real_t p_value) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
- ERR_FAIL_COND(joint->get_type() != JOINT_SLIDER);
+ ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_SLIDER);
SliderJoint3DSW *slider_joint = static_cast<SliderJoint3DSW *>(joint);
slider_joint->set_param(p_param, p_value);
}
@@ -1112,35 +1145,39 @@ void PhysicsServer3DSW::slider_joint_set_param(RID p_joint, SliderJointParam p_p
real_t PhysicsServer3DSW::slider_joint_get_param(RID p_joint, SliderJointParam p_param) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
- ERR_FAIL_COND_V(joint->get_type() != JOINT_CONE_TWIST, 0);
+ ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_CONE_TWIST, 0);
SliderJoint3DSW *slider_joint = static_cast<SliderJoint3DSW *>(joint);
return slider_joint->get_param(p_param);
}
-RID PhysicsServer3DSW::joint_create_cone_twist(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) {
+void PhysicsServer3DSW::joint_make_cone_twist(RID p_joint, RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) {
Body3DSW *body_A = body_owner.getornull(p_body_A);
- ERR_FAIL_COND_V(!body_A, RID());
+ ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
- ERR_FAIL_COND_V(!body_A->get_space(), RID());
+ ERR_FAIL_COND(!body_A->get_space());
p_body_B = body_A->get_space()->get_static_global_body();
}
Body3DSW *body_B = body_owner.getornull(p_body_B);
- ERR_FAIL_COND_V(!body_B, RID());
+ ERR_FAIL_COND(!body_B);
+
+ ERR_FAIL_COND(body_A == body_B);
- ERR_FAIL_COND_V(body_A == body_B, RID());
+ Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(ConeTwistJoint3DSW(body_A, body_B, p_local_frame_A, p_local_frame_B));
- RID rid = joint_owner.make_rid(joint);
- joint->set_self(rid);
- return rid;
+
+ joint->copy_settings_from(prev_joint);
+ joint_owner.replace(p_joint, joint);
+ memdelete(prev_joint);
}
void PhysicsServer3DSW::cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, real_t p_value) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
- ERR_FAIL_COND(joint->get_type() != JOINT_CONE_TWIST);
+ ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_CONE_TWIST);
ConeTwistJoint3DSW *cone_twist_joint = static_cast<ConeTwistJoint3DSW *>(joint);
cone_twist_joint->set_param(p_param, p_value);
}
@@ -1148,43 +1185,47 @@ void PhysicsServer3DSW::cone_twist_joint_set_param(RID p_joint, ConeTwistJointPa
real_t PhysicsServer3DSW::cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
- ERR_FAIL_COND_V(joint->get_type() != JOINT_CONE_TWIST, 0);
+ ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_CONE_TWIST, 0);
ConeTwistJoint3DSW *cone_twist_joint = static_cast<ConeTwistJoint3DSW *>(joint);
return cone_twist_joint->get_param(p_param);
}
-RID PhysicsServer3DSW::joint_create_generic_6dof(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) {
+void PhysicsServer3DSW::joint_make_generic_6dof(RID p_joint, RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) {
Body3DSW *body_A = body_owner.getornull(p_body_A);
- ERR_FAIL_COND_V(!body_A, RID());
+ ERR_FAIL_COND(!body_A);
if (!p_body_B.is_valid()) {
- ERR_FAIL_COND_V(!body_A->get_space(), RID());
+ ERR_FAIL_COND(!body_A->get_space());
p_body_B = body_A->get_space()->get_static_global_body();
}
Body3DSW *body_B = body_owner.getornull(p_body_B);
- ERR_FAIL_COND_V(!body_B, RID());
+ ERR_FAIL_COND(!body_B);
+
+ ERR_FAIL_COND(body_A == body_B);
- ERR_FAIL_COND_V(body_A == body_B, RID());
+ Joint3DSW *prev_joint = joint_owner.getornull(p_joint);
+ ERR_FAIL_COND(prev_joint == nullptr);
Joint3DSW *joint = memnew(Generic6DOFJoint3DSW(body_A, body_B, p_local_frame_A, p_local_frame_B, true));
- RID rid = joint_owner.make_rid(joint);
- joint->set_self(rid);
- return rid;
+
+ joint->copy_settings_from(prev_joint);
+ joint_owner.replace(p_joint, joint);
+ memdelete(prev_joint);
}
void PhysicsServer3DSW::generic_6dof_joint_set_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param, real_t p_value) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
- ERR_FAIL_COND(joint->get_type() != JOINT_6DOF);
+ ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_6DOF);
Generic6DOFJoint3DSW *generic_6dof_joint = static_cast<Generic6DOFJoint3DSW *>(joint);
generic_6dof_joint->set_param(p_axis, p_param, p_value);
}
-real_t PhysicsServer3DSW::generic_6dof_joint_get_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param) {
+real_t PhysicsServer3DSW::generic_6dof_joint_get_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, 0);
- ERR_FAIL_COND_V(joint->get_type() != JOINT_6DOF, 0);
+ ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_6DOF, 0);
Generic6DOFJoint3DSW *generic_6dof_joint = static_cast<Generic6DOFJoint3DSW *>(joint);
return generic_6dof_joint->get_param(p_axis, p_param);
}
@@ -1192,15 +1233,15 @@ real_t PhysicsServer3DSW::generic_6dof_joint_get_param(RID p_joint, Vector3::Axi
void PhysicsServer3DSW::generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag, bool p_enable) {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND(!joint);
- ERR_FAIL_COND(joint->get_type() != JOINT_6DOF);
+ ERR_FAIL_COND(joint->get_type() != JOINT_TYPE_6DOF);
Generic6DOFJoint3DSW *generic_6dof_joint = static_cast<Generic6DOFJoint3DSW *>(joint);
generic_6dof_joint->set_flag(p_axis, p_flag, p_enable);
}
-bool PhysicsServer3DSW::generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag) {
+bool PhysicsServer3DSW::generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag) const {
Joint3DSW *joint = joint_owner.getornull(p_joint);
ERR_FAIL_COND_V(!joint, false);
- ERR_FAIL_COND_V(joint->get_type() != JOINT_6DOF, false);
+ ERR_FAIL_COND_V(joint->get_type() != JOINT_TYPE_6DOF, false);
Generic6DOFJoint3DSW *generic_6dof_joint = static_cast<Generic6DOFJoint3DSW *>(joint);
return generic_6dof_joint->get_flag(p_axis, p_flag);
}
@@ -1317,6 +1358,10 @@ void PhysicsServer3DSW::step(real_t p_step) {
#endif
}
+void PhysicsServer3DSW::sync() {
+ doing_sync = true;
+};
+
void PhysicsServer3DSW::flush_queries() {
#ifndef _3D_DISABLED
@@ -1370,6 +1415,10 @@ void PhysicsServer3DSW::flush_queries() {
#endif
};
+void PhysicsServer3DSW::end_sync() {
+ doing_sync = false;
+};
+
void PhysicsServer3DSW::finish() {
memdelete(stepper);
memdelete(direct_state);
@@ -1431,14 +1480,15 @@ void PhysicsServer3DSW::_shape_col_cbk(const Vector3 &p_point_A, const Vector3 &
}
}
-PhysicsServer3DSW *PhysicsServer3DSW::singleton = nullptr;
-PhysicsServer3DSW::PhysicsServer3DSW() {
- singleton = this;
+PhysicsServer3DSW *PhysicsServer3DSW::singletonsw = nullptr;
+PhysicsServer3DSW::PhysicsServer3DSW(bool p_using_threads) {
+ singletonsw = this;
BroadPhase3DSW::create_func = BroadPhaseOctree::_create;
island_count = 0;
active_objects = 0;
collision_pairs = 0;
-
+ using_threads = p_using_threads;
active = true;
flushing_queries = false;
+ doing_sync = false;
};
diff --git a/servers/physics_3d/physics_server_3d_sw.h b/servers/physics_3d/physics_server_3d_sw.h
index 9b6b113677..afda161fa8 100644
--- a/servers/physics_3d/physics_server_3d_sw.h
+++ b/servers/physics_3d/physics_server_3d_sw.h
@@ -50,6 +50,8 @@ class PhysicsServer3DSW : public PhysicsServer3D {
int active_objects;
int collision_pairs;
+ bool using_threads;
+ bool doing_sync;
bool flushing_queries;
Step3DSW *stepper;
@@ -57,20 +59,20 @@ class PhysicsServer3DSW : public PhysicsServer3D {
PhysicsDirectBodyState3DSW *direct_state;
- mutable RID_PtrOwner<Shape3DSW> shape_owner;
- mutable RID_PtrOwner<Space3DSW> space_owner;
- mutable RID_PtrOwner<Area3DSW> area_owner;
- mutable RID_PtrOwner<Body3DSW> body_owner;
- mutable RID_PtrOwner<Joint3DSW> joint_owner;
+ mutable RID_PtrOwner<Shape3DSW, true> shape_owner;
+ mutable RID_PtrOwner<Space3DSW, true> space_owner;
+ mutable RID_PtrOwner<Area3DSW, true> area_owner;
+ mutable RID_PtrOwner<Body3DSW, true> body_owner;
+ mutable RID_PtrOwner<Joint3DSW, true> joint_owner;
//void _clear_query(QuerySW *p_query);
friend class CollisionObject3DSW;
SelfList<CollisionObject3DSW>::List pending_shape_update_list;
void _update_shapes();
-public:
- static PhysicsServer3DSW *singleton;
+ static PhysicsServer3DSW *singletonsw;
+public:
struct CollCbkData {
int max;
int amount;
@@ -79,7 +81,17 @@ public:
static void _shape_col_cbk(const Vector3 &p_point_A, const Vector3 &p_point_B, void *p_userdata);
- virtual RID shape_create(ShapeType p_shape) override;
+ virtual RID plane_shape_create() override;
+ virtual RID ray_shape_create() override;
+ virtual RID sphere_shape_create() override;
+ virtual RID box_shape_create() override;
+ virtual RID capsule_shape_create() override;
+ virtual RID cylinder_shape_create() override;
+ virtual RID convex_polygon_shape_create() override;
+ virtual RID concave_polygon_shape_create() override;
+ virtual RID heightmap_shape_create() override;
+ virtual RID custom_shape_create() override;
+
virtual void shape_set_data(RID p_shape, const Variant &p_data) override;
virtual void shape_set_custom_solver_bias(RID p_shape, real_t p_bias) override;
@@ -140,7 +152,6 @@ public:
virtual Transform area_get_transform(RID p_area) const override;
virtual void area_set_ray_pickable(RID p_area, bool p_enable) override;
- virtual bool area_is_ray_pickable(RID p_area) const override;
virtual void area_set_collision_mask(RID p_area, uint32_t p_mask) override;
virtual void area_set_collision_layer(RID p_area, uint32_t p_layer) override;
@@ -153,7 +164,7 @@ public:
/* BODY API */
// create a body of a given type
- virtual RID body_create(BodyMode p_mode = BODY_MODE_RIGID, bool p_init_sleeping = false) override;
+ virtual RID body_create() override;
virtual void body_set_space(RID p_body, RID p_space) override;
virtual RID body_get_space(RID p_body) const override;
@@ -232,17 +243,16 @@ public:
virtual void body_set_force_integration_callback(RID p_body, Object *p_receiver, const StringName &p_method, const Variant &p_udata = Variant()) override;
virtual void body_set_ray_pickable(RID p_body, bool p_enable) override;
- virtual bool body_is_ray_pickable(RID p_body) const override;
virtual bool body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) override;
- virtual int body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin = 0.001) override;
+ virtual int body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin = 0.001) override;
// this function only works on physics process, errors and returns null otherwise
virtual PhysicsDirectBodyState3D *body_get_direct_state(RID p_body) override;
/* SOFT BODY */
- virtual RID soft_body_create(bool p_init_sleeping = false) override { return RID(); }
+ virtual RID soft_body_create() override { return RID(); }
virtual void soft_body_update_rendering_server(RID p_body, class SoftBodyRenderingServerHandler *p_rendering_server_handler) override {}
@@ -266,49 +276,52 @@ public:
virtual Vector3 soft_body_get_vertex_position(RID p_body, int vertex_index) const override { return Vector3(); }
virtual void soft_body_set_ray_pickable(RID p_body, bool p_enable) override {}
- virtual bool soft_body_is_ray_pickable(RID p_body) const override { return false; }
virtual void soft_body_set_simulation_precision(RID p_body, int p_simulation_precision) override {}
- virtual int soft_body_get_simulation_precision(RID p_body) override { return 0; }
+ virtual int soft_body_get_simulation_precision(RID p_body) const override { return 0; }
virtual void soft_body_set_total_mass(RID p_body, real_t p_total_mass) override {}
- virtual real_t soft_body_get_total_mass(RID p_body) override { return 0.; }
+ virtual real_t soft_body_get_total_mass(RID p_body) const override { return 0.; }
virtual void soft_body_set_linear_stiffness(RID p_body, real_t p_stiffness) override {}
- virtual real_t soft_body_get_linear_stiffness(RID p_body) override { return 0.; }
+ virtual real_t soft_body_get_linear_stiffness(RID p_body) const override { return 0.; }
- virtual void soft_body_set_areaAngular_stiffness(RID p_body, real_t p_stiffness) override {}
- virtual real_t soft_body_get_areaAngular_stiffness(RID p_body) override { return 0.; }
+ virtual void soft_body_set_angular_stiffness(RID p_body, real_t p_stiffness) override {}
+ virtual real_t soft_body_get_angular_stiffness(RID p_body) const override { return 0.; }
virtual void soft_body_set_volume_stiffness(RID p_body, real_t p_stiffness) override {}
- virtual real_t soft_body_get_volume_stiffness(RID p_body) override { return 0.; }
+ virtual real_t soft_body_get_volume_stiffness(RID p_body) const override { return 0.; }
virtual void soft_body_set_pressure_coefficient(RID p_body, real_t p_pressure_coefficient) override {}
- virtual real_t soft_body_get_pressure_coefficient(RID p_body) override { return 0.; }
+ virtual real_t soft_body_get_pressure_coefficient(RID p_body) const override { return 0.; }
virtual void soft_body_set_pose_matching_coefficient(RID p_body, real_t p_pose_matching_coefficient) override {}
- virtual real_t soft_body_get_pose_matching_coefficient(RID p_body) override { return 0.; }
+ virtual real_t soft_body_get_pose_matching_coefficient(RID p_body) const override { return 0.; }
virtual void soft_body_set_damping_coefficient(RID p_body, real_t p_damping_coefficient) override {}
- virtual real_t soft_body_get_damping_coefficient(RID p_body) override { return 0.; }
+ virtual real_t soft_body_get_damping_coefficient(RID p_body) const override { return 0.; }
virtual void soft_body_set_drag_coefficient(RID p_body, real_t p_drag_coefficient) override {}
- virtual real_t soft_body_get_drag_coefficient(RID p_body) override { return 0.; }
+ virtual real_t soft_body_get_drag_coefficient(RID p_body) const override { return 0.; }
virtual void soft_body_set_mesh(RID p_body, const REF &p_mesh) override {}
virtual void soft_body_move_point(RID p_body, int p_point_index, const Vector3 &p_global_position) override {}
- virtual Vector3 soft_body_get_point_global_position(RID p_body, int p_point_index) override { return Vector3(); }
+ virtual Vector3 soft_body_get_point_global_position(RID p_body, int p_point_index) const override { return Vector3(); }
virtual Vector3 soft_body_get_point_offset(RID p_body, int p_point_index) const override { return Vector3(); }
virtual void soft_body_remove_all_pinned_points(RID p_body) override {}
virtual void soft_body_pin_point(RID p_body, int p_point_index, bool p_pin) override {}
- virtual bool soft_body_is_point_pinned(RID p_body, int p_point_index) override { return false; }
+ virtual bool soft_body_is_point_pinned(RID p_body, int p_point_index) const override { return false; }
/* JOINT API */
- virtual RID joint_create_pin(RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) override;
+ virtual RID joint_create() override;
+
+ virtual void joint_clear(RID p_joint) override; //resets type
+
+ virtual void joint_make_pin(RID p_joint, RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) override;
virtual void pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) override;
virtual real_t pin_joint_get_param(RID p_joint, PinJointParam p_param) const override;
@@ -319,8 +332,8 @@ public:
virtual void pin_joint_set_local_b(RID p_joint, const Vector3 &p_B) override;
virtual Vector3 pin_joint_get_local_b(RID p_joint) const override;
- virtual RID joint_create_hinge(RID p_body_A, const Transform &p_frame_A, RID p_body_B, const Transform &p_frame_B) override;
- virtual RID joint_create_hinge_simple(RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B) override;
+ virtual void joint_make_hinge(RID p_joint, RID p_body_A, const Transform &p_frame_A, RID p_body_B, const Transform &p_frame_B) override;
+ virtual void joint_make_hinge_simple(RID p_joint, RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B) override;
virtual void hinge_joint_set_param(RID p_joint, HingeJointParam p_param, real_t p_value) override;
virtual real_t hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const override;
@@ -328,23 +341,23 @@ public:
virtual void hinge_joint_set_flag(RID p_joint, HingeJointFlag p_flag, bool p_value) override;
virtual bool hinge_joint_get_flag(RID p_joint, HingeJointFlag p_flag) const override;
- virtual RID joint_create_slider(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) override; //reference frame is A
+ virtual void joint_make_slider(RID p_joint, RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) override; //reference frame is A
virtual void slider_joint_set_param(RID p_joint, SliderJointParam p_param, real_t p_value) override;
virtual real_t slider_joint_get_param(RID p_joint, SliderJointParam p_param) const override;
- virtual RID joint_create_cone_twist(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) override; //reference frame is A
+ virtual void joint_make_cone_twist(RID p_joint, RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) override; //reference frame is A
virtual void cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, real_t p_value) override;
virtual real_t cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const override;
- virtual RID joint_create_generic_6dof(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) override; //reference frame is A
+ virtual void joint_make_generic_6dof(RID p_joint, RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) override; //reference frame is A
virtual void generic_6dof_joint_set_param(RID p_joint, Vector3::Axis, G6DOFJointAxisParam p_param, real_t p_value) override;
- virtual real_t generic_6dof_joint_get_param(RID p_joint, Vector3::Axis, G6DOFJointAxisParam p_param) override;
+ virtual real_t generic_6dof_joint_get_param(RID p_joint, Vector3::Axis, G6DOFJointAxisParam p_param) const override;
virtual void generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis, G6DOFJointAxisFlag p_flag, bool p_enable) override;
- virtual bool generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis, G6DOFJointAxisFlag p_flag) override;
+ virtual bool generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis, G6DOFJointAxisFlag p_flag) const override;
virtual JointType joint_get_type(RID p_joint) const override;
@@ -361,14 +374,16 @@ public:
virtual void set_active(bool p_active) override;
virtual void init() override;
virtual void step(real_t p_step) override;
+ virtual void sync() override;
virtual void flush_queries() override;
+ virtual void end_sync() override;
virtual void finish() override;
virtual bool is_flushing_queries() const override { return flushing_queries; }
int get_process_info(ProcessInfo p_info) override;
- PhysicsServer3DSW();
+ PhysicsServer3DSW(bool p_using_threads = false);
~PhysicsServer3DSW() {}
};
diff --git a/servers/physics_3d/physics_server_3d_wrap_mt.cpp b/servers/physics_3d/physics_server_3d_wrap_mt.cpp
new file mode 100644
index 0000000000..f73f67a756
--- /dev/null
+++ b/servers/physics_3d/physics_server_3d_wrap_mt.cpp
@@ -0,0 +1,140 @@
+/*************************************************************************/
+/* physics_server_3d_wrap_mt.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 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 "physics_server_3d_wrap_mt.h"
+
+#include "core/os/os.h"
+
+void PhysicsServer3DWrapMT::thread_exit() {
+ exit = true;
+}
+
+void PhysicsServer3DWrapMT::thread_step(real_t p_delta) {
+ physics_3d_server->step(p_delta);
+ step_sem.post();
+}
+
+void PhysicsServer3DWrapMT::_thread_callback(void *_instance) {
+ PhysicsServer3DWrapMT *vsmt = reinterpret_cast<PhysicsServer3DWrapMT *>(_instance);
+
+ vsmt->thread_loop();
+}
+
+void PhysicsServer3DWrapMT::thread_loop() {
+ server_thread = Thread::get_caller_id();
+
+ physics_3d_server->init();
+
+ exit = false;
+ step_thread_up = true;
+ while (!exit) {
+ // flush commands one by one, until exit is requested
+ command_queue.wait_and_flush_one();
+ }
+
+ command_queue.flush_all(); // flush all
+
+ physics_3d_server->finish();
+}
+
+/* EVENT QUEUING */
+
+void PhysicsServer3DWrapMT::step(real_t p_step) {
+ if (create_thread) {
+ command_queue.push(this, &PhysicsServer3DWrapMT::thread_step, p_step);
+ } else {
+ command_queue.flush_all(); //flush all pending from other threads
+ physics_3d_server->step(p_step);
+ }
+}
+
+void PhysicsServer3DWrapMT::sync() {
+ if (create_thread) {
+ if (first_frame) {
+ first_frame = false;
+ } else {
+ step_sem.wait(); //must not wait if a step was not issued
+ }
+ }
+ physics_3d_server->sync();
+}
+
+void PhysicsServer3DWrapMT::flush_queries() {
+ physics_3d_server->flush_queries();
+}
+
+void PhysicsServer3DWrapMT::end_sync() {
+ physics_3d_server->end_sync();
+}
+
+void PhysicsServer3DWrapMT::init() {
+ if (create_thread) {
+ //OS::get_singleton()->release_rendering_thread();
+ thread.start(_thread_callback, this);
+ while (!step_thread_up) {
+ OS::get_singleton()->delay_usec(1000);
+ }
+ } else {
+ physics_3d_server->init();
+ }
+}
+
+void PhysicsServer3DWrapMT::finish() {
+ if (thread.is_started()) {
+ command_queue.push(this, &PhysicsServer3DWrapMT::thread_exit);
+ thread.wait_to_finish();
+ } else {
+ physics_3d_server->finish();
+ }
+}
+
+PhysicsServer3DWrapMT::PhysicsServer3DWrapMT(PhysicsServer3D *p_contained, bool p_create_thread) :
+ command_queue(p_create_thread) {
+ physics_3d_server = p_contained;
+ create_thread = p_create_thread;
+ step_pending = 0;
+ step_thread_up = false;
+
+ pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
+
+ if (!p_create_thread) {
+ server_thread = Thread::get_caller_id();
+ } else {
+ server_thread = 0;
+ }
+
+ main_thread = Thread::get_caller_id();
+ first_frame = true;
+}
+
+PhysicsServer3DWrapMT::~PhysicsServer3DWrapMT() {
+ memdelete(physics_3d_server);
+ //finish();
+}
diff --git a/servers/physics_3d/physics_server_3d_wrap_mt.h b/servers/physics_3d/physics_server_3d_wrap_mt.h
new file mode 100644
index 0000000000..f60e1332d5
--- /dev/null
+++ b/servers/physics_3d/physics_server_3d_wrap_mt.h
@@ -0,0 +1,422 @@
+/*************************************************************************/
+/* physics_server_3d_wrap_mt.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 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 PHYSICS3DSERVERWRAPMT_H
+#define PHYSICS3DSERVERWRAPMT_H
+
+#include "core/config/project_settings.h"
+#include "core/os/thread.h"
+#include "core/templates/command_queue_mt.h"
+#include "servers/physics_server_3d.h"
+
+#ifdef DEBUG_SYNC
+#define SYNC_DEBUG print_line("sync on: " + String(__FUNCTION__));
+#else
+#define SYNC_DEBUG
+#endif
+
+class PhysicsServer3DWrapMT : public PhysicsServer3D {
+ mutable PhysicsServer3D *physics_3d_server;
+
+ mutable CommandQueueMT command_queue;
+
+ static void _thread_callback(void *_instance);
+ void thread_loop();
+
+ Thread::ID server_thread;
+ Thread::ID main_thread;
+ volatile bool exit = false;
+ Thread thread;
+ volatile bool step_thread_up = false;
+ bool create_thread = false;
+
+ Semaphore step_sem;
+ int step_pending;
+ void thread_step(real_t p_delta);
+ void thread_flush();
+
+ void thread_exit();
+
+ bool first_frame = true;
+
+ Mutex alloc_mutex;
+ int pool_max_size = 0;
+
+public:
+#define ServerName PhysicsServer3D
+#define ServerNameWrapMT PhysicsServer3DWrapMT
+#define server_name physics_3d_server
+#define WRITE_ACTION
+
+#include "servers/server_wrap_mt_common.h"
+
+ //FUNC1RID(shape,ShapeType); todo fix
+ FUNCRID(plane_shape)
+ FUNCRID(ray_shape)
+ FUNCRID(sphere_shape)
+ FUNCRID(box_shape)
+ FUNCRID(capsule_shape)
+ FUNCRID(cylinder_shape)
+ FUNCRID(convex_polygon_shape)
+ FUNCRID(concave_polygon_shape)
+ FUNCRID(heightmap_shape)
+ FUNCRID(custom_shape)
+
+ FUNC2(shape_set_data, RID, const Variant &);
+ FUNC2(shape_set_custom_solver_bias, RID, real_t);
+
+ FUNC2(shape_set_margin, RID, real_t)
+ FUNC1RC(real_t, shape_get_margin, RID)
+
+ FUNC1RC(ShapeType, shape_get_type, RID);
+ FUNC1RC(Variant, shape_get_data, RID);
+ FUNC1RC(real_t, shape_get_custom_solver_bias, RID);
+#if 0
+ //these work well, but should be used from the main thread only
+ bool shape_collide(RID p_shape_A, const Transform &p_xform_A, const Vector3 &p_motion_A, RID p_shape_B, const Transform &p_xform_B, const Vector3 &p_motion_B, Vector3 *r_results, int p_result_max, int &r_result_count) {
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), false);
+ return physics_3d_server->shape_collide(p_shape_A, p_xform_A, p_motion_A, p_shape_B, p_xform_B, p_motion_B, r_results, p_result_max, r_result_count);
+ }
+#endif
+ /* SPACE API */
+
+ FUNCRID(space);
+ FUNC2(space_set_active, RID, bool);
+ FUNC1RC(bool, space_is_active, RID);
+
+ FUNC3(space_set_param, RID, SpaceParameter, real_t);
+ FUNC2RC(real_t, space_get_param, RID, SpaceParameter);
+
+ // this function only works on physics process, errors and returns null otherwise
+ PhysicsDirectSpaceState3D *space_get_direct_state(RID p_space) override {
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), nullptr);
+ return physics_3d_server->space_get_direct_state(p_space);
+ }
+
+ FUNC2(space_set_debug_contacts, RID, int);
+ virtual Vector<Vector3> space_get_contacts(RID p_space) const override {
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), Vector<Vector3>());
+ return physics_3d_server->space_get_contacts(p_space);
+ }
+
+ virtual int space_get_contact_count(RID p_space) const override {
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), 0);
+ return physics_3d_server->space_get_contact_count(p_space);
+ }
+
+ /* AREA API */
+
+ //FUNC0RID(area);
+ FUNCRID(area);
+
+ FUNC2(area_set_space, RID, RID);
+ FUNC1RC(RID, area_get_space, RID);
+
+ FUNC2(area_set_space_override_mode, RID, AreaSpaceOverrideMode);
+ FUNC1RC(AreaSpaceOverrideMode, area_get_space_override_mode, RID);
+
+ FUNC4(area_add_shape, RID, RID, const Transform &, bool);
+ FUNC3(area_set_shape, RID, int, RID);
+ FUNC3(area_set_shape_transform, RID, int, const Transform &);
+ FUNC3(area_set_shape_disabled, RID, int, bool);
+
+ FUNC1RC(int, area_get_shape_count, RID);
+ FUNC2RC(RID, area_get_shape, RID, int);
+ FUNC2RC(Transform, area_get_shape_transform, RID, int);
+ FUNC2(area_remove_shape, RID, int);
+ FUNC1(area_clear_shapes, RID);
+
+ FUNC2(area_attach_object_instance_id, RID, ObjectID);
+ FUNC1RC(ObjectID, area_get_object_instance_id, RID);
+
+ FUNC3(area_set_param, RID, AreaParameter, const Variant &);
+ FUNC2(area_set_transform, RID, const Transform &);
+
+ FUNC2RC(Variant, area_get_param, RID, AreaParameter);
+ FUNC1RC(Transform, area_get_transform, RID);
+
+ FUNC2(area_set_collision_mask, RID, uint32_t);
+ FUNC2(area_set_collision_layer, RID, uint32_t);
+
+ FUNC2(area_set_monitorable, RID, bool);
+ FUNC2(area_set_ray_pickable, RID, bool);
+
+ FUNC3(area_set_monitor_callback, RID, Object *, const StringName &);
+ FUNC3(area_set_area_monitor_callback, RID, Object *, const StringName &);
+
+ /* BODY API */
+
+ //FUNC2RID(body,BodyMode,bool);
+ FUNCRID(body)
+
+ FUNC2(body_set_space, RID, RID);
+ FUNC1RC(RID, body_get_space, RID);
+
+ FUNC2(body_set_mode, RID, BodyMode);
+ FUNC1RC(BodyMode, body_get_mode, RID);
+
+ FUNC4(body_add_shape, RID, RID, const Transform &, bool);
+ FUNC3(body_set_shape, RID, int, RID);
+ FUNC3(body_set_shape_transform, RID, int, const Transform &);
+
+ FUNC1RC(int, body_get_shape_count, RID);
+ FUNC2RC(Transform, body_get_shape_transform, RID, int);
+ FUNC2RC(RID, body_get_shape, RID, int);
+
+ FUNC3(body_set_shape_disabled, RID, int, bool);
+
+ FUNC2(body_remove_shape, RID, int);
+ FUNC1(body_clear_shapes, RID);
+
+ FUNC2(body_attach_object_instance_id, RID, ObjectID);
+ FUNC1RC(ObjectID, body_get_object_instance_id, RID);
+
+ FUNC2(body_set_enable_continuous_collision_detection, RID, bool);
+ FUNC1RC(bool, body_is_continuous_collision_detection_enabled, RID);
+
+ FUNC2(body_set_collision_layer, RID, uint32_t);
+ FUNC1RC(uint32_t, body_get_collision_layer, RID);
+
+ FUNC2(body_set_collision_mask, RID, uint32_t);
+ FUNC1RC(uint32_t, body_get_collision_mask, RID);
+
+ FUNC2(body_set_user_flags, RID, uint32_t);
+ FUNC1RC(uint32_t, body_get_user_flags, RID);
+
+ FUNC3(body_set_param, RID, BodyParameter, real_t);
+ FUNC2RC(real_t, body_get_param, RID, BodyParameter);
+
+ FUNC2(body_set_kinematic_safe_margin, RID, real_t);
+ FUNC1RC(real_t, body_get_kinematic_safe_margin, RID);
+
+ FUNC3(body_set_state, RID, BodyState, const Variant &);
+ FUNC2RC(Variant, body_get_state, RID, BodyState);
+
+ FUNC2(body_set_applied_force, RID, const Vector3 &);
+ FUNC1RC(Vector3, body_get_applied_force, RID);
+
+ FUNC2(body_set_applied_torque, RID, const Vector3 &);
+ FUNC1RC(Vector3, body_get_applied_torque, RID);
+
+ FUNC2(body_add_central_force, RID, const Vector3 &);
+ FUNC3(body_add_force, RID, const Vector3 &, const Vector3 &);
+ FUNC2(body_add_torque, RID, const Vector3 &);
+ FUNC2(body_apply_torque_impulse, RID, const Vector3 &);
+ FUNC2(body_apply_central_impulse, RID, const Vector3 &);
+ FUNC3(body_apply_impulse, RID, const Vector3 &, const Vector3 &);
+ FUNC2(body_set_axis_velocity, RID, const Vector3 &);
+
+ FUNC3(body_set_axis_lock, RID, BodyAxis, bool);
+ FUNC2RC(bool, body_is_axis_locked, RID, BodyAxis);
+
+ FUNC2(body_add_collision_exception, RID, RID);
+ FUNC2(body_remove_collision_exception, RID, RID);
+ FUNC2S(body_get_collision_exceptions, RID, List<RID> *);
+
+ FUNC2(body_set_max_contacts_reported, RID, int);
+ FUNC1RC(int, body_get_max_contacts_reported, RID);
+
+ FUNC2(body_set_contacts_reported_depth_threshold, RID, real_t);
+ FUNC1RC(real_t, body_get_contacts_reported_depth_threshold, RID);
+
+ FUNC2(body_set_omit_force_integration, RID, bool);
+ FUNC1RC(bool, body_is_omitting_force_integration, RID);
+
+ FUNC4(body_set_force_integration_callback, RID, Object *, const StringName &, const Variant &);
+
+ FUNC2(body_set_ray_pickable, RID, bool);
+
+ bool body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) override {
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), false);
+ return physics_3d_server->body_test_motion(p_body, p_from, p_motion, p_infinite_inertia, r_result, p_exclude_raycast_shapes);
+ }
+
+ int body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin = 0.001) override {
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), false);
+ return physics_3d_server->body_test_ray_separation(p_body, p_transform, p_infinite_inertia, r_recover_motion, r_results, p_result_max, p_margin);
+ }
+
+ // this function only works on physics process, errors and returns null otherwise
+ PhysicsDirectBodyState3D *body_get_direct_state(RID p_body) override {
+ ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), nullptr);
+ return physics_3d_server->body_get_direct_state(p_body);
+ }
+
+ /* SOFT BODY API */
+
+ FUNCRID(soft_body)
+
+ FUNC2(soft_body_update_rendering_server, RID, class SoftBodyRenderingServerHandler *)
+
+ FUNC2(soft_body_set_space, RID, RID)
+ FUNC1RC(RID, soft_body_get_space, RID)
+
+ FUNC2(soft_body_set_ray_pickable, RID, bool);
+
+ FUNC2(soft_body_set_collision_layer, RID, uint32_t)
+ FUNC1RC(uint32_t, soft_body_get_collision_layer, RID)
+
+ FUNC2(soft_body_set_collision_mask, RID, uint32_t)
+ FUNC1RC(uint32_t, soft_body_get_collision_mask, RID)
+
+ FUNC2(soft_body_add_collision_exception, RID, RID)
+ FUNC2(soft_body_remove_collision_exception, RID, RID)
+ FUNC2S(soft_body_get_collision_exceptions, RID, List<RID> *)
+
+ FUNC3(soft_body_set_state, RID, BodyState, const Variant &);
+ FUNC2RC(Variant, soft_body_get_state, RID, BodyState);
+
+ FUNC2(soft_body_set_transform, RID, const Transform &);
+ FUNC2RC(Vector3, soft_body_get_vertex_position, RID, int);
+
+ FUNC2(soft_body_set_simulation_precision, RID, int);
+ FUNC1RC(int, soft_body_get_simulation_precision, RID);
+
+ FUNC2(soft_body_set_total_mass, RID, real_t);
+ FUNC1RC(real_t, soft_body_get_total_mass, RID);
+
+ FUNC2(soft_body_set_linear_stiffness, RID, real_t);
+ FUNC1RC(real_t, soft_body_get_linear_stiffness, RID);
+
+ FUNC2(soft_body_set_angular_stiffness, RID, real_t);
+ FUNC1RC(real_t, soft_body_get_angular_stiffness, RID);
+
+ FUNC2(soft_body_set_volume_stiffness, RID, real_t);
+ FUNC1RC(real_t, soft_body_get_volume_stiffness, RID);
+
+ FUNC2(soft_body_set_pressure_coefficient, RID, real_t);
+ FUNC1RC(real_t, soft_body_get_pressure_coefficient, RID);
+
+ FUNC2(soft_body_set_pose_matching_coefficient, RID, real_t);
+ FUNC1RC(real_t, soft_body_get_pose_matching_coefficient, RID);
+
+ FUNC2(soft_body_set_damping_coefficient, RID, real_t);
+ FUNC1RC(real_t, soft_body_get_damping_coefficient, RID);
+
+ FUNC2(soft_body_set_drag_coefficient, RID, real_t);
+ FUNC1RC(real_t, soft_body_get_drag_coefficient, RID);
+
+ FUNC2(soft_body_set_mesh, RID, const REF &);
+
+ FUNC3(soft_body_move_point, RID, int, const Vector3 &);
+ FUNC2RC(Vector3, soft_body_get_point_global_position, RID, int);
+ FUNC2RC(Vector3, soft_body_get_point_offset, RID, int);
+
+ FUNC1(soft_body_remove_all_pinned_points, RID);
+ FUNC3(soft_body_pin_point, RID, int, bool);
+ FUNC2RC(bool, soft_body_is_point_pinned, RID, int);
+
+ /* JOINT API */
+
+ FUNCRID(joint)
+
+ FUNC1(joint_clear, RID)
+
+ FUNC5(joint_make_pin, RID, RID, const Vector3 &, RID, const Vector3 &)
+
+ FUNC3(pin_joint_set_param, RID, PinJointParam, real_t)
+ FUNC2RC(real_t, pin_joint_get_param, RID, PinJointParam)
+
+ FUNC2(pin_joint_set_local_a, RID, const Vector3 &)
+ FUNC1RC(Vector3, pin_joint_get_local_a, RID)
+
+ FUNC2(pin_joint_set_local_b, RID, const Vector3 &)
+ FUNC1RC(Vector3, pin_joint_get_local_b, RID)
+
+ FUNC5(joint_make_hinge, RID, RID, const Transform &, RID, const Transform &)
+ FUNC7(joint_make_hinge_simple, RID, RID, const Vector3 &, const Vector3 &, RID, const Vector3 &, const Vector3 &)
+
+ FUNC3(hinge_joint_set_param, RID, HingeJointParam, real_t)
+ FUNC2RC(real_t, hinge_joint_get_param, RID, HingeJointParam)
+
+ FUNC3(hinge_joint_set_flag, RID, HingeJointFlag, bool)
+ FUNC2RC(bool, hinge_joint_get_flag, RID, HingeJointFlag)
+
+ FUNC5(joint_make_slider, RID, RID, const Transform &, RID, const Transform &)
+
+ FUNC3(slider_joint_set_param, RID, SliderJointParam, real_t)
+ FUNC2RC(real_t, slider_joint_get_param, RID, SliderJointParam)
+
+ FUNC5(joint_make_cone_twist, RID, RID, const Transform &, RID, const Transform &)
+
+ FUNC3(cone_twist_joint_set_param, RID, ConeTwistJointParam, real_t)
+ FUNC2RC(real_t, cone_twist_joint_get_param, RID, ConeTwistJointParam)
+
+ FUNC5(joint_make_generic_6dof, RID, RID, const Transform &, RID, const Transform &)
+
+ FUNC4(generic_6dof_joint_set_param, RID, Vector3::Axis, G6DOFJointAxisParam, real_t)
+ FUNC3RC(real_t, generic_6dof_joint_get_param, RID, Vector3::Axis, G6DOFJointAxisParam)
+
+ FUNC4(generic_6dof_joint_set_flag, RID, Vector3::Axis, G6DOFJointAxisFlag, bool)
+ FUNC3RC(bool, generic_6dof_joint_get_flag, RID, Vector3::Axis, G6DOFJointAxisFlag)
+
+ FUNC1RC(JointType, joint_get_type, RID);
+
+ FUNC2(joint_set_solver_priority, RID, int);
+ FUNC1RC(int, joint_get_solver_priority, RID);
+
+ FUNC2(joint_disable_collisions_between_bodies, RID, const bool);
+ FUNC1RC(bool, joint_is_disabled_collisions_between_bodies, RID);
+
+ /* MISC */
+
+ FUNC1(free, RID);
+ FUNC1(set_active, bool);
+
+ virtual void init() override;
+ virtual void step(real_t p_step) override;
+ virtual void sync() override;
+ virtual void end_sync() override;
+ virtual void flush_queries() override;
+ virtual void finish() override;
+
+ virtual bool is_flushing_queries() const override {
+ return physics_3d_server->is_flushing_queries();
+ }
+
+ int get_process_info(ProcessInfo p_info) override {
+ return physics_3d_server->get_process_info(p_info);
+ }
+
+ PhysicsServer3DWrapMT(PhysicsServer3D *p_contained, bool p_create_thread);
+ ~PhysicsServer3DWrapMT();
+
+#undef ServerNameWrapMT
+#undef ServerName
+#undef server_name
+#undef WRITE_ACTION
+};
+
+#ifdef DEBUG_SYNC
+#undef DEBUG_SYNC
+#endif
+#undef SYNC_DEBUG
+
+#endif // PHYSICS3DSERVERWRAPMT_H
diff --git a/servers/physics_3d/shape_3d_sw.cpp b/servers/physics_3d/shape_3d_sw.cpp
index f2adcc1072..5bac4f19b9 100644
--- a/servers/physics_3d/shape_3d_sw.cpp
+++ b/servers/physics_3d/shape_3d_sw.cpp
@@ -34,10 +34,12 @@
#include "core/math/quick_hull.h"
#include "core/templates/sort_array.h"
-#define _POINT_SNAP 0.001953125
#define _EDGE_IS_VALID_SUPPORT_THRESHOLD 0.0002
#define _FACE_IS_VALID_SUPPORT_THRESHOLD 0.9998
+#define _CYLINDER_EDGE_IS_VALID_SUPPORT_THRESHOLD 0.002
+#define _CYLINDER_FACE_IS_VALID_SUPPORT_THRESHOLD 0.999
+
void Shape3DSW::configure(const AABB &p_aabb) {
aabb = p_aabb;
configured = true;
@@ -50,7 +52,8 @@ void Shape3DSW::configure(const AABB &p_aabb) {
Vector3 Shape3DSW::get_support(const Vector3 &p_normal) const {
Vector3 res;
int amnt;
- get_supports(p_normal, 1, &res, amnt);
+ FeatureType type;
+ get_supports(p_normal, 1, &res, amnt, type);
return res;
}
@@ -167,16 +170,19 @@ Vector3 RayShape3DSW::get_support(const Vector3 &p_normal) const {
}
}
-void RayShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const {
+void RayShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const {
if (Math::abs(p_normal.z) < _EDGE_IS_VALID_SUPPORT_THRESHOLD) {
r_amount = 2;
+ r_type = FEATURE_EDGE;
r_supports[0] = Vector3(0, 0, 0);
r_supports[1] = Vector3(0, 0, length);
} else if (p_normal.z > 0) {
r_amount = 1;
+ r_type = FEATURE_POINT;
*r_supports = Vector3(0, 0, length);
} else {
r_amount = 1;
+ r_type = FEATURE_POINT;
*r_supports = Vector3(0, 0, 0);
}
}
@@ -246,9 +252,10 @@ Vector3 SphereShape3DSW::get_support(const Vector3 &p_normal) const {
return p_normal * radius;
}
-void SphereShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const {
+void SphereShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const {
*r_supports = p_normal * radius;
r_amount = 1;
+ r_type = FEATURE_POINT;
}
bool SphereShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const {
@@ -261,7 +268,7 @@ bool SphereShape3DSW::intersect_point(const Vector3 &p_point) const {
Vector3 SphereShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
Vector3 p = p_point;
- float l = p.length();
+ real_t l = p.length();
if (l < radius) {
return p_point;
}
@@ -312,7 +319,7 @@ Vector3 BoxShape3DSW::get_support(const Vector3 &p_normal) const {
return point;
}
-void BoxShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const {
+void BoxShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const {
static const int next[3] = { 1, 2, 0 };
static const int next2[3] = { 2, 0, 1 };
@@ -325,6 +332,7 @@ void BoxShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_s
bool neg = dot < 0;
r_amount = 4;
+ r_type = FEATURE_FACE;
Vector3 point;
point[i] = half_extents[i];
@@ -362,6 +370,7 @@ void BoxShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_s
if (Math::abs(p_normal.dot(axis)) < _EDGE_IS_VALID_SUPPORT_THRESHOLD) {
r_amount = 2;
+ r_type = FEATURE_EDGE;
int i_n = next[i];
int i_n2 = next2[i];
@@ -389,6 +398,7 @@ void BoxShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_s
(p_normal.z < 0) ? -half_extents.z : half_extents.z);
r_amount = 1;
+ r_type = FEATURE_POINT;
r_supports[0] = point;
}
@@ -429,7 +439,7 @@ Vector3 BoxShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
}
//check segments
- float min_distance = 1e20;
+ real_t min_distance = 1e20;
Vector3 closest_vertex = half_extents * p_point.sign();
Vector3 s[2] = {
closest_vertex,
@@ -442,7 +452,7 @@ Vector3 BoxShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
Vector3 closest_edge = Geometry3D::get_closest_point_to_segment(p_point, s);
- float d = p_point.distance_to(closest_edge);
+ real_t d = p_point.distance_to(closest_edge);
if (d < min_distance) {
min_point = closest_edge;
min_distance = d;
@@ -500,7 +510,7 @@ Vector3 CapsuleShape3DSW::get_support(const Vector3 &p_normal) const {
return n;
}
-void CapsuleShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const {
+void CapsuleShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const {
Vector3 n = p_normal;
real_t d = n.z;
@@ -512,6 +522,7 @@ void CapsuleShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3
n *= radius;
r_amount = 2;
+ r_type = FEATURE_EDGE;
r_supports[0] = n;
r_supports[0].z += height * 0.5;
r_supports[1] = n;
@@ -523,6 +534,7 @@ void CapsuleShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3
n *= radius;
n.z += h * 0.5;
r_amount = 1;
+ r_type = FEATURE_POINT;
*r_supports = n;
}
}
@@ -642,6 +654,186 @@ CapsuleShape3DSW::CapsuleShape3DSW() {
height = radius = 0;
}
+/********** CYLINDER *************/
+
+void CylinderShape3DSW::project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const {
+ Vector3 cylinder_axis = p_transform.basis.get_axis(1).normalized();
+ real_t axis_dot = cylinder_axis.dot(p_normal);
+
+ Vector3 local_normal = p_transform.basis.xform_inv(p_normal);
+ real_t scale = local_normal.length();
+ real_t scaled_radius = radius * scale;
+ real_t scaled_height = height * scale;
+
+ real_t length;
+ if (Math::abs(axis_dot) > 1.0) {
+ length = scaled_height * 0.5;
+ } else {
+ length = Math::abs(axis_dot * scaled_height * 0.5) + scaled_radius * Math::sqrt(1.0 - axis_dot * axis_dot);
+ }
+
+ real_t distance = p_normal.dot(p_transform.origin);
+
+ r_min = distance - length;
+ r_max = distance + length;
+}
+
+Vector3 CylinderShape3DSW::get_support(const Vector3 &p_normal) const {
+ Vector3 n = p_normal;
+ real_t h = (n.y > 0) ? height : -height;
+ real_t s = Math::sqrt(n.x * n.x + n.z * n.z);
+ if (Math::is_zero_approx(s)) {
+ n.x = radius;
+ n.y = h * 0.5;
+ n.z = 0.0;
+ } else {
+ real_t d = radius / s;
+ n.x = n.x * d;
+ n.y = h * 0.5;
+ n.z = n.z * d;
+ }
+
+ return n;
+}
+
+void CylinderShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const {
+ real_t d = p_normal.y;
+ if (Math::abs(d) > _CYLINDER_FACE_IS_VALID_SUPPORT_THRESHOLD) {
+ real_t h = (d > 0) ? height : -height;
+
+ Vector3 n = p_normal;
+ n.x = 0.0;
+ n.z = 0.0;
+ n.y = h * 0.5;
+
+ r_amount = 3;
+ r_type = FEATURE_CIRCLE;
+ r_supports[0] = n;
+ r_supports[1] = n;
+ r_supports[1].x += radius;
+ r_supports[2] = n;
+ r_supports[2].z += radius;
+ } else if (Math::abs(d) < _CYLINDER_EDGE_IS_VALID_SUPPORT_THRESHOLD) {
+ // make it flat
+ Vector3 n = p_normal;
+ n.y = 0.0;
+ n.normalize();
+ n *= radius;
+
+ r_amount = 2;
+ r_type = FEATURE_EDGE;
+ r_supports[0] = n;
+ r_supports[0].y += height * 0.5;
+ r_supports[1] = n;
+ r_supports[1].y -= height * 0.5;
+ } else {
+ r_amount = 1;
+ r_type = FEATURE_POINT;
+ r_supports[0] = get_support(p_normal);
+ return;
+
+ Vector3 n = p_normal;
+ real_t h = n.y * Math::sqrt(0.25 * height * height + radius * radius);
+ if (Math::abs(h) > 1.0) {
+ // Top or bottom surface.
+ n.y = (n.y > 0.0) ? height * 0.5 : -height * 0.5;
+ } else {
+ // Lateral surface.
+ n.y = height * 0.5 * h;
+ }
+
+ real_t s = Math::sqrt(n.x * n.x + n.z * n.z);
+ if (Math::is_zero_approx(s)) {
+ n.x = 0.0;
+ n.z = 0.0;
+ } else {
+ real_t scaled_radius = radius / s;
+ n.x = n.x * scaled_radius;
+ n.z = n.z * scaled_radius;
+ }
+
+ r_supports[0] = n;
+ }
+}
+
+bool CylinderShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const {
+ return Geometry3D::segment_intersects_cylinder(p_begin, p_end, height, radius, &r_result, &r_normal, 1);
+}
+
+bool CylinderShape3DSW::intersect_point(const Vector3 &p_point) const {
+ if (Math::abs(p_point.y) < height * 0.5) {
+ return Vector3(p_point.x, 0, p_point.z).length() < radius;
+ }
+ return false;
+}
+
+Vector3 CylinderShape3DSW::get_closest_point_to(const Vector3 &p_point) const {
+ if (Math::absf(p_point.y) > height * 0.5) {
+ // Project point to top disk.
+ real_t dir = p_point.y > 0.0 ? 1.0 : -1.0;
+ Vector3 circle_pos(0.0, dir * height * 0.5, 0.0);
+ Plane circle_plane(circle_pos, Vector3(0.0, dir, 0.0));
+ Vector3 proj_point = circle_plane.project(p_point);
+
+ // Clip position.
+ Vector3 delta_point_1 = proj_point - circle_pos;
+ real_t dist_point_1 = delta_point_1.length_squared();
+ if (!Math::is_zero_approx(dist_point_1)) {
+ dist_point_1 = Math::sqrt(dist_point_1);
+ proj_point = circle_pos + delta_point_1 * MIN(dist_point_1, radius) / dist_point_1;
+ }
+
+ return proj_point;
+ } else {
+ Vector3 s[2] = {
+ Vector3(0, -height * 0.5, 0),
+ Vector3(0, height * 0.5, 0),
+ };
+
+ Vector3 p = Geometry3D::get_closest_point_to_segment(p_point, s);
+
+ if (p.distance_to(p_point) < radius) {
+ return p_point;
+ }
+
+ return p + (p_point - p).normalized() * radius;
+ }
+}
+
+Vector3 CylinderShape3DSW::get_moment_of_inertia(real_t p_mass) const {
+ // use bad AABB approximation
+ Vector3 extents = get_aabb().size * 0.5;
+
+ return Vector3(
+ (p_mass / 3.0) * (extents.y * extents.y + extents.z * extents.z),
+ (p_mass / 3.0) * (extents.x * extents.x + extents.z * extents.z),
+ (p_mass / 3.0) * (extents.y * extents.y + extents.y * extents.y));
+}
+
+void CylinderShape3DSW::_setup(real_t p_height, real_t p_radius) {
+ height = p_height;
+ radius = p_radius;
+ configure(AABB(Vector3(-radius, -height * 0.5, -radius), Vector3(radius * 2.0, height, radius * 2.0)));
+}
+
+void CylinderShape3DSW::set_data(const Variant &p_data) {
+ Dictionary d = p_data;
+ ERR_FAIL_COND(!d.has("radius"));
+ ERR_FAIL_COND(!d.has("height"));
+ _setup(d["height"], d["radius"]);
+}
+
+Variant CylinderShape3DSW::get_data() const {
+ Dictionary d;
+ d["radius"] = radius;
+ d["height"] = height;
+ return d;
+}
+
+CylinderShape3DSW::CylinderShape3DSW() {
+ height = radius = 0;
+}
+
/********** CONVEX POLYGON *************/
void ConvexPolygonShape3DSW::project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const {
@@ -689,7 +881,7 @@ Vector3 ConvexPolygonShape3DSW::get_support(const Vector3 &p_normal) const {
return vrts[vert_support_idx];
}
-void ConvexPolygonShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const {
+void ConvexPolygonShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const {
const Geometry3D::MeshData::Face *faces = mesh.faces.ptr();
int fc = mesh.faces.size();
@@ -734,6 +926,7 @@ void ConvexPolygonShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Ve
r_supports[j] = vertices[ind[j]];
}
r_amount = m;
+ r_type = FEATURE_FACE;
return;
}
}
@@ -743,6 +936,7 @@ void ConvexPolygonShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Ve
dot = ABS(dot);
if (dot < _EDGE_IS_VALID_SUPPORT_THRESHOLD && (edges[i].a == vtx || edges[i].b == vtx)) {
r_amount = 2;
+ r_type = FEATURE_EDGE;
r_supports[0] = vertices[edges[i].a];
r_supports[1] = vertices[edges[i].b];
return;
@@ -751,6 +945,7 @@ void ConvexPolygonShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Ve
r_supports[0] = vertices[vtx];
r_amount = 1;
+ r_type = FEATURE_POINT;
}
bool ConvexPolygonShape3DSW::intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const {
@@ -839,7 +1034,7 @@ Vector3 ConvexPolygonShape3DSW::get_closest_point_to(const Vector3 &p_point) con
return p_point;
}
- float min_distance = 1e20;
+ real_t min_distance = 1e20;
Vector3 min_point;
//check edges
@@ -852,7 +1047,7 @@ Vector3 ConvexPolygonShape3DSW::get_closest_point_to(const Vector3 &p_point) con
};
Vector3 closest = Geometry3D::get_closest_point_to_segment(p_point, s);
- float d = closest.distance_to(p_point);
+ real_t d = closest.distance_to(p_point);
if (d < min_distance) {
min_distance = d;
min_point = closest;
@@ -935,12 +1130,13 @@ Vector3 FaceShape3DSW::get_support(const Vector3 &p_normal) const {
return vertex[vert_support_idx];
}
-void FaceShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const {
+void FaceShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const {
Vector3 n = p_normal;
/** TEST FACE AS SUPPORT **/
if (normal.dot(n) > _FACE_IS_VALID_SUPPORT_THRESHOLD) {
r_amount = 3;
+ r_type = FEATURE_FACE;
for (int i = 0; i < 3; i++) {
r_supports[i] = vertex[i];
}
@@ -974,6 +1170,7 @@ void FaceShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_
dot = ABS(dot);
if (dot < _EDGE_IS_VALID_SUPPORT_THRESHOLD) {
r_amount = 2;
+ r_type = FEATURE_EDGE;
r_supports[0] = vertex[i];
r_supports[1] = vertex[nx];
return;
@@ -981,6 +1178,7 @@ void FaceShape3DSW::get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_
}
r_amount = 1;
+ r_type = FEATURE_POINT;
r_supports[0] = vertex[vert_support_idx];
}
diff --git a/servers/physics_3d/shape_3d_sw.h b/servers/physics_3d/shape_3d_sw.h
index 851c0d9443..cafe978abb 100644
--- a/servers/physics_3d/shape_3d_sw.h
+++ b/servers/physics_3d/shape_3d_sw.h
@@ -67,8 +67,11 @@ protected:
void configure(const AABB &p_aabb);
public:
- enum {
- MAX_SUPPORTS = 8
+ enum FeatureType {
+ FEATURE_POINT,
+ FEATURE_EDGE,
+ FEATURE_FACE,
+ FEATURE_CIRCLE,
};
virtual real_t get_area() const { return aabb.get_area(); }
@@ -85,7 +88,7 @@ public:
virtual void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const = 0;
virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const = 0;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const = 0;
virtual Vector3 get_closest_point_to(const Vector3 &p_point) const = 0;
virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_point, Vector3 &r_normal) const = 0;
virtual bool intersect_point(const Vector3 &p_point) const = 0;
@@ -110,7 +113,7 @@ class ConcaveShape3DSW : public Shape3DSW {
public:
virtual bool is_concave() const { return true; }
typedef void (*Callback)(void *p_userdata, Shape3DSW *p_convex);
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const { r_amount = 0; }
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const { r_amount = 0; }
virtual void cull(const AABB &p_local_aabb, Callback p_callback, void *p_userdata) const = 0;
@@ -129,7 +132,7 @@ public:
virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_PLANE; }
virtual void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const;
virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const { r_amount = 0; }
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const { r_amount = 0; }
virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
virtual bool intersect_point(const Vector3 &p_point) const;
@@ -156,7 +159,7 @@ public:
virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_RAY; }
virtual void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const;
virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
virtual bool intersect_point(const Vector3 &p_point) const;
@@ -184,7 +187,7 @@ public:
virtual void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const;
virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
virtual bool intersect_point(const Vector3 &p_point) const;
virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
@@ -209,7 +212,7 @@ public:
virtual void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const;
virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
virtual bool intersect_point(const Vector3 &p_point) const;
virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
@@ -238,7 +241,7 @@ public:
virtual void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const;
virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
virtual bool intersect_point(const Vector3 &p_point) const;
virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
@@ -251,6 +254,35 @@ public:
CapsuleShape3DSW();
};
+class CylinderShape3DSW : public Shape3DSW {
+ real_t height;
+ real_t radius;
+
+ void _setup(real_t p_height, real_t p_radius);
+
+public:
+ _FORCE_INLINE_ real_t get_height() const { return height; }
+ _FORCE_INLINE_ real_t get_radius() const { return radius; }
+
+ virtual real_t get_area() const { return 4.0 / 3.0 * Math_PI * radius * radius * radius + height * Math_PI * radius * radius; }
+
+ virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_CYLINDER; }
+
+ virtual void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const;
+ virtual Vector3 get_support(const Vector3 &p_normal) const;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
+ virtual bool intersect_point(const Vector3 &p_point) const;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
+
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const;
+
+ virtual void set_data(const Variant &p_data);
+ virtual Variant get_data() const;
+
+ CylinderShape3DSW();
+};
+
struct ConvexPolygonShape3DSW : public Shape3DSW {
Geometry3D::MeshData mesh;
@@ -263,7 +295,7 @@ public:
virtual void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const;
virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
virtual bool intersect_point(const Vector3 &p_point) const;
virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
@@ -399,7 +431,7 @@ struct FaceShape3DSW : public Shape3DSW {
void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const;
Vector3 get_support(const Vector3 &p_normal) const;
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const;
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const;
bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
virtual bool intersect_point(const Vector3 &p_point) const;
virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
@@ -437,7 +469,7 @@ struct MotionShape3DSW : public Shape3DSW {
}
return support;
}
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount) const { r_amount = 0; }
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const { r_amount = 0; }
bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const { return false; }
virtual bool intersect_point(const Vector3 &p_point) const { return false; }
virtual Vector3 get_closest_point_to(const Vector3 &p_point) const { return p_point; }
diff --git a/servers/physics_3d/space_3d_sw.cpp b/servers/physics_3d/space_3d_sw.cpp
index 6cc7ad2676..dd5754b9ac 100644
--- a/servers/physics_3d/space_3d_sw.cpp
+++ b/servers/physics_3d/space_3d_sw.cpp
@@ -181,7 +181,7 @@ int PhysicsDirectSpaceState3DSW::intersect_shape(const RID &p_shape, const Trans
return 0;
}
- Shape3DSW *shape = static_cast<PhysicsServer3DSW *>(PhysicsServer3D::get_singleton())->shape_owner.getornull(p_shape);
+ Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.getornull(p_shape);
ERR_FAIL_COND_V(!shape, 0);
AABB aabb = p_xform.xform(shape->get_aabb());
@@ -232,7 +232,7 @@ int PhysicsDirectSpaceState3DSW::intersect_shape(const RID &p_shape, const Trans
}
bool PhysicsDirectSpaceState3DSW::cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, ShapeRestInfo *r_info) {
- Shape3DSW *shape = static_cast<PhysicsServer3DSW *>(PhysicsServer3D::get_singleton())->shape_owner.getornull(p_shape);
+ Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.getornull(p_shape);
ERR_FAIL_COND_V(!shape, false);
AABB aabb = p_xform.xform(shape->get_aabb());
@@ -340,7 +340,7 @@ bool PhysicsDirectSpaceState3DSW::collide_shape(RID p_shape, const Transform &p_
return false;
}
- Shape3DSW *shape = static_cast<PhysicsServer3DSW *>(PhysicsServer3D::get_singleton())->shape_owner.getornull(p_shape);
+ Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.getornull(p_shape);
ERR_FAIL_COND_V(!shape, 0);
AABB aabb = p_shape_xform.xform(shape->get_aabb());
@@ -384,6 +384,8 @@ bool PhysicsDirectSpaceState3DSW::collide_shape(RID p_shape, const Transform &p_
struct _RestCallbackData {
const CollisionObject3DSW *object;
const CollisionObject3DSW *best_object;
+ int local_shape;
+ int best_local_shape;
int shape;
int best_shape;
Vector3 best_contact;
@@ -409,10 +411,11 @@ static void _rest_cbk_result(const Vector3 &p_point_A, const Vector3 &p_point_B,
rd->best_normal = contact_rel / len;
rd->best_object = rd->object;
rd->best_shape = rd->shape;
+ rd->best_local_shape = rd->local_shape;
}
bool PhysicsDirectSpaceState3DSW::rest_info(RID p_shape, const Transform &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
- Shape3DSW *shape = static_cast<PhysicsServer3DSW *>(PhysicsServer3D::get_singleton())->shape_owner.getornull(p_shape);
+ Shape3DSW *shape = PhysicsServer3DSW::singletonsw->shape_owner.getornull(p_shape);
ERR_FAIL_COND_V(!shape, 0);
AABB aabb = p_shape_xform.xform(shape->get_aabb());
@@ -468,15 +471,15 @@ bool PhysicsDirectSpaceState3DSW::rest_info(RID p_shape, const Transform &p_shap
}
Vector3 PhysicsDirectSpaceState3DSW::get_closest_point_to_object_volume(RID p_object, const Vector3 p_point) const {
- CollisionObject3DSW *obj = PhysicsServer3DSW::singleton->area_owner.getornull(p_object);
+ CollisionObject3DSW *obj = PhysicsServer3DSW::singletonsw->area_owner.getornull(p_object);
if (!obj) {
- obj = PhysicsServer3DSW::singleton->body_owner.getornull(p_object);
+ obj = PhysicsServer3DSW::singletonsw->body_owner.getornull(p_object);
}
ERR_FAIL_COND_V(!obj, Vector3());
ERR_FAIL_COND_V(obj->get_space() != space, Vector3());
- float min_distance = 1e20;
+ real_t min_distance = 1e20;
Vector3 min_point;
bool shapes_found = false;
@@ -492,7 +495,7 @@ Vector3 PhysicsDirectSpaceState3DSW::get_closest_point_to_object_volume(RID p_ob
Vector3 point = shape->get_closest_point_to(shape_xform.affine_inverse().xform(p_point));
point = shape_xform.xform(point);
- float dist = point.distance_to(p_point);
+ real_t dist = point.distance_to(p_point);
if (dist < min_distance) {
min_distance = dist;
min_point = point;
@@ -651,7 +654,7 @@ int Space3DSW::test_body_ray_separation(Body3DSW *p_body, const Transform &p_tra
recover_motion += (b - a) / cbk.amount;
- float depth = a.distance_to(b);
+ real_t depth = a.distance_to(b);
if (depth > result.collision_depth) {
result.collision_depth = depth;
result.collision_point = b;
@@ -739,8 +742,13 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform &p_from, cons
body_aabb = p_from.xform(p_body->get_inv_transform().xform(body_aabb));
body_aabb = body_aabb.grow(p_margin);
+ real_t motion_length = p_motion.length();
+ Vector3 motion_normal = p_motion / motion_length;
+
Transform body_transform = p_from;
+ bool recovered = false;
+
{
//STEP 1, FREE BODY IF STUCK
@@ -791,7 +799,17 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform &p_from, cons
for (int i = 0; i < cbk.amount; i++) {
Vector3 a = sr[i * 2 + 0];
Vector3 b = sr[i * 2 + 1];
- recover_motion += (b - a) / cbk.amount;
+
+ // Compute plane on b towards a.
+ Vector3 n = (a - b).normalized();
+ real_t d = n.dot(b);
+
+ // Compute depth on recovered motion.
+ real_t depth = n.dot(a + recover_motion) - d;
+ if (depth > 0.0) {
+ // Only recover if there is penetration.
+ recover_motion -= n * depth * 0.4;
+ }
}
if (recover_motion == Vector3()) {
@@ -799,6 +817,8 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform &p_from, cons
break;
}
+ recovered = true;
+
body_transform.origin += recover_motion;
body_aabb.position += recover_motion;
@@ -848,14 +868,14 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform &p_from, cons
//test initial overlap, does it collide if going all the way?
Vector3 point_A, point_B;
- Vector3 sep_axis = p_motion.normalized();
+ Vector3 sep_axis = motion_normal;
Transform col_obj_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx);
//test initial overlap, does it collide if going all the way?
if (CollisionSolver3DSW::solve_distance(&mshape, body_shape_xform, col_obj->get_shape(shape_idx), col_obj_xform, point_A, point_B, motion_aabb, &sep_axis)) {
continue;
}
- sep_axis = p_motion.normalized();
+ sep_axis = motion_normal;
if (!CollisionSolver3DSW::solve_distance(body_shape, body_shape_xform, col_obj->get_shape(shape_idx), col_obj_xform, point_A, point_B, motion_aabb, &sep_axis)) {
stuck = true;
@@ -865,13 +885,12 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform &p_from, cons
//just do kinematic solving
real_t low = 0;
real_t hi = 1;
- Vector3 mnormal = p_motion.normalized();
for (int k = 0; k < 8; k++) { //steps should be customizable..
real_t ofs = (low + hi) * 0.5;
- Vector3 sep = mnormal; //important optimization for this to work fast enough
+ Vector3 sep = motion_normal; //important optimization for this to work fast enough
mshape.motion = body_shape_xform_inv.basis.xform(p_motion * ofs);
@@ -912,16 +931,11 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform &p_from, cons
}
bool collided = false;
- if (safe >= 1) {
- //not collided
- collided = false;
- if (r_result) {
- r_result->motion = p_motion;
- r_result->remainder = Vector3();
- r_result->motion += (body_transform.get_origin() - p_from.get_origin());
+ if (recovered || (safe < 1)) {
+ if (safe >= 1) {
+ best_shape = -1; //no best shape with cast, reset to -1
}
- } else {
//it collided, let's get the rest info in unsafe advance
Transform ugt = body_transform;
ugt.origin += p_motion * unsafe;
@@ -930,25 +944,40 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform &p_from, cons
rcd.best_len = 0;
rcd.best_object = nullptr;
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);
- Shape3DSW *body_shape = p_body->get_shape(best_shape);
+ // Allowed depth can't be lower than motion length, in order to handle contacts at low speed.
+ rcd.min_allowed_depth = MIN(motion_length, test_motion_min_contact_depth);
- body_aabb.position += p_motion * unsafe;
+ int from_shape = best_shape != -1 ? best_shape : 0;
+ int to_shape = best_shape != -1 ? best_shape + 1 : p_body->get_shape_count();
- int amount = _cull_aabb_for_body(p_body, body_aabb);
+ for (int j = from_shape; j < to_shape; j++) {
+ if (p_body->is_shape_set_as_disabled(j)) {
+ continue;
+ }
- for (int i = 0; i < amount; i++) {
- const CollisionObject3DSW *col_obj = intersection_query_results[i];
- int shape_idx = intersection_query_subindex_results[i];
+ Transform body_shape_xform = ugt * p_body->get_shape_transform(j);
+ Shape3DSW *body_shape = p_body->get_shape(j);
- rcd.object = col_obj;
- rcd.shape = shape_idx;
- bool sc = CollisionSolver3DSW::solve_static(body_shape, body_shape_xform, col_obj->get_shape(shape_idx), col_obj->get_transform() * col_obj->get_shape_transform(shape_idx), _rest_cbk_result, &rcd, nullptr, p_margin);
- if (!sc) {
+ if (p_exclude_raycast_shapes && body_shape->get_type() == PhysicsServer3D::SHAPE_RAY) {
continue;
}
+
+ body_aabb.position += p_motion * unsafe;
+
+ int amount = _cull_aabb_for_body(p_body, body_aabb);
+
+ for (int i = 0; i < amount; i++) {
+ const CollisionObject3DSW *col_obj = intersection_query_results[i];
+ int shape_idx = intersection_query_subindex_results[i];
+
+ rcd.object = col_obj;
+ rcd.shape = shape_idx;
+ bool sc = CollisionSolver3DSW::solve_static(body_shape, body_shape_xform, col_obj->get_shape(shape_idx), col_obj->get_transform() * col_obj->get_shape_transform(shape_idx), _rest_cbk_result, &rcd, nullptr, p_margin);
+ if (!sc) {
+ continue;
+ }
+ }
}
if (rcd.best_len != 0) {
@@ -956,7 +985,7 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform &p_from, cons
r_result->collider = rcd.best_object->get_self();
r_result->collider_id = rcd.best_object->get_instance_id();
r_result->collider_shape = rcd.best_shape;
- r_result->collision_local_shape = best_shape;
+ r_result->collision_local_shape = rcd.best_local_shape;
r_result->collision_normal = rcd.best_normal;
r_result->collision_point = rcd.best_contact;
//r_result->collider_metadata = rcd.best_object->get_shape_metadata(rcd.best_shape);
@@ -972,17 +1001,15 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform &p_from, cons
}
collided = true;
- } else {
- if (r_result) {
- r_result->motion = p_motion;
- r_result->remainder = Vector3();
- r_result->motion += (body_transform.get_origin() - p_from.get_origin());
- }
-
- collided = false;
}
}
+ if (!collided && r_result) {
+ r_result->motion = p_motion;
+ r_result->remainder = Vector3();
+ r_result->motion += (body_transform.get_origin() - p_from.get_origin());
+ }
+
return collided;
}
@@ -1211,7 +1238,7 @@ Space3DSW::Space3DSW() {
constraint_bias = 0.01;
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_linear", 0.1);
- body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI));
+ body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_angular", Math::deg2rad(8.0));
body_time_to_sleep = GLOBAL_DEF("physics/3d/time_before_sleep", 0.5);
ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/time_before_sleep", PropertyInfo(Variant::FLOAT, "physics/3d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
body_angular_velocity_damp_ratio = 10;
diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp
index a6f64f5848..83ebc0c55b 100644
--- a/servers/physics_server_2d.cpp
+++ b/servers/physics_server_2d.cpp
@@ -42,7 +42,7 @@ void PhysicsDirectBodyState2D::integrate_forces() {
real_t av = get_angular_velocity();
- float damp = 1.0 - step * get_total_linear_damp();
+ real_t damp = 1.0 - step * get_total_linear_damp();
if (damp < 0) { // reached zero in the given time
damp = 0;
@@ -168,11 +168,11 @@ Vector2 PhysicsShapeQueryParameters2D::get_motion() const {
return motion;
}
-void PhysicsShapeQueryParameters2D::set_margin(float p_margin) {
+void PhysicsShapeQueryParameters2D::set_margin(real_t p_margin) {
margin = p_margin;
}
-float PhysicsShapeQueryParameters2D::get_margin() const {
+real_t PhysicsShapeQueryParameters2D::get_margin() const {
return margin;
}
@@ -311,7 +311,7 @@ Array PhysicsDirectSpaceState2D::_intersect_shape(const Ref<PhysicsShapeQueryPar
Array PhysicsDirectSpaceState2D::_cast_motion(const Ref<PhysicsShapeQueryParameters2D> &p_shape_query) {
ERR_FAIL_COND_V(!p_shape_query.is_valid(), Array());
- float closest_safe, closest_unsafe;
+ real_t closest_safe, closest_unsafe;
bool res = cast_motion(p_shape_query->shape, p_shape_query->transform, p_shape_query->motion, p_shape_query->margin, closest_safe, closest_unsafe, p_shape_query->exclude, p_shape_query->collision_mask, p_shape_query->collide_with_bodies, p_shape_query->collide_with_areas);
if (!res) {
return Array();
@@ -517,7 +517,7 @@ PhysicsTestMotionResult2D::PhysicsTestMotionResult2D() {
///////////////////////////////////////
-bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, float p_margin, const Ref<PhysicsTestMotionResult2D> &p_result) {
+bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin, const Ref<PhysicsTestMotionResult2D> &p_result) {
MotionResult *r = nullptr;
if (p_result.is_valid()) {
r = p_result->get_result_ptr();
@@ -655,12 +655,16 @@ void PhysicsServer2D::_bind_methods() {
/* JOINT API */
+ ClassDB::bind_method(D_METHOD("joint_create"), &PhysicsServer2D::joint_create);
+
+ ClassDB::bind_method(D_METHOD("joint_clear", "joint"), &PhysicsServer2D::joint_clear);
+
ClassDB::bind_method(D_METHOD("joint_set_param", "joint", "param", "value"), &PhysicsServer2D::joint_set_param);
ClassDB::bind_method(D_METHOD("joint_get_param", "joint", "param"), &PhysicsServer2D::joint_get_param);
- ClassDB::bind_method(D_METHOD("pin_joint_create", "anchor", "body_a", "body_b"), &PhysicsServer2D::pin_joint_create, DEFVAL(RID()));
- ClassDB::bind_method(D_METHOD("groove_joint_create", "groove1_a", "groove2_a", "anchor_b", "body_a", "body_b"), &PhysicsServer2D::groove_joint_create, DEFVAL(RID()), DEFVAL(RID()));
- ClassDB::bind_method(D_METHOD("damped_spring_joint_create", "anchor_a", "anchor_b", "body_a", "body_b"), &PhysicsServer2D::damped_spring_joint_create, DEFVAL(RID()));
+ ClassDB::bind_method(D_METHOD("joint_make_pin", "joint", "anchor", "body_a", "body_b"), &PhysicsServer2D::joint_make_pin, DEFVAL(RID()));
+ ClassDB::bind_method(D_METHOD("joint_make_groove", "joint", "groove1_a", "groove2_a", "anchor_b", "body_a", "body_b"), &PhysicsServer2D::joint_make_groove, DEFVAL(RID()), DEFVAL(RID()));
+ ClassDB::bind_method(D_METHOD("joint_make_damped_spring", "joint", "anchor_a", "anchor_b", "body_a", "body_b"), &PhysicsServer2D::joint_make_damped_spring, DEFVAL(RID()));
ClassDB::bind_method(D_METHOD("damped_spring_joint_set_param", "joint", "param", "value"), &PhysicsServer2D::damped_spring_joint_set_param);
ClassDB::bind_method(D_METHOD("damped_spring_joint_get_param", "joint", "param"), &PhysicsServer2D::damped_spring_joint_get_param);
@@ -727,9 +731,10 @@ void PhysicsServer2D::_bind_methods() {
BIND_ENUM_CONSTANT(BODY_STATE_SLEEPING);
BIND_ENUM_CONSTANT(BODY_STATE_CAN_SLEEP);
- BIND_ENUM_CONSTANT(JOINT_PIN);
- BIND_ENUM_CONSTANT(JOINT_GROOVE);
- BIND_ENUM_CONSTANT(JOINT_DAMPED_SPRING);
+ BIND_ENUM_CONSTANT(JOINT_TYPE_PIN);
+ BIND_ENUM_CONSTANT(JOINT_TYPE_GROOVE);
+ BIND_ENUM_CONSTANT(JOINT_TYPE_DAMPED_SPRING);
+ BIND_ENUM_CONSTANT(JOINT_TYPE_MAX);
BIND_ENUM_CONSTANT(JOINT_PARAM_BIAS);
BIND_ENUM_CONSTANT(JOINT_PARAM_MAX_BIAS);
diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h
index dd38855199..28f22ce06b 100644
--- a/servers/physics_server_2d.h
+++ b/servers/physics_server_2d.h
@@ -45,10 +45,10 @@ protected:
public:
virtual Vector2 get_total_gravity() const = 0; // get gravity vector working on this body space/area
- virtual float get_total_linear_damp() const = 0; // get density of this body space/area
- virtual float get_total_angular_damp() const = 0; // get density of this body space/area
+ virtual real_t get_total_linear_damp() const = 0; // get density of this body space/area
+ virtual real_t get_total_angular_damp() const = 0; // get density of this body space/area
- virtual float get_inverse_mass() const = 0; // get the mass
+ virtual real_t get_inverse_mass() const = 0; // get the mass
virtual real_t get_inverse_inertia() const = 0; // get density of this body space
virtual void set_linear_velocity(const Vector2 &p_velocity) = 0;
@@ -103,7 +103,7 @@ class PhysicsShapeQueryParameters2D : public Reference {
RID shape;
Transform2D transform;
Vector2 motion;
- float margin;
+ real_t margin;
Set<RID> exclude;
uint32_t collision_mask;
@@ -125,8 +125,8 @@ public:
void set_motion(const Vector2 &p_motion);
Vector2 get_motion() const;
- void set_margin(float p_margin);
- float get_margin() const;
+ void set_margin(real_t p_margin);
+ real_t get_margin() const;
void set_collision_mask(int p_collision_mask);
int get_collision_mask() const;
@@ -182,11 +182,11 @@ public:
virtual int intersect_point(const Vector2 &p_point, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_point = false) = 0;
virtual int intersect_point_on_canvas(const Vector2 &p_point, ObjectID p_canvas_instance_id, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_point = false) = 0;
- virtual int intersect_shape(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, float p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual int intersect_shape(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
- virtual bool cast_motion(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, float p_margin, float &p_closest_safe, float &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool cast_motion(const RID &p_shape, const Transform2D &p_xform, const Vector2 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
- virtual bool collide_shape(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, float p_margin, Vector2 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool collide_shape(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, Vector2 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
struct ShapeRestInfo {
Vector2 point;
@@ -198,7 +198,7 @@ public:
Variant metadata;
};
- virtual bool rest_info(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, float p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool rest_info(RID p_shape, const Transform2D &p_shape_xform, const Vector2 &p_motion, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_layer = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
PhysicsDirectSpaceState2D();
};
@@ -230,7 +230,7 @@ class PhysicsServer2D : public Object {
static PhysicsServer2D *singleton;
- virtual bool _body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, float p_margin = 0.08, const Ref<PhysicsTestMotionResult2D> &p_result = Ref<PhysicsTestMotionResult2D>());
+ virtual bool _body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin = 0.08, const Ref<PhysicsTestMotionResult2D> &p_result = Ref<PhysicsTestMotionResult2D>());
protected:
static void _bind_methods();
@@ -393,7 +393,7 @@ public:
virtual Variant body_get_shape_metadata(RID p_body, int p_shape_idx) const = 0;
virtual void body_set_shape_disabled(RID p_body, int p_shape, bool p_disabled) = 0;
- virtual void body_set_shape_as_one_way_collision(RID p_body, int p_shape, bool p_enabled, float p_margin = 0) = 0;
+ virtual void body_set_shape_as_one_way_collision(RID p_body, int p_shape, bool p_enabled, real_t p_margin = 0) = 0;
virtual void body_remove_shape(RID p_body, int p_shape_idx) = 0;
virtual void body_clear_shapes(RID p_body) = 0;
@@ -431,8 +431,8 @@ public:
BODY_PARAM_MAX,
};
- virtual void body_set_param(RID p_body, BodyParameter p_param, float p_value) = 0;
- virtual float body_get_param(RID p_body, BodyParameter p_param) const = 0;
+ virtual void body_set_param(RID p_body, BodyParameter p_param, real_t p_value) = 0;
+ virtual real_t body_get_param(RID p_body, BodyParameter p_param) const = 0;
//state
enum BodyState {
@@ -450,15 +450,15 @@ public:
virtual void body_set_applied_force(RID p_body, const Vector2 &p_force) = 0;
virtual Vector2 body_get_applied_force(RID p_body) const = 0;
- virtual void body_set_applied_torque(RID p_body, float p_torque) = 0;
- virtual float body_get_applied_torque(RID p_body) const = 0;
+ virtual void body_set_applied_torque(RID p_body, real_t p_torque) = 0;
+ virtual real_t body_get_applied_torque(RID p_body) const = 0;
virtual void body_add_central_force(RID p_body, const Vector2 &p_force) = 0;
virtual void body_add_force(RID p_body, const Vector2 &p_force, const Vector2 &p_position = Vector2()) = 0;
- virtual void body_add_torque(RID p_body, float p_torque) = 0;
+ virtual void body_add_torque(RID p_body, real_t p_torque) = 0;
virtual void body_apply_central_impulse(RID p_body, const Vector2 &p_impulse) = 0;
- virtual void body_apply_torque_impulse(RID p_body, float p_torque) = 0;
+ virtual void body_apply_torque_impulse(RID p_body, real_t p_torque) = 0;
virtual void body_apply_impulse(RID p_body, const Vector2 &p_impulse, const Vector2 &p_position = Vector2()) = 0;
virtual void body_set_axis_velocity(RID p_body, const Vector2 &p_axis_velocity) = 0;
@@ -471,8 +471,8 @@ public:
virtual int body_get_max_contacts_reported(RID p_body) const = 0;
//missing remove
- virtual void body_set_contacts_reported_depth_threshold(RID p_body, float p_threshold) = 0;
- virtual float body_get_contacts_reported_depth_threshold(RID p_body) const = 0;
+ virtual void body_set_contacts_reported_depth_threshold(RID p_body, real_t p_threshold) = 0;
+ virtual real_t body_get_contacts_reported_depth_threshold(RID p_body) const = 0;
virtual void body_set_omit_force_integration(RID p_body, bool p_omit) = 0;
virtual bool body_is_omitting_force_integration(RID p_body) const = 0;
@@ -506,10 +506,10 @@ public:
}
};
- 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 = nullptr, bool p_exclude_raycast_shapes = true) = 0;
+ virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin = 0.001, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) = 0;
struct SeparationResult {
- float collision_depth;
+ real_t collision_depth;
Vector2 collision_point;
Vector2 collision_normal;
Vector2 collider_velocity;
@@ -520,14 +520,19 @@ public:
Variant collider_metadata;
};
- virtual int body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin = 0.001) = 0;
+ virtual int body_test_ray_separation(RID p_body, const Transform2D &p_transform, bool p_infinite_inertia, Vector2 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin = 0.001) = 0;
/* JOINT API */
+ virtual RID joint_create() = 0;
+
+ virtual void joint_clear(RID p_joint) = 0;
+
enum JointType {
- JOINT_PIN,
- JOINT_GROOVE,
- JOINT_DAMPED_SPRING
+ JOINT_TYPE_PIN,
+ JOINT_TYPE_GROOVE,
+ JOINT_TYPE_DAMPED_SPRING,
+ JOINT_TYPE_MAX
};
enum JointParam {
@@ -542,9 +547,9 @@ public:
virtual void joint_disable_collisions_between_bodies(RID p_joint, const bool p_disable) = 0;
virtual bool joint_is_disabled_collisions_between_bodies(RID p_joint) const = 0;
- virtual RID pin_joint_create(const Vector2 &p_anchor, RID p_body_a, RID p_body_b = RID()) = 0;
- virtual RID groove_joint_create(const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, RID p_body_a, RID p_body_b) = 0;
- virtual RID damped_spring_joint_create(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, RID p_body_a, RID p_body_b = RID()) = 0;
+ virtual void joint_make_pin(RID p_joint, const Vector2 &p_anchor, RID p_body_a, RID p_body_b = RID()) = 0;
+ virtual void joint_make_groove(RID p_joint, const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, RID p_body_a, RID p_body_b) = 0;
+ virtual void joint_make_damped_spring(RID p_joint, const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, RID p_body_a, RID p_body_b = RID()) = 0;
enum PinJointParam {
PIN_JOINT_SOFTNESS
@@ -576,7 +581,7 @@ public:
virtual void set_active(bool p_active) = 0;
virtual void init() = 0;
- virtual void step(float p_step) = 0;
+ virtual void step(real_t p_step) = 0;
virtual void sync() = 0;
virtual void flush_queries() = 0;
virtual void end_sync() = 0;
diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp
index 27ebe32e50..8fd0ddbfef 100644
--- a/servers/physics_server_3d.cpp
+++ b/servers/physics_server_3d.cpp
@@ -42,13 +42,13 @@ void PhysicsDirectBodyState3D::integrate_forces() {
Vector3 av = get_angular_velocity();
- float linear_damp = 1.0 - step * get_total_linear_damp();
+ real_t linear_damp = 1.0 - step * get_total_linear_damp();
if (linear_damp < 0) { // reached zero in the given time
linear_damp = 0;
}
- float angular_damp = 1.0 - step * get_total_angular_damp();
+ real_t angular_damp = 1.0 - step * get_total_angular_damp();
if (angular_damp < 0) { // reached zero in the given time
angular_damp = 0;
@@ -128,7 +128,7 @@ void PhysicsDirectBodyState3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "angular_velocity"), "set_angular_velocity", "get_angular_velocity");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "linear_velocity"), "set_linear_velocity", "get_linear_velocity");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sleeping"), "set_sleep_state", "is_sleeping");
- ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "transform"), "set_transform", "get_transform");
+ ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "transform"), "set_transform", "get_transform");
}
PhysicsDirectBodyState3D::PhysicsDirectBodyState3D() {}
@@ -164,11 +164,11 @@ Transform PhysicsShapeQueryParameters3D::get_transform() const {
return transform;
}
-void PhysicsShapeQueryParameters3D::set_margin(float p_margin) {
+void PhysicsShapeQueryParameters3D::set_margin(real_t p_margin) {
margin = p_margin;
}
-float PhysicsShapeQueryParameters3D::get_margin() const {
+real_t PhysicsShapeQueryParameters3D::get_margin() const {
return margin;
}
@@ -303,7 +303,7 @@ Array PhysicsDirectSpaceState3D::_intersect_shape(const Ref<PhysicsShapeQueryPar
Array PhysicsDirectSpaceState3D::_cast_motion(const Ref<PhysicsShapeQueryParameters3D> &p_shape_query, const Vector3 &p_motion) {
ERR_FAIL_COND_V(!p_shape_query.is_valid(), Array());
- float closest_safe = 1.0f, closest_unsafe = 1.0f;
+ real_t closest_safe = 1.0f, closest_unsafe = 1.0f;
bool res = cast_motion(p_shape_query->shape, p_shape_query->transform, p_motion, p_shape_query->margin, closest_safe, closest_unsafe, p_shape_query->exclude, p_shape_query->collision_mask, p_shape_query->collide_with_bodies, p_shape_query->collide_with_areas);
if (!res) {
return Array();
@@ -398,10 +398,47 @@ void PhysicsShapeQueryResult3D::_bind_methods() {
///////////////////////////////////////
+RID PhysicsServer3D::shape_create(ShapeType p_shape) {
+ switch (p_shape) {
+ case SHAPE_PLANE:
+ return plane_shape_create();
+ case SHAPE_RAY:
+ return ray_shape_create();
+ case SHAPE_SPHERE:
+ return sphere_shape_create();
+ case SHAPE_BOX:
+ return box_shape_create();
+ case SHAPE_CAPSULE:
+ return capsule_shape_create();
+ case SHAPE_CYLINDER:
+ return cylinder_shape_create();
+ case SHAPE_CONVEX_POLYGON:
+ return convex_polygon_shape_create();
+ case SHAPE_CONCAVE_POLYGON:
+ return concave_polygon_shape_create();
+ case SHAPE_HEIGHTMAP:
+ return heightmap_shape_create();
+ case SHAPE_CUSTOM:
+ return custom_shape_create();
+ default:
+ return RID();
+ }
+}
+
void PhysicsServer3D::_bind_methods() {
#ifndef _3D_DISABLED
- ClassDB::bind_method(D_METHOD("shape_create", "type"), &PhysicsServer3D::shape_create);
+ ClassDB::bind_method(D_METHOD("plane_shape_create"), &PhysicsServer3D::plane_shape_create);
+ ClassDB::bind_method(D_METHOD("ray_shape_create"), &PhysicsServer3D::ray_shape_create);
+ ClassDB::bind_method(D_METHOD("sphere_shape_create"), &PhysicsServer3D::sphere_shape_create);
+ ClassDB::bind_method(D_METHOD("box_shape_create"), &PhysicsServer3D::box_shape_create);
+ ClassDB::bind_method(D_METHOD("capsule_shape_create"), &PhysicsServer3D::capsule_shape_create);
+ ClassDB::bind_method(D_METHOD("cylinder_shape_create"), &PhysicsServer3D::cylinder_shape_create);
+ ClassDB::bind_method(D_METHOD("convex_polygon_shape_create"), &PhysicsServer3D::convex_polygon_shape_create);
+ ClassDB::bind_method(D_METHOD("concave_polygon_shape_create"), &PhysicsServer3D::concave_polygon_shape_create);
+ ClassDB::bind_method(D_METHOD("heightmap_shape_create"), &PhysicsServer3D::heightmap_shape_create);
+ ClassDB::bind_method(D_METHOD("custom_shape_create"), &PhysicsServer3D::custom_shape_create);
+
ClassDB::bind_method(D_METHOD("shape_set_data", "shape", "data"), &PhysicsServer3D::shape_set_data);
ClassDB::bind_method(D_METHOD("shape_get_type", "shape"), &PhysicsServer3D::shape_get_type);
@@ -450,9 +487,8 @@ void PhysicsServer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("area_set_monitorable", "area", "monitorable"), &PhysicsServer3D::area_set_monitorable);
ClassDB::bind_method(D_METHOD("area_set_ray_pickable", "area", "enable"), &PhysicsServer3D::area_set_ray_pickable);
- ClassDB::bind_method(D_METHOD("area_is_ray_pickable", "area"), &PhysicsServer3D::area_is_ray_pickable);
- ClassDB::bind_method(D_METHOD("body_create", "mode", "init_sleeping"), &PhysicsServer3D::body_create, DEFVAL(BODY_MODE_RIGID), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("body_create"), &PhysicsServer3D::body_create);
ClassDB::bind_method(D_METHOD("body_set_space", "body", "space"), &PhysicsServer3D::body_set_space);
ClassDB::bind_method(D_METHOD("body_get_space", "body"), &PhysicsServer3D::body_get_space);
@@ -517,19 +553,22 @@ void PhysicsServer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("body_set_force_integration_callback", "body", "receiver", "method", "userdata"), &PhysicsServer3D::body_set_force_integration_callback, DEFVAL(Variant()));
ClassDB::bind_method(D_METHOD("body_set_ray_pickable", "body", "enable"), &PhysicsServer3D::body_set_ray_pickable);
- ClassDB::bind_method(D_METHOD("body_is_ray_pickable", "body"), &PhysicsServer3D::body_is_ray_pickable);
ClassDB::bind_method(D_METHOD("body_get_direct_state", "body"), &PhysicsServer3D::body_get_direct_state);
/* JOINT API */
- BIND_ENUM_CONSTANT(JOINT_PIN);
- BIND_ENUM_CONSTANT(JOINT_HINGE);
- BIND_ENUM_CONSTANT(JOINT_SLIDER);
- BIND_ENUM_CONSTANT(JOINT_CONE_TWIST);
- BIND_ENUM_CONSTANT(JOINT_6DOF);
+ ClassDB::bind_method(D_METHOD("joint_create"), &PhysicsServer3D::joint_create);
+ ClassDB::bind_method(D_METHOD("joint_clear", "joint"), &PhysicsServer3D::joint_clear);
+
+ BIND_ENUM_CONSTANT(JOINT_TYPE_PIN);
+ BIND_ENUM_CONSTANT(JOINT_TYPE_HINGE);
+ BIND_ENUM_CONSTANT(JOINT_TYPE_SLIDER);
+ BIND_ENUM_CONSTANT(JOINT_TYPE_CONE_TWIST);
+ BIND_ENUM_CONSTANT(JOINT_TYPE_6DOF);
+ BIND_ENUM_CONSTANT(JOINT_TYPE_MAX);
- ClassDB::bind_method(D_METHOD("joint_create_pin", "body_A", "local_A", "body_B", "local_B"), &PhysicsServer3D::joint_create_pin);
+ ClassDB::bind_method(D_METHOD("joint_make_pin", "joint", "body_A", "local_A", "body_B", "local_B"), &PhysicsServer3D::joint_make_pin);
ClassDB::bind_method(D_METHOD("pin_joint_set_param", "joint", "param", "value"), &PhysicsServer3D::pin_joint_set_param);
ClassDB::bind_method(D_METHOD("pin_joint_get_param", "joint", "param"), &PhysicsServer3D::pin_joint_get_param);
@@ -555,7 +594,7 @@ void PhysicsServer3D::_bind_methods() {
BIND_ENUM_CONSTANT(HINGE_JOINT_FLAG_USE_LIMIT);
BIND_ENUM_CONSTANT(HINGE_JOINT_FLAG_ENABLE_MOTOR);
- ClassDB::bind_method(D_METHOD("joint_create_hinge", "body_A", "hinge_A", "body_B", "hinge_B"), &PhysicsServer3D::joint_create_hinge);
+ ClassDB::bind_method(D_METHOD("joint_make_hinge", "joint", "body_A", "hinge_A", "body_B", "hinge_B"), &PhysicsServer3D::joint_make_hinge);
ClassDB::bind_method(D_METHOD("hinge_joint_set_param", "joint", "param", "value"), &PhysicsServer3D::hinge_joint_set_param);
ClassDB::bind_method(D_METHOD("hinge_joint_get_param", "joint", "param"), &PhysicsServer3D::hinge_joint_get_param);
@@ -563,7 +602,7 @@ void PhysicsServer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("hinge_joint_set_flag", "joint", "flag", "enabled"), &PhysicsServer3D::hinge_joint_set_flag);
ClassDB::bind_method(D_METHOD("hinge_joint_get_flag", "joint", "flag"), &PhysicsServer3D::hinge_joint_get_flag);
- ClassDB::bind_method(D_METHOD("joint_create_slider", "body_A", "local_ref_A", "body_B", "local_ref_B"), &PhysicsServer3D::joint_create_slider);
+ ClassDB::bind_method(D_METHOD("joint_make_slider", "body_A", "local_ref_A", "body_B", "local_ref_B"), &PhysicsServer3D::joint_make_slider);
ClassDB::bind_method(D_METHOD("slider_joint_set_param", "joint", "param", "value"), &PhysicsServer3D::slider_joint_set_param);
ClassDB::bind_method(D_METHOD("slider_joint_get_param", "joint", "param"), &PhysicsServer3D::slider_joint_get_param);
@@ -593,7 +632,7 @@ void PhysicsServer3D::_bind_methods() {
BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING);
BIND_ENUM_CONSTANT(SLIDER_JOINT_MAX);
- ClassDB::bind_method(D_METHOD("joint_create_cone_twist", "body_A", "local_ref_A", "body_B", "local_ref_B"), &PhysicsServer3D::joint_create_cone_twist);
+ ClassDB::bind_method(D_METHOD("joint_make_cone_twist", "joint", "body_A", "local_ref_A", "body_B", "local_ref_B"), &PhysicsServer3D::joint_make_cone_twist);
ClassDB::bind_method(D_METHOD("cone_twist_joint_set_param", "joint", "param", "value"), &PhysicsServer3D::cone_twist_joint_set_param);
ClassDB::bind_method(D_METHOD("cone_twist_joint_get_param", "joint", "param"), &PhysicsServer3D::cone_twist_joint_get_param);
@@ -631,7 +670,7 @@ void PhysicsServer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("joint_set_solver_priority", "joint", "priority"), &PhysicsServer3D::joint_set_solver_priority);
ClassDB::bind_method(D_METHOD("joint_get_solver_priority", "joint"), &PhysicsServer3D::joint_get_solver_priority);
- ClassDB::bind_method(D_METHOD("joint_create_generic_6dof", "body_A", "local_ref_A", "body_B", "local_ref_B"), &PhysicsServer3D::joint_create_generic_6dof);
+ ClassDB::bind_method(D_METHOD("joint_make_generic_6dof", "joint", "body_A", "local_ref_A", "body_B", "local_ref_B"), &PhysicsServer3D::joint_make_generic_6dof);
ClassDB::bind_method(D_METHOD("generic_6dof_joint_set_param", "joint", "axis", "param", "value"), &PhysicsServer3D::generic_6dof_joint_set_param);
ClassDB::bind_method(D_METHOD("generic_6dof_joint_get_param", "joint", "axis", "param"), &PhysicsServer3D::generic_6dof_joint_get_param);
@@ -718,7 +757,6 @@ void PhysicsServer3D::_bind_methods() {
}
PhysicsServer3D::PhysicsServer3D() {
- ERR_FAIL_COND(singleton != nullptr);
singleton = this;
}
diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h
index 303825f37c..e16857192c 100644
--- a/servers/physics_server_3d.h
+++ b/servers/physics_server_3d.h
@@ -44,12 +44,12 @@ protected:
public:
virtual Vector3 get_total_gravity() const = 0;
- virtual float get_total_angular_damp() const = 0;
- virtual float get_total_linear_damp() const = 0;
+ virtual real_t get_total_angular_damp() const = 0;
+ virtual real_t get_total_linear_damp() const = 0;
virtual Vector3 get_center_of_mass() const = 0;
virtual Basis get_principal_inertia_axes() const = 0;
- virtual float get_inverse_mass() const = 0; // get the mass
+ virtual real_t get_inverse_mass() const = 0; // get the mass
virtual Vector3 get_inverse_inertia() const = 0; // get density of this body space
virtual Basis get_inverse_inertia_tensor() const = 0; // get density of this body space
@@ -76,7 +76,7 @@ public:
virtual Vector3 get_contact_local_position(int p_contact_idx) const = 0;
virtual Vector3 get_contact_local_normal(int p_contact_idx) const = 0;
- virtual float get_contact_impulse(int p_contact_idx) const = 0;
+ virtual real_t get_contact_impulse(int p_contact_idx) const = 0;
virtual int get_contact_local_shape(int p_contact_idx) const = 0;
virtual RID get_contact_collider(int p_contact_idx) const = 0;
@@ -103,7 +103,7 @@ class PhysicsShapeQueryParameters3D : public Reference {
RES shape_ref;
RID shape;
Transform transform;
- float margin;
+ real_t margin;
Set<RID> exclude;
uint32_t collision_mask;
@@ -122,8 +122,8 @@ public:
void set_transform(const Transform &p_transform);
Transform get_transform() const;
- void set_margin(float p_margin);
- float get_margin() const;
+ void set_margin(real_t p_margin);
+ real_t get_margin() const;
void set_collision_mask(int p_collision_mask);
int get_collision_mask() const;
@@ -174,7 +174,7 @@ public:
virtual bool intersect_ray(const Vector3 &p_from, const Vector3 &p_to, RayResult &r_result, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, bool p_pick_ray = false) = 0;
- virtual int intersect_shape(const RID &p_shape, const Transform &p_xform, float p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual int intersect_shape(const RID &p_shape, const Transform &p_xform, real_t p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
struct ShapeRestInfo {
Vector3 point;
@@ -185,11 +185,11 @@ public:
Vector3 linear_velocity; //velocity at contact point
};
- virtual bool cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, float p_margin, float &p_closest_safe, float &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) = 0;
+ virtual bool cast_motion(const RID &p_shape, const Transform &p_xform, const Vector3 &p_motion, real_t p_margin, real_t &p_closest_safe, real_t &p_closest_unsafe, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false, ShapeRestInfo *r_info = nullptr) = 0;
- virtual bool collide_shape(RID p_shape, const Transform &p_shape_xform, float p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool collide_shape(RID p_shape, const Transform &p_shape_xform, real_t p_margin, Vector3 *r_results, int p_result_max, int &r_result_count, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
- virtual bool rest_info(RID p_shape, const Transform &p_shape_xform, float p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
+ virtual bool rest_info(RID p_shape, const Transform &p_shape_xform, real_t p_margin, ShapeRestInfo *r_info, const Set<RID> &p_exclude = Set<RID>(), uint32_t p_collision_mask = 0xFFFFFFFF, bool p_collide_with_bodies = true, bool p_collide_with_areas = false) = 0;
virtual Vector3 get_closest_point_to_object_volume(RID p_object, const Vector3 p_point) const = 0;
@@ -240,7 +240,19 @@ public:
SHAPE_CUSTOM, ///< Server-Implementation based custom shape, calling shape_create() with this value will result in an error
};
- virtual RID shape_create(ShapeType p_shape) = 0;
+ RID shape_create(ShapeType p_shape);
+
+ virtual RID plane_shape_create() = 0;
+ virtual RID ray_shape_create() = 0;
+ virtual RID sphere_shape_create() = 0;
+ virtual RID box_shape_create() = 0;
+ virtual RID capsule_shape_create() = 0;
+ virtual RID cylinder_shape_create() = 0;
+ virtual RID convex_polygon_shape_create() = 0;
+ virtual RID concave_polygon_shape_create() = 0;
+ virtual RID heightmap_shape_create() = 0;
+ virtual RID custom_shape_create() = 0;
+
virtual void shape_set_data(RID p_shape, const Variant &p_data) = 0;
virtual void shape_set_custom_solver_bias(RID p_shape, real_t p_bias) = 0;
@@ -344,7 +356,6 @@ public:
virtual void area_set_area_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) = 0;
virtual void area_set_ray_pickable(RID p_area, bool p_enable) = 0;
- virtual bool area_is_ray_pickable(RID p_area) const = 0;
/* BODY API */
@@ -357,7 +368,7 @@ public:
BODY_MODE_CHARACTER
};
- virtual RID body_create(BodyMode p_mode = BODY_MODE_RIGID, bool p_init_sleeping = false) = 0;
+ virtual RID body_create() = 0;
virtual void body_set_space(RID p_body, RID p_space) = 0;
virtual RID body_get_space(RID p_body) const = 0;
@@ -404,8 +415,8 @@ public:
BODY_PARAM_MAX,
};
- virtual void body_set_param(RID p_body, BodyParameter p_param, float p_value) = 0;
- virtual float body_get_param(RID p_body, BodyParameter p_param) const = 0;
+ virtual void body_set_param(RID p_body, BodyParameter p_param, real_t p_value) = 0;
+ virtual real_t body_get_param(RID p_body, BodyParameter p_param) const = 0;
virtual void body_set_kinematic_safe_margin(RID p_body, real_t p_margin) = 0;
virtual real_t body_get_kinematic_safe_margin(RID p_body) const = 0;
@@ -459,8 +470,8 @@ public:
virtual int body_get_max_contacts_reported(RID p_body) const = 0;
//missing remove
- virtual void body_set_contacts_reported_depth_threshold(RID p_body, float p_threshold) = 0;
- virtual float body_get_contacts_reported_depth_threshold(RID p_body) const = 0;
+ virtual void body_set_contacts_reported_depth_threshold(RID p_body, real_t p_threshold) = 0;
+ virtual real_t body_get_contacts_reported_depth_threshold(RID p_body) const = 0;
virtual void body_set_omit_force_integration(RID p_body, bool p_omit) = 0;
virtual bool body_is_omitting_force_integration(RID p_body) const = 0;
@@ -468,7 +479,6 @@ public:
virtual void body_set_force_integration_callback(RID p_body, Object *p_receiver, const StringName &p_method, const Variant &p_udata = Variant()) = 0;
virtual void body_set_ray_pickable(RID p_body, bool p_enable) = 0;
- virtual bool body_is_ray_pickable(RID p_body) const = 0;
// this function only works on physics process, errors and returns null otherwise
virtual PhysicsDirectBodyState3D *body_get_direct_state(RID p_body) = 0;
@@ -495,7 +505,7 @@ public:
virtual bool body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) = 0;
struct SeparationResult {
- float collision_depth;
+ real_t collision_depth;
Vector3 collision_point;
Vector3 collision_normal;
Vector3 collider_velocity;
@@ -506,11 +516,11 @@ public:
Variant collider_metadata;
};
- virtual int body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin = 0.001) = 0;
+ virtual int body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, real_t p_margin = 0.001) = 0;
/* SOFT BODY */
- virtual RID soft_body_create(bool p_init_sleeping = false) = 0;
+ virtual RID soft_body_create() = 0;
virtual void soft_body_update_rendering_server(RID p_body, class SoftBodyRenderingServerHandler *p_rendering_server_handler) = 0;
@@ -536,55 +546,59 @@ public:
virtual Vector3 soft_body_get_vertex_position(RID p_body, int vertex_index) const = 0;
virtual void soft_body_set_ray_pickable(RID p_body, bool p_enable) = 0;
- virtual bool soft_body_is_ray_pickable(RID p_body) const = 0;
virtual void soft_body_set_simulation_precision(RID p_body, int p_simulation_precision) = 0;
- virtual int soft_body_get_simulation_precision(RID p_body) = 0;
+ virtual int soft_body_get_simulation_precision(RID p_body) const = 0;
virtual void soft_body_set_total_mass(RID p_body, real_t p_total_mass) = 0;
- virtual real_t soft_body_get_total_mass(RID p_body) = 0;
+ virtual real_t soft_body_get_total_mass(RID p_body) const = 0;
virtual void soft_body_set_linear_stiffness(RID p_body, real_t p_stiffness) = 0;
- virtual real_t soft_body_get_linear_stiffness(RID p_body) = 0;
+ virtual real_t soft_body_get_linear_stiffness(RID p_body) const = 0;
- virtual void soft_body_set_areaAngular_stiffness(RID p_body, real_t p_stiffness) = 0;
- virtual real_t soft_body_get_areaAngular_stiffness(RID p_body) = 0;
+ virtual void soft_body_set_angular_stiffness(RID p_body, real_t p_stiffness) = 0;
+ virtual real_t soft_body_get_angular_stiffness(RID p_body) const = 0;
virtual void soft_body_set_volume_stiffness(RID p_body, real_t p_stiffness) = 0;
- virtual real_t soft_body_get_volume_stiffness(RID p_body) = 0;
+ virtual real_t soft_body_get_volume_stiffness(RID p_body) const = 0;
virtual void soft_body_set_pressure_coefficient(RID p_body, real_t p_pressure_coefficient) = 0;
- virtual real_t soft_body_get_pressure_coefficient(RID p_body) = 0;
+ virtual real_t soft_body_get_pressure_coefficient(RID p_body) const = 0;
virtual void soft_body_set_pose_matching_coefficient(RID p_body, real_t p_pose_matching_coefficient) = 0;
- virtual real_t soft_body_get_pose_matching_coefficient(RID p_body) = 0;
+ virtual real_t soft_body_get_pose_matching_coefficient(RID p_body) const = 0;
virtual void soft_body_set_damping_coefficient(RID p_body, real_t p_damping_coefficient) = 0;
- virtual real_t soft_body_get_damping_coefficient(RID p_body) = 0;
+ virtual real_t soft_body_get_damping_coefficient(RID p_body) const = 0;
virtual void soft_body_set_drag_coefficient(RID p_body, real_t p_drag_coefficient) = 0;
- virtual real_t soft_body_get_drag_coefficient(RID p_body) = 0;
+ virtual real_t soft_body_get_drag_coefficient(RID p_body) const = 0;
virtual void soft_body_move_point(RID p_body, int p_point_index, const Vector3 &p_global_position) = 0;
- virtual Vector3 soft_body_get_point_global_position(RID p_body, int p_point_index) = 0;
+ virtual Vector3 soft_body_get_point_global_position(RID p_body, int p_point_index) const = 0;
virtual Vector3 soft_body_get_point_offset(RID p_body, int p_point_index) const = 0;
virtual void soft_body_remove_all_pinned_points(RID p_body) = 0;
virtual void soft_body_pin_point(RID p_body, int p_point_index, bool p_pin) = 0;
- virtual bool soft_body_is_point_pinned(RID p_body, int p_point_index) = 0;
+ virtual bool soft_body_is_point_pinned(RID p_body, int p_point_index) const = 0;
/* JOINT API */
enum JointType {
- JOINT_PIN,
- JOINT_HINGE,
- JOINT_SLIDER,
- JOINT_CONE_TWIST,
- JOINT_6DOF
+ JOINT_TYPE_PIN,
+ JOINT_TYPE_HINGE,
+ JOINT_TYPE_SLIDER,
+ JOINT_TYPE_CONE_TWIST,
+ JOINT_TYPE_6DOF,
+ JOINT_TYPE_MAX,
};
+ virtual RID joint_create() = 0;
+
+ virtual void joint_clear(RID p_joint) = 0;
+
virtual JointType joint_get_type(RID p_joint) const = 0;
virtual void joint_set_solver_priority(RID p_joint, int p_priority) = 0;
@@ -593,7 +607,7 @@ public:
virtual void joint_disable_collisions_between_bodies(RID p_joint, const bool p_disable) = 0;
virtual bool joint_is_disabled_collisions_between_bodies(RID p_joint) const = 0;
- virtual RID joint_create_pin(RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) = 0;
+ virtual void joint_make_pin(RID p_joint, RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) = 0;
enum PinJointParam {
PIN_JOINT_BIAS,
@@ -601,8 +615,8 @@ public:
PIN_JOINT_IMPULSE_CLAMP
};
- virtual void pin_joint_set_param(RID p_joint, PinJointParam p_param, float p_value) = 0;
- virtual float pin_joint_get_param(RID p_joint, PinJointParam p_param) const = 0;
+ virtual void pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) = 0;
+ virtual real_t pin_joint_get_param(RID p_joint, PinJointParam p_param) const = 0;
virtual void pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) = 0;
virtual Vector3 pin_joint_get_local_a(RID p_joint) const = 0;
@@ -628,11 +642,11 @@ public:
HINGE_JOINT_FLAG_MAX
};
- virtual RID joint_create_hinge(RID p_body_A, const Transform &p_hinge_A, RID p_body_B, const Transform &p_hinge_B) = 0;
- virtual RID joint_create_hinge_simple(RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B) = 0;
+ virtual void joint_make_hinge(RID p_joint, RID p_body_A, const Transform &p_hinge_A, RID p_body_B, const Transform &p_hinge_B) = 0;
+ virtual void joint_make_hinge_simple(RID p_joint, RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B) = 0;
- virtual void hinge_joint_set_param(RID p_joint, HingeJointParam p_param, float p_value) = 0;
- virtual float hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const = 0;
+ virtual void hinge_joint_set_param(RID p_joint, HingeJointParam p_param, real_t p_value) = 0;
+ virtual real_t hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const = 0;
virtual void hinge_joint_set_flag(RID p_joint, HingeJointFlag p_flag, bool p_value) = 0;
virtual bool hinge_joint_get_flag(RID p_joint, HingeJointFlag p_flag) const = 0;
@@ -665,10 +679,10 @@ public:
};
- virtual RID joint_create_slider(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) = 0; //reference frame is A
+ virtual void joint_make_slider(RID p_joint, RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) = 0; //reference frame is A
- virtual void slider_joint_set_param(RID p_joint, SliderJointParam p_param, float p_value) = 0;
- virtual float slider_joint_get_param(RID p_joint, SliderJointParam p_param) const = 0;
+ virtual void slider_joint_set_param(RID p_joint, SliderJointParam p_param, real_t p_value) = 0;
+ virtual real_t slider_joint_get_param(RID p_joint, SliderJointParam p_param) const = 0;
enum ConeTwistJointParam {
CONE_TWIST_JOINT_SWING_SPAN,
@@ -679,10 +693,10 @@ public:
CONE_TWIST_MAX
};
- virtual RID joint_create_cone_twist(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) = 0; //reference frame is A
+ virtual void joint_make_cone_twist(RID p_joint, RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) = 0; //reference frame is A
- virtual void cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, float p_value) = 0;
- virtual float cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const = 0;
+ virtual void cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, real_t p_value) = 0;
+ virtual real_t cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const = 0;
enum G6DOFJointAxisParam {
G6DOF_JOINT_LINEAR_LOWER_LIMIT,
@@ -720,13 +734,13 @@ public:
G6DOF_JOINT_FLAG_MAX
};
- virtual RID joint_create_generic_6dof(RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) = 0; //reference frame is A
+ virtual void joint_make_generic_6dof(RID p_joint, RID p_body_A, const Transform &p_local_frame_A, RID p_body_B, const Transform &p_local_frame_B) = 0; //reference frame is A
- virtual void generic_6dof_joint_set_param(RID p_joint, Vector3::Axis, G6DOFJointAxisParam p_param, float p_value) = 0;
- virtual float generic_6dof_joint_get_param(RID p_joint, Vector3::Axis, G6DOFJointAxisParam p_param) = 0;
+ virtual void generic_6dof_joint_set_param(RID p_joint, Vector3::Axis, G6DOFJointAxisParam p_param, real_t p_value) = 0;
+ virtual real_t generic_6dof_joint_get_param(RID p_joint, Vector3::Axis, G6DOFJointAxisParam p_param) const = 0;
virtual void generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis, G6DOFJointAxisFlag p_flag, bool p_enable) = 0;
- virtual bool generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis, G6DOFJointAxisFlag p_flag) = 0;
+ virtual bool generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis, G6DOFJointAxisFlag p_flag) const = 0;
/* QUERY API */
@@ -741,8 +755,10 @@ public:
virtual void set_active(bool p_active) = 0;
virtual void init() = 0;
- virtual void step(float p_step) = 0;
+ virtual void step(real_t p_step) = 0;
+ virtual void sync() = 0;
virtual void flush_queries() = 0;
+ virtual void end_sync() = 0;
virtual void finish() = 0;
virtual bool is_flushing_queries() const = 0;
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp
index 58bcdf5802..deb230c4fb 100644
--- a/servers/register_server_types.cpp
+++ b/servers/register_server_types.cpp
@@ -36,6 +36,7 @@
#include "audio/audio_effect.h"
#include "audio/audio_stream.h"
#include "audio/effects/audio_effect_amplify.h"
+#include "audio/effects/audio_effect_capture.h"
#include "audio/effects/audio_effect_chorus.h"
#include "audio/effects/audio_effect_compressor.h"
#include "audio/effects/audio_effect_delay.h"
@@ -60,6 +61,7 @@
#include "physics_2d/physics_server_2d_sw.h"
#include "physics_2d/physics_server_2d_wrap_mt.h"
#include "physics_3d/physics_server_3d_sw.h"
+#include "physics_3d/physics_server_3d_wrap_mt.h"
#include "physics_server_2d.h"
#include "physics_server_3d.h"
#include "rendering/renderer_compositor.h"
@@ -75,11 +77,19 @@
ShaderTypes *shader_types = nullptr;
PhysicsServer3D *_createGodotPhysics3DCallback() {
- return memnew(PhysicsServer3DSW);
+ bool using_threads = GLOBAL_GET("physics/3d/run_on_thread");
+
+ PhysicsServer3D *physics_server = memnew(PhysicsServer3DSW(using_threads));
+
+ return memnew(PhysicsServer3DWrapMT(physics_server, using_threads));
}
PhysicsServer2D *_createGodotPhysics2DCallback() {
- return PhysicsServer2DWrapMT::init_server<PhysicsServer2DSW>();
+ bool using_threads = GLOBAL_GET("physics/2d/run_on_thread");
+
+ PhysicsServer2D *physics_server = memnew(PhysicsServer2DSW(using_threads));
+
+ return memnew(PhysicsServer2DWrapMT(physics_server, using_threads));
}
static bool has_server_feature_callback(const String &p_feature) {
@@ -94,6 +104,16 @@ static bool has_server_feature_callback(const String &p_feature) {
void preregister_server_types() {
shader_types = memnew(ShaderTypes);
+
+ GLOBAL_DEF("internationalization/rendering/text_driver", "");
+ String text_driver_options;
+ for (int i = 0; i < TextServerManager::get_interface_count(); i++) {
+ if (i > 0) {
+ text_driver_options += ",";
+ }
+ text_driver_options += TextServerManager::get_interface_name(i);
+ }
+ ProjectSettings::get_singleton()->set_custom_property_info("internationalization/rendering/text_driver", PropertyInfo(Variant::STRING, "internationalization/rendering/text_driver", PROPERTY_HINT_ENUM, text_driver_options));
}
void register_server_types() {
@@ -166,6 +186,8 @@ void register_server_types() {
ClassDB::register_class<AudioEffectRecord>();
ClassDB::register_class<AudioEffectSpectrumAnalyzer>();
ClassDB::register_virtual_class<AudioEffectSpectrumAnalyzerInstance>();
+
+ ClassDB::register_class<AudioEffectCapture>();
}
ClassDB::register_virtual_class<RenderingDevice>();
diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp
index 2d2847e6ca..e34bc9acb8 100644
--- a/servers/rendering/renderer_canvas_cull.cpp
+++ b/servers/rendering/renderer_canvas_cull.cpp
@@ -97,7 +97,7 @@ void _collect_ysort_children(RendererCanvasCull::Item *p_canvas_item, Transform2
}
}
-void _mark_ysort_dirty(RendererCanvasCull::Item *ysort_owner, RID_PtrOwner<RendererCanvasCull::Item> &canvas_item_owner) {
+void _mark_ysort_dirty(RendererCanvasCull::Item *ysort_owner, RID_PtrOwner<RendererCanvasCull::Item, true> &canvas_item_owner) {
do {
ysort_owner->ysort_children_count = -1;
ysort_owner = canvas_item_owner.owns(ysort_owner->parent) ? canvas_item_owner.getornull(ysort_owner->parent) : nullptr;
@@ -356,12 +356,12 @@ bool RendererCanvasCull::was_sdf_used() {
return sdf_used;
}
-RID RendererCanvasCull::canvas_create() {
+RID RendererCanvasCull::canvas_allocate() {
+ return canvas_owner.allocate_rid();
+}
+void RendererCanvasCull::canvas_initialize(RID p_rid) {
Canvas *canvas = memnew(Canvas);
- ERR_FAIL_COND_V(!canvas, RID());
- RID rid = canvas_owner.make_rid(canvas);
-
- return rid;
+ canvas_owner.initialize_rid(p_rid, canvas);
}
void RendererCanvasCull::canvas_set_item_mirroring(RID p_canvas, RID p_item, const Point2 &p_mirroring) {
@@ -393,11 +393,12 @@ void RendererCanvasCull::canvas_set_parent(RID p_canvas, RID p_parent, float p_s
canvas->parent_scale = p_scale;
}
-RID RendererCanvasCull::canvas_item_create() {
+RID RendererCanvasCull::canvas_item_allocate() {
+ return canvas_item_owner.allocate_rid();
+}
+void RendererCanvasCull::canvas_item_initialize(RID p_rid) {
Item *canvas_item = memnew(Item);
- ERR_FAIL_COND_V(!canvas_item, RID());
-
- return canvas_item_owner.make_rid(canvas_item);
+ canvas_item_owner.initialize_rid(p_rid, canvas_item);
}
void RendererCanvasCull::canvas_item_set_parent(RID p_item, RID p_parent) {
@@ -721,8 +722,10 @@ void RendererCanvasCull::canvas_item_add_circle(RID p_item, const Point2 &p_pos,
static const int circle_points = 64;
points.resize(circle_points);
+ const real_t circle_point_step = Math_TAU / circle_points;
+
for (int i = 0; i < circle_points; i++) {
- float angle = (i / float(circle_points)) * 2 * Math_PI;
+ float angle = i * circle_point_step;
points.write[i].x = Math::cos(angle) * p_radius;
points.write[i].y = Math::sin(angle) * p_radius;
points.write[i] += p_pos;
@@ -1073,10 +1076,13 @@ void RendererCanvasCull::canvas_item_set_canvas_group_mode(RID p_item, RS::Canva
}
}
-RID RendererCanvasCull::canvas_light_create() {
+RID RendererCanvasCull::canvas_light_allocate() {
+ return canvas_light_owner.allocate_rid();
+}
+void RendererCanvasCull::canvas_light_initialize(RID p_rid) {
RendererCanvasRender::Light *clight = memnew(RendererCanvasRender::Light);
clight->light_internal = RSG::canvas_render->light_create();
- return canvas_light_owner.make_rid(clight);
+ return canvas_light_owner.initialize_rid(p_rid, clight);
}
void RendererCanvasCull::canvas_light_set_mode(RID p_light, RS::CanvasLightMode p_mode) {
@@ -1266,10 +1272,13 @@ void RendererCanvasCull::canvas_light_set_shadow_smooth(RID p_light, float p_smo
clight->shadow_smooth = p_smooth;
}
-RID RendererCanvasCull::canvas_light_occluder_create() {
+RID RendererCanvasCull::canvas_light_occluder_allocate() {
+ return canvas_light_occluder_owner.allocate_rid();
+}
+void RendererCanvasCull::canvas_light_occluder_initialize(RID p_rid) {
RendererCanvasRender::LightOccluderInstance *occluder = memnew(RendererCanvasRender::LightOccluderInstance);
- return canvas_light_occluder_owner.make_rid(occluder);
+ return canvas_light_occluder_owner.initialize_rid(p_rid, occluder);
}
void RendererCanvasCull::canvas_light_occluder_attach_to_canvas(RID p_occluder, RID p_canvas) {
@@ -1347,10 +1356,13 @@ void RendererCanvasCull::canvas_light_occluder_set_light_mask(RID p_occluder, in
occluder->light_mask = p_mask;
}
-RID RendererCanvasCull::canvas_occluder_polygon_create() {
+RID RendererCanvasCull::canvas_occluder_polygon_allocate() {
+ return canvas_light_occluder_polygon_owner.allocate_rid();
+}
+void RendererCanvasCull::canvas_occluder_polygon_initialize(RID p_rid) {
LightOccluderPolygon *occluder_poly = memnew(LightOccluderPolygon);
occluder_poly->occluder = RSG::canvas_render->occluder_polygon_create();
- return canvas_light_occluder_polygon_owner.make_rid(occluder_poly);
+ return canvas_light_occluder_polygon_owner.initialize_rid(p_rid, occluder_poly);
}
void RendererCanvasCull::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) {
@@ -1391,8 +1403,11 @@ void RendererCanvasCull::canvas_set_shadow_texture_size(int p_size) {
RSG::canvas_render->set_shadow_texture_size(p_size);
}
-RID RendererCanvasCull::canvas_texture_create() {
- return RSG::storage->canvas_texture_create();
+RID RendererCanvasCull::canvas_texture_allocate() {
+ return RSG::storage->canvas_texture_allocate();
+}
+void RendererCanvasCull::canvas_texture_initialize(RID p_rid) {
+ RSG::storage->canvas_texture_initialize(p_rid);
}
void RendererCanvasCull::canvas_texture_set_channel(RID p_canvas_texture, RS::CanvasTextureChannel p_channel, RID p_texture) {
diff --git a/servers/rendering/renderer_canvas_cull.h b/servers/rendering/renderer_canvas_cull.h
index 7496a413ee..b71f8e5a9a 100644
--- a/servers/rendering/renderer_canvas_cull.h
+++ b/servers/rendering/renderer_canvas_cull.h
@@ -101,9 +101,9 @@ public:
}
};
- RID_PtrOwner<LightOccluderPolygon> canvas_light_occluder_polygon_owner;
+ RID_PtrOwner<LightOccluderPolygon, true> canvas_light_occluder_polygon_owner;
- RID_PtrOwner<RendererCanvasRender::LightOccluderInstance> canvas_light_occluder_owner;
+ RID_PtrOwner<RendererCanvasRender::LightOccluderInstance, true> canvas_light_occluder_owner;
struct Canvas : public RendererViewport::CanvasBase {
Set<RID> viewports;
@@ -148,9 +148,9 @@ public:
}
};
- mutable RID_PtrOwner<Canvas> canvas_owner;
- RID_PtrOwner<Item> canvas_item_owner;
- RID_PtrOwner<RendererCanvasRender::Light> canvas_light_owner;
+ mutable RID_PtrOwner<Canvas, true> canvas_owner;
+ RID_PtrOwner<Item, true> canvas_item_owner;
+ RID_PtrOwner<RendererCanvasRender::Light, true> canvas_light_owner;
bool disable_scale;
bool sdf_used = false;
@@ -168,13 +168,17 @@ public:
bool was_sdf_used();
- RID canvas_create();
+ RID canvas_allocate();
+ void canvas_initialize(RID p_rid);
+
void canvas_set_item_mirroring(RID p_canvas, RID p_item, const Point2 &p_mirroring);
void canvas_set_modulate(RID p_canvas, const Color &p_color);
void canvas_set_parent(RID p_canvas, RID p_parent, float p_scale);
void canvas_set_disable_scale(bool p_disable);
- RID canvas_item_create();
+ RID canvas_item_allocate();
+ void canvas_item_initialize(RID p_rid);
+
void canvas_item_set_parent(RID p_item, RID p_parent);
void canvas_item_set_visible(RID p_item, bool p_visible);
@@ -222,7 +226,9 @@ public:
void canvas_item_set_canvas_group_mode(RID p_item, RS::CanvasGroupMode p_mode, float p_clear_margin = 5.0, bool p_fit_empty = false, float p_fit_margin = 0.0, bool p_blur_mipmaps = false);
- RID canvas_light_create();
+ RID canvas_light_allocate();
+ void canvas_light_initialize(RID p_rid);
+
void canvas_light_set_mode(RID p_light, RS::CanvasLightMode p_mode);
void canvas_light_attach_to_canvas(RID p_light, RID p_canvas);
void canvas_light_set_enabled(RID p_light, bool p_enabled);
@@ -246,7 +252,9 @@ public:
void canvas_light_set_shadow_color(RID p_light, const Color &p_color);
void canvas_light_set_shadow_smooth(RID p_light, float p_smooth);
- RID canvas_light_occluder_create();
+ RID canvas_light_occluder_allocate();
+ void canvas_light_occluder_initialize(RID p_rid);
+
void canvas_light_occluder_attach_to_canvas(RID p_occluder, RID p_canvas);
void canvas_light_occluder_set_enabled(RID p_occluder, bool p_enabled);
void canvas_light_occluder_set_polygon(RID p_occluder, RID p_polygon);
@@ -254,14 +262,18 @@ public:
void canvas_light_occluder_set_transform(RID p_occluder, const Transform2D &p_xform);
void canvas_light_occluder_set_light_mask(RID p_occluder, int p_mask);
- RID canvas_occluder_polygon_create();
+ RID canvas_occluder_polygon_allocate();
+ void canvas_occluder_polygon_initialize(RID p_rid);
+
void canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed);
void canvas_occluder_polygon_set_cull_mode(RID p_occluder_polygon, RS::CanvasOccluderPolygonCullMode p_mode);
void canvas_set_shadow_texture_size(int p_size);
- RID canvas_texture_create();
+ RID canvas_texture_allocate();
+ void canvas_texture_initialize(RID p_rid);
+
void canvas_texture_set_channel(RID p_canvas_texture, RS::CanvasTextureChannel p_channel, RID p_texture);
void canvas_texture_set_shading_parameters(RID p_canvas_texture, const Color &p_base_color, float p_shininess);
diff --git a/servers/rendering/renderer_rd/cluster_builder_rd.cpp b/servers/rendering/renderer_rd/cluster_builder_rd.cpp
index 8d9cff0f43..0fdd864d47 100644
--- a/servers/rendering/renderer_rd/cluster_builder_rd.cpp
+++ b/servers/rendering/renderer_rd/cluster_builder_rd.cpp
@@ -400,12 +400,14 @@ void ClusterBuilderRD::begin(const Transform &p_view_transform, const CameraMatr
void ClusterBuilderRD::bake_cluster() {
RENDER_TIMESTAMP(">Bake Cluster");
+ RD::get_singleton()->draw_command_begin_label("Bake Light Cluster");
+
//clear cluster buffer
- RD::get_singleton()->buffer_clear(cluster_buffer, 0, cluster_buffer_size, true);
+ RD::get_singleton()->buffer_clear(cluster_buffer, 0, cluster_buffer_size, RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_COMPUTE);
if (render_element_count > 0) {
//clear render buffer
- RD::get_singleton()->buffer_clear(cluster_render_buffer, 0, cluster_render_buffer_size, true);
+ RD::get_singleton()->buffer_clear(cluster_render_buffer, 0, cluster_render_buffer_size, RD::BARRIER_MASK_RASTER);
{ //fill state uniform
@@ -420,12 +422,12 @@ void ClusterBuilderRD::bake_cluster() {
state.cluster_depth_offset = (render_element_max / 32);
state.cluster_data_size = state.cluster_depth_offset + render_element_max;
- RD::get_singleton()->buffer_update(state_uniform, 0, sizeof(StateUniform), &state, true);
+ RD::get_singleton()->buffer_update(state_uniform, 0, sizeof(StateUniform), &state, RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_COMPUTE);
}
//update instances
- RD::get_singleton()->buffer_update(element_buffer, 0, sizeof(RenderElementData) * render_element_count, render_elements, true);
+ RD::get_singleton()->buffer_update(element_buffer, 0, sizeof(RenderElementData) * render_element_count, render_elements, RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_COMPUTE);
RENDER_TIMESTAMP("Render Elements");
@@ -469,7 +471,7 @@ void ClusterBuilderRD::bake_cluster() {
RD::get_singleton()->draw_list_draw(draw_list, true, instances);
i += instances;
}
- RD::get_singleton()->draw_list_end();
+ RD::get_singleton()->draw_list_end(RD::BARRIER_MASK_COMPUTE);
}
//store elements
RENDER_TIMESTAMP("Pack Elements");
@@ -491,12 +493,15 @@ void ClusterBuilderRD::bake_cluster() {
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(ClusterBuilderSharedDataRD::ClusterStore::PushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, cluster_screen_size.x, cluster_screen_size.y, 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, cluster_screen_size.x, cluster_screen_size.y, 1);
- RD::get_singleton()->compute_list_end();
+ RD::get_singleton()->compute_list_end(RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_COMPUTE);
}
+ } else {
+ RD::get_singleton()->barrier(RD::BARRIER_MASK_TRANSFER, RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_COMPUTE);
}
RENDER_TIMESTAMP("<Bake Cluster");
+ RD::get_singleton()->draw_command_end_label();
}
void ClusterBuilderRD::debug(ElementType p_element) {
@@ -519,7 +524,7 @@ void ClusterBuilderRD::debug(ElementType p_element) {
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(ClusterBuilderSharedDataRD::ClusterDebug::PushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, screen_size.x, screen_size.y, 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, screen_size.x, screen_size.y, 1);
RD::get_singleton()->compute_list_end();
}
diff --git a/servers/rendering/renderer_rd/effects_rd.cpp b/servers/rendering/renderer_rd/effects_rd.cpp
index 6e1d61ff94..bc304aedd8 100644
--- a/servers/rendering/renderer_rd/effects_rd.cpp
+++ b/servers/rendering/renderer_rd/effects_rd.cpp
@@ -299,15 +299,12 @@ void EffectsRD::copy_to_rect(RID p_source_rd_texture, RID p_dest_texture, const
copy.push_constant.target[0] = p_rect.position.x;
copy.push_constant.target[1] = p_rect.position.y;
- int32_t x_groups = (p_rect.size.width - 1) / 8 + 1;
- int32_t y_groups = (p_rect.size.height - 1) / 8 + 1;
-
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[p_8_bit_dst ? COPY_MODE_SIMPLY_COPY_8BIT : COPY_MODE_SIMPLY_COPY]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 3);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy.push_constant, sizeof(CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_rect.size.width, p_rect.size.height, 1);
RD::get_singleton()->compute_list_end();
}
@@ -322,15 +319,12 @@ void EffectsRD::copy_cubemap_to_panorama(RID p_source_cube, RID p_dest_panorama,
copy.push_constant.target[1] = 0;
copy.push_constant.camera_z_far = p_lod;
- int32_t x_groups = (p_panorama_size.width - 1) / 8 + 1;
- int32_t y_groups = (p_panorama_size.height - 1) / 8 + 1;
-
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[p_is_array ? COPY_MODE_CUBE_ARRAY_TO_PANORAMA : COPY_MODE_CUBE_TO_PANORAMA]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_cube), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_panorama), 3);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy.push_constant, sizeof(CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_panorama_size.width, p_panorama_size.height, 1);
RD::get_singleton()->compute_list_end();
}
@@ -349,15 +343,12 @@ void EffectsRD::copy_depth_to_rect_and_linearize(RID p_source_rd_texture, RID p_
copy.push_constant.camera_z_far = p_z_far;
copy.push_constant.camera_z_near = p_z_near;
- int32_t x_groups = (p_rect.size.width - 1) / 8 + 1;
- int32_t y_groups = (p_rect.size.height - 1) / 8 + 1;
-
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[COPY_MODE_LINEARIZE_DEPTH]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 3);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy.push_constant, sizeof(CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_rect.size.width, p_rect.size.height, 1);
RD::get_singleton()->compute_list_end();
}
@@ -374,15 +365,12 @@ void EffectsRD::copy_depth_to_rect(RID p_source_rd_texture, RID p_dest_texture,
copy.push_constant.target[0] = p_rect.position.x;
copy.push_constant.target[1] = p_rect.position.y;
- int32_t x_groups = (p_rect.size.width - 1) / 8 + 1;
- int32_t y_groups = (p_rect.size.height - 1) / 8 + 1;
-
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[COPY_MODE_SIMPLY_COPY_DEPTH]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 3);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy.push_constant, sizeof(CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_rect.size.width, p_rect.size.height, 1);
RD::get_singleton()->compute_list_end();
}
@@ -400,14 +388,11 @@ void EffectsRD::set_color(RID p_dest_texture, const Color &p_color, const Rect2i
copy.push_constant.set_color[2] = p_color.b;
copy.push_constant.set_color[3] = p_color.a;
- int32_t x_groups = (p_region.size.width - 1) / 8 + 1;
- int32_t y_groups = (p_region.size.height - 1) / 8 + 1;
-
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[p_8bit_dst ? COPY_MODE_SET_COLOR_8BIT : COPY_MODE_SET_COLOR]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 3);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy.push_constant, sizeof(CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_region.size.width, p_region.size.height, 1);
RD::get_singleton()->compute_list_end();
}
@@ -420,8 +405,6 @@ void EffectsRD::gaussian_blur(RID p_source_rd_texture, RID p_texture, RID p_back
copy.push_constant.section[2] = p_region.size.width;
copy.push_constant.section[3] = p_region.size.height;
- int32_t x_groups = (p_region.size.width - 1) / 8 + 1;
- int32_t y_groups = (p_region.size.height - 1) / 8 + 1;
//HORIZONTAL
RD::DrawListID compute_list = RD::get_singleton()->compute_list_begin();
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[p_8bit_dst ? COPY_MODE_GAUSSIAN_COPY_8BIT : COPY_MODE_GAUSSIAN_COPY]);
@@ -431,7 +414,7 @@ void EffectsRD::gaussian_blur(RID p_source_rd_texture, RID p_texture, RID p_back
copy.push_constant.flags = base_flags | COPY_FLAG_HORIZONTAL;
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy.push_constant, sizeof(CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_region.size.width, p_region.size.height, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
@@ -442,7 +425,7 @@ void EffectsRD::gaussian_blur(RID p_source_rd_texture, RID p_texture, RID p_back
copy.push_constant.flags = base_flags;
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy.push_constant, sizeof(CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_region.size.width, p_region.size.height, 1);
RD::get_singleton()->compute_list_end();
}
@@ -452,9 +435,6 @@ void EffectsRD::gaussian_glow(RID p_source_rd_texture, RID p_back_texture, const
CopyMode copy_mode = p_first_pass && p_auto_exposure.is_valid() ? COPY_MODE_GAUSSIAN_GLOW_AUTO_EXPOSURE : COPY_MODE_GAUSSIAN_GLOW;
uint32_t base_flags = 0;
- int32_t x_groups = (p_size.width + 7) / 8;
- int32_t y_groups = (p_size.height + 7) / 8;
-
copy.push_constant.section[2] = p_size.x;
copy.push_constant.section[3] = p_size.y;
@@ -479,16 +459,13 @@ void EffectsRD::gaussian_glow(RID p_source_rd_texture, RID p_back_texture, const
copy.push_constant.flags = base_flags | (p_first_pass ? COPY_FLAG_GLOW_FIRST_PASS : 0) | (p_high_quality ? COPY_FLAG_HIGH_QUALITY_GLOW : 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy.push_constant, sizeof(CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_size.width, p_size.height, 1);
RD::get_singleton()->compute_list_end();
}
void EffectsRD::screen_space_reflection(RID p_diffuse, RID p_normal_roughness, RenderingServer::EnvironmentSSRRoughnessQuality p_roughness_quality, RID p_blur_radius, RID p_blur_radius2, RID p_metallic, const Color &p_metallic_mask, RID p_depth, RID p_scale_depth, RID p_scale_normal, RID p_output, RID p_output_blur, const Size2i &p_screen_size, int p_max_steps, float p_fade_in, float p_fade_out, float p_tolerance, const CameraMatrix &p_camera) {
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
- int32_t x_groups = (p_screen_size.width - 1) / 8 + 1;
- int32_t y_groups = (p_screen_size.height - 1) / 8 + 1;
-
{ //scale color and depth to half
ssr_scale.push_constant.camera_z_far = p_camera.get_z_far();
ssr_scale.push_constant.camera_z_near = p_camera.get_z_near();
@@ -506,7 +483,7 @@ void EffectsRD::screen_space_reflection(RID p_diffuse, RID p_normal_roughness, R
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ssr_scale.push_constant, sizeof(ScreenSpaceReflectionScalePushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_screen_size.width, p_screen_size.height, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
}
@@ -547,7 +524,7 @@ void EffectsRD::screen_space_reflection(RID p_diffuse, RID p_normal_roughness, R
}
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_scale_normal), 2);
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_screen_size.width, p_screen_size.height, 1);
}
if (p_roughness_quality != RS::ENV_SSR_ROUGNESS_QUALITY_DISABLED) {
@@ -585,7 +562,7 @@ void EffectsRD::screen_space_reflection(RID p_diffuse, RID p_normal_roughness, R
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ssr_filter.push_constant, sizeof(ScreenSpaceReflectionFilterPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_screen_size.width, p_screen_size.height, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
@@ -600,7 +577,7 @@ void EffectsRD::screen_space_reflection(RID p_diffuse, RID p_normal_roughness, R
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ssr_filter.push_constant, sizeof(ScreenSpaceReflectionFilterPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_screen_size.width, p_screen_size.height, 1);
}
RD::get_singleton()->compute_list_end();
@@ -609,9 +586,6 @@ void EffectsRD::screen_space_reflection(RID p_diffuse, RID p_normal_roughness, R
void EffectsRD::sub_surface_scattering(RID p_diffuse, RID p_diffuse2, RID p_depth, const CameraMatrix &p_camera, const Size2i &p_screen_size, float p_scale, float p_depth_scale, RenderingServer::SubSurfaceScatteringQuality p_quality) {
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
- int32_t x_groups = (p_screen_size.width - 1) / 8 + 1;
- int32_t y_groups = (p_screen_size.height - 1) / 8 + 1;
-
Plane p = p_camera.xform4(Plane(1, 0, -1, 1));
p.normal /= p.d;
float unit_size = p.normal.x;
@@ -635,7 +609,7 @@ void EffectsRD::sub_surface_scattering(RID p_diffuse, RID p_diffuse2, RID p_dept
RD::get_singleton()->compute_list_set_push_constant(compute_list, &sss.push_constant, sizeof(SubSurfaceScatteringPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_screen_size.width, p_screen_size.height, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
@@ -646,7 +620,7 @@ void EffectsRD::sub_surface_scattering(RID p_diffuse, RID p_diffuse2, RID p_dept
sss.push_constant.vertical = true;
RD::get_singleton()->compute_list_set_push_constant(compute_list, &sss.push_constant, sizeof(SubSurfaceScatteringPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_screen_size.width, p_screen_size.height, 1);
RD::get_singleton()->compute_list_end();
}
@@ -690,39 +664,33 @@ void EffectsRD::make_mipmap(RID p_source_rd_texture, RID p_dest_texture, const S
copy.push_constant.section[2] = p_size.width;
copy.push_constant.section[3] = p_size.height;
- int32_t x_groups = (p_size.width - 1) / 8 + 1;
- int32_t y_groups = (p_size.height - 1) / 8 + 1;
-
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, copy.pipelines[COPY_MODE_MIPMAP]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 3);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy.push_constant, sizeof(CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_size.width, p_size.height, 1);
RD::get_singleton()->compute_list_end();
}
-void EffectsRD::copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, float p_z_near, float p_z_far, float p_bias, bool p_dp_flip) {
+void EffectsRD::copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dst_framebuffer, const Rect2 &p_rect, float p_z_near, float p_z_far, bool p_dp_flip) {
CopyToDPPushConstant push_constant;
- push_constant.screen_size[0] = p_rect.size.x;
- push_constant.screen_size[1] = p_rect.size.y;
- push_constant.dest_offset[0] = p_rect.position.x;
- push_constant.dest_offset[1] = p_rect.position.y;
- push_constant.bias = p_bias;
+ push_constant.screen_rect[0] = p_rect.position.x;
+ push_constant.screen_rect[1] = p_rect.position.y;
+ push_constant.screen_rect[2] = p_rect.size.width;
+ push_constant.screen_rect[3] = p_rect.size.height;
push_constant.z_far = p_z_far;
push_constant.z_near = p_z_near;
push_constant.z_flip = p_dp_flip;
- int32_t x_groups = (p_rect.size.width - 1) / 8 + 1;
- int32_t y_groups = (p_rect.size.height - 1) / 8 + 1;
+ RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_dst_framebuffer, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ);
+ RD::get_singleton()->draw_list_bind_render_pipeline(draw_list, cube_to_dp.pipeline.get_render_pipeline(RD::INVALID_ID, RD::get_singleton()->framebuffer_get_format(p_dst_framebuffer)));
+ RD::get_singleton()->draw_list_bind_uniform_set(draw_list, _get_uniform_set_from_texture(p_source_rd_texture), 0);
+ RD::get_singleton()->draw_list_bind_index_array(draw_list, index_array);
- RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
- RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, cube_to_dp.pipeline);
- RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_rd_texture), 0);
- RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_dest_texture), 1);
- RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(CopyToDPPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
- RD::get_singleton()->compute_list_end();
+ RD::get_singleton()->draw_list_set_push_constant(draw_list, &push_constant, sizeof(CopyToDPPushConstant));
+ RD::get_singleton()->draw_list_draw(draw_list, true);
+ RD::get_singleton()->draw_list_end(RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_TRANSFER);
}
void EffectsRD::tonemapper(RID p_source_color, RID p_dst_framebuffer, const TonemapSettings &p_settings) {
@@ -807,10 +775,7 @@ void EffectsRD::luminance_reduction(RID p_source_texture, const Size2i p_source_
RD::get_singleton()->compute_list_set_push_constant(compute_list, &luminance_reduce.push_constant, sizeof(LuminanceReducePushConstant));
- int32_t x_groups = (luminance_reduce.push_constant.source_size[0] - 1) / 8 + 1;
- int32_t y_groups = (luminance_reduce.push_constant.source_size[1] - 1) / 8 + 1;
-
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, luminance_reduce.push_constant.source_size[0], luminance_reduce.push_constant.source_size[1], 1);
luminance_reduce.push_constant.source_size[0] = MAX(luminance_reduce.push_constant.source_size[0] / 8, 1);
luminance_reduce.push_constant.source_size[1] = MAX(luminance_reduce.push_constant.source_size[1] / 8, 1);
@@ -851,14 +816,12 @@ void EffectsRD::bokeh_dof(RID p_base_texture, RID p_depth_texture, const Size2i
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_base_texture), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_depth_texture), 1);
- int32_t x_groups = (p_base_texture_size.x - 1) / 8 + 1;
- int32_t y_groups = (p_base_texture_size.y - 1) / 8 + 1;
bokeh.push_constant.size[0] = p_base_texture_size.x;
bokeh.push_constant.size[1] = p_base_texture_size.y;
RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_base_texture_size.x, p_base_texture_size.y, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
if (p_bokeh_shape == RS::DOF_BOKEH_BOX || p_bokeh_shape == RS::DOF_BOKEH_HEXAGON) {
@@ -875,8 +838,6 @@ void EffectsRD::bokeh_dof(RID p_base_texture, RID p_depth_texture, const Size2i
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_halfsize_texture1), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_base_texture), 1);
- x_groups = ((p_base_texture_size.x >> 1) - 1) / 8 + 1;
- y_groups = ((p_base_texture_size.y >> 1) - 1) / 8 + 1;
bokeh.push_constant.size[0] = p_base_texture_size.x >> 1;
bokeh.push_constant.size[1] = p_base_texture_size.y >> 1;
bokeh.push_constant.half_size = true;
@@ -890,7 +851,7 @@ void EffectsRD::bokeh_dof(RID p_base_texture, RID p_depth_texture, const Size2i
RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, bokeh.push_constant.size[0], bokeh.push_constant.size[1], 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
//third pass
@@ -906,7 +867,7 @@ void EffectsRD::bokeh_dof(RID p_base_texture, RID p_depth_texture, const Size2i
RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, bokeh.push_constant.size[0], bokeh.push_constant.size[1], 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
if (p_quality == RS::DOF_BLUR_QUALITY_VERY_LOW || p_quality == RS::DOF_BLUR_QUALITY_LOW) {
@@ -917,8 +878,6 @@ void EffectsRD::bokeh_dof(RID p_base_texture, RID p_depth_texture, const Size2i
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_base_texture), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_halfsize_texture2), 1);
- x_groups = (p_base_texture_size.x - 1) / 8 + 1;
- y_groups = (p_base_texture_size.y - 1) / 8 + 1;
bokeh.push_constant.size[0] = p_base_texture_size.x;
bokeh.push_constant.size[1] = p_base_texture_size.y;
bokeh.push_constant.half_size = false;
@@ -926,7 +885,7 @@ void EffectsRD::bokeh_dof(RID p_base_texture, RID p_depth_texture, const Size2i
RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_base_texture_size.x, p_base_texture_size.y, 1);
}
} else {
//circle
@@ -944,15 +903,13 @@ void EffectsRD::bokeh_dof(RID p_base_texture, RID p_depth_texture, const Size2i
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_halfsize_texture1), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_base_texture), 1);
- x_groups = ((p_base_texture_size.x >> 1) - 1) / 8 + 1;
- y_groups = ((p_base_texture_size.y >> 1) - 1) / 8 + 1;
bokeh.push_constant.size[0] = p_base_texture_size.x >> 1;
bokeh.push_constant.size[1] = p_base_texture_size.y >> 1;
bokeh.push_constant.half_size = true;
RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, bokeh.push_constant.size[0], bokeh.push_constant.size[1], 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
//circle is just one pass, then upscale
@@ -964,8 +921,6 @@ void EffectsRD::bokeh_dof(RID p_base_texture, RID p_depth_texture, const Size2i
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_base_texture), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_halfsize_texture1), 1);
- x_groups = (p_base_texture_size.x - 1) / 8 + 1;
- y_groups = (p_base_texture_size.y - 1) / 8 + 1;
bokeh.push_constant.size[0] = p_base_texture_size.x;
bokeh.push_constant.size[1] = p_base_texture_size.y;
bokeh.push_constant.half_size = false;
@@ -973,7 +928,7 @@ void EffectsRD::bokeh_dof(RID p_base_texture, RID p_depth_texture, const Size2i
RD::get_singleton()->compute_list_set_push_constant(compute_list, &bokeh.push_constant, sizeof(BokehPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_base_texture_size.x, p_base_texture_size.y, 1);
}
RD::get_singleton()->compute_list_end();
@@ -998,20 +953,20 @@ void EffectsRD::gather_ssao(RD::ComputeListID p_compute_list, const Vector<RID>
RD::get_singleton()->compute_list_bind_uniform_set(p_compute_list, _get_uniform_set_from_image(p_ao_slices[i]), 2);
RD::get_singleton()->compute_list_set_push_constant(p_compute_list, &ssao.gather_push_constant, sizeof(SSAOGatherPushConstant));
- int x_groups = ((p_settings.full_screen_size.x >> (p_settings.half_size ? 2 : 1)) - 1) / 8 + 1;
- int y_groups = ((p_settings.full_screen_size.y >> (p_settings.half_size ? 2 : 1)) - 1) / 8 + 1;
+ Size2i size = Size2i(p_settings.full_screen_size.x >> (p_settings.half_size ? 2 : 1), p_settings.full_screen_size.y >> (p_settings.half_size ? 2 : 1));
- RD::get_singleton()->compute_list_dispatch(p_compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(p_compute_list, size.x, size.y, 1);
}
RD::get_singleton()->compute_list_add_barrier(p_compute_list);
}
void EffectsRD::generate_ssao(RID p_depth_buffer, RID p_normal_buffer, RID p_depth_mipmaps_texture, const Vector<RID> &p_depth_mipmaps, RID p_ao, const Vector<RID> p_ao_slices, RID p_ao_pong, const Vector<RID> p_ao_pong_slices, RID p_upscale_buffer, RID p_importance_map, RID p_importance_map_pong, const CameraMatrix &p_projection, const SSAOSettings &p_settings, bool p_invalidate_uniform_sets) {
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
-
+ RD::get_singleton()->draw_command_begin_label("SSAO");
/* FIRST PASS */
// Downsample and deinterleave the depth buffer.
{
+ RD::get_singleton()->draw_command_begin_label("Downsample Depth");
if (p_invalidate_uniform_sets) {
Vector<RD::Uniform> uniforms;
{
@@ -1074,16 +1029,17 @@ void EffectsRD::generate_ssao(RID p_depth_buffer, RID p_normal_buffer, RID p_dep
}
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ssao.downsample_push_constant, sizeof(SSAODownsamplePushConstant));
- int x_groups = (MAX(1, p_settings.full_screen_size.x >> (p_settings.half_size ? 2 : 1)) - 1) / 8 + 1;
- int y_groups = (MAX(1, p_settings.full_screen_size.y >> (p_settings.half_size ? 2 : 1)) - 1) / 8 + 1;
+ Size2i size(MAX(1, p_settings.full_screen_size.x >> (p_settings.half_size ? 2 : 1)), MAX(1, p_settings.full_screen_size.y >> (p_settings.half_size ? 2 : 1)));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, size.x, size.y, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
+ RD::get_singleton()->draw_command_end_label(); // Downsample SSAO
}
/* SECOND PASS */
// Sample SSAO
{
+ RD::get_singleton()->draw_command_begin_label("Gather Samples");
ssao.gather_push_constant.screen_size[0] = p_settings.full_screen_size.x;
ssao.gather_push_constant.screen_size[1] = p_settings.full_screen_size.y;
@@ -1184,6 +1140,7 @@ void EffectsRD::generate_ssao(RID p_depth_buffer, RID p_normal_buffer, RID p_dep
}
if (p_settings.quality == RS::ENV_SSAO_QUALITY_ULTRA) {
+ RD::get_singleton()->draw_command_begin_label("Generate Importance Map");
ssao.importance_map_push_constant.half_screen_pixel_size[0] = 1.0 / p_settings.half_screen_size.x;
ssao.importance_map_push_constant.half_screen_pixel_size[1] = 1.0 / p_settings.half_screen_size.y;
ssao.importance_map_push_constant.intensity = p_settings.intensity;
@@ -1192,21 +1149,19 @@ void EffectsRD::generate_ssao(RID p_depth_buffer, RID p_normal_buffer, RID p_dep
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, ssao.pipelines[SSAO_GATHER_BASE]);
gather_ssao(compute_list, p_ao_pong_slices, p_settings, true);
//generate importance map
- int x_groups = (p_settings.quarter_screen_size.x - 1) / 8 + 1;
- int y_groups = (p_settings.quarter_screen_size.y - 1) / 8 + 1;
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, ssao.pipelines[SSAO_GENERATE_IMPORTANCE_MAP]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_ao_pong), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_importance_map), 1);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ssao.importance_map_push_constant, sizeof(SSAOImportanceMapPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_settings.quarter_screen_size.x, p_settings.quarter_screen_size.y, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
//process importance map A
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, ssao.pipelines[SSAO_PROCESS_IMPORTANCE_MAPA]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_importance_map), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_importance_map_pong), 1);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ssao.importance_map_push_constant, sizeof(SSAOImportanceMapPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_settings.quarter_screen_size.x, p_settings.quarter_screen_size.y, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
//process Importance Map B
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, ssao.pipelines[SSAO_PROCESS_IMPORTANCE_MAPB]);
@@ -1214,21 +1169,24 @@ void EffectsRD::generate_ssao(RID p_depth_buffer, RID p_normal_buffer, RID p_dep
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_importance_map), 1);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, ssao.counter_uniform_set, 2);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ssao.importance_map_push_constant, sizeof(SSAOImportanceMapPushConstant));
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_settings.quarter_screen_size.x, p_settings.quarter_screen_size.y, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, ssao.pipelines[SSAO_GATHER_ADAPTIVE]);
+ RD::get_singleton()->draw_command_end_label(); // Importance Map
} else {
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, ssao.pipelines[SSAO_GATHER]);
}
gather_ssao(compute_list, p_ao_slices, p_settings, false);
+ RD::get_singleton()->draw_command_end_label(); // Gather SSAO
}
// /* THIRD PASS */
// // Blur
//
{
+ RD::get_singleton()->draw_command_begin_label("Edge Aware Blur");
ssao.blur_push_constant.edge_sharpness = 1.0 - p_settings.sharpness;
ssao.blur_push_constant.half_screen_pixel_size[0] = 1.0 / p_settings.half_screen_size.x;
ssao.blur_push_constant.half_screen_pixel_size[1] = 1.0 / p_settings.half_screen_size.y;
@@ -1268,22 +1226,22 @@ void EffectsRD::generate_ssao(RID p_depth_buffer, RID p_normal_buffer, RID p_dep
}
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ssao.blur_push_constant, sizeof(SSAOBlurPushConstant));
- int x_groups = ((p_settings.full_screen_size.x >> (p_settings.half_size ? 2 : 1)) - 1) / 8 + 1;
- int y_groups = ((p_settings.full_screen_size.y >> (p_settings.half_size ? 2 : 1)) - 1) / 8 + 1;
-
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ Size2i size(p_settings.full_screen_size.x >> (p_settings.half_size ? 2 : 1), p_settings.full_screen_size.y >> (p_settings.half_size ? 2 : 1));
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, size.x, size.y, 1);
}
if (p_settings.quality > RS::ENV_SSAO_QUALITY_VERY_LOW) {
RD::get_singleton()->compute_list_add_barrier(compute_list);
}
}
+ RD::get_singleton()->draw_command_end_label(); // Blur
}
/* FOURTH PASS */
// Interleave buffers
// back to full size
{
+ RD::get_singleton()->draw_command_begin_label("Interleave Buffers");
ssao.interleave_push_constant.inv_sharpness = 1.0 - p_settings.sharpness;
ssao.interleave_push_constant.pixel_size[0] = 1.0 / p_settings.full_screen_size.x;
ssao.interleave_push_constant.pixel_size[1] = 1.0 / p_settings.full_screen_size.y;
@@ -1307,17 +1265,15 @@ void EffectsRD::generate_ssao(RID p_depth_buffer, RID p_normal_buffer, RID p_dep
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ssao.interleave_push_constant, sizeof(SSAOInterleavePushConstant));
- int x_groups = (p_settings.full_screen_size.x - 1) / 8 + 1;
- int y_groups = (p_settings.full_screen_size.y - 1) / 8 + 1;
-
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_settings.full_screen_size.x, p_settings.full_screen_size.y, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
+ RD::get_singleton()->draw_command_end_label(); // Interleave
}
-
- RD::get_singleton()->compute_list_end();
+ RD::get_singleton()->draw_command_end_label(); //SSAO
+ RD::get_singleton()->compute_list_end(RD::BARRIER_MASK_TRANSFER); //wait for upcoming transfer
int zero[1] = { 0 };
- RD::get_singleton()->buffer_update(ssao.importance_map_load_counter, 0, sizeof(uint32_t), &zero, false);
+ RD::get_singleton()->buffer_update(ssao.importance_map_load_counter, 0, sizeof(uint32_t), &zero, 0); //no barrier
}
void EffectsRD::roughness_limit(RID p_source_normal, RID p_roughness, const Size2i &p_size, float p_curve) {
@@ -1330,12 +1286,9 @@ void EffectsRD::roughness_limit(RID p_source_normal, RID p_roughness, const Size
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_texture(p_source_normal), 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_uniform_set_from_image(p_roughness), 1);
- int x_groups = (p_size.x - 1) / 8 + 1;
- int y_groups = (p_size.y - 1) / 8 + 1;
-
RD::get_singleton()->compute_list_set_push_constant(compute_list, &roughness_limiter.push_constant, sizeof(RoughnessLimiterPushConstant)); //not used but set anyway
- RD::get_singleton()->compute_list_dispatch(compute_list, x_groups, y_groups, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_size.x, p_size.y, 1);
RD::get_singleton()->compute_list_end();
}
@@ -1448,7 +1401,7 @@ void EffectsRD::render_sky(RD::DrawListID p_list, float p_time, RID p_fb, RID p_
RD::get_singleton()->draw_list_draw(draw_list, true);
}
-void EffectsRD::resolve_gi(RID p_source_depth, RID p_source_normal_roughness, RID p_source_giprobe, RID p_dest_depth, RID p_dest_normal_roughness, RID p_dest_giprobe, Vector2i p_screen_size, int p_samples) {
+void EffectsRD::resolve_gi(RID p_source_depth, RID p_source_normal_roughness, RID p_source_giprobe, RID p_dest_depth, RID p_dest_normal_roughness, RID p_dest_giprobe, Vector2i p_screen_size, int p_samples, uint32_t p_barrier) {
ResolvePushConstant push_constant;
push_constant.screen_size[0] = p_screen_size.x;
push_constant.screen_size[1] = p_screen_size.y;
@@ -1465,54 +1418,9 @@ void EffectsRD::resolve_gi(RID p_source_depth, RID p_source_normal_roughness, RI
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(ResolvePushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_screen_size.x, p_screen_size.y, 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_screen_size.x, p_screen_size.y, 1);
- RD::get_singleton()->compute_list_end();
-}
-
-void EffectsRD::reduce_shadow(RID p_source_shadow, RID p_dest_shadow, const Size2i &p_source_size, const Rect2i &p_source_rect, int p_shrink_limit, RD::ComputeListID compute_list) {
- uint32_t push_constant[8] = { (uint32_t)p_source_size.x, (uint32_t)p_source_size.y, (uint32_t)p_source_rect.position.x, (uint32_t)p_source_rect.position.y, (uint32_t)p_shrink_limit, 0, 0, 0 };
-
- RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, shadow_reduce.pipelines[SHADOW_REDUCE_REDUCE]);
- RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_image_pair(p_source_shadow, p_dest_shadow), 0);
- RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(uint32_t) * 8);
-
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_source_rect.size.width, p_source_rect.size.height, 1, 8, 8, 1);
-}
-void EffectsRD::filter_shadow(RID p_shadow, RID p_backing_shadow, const Size2i &p_source_size, const Rect2i &p_source_rect, RenderingServer::EnvVolumetricFogShadowFilter p_filter, RD::ComputeListID compute_list, bool p_vertical, bool p_horizontal) {
- uint32_t push_constant[8] = { (uint32_t)p_source_size.x, (uint32_t)p_source_size.y, (uint32_t)p_source_rect.position.x, (uint32_t)p_source_rect.position.y, 0, 0, 0, 0 };
-
- switch (p_filter) {
- case RS::ENV_VOLUMETRIC_FOG_SHADOW_FILTER_DISABLED:
- case RS::ENV_VOLUMETRIC_FOG_SHADOW_FILTER_LOW: {
- push_constant[5] = 0;
- } break;
- case RS::ENV_VOLUMETRIC_FOG_SHADOW_FILTER_MEDIUM: {
- push_constant[5] = 9;
- } break;
- case RS::ENV_VOLUMETRIC_FOG_SHADOW_FILTER_HIGH: {
- push_constant[5] = 18;
- } break;
- }
-
- RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, shadow_reduce.pipelines[SHADOW_REDUCE_FILTER]);
- if (p_vertical) {
- push_constant[6] = 1;
- push_constant[7] = 0;
- RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_image_pair(p_shadow, p_backing_shadow), 0);
- RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(uint32_t) * 8);
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_source_rect.size.width, p_source_rect.size.height, 1, 8, 8, 1);
- }
- if (p_vertical && p_horizontal) {
- RD::get_singleton()->compute_list_add_barrier(compute_list);
- }
- if (p_horizontal) {
- push_constant[6] = 0;
- push_constant[7] = 1;
- RD::get_singleton()->compute_list_bind_uniform_set(compute_list, _get_compute_uniform_set_from_image_pair(p_backing_shadow, p_shadow), 0);
- RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(uint32_t) * 8);
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_source_rect.size.width, p_source_rect.size.height, 1, 8, 8, 1);
- }
+ RD::get_singleton()->compute_list_end(p_barrier);
}
void EffectsRD::sort_buffer(RID p_uniform_set, int p_size) {
@@ -1678,8 +1586,12 @@ EffectsRD::EffectsRD() {
cube_to_dp.shader.initialize(copy_modes);
cube_to_dp.shader_version = cube_to_dp.shader.version_create();
-
- cube_to_dp.pipeline = RD::get_singleton()->compute_pipeline_create(cube_to_dp.shader.version_get_shader(cube_to_dp.shader_version, 0));
+ RID shader = cube_to_dp.shader.version_get_shader(cube_to_dp.shader_version, 0);
+ RD::PipelineDepthStencilState dss;
+ dss.enable_depth_test = true;
+ dss.depth_compare_operator = RD::COMPARE_OP_ALWAYS;
+ dss.enable_depth_write = true;
+ cube_to_dp.pipeline.setup(shader, RD::RENDER_PRIMITIVE_TRIANGLES, RD::PipelineRasterizationState(), RD::PipelineMultisampleState(), dss, RD::PipelineColorBlendState(), 0);
}
{
@@ -1776,7 +1688,7 @@ EffectsRD::EffectsRD() {
}
}
- RD::get_singleton()->buffer_update(ssao.gather_constants_buffer, 0, sizeof(SSAOGatherConstants), &gather_constants, false);
+ RD::get_singleton()->buffer_update(ssao.gather_constants_buffer, 0, sizeof(SSAOGatherConstants), &gather_constants);
}
{
Vector<String> ssao_modes;
@@ -1795,7 +1707,8 @@ EffectsRD::EffectsRD() {
}
ssao.importance_map_load_counter = RD::get_singleton()->storage_buffer_create(sizeof(uint32_t));
int zero[1] = { 0 };
- RD::get_singleton()->buffer_update(ssao.importance_map_load_counter, 0, sizeof(uint32_t), &zero, false);
+ RD::get_singleton()->buffer_update(ssao.importance_map_load_counter, 0, sizeof(uint32_t), &zero);
+ RD::get_singleton()->set_resource_name(ssao.importance_map_load_counter, "Importance Map Load Counter");
Vector<RD::Uniform> uniforms;
{
@@ -1806,6 +1719,7 @@ EffectsRD::EffectsRD() {
uniforms.push_back(u);
}
ssao.counter_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, ssao.importance_map_shader.version_get_shader(ssao.importance_map_shader_version, 2), 2);
+ RD::get_singleton()->set_resource_name(ssao.counter_uniform_set, "Load Counter Uniform Set");
}
{
Vector<String> ssao_modes;
@@ -1834,7 +1748,7 @@ EffectsRD::EffectsRD() {
ssao.interleave_shader_version = ssao.interleave_shader.version_create();
for (int i = SSAO_INTERLEAVE; i <= SSAO_INTERLEAVE_HALF; i++) {
ssao.pipelines[pipeline] = RD::get_singleton()->compute_pipeline_create(ssao.interleave_shader.version_get_shader(ssao.interleave_shader_version, i - SSAO_INTERLEAVE));
-
+ RD::get_singleton()->set_resource_name(ssao.pipelines[pipeline], "Interleave Pipeline " + itos(i));
pipeline++;
}
}
@@ -1867,7 +1781,7 @@ EffectsRD::EffectsRD() {
{
// Initialize cubemap filter
- filter.use_high_quality = GLOBAL_GET("rendering/quality/reflections/fast_filter_high_quality");
+ filter.use_high_quality = GLOBAL_GET("rendering/reflections/sky_reflections/fast_filter_high_quality");
Vector<String> cubemap_filter_modes;
cubemap_filter_modes.push_back("\n#define USE_HIGH_QUALITY\n");
@@ -1883,10 +1797,10 @@ EffectsRD::EffectsRD() {
if (filter.use_high_quality) {
filter.coefficient_buffer = RD::get_singleton()->storage_buffer_create(sizeof(high_quality_coeffs));
- RD::get_singleton()->buffer_update(filter.coefficient_buffer, 0, sizeof(high_quality_coeffs), &high_quality_coeffs[0], false);
+ RD::get_singleton()->buffer_update(filter.coefficient_buffer, 0, sizeof(high_quality_coeffs), &high_quality_coeffs[0]);
} else {
filter.coefficient_buffer = RD::get_singleton()->storage_buffer_create(sizeof(low_quality_coeffs));
- RD::get_singleton()->buffer_update(filter.coefficient_buffer, 0, sizeof(low_quality_coeffs), &low_quality_coeffs[0], false);
+ RD::get_singleton()->buffer_update(filter.coefficient_buffer, 0, sizeof(low_quality_coeffs), &low_quality_coeffs[0]);
}
Vector<RD::Uniform> uniforms;
@@ -2005,20 +1919,6 @@ EffectsRD::EffectsRD() {
}
{
- Vector<String> shadow_reduce_modes;
- shadow_reduce_modes.push_back("\n#define MODE_REDUCE\n");
- shadow_reduce_modes.push_back("\n#define MODE_FILTER\n");
-
- shadow_reduce.shader.initialize(shadow_reduce_modes);
-
- shadow_reduce.shader_version = shadow_reduce.shader.version_create();
-
- for (int i = 0; i < SHADOW_REDUCE_MAX; i++) {
- shadow_reduce.pipelines[i] = RD::get_singleton()->compute_pipeline_create(shadow_reduce.shader.version_get_shader(shadow_reduce.shader_version, i));
- }
- }
-
- {
Vector<String> sort_modes;
sort_modes.push_back("\n#define MODE_SORT_BLOCK\n");
sort_modes.push_back("\n#define MODE_SORT_STEP\n");
@@ -2039,12 +1939,14 @@ EffectsRD::EffectsRD() {
sampler.max_lod = 0;
default_sampler = RD::get_singleton()->sampler_create(sampler);
+ RD::get_singleton()->set_resource_name(default_sampler, "Default Linear Sampler");
sampler.min_filter = RD::SAMPLER_FILTER_LINEAR;
sampler.mip_filter = RD::SAMPLER_FILTER_LINEAR;
sampler.max_lod = 1e20;
default_mipmap_sampler = RD::get_singleton()->sampler_create(sampler);
+ RD::get_singleton()->set_resource_name(default_mipmap_sampler, "Default MipMap Sampler");
{ //create index array for copy shaders
Vector<uint8_t> pv;
@@ -2104,5 +2006,4 @@ EffectsRD::~EffectsRD() {
ssr_scale.shader.version_free(ssr_scale.shader_version);
sss.shader.version_free(sss.shader_version);
tonemap.shader.version_free(tonemap.shader_version);
- shadow_reduce.shader.version_free(shadow_reduce.shader_version);
}
diff --git a/servers/rendering/renderer_rd/effects_rd.h b/servers/rendering/renderer_rd/effects_rd.h
index e2cdd0c3d8..1ba25e301b 100644
--- a/servers/rendering/renderer_rd/effects_rd.h
+++ b/servers/rendering/renderer_rd/effects_rd.h
@@ -46,7 +46,6 @@
#include "servers/rendering/renderer_rd/shaders/screen_space_reflection.glsl.gen.h"
#include "servers/rendering/renderer_rd/shaders/screen_space_reflection_filter.glsl.gen.h"
#include "servers/rendering/renderer_rd/shaders/screen_space_reflection_scale.glsl.gen.h"
-#include "servers/rendering/renderer_rd/shaders/shadow_reduce.glsl.gen.h"
#include "servers/rendering/renderer_rd/shaders/sort.glsl.gen.h"
#include "servers/rendering/renderer_rd/shaders/specular_merge.glsl.gen.h"
#include "servers/rendering/renderer_rd/shaders/ssao.glsl.gen.h"
@@ -234,18 +233,17 @@ class EffectsRD {
} luminance_reduce;
struct CopyToDPPushConstant {
- int32_t screen_size[2];
- int32_t dest_offset[2];
- float bias;
float z_far;
float z_near;
uint32_t z_flip;
+ uint32_t pad;
+ float screen_rect[4];
};
struct CoptToDP {
CubeToDpShaderRD shader;
RID shader_version;
- RID pipeline;
+ PipelineCacheRD pipeline;
} cube_to_dp;
struct BokehPushConstant {
@@ -598,18 +596,6 @@ class EffectsRD {
RID pipelines[RESOLVE_MODE_MAX]; //3 quality levels
} resolve;
- enum ShadowReduceMode {
- SHADOW_REDUCE_REDUCE,
- SHADOW_REDUCE_FILTER,
- SHADOW_REDUCE_MAX
- };
-
- struct ShadowReduce {
- ShadowReduceShaderRD shader;
- RID shader_version;
- RID pipelines[SHADOW_REDUCE_MAX];
- } shadow_reduce;
-
enum SortMode {
SORT_MODE_BLOCK,
SORT_MODE_STEP,
@@ -687,7 +673,7 @@ public:
void cubemap_roughness(RID p_source_rd_texture, RID p_dest_framebuffer, uint32_t p_face_id, uint32_t p_sample_count, float p_roughness, float p_size);
void make_mipmap(RID p_source_rd_texture, RID p_dest_texture, const Size2i &p_size);
- void copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, float p_z_near, float p_z_far, float p_bias, bool p_dp_flip);
+ void copy_cubemap_to_dp(RID p_source_rd_texture, RID p_dest_texture, const Rect2 &p_rect, float p_z_near, float p_z_far, bool p_dp_flip);
void luminance_reduction(RID p_source_texture, const Size2i p_source_size, const Vector<RID> p_reduce, RID p_prev_luminance, float p_min_luminance, float p_max_luminance, float p_adjust, bool p_set = false);
void bokeh_dof(RID p_base_texture, RID p_depth_texture, const Size2i &p_base_texture_size, RID p_secondary_texture, RID p_bokeh_texture1, RID p_bokeh_texture2, bool p_dof_far, float p_dof_far_begin, float p_dof_far_size, bool p_dof_near, float p_dof_near_begin, float p_dof_near_size, float p_bokeh_size, RS::DOFBokehShape p_bokeh_shape, RS::DOFBlurQuality p_quality, bool p_use_jitter, float p_cam_znear, float p_cam_zfar, bool p_cam_orthogonal);
@@ -764,10 +750,7 @@ public:
void merge_specular(RID p_dest_framebuffer, RID p_specular, RID p_base, RID p_reflection);
void sub_surface_scattering(RID p_diffuse, RID p_diffuse2, RID p_depth, const CameraMatrix &p_camera, const Size2i &p_screen_size, float p_scale, float p_depth_scale, RS::SubSurfaceScatteringQuality p_quality);
- void resolve_gi(RID p_source_depth, RID p_source_normal_roughness, RID p_source_giprobe, RID p_dest_depth, RID p_dest_normal_roughness, RID p_dest_giprobe, Vector2i p_screen_size, int p_samples);
-
- void reduce_shadow(RID p_source_shadow, RID p_dest_shadow, const Size2i &p_source_size, const Rect2i &p_source_rect, int p_shrink_limit, RenderingDevice::ComputeListID compute_list);
- void filter_shadow(RID p_shadow, RID p_backing_shadow, const Size2i &p_source_size, const Rect2i &p_source_rect, RS::EnvVolumetricFogShadowFilter p_filter, RenderingDevice::ComputeListID compute_list, bool p_vertical = true, bool p_horizontal = true);
+ void resolve_gi(RID p_source_depth, RID p_source_normal_roughness, RID p_source_giprobe, RID p_dest_depth, RID p_dest_normal_roughness, RID p_dest_giprobe, Vector2i p_screen_size, int p_samples, uint32_t p_barrier = RD::BARRIER_MASK_ALL);
void sort_buffer(RID p_uniform_set, int p_size);
diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
index 792fcb0b59..7d6e2fa8e4 100644
--- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
@@ -1367,7 +1367,7 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p
}
if (light_count > 0) {
- RD::get_singleton()->buffer_update(state.lights_uniform_buffer, 0, sizeof(LightUniform) * light_count, &state.light_uniforms[0], true);
+ RD::get_singleton()->buffer_update(state.lights_uniform_buffer, 0, sizeof(LightUniform) * light_count, &state.light_uniforms[0]);
}
{
@@ -1421,7 +1421,7 @@ void RendererCanvasRenderRD::canvas_render_items(RID p_to_render_target, Item *p
//print_line("w: " + itos(ssize.width) + " s: " + rtos(canvas_scale));
state_buffer.tex_to_sdf = 1.0 / ((canvas_scale.x + canvas_scale.y) * 0.5);
- RD::get_singleton()->buffer_update(state.canvas_state_buffer, 0, sizeof(State::Buffer), &state_buffer, true);
+ RD::get_singleton()->buffer_update(state.canvas_state_buffer, 0, sizeof(State::Buffer), &state_buffer);
}
{ //default filter/repeat
@@ -1622,7 +1622,7 @@ void RendererCanvasRenderRD::light_update_shadow(RID p_rid, int p_shadow_index,
projection.set_frustum(xmin, xmax, ymin, ymax, nearp, farp);
}
- Vector3 cam_target = Basis(Vector3(0, 0, Math_PI * 2 * ((i + 3) / 4.0))).xform(Vector3(0, 1, 0));
+ Vector3 cam_target = Basis(Vector3(0, 0, Math_TAU * ((i + 3) / 4.0))).xform(Vector3(0, 1, 0));
projection = projection * CameraMatrix(Transform().looking_at(cam_target, Vector3(0, 0, -1)).affine_inverse());
ShadowRenderPushConstant push_constant;
@@ -2695,9 +2695,10 @@ RendererCanvasRenderRD::RendererCanvasRenderRD(RendererStorageRD *p_storage) {
state.default_transforms_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, shader.default_version_rd_shader, TRANSFORMS_UNIFORM_SET);
}
- default_canvas_texture = storage->canvas_texture_create();
+ default_canvas_texture = storage->canvas_texture_allocate();
+ storage->canvas_texture_initialize(default_canvas_texture);
- state.shadow_texture_size = GLOBAL_GET("rendering/quality/2d_shadow_atlas/size");
+ state.shadow_texture_size = GLOBAL_GET("rendering/2d/shadow_atlas/size");
//create functions for shader and material
storage->shader_set_data_request_function(RendererStorageRD::SHADER_TYPE_2D, _create_shader_funcs);
@@ -2706,9 +2707,14 @@ RendererCanvasRenderRD::RendererCanvasRenderRD(RendererStorageRD *p_storage) {
state.time = 0;
{
- default_canvas_group_shader = storage->shader_create();
+ default_canvas_group_shader = storage->shader_allocate();
+ storage->shader_initialize(default_canvas_group_shader);
+
storage->shader_set_code(default_canvas_group_shader, "shader_type canvas_item; \nvoid fragment() {\n\tvec4 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0); if (c.a > 0.0001) c.rgb/=c.a; COLOR *= c; \n}\n");
- default_canvas_group_material = storage->material_create();
+
+ default_canvas_group_material = storage->material_allocate();
+ storage->material_initialize(default_canvas_group_material);
+
storage->material_set_shader(default_canvas_group_material, default_canvas_group_shader);
}
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_forward.cpp b/servers/rendering/renderer_rd/renderer_scene_render_forward.cpp
index f3b09399f9..a57dee7314 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_forward.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_render_forward.cpp
@@ -453,7 +453,7 @@ void RendererSceneRenderForward::MaterialData::update_parameters(const Map<Strin
//check whether buffer changed
if (p_uniform_dirty && ubo_data.size()) {
update_uniform_buffer(shader_data->uniforms, shader_data->ubo_offsets.ptr(), p_parameters, ubo_data.ptrw(), ubo_data.size(), false);
- RD::get_singleton()->buffer_update(uniform_buffer, 0, ubo_data.size(), ubo_data.ptrw());
+ RD::get_singleton()->buffer_update(uniform_buffer, 0, ubo_data.size(), ubo_data.ptrw(), RD::BARRIER_MASK_RASTER);
}
uint32_t tex_uniform_count = shader_data->texture_uniforms.size();
@@ -583,19 +583,6 @@ void RendererSceneRenderForward::RenderBufferDataForward::ensure_specular() {
}
}
-void RendererSceneRenderForward::RenderBufferDataForward::ensure_gi() {
- if (!reflection_buffer.is_valid()) {
- RD::TextureFormat tf;
- tf.format = RD::DATA_FORMAT_R16G16B16A16_SFLOAT;
- tf.width = width;
- tf.height = height;
- tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
-
- reflection_buffer = RD::get_singleton()->texture_create(tf, RD::TextureView());
- ambient_buffer = RD::get_singleton()->texture_create(tf, RD::TextureView());
- }
-}
-
void RendererSceneRenderForward::RenderBufferDataForward::ensure_giprobe() {
if (!giprobe_buffer.is_valid()) {
RD::TextureFormat tf;
@@ -633,16 +620,6 @@ void RendererSceneRenderForward::RenderBufferDataForward::ensure_giprobe() {
}
void RendererSceneRenderForward::RenderBufferDataForward::clear() {
- if (ambient_buffer != RID() && ambient_buffer != color) {
- RD::get_singleton()->free(ambient_buffer);
- ambient_buffer = RID();
- }
-
- if (reflection_buffer != RID() && reflection_buffer != specular) {
- RD::get_singleton()->free(reflection_buffer);
- reflection_buffer = RID();
- }
-
if (giprobe_buffer != RID()) {
RD::get_singleton()->free(giprobe_buffer);
giprobe_buffer = RID();
@@ -833,16 +810,26 @@ void RendererSceneRenderForward::_render_list_template(RenderingDevice::DrawList
bool shadow_pass = (p_params->pass_mode == PASS_MODE_SHADOW) || (p_params->pass_mode == PASS_MODE_SHADOW_DP);
- float old_offset[2] = { 0, 0 };
+ SceneState::PushConstant push_constant;
+
+ if (p_params->pass_mode == PASS_MODE_DEPTH_MATERIAL) {
+ push_constant.uv_offset = Math::make_half_float(p_params->uv_offset.y) << 16;
+ push_constant.uv_offset |= Math::make_half_float(p_params->uv_offset.x);
+ } else {
+ push_constant.uv_offset = 0;
+ }
for (uint32_t i = p_from_element; i < p_to_element; i++) {
const GeometryInstanceSurfaceDataCache *surf = p_params->elements[i];
+ const RenderElementInfo &element_info = p_params->element_info[i];
+
+ push_constant.base_index = i + p_params->element_offset;
RID material_uniform_set;
ShaderData *shader;
void *mesh_surface;
- if (shadow_pass) {
+ if (shadow_pass || p_params->pass_mode == PASS_MODE_DEPTH) { //regular depth pass can use these too
material_uniform_set = surf->material_uniform_set_shadow;
shader = surf->shader_shadow;
mesh_surface = surf->surface_shadow;
@@ -857,13 +844,6 @@ void RendererSceneRenderForward::_render_list_template(RenderingDevice::DrawList
continue;
}
- if (p_params->pass_mode == PASS_MODE_DEPTH_MATERIAL) {
- old_offset[0] = surf->owner->push_constant.lightmap_uv_scale[0];
- old_offset[1] = surf->owner->push_constant.lightmap_uv_scale[1];
- surf->owner->push_constant.lightmap_uv_scale[0] = p_params->uv_offset.x;
- surf->owner->push_constant.lightmap_uv_scale[1] = p_params->uv_offset.y;
- }
-
//find cull variant
ShaderData::CullVariant cull_variant;
@@ -885,16 +865,16 @@ void RendererSceneRenderForward::_render_list_template(RenderingDevice::DrawList
switch (p_params->pass_mode) {
case PASS_MODE_COLOR:
case PASS_MODE_COLOR_TRANSPARENT: {
- if (surf->sort.uses_lightmap) {
+ if (element_info.uses_lightmap) {
shader_version = SHADER_VERSION_LIGHTMAP_COLOR_PASS;
- } else if (surf->sort.uses_forward_gi) {
+ } else if (element_info.uses_forward_gi) {
shader_version = SHADER_VERSION_COLOR_PASS_WITH_FORWARD_GI;
} else {
shader_version = SHADER_VERSION_COLOR_PASS;
}
} break;
case PASS_MODE_COLOR_SPECULAR: {
- if (surf->sort.uses_lightmap) {
+ if (element_info.uses_lightmap) {
shader_version = SHADER_VERSION_LIGHTMAP_COLOR_PASS_WITH_SEPARATE_SPECULAR;
} else {
shader_version = SHADER_VERSION_COLOR_PASS_WITH_SEPARATE_SPECULAR;
@@ -936,31 +916,7 @@ void RendererSceneRenderForward::_render_list_template(RenderingDevice::DrawList
storage->mesh_surface_get_vertex_arrays_and_format(mesh_surface, pipeline->get_vertex_input_mask(), vertex_array_rd, vertex_format);
}
- if (p_params->screen_lod_threshold > 0.0 && storage->mesh_surface_has_lod(mesh_surface)) {
- //lod
- Vector3 support_min = surf->owner->transformed_aabb.get_support(-p_params->lod_plane.normal);
- Vector3 support_max = surf->owner->transformed_aabb.get_support(p_params->lod_plane.normal);
-
- float distance_min = p_params->lod_plane.distance_to(support_min);
- float distance_max = p_params->lod_plane.distance_to(support_max);
-
- float distance = 0.0;
-
- if (distance_min * distance_max < 0.0) {
- //crossing plane
- distance = 0.0;
- } else if (distance_min >= 0.0) {
- distance = distance_min;
- } else if (distance_max <= 0.0) {
- distance = -distance_max;
- }
-
- index_array_rd = storage->mesh_surface_get_index_array_with_lod(mesh_surface, surf->owner->lod_model_scale * surf->owner->lod_bias, distance * p_params->lod_distance_multiplier, p_params->screen_lod_threshold);
-
- } else {
- //no lod
- index_array_rd = storage->mesh_surface_get_index_array(mesh_surface);
- }
+ index_array_rd = storage->mesh_surface_get_index_array(mesh_surface, element_info.lod_index);
if (prev_vertex_array_rd != vertex_array_rd) {
RD::get_singleton()->draw_list_bind_vertex_array(draw_list, vertex_array_rd);
@@ -997,14 +953,11 @@ void RendererSceneRenderForward::_render_list_template(RenderingDevice::DrawList
prev_material_uniform_set = material_uniform_set;
}
- RD::get_singleton()->draw_list_set_push_constant(draw_list, &surf->owner->push_constant, sizeof(GeometryInstanceForward::PushConstant));
-
- RD::get_singleton()->draw_list_draw(draw_list, index_array_rd.is_valid(), surf->owner->instance_count);
+ RD::get_singleton()->draw_list_set_push_constant(draw_list, &push_constant, sizeof(SceneState::PushConstant));
- if (p_params->pass_mode == PASS_MODE_DEPTH_MATERIAL) {
- surf->owner->push_constant.lightmap_uv_scale[0] = old_offset[0];
- surf->owner->push_constant.lightmap_uv_scale[1] = old_offset[1];
- }
+ uint32_t instance_count = surf->owner->instance_count > 1 ? surf->owner->instance_count : element_info.repeat;
+ RD::get_singleton()->draw_list_draw(draw_list, index_array_rd.is_valid(), instance_count);
+ i += element_info.repeat - 1; //skip equal elements
}
}
@@ -1062,16 +1015,16 @@ void RendererSceneRenderForward::_render_list_with_threads(RenderListParameters
thread_draw_lists.resize(RendererThreadPool::singleton->thread_work_pool.get_thread_count());
RD::get_singleton()->draw_list_begin_split(p_framebuffer, thread_draw_lists.size(), thread_draw_lists.ptr(), p_initial_color_action, p_final_color_action, p_initial_depth_action, p_final_depth_action, p_clear_color_values, p_clear_depth, p_clear_stencil, p_region, p_storage_textures);
RendererThreadPool::singleton->thread_work_pool.do_work(thread_draw_lists.size(), this, &RendererSceneRenderForward::_render_list_thread_function, p_params);
- RD::get_singleton()->draw_list_end();
+ RD::get_singleton()->draw_list_end(p_params->barrier);
} else {
//single threaded
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(p_framebuffer, p_initial_color_action, p_final_color_action, p_initial_depth_action, p_final_depth_action, p_clear_color_values, p_clear_depth, p_clear_stencil, p_region, p_storage_textures);
_render_list(draw_list, fb_format, p_params, 0, p_params->element_count);
- RD::get_singleton()->draw_list_end();
+ RD::get_singleton()->draw_list_end(p_params->barrier);
}
}
-void RendererSceneRenderForward::_setup_environment(RID p_environment, RID p_render_buffers, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform, RID p_reflection_probe, bool p_no_fog, const Size2i &p_screen_size, uint32_t p_cluster_size, uint32_t p_max_cluster_elements, RID p_shadow_atlas, bool p_flip_y, const Color &p_default_bg_color, float p_znear, float p_zfar, bool p_opaque_render_buffers, bool p_pancake_shadows) {
+void RendererSceneRenderForward::_setup_environment(RID p_environment, RID p_render_buffers, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform, RID p_reflection_probe, bool p_no_fog, const Size2i &p_screen_size, uint32_t p_cluster_size, uint32_t p_max_cluster_elements, RID p_shadow_atlas, bool p_flip_y, const Color &p_default_bg_color, float p_znear, float p_zfar, bool p_opaque_render_buffers, bool p_pancake_shadows, int p_index) {
//CameraMatrix projection = p_cam_projection;
//projection.flip_y(); // Vulkan and modern APIs use Y-Down
CameraMatrix correction;
@@ -1310,22 +1263,120 @@ void RendererSceneRenderForward::_setup_environment(RID p_environment, RID p_ren
scene_state.ubo.roughness_limiter_amount = screen_space_roughness_limiter_get_amount();
scene_state.ubo.roughness_limiter_limit = screen_space_roughness_limiter_get_limit();
- RD::get_singleton()->buffer_update(scene_state.uniform_buffer, 0, sizeof(SceneState::UBO), &scene_state.ubo, true);
+ if (p_index >= (int)scene_state.uniform_buffers.size()) {
+ uint32_t from = scene_state.uniform_buffers.size();
+ scene_state.uniform_buffers.resize(p_index + 1);
+ render_pass_uniform_sets.resize(p_index + 1);
+ for (uint32_t i = from; i < scene_state.uniform_buffers.size(); i++) {
+ scene_state.uniform_buffers[i] = RD::get_singleton()->uniform_buffer_create(sizeof(SceneState::UBO));
+ }
+ }
+ RD::get_singleton()->buffer_update(scene_state.uniform_buffers[p_index], 0, sizeof(SceneState::UBO), &scene_state.ubo, RD::BARRIER_MASK_RASTER);
+}
+
+void RendererSceneRenderForward::_update_instance_data_buffer(RenderListType p_render_list) {
+ if (scene_state.instance_data[p_render_list].size() > 0) {
+ if (scene_state.instance_buffer[p_render_list] == RID() || scene_state.instance_buffer_size[p_render_list] < scene_state.instance_data[p_render_list].size()) {
+ if (scene_state.instance_buffer[p_render_list] != RID()) {
+ RD::get_singleton()->free(scene_state.instance_buffer[p_render_list]);
+ }
+ uint32_t new_size = nearest_power_of_2_templated(MAX(uint64_t(INSTANCE_DATA_BUFFER_MIN_SIZE), scene_state.instance_data[p_render_list].size()));
+ scene_state.instance_buffer[p_render_list] = RD::get_singleton()->storage_buffer_create(new_size * sizeof(SceneState::InstanceData));
+ scene_state.instance_buffer_size[p_render_list] = new_size;
+ }
+ RD::get_singleton()->buffer_update(scene_state.instance_buffer[p_render_list], 0, sizeof(SceneState::InstanceData) * scene_state.instance_data[p_render_list].size(), scene_state.instance_data[p_render_list].ptr(), RD::BARRIER_MASK_RASTER);
+ }
+}
+void RendererSceneRenderForward::_fill_instance_data(RenderListType p_render_list, uint32_t p_offset, int32_t p_max_elements, bool p_update_buffer) {
+ RenderList *rl = &render_list[p_render_list];
+ uint32_t element_total = p_max_elements >= 0 ? uint32_t(p_max_elements) : rl->elements.size();
+
+ scene_state.instance_data[p_render_list].resize(p_offset + element_total);
+ rl->element_info.resize(p_offset + element_total);
+
+ uint32_t repeats = 0;
+ GeometryInstanceSurfaceDataCache *prev_surface = nullptr;
+ for (uint32_t i = 0; i < element_total; i++) {
+ GeometryInstanceSurfaceDataCache *surface = rl->elements[i + p_offset];
+ GeometryInstanceForward *inst = surface->owner;
+
+ SceneState::InstanceData &instance_data = scene_state.instance_data[p_render_list][i + p_offset];
+
+ if (inst->store_transform_cache) {
+ RendererStorageRD::store_transform(inst->transform, instance_data.transform);
+ } else {
+ RendererStorageRD::store_transform(Transform(), instance_data.transform);
+ }
+
+ instance_data.flags = inst->flags_cache;
+ instance_data.gi_offset = inst->gi_offset_cache;
+ instance_data.layer_mask = inst->layer_mask;
+ instance_data.instance_uniforms_ofs = uint32_t(inst->shader_parameters_offset);
+ instance_data.lightmap_uv_scale[0] = inst->lightmap_uv_scale.position.x;
+ instance_data.lightmap_uv_scale[1] = inst->lightmap_uv_scale.position.y;
+ instance_data.lightmap_uv_scale[2] = inst->lightmap_uv_scale.size.x;
+ instance_data.lightmap_uv_scale[3] = inst->lightmap_uv_scale.size.y;
+
+ bool cant_repeat = instance_data.flags & INSTANCE_DATA_FLAG_MULTIMESH || inst->mesh_instance.is_valid();
+
+ if (prev_surface != nullptr && !cant_repeat && prev_surface->sort.sort_key1 == surface->sort.sort_key1 && prev_surface->sort.sort_key2 == surface->sort.sort_key2) {
+ //this element is the same as the previous one, count repeats to draw it using instancing
+ repeats++;
+ } else {
+ if (repeats > 0) {
+ for (uint32_t j = 1; j <= repeats; j++) {
+ rl->element_info[p_offset + i - j].repeat = j;
+ }
+ }
+ repeats = 1;
+ }
+
+ RenderElementInfo &element_info = rl->element_info[p_offset + i];
+
+ element_info.lod_index = surface->sort.lod_index;
+ element_info.uses_forward_gi = surface->sort.uses_forward_gi;
+ element_info.uses_lightmap = surface->sort.uses_lightmap;
+
+ if (cant_repeat) {
+ prev_surface = nullptr;
+ } else {
+ prev_surface = surface;
+ }
+ }
+
+ if (repeats > 0) {
+ for (uint32_t j = 1; j <= repeats; j++) {
+ rl->element_info[p_offset + element_total - j].repeat = j;
+ }
+ }
+
+ if (p_update_buffer) {
+ _update_instance_data_buffer(p_render_list);
+ }
}
-void RendererSceneRenderForward::_fill_render_list(const PagedArray<GeometryInstance *> &p_instances, PassMode p_pass_mode, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform, bool p_using_sdfgi, bool p_using_opaque_gi) {
- scene_state.used_sss = false;
- scene_state.used_screen_texture = false;
- scene_state.used_normal_texture = false;
- scene_state.used_depth_texture = false;
+void RendererSceneRenderForward::_fill_render_list(RenderListType p_render_list, const PagedArray<GeometryInstance *> &p_instances, PassMode p_pass_mode, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform, bool p_using_sdfgi, bool p_using_opaque_gi, const Plane &p_lod_plane, float p_lod_distance_multiplier, float p_screen_lod_threshold, bool p_append) {
+ if (p_render_list == RENDER_LIST_OPAQUE) {
+ scene_state.used_sss = false;
+ scene_state.used_screen_texture = false;
+ scene_state.used_normal_texture = false;
+ scene_state.used_depth_texture = false;
+ }
+ uint32_t lightmap_captures_used = 0;
Plane near_plane(p_cam_transform.origin, -p_cam_transform.basis.get_axis(Vector3::AXIS_Z));
near_plane.d += p_cam_projection.get_z_near();
float z_max = p_cam_projection.get_z_far() - p_cam_projection.get_z_near();
- uint32_t lightmap_captures_used = 0;
+ RenderList *rl = &render_list[p_render_list];
_update_dirty_geometry_instances();
- render_list.clear();
+
+ if (!p_append) {
+ rl->clear();
+ if (p_render_list == RENDER_LIST_OPAQUE) {
+ render_list[RENDER_LIST_ALPHA].clear(); //opaque fills alpha too
+ }
+ }
//fill list
@@ -1341,7 +1392,7 @@ void RendererSceneRenderForward::_fill_render_list(const PagedArray<GeometryInst
bool uses_lightmap = false;
bool uses_gi = false;
- if (p_pass_mode == PASS_MODE_COLOR) {
+ if (p_render_list == RENDER_LIST_OPAQUE) {
//setup GI
if (inst->lightmap_instance.is_valid()) {
@@ -1353,15 +1404,15 @@ void RendererSceneRenderForward::_fill_render_list(const PagedArray<GeometryInst
}
}
if (lightmap_cull_index >= 0) {
- inst->push_constant.gi_offset &= 0xFFFF;
- inst->push_constant.gi_offset |= lightmap_cull_index;
+ inst->gi_offset_cache = inst->lightmap_slice_index << 16;
+ inst->gi_offset_cache |= lightmap_cull_index;
flags |= INSTANCE_DATA_FLAG_USE_LIGHTMAP;
if (scene_state.lightmap_has_sh[lightmap_cull_index]) {
flags |= INSTANCE_DATA_FLAG_USE_SH_LIGHTMAP;
}
uses_lightmap = true;
} else {
- inst->push_constant.gi_offset = 0xFFFFFFFF;
+ inst->gi_offset_cache = 0xFFFFFFFF;
}
} else if (inst->lightmap_sh) {
@@ -1375,7 +1426,7 @@ void RendererSceneRenderForward::_fill_render_list(const PagedArray<GeometryInst
lcd.sh[j * 4 + 3] = src_capture[j].a;
}
flags |= INSTANCE_DATA_FLAG_USE_LIGHTMAP_CAPTURE;
- inst->push_constant.gi_offset = lightmap_captures_used;
+ inst->gi_offset_cache = lightmap_captures_used;
lightmap_captures_used++;
uses_lightmap = true;
}
@@ -1402,18 +1453,19 @@ void RendererSceneRenderForward::_fill_render_list(const PagedArray<GeometryInst
SWAP(probe0_index, probe1_index);
}
- inst->push_constant.gi_offset = probe0_index | (probe1_index << 16);
+ inst->gi_offset_cache = probe0_index | (probe1_index << 16);
+ flags |= INSTANCE_DATA_FLAG_USE_GIPROBE;
uses_gi = true;
} else {
if (p_using_sdfgi && inst->can_sdfgi) {
flags |= INSTANCE_DATA_FLAG_USE_SDFGI;
uses_gi = true;
}
- inst->push_constant.gi_offset = 0xFFFFFFFF;
+ inst->gi_offset_cache = 0xFFFFFFFF;
}
}
}
- inst->push_constant.flags = flags;
+ inst->flags_cache = flags;
GeometryInstanceSurfaceDataCache *surf = inst->surface_caches;
@@ -1421,12 +1473,39 @@ void RendererSceneRenderForward::_fill_render_list(const PagedArray<GeometryInst
surf->sort.uses_forward_gi = 0;
surf->sort.uses_lightmap = 0;
+ // LOD
+
+ if (p_screen_lod_threshold > 0.0 && storage->mesh_surface_has_lod(surf->surface)) {
+ //lod
+ Vector3 lod_support_min = inst->transformed_aabb.get_support(-p_lod_plane.normal);
+ Vector3 lod_support_max = inst->transformed_aabb.get_support(p_lod_plane.normal);
+
+ float distance_min = p_lod_plane.distance_to(lod_support_min);
+ float distance_max = p_lod_plane.distance_to(lod_support_max);
+
+ float distance = 0.0;
+
+ if (distance_min * distance_max < 0.0) {
+ //crossing plane
+ distance = 0.0;
+ } else if (distance_min >= 0.0) {
+ distance = distance_min;
+ } else if (distance_max <= 0.0) {
+ distance = -distance_max;
+ }
+
+ surf->sort.lod_index = storage->mesh_surface_get_lod(surf->surface, inst->lod_model_scale * inst->lod_bias, distance * p_lod_distance_multiplier, p_screen_lod_threshold);
+ } else {
+ surf->sort.lod_index = 0;
+ }
+
+ // ADD Element
if (p_pass_mode == PASS_MODE_COLOR) {
if (surf->flags & (GeometryInstanceSurfaceDataCache::FLAG_PASS_DEPTH | GeometryInstanceSurfaceDataCache::FLAG_PASS_OPAQUE)) {
- render_list.add_element(surf);
+ rl->add_element(surf);
}
if (surf->flags & GeometryInstanceSurfaceDataCache::FLAG_PASS_ALPHA) {
- render_list.add_alpha_element(surf);
+ render_list[RENDER_LIST_ALPHA].add_element(surf);
if (uses_gi) {
surf->sort.uses_forward_gi = 1;
}
@@ -1451,11 +1530,11 @@ void RendererSceneRenderForward::_fill_render_list(const PagedArray<GeometryInst
} else if (p_pass_mode == PASS_MODE_SHADOW || p_pass_mode == PASS_MODE_SHADOW_DP) {
if (surf->flags & GeometryInstanceSurfaceDataCache::FLAG_PASS_SHADOW) {
- render_list.add_element(surf);
+ rl->add_element(surf);
}
} else {
if (surf->flags & (GeometryInstanceSurfaceDataCache::FLAG_PASS_DEPTH | GeometryInstanceSurfaceDataCache::FLAG_PASS_OPAQUE)) {
- render_list.add_element(surf);
+ rl->add_element(surf);
}
}
@@ -1465,8 +1544,8 @@ void RendererSceneRenderForward::_fill_render_list(const PagedArray<GeometryInst
}
}
- if (lightmap_captures_used) {
- RD::get_singleton()->buffer_update(scene_state.lightmap_capture_buffer, 0, sizeof(LightmapCaptureData) * lightmap_captures_used, scene_state.lightmap_captures, true);
+ if (p_render_list == RENDER_LIST_OPAQUE && lightmap_captures_used) {
+ RD::get_singleton()->buffer_update(scene_state.lightmap_capture_buffer, 0, sizeof(LightmapCaptureData) * lightmap_captures_used, scene_state.lightmap_captures, RD::BARRIER_MASK_RASTER);
}
}
@@ -1495,29 +1574,21 @@ void RendererSceneRenderForward::_setup_lightmaps(const PagedArray<RID> &p_light
scene_state.lightmaps_used++;
}
if (scene_state.lightmaps_used > 0) {
- RD::get_singleton()->buffer_update(scene_state.lightmap_buffer, 0, sizeof(LightmapData) * scene_state.lightmaps_used, scene_state.lightmaps, true);
+ RD::get_singleton()->buffer_update(scene_state.lightmap_buffer, 0, sizeof(LightmapData) * scene_state.lightmaps_used, scene_state.lightmaps, RD::BARRIER_MASK_RASTER);
}
}
-void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, int p_directional_light_count, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_cluster_buffer, uint32_t p_cluster_size, uint32_t p_max_cluster_elements, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, const Color &p_default_bg_color, float p_screen_lod_threshold) {
+void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_cluster_buffer, uint32_t p_cluster_size, uint32_t p_max_cluster_elements, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, const Color &p_default_bg_color, float p_screen_lod_threshold) {
RenderBufferDataForward *render_buffer = nullptr;
if (p_render_buffer.is_valid()) {
render_buffer = (RenderBufferDataForward *)render_buffers_get_data(p_render_buffer);
}
//first of all, make a new render pass
- render_pass++;
-
//fill up ubo
RENDER_TIMESTAMP("Setup 3D Scene");
- if (p_reflection_probe.is_valid()) {
- scene_state.ubo.reflection_multiplier = 0.0;
- } else {
- scene_state.ubo.reflection_multiplier = 1.0;
- }
-
float lod_distance_multiplier = p_cam_projection.get_lod_multiplier();
Plane lod_camera_plane(p_cam_transform.get_origin(), -p_cam_transform.basis.get_axis(Vector3::AXIS_Z));
@@ -1530,7 +1601,7 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
Vector2 vp_he = p_cam_projection.get_viewport_half_extents();
scene_state.ubo.viewport_size[0] = vp_he.x;
scene_state.ubo.viewport_size[1] = vp_he.y;
- scene_state.ubo.directional_light_count = p_directional_light_count;
+ scene_state.ubo.directional_light_count = 0;
Size2i screen_size;
RID opaque_framebuffer;
@@ -1553,7 +1624,6 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
if (!low_end && p_gi_probes.size() > 0) {
using_giprobe = true;
- render_buffer->ensure_gi();
}
if (!p_environment.is_valid() && using_giprobe) {
@@ -1563,7 +1633,6 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
if (environment_is_sdfgi_enabled(p_environment)) {
depth_pass_mode = using_giprobe ? PASS_MODE_DEPTH_NORMAL_ROUGHNESS_GIPROBE : PASS_MODE_DEPTH_NORMAL_ROUGHNESS; // also giprobe
using_sdfgi = true;
- render_buffer->ensure_gi();
} else {
depth_pass_mode = using_giprobe ? PASS_MODE_DEPTH_NORMAL_ROUGHNESS_GIPROBE : PASS_MODE_DEPTH_NORMAL_ROUGHNESS;
}
@@ -1616,13 +1685,21 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
ERR_FAIL(); //bug?
}
+ RD::get_singleton()->draw_command_begin_label("Render Setup");
+
_setup_lightmaps(p_lightmaps, p_cam_transform);
_setup_giprobes(p_gi_probes);
_setup_environment(p_environment, p_render_buffer, p_cam_projection, p_cam_transform, p_reflection_probe, p_reflection_probe.is_valid(), screen_size, p_cluster_size, p_max_cluster_elements, p_shadow_atlas, !p_reflection_probe.is_valid(), p_default_bg_color, p_cam_projection.get_z_near(), p_cam_projection.get_z_far(), false);
_update_render_base_uniform_set(); //may have changed due to the above (light buffer enlarged, as an example)
- _fill_render_list(p_instances, PASS_MODE_COLOR, p_cam_projection, p_cam_transform, using_sdfgi, using_sdfgi || using_giprobe);
+ _fill_render_list(RENDER_LIST_OPAQUE, p_instances, PASS_MODE_COLOR, p_cam_projection, p_cam_transform, using_sdfgi, using_sdfgi || using_giprobe, lod_camera_plane, lod_distance_multiplier, p_screen_lod_threshold);
+ render_list[RENDER_LIST_OPAQUE].sort_by_key();
+ render_list[RENDER_LIST_ALPHA].sort_by_depth();
+ _fill_instance_data(RENDER_LIST_OPAQUE);
+ _fill_instance_data(RENDER_LIST_ALPHA);
+
+ RD::get_singleton()->draw_command_end_label();
bool using_sss = !low_end && render_buffer && scene_state.used_sss && sub_surface_scattering_get_quality() != RS::SUB_SURFACE_SCATTERING_QUALITY_DISABLED;
@@ -1682,6 +1759,7 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
// setup sky if used for ambient, reflections, or background
if (draw_sky || draw_sky_fog_only || environment_get_reflection_source(p_environment) == RS::ENV_REFLECTION_SOURCE_SKY || environment_get_ambient_source(p_environment) == RS::ENV_AMBIENT_SOURCE_SKY) {
RENDER_TIMESTAMP("Setup Sky");
+ RD::get_singleton()->draw_command_begin_label("Setup Sky");
CameraMatrix projection = p_cam_projection;
if (p_reflection_probe.is_valid()) {
CameraMatrix correction;
@@ -1699,13 +1777,12 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
// do not try to draw sky if invalid
draw_sky = false;
}
+ RD::get_singleton()->draw_command_end_label();
}
} else {
clear_color = p_default_bg_color;
}
- render_list.sort_by_key(false);
-
bool debug_giprobes = get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_GI_PROBE_ALBEDO || get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_GI_PROBE_LIGHTING || get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_GI_PROBE_EMISSION;
bool debug_sdfgi_probes = get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_SDFGI_PROBES;
bool depth_pre_pass = !low_end && depth_framebuffer.is_valid();
@@ -1713,40 +1790,64 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
bool using_ssao = depth_pre_pass && p_render_buffer.is_valid() && p_environment.is_valid() && environment_is_ssao_enabled(p_environment);
bool continue_depth = false;
if (depth_pre_pass) { //depth pre pass
- RENDER_TIMESTAMP("Render Depth Pre-Pass");
- RID rp_uniform_set = _setup_render_pass_uniform_set(RID(), RID(), RID(), RID(), RID(), PagedArray<RID>(), PagedArray<RID>());
+ bool needs_pre_resolve = _needs_post_prepass_render(using_sdfgi || using_giprobe);
+ if (needs_pre_resolve) {
+ RENDER_TIMESTAMP("GI + Render Depth Pre-Pass (parallel)");
+ } else {
+ RENDER_TIMESTAMP("Render Depth Pre-Pass");
+ }
+ if (needs_pre_resolve) {
+ //pre clear the depth framebuffer, as AMD (and maybe others?) use compute for it, and barrier other compute shaders.
+ RD::get_singleton()->draw_list_begin(depth_framebuffer, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_CONTINUE, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_CONTINUE, depth_pass_clear);
+ RD::get_singleton()->draw_list_end();
+ //start compute processes here, so they run at the same time as depth pre-pass
+ _post_prepass_render(using_sdfgi || using_giprobe);
+ }
+
+ RD::get_singleton()->draw_command_begin_label("Render Depth Pre-Pass");
+
+ RID rp_uniform_set = _setup_render_pass_uniform_set(RENDER_LIST_OPAQUE, RID(), RID(), RID(), RID(), RID(), PagedArray<RID>(), PagedArray<RID>());
bool finish_depth = using_ssao || using_sdfgi || using_giprobe;
- RenderListParameters render_list_params(render_list.elements, render_list.element_count, false, depth_pass_mode, render_buffer == nullptr, rp_uniform_set, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, Vector2(), lod_camera_plane, lod_distance_multiplier, p_screen_lod_threshold);
- _render_list_with_threads(&render_list_params, depth_framebuffer, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CLEAR, finish_depth ? RD::FINAL_ACTION_READ : RD::FINAL_ACTION_CONTINUE, depth_pass_clear);
+ RenderListParameters render_list_params(render_list[RENDER_LIST_OPAQUE].elements.ptr(), render_list[RENDER_LIST_OPAQUE].element_info.ptr(), render_list[RENDER_LIST_OPAQUE].elements.size(), false, depth_pass_mode, render_buffer == nullptr, rp_uniform_set, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, Vector2(), lod_camera_plane, lod_distance_multiplier, p_screen_lod_threshold);
+ _render_list_with_threads(&render_list_params, depth_framebuffer, needs_pre_resolve ? RD::INITIAL_ACTION_CONTINUE : RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ, needs_pre_resolve ? RD::INITIAL_ACTION_CONTINUE : RD::INITIAL_ACTION_CLEAR, finish_depth ? RD::FINAL_ACTION_READ : RD::FINAL_ACTION_CONTINUE, needs_pre_resolve ? Vector<Color>() : depth_pass_clear);
+
+ RD::get_singleton()->draw_command_end_label();
+
+ if (needs_pre_resolve) {
+ _pre_resolve_render(using_sdfgi || using_giprobe);
+ }
if (render_buffer && render_buffer->msaa != RS::VIEWPORT_MSAA_DISABLED) {
RENDER_TIMESTAMP("Resolve Depth Pre-Pass");
+ RD::get_singleton()->draw_command_begin_label("Resolve Depth Pre-Pass");
if (depth_pass_mode == PASS_MODE_DEPTH_NORMAL_ROUGHNESS || depth_pass_mode == PASS_MODE_DEPTH_NORMAL_ROUGHNESS_GIPROBE) {
+ if (needs_pre_resolve) {
+ RD::get_singleton()->barrier(RD::BARRIER_MASK_RASTER, RD::BARRIER_MASK_COMPUTE);
+ }
static int texture_samples[RS::VIEWPORT_MSAA_MAX] = { 1, 2, 4, 8, 16 };
storage->get_effects()->resolve_gi(render_buffer->depth_msaa, render_buffer->normal_roughness_buffer_msaa, using_giprobe ? render_buffer->giprobe_buffer_msaa : RID(), render_buffer->depth, render_buffer->normal_roughness_buffer, using_giprobe ? render_buffer->giprobe_buffer : RID(), Vector2i(render_buffer->width, render_buffer->height), texture_samples[render_buffer->msaa]);
} else if (finish_depth) {
- RD::get_singleton()->texture_resolve_multisample(render_buffer->depth_msaa, render_buffer->depth, true);
+ RD::get_singleton()->texture_resolve_multisample(render_buffer->depth_msaa, render_buffer->depth);
}
+ RD::get_singleton()->draw_command_end_label();
}
continue_depth = !finish_depth;
}
- if (using_ssao) {
- _process_ssao(p_render_buffer, p_environment, render_buffer->normal_roughness_buffer, p_cam_projection);
- }
+ _pre_opaque_render(using_ssao, using_sdfgi || using_giprobe, render_buffer ? render_buffer->normal_roughness_buffer : RID(), render_buffer ? render_buffer->giprobe_buffer : RID());
- if (using_sdfgi || using_giprobe) {
- _process_gi(p_render_buffer, render_buffer->normal_roughness_buffer, render_buffer->ambient_buffer, render_buffer->reflection_buffer, render_buffer->giprobe_buffer, p_environment, p_cam_projection, p_cam_transform, p_gi_probes);
- }
+ RD::get_singleton()->draw_command_begin_label("Render Opaque Pass");
+
+ scene_state.ubo.directional_light_count = _get_render_state_directional_light_count();
_setup_environment(p_environment, p_render_buffer, p_cam_projection, p_cam_transform, p_reflection_probe, p_reflection_probe.is_valid(), screen_size, p_cluster_size, p_max_cluster_elements, p_shadow_atlas, !p_reflection_probe.is_valid(), p_default_bg_color, p_cam_projection.get_z_near(), p_cam_projection.get_z_far(), p_render_buffer.is_valid());
RENDER_TIMESTAMP("Render Opaque Pass");
- RID rp_uniform_set = _setup_render_pass_uniform_set(p_render_buffer, radiance_texture, p_shadow_atlas, p_reflection_atlas, p_cluster_buffer, p_gi_probes, p_lightmaps);
+ RID rp_uniform_set = _setup_render_pass_uniform_set(RENDER_LIST_OPAQUE, p_render_buffer, radiance_texture, p_shadow_atlas, p_reflection_atlas, p_cluster_buffer, p_gi_probes, p_lightmaps, true);
bool can_continue_color = !scene_state.used_screen_texture && !using_ssr && !using_sss;
bool can_continue_depth = !scene_state.used_depth_texture && !using_ssr && !using_sss;
@@ -1767,10 +1868,8 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
}
RID framebuffer = using_separate_specular ? opaque_specular_framebuffer : opaque_framebuffer;
- RenderListParameters render_list_params(render_list.elements, render_list.element_count, false, using_separate_specular ? PASS_MODE_COLOR_SPECULAR : PASS_MODE_COLOR, render_buffer == nullptr, rp_uniform_set, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, Vector2(), lod_camera_plane, lod_distance_multiplier, p_screen_lod_threshold);
-
- _render_list_with_threads(&render_list_params, framebuffer, keep_color ? RD::INITIAL_ACTION_KEEP : RD::INITIAL_ACTION_CLEAR, will_continue_color ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ, depth_pre_pass ? (continue_depth ? RD::INITIAL_ACTION_KEEP : RD::INITIAL_ACTION_CONTINUE) : RD::INITIAL_ACTION_CLEAR, will_continue_depth ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ, c, 1.0, 0);
-
+ RenderListParameters render_list_params(render_list[RENDER_LIST_OPAQUE].elements.ptr(), render_list[RENDER_LIST_OPAQUE].element_info.ptr(), render_list[RENDER_LIST_OPAQUE].elements.size(), false, using_separate_specular ? PASS_MODE_COLOR_SPECULAR : PASS_MODE_COLOR, render_buffer == nullptr, rp_uniform_set, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, Vector2(), lod_camera_plane, lod_distance_multiplier, p_screen_lod_threshold);
+ _render_list_with_threads(&render_list_params, framebuffer, keep_color ? RD::INITIAL_ACTION_KEEP : RD::INITIAL_ACTION_CLEAR, will_continue_color ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ, depth_pre_pass ? (continue_depth ? RD::INITIAL_ACTION_CONTINUE : RD::INITIAL_ACTION_KEEP) : RD::INITIAL_ACTION_CLEAR, will_continue_depth ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ, c, 1.0, 0);
if (will_continue_color && using_separate_specular) {
// close the specular framebuffer, as it's no longer used
RD::get_singleton()->draw_list_begin(render_buffer->specular_only_fb, RD::INITIAL_ACTION_CONTINUE, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CONTINUE, RD::FINAL_ACTION_CONTINUE);
@@ -1778,6 +1877,8 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
}
}
+ RD::get_singleton()->draw_command_end_label();
+
if (debug_giprobes) {
//debug giprobes
bool will_continue_color = (can_continue_color || draw_sky || draw_sky_fog_only);
@@ -1787,9 +1888,11 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
dc.set_depth_correction(true);
CameraMatrix cm = (dc * p_cam_projection) * CameraMatrix(p_cam_transform.affine_inverse());
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(opaque_framebuffer, RD::INITIAL_ACTION_CONTINUE, will_continue_color ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CONTINUE, will_continue_depth ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ);
+ RD::get_singleton()->draw_command_begin_label("Debug GIProbes");
for (int i = 0; i < (int)p_gi_probes.size(); i++) {
_debug_giprobe(p_gi_probes[i], draw_list, opaque_framebuffer, cm, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_GI_PROBE_LIGHTING, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_GI_PROBE_EMISSION, 1.0);
}
+ RD::get_singleton()->draw_command_end_label();
RD::get_singleton()->draw_list_end();
}
@@ -1802,7 +1905,9 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
dc.set_depth_correction(true);
CameraMatrix cm = (dc * p_cam_projection) * CameraMatrix(p_cam_transform.affine_inverse());
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(opaque_framebuffer, RD::INITIAL_ACTION_CONTINUE, will_continue_color ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CONTINUE, will_continue_depth ? RD::FINAL_ACTION_CONTINUE : RD::FINAL_ACTION_READ);
+ RD::get_singleton()->draw_command_begin_label("Debug SDFGI");
_debug_sdfgi_probes(p_render_buffer, draw_list, opaque_framebuffer, cm);
+ RD::get_singleton()->draw_command_end_label();
RD::get_singleton()->draw_list_end();
}
@@ -1815,30 +1920,35 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
correction.set_depth_correction(true);
projection = correction * p_cam_projection;
}
-
+ RD::get_singleton()->draw_command_begin_label("Draw Sky");
_draw_sky(can_continue_color, can_continue_depth, opaque_framebuffer, p_environment, projection, p_cam_transform);
+ RD::get_singleton()->draw_command_end_label();
}
if (render_buffer && !can_continue_color && render_buffer->msaa != RS::VIEWPORT_MSAA_DISABLED) {
- RD::get_singleton()->texture_resolve_multisample(render_buffer->color_msaa, render_buffer->color, true);
+ RD::get_singleton()->texture_resolve_multisample(render_buffer->color_msaa, render_buffer->color);
if (using_separate_specular) {
- RD::get_singleton()->texture_resolve_multisample(render_buffer->specular_msaa, render_buffer->specular, true);
+ RD::get_singleton()->texture_resolve_multisample(render_buffer->specular_msaa, render_buffer->specular);
}
}
if (render_buffer && !can_continue_depth && render_buffer->msaa != RS::VIEWPORT_MSAA_DISABLED) {
- RD::get_singleton()->texture_resolve_multisample(render_buffer->depth_msaa, render_buffer->depth, true);
+ RD::get_singleton()->texture_resolve_multisample(render_buffer->depth_msaa, render_buffer->depth);
}
if (using_separate_specular) {
if (using_sss) {
RENDER_TIMESTAMP("Sub Surface Scattering");
+ RD::get_singleton()->draw_command_begin_label("Process Sub Surface Scattering");
_process_sss(p_render_buffer, p_cam_projection);
+ RD::get_singleton()->draw_command_end_label();
}
if (using_ssr) {
RENDER_TIMESTAMP("Screen Space Reflection");
+ RD::get_singleton()->draw_command_begin_label("Process Screen Space Reflections");
_process_ssr(p_render_buffer, render_buffer->color_fb, render_buffer->normal_roughness_buffer, render_buffer->specular, render_buffer->specular, Color(0, 0, 0, 1), p_environment, p_cam_projection, render_buffer->msaa == RS::VIEWPORT_MSAA_DISABLED);
+ RD::get_singleton()->draw_command_end_label();
} else {
//just mix specular back
RENDER_TIMESTAMP("Merge Specular");
@@ -1848,30 +1958,44 @@ void RendererSceneRenderForward::_render_scene(RID p_render_buffer, const Transf
RENDER_TIMESTAMP("Render Transparent Pass");
- _setup_environment(p_environment, p_render_buffer, p_cam_projection, p_cam_transform, p_reflection_probe, p_reflection_probe.is_valid(), screen_size, p_cluster_size, p_max_cluster_elements, p_shadow_atlas, !p_reflection_probe.is_valid(), p_default_bg_color, p_cam_projection.get_z_near(), p_cam_projection.get_z_far(), false);
+ RD::get_singleton()->draw_command_begin_label("Render Transparent Pass");
+
+ rp_uniform_set = _setup_render_pass_uniform_set(RENDER_LIST_ALPHA, p_render_buffer, radiance_texture, p_shadow_atlas, p_reflection_atlas, p_cluster_buffer, p_gi_probes, p_lightmaps, true);
- render_list.sort_by_reverse_depth_and_priority(true);
+ _setup_environment(p_environment, p_render_buffer, p_cam_projection, p_cam_transform, p_reflection_probe, p_reflection_probe.is_valid(), screen_size, p_cluster_size, p_max_cluster_elements, p_shadow_atlas, !p_reflection_probe.is_valid(), p_default_bg_color, p_cam_projection.get_z_near(), p_cam_projection.get_z_far(), false);
{
- RenderListParameters render_list_params(&render_list.elements[render_list.max_elements - render_list.alpha_element_count], render_list.alpha_element_count, false, PASS_MODE_COLOR, render_buffer == nullptr, rp_uniform_set, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, Vector2(), lod_camera_plane, lod_distance_multiplier, p_screen_lod_threshold);
+ RenderListParameters render_list_params(render_list[RENDER_LIST_ALPHA].elements.ptr(), render_list[RENDER_LIST_ALPHA].element_info.ptr(), render_list[RENDER_LIST_ALPHA].elements.size(), false, PASS_MODE_COLOR, render_buffer == nullptr, rp_uniform_set, get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_WIREFRAME, Vector2(), lod_camera_plane, lod_distance_multiplier, p_screen_lod_threshold);
_render_list_with_threads(&render_list_params, alpha_framebuffer, can_continue_color ? RD::INITIAL_ACTION_CONTINUE : RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ, can_continue_depth ? RD::INITIAL_ACTION_CONTINUE : RD::INITIAL_ACTION_KEEP, RD::FINAL_ACTION_READ);
}
+ RD::get_singleton()->draw_command_end_label();
+
+ RD::get_singleton()->draw_command_begin_label("Resolve");
+
if (render_buffer && render_buffer->msaa != RS::VIEWPORT_MSAA_DISABLED) {
- RD::get_singleton()->texture_resolve_multisample(render_buffer->color_msaa, render_buffer->color, true);
+ RD::get_singleton()->texture_resolve_multisample(render_buffer->color_msaa, render_buffer->color);
}
-}
-void RendererSceneRenderForward::_render_shadow(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const CameraMatrix &p_projection, const Transform &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_lod_threshold) {
- RENDER_TIMESTAMP("Setup Rendering Shadow");
+ RD::get_singleton()->draw_command_end_label();
+}
+void RendererSceneRenderForward::_render_shadow_begin() {
+ scene_state.shadow_passes.clear();
+ RD::get_singleton()->draw_command_begin_label("Shadow Setup");
_update_render_base_uniform_set();
- render_pass++;
+ render_list[RENDER_LIST_SECONDARY].clear();
+ scene_state.instance_data[RENDER_LIST_SECONDARY].clear();
+}
+void RendererSceneRenderForward::_render_shadow_append(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const CameraMatrix &p_projection, const Transform &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_lod_threshold, const Rect2i &p_rect, bool p_flip_y, bool p_clear_region, bool p_begin, bool p_end) {
+ uint32_t shadow_pass_index = scene_state.shadow_passes.size();
+
+ SceneState::ShadowPass shadow_pass;
scene_state.ubo.dual_paraboloid_side = p_use_dp_flip ? -1 : 1;
- _setup_environment(RID(), RID(), p_projection, p_transform, RID(), true, Vector2(1, 1), 1, 32, RID(), true, Color(), 0, p_zfar, false, p_use_pancake);
+ _setup_environment(RID(), RID(), p_projection, p_transform, RID(), true, Vector2(1, 1), 1, 32, RID(), !p_flip_y, Color(), 0, p_zfar, false, p_use_pancake, shadow_pass_index);
if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_DISABLE_LOD) {
p_screen_lod_threshold = 0.0;
@@ -1879,72 +2003,116 @@ void RendererSceneRenderForward::_render_shadow(RID p_framebuffer, const PagedAr
PassMode pass_mode = p_use_dp ? PASS_MODE_SHADOW_DP : PASS_MODE_SHADOW;
- _fill_render_list(p_instances, pass_mode, p_projection, p_transform);
+ uint32_t render_list_from = render_list[RENDER_LIST_SECONDARY].elements.size();
+ _fill_render_list(RENDER_LIST_SECONDARY, p_instances, pass_mode, p_projection, p_transform, false, false, p_camera_plane, p_lod_distance_multiplier, p_screen_lod_threshold, true);
+ uint32_t render_list_size = render_list[RENDER_LIST_SECONDARY].elements.size() - render_list_from;
+ render_list[RENDER_LIST_SECONDARY].sort_by_key_range(render_list_from, render_list_size);
+ _fill_instance_data(RENDER_LIST_SECONDARY, render_list_from, render_list_size, false);
- RID rp_uniform_set = _setup_render_pass_uniform_set(RID(), RID(), RID(), RID(), RID(), PagedArray<RID>(), PagedArray<RID>());
+ {
+ //regular forward for now
+ bool flip_cull = p_use_dp_flip;
+ if (p_flip_y) {
+ flip_cull = !flip_cull;
+ }
- RENDER_TIMESTAMP("Render Shadow");
+ shadow_pass.element_from = render_list_from;
+ shadow_pass.element_count = render_list_size;
+ shadow_pass.flip_cull = flip_cull;
+ shadow_pass.pass_mode = pass_mode;
- render_list.sort_by_key(false);
+ shadow_pass.rp_uniform_set = RID(); //will be filled later when instance buffer is complete
+ shadow_pass.camera_plane = p_camera_plane;
+ shadow_pass.screen_lod_threshold = p_screen_lod_threshold;
+ shadow_pass.lod_distance_multiplier = p_lod_distance_multiplier;
- {
- //regular forward for now
- RenderListParameters render_list_params(render_list.elements, render_list.element_count, p_use_dp_flip, pass_mode, true, rp_uniform_set, false, Vector2(), p_camera_plane, p_lod_distance_multiplier, p_screen_lod_threshold);
- _render_list_with_threads(&render_list_params, p_framebuffer, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ);
+ shadow_pass.framebuffer = p_framebuffer;
+ shadow_pass.initial_depth_action = p_begin ? (p_clear_region ? RD::INITIAL_ACTION_CLEAR_REGION : RD::INITIAL_ACTION_CLEAR) : (p_clear_region ? RD::INITIAL_ACTION_CLEAR_REGION_CONTINUE : RD::INITIAL_ACTION_CONTINUE);
+ shadow_pass.final_depth_action = p_end ? RD::FINAL_ACTION_READ : RD::FINAL_ACTION_CONTINUE;
+ shadow_pass.rect = p_rect;
+
+ scene_state.shadow_passes.push_back(shadow_pass);
}
}
+void RendererSceneRenderForward::_render_shadow_process() {
+ _update_instance_data_buffer(RENDER_LIST_SECONDARY);
+ //render shadows one after the other, so this can be done un-barriered and the driver can optimize (as well as allow us to run compute at the same time)
+
+ for (uint32_t i = 0; i < scene_state.shadow_passes.size(); i++) {
+ //render passes need to be configured after instance buffer is done, since they need the latest version
+ SceneState::ShadowPass &shadow_pass = scene_state.shadow_passes[i];
+ shadow_pass.rp_uniform_set = _setup_render_pass_uniform_set(RENDER_LIST_SECONDARY, RID(), RID(), RID(), RID(), RID(), PagedArray<RID>(), PagedArray<RID>(), false, i);
+ }
+
+ RD::get_singleton()->draw_command_end_label();
+}
+void RendererSceneRenderForward::_render_shadow_end(uint32_t p_barrier) {
+ RD::get_singleton()->draw_command_begin_label("Shadow Render");
+
+ for (uint32_t i = 0; i < scene_state.shadow_passes.size(); i++) {
+ SceneState::ShadowPass &shadow_pass = scene_state.shadow_passes[i];
+ RenderListParameters render_list_parameters(render_list[RENDER_LIST_SECONDARY].elements.ptr() + shadow_pass.element_from, render_list[RENDER_LIST_SECONDARY].element_info.ptr() + shadow_pass.element_from, shadow_pass.element_count, shadow_pass.flip_cull, shadow_pass.pass_mode, true, shadow_pass.rp_uniform_set, false, Vector2(), shadow_pass.camera_plane, shadow_pass.lod_distance_multiplier, shadow_pass.screen_lod_threshold, shadow_pass.element_from, RD::BARRIER_MASK_NO_BARRIER);
+ _render_list_with_threads(&render_list_parameters, shadow_pass.framebuffer, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, shadow_pass.initial_depth_action, shadow_pass.final_depth_action, Vector<Color>(), 1.0, 0, shadow_pass.rect);
+ }
+
+ if (p_barrier != RD::BARRIER_MASK_NO_BARRIER) {
+ RD::get_singleton()->barrier(RD::BARRIER_MASK_RASTER, p_barrier);
+ }
+ RD::get_singleton()->draw_command_end_label();
+}
+
void RendererSceneRenderForward::_render_particle_collider_heightfield(RID p_fb, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, const PagedArray<GeometryInstance *> &p_instances) {
RENDER_TIMESTAMP("Setup Render Collider Heightfield");
- _update_render_base_uniform_set();
-
- render_pass++;
+ RD::get_singleton()->draw_command_begin_label("Render Collider Heightfield");
+ _update_render_base_uniform_set();
scene_state.ubo.dual_paraboloid_side = 0;
_setup_environment(RID(), RID(), p_cam_projection, p_cam_transform, RID(), true, Vector2(1, 1), 1, 32, RID(), true, Color(), 0, p_cam_projection.get_z_far(), false, false);
PassMode pass_mode = PASS_MODE_SHADOW;
- _fill_render_list(p_instances, pass_mode, p_cam_projection, p_cam_transform);
+ _fill_render_list(RENDER_LIST_SECONDARY, p_instances, pass_mode, p_cam_projection, p_cam_transform);
+ render_list[RENDER_LIST_SECONDARY].sort_by_key();
+ _fill_instance_data(RENDER_LIST_SECONDARY);
- RID rp_uniform_set = _setup_render_pass_uniform_set(RID(), RID(), RID(), RID(), RID(), PagedArray<RID>(), PagedArray<RID>());
+ RID rp_uniform_set = _setup_render_pass_uniform_set(RENDER_LIST_SECONDARY, RID(), RID(), RID(), RID(), RID(), PagedArray<RID>(), PagedArray<RID>());
- RENDER_TIMESTAMP("Render Collider Heightield");
-
- render_list.sort_by_key(false);
+ RENDER_TIMESTAMP("Render Collider Heightfield");
{
//regular forward for now
- RenderListParameters render_list_params(render_list.elements, render_list.element_count, false, pass_mode, true, rp_uniform_set);
+ RenderListParameters render_list_params(render_list[RENDER_LIST_SECONDARY].elements.ptr(), render_list[RENDER_LIST_SECONDARY].element_info.ptr(), render_list[RENDER_LIST_SECONDARY].elements.size(), false, pass_mode, true, rp_uniform_set);
_render_list_with_threads(&render_list_params, p_fb, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_READ);
}
+ RD::get_singleton()->draw_command_end_label();
}
void RendererSceneRenderForward::_render_material(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
RENDER_TIMESTAMP("Setup Rendering Material");
- _update_render_base_uniform_set();
+ RD::get_singleton()->draw_command_begin_label("Render Material");
- render_pass++;
+ _update_render_base_uniform_set();
scene_state.ubo.dual_paraboloid_side = 0;
- scene_state.ubo.material_uv2_mode = true;
+ scene_state.ubo.material_uv2_mode = false;
_setup_environment(RID(), RID(), p_cam_projection, p_cam_transform, RID(), true, Vector2(1, 1), 1, 32, RID(), false, Color(), 0, 0);
PassMode pass_mode = PASS_MODE_DEPTH_MATERIAL;
- _fill_render_list(p_instances, pass_mode, p_cam_projection, p_cam_transform);
+ _fill_render_list(RENDER_LIST_SECONDARY, p_instances, pass_mode, p_cam_projection, p_cam_transform);
+ render_list[RENDER_LIST_SECONDARY].sort_by_key();
+ _fill_instance_data(RENDER_LIST_SECONDARY);
- RID rp_uniform_set = _setup_render_pass_uniform_set(RID(), RID(), RID(), RID(), RID(), PagedArray<RID>(), PagedArray<RID>());
+ RID rp_uniform_set = _setup_render_pass_uniform_set(RENDER_LIST_SECONDARY, RID(), RID(), RID(), RID(), RID(), PagedArray<RID>(), PagedArray<RID>());
RENDER_TIMESTAMP("Render Material");
- render_list.sort_by_key(false);
-
{
- RenderListParameters render_list_params(render_list.elements, render_list.element_count, true, pass_mode, true, rp_uniform_set);
+ RenderListParameters render_list_params(render_list[RENDER_LIST_SECONDARY].elements.ptr(), render_list[RENDER_LIST_SECONDARY].element_info.ptr(), render_list[RENDER_LIST_SECONDARY].elements.size(), true, pass_mode, true, rp_uniform_set);
//regular forward for now
Vector<Color> clear;
clear.push_back(Color(0, 0, 0, 0));
@@ -1956,14 +2124,16 @@ void RendererSceneRenderForward::_render_material(const Transform &p_cam_transfo
_render_list(draw_list, RD::get_singleton()->framebuffer_get_format(p_framebuffer), &render_list_params, 0, render_list_params.element_count);
RD::get_singleton()->draw_list_end();
}
+
+ RD::get_singleton()->draw_command_end_label();
}
void RendererSceneRenderForward::_render_uv2(const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) {
RENDER_TIMESTAMP("Setup Rendering UV2");
- _update_render_base_uniform_set();
+ RD::get_singleton()->draw_command_begin_label("Render UV2");
- render_pass++;
+ _update_render_base_uniform_set();
scene_state.ubo.dual_paraboloid_side = 0;
scene_state.ubo.material_uv2_mode = true;
@@ -1971,16 +2141,16 @@ void RendererSceneRenderForward::_render_uv2(const PagedArray<GeometryInstance *
_setup_environment(RID(), RID(), CameraMatrix(), Transform(), RID(), true, Vector2(1, 1), 1, 32, RID(), false, Color(), 0, 0);
PassMode pass_mode = PASS_MODE_DEPTH_MATERIAL;
- _fill_render_list(p_instances, pass_mode, CameraMatrix(), Transform());
+ _fill_render_list(RENDER_LIST_SECONDARY, p_instances, pass_mode, CameraMatrix(), Transform());
+ render_list[RENDER_LIST_SECONDARY].sort_by_key();
+ _fill_instance_data(RENDER_LIST_SECONDARY);
- RID rp_uniform_set = _setup_render_pass_uniform_set(RID(), RID(), RID(), RID(), RID(), PagedArray<RID>(), PagedArray<RID>());
+ RID rp_uniform_set = _setup_render_pass_uniform_set(RENDER_LIST_SECONDARY, RID(), RID(), RID(), RID(), RID(), PagedArray<RID>(), PagedArray<RID>());
RENDER_TIMESTAMP("Render Material");
- render_list.sort_by_key(false);
-
{
- RenderListParameters render_list_params(render_list.elements, render_list.element_count, true, pass_mode, true, rp_uniform_set, true);
+ RenderListParameters render_list_params(render_list[RENDER_LIST_SECONDARY].elements.ptr(), render_list[RENDER_LIST_SECONDARY].element_info.ptr(), render_list[RENDER_LIST_SECONDARY].elements.size(), true, pass_mode, true, rp_uniform_set, true);
//regular forward for now
Vector<Color> clear;
clear.push_back(Color(0, 0, 0, 0));
@@ -2016,23 +2186,24 @@ void RendererSceneRenderForward::_render_uv2(const PagedArray<GeometryInstance *
RD::get_singleton()->draw_list_end();
}
+
+ RD::get_singleton()->draw_command_end_label();
}
void RendererSceneRenderForward::_render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<GeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) {
RENDER_TIMESTAMP("Render SDFGI");
+ RD::get_singleton()->draw_command_begin_label("Render SDFGI Voxel");
+
_update_render_base_uniform_set();
RenderBufferDataForward *render_buffer = (RenderBufferDataForward *)render_buffers_get_data(p_render_buffers);
ERR_FAIL_COND(!render_buffer);
- render_pass++;
-
PassMode pass_mode = PASS_MODE_SDF;
- _fill_render_list(p_instances, pass_mode, CameraMatrix(), Transform());
- render_list.sort_by_key(false);
-
- RID rp_uniform_set = _setup_sdfgi_render_pass_uniform_set(p_albedo_texture, p_emission_texture, p_emission_aniso_texture, p_geom_facing_texture);
+ _fill_render_list(RENDER_LIST_SECONDARY, p_instances, pass_mode, CameraMatrix(), Transform());
+ render_list[RENDER_LIST_SECONDARY].sort_by_key();
+ _fill_instance_data(RENDER_LIST_SECONDARY);
Vector3 half_extents = p_bounds.size * 0.5;
Vector3 center = p_bounds.position + half_extents;
@@ -2085,15 +2256,19 @@ void RendererSceneRenderForward::_render_sdfgi(RID p_render_buffers, const Vecto
_setup_environment(RID(), RID(), camera_proj, cam_xform, RID(), true, Vector2(1, 1), 1, 32, RID(), false, Color(), 0, 0);
+ RID rp_uniform_set = _setup_sdfgi_render_pass_uniform_set(p_albedo_texture, p_emission_texture, p_emission_aniso_texture, p_geom_facing_texture);
+
Map<Size2i, RID>::Element *E = sdfgi_framebuffer_size_cache.find(fb_size);
if (!E) {
RID fb = RD::get_singleton()->framebuffer_create_empty(fb_size);
E = sdfgi_framebuffer_size_cache.insert(fb_size, fb);
}
- RenderListParameters render_list_params(render_list.elements, render_list.element_count, true, pass_mode, true, rp_uniform_set, false);
+ RenderListParameters render_list_params(render_list[RENDER_LIST_SECONDARY].elements.ptr(), render_list[RENDER_LIST_SECONDARY].element_info.ptr(), render_list[RENDER_LIST_SECONDARY].elements.size(), true, pass_mode, true, rp_uniform_set, false);
_render_list_with_threads(&render_list_params, E->get(), RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, Vector<Color>(), 1.0, 0, Rect2(), sbs);
}
+
+ RD::get_singleton()->draw_command_end_label();
}
void RendererSceneRenderForward::_base_uniforms_changed() {
@@ -2145,21 +2320,13 @@ void RendererSceneRenderForward::_update_render_base_uniform_set() {
{
RD::Uniform u;
u.binding = 3;
- u.uniform_type = RD::UNIFORM_TYPE_UNIFORM_BUFFER;
- u.ids.push_back(scene_state.uniform_buffer);
- uniforms.push_back(u);
- }
-
- {
- RD::Uniform u;
- u.binding = 5;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.ids.push_back(get_omni_light_buffer());
uniforms.push_back(u);
}
{
RD::Uniform u;
- u.binding = 6;
+ u.binding = 4;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.ids.push_back(get_spot_light_buffer());
uniforms.push_back(u);
@@ -2167,35 +2334,35 @@ void RendererSceneRenderForward::_update_render_base_uniform_set() {
{
RD::Uniform u;
- u.binding = 7;
+ u.binding = 5;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.ids.push_back(get_reflection_probe_buffer());
uniforms.push_back(u);
}
{
RD::Uniform u;
- u.binding = 8;
+ u.binding = 6;
u.uniform_type = RD::UNIFORM_TYPE_UNIFORM_BUFFER;
u.ids.push_back(get_directional_light_buffer());
uniforms.push_back(u);
}
{
RD::Uniform u;
- u.binding = 10;
+ u.binding = 7;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.ids.push_back(scene_state.lightmap_buffer);
uniforms.push_back(u);
}
{
RD::Uniform u;
- u.binding = 11;
+ u.binding = 8;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.ids.push_back(scene_state.lightmap_capture_buffer);
uniforms.push_back(u);
}
{
RD::Uniform u;
- u.binding = 12;
+ u.binding = 9;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
RID decal_atlas = storage->decal_atlas_get_texture();
u.ids.push_back(decal_atlas);
@@ -2203,7 +2370,7 @@ void RendererSceneRenderForward::_update_render_base_uniform_set() {
}
{
RD::Uniform u;
- u.binding = 13;
+ u.binding = 10;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
RID decal_atlas = storage->decal_atlas_get_texture_srgb();
u.ids.push_back(decal_atlas);
@@ -2211,7 +2378,7 @@ void RendererSceneRenderForward::_update_render_base_uniform_set() {
}
{
RD::Uniform u;
- u.binding = 14;
+ u.binding = 11;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
u.ids.push_back(get_decal_buffer());
uniforms.push_back(u);
@@ -2219,20 +2386,8 @@ void RendererSceneRenderForward::_update_render_base_uniform_set() {
{
RD::Uniform u;
- u.binding = 15;
- u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
- if (directional_shadow_get_texture().is_valid()) {
- u.ids.push_back(directional_shadow_get_texture());
- } else {
- u.ids.push_back(storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_WHITE));
- }
- uniforms.push_back(u);
- }
-
- {
- RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
- u.binding = 16;
+ u.binding = 12;
u.ids.push_back(storage->global_variables_get_storage_buffer());
uniforms.push_back(u);
}
@@ -2240,7 +2395,7 @@ void RendererSceneRenderForward::_update_render_base_uniform_set() {
if (!low_end) {
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_UNIFORM_BUFFER;
- u.binding = 17;
+ u.binding = 13;
u.ids.push_back(sdfgi_get_ubo());
uniforms.push_back(u);
}
@@ -2249,10 +2404,9 @@ void RendererSceneRenderForward::_update_render_base_uniform_set() {
}
}
-RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buffers, RID p_radiance_texture, RID p_shadow_atlas, RID p_reflection_atlas, RID p_cluster_buffer, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_lightmaps) {
- if (render_pass_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(render_pass_uniform_set)) {
- RD::get_singleton()->free(render_pass_uniform_set);
- }
+RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RenderListType p_render_list, RID p_render_buffers, RID p_radiance_texture, RID p_shadow_atlas, RID p_reflection_atlas, RID p_cluster_buffer, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_lightmaps, bool p_use_directional_shadow_atlas, int p_index) {
+ //there should always be enough uniform buffers for render passes, otherwise bugs
+ ERR_FAIL_INDEX_V(p_index, (int)scene_state.uniform_buffers.size(), RID());
RenderBufferDataForward *rb = nullptr;
if (p_render_buffers.is_valid()) {
@@ -2264,6 +2418,24 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
Vector<RD::Uniform> uniforms;
{
+ RD::Uniform u;
+ u.binding = 0;
+ u.uniform_type = RD::UNIFORM_TYPE_UNIFORM_BUFFER;
+ u.ids.push_back(scene_state.uniform_buffers[p_index]);
+ uniforms.push_back(u);
+ }
+ {
+ RD::Uniform u;
+ u.binding = 1;
+ u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
+ RID instance_buffer = scene_state.instance_buffer[p_render_list];
+ if (instance_buffer == RID()) {
+ instance_buffer = default_vec4_xform_buffer; // any buffer will do since its not used
+ }
+ u.ids.push_back(instance_buffer);
+ uniforms.push_back(u);
+ }
+ {
RID radiance_texture;
if (p_radiance_texture.is_valid()) {
radiance_texture = p_radiance_texture;
@@ -2271,7 +2443,7 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
radiance_texture = storage->texture_rd_get_default(is_using_radiance_cubemap_array() ? RendererStorageRD::DEFAULT_RD_TEXTURE_CUBEMAP_ARRAY_BLACK : RendererStorageRD::DEFAULT_RD_TEXTURE_CUBEMAP_BLACK);
}
RD::Uniform u;
- u.binding = 0;
+ u.binding = 2;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.ids.push_back(radiance_texture);
uniforms.push_back(u);
@@ -2280,7 +2452,7 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
{
RID ref_texture = p_reflection_atlas.is_valid() ? reflection_atlas_get_texture(p_reflection_atlas) : RID();
RD::Uniform u;
- u.binding = 1;
+ u.binding = 3;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
if (ref_texture.is_valid()) {
u.ids.push_back(ref_texture);
@@ -2292,7 +2464,7 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
{
RD::Uniform u;
- u.binding = 2;
+ u.binding = 4;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
RID texture;
if (p_shadow_atlas.is_valid()) {
@@ -2306,7 +2478,18 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
}
{
RD::Uniform u;
- u.binding = 3;
+ u.binding = 5;
+ u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
+ if (p_use_directional_shadow_atlas && directional_shadow_get_texture().is_valid()) {
+ u.ids.push_back(directional_shadow_get_texture());
+ } else {
+ u.ids.push_back(storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_WHITE));
+ }
+ uniforms.push_back(u);
+ }
+ {
+ RD::Uniform u;
+ u.binding = 6;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.ids.resize(scene_state.max_lightmaps);
RID default_tex = storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_2D_ARRAY_WHITE);
@@ -2325,7 +2508,7 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
}
{
RD::Uniform u;
- u.binding = 4;
+ u.binding = 7;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.ids.resize(MAX_GI_PROBES);
RID default_tex = storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_3D_WHITE);
@@ -2346,7 +2529,7 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
{
RD::Uniform u;
- u.binding = 5;
+ u.binding = 8;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
RID cb = p_cluster_buffer.is_valid() ? p_cluster_buffer : default_vec4_xform_buffer;
u.ids.push_back(cb);
@@ -2355,7 +2538,7 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
{
RD::Uniform u;
- u.binding = 6;
+ u.binding = 9;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
RID texture = (false && rb && rb->depth.is_valid()) ? rb->depth : storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_WHITE);
u.ids.push_back(texture);
@@ -2363,7 +2546,7 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
}
{
RD::Uniform u;
- u.binding = 7;
+ u.binding = 10;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
RID bbt = rb ? render_buffers_get_back_buffer_texture(p_render_buffers) : RID();
RID texture = bbt.is_valid() ? bbt : storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_BLACK);
@@ -2374,7 +2557,7 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
if (!low_end) {
{
RD::Uniform u;
- u.binding = 8;
+ u.binding = 11;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
RID texture = rb && rb->normal_roughness_buffer.is_valid() ? rb->normal_roughness_buffer : storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_NORMAL);
u.ids.push_back(texture);
@@ -2383,7 +2566,7 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
{
RD::Uniform u;
- u.binding = 9;
+ u.binding = 12;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
RID aot = rb ? render_buffers_get_ao_texture(p_render_buffers) : RID();
RID texture = aot.is_valid() ? aot : storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_BLACK);
@@ -2393,24 +2576,26 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
{
RD::Uniform u;
- u.binding = 10;
+ u.binding = 13;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
- RID texture = rb && rb->ambient_buffer.is_valid() ? rb->ambient_buffer : storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_BLACK);
+ RID ambient_buffer = p_render_buffers.is_valid() ? render_buffers_get_gi_ambient_texture(p_render_buffers) : RID();
+ RID texture = ambient_buffer.is_valid() ? ambient_buffer : storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_BLACK);
u.ids.push_back(texture);
uniforms.push_back(u);
}
{
RD::Uniform u;
- u.binding = 11;
+ u.binding = 14;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
- RID texture = rb && rb->reflection_buffer.is_valid() ? rb->reflection_buffer : storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_BLACK);
+ RID reflection_buffer = p_render_buffers.is_valid() ? render_buffers_get_gi_reflection_texture(p_render_buffers) : RID();
+ RID texture = reflection_buffer.is_valid() ? reflection_buffer : storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_BLACK);
u.ids.push_back(texture);
uniforms.push_back(u);
}
{
RD::Uniform u;
- u.binding = 12;
+ u.binding = 15;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
RID t;
if (rb && render_buffers_is_sdfgi_enabled(p_render_buffers)) {
@@ -2423,7 +2608,7 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
}
{
RD::Uniform u;
- u.binding = 13;
+ u.binding = 16;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
if (rb && render_buffers_is_sdfgi_enabled(p_render_buffers)) {
u.ids.push_back(render_buffers_get_sdfgi_occlusion_texture(p_render_buffers));
@@ -2434,14 +2619,14 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
}
{
RD::Uniform u;
- u.binding = 14;
+ u.binding = 17;
u.uniform_type = RD::UNIFORM_TYPE_UNIFORM_BUFFER;
u.ids.push_back(rb ? render_buffers_get_gi_probe_buffer(p_render_buffers) : render_buffers_get_default_gi_probe_buffer());
uniforms.push_back(u);
}
{
RD::Uniform u;
- u.binding = 15;
+ u.binding = 18;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
RID vfog = RID();
if (rb && render_buffers_has_volumetric_fog(p_render_buffers)) {
@@ -2457,8 +2642,16 @@ RID RendererSceneRenderForward::_setup_render_pass_uniform_set(RID p_render_buff
}
}
- render_pass_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, default_shader_rd, RENDER_PASS_UNIFORM_SET);
- return render_pass_uniform_set;
+ if (p_index >= (int)render_pass_uniform_sets.size()) {
+ render_pass_uniform_sets.resize(p_index + 1);
+ }
+
+ if (render_pass_uniform_sets[p_index].is_valid() && RD::get_singleton()->uniform_set_is_valid(render_pass_uniform_sets[p_index])) {
+ RD::get_singleton()->free(render_pass_uniform_sets[p_index]);
+ }
+
+ render_pass_uniform_sets[p_index] = RD::get_singleton()->uniform_set_create(uniforms, default_shader_rd, RENDER_PASS_UNIFORM_SET);
+ return render_pass_uniform_sets[p_index];
}
RID RendererSceneRenderForward::_setup_sdfgi_render_pass_uniform_set(RID p_albedo_texture, RID p_emission_texture, RID p_emission_aniso_texture, RID p_geom_facing_texture) {
@@ -2469,10 +2662,24 @@ RID RendererSceneRenderForward::_setup_sdfgi_render_pass_uniform_set(RID p_albed
Vector<RD::Uniform> uniforms;
{
+ RD::Uniform u;
+ u.binding = 0;
+ u.uniform_type = RD::UNIFORM_TYPE_UNIFORM_BUFFER;
+ u.ids.push_back(scene_state.uniform_buffers[0]);
+ uniforms.push_back(u);
+ }
+ {
+ RD::Uniform u;
+ u.binding = 1;
+ u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
+ u.ids.push_back(scene_state.instance_buffer[RENDER_LIST_SECONDARY]);
+ uniforms.push_back(u);
+ }
+ {
// No radiance texture.
RID radiance_texture = storage->texture_rd_get_default(is_using_radiance_cubemap_array() ? RendererStorageRD::DEFAULT_RD_TEXTURE_CUBEMAP_ARRAY_BLACK : RendererStorageRD::DEFAULT_RD_TEXTURE_CUBEMAP_BLACK);
RD::Uniform u;
- u.binding = 0;
+ u.binding = 2;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.ids.push_back(radiance_texture);
uniforms.push_back(u);
@@ -2482,7 +2689,7 @@ RID RendererSceneRenderForward::_setup_sdfgi_render_pass_uniform_set(RID p_albed
// No reflection atlas.
RID ref_texture = storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_CUBEMAP_ARRAY_BLACK);
RD::Uniform u;
- u.binding = 1;
+ u.binding = 3;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.ids.push_back(ref_texture);
uniforms.push_back(u);
@@ -2491,7 +2698,17 @@ RID RendererSceneRenderForward::_setup_sdfgi_render_pass_uniform_set(RID p_albed
{
// No shadow atlas.
RD::Uniform u;
- u.binding = 2;
+ u.binding = 4;
+ u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
+ RID texture = storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_WHITE);
+ u.ids.push_back(texture);
+ uniforms.push_back(u);
+ }
+
+ {
+ // No directional shadow atlas.
+ RD::Uniform u;
+ u.binding = 5;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
RID texture = storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_WHITE);
u.ids.push_back(texture);
@@ -2501,7 +2718,7 @@ RID RendererSceneRenderForward::_setup_sdfgi_render_pass_uniform_set(RID p_albed
{
// No Lightmaps
RD::Uniform u;
- u.binding = 3;
+ u.binding = 6;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.ids.resize(scene_state.max_lightmaps);
RID default_tex = storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_2D_ARRAY_WHITE);
@@ -2515,7 +2732,7 @@ RID RendererSceneRenderForward::_setup_sdfgi_render_pass_uniform_set(RID p_albed
{
// No GIProbes
RD::Uniform u;
- u.binding = 4;
+ u.binding = 7;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.ids.resize(MAX_GI_PROBES);
RID default_tex = storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_3D_WHITE);
@@ -2528,7 +2745,7 @@ RID RendererSceneRenderForward::_setup_sdfgi_render_pass_uniform_set(RID p_albed
{
RD::Uniform u;
- u.binding = 5;
+ u.binding = 8;
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
RID cb = default_vec4_xform_buffer;
u.ids.push_back(cb);
@@ -2540,28 +2757,28 @@ RID RendererSceneRenderForward::_setup_sdfgi_render_pass_uniform_set(RID p_albed
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
- u.binding = 6;
+ u.binding = 9;
u.ids.push_back(p_albedo_texture);
uniforms.push_back(u);
}
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
- u.binding = 7;
+ u.binding = 10;
u.ids.push_back(p_emission_texture);
uniforms.push_back(u);
}
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
- u.binding = 8;
+ u.binding = 11;
u.ids.push_back(p_emission_aniso_texture);
uniforms.push_back(u);
}
{
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
- u.binding = 9;
+ u.binding = 12;
u.ids.push_back(p_geom_facing_texture);
uniforms.push_back(u);
}
@@ -2585,18 +2802,6 @@ RID RendererSceneRenderForward::_render_buffers_get_normal_texture(RID p_render_
return rb->normal_roughness_buffer;
}
-RID RendererSceneRenderForward::_render_buffers_get_ambient_texture(RID p_render_buffers) {
- RenderBufferDataForward *rb = (RenderBufferDataForward *)render_buffers_get_data(p_render_buffers);
-
- return rb->ambient_buffer;
-}
-
-RID RendererSceneRenderForward::_render_buffers_get_reflection_texture(RID p_render_buffers) {
- RenderBufferDataForward *rb = (RenderBufferDataForward *)render_buffers_get_data(p_render_buffers);
-
- return rb->reflection_buffer;
-}
-
RendererSceneRenderForward *RendererSceneRenderForward::singleton = nullptr;
void RendererSceneRenderForward::set_time(double p_time, double p_step) {
@@ -2666,10 +2871,17 @@ void RendererSceneRenderForward::_geometry_instance_add_surface_with_material(Ge
}
MaterialData *material_shadow = nullptr;
- //void *surface_shadow = nullptr;
+ void *surface_shadow = nullptr;
if (!p_material->shader_data->writes_modelview_or_projection && !p_material->shader_data->uses_vertex && !p_material->shader_data->uses_discard && !p_material->shader_data->uses_depth_pre_pass) {
flags |= GeometryInstanceSurfaceDataCache::FLAG_USES_SHARED_SHADOW_MATERIAL;
material_shadow = (MaterialData *)storage->material_get_data(default_material, RendererStorageRD::SHADER_TYPE_3D);
+
+ RID shadow_mesh = storage->mesh_get_shadow_mesh(p_mesh);
+
+ if (shadow_mesh.is_valid()) {
+ surface_shadow = storage->mesh_get_surface(shadow_mesh, p_surface);
+ }
+
} else {
material_shadow = p_material;
}
@@ -2691,7 +2903,8 @@ void RendererSceneRenderForward::_geometry_instance_add_surface_with_material(Ge
//shadow
sdcache->shader_shadow = material_shadow->shader_data;
sdcache->material_uniform_set_shadow = material_shadow->uniform_set;
- sdcache->surface_shadow = sdcache->surface; //when adding special shadow meshes, will use this
+
+ sdcache->surface_shadow = surface_shadow ? surface_shadow : sdcache->surface;
sdcache->owner = ginstance;
@@ -2703,10 +2916,11 @@ void RendererSceneRenderForward::_geometry_instance_add_surface_with_material(Ge
sdcache->sort.sort_key1 = 0;
sdcache->sort.sort_key2 = 0;
- sdcache->sort.surface_type = ginstance->data->base_type;
- sdcache->sort.material_id = p_material_id;
+ sdcache->sort.surface_index = p_surface;
+ sdcache->sort.material_id_low = p_material_id & 0x3FFF;
+ sdcache->sort.material_id_hi = p_material_id >> 14;
sdcache->sort.shader_id = p_shader_id;
- sdcache->sort.geometry_id = p_mesh.get_local_index();
+ sdcache->sort.geometry_id = p_mesh.get_local_index(); //only meshes can repeat anyway
sdcache->sort.uses_forward_gi = ginstance->can_sdfgi;
sdcache->sort.priority = p_material->priority;
}
@@ -2836,11 +3050,6 @@ void RendererSceneRenderForward::_geometry_instance_update(GeometryInstance *p_g
//Fill push constant
- ginstance->push_constant.instance_uniforms_ofs = ginstance->data->shader_parameters_offset >= 0 ? ginstance->data->shader_parameters_offset : 0;
- ginstance->push_constant.layer_mask = ginstance->data->layer_mask;
- ginstance->push_constant.flags = 0;
- ginstance->push_constant.gi_offset = 0xFFFFFFFF; //disabled
-
bool store_transform = true;
if (ginstance->data->base_type == RS::INSTANCE_MULTIMESH) {
@@ -2897,21 +3106,10 @@ void RendererSceneRenderForward::_geometry_instance_update(GeometryInstance *p_g
}
}
- if (store_transform) {
- RendererStorageRD::store_transform(ginstance->data->transform, ginstance->push_constant.transform);
- } else {
- RendererStorageRD::store_transform(Transform(), ginstance->push_constant.transform);
- }
-
+ ginstance->store_transform_cache = store_transform;
ginstance->can_sdfgi = false;
- if (lightmap_instance_is_valid(ginstance->lightmap_instance)) {
- ginstance->push_constant.gi_offset = ginstance->data->lightmap_slice_index << 16;
- ginstance->push_constant.lightmap_uv_scale[0] = ginstance->data->lightmap_uv_scale.position.x;
- ginstance->push_constant.lightmap_uv_scale[1] = ginstance->data->lightmap_uv_scale.position.y;
- ginstance->push_constant.lightmap_uv_scale[2] = ginstance->data->lightmap_uv_scale.size.width;
- ginstance->push_constant.lightmap_uv_scale[3] = ginstance->data->lightmap_uv_scale.size.height;
- } else if (!low_end) {
+ if (!lightmap_instance_is_valid(ginstance->lightmap_instance) && !low_end) {
if (ginstance->gi_probes[0].is_null() && (ginstance->data->use_baked_light || ginstance->data->use_dynamic_gi)) {
ginstance->can_sdfgi = true;
}
@@ -3001,8 +3199,7 @@ void RendererSceneRenderForward::geometry_instance_set_mesh_instance(GeometryIns
void RendererSceneRenderForward::geometry_instance_set_transform(GeometryInstance *p_geometry_instance, const Transform &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) {
GeometryInstanceForward *ginstance = static_cast<GeometryInstanceForward *>(p_geometry_instance);
ERR_FAIL_COND(!ginstance);
- RendererStorageRD::store_transform(p_transform, ginstance->push_constant.transform);
- ginstance->data->transform = p_transform;
+ ginstance->transform = p_transform;
ginstance->mirror = p_transform.basis.determinant() < 0;
ginstance->data->aabb = p_aabb;
ginstance->transformed_aabb = p_transformed_aabb;
@@ -3037,8 +3234,8 @@ void RendererSceneRenderForward::geometry_instance_set_use_lightmap(GeometryInst
GeometryInstanceForward *ginstance = static_cast<GeometryInstanceForward *>(p_geometry_instance);
ERR_FAIL_COND(!ginstance);
ginstance->lightmap_instance = p_lightmap_instance;
- ginstance->data->lightmap_uv_scale = p_lightmap_uv_scale;
- ginstance->data->lightmap_slice_index = p_lightmap_slice_index;
+ ginstance->lightmap_uv_scale = p_lightmap_uv_scale;
+ ginstance->lightmap_slice_index = p_lightmap_slice_index;
_geometry_instance_mark_dirty(ginstance);
}
void RendererSceneRenderForward::geometry_instance_set_lightmap_capture(GeometryInstance *p_geometry_instance, const Color *p_sh9) {
@@ -3061,7 +3258,7 @@ void RendererSceneRenderForward::geometry_instance_set_lightmap_capture(Geometry
void RendererSceneRenderForward::geometry_instance_set_instance_shader_parameters_offset(GeometryInstance *p_geometry_instance, int32_t p_offset) {
GeometryInstanceForward *ginstance = static_cast<GeometryInstanceForward *>(p_geometry_instance);
ERR_FAIL_COND(!ginstance);
- ginstance->data->shader_parameters_offset = p_offset;
+ ginstance->shader_parameters_offset = p_offset;
_geometry_instance_mark_dirty(ginstance);
}
void RendererSceneRenderForward::geometry_instance_set_cast_double_sided_shadows(GeometryInstance *p_geometry_instance, bool p_enable) {
@@ -3075,8 +3272,7 @@ void RendererSceneRenderForward::geometry_instance_set_cast_double_sided_shadows
void RendererSceneRenderForward::geometry_instance_set_layer_mask(GeometryInstance *p_geometry_instance, uint32_t p_layer_mask) {
GeometryInstanceForward *ginstance = static_cast<GeometryInstanceForward *>(p_geometry_instance);
ERR_FAIL_COND(!ginstance);
- ginstance->data->layer_mask = p_layer_mask;
- ginstance->push_constant.layer_mask = p_layer_mask;
+ ginstance->layer_mask = p_layer_mask;
}
void RendererSceneRenderForward::geometry_instance_free(GeometryInstance *p_geometry_instance) {
@@ -3108,7 +3304,7 @@ void RendererSceneRenderForward::geometry_instance_pair_decal_instances(Geometry
Transform RendererSceneRenderForward::geometry_instance_get_transform(GeometryInstance *p_instance) {
GeometryInstanceForward *ginstance = static_cast<GeometryInstanceForward *>(p_instance);
ERR_FAIL_COND_V(!ginstance, Transform());
- return ginstance->data->transform;
+ return ginstance->transform;
}
AABB RendererSceneRenderForward::geometry_instance_get_aabb(GeometryInstance *p_instance) {
GeometryInstanceForward *ginstance = static_cast<GeometryInstanceForward *>(p_instance);
@@ -3333,7 +3529,7 @@ RendererSceneRenderForward::RendererSceneRenderForward(RendererStorageRD *p_stor
actions.render_mode_defines["cull_front"] = "#define DO_SIDE_CHECK\n";
actions.render_mode_defines["cull_disabled"] = "#define DO_SIDE_CHECK\n";
- bool force_lambert = GLOBAL_GET("rendering/quality/shading/force_lambert_over_burley");
+ bool force_lambert = GLOBAL_GET("rendering/shading/overrides/force_lambert_over_burley");
if (!force_lambert) {
actions.render_mode_defines["diffuse_burley"] = "#define DIFFUSE_BURLEY\n";
@@ -3345,7 +3541,7 @@ RendererSceneRenderForward::RendererSceneRenderForward(RendererStorageRD *p_stor
actions.render_mode_defines["sss_mode_skin"] = "#define SSS_MODE_SKIN\n";
- bool force_blinn = GLOBAL_GET("rendering/quality/shading/force_blinn_over_ggx");
+ bool force_blinn = GLOBAL_GET("rendering/shading/overrides/force_blinn_over_ggx");
if (!force_blinn) {
actions.render_mode_defines["specular_schlick_ggx"] = "#define SPECULAR_SCHLICK_GGX\n";
@@ -3376,18 +3572,13 @@ RendererSceneRenderForward::RendererSceneRenderForward(RendererStorageRD *p_stor
shader.compiler.initialize(actions);
}
- //render list
- render_list.max_elements = GLOBAL_DEF_RST("rendering/limits/rendering/max_renderable_elements", (int)128000);
- render_list.init();
- render_pass = 0;
-
- scene_state.uniform_buffer = RD::get_singleton()->uniform_buffer_create(sizeof(SceneState::UBO));
-
{
//default material and shader
- default_shader = storage->shader_create();
+ default_shader = storage->shader_allocate();
+ storage->shader_initialize(default_shader);
storage->shader_set_code(default_shader, "shader_type spatial; void vertex() { ROUGHNESS = 0.8; } void fragment() { ALBEDO=vec3(0.6); ROUGHNESS=0.8; METALLIC=0.2; } \n");
- default_material = storage->material_create();
+ default_material = storage->material_allocate();
+ storage->material_initialize(default_material);
storage->material_set_shader(default_material, default_shader);
MaterialData *md = (MaterialData *)storage->material_get_data(default_material, RendererStorageRD::SHADER_TYPE_3D);
@@ -3398,14 +3589,18 @@ RendererSceneRenderForward::RendererSceneRenderForward(RendererStorageRD *p_stor
}
{
- overdraw_material_shader = storage->shader_create();
+ overdraw_material_shader = storage->shader_allocate();
+ storage->shader_initialize(overdraw_material_shader);
storage->shader_set_code(overdraw_material_shader, "shader_type spatial;\nrender_mode blend_add,unshaded;\n void fragment() { ALBEDO=vec3(0.4,0.8,0.8); ALPHA=0.2; }");
- overdraw_material = storage->material_create();
+ overdraw_material = storage->material_allocate();
+ storage->material_initialize(overdraw_material);
storage->material_set_shader(overdraw_material, overdraw_material_shader);
- wireframe_material_shader = storage->shader_create();
+ wireframe_material_shader = storage->shader_allocate();
+ storage->shader_initialize(wireframe_material_shader);
storage->shader_set_code(wireframe_material_shader, "shader_type spatial;\nrender_mode wireframe,unshaded;\n void fragment() { ALBEDO=vec3(0.0,0.0,0.0); }");
- wireframe_material = storage->material_create();
+ wireframe_material = storage->material_allocate();
+ storage->material_initialize(wireframe_material);
storage->material_set_shader(wireframe_material, wireframe_material_shader);
}
@@ -3429,15 +3624,17 @@ RendererSceneRenderForward::RendererSceneRenderForward(RendererStorageRD *p_stor
shadow_sampler = RD::get_singleton()->sampler_create(sampler);
}
- render_list_thread_threshold = GLOBAL_GET("rendering/forward_renderer/threaded_render_minimum_instances");
+ render_list_thread_threshold = GLOBAL_GET("rendering/limits/forward_renderer/threaded_render_minimum_instances");
}
RendererSceneRenderForward::~RendererSceneRenderForward() {
directional_shadow_atlas_set_size(0);
//clear base uniform set if still valid
- if (render_pass_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(render_pass_uniform_set)) {
- RD::get_singleton()->free(render_pass_uniform_set);
+ for (uint32_t i = 0; i < render_pass_uniform_sets.size(); i++) {
+ if (render_pass_uniform_sets[i].is_valid() && RD::get_singleton()->uniform_set_is_valid(render_pass_uniform_sets[i])) {
+ RD::get_singleton()->free(render_pass_uniform_sets[i]);
+ }
}
if (sdfgi_pass_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(sdfgi_pass_uniform_set)) {
@@ -3456,9 +3653,16 @@ RendererSceneRenderForward::~RendererSceneRenderForward() {
storage->free(default_material);
{
- RD::get_singleton()->free(scene_state.uniform_buffer);
+ for (uint32_t i = 0; i < scene_state.uniform_buffers.size(); i++) {
+ RD::get_singleton()->free(scene_state.uniform_buffers[i]);
+ }
RD::get_singleton()->free(scene_state.lightmap_buffer);
RD::get_singleton()->free(scene_state.lightmap_capture_buffer);
+ for (uint32_t i = 0; i < RENDER_LIST_MAX; i++) {
+ if (scene_state.instance_buffer[i] != RID()) {
+ RD::get_singleton()->free(scene_state.instance_buffer[i]);
+ }
+ }
memdelete_arr(scene_state.lightmap_captures);
}
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_forward.h b/servers/rendering/renderer_rd/renderer_scene_render_forward.h
index d4a4c9a3a9..af78c50fda 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_forward.h
+++ b/servers/rendering/renderer_rd/renderer_scene_render_forward.h
@@ -50,6 +50,15 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
MAX_GI_PROBES = 8,
MAX_LIGHTMAPS = 8,
MAX_GI_PROBES_PER_INSTANCE = 2,
+ INSTANCE_DATA_BUFFER_MIN_SIZE = 4096
+ };
+
+ enum RenderListType {
+ RENDER_LIST_OPAQUE, //used for opaque objects
+ RENDER_LIST_ALPHA, //used for transparent objects
+ RENDER_LIST_SECONDARY, //used for shadows and other objects
+ RENDER_LIST_MAX
+
};
/* Scene Shader */
@@ -213,9 +222,6 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
RID normal_roughness_buffer;
RID giprobe_buffer;
- RID ambient_buffer;
- RID reflection_buffer;
-
RS::ViewportMSAA msaa;
RD::TextureSamples texture_samples;
@@ -236,7 +242,6 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
RID render_sdfgi_uniform_set;
void ensure_specular();
- void ensure_gi();
void ensure_giprobe();
void clear();
virtual void configure(RID p_color_buffer, RID p_depth_buffer, int p_width, int p_height, RS::ViewportMSAA p_msaa);
@@ -249,7 +254,7 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
RID shadow_sampler;
RID render_base_uniform_set;
- RID render_pass_uniform_set;
+ LocalVector<RID> render_pass_uniform_sets;
RID sdfgi_pass_uniform_set;
uint64_t lightmap_texture_array_version = 0xFFFFFFFF;
@@ -258,12 +263,61 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
void _render_buffers_clear_uniform_set(RenderBufferDataForward *rb);
virtual void _render_buffers_uniform_set_changed(RID p_render_buffers);
virtual RID _render_buffers_get_normal_texture(RID p_render_buffers);
- virtual RID _render_buffers_get_ambient_texture(RID p_render_buffers);
- virtual RID _render_buffers_get_reflection_texture(RID p_render_buffers);
void _update_render_base_uniform_set();
RID _setup_sdfgi_render_pass_uniform_set(RID p_albedo_texture, RID p_emission_texture, RID p_emission_aniso_texture, RID p_geom_facing_texture);
- RID _setup_render_pass_uniform_set(RID p_render_buffers, RID p_radiance_texture, RID p_shadow_atlas, RID p_reflection_atlas, RID p_cluster_buffer, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_lightmaps);
+ RID _setup_render_pass_uniform_set(RenderListType p_render_list, RID p_render_buffers, RID p_radiance_texture, RID p_shadow_atlas, RID p_reflection_atlas, RID p_cluster_buffer, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_lightmaps, bool p_use_directional_shadow_atlas = false, int p_index = 0);
+
+ enum PassMode {
+ PASS_MODE_COLOR,
+ PASS_MODE_COLOR_SPECULAR,
+ PASS_MODE_COLOR_TRANSPARENT,
+ PASS_MODE_SHADOW,
+ PASS_MODE_SHADOW_DP,
+ PASS_MODE_DEPTH,
+ PASS_MODE_DEPTH_NORMAL_ROUGHNESS,
+ PASS_MODE_DEPTH_NORMAL_ROUGHNESS_GIPROBE,
+ PASS_MODE_DEPTH_MATERIAL,
+ PASS_MODE_SDF,
+ };
+
+ struct GeometryInstanceSurfaceDataCache;
+ struct RenderElementInfo;
+
+ struct RenderListParameters {
+ GeometryInstanceSurfaceDataCache **elements = nullptr;
+ RenderElementInfo *element_info = nullptr;
+ int element_count = 0;
+ bool reverse_cull = false;
+ PassMode pass_mode = PASS_MODE_COLOR;
+ bool no_gi = false;
+ RID render_pass_uniform_set;
+ bool force_wireframe = false;
+ Vector2 uv_offset;
+ Plane lod_plane;
+ float lod_distance_multiplier = 0.0;
+ float screen_lod_threshold = 0.0;
+ RD::FramebufferFormatID framebuffer_format = 0;
+ uint32_t element_offset = 0;
+ uint32_t barrier = RD::BARRIER_MASK_ALL;
+
+ RenderListParameters(GeometryInstanceSurfaceDataCache **p_elements, RenderElementInfo *p_element_info, int p_element_count, bool p_reverse_cull, PassMode p_pass_mode, bool p_no_gi, RID p_render_pass_uniform_set, bool p_force_wireframe = false, const Vector2 &p_uv_offset = Vector2(), const Plane &p_lod_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_lod_threshold = 0.0, uint32_t p_element_offset = 0, uint32_t p_barrier = RD::BARRIER_MASK_ALL) {
+ elements = p_elements;
+ element_info = p_element_info;
+ element_count = p_element_count;
+ reverse_cull = p_reverse_cull;
+ pass_mode = p_pass_mode;
+ no_gi = p_no_gi;
+ render_pass_uniform_set = p_render_pass_uniform_set;
+ force_wireframe = p_force_wireframe;
+ uv_offset = p_uv_offset;
+ lod_plane = p_lod_plane;
+ lod_distance_multiplier = p_lod_distance_multiplier;
+ screen_lod_threshold = p_screen_lod_threshold;
+ element_offset = p_element_offset;
+ barrier = p_barrier;
+ }
+ };
struct LightmapData {
float normal_xform[12];
@@ -373,9 +427,24 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
uint32_t pancake_shadows;
};
+ struct PushConstant {
+ uint32_t base_index; //
+ uint32_t uv_offset; //packed
+ uint32_t pad[2];
+ };
+
+ struct InstanceData {
+ float transform[16];
+ uint32_t flags;
+ uint32_t instance_uniforms_ofs; //base offset in global buffer for instance variables
+ uint32_t gi_offset; //GI information when using lightmapping (VCT or lightmap index)
+ uint32_t layer_mask;
+ float lightmap_uv_scale[4];
+ };
+
UBO ubo;
- RID uniform_buffer;
+ LocalVector<RID> uniform_buffers;
LightmapData lightmaps[MAX_LIGHTMAPS];
RID lightmap_ids[MAX_LIGHTMAPS];
@@ -384,6 +453,10 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
uint32_t max_lightmaps;
RID lightmap_buffer;
+ RID instance_buffer[RENDER_LIST_MAX];
+ uint32_t instance_buffer_size[RENDER_LIST_MAX] = { 0, 0, 0 };
+ LocalVector<InstanceData> instance_data[RENDER_LIST_MAX];
+
LightmapCaptureData *lightmap_captures;
uint32_t max_lightmap_captures;
RID lightmap_capture_buffer;
@@ -396,10 +469,29 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
bool used_depth_texture = false;
bool used_sss = false;
+ struct ShadowPass {
+ uint32_t element_from;
+ uint32_t element_count;
+ bool flip_cull;
+ PassMode pass_mode;
+
+ RID rp_uniform_set;
+ Plane camera_plane;
+ float lod_distance_multiplier;
+ float screen_lod_threshold;
+
+ RID framebuffer;
+ RD::InitialAction initial_depth_action;
+ RD::FinalAction final_depth_action;
+ Rect2i rect;
+ };
+
+ LocalVector<ShadowPass> shadow_passes;
+
} scene_state;
static RendererSceneRenderForward *singleton;
- uint64_t render_pass;
+
double time;
RID default_shader;
RID default_material;
@@ -413,51 +505,15 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
RID default_vec4_xform_buffer;
RID default_vec4_xform_uniform_set;
- enum PassMode {
- PASS_MODE_COLOR,
- PASS_MODE_COLOR_SPECULAR,
- PASS_MODE_COLOR_TRANSPARENT,
- PASS_MODE_SHADOW,
- PASS_MODE_SHADOW_DP,
- PASS_MODE_DEPTH,
- PASS_MODE_DEPTH_NORMAL_ROUGHNESS,
- PASS_MODE_DEPTH_NORMAL_ROUGHNESS_GIPROBE,
- PASS_MODE_DEPTH_MATERIAL,
- PASS_MODE_SDF,
- };
-
- void _setup_environment(RID p_environment, RID p_render_buffers, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform, RID p_reflection_probe, bool p_no_fog, const Size2i &p_screen_size, uint32_t p_cluster_size, uint32_t p_max_cluster_elements, RID p_shadow_atlas, bool p_flip_y, const Color &p_default_bg_color, float p_znear, float p_zfar, bool p_opaque_render_buffers = false, bool p_pancake_shadows = false);
+ void _setup_environment(RID p_environment, RID p_render_buffers, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform, RID p_reflection_probe, bool p_no_fog, const Size2i &p_screen_size, uint32_t p_cluster_size, uint32_t p_max_cluster_elements, RID p_shadow_atlas, bool p_flip_y, const Color &p_default_bg_color, float p_znear, float p_zfar, bool p_opaque_render_buffers = false, bool p_pancake_shadows = false, int p_index = 0);
void _setup_giprobes(const PagedArray<RID> &p_giprobes);
void _setup_lightmaps(const PagedArray<RID> &p_lightmaps, const Transform &p_cam_transform);
- struct GeometryInstanceSurfaceDataCache;
-
- struct RenderListParameters {
- GeometryInstanceSurfaceDataCache **elements = nullptr;
- int element_count = 0;
- bool reverse_cull = false;
- PassMode pass_mode = PASS_MODE_COLOR;
- bool no_gi = false;
- RID render_pass_uniform_set;
- bool force_wireframe = false;
- Vector2 uv_offset;
- Plane lod_plane;
- float lod_distance_multiplier = 0.0;
- float screen_lod_threshold = 0.0;
- RD::FramebufferFormatID framebuffer_format = 0;
- RenderListParameters(GeometryInstanceSurfaceDataCache **p_elements, int p_element_count, bool p_reverse_cull, PassMode p_pass_mode, bool p_no_gi, RID p_render_pass_uniform_set, bool p_force_wireframe = false, const Vector2 &p_uv_offset = Vector2(), const Plane &p_lod_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_lod_threshold = 0.0) {
- elements = p_elements;
- element_count = p_element_count;
- reverse_cull = p_reverse_cull;
- pass_mode = p_pass_mode;
- no_gi = p_no_gi;
- render_pass_uniform_set = p_render_pass_uniform_set;
- force_wireframe = p_force_wireframe;
- uv_offset = p_uv_offset;
- lod_plane = p_lod_plane;
- lod_distance_multiplier = p_lod_distance_multiplier;
- screen_lod_threshold = p_screen_lod_threshold;
- }
+ struct RenderElementInfo {
+ uint32_t repeat : 22;
+ uint32_t uses_lightmap : 1;
+ uint32_t uses_forward_gi : 1;
+ uint32_t lod_index : 8;
};
template <PassMode p_pass_mode>
@@ -471,7 +527,9 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
uint32_t render_list_thread_threshold = 500;
- void _fill_render_list(const PagedArray<GeometryInstance *> &p_instances, PassMode p_pass_mode, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform, bool p_using_sdfgi = false, bool p_using_opaque_gi = false);
+ void _update_instance_data_buffer(RenderListType p_render_list);
+ void _fill_instance_data(RenderListType p_render_list, uint32_t p_offset = 0, int32_t p_max_elements = -1, bool p_update_buffer = true);
+ void _fill_render_list(RenderListType p_render_list, const PagedArray<GeometryInstance *> &p_instances, PassMode p_pass_mode, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform, bool p_using_sdfgi = false, bool p_using_opaque_gi = false, const Plane &p_lod_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_lod_threshold = 0.0, bool p_append = false);
Map<Size2i, RID> sdfgi_framebuffer_size_cache;
@@ -499,14 +557,17 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
union {
struct {
- uint32_t geometry_id;
- uint32_t material_id;
- uint32_t shader_id;
- uint32_t surface_type : 4;
- uint32_t uses_forward_gi : 1; //set during addition
- uint32_t uses_lightmap : 1; //set during addition
- uint32_t depth_layer : 4; //set during addition
- uint32_t priority : 8;
+ uint64_t lod_index : 8;
+ uint64_t surface_index : 10;
+ uint64_t geometry_id : 32;
+ uint64_t material_id_low : 14;
+
+ uint64_t material_id_hi : 18;
+ uint64_t shader_id : 32;
+ uint64_t uses_forward_gi : 1;
+ uint64_t uses_lightmap : 1;
+ uint64_t depth_layer : 4;
+ uint64_t priority : 8;
};
struct {
uint64_t sort_key1;
@@ -538,20 +599,20 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
float lod_model_scale = 1.0;
AABB transformed_aabb; //needed for LOD
float depth = 0;
- struct PushConstant {
- float transform[16];
- uint32_t flags;
- uint32_t instance_uniforms_ofs; //base offset in global buffer for instance variables
- uint32_t gi_offset; //GI information when using lightmapping (VCT or lightmap index)
- uint32_t layer_mask;
- float lightmap_uv_scale[4];
- } push_constant;
+ uint32_t gi_offset_cache = 0;
+ uint32_t flags_cache = 0;
+ bool store_transform_cache = true;
+ int32_t shader_parameters_offset = -1;
+ uint32_t lightmap_slice_index;
+ Rect2 lightmap_uv_scale;
+ uint32_t layer_mask = 1;
RID transforms_uniform_set;
uint32_t instance_count = 0;
RID mesh_instance;
bool can_sdfgi = false;
//used during setup
uint32_t base_flags = 0;
+ Transform transform;
RID gi_probes[MAX_GI_PROBES_PER_INSTANCE];
RID lightmap_instance;
GeometryInstanceLightmapSH *lightmap_sh = nullptr;
@@ -564,21 +625,14 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
RS::InstanceType base_type;
RID skeleton;
-
- uint32_t layer_mask = 1;
-
Vector<RID> surface_materials;
RID material_override;
- Transform transform;
AABB aabb;
- int32_t shader_parameters_offset = -1;
bool use_dynamic_gi = false;
bool use_baked_light = false;
bool cast_double_sided_shaodows = false;
bool mirror = false;
- Rect2 lightmap_uv_scale;
- uint32_t lightmap_slice_index = 0;
bool dirty_dependencies = false;
RendererStorage::DependencyTracker dependency_tracker;
@@ -610,16 +664,12 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
/* Render List */
struct RenderList {
- int max_elements;
-
- GeometryInstanceSurfaceDataCache **elements = nullptr;
-
- int element_count;
- int alpha_element_count;
+ LocalVector<GeometryInstanceSurfaceDataCache *> elements;
+ LocalVector<RenderElementInfo> element_info;
void clear() {
- element_count = 0;
- alpha_element_count = 0;
+ elements.clear();
+ element_info.clear();
}
//should eventually be replaced by radix
@@ -630,13 +680,14 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
}
};
- void sort_by_key(bool p_alpha) {
+ void sort_by_key() {
SortArray<GeometryInstanceSurfaceDataCache *, SortByKey> sorter;
- if (p_alpha) {
- sorter.sort(&elements[max_elements - alpha_element_count], alpha_element_count);
- } else {
- sorter.sort(elements, element_count);
- }
+ sorter.sort(elements.ptr(), elements.size());
+ }
+
+ void sort_by_key_range(uint32_t p_from, uint32_t p_size) {
+ SortArray<GeometryInstanceSurfaceDataCache *, SortByKey> sorter;
+ sorter.sort(elements.ptr() + p_from, p_size);
}
struct SortByDepth {
@@ -645,14 +696,10 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
}
};
- void sort_by_depth(bool p_alpha) { //used for shadows
+ void sort_by_depth() { //used for shadows
SortArray<GeometryInstanceSurfaceDataCache *, SortByDepth> sorter;
- if (p_alpha) {
- sorter.sort(&elements[max_elements - alpha_element_count], alpha_element_count);
- } else {
- sorter.sort(elements, element_count);
- }
+ sorter.sort(elements.ptr(), elements.size());
}
struct SortByReverseDepthAndPriority {
@@ -664,50 +711,24 @@ class RendererSceneRenderForward : public RendererSceneRenderRD {
void sort_by_reverse_depth_and_priority(bool p_alpha) { //used for alpha
SortArray<GeometryInstanceSurfaceDataCache *, SortByReverseDepthAndPriority> sorter;
- if (p_alpha) {
- sorter.sort(&elements[max_elements - alpha_element_count], alpha_element_count);
- } else {
- sorter.sort(elements, element_count);
- }
+ sorter.sort(elements.ptr(), elements.size());
}
_FORCE_INLINE_ void add_element(GeometryInstanceSurfaceDataCache *p_element) {
- if (element_count + alpha_element_count >= max_elements) {
- return;
- }
- elements[element_count] = p_element;
- element_count++;
- }
-
- _FORCE_INLINE_ void add_alpha_element(GeometryInstanceSurfaceDataCache *p_element) {
- if (element_count + alpha_element_count >= max_elements) {
- return;
- }
- int idx = max_elements - alpha_element_count - 1;
- elements[idx] = p_element;
- alpha_element_count++;
- }
-
- void init() {
- element_count = 0;
- alpha_element_count = 0;
- elements = memnew_arr(GeometryInstanceSurfaceDataCache *, max_elements);
- }
-
- RenderList() {
- max_elements = 0;
- }
-
- ~RenderList() {
- memdelete_arr(elements);
+ elements.push_back(p_element);
}
};
- RenderList render_list;
+ RenderList render_list[RENDER_LIST_MAX];
protected:
- virtual void _render_scene(RID p_render_buffer, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, int p_directional_light_count, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_cluster_buffer, uint32_t p_cluster_size, uint32_t p_max_cluster_elements, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, const Color &p_default_bg_color, float p_lod_threshold);
- virtual void _render_shadow(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const CameraMatrix &p_projection, const Transform &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_lod_threshold = 0.0);
+ virtual void _render_scene(RID p_render_buffer, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_cluster_buffer, uint32_t p_cluster_size, uint32_t p_max_cluster_elements, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, const Color &p_default_bg_color, float p_lod_threshold);
+
+ virtual void _render_shadow_begin();
+ virtual void _render_shadow_append(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const CameraMatrix &p_projection, const Transform &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_lod_threshold = 0.0, const Rect2i &p_rect = Rect2i(), bool p_flip_y = false, bool p_clear_region = true, bool p_begin = true, bool p_end = true);
+ virtual void _render_shadow_process();
+ virtual void _render_shadow_end(uint32_t p_barrier = RD::BARRIER_MASK_ALL);
+
virtual void _render_material(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region);
virtual void _render_uv2(const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region);
virtual void _render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<GeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture);
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
index 2e457c2ce6..15e963f6e4 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
@@ -183,13 +183,11 @@ void RendererSceneRenderRD::_create_reflection_importance_sample(ReflectionData
void RendererSceneRenderRD::_update_reflection_mipmaps(ReflectionData &rd, int p_start, int p_end) {
for (int i = p_start; i < p_end; i++) {
- for (int j = 0; j < rd.layers[i].mipmaps.size() - 1; j++) {
- for (int k = 0; k < 6; k++) {
- RID view = rd.layers[i].mipmaps[j].views[k];
- RID texture = rd.layers[i].mipmaps[j + 1].views[k];
- Size2i size = rd.layers[i].mipmaps[j + 1].size;
- storage->get_effects()->make_mipmap(view, texture, size);
- }
+ for (int j = 0; j < rd.layers[i].views.size() - 1; j++) {
+ RID view = rd.layers[i].views[j];
+ RID texture = rd.layers[i].views[j + 1];
+ Size2i size = rd.layers[i].mipmaps[j + 1].size;
+ storage->get_effects()->cubemap_downsample(view, texture, size);
}
}
}
@@ -669,6 +667,13 @@ void RendererSceneRenderRD::sdfgi_update(RID p_render_buffers, RID p_environment
u.ids.push_back(rb->sdfgi->lightprobe_texture);
uniforms.push_back(u);
}
+ {
+ RD::Uniform u;
+ u.binding = 11;
+ u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
+ u.ids.push_back(rb->sdfgi->occlusion_texture);
+ uniforms.push_back(u);
+ }
cascade.sdf_direct_light_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, sdfgi_shader.direct_light.version_get_shader(sdfgi_shader.direct_light_shader, 0), 0);
}
@@ -951,7 +956,7 @@ void RendererSceneRenderRD::sdfgi_update(RID p_render_buffers, RID p_environment
sdfgi->cascades[i].integrate_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, sdfgi_shader.integrate.version_get_shader(sdfgi_shader.integrate_shader, 0), 0);
}
- sdfgi->uses_multibounce = env->sdfgi_use_multibounce;
+ sdfgi->bounce_feedback = env->sdfgi_bounce_feedback;
sdfgi->energy = env->sdfgi_energy;
sdfgi->normal_bias = env->sdfgi_normal_bias;
sdfgi->probe_bias = env->sdfgi_probe_bias;
@@ -964,7 +969,7 @@ void RendererSceneRenderRD::sdfgi_update(RID p_render_buffers, RID p_environment
//check for updates
- sdfgi->uses_multibounce = env->sdfgi_use_multibounce;
+ sdfgi->bounce_feedback = env->sdfgi_bounce_feedback;
sdfgi->energy = env->sdfgi_energy;
sdfgi->normal_bias = env->sdfgi_normal_bias;
sdfgi->probe_bias = env->sdfgi_probe_bias;
@@ -1150,150 +1155,72 @@ void RendererSceneRenderRD::_sdfgi_update_cascades(RID p_render_buffers) {
cascade_data[i].pad = 0;
}
- RD::get_singleton()->buffer_update(rb->sdfgi->cascades_ubo, 0, sizeof(SDFGI::Cascade::UBO) * SDFGI::MAX_CASCADES, cascade_data, true);
+ RD::get_singleton()->buffer_update(rb->sdfgi->cascades_ubo, 0, sizeof(SDFGI::Cascade::UBO) * SDFGI::MAX_CASCADES, cascade_data, RD::BARRIER_MASK_COMPUTE);
}
-void RendererSceneRenderRD::sdfgi_update_probes(RID p_render_buffers, RID p_environment, const Vector<RID> &p_directional_lights, const RID *p_positional_light_instances, uint32_t p_positional_light_count) {
+void RendererSceneRenderRD::_sdfgi_update_light(RID p_render_buffers, RID p_environment) {
RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
ERR_FAIL_COND(rb == nullptr);
if (rb->sdfgi == nullptr) {
return;
}
- Environment *env = environment_owner.getornull(p_environment);
-
- RENDER_TIMESTAMP(">SDFGI Update Probes");
-
- /* Update Cascades UBO */
- _sdfgi_update_cascades(p_render_buffers);
- /* Update Dynamic Lights Buffer */
-
- RENDER_TIMESTAMP("Update Lights");
-
- /* Update dynamic lights */
-
- {
- int32_t cascade_light_count[SDFGI::MAX_CASCADES];
-
- for (uint32_t i = 0; i < rb->sdfgi->cascades.size(); i++) {
- SDFGI::Cascade &cascade = rb->sdfgi->cascades[i];
-
- SDGIShader::Light lights[SDFGI::MAX_DYNAMIC_LIGHTS];
- uint32_t idx = 0;
- for (uint32_t j = 0; j < (uint32_t)p_directional_lights.size(); j++) {
- if (idx == SDFGI::MAX_DYNAMIC_LIGHTS) {
- break;
- }
-
- LightInstance *li = light_instance_owner.getornull(p_directional_lights[j]);
- ERR_CONTINUE(!li);
-
- if (storage->light_directional_is_sky_only(li->light)) {
- continue;
- }
-
- Vector3 dir = -li->transform.basis.get_axis(Vector3::AXIS_Z);
- dir.y *= rb->sdfgi->y_mult;
- dir.normalize();
- lights[idx].direction[0] = dir.x;
- lights[idx].direction[1] = dir.y;
- lights[idx].direction[2] = dir.z;
- Color color = storage->light_get_color(li->light);
- color = color.to_linear();
- lights[idx].color[0] = color.r;
- lights[idx].color[1] = color.g;
- lights[idx].color[2] = color.b;
- lights[idx].type = RS::LIGHT_DIRECTIONAL;
- lights[idx].energy = storage->light_get_param(li->light, RS::LIGHT_PARAM_ENERGY);
- lights[idx].has_shadow = storage->light_has_shadow(li->light);
- idx++;
- }
-
- AABB cascade_aabb;
- cascade_aabb.position = Vector3((Vector3i(1, 1, 1) * -int32_t(rb->sdfgi->cascade_size >> 1) + cascade.position)) * cascade.cell_size;
- cascade_aabb.size = Vector3(1, 1, 1) * rb->sdfgi->cascade_size * cascade.cell_size;
+ RD::get_singleton()->draw_command_begin_label("SDFGI Update dynamic Light");
- for (uint32_t j = 0; j < p_positional_light_count; j++) {
- if (idx == SDFGI::MAX_DYNAMIC_LIGHTS) {
- break;
- }
+ /* Update dynamic light */
- LightInstance *li = light_instance_owner.getornull(p_positional_light_instances[j]);
- ERR_CONTINUE(!li);
+ RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
+ RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.direct_light_pipeline[SDGIShader::DIRECT_LIGHT_MODE_DYNAMIC]);
- uint32_t max_sdfgi_cascade = storage->light_get_max_sdfgi_cascade(li->light);
- if (i > max_sdfgi_cascade) {
- continue;
- }
+ SDGIShader::DirectLightPushConstant push_constant;
- if (!cascade_aabb.intersects(li->aabb)) {
- continue;
- }
+ push_constant.grid_size[0] = rb->sdfgi->cascade_size;
+ push_constant.grid_size[1] = rb->sdfgi->cascade_size;
+ push_constant.grid_size[2] = rb->sdfgi->cascade_size;
+ push_constant.max_cascades = rb->sdfgi->cascades.size();
+ push_constant.probe_axis_size = rb->sdfgi->probe_axis_count;
+ push_constant.bounce_feedback = rb->sdfgi->bounce_feedback;
+ push_constant.y_mult = rb->sdfgi->y_mult;
+ push_constant.use_occlusion = rb->sdfgi->uses_occlusion;
- Vector3 dir = -li->transform.basis.get_axis(Vector3::AXIS_Z);
- //faster to not do this here
- //dir.y *= rb->sdfgi->y_mult;
- //dir.normalize();
- lights[idx].direction[0] = dir.x;
- lights[idx].direction[1] = dir.y;
- lights[idx].direction[2] = dir.z;
- Vector3 pos = li->transform.origin;
- pos.y *= rb->sdfgi->y_mult;
- lights[idx].position[0] = pos.x;
- lights[idx].position[1] = pos.y;
- lights[idx].position[2] = pos.z;
- Color color = storage->light_get_color(li->light);
- color = color.to_linear();
- lights[idx].color[0] = color.r;
- lights[idx].color[1] = color.g;
- lights[idx].color[2] = color.b;
- lights[idx].type = storage->light_get_type(li->light);
- lights[idx].energy = storage->light_get_param(li->light, RS::LIGHT_PARAM_ENERGY);
- lights[idx].has_shadow = storage->light_has_shadow(li->light);
- lights[idx].attenuation = storage->light_get_param(li->light, RS::LIGHT_PARAM_ATTENUATION);
- lights[idx].radius = storage->light_get_param(li->light, RS::LIGHT_PARAM_RANGE);
- lights[idx].spot_angle = Math::deg2rad(storage->light_get_param(li->light, RS::LIGHT_PARAM_SPOT_ANGLE));
- lights[idx].spot_attenuation = storage->light_get_param(li->light, RS::LIGHT_PARAM_SPOT_ATTENUATION);
+ for (uint32_t i = 0; i < rb->sdfgi->cascades.size(); i++) {
+ SDFGI::Cascade &cascade = rb->sdfgi->cascades[i];
+ push_constant.light_count = rb->sdfgi->cascade_dynamic_light_count[i];
+ push_constant.cascade = i;
- idx++;
- }
+ if (rb->sdfgi->cascades[i].all_dynamic_lights_dirty || sdfgi_frames_to_update_light == RS::ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME) {
+ push_constant.process_offset = 0;
+ push_constant.process_increment = 1;
+ } else {
+ static uint32_t frames_to_update_table[RS::ENV_SDFGI_UPDATE_LIGHT_MAX] = {
+ 1, 2, 4, 8, 16
+ };
- if (idx > 0) {
- RD::get_singleton()->buffer_update(cascade.lights_buffer, 0, idx * sizeof(SDGIShader::Light), lights, true);
- }
+ uint32_t frames_to_update = frames_to_update_table[sdfgi_frames_to_update_light];
- cascade_light_count[i] = idx;
+ push_constant.process_offset = RSG::rasterizer->get_frame_number() % frames_to_update;
+ push_constant.process_increment = frames_to_update;
}
+ rb->sdfgi->cascades[i].all_dynamic_lights_dirty = false;
- RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
- RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.direct_light_pipeline[SDGIShader::DIRECT_LIGHT_MODE_DYNAMIC]);
-
- SDGIShader::DirectLightPushConstant push_constant;
-
- push_constant.grid_size[0] = rb->sdfgi->cascade_size;
- push_constant.grid_size[1] = rb->sdfgi->cascade_size;
- push_constant.grid_size[2] = rb->sdfgi->cascade_size;
- push_constant.max_cascades = rb->sdfgi->cascades.size();
- push_constant.probe_axis_size = rb->sdfgi->probe_axis_count;
- push_constant.multibounce = rb->sdfgi->uses_multibounce;
- push_constant.y_mult = rb->sdfgi->y_mult;
-
- push_constant.process_offset = 0;
- push_constant.process_increment = 1;
-
- for (uint32_t i = 0; i < rb->sdfgi->cascades.size(); i++) {
- SDFGI::Cascade &cascade = rb->sdfgi->cascades[i];
- push_constant.light_count = cascade_light_count[i];
- push_constant.cascade = i;
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, cascade.sdf_direct_light_uniform_set, 0);
+ RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::DirectLightPushConstant));
+ RD::get_singleton()->compute_list_dispatch_indirect(compute_list, cascade.solid_cell_dispatch_buffer, 0);
+ }
+ RD::get_singleton()->compute_list_end(RD::BARRIER_MASK_COMPUTE);
+ RD::get_singleton()->draw_command_end_label();
+}
- RD::get_singleton()->compute_list_bind_uniform_set(compute_list, cascade.sdf_direct_light_uniform_set, 0);
- RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::DirectLightPushConstant));
- RD::get_singleton()->compute_list_dispatch_indirect(compute_list, cascade.solid_cell_dispatch_buffer, 0);
- }
- RD::get_singleton()->compute_list_end();
+void RendererSceneRenderRD::_sdfgi_update_probes(RID p_render_buffers, RID p_environment) {
+ RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ ERR_FAIL_COND(rb == nullptr);
+ if (rb->sdfgi == nullptr) {
+ return;
}
- RENDER_TIMESTAMP("Raytrace");
+ RD::get_singleton()->draw_command_begin_label("SDFGI Update Probes");
+
+ Environment *env = environment_owner.getornull(p_environment);
SDGIShader::IntegratePushConstant push_constant;
push_constant.grid_size[1] = rb->sdfgi->cascade_size;
@@ -1303,7 +1230,7 @@ void RendererSceneRenderRD::sdfgi_update_probes(RID p_render_buffers, RID p_envi
push_constant.probe_axis_size = rb->sdfgi->probe_axis_count;
push_constant.history_index = rb->sdfgi->render_pass % rb->sdfgi->history_size;
push_constant.history_size = rb->sdfgi->history_size;
- static const uint32_t ray_count[RS::ENV_SDFGI_RAY_COUNT_MAX] = { 8, 16, 32, 64, 96, 128 };
+ static const uint32_t ray_count[RS::ENV_SDFGI_RAY_COUNT_MAX] = { 4, 8, 16, 32, 64, 96, 128 };
push_constant.ray_count = ray_count[sdfgi_ray_count];
push_constant.ray_bias = rb->sdfgi->probe_bias;
push_constant.image_size[0] = rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count;
@@ -1362,7 +1289,7 @@ void RendererSceneRenderRD::sdfgi_update_probes(RID p_render_buffers, RID p_envi
rb->sdfgi->render_pass++;
- RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
+ RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(true);
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.integrate_pipeline[SDGIShader::INTEGRATE_MODE_PROCESS]);
int32_t probe_divisor = rb->sdfgi->cascade_size / SDFGI::PROBE_DIVISOR;
@@ -1376,14 +1303,47 @@ void RendererSceneRenderRD::sdfgi_update_probes(RID p_render_buffers, RID p_envi
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, sky_uniform_set, 1);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::IntegratePushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count, rb->sdfgi->probe_axis_count, 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count, rb->sdfgi->probe_axis_count, 1);
+ }
+
+ //end later after raster to avoid barriering on layout changes
+ //RD::get_singleton()->compute_list_end(RD::BARRIER_MASK_NO_BARRIER);
+
+ RD::get_singleton()->draw_command_end_label();
+}
+
+void RendererSceneRenderRD::_sdfgi_store_probes(RID p_render_buffers) {
+ RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ ERR_FAIL_COND(rb == nullptr);
+ if (rb->sdfgi == nullptr) {
+ return;
}
- RD::get_singleton()->compute_list_add_barrier(compute_list); //wait until done
+ RD::get_singleton()->barrier(RD::BARRIER_MASK_COMPUTE, RD::BARRIER_MASK_COMPUTE);
+ RD::get_singleton()->draw_command_begin_label("SDFGI Store Probes");
+
+ SDGIShader::IntegratePushConstant push_constant;
+ push_constant.grid_size[1] = rb->sdfgi->cascade_size;
+ push_constant.grid_size[2] = rb->sdfgi->cascade_size;
+ push_constant.grid_size[0] = rb->sdfgi->cascade_size;
+ push_constant.max_cascades = rb->sdfgi->cascades.size();
+ push_constant.probe_axis_size = rb->sdfgi->probe_axis_count;
+ push_constant.history_index = rb->sdfgi->render_pass % rb->sdfgi->history_size;
+ push_constant.history_size = rb->sdfgi->history_size;
+ static const uint32_t ray_count[RS::ENV_SDFGI_RAY_COUNT_MAX] = { 4, 8, 16, 32, 64, 96, 128 };
+ push_constant.ray_count = ray_count[sdfgi_ray_count];
+ push_constant.ray_bias = rb->sdfgi->probe_bias;
+ push_constant.image_size[0] = rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count;
+ push_constant.image_size[1] = rb->sdfgi->probe_axis_count;
+ push_constant.store_ambient_texture = false;
+
+ push_constant.sky_mode = 0;
+ push_constant.y_mult = rb->sdfgi->y_mult;
// Then store values into the lightprobe texture. Separating these steps has a small performance hit, but it allows for multiple bounces
RENDER_TIMESTAMP("Average Probes");
+ RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.integrate_pipeline[SDGIShader::INTEGRATE_MODE_STORE]);
//convert to octahedral to store
@@ -1393,20 +1353,22 @@ void RendererSceneRenderRD::sdfgi_update_probes(RID p_render_buffers, RID p_envi
for (uint32_t i = 0; i < rb->sdfgi->cascades.size(); i++) {
push_constant.cascade = i;
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->cascades[i].integrate_uniform_set, 0);
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, sdfgi_shader.integrate_default_sky_uniform_set, 1);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::IntegratePushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count * SDFGI::LIGHTPROBE_OCT_SIZE, rb->sdfgi->probe_axis_count * SDFGI::LIGHTPROBE_OCT_SIZE, 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count * SDFGI::LIGHTPROBE_OCT_SIZE, rb->sdfgi->probe_axis_count * SDFGI::LIGHTPROBE_OCT_SIZE, 1);
}
- RD::get_singleton()->compute_list_end();
+ RD::get_singleton()->compute_list_end(RD::BARRIER_MASK_COMPUTE);
- RENDER_TIMESTAMP("<SDFGI Update Probes");
+ RD::get_singleton()->draw_command_end_label();
}
-
void RendererSceneRenderRD::_setup_giprobes(RID p_render_buffers, const Transform &p_transform, const PagedArray<RID> &p_gi_probes, uint32_t &r_gi_probes_used) {
r_gi_probes_used = 0;
RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
ERR_FAIL_COND(rb == nullptr);
+ RD::get_singleton()->draw_command_begin_label("GIProbes Setup");
+
RID gi_probe_buffer = render_buffers_get_gi_probe_buffer(p_render_buffers);
GI::GIProbeData gi_probe_data[RenderBuffers::MAX_GIPROBES];
@@ -1490,58 +1452,25 @@ void RendererSceneRenderRD::_setup_giprobes(RID p_render_buffers, const Transfor
}
if (p_gi_probes.size() > 0) {
- RD::get_singleton()->buffer_update(gi_probe_buffer, 0, sizeof(GI::GIProbeData) * MIN((uint64_t)RenderBuffers::MAX_GIPROBES, p_gi_probes.size()), gi_probe_data, true);
+ RD::get_singleton()->buffer_update(gi_probe_buffer, 0, sizeof(GI::GIProbeData) * MIN((uint64_t)RenderBuffers::MAX_GIPROBES, p_gi_probes.size()), gi_probe_data, RD::BARRIER_MASK_COMPUTE);
}
-}
-void RendererSceneRenderRD::_process_gi(RID p_render_buffers, RID p_normal_roughness_buffer, RID p_ambient_buffer, RID p_reflection_buffer, RID p_gi_probe_buffer, RID p_environment, const CameraMatrix &p_projection, const Transform &p_transform, const PagedArray<RID> &p_gi_probes) {
- RENDER_TIMESTAMP("Render GI");
+ RD::get_singleton()->draw_command_end_label();
+}
+void RendererSceneRenderRD::_pre_process_gi(RID p_render_buffers, const Transform &p_transform) {
+ // Do the required buffer transfers and setup before the depth-pre pass, this way GI can
+ // run in parallel during depth-pre pass and shadow rendering.
RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
ERR_FAIL_COND(rb == nullptr);
- Environment *env = environment_owner.getornull(p_environment);
-
- GI::PushConstant push_constant;
-
- push_constant.screen_size[0] = rb->width;
- push_constant.screen_size[1] = rb->height;
- push_constant.z_near = p_projection.get_z_near();
- push_constant.z_far = p_projection.get_z_far();
- push_constant.orthogonal = p_projection.is_orthogonal();
- push_constant.proj_info[0] = -2.0f / (rb->width * p_projection.matrix[0][0]);
- push_constant.proj_info[1] = -2.0f / (rb->height * p_projection.matrix[1][1]);
- push_constant.proj_info[2] = (1.0f - p_projection.matrix[0][2]) / p_projection.matrix[0][0];
- push_constant.proj_info[3] = (1.0f + p_projection.matrix[1][2]) / p_projection.matrix[1][1];
- push_constant.max_giprobes = MIN((uint64_t)RenderBuffers::MAX_GIPROBES, p_gi_probes.size());
- push_constant.high_quality_vct = gi_probe_quality == RS::GI_PROBE_QUALITY_HIGH;
- bool use_sdfgi = rb->sdfgi != nullptr;
- bool use_giprobes = push_constant.max_giprobes > 0;
+ /* Update Cascades UBO */
- if (env) {
- push_constant.ao_color[0] = env->ao_color.r;
- push_constant.ao_color[1] = env->ao_color.g;
- push_constant.ao_color[2] = env->ao_color.b;
- } else {
- push_constant.ao_color[0] = 0;
- push_constant.ao_color[1] = 0;
- push_constant.ao_color[2] = 0;
- }
+ if (rb->sdfgi) {
+ /* Update general SDFGI Buffer */
- push_constant.cam_rotation[0] = p_transform.basis[0][0];
- push_constant.cam_rotation[1] = p_transform.basis[1][0];
- push_constant.cam_rotation[2] = p_transform.basis[2][0];
- push_constant.cam_rotation[3] = 0;
- push_constant.cam_rotation[4] = p_transform.basis[0][1];
- push_constant.cam_rotation[5] = p_transform.basis[1][1];
- push_constant.cam_rotation[6] = p_transform.basis[2][1];
- push_constant.cam_rotation[7] = 0;
- push_constant.cam_rotation[8] = p_transform.basis[0][2];
- push_constant.cam_rotation[9] = p_transform.basis[1][2];
- push_constant.cam_rotation[10] = p_transform.basis[2][2];
- push_constant.cam_rotation[11] = 0;
+ _sdfgi_update_cascades(p_render_buffers);
- if (rb->sdfgi) {
GI::SDFGIData sdfgi_data;
sdfgi_data.grid_size[0] = rb->sdfgi->cascade_size;
@@ -1608,8 +1537,171 @@ void RendererSceneRenderRD::_process_gi(RID p_render_buffers, RID p_normal_rough
c.to_cell = 1.0 / rb->sdfgi->cascades[i].cell_size;
}
- RD::get_singleton()->buffer_update(gi.sdfgi_ubo, 0, sizeof(GI::SDFGIData), &sdfgi_data, true);
+ RD::get_singleton()->buffer_update(gi.sdfgi_ubo, 0, sizeof(GI::SDFGIData), &sdfgi_data, RD::BARRIER_MASK_COMPUTE);
+
+ /* Update dynamic lights in SDFGI cascades */
+
+ for (uint32_t i = 0; i < rb->sdfgi->cascades.size(); i++) {
+ SDFGI::Cascade &cascade = rb->sdfgi->cascades[i];
+
+ SDGIShader::Light lights[SDFGI::MAX_DYNAMIC_LIGHTS];
+ uint32_t idx = 0;
+ for (uint32_t j = 0; j < (uint32_t)render_state.sdfgi_update_data->directional_lights->size(); j++) {
+ if (idx == SDFGI::MAX_DYNAMIC_LIGHTS) {
+ break;
+ }
+
+ LightInstance *li = light_instance_owner.getornull(render_state.sdfgi_update_data->directional_lights->get(j));
+ ERR_CONTINUE(!li);
+
+ if (storage->light_directional_is_sky_only(li->light)) {
+ continue;
+ }
+
+ Vector3 dir = -li->transform.basis.get_axis(Vector3::AXIS_Z);
+ dir.y *= rb->sdfgi->y_mult;
+ dir.normalize();
+ lights[idx].direction[0] = dir.x;
+ lights[idx].direction[1] = dir.y;
+ lights[idx].direction[2] = dir.z;
+ Color color = storage->light_get_color(li->light);
+ color = color.to_linear();
+ lights[idx].color[0] = color.r;
+ lights[idx].color[1] = color.g;
+ lights[idx].color[2] = color.b;
+ lights[idx].type = RS::LIGHT_DIRECTIONAL;
+ lights[idx].energy = storage->light_get_param(li->light, RS::LIGHT_PARAM_ENERGY);
+ lights[idx].has_shadow = storage->light_has_shadow(li->light);
+
+ idx++;
+ }
+
+ AABB cascade_aabb;
+ cascade_aabb.position = Vector3((Vector3i(1, 1, 1) * -int32_t(rb->sdfgi->cascade_size >> 1) + cascade.position)) * cascade.cell_size;
+ cascade_aabb.size = Vector3(1, 1, 1) * rb->sdfgi->cascade_size * cascade.cell_size;
+
+ for (uint32_t j = 0; j < render_state.sdfgi_update_data->positional_light_count; j++) {
+ if (idx == SDFGI::MAX_DYNAMIC_LIGHTS) {
+ break;
+ }
+
+ LightInstance *li = light_instance_owner.getornull(render_state.sdfgi_update_data->positional_light_instances[j]);
+ ERR_CONTINUE(!li);
+
+ uint32_t max_sdfgi_cascade = storage->light_get_max_sdfgi_cascade(li->light);
+ if (i > max_sdfgi_cascade) {
+ continue;
+ }
+
+ if (!cascade_aabb.intersects(li->aabb)) {
+ continue;
+ }
+
+ Vector3 dir = -li->transform.basis.get_axis(Vector3::AXIS_Z);
+ //faster to not do this here
+ //dir.y *= rb->sdfgi->y_mult;
+ //dir.normalize();
+ lights[idx].direction[0] = dir.x;
+ lights[idx].direction[1] = dir.y;
+ lights[idx].direction[2] = dir.z;
+ Vector3 pos = li->transform.origin;
+ pos.y *= rb->sdfgi->y_mult;
+ lights[idx].position[0] = pos.x;
+ lights[idx].position[1] = pos.y;
+ lights[idx].position[2] = pos.z;
+ Color color = storage->light_get_color(li->light);
+ color = color.to_linear();
+ lights[idx].color[0] = color.r;
+ lights[idx].color[1] = color.g;
+ lights[idx].color[2] = color.b;
+ lights[idx].type = storage->light_get_type(li->light);
+ lights[idx].energy = storage->light_get_param(li->light, RS::LIGHT_PARAM_ENERGY);
+ lights[idx].has_shadow = storage->light_has_shadow(li->light);
+ lights[idx].attenuation = storage->light_get_param(li->light, RS::LIGHT_PARAM_ATTENUATION);
+ lights[idx].radius = storage->light_get_param(li->light, RS::LIGHT_PARAM_RANGE);
+ lights[idx].cos_spot_angle = Math::cos(Math::deg2rad(storage->light_get_param(li->light, RS::LIGHT_PARAM_SPOT_ANGLE)));
+ lights[idx].inv_spot_attenuation = 1.0f / storage->light_get_param(li->light, RS::LIGHT_PARAM_SPOT_ATTENUATION);
+
+ idx++;
+ }
+
+ if (idx > 0) {
+ RD::get_singleton()->buffer_update(cascade.lights_buffer, 0, idx * sizeof(SDGIShader::Light), lights, RD::BARRIER_MASK_COMPUTE);
+ }
+
+ rb->sdfgi->cascade_dynamic_light_count[i] = idx;
+ }
}
+}
+
+void RendererSceneRenderRD::_process_gi(RID p_render_buffers, RID p_normal_roughness_buffer, RID p_gi_probe_buffer, RID p_environment, const CameraMatrix &p_projection, const Transform &p_transform, const PagedArray<RID> &p_gi_probes) {
+ RD::get_singleton()->draw_command_begin_label("GI Render");
+
+ RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ ERR_FAIL_COND(rb == nullptr);
+ Environment *env = environment_owner.getornull(p_environment);
+
+ if (rb->ambient_buffer.is_null() || rb->using_half_size_gi != gi.half_resolution) {
+ if (rb->ambient_buffer.is_valid()) {
+ RD::get_singleton()->free(rb->ambient_buffer);
+ RD::get_singleton()->free(rb->reflection_buffer);
+ }
+
+ RD::TextureFormat tf;
+ tf.format = RD::DATA_FORMAT_R16G16B16A16_SFLOAT;
+ tf.width = rb->width;
+ tf.height = rb->height;
+ if (gi.half_resolution) {
+ tf.width >>= 1;
+ tf.height >>= 1;
+ }
+ tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
+ rb->reflection_buffer = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ rb->ambient_buffer = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ rb->using_half_size_gi = gi.half_resolution;
+
+ _render_buffers_uniform_set_changed(p_render_buffers);
+ }
+
+ GI::PushConstant push_constant;
+
+ push_constant.screen_size[0] = rb->width;
+ push_constant.screen_size[1] = rb->height;
+ push_constant.z_near = p_projection.get_z_near();
+ push_constant.z_far = p_projection.get_z_far();
+ push_constant.orthogonal = p_projection.is_orthogonal();
+ push_constant.proj_info[0] = -2.0f / (rb->width * p_projection.matrix[0][0]);
+ push_constant.proj_info[1] = -2.0f / (rb->height * p_projection.matrix[1][1]);
+ push_constant.proj_info[2] = (1.0f - p_projection.matrix[0][2]) / p_projection.matrix[0][0];
+ push_constant.proj_info[3] = (1.0f + p_projection.matrix[1][2]) / p_projection.matrix[1][1];
+ push_constant.max_giprobes = MIN((uint64_t)RenderBuffers::MAX_GIPROBES, p_gi_probes.size());
+ push_constant.high_quality_vct = gi_probe_quality == RS::GI_PROBE_QUALITY_HIGH;
+
+ bool use_sdfgi = rb->sdfgi != nullptr;
+ bool use_giprobes = push_constant.max_giprobes > 0;
+
+ if (env) {
+ push_constant.ao_color[0] = env->ao_color.r;
+ push_constant.ao_color[1] = env->ao_color.g;
+ push_constant.ao_color[2] = env->ao_color.b;
+ } else {
+ push_constant.ao_color[0] = 0;
+ push_constant.ao_color[1] = 0;
+ push_constant.ao_color[2] = 0;
+ }
+
+ push_constant.cam_rotation[0] = p_transform.basis[0][0];
+ push_constant.cam_rotation[1] = p_transform.basis[1][0];
+ push_constant.cam_rotation[2] = p_transform.basis[2][0];
+ push_constant.cam_rotation[3] = 0;
+ push_constant.cam_rotation[4] = p_transform.basis[0][1];
+ push_constant.cam_rotation[5] = p_transform.basis[1][1];
+ push_constant.cam_rotation[6] = p_transform.basis[2][1];
+ push_constant.cam_rotation[7] = 0;
+ push_constant.cam_rotation[8] = p_transform.basis[0][2];
+ push_constant.cam_rotation[9] = p_transform.basis[1][2];
+ push_constant.cam_rotation[10] = p_transform.basis[2][2];
+ push_constant.cam_rotation[11] = 0;
if (rb->gi_uniform_set.is_null() || !RD::get_singleton()->uniform_set_is_valid(rb->gi_uniform_set)) {
Vector<RD::Uniform> uniforms;
@@ -1695,7 +1787,7 @@ void RendererSceneRenderRD::_process_gi(RID p_render_buffers, RID p_normal_rough
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
u.binding = 9;
- u.ids.push_back(p_ambient_buffer);
+ u.ids.push_back(rb->ambient_buffer);
uniforms.push_back(u);
}
@@ -1703,7 +1795,7 @@ void RendererSceneRenderRD::_process_gi(RID p_render_buffers, RID p_normal_rough
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
u.binding = 10;
- u.ids.push_back(p_reflection_buffer);
+ u.ids.push_back(rb->reflection_buffer);
uniforms.push_back(u);
}
@@ -1767,17 +1859,33 @@ void RendererSceneRenderRD::_process_gi(RID p_render_buffers, RID p_normal_rough
rb->gi_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, gi.shader.version_get_shader(gi.shader_version, 0), 0);
}
- GI::Mode mode = (use_sdfgi && use_giprobes) ? GI::MODE_COMBINED : (use_sdfgi ? GI::MODE_SDFGI : GI::MODE_GIPROBE);
- RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
+ GI::Mode mode;
+
+ if (rb->using_half_size_gi) {
+ mode = (use_sdfgi && use_giprobes) ? GI::MODE_HALF_RES_COMBINED : (use_sdfgi ? GI::MODE_HALF_RES_SDFGI : GI::MODE_HALF_RES_GIPROBE);
+ } else {
+ mode = (use_sdfgi && use_giprobes) ? GI::MODE_COMBINED : (use_sdfgi ? GI::MODE_SDFGI : GI::MODE_GIPROBE);
+ }
+ RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(true);
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, gi.pipelines[mode]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->gi_uniform_set, 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(GI::PushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->width, rb->height, 1, 8, 8, 1);
- RD::get_singleton()->compute_list_end();
+
+ if (rb->using_half_size_gi) {
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->width >> 1, rb->height >> 1, 1);
+ } else {
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->width, rb->height, 1);
+ }
+ //do barrier later to allow oeverlap
+ //RD::get_singleton()->compute_list_end(RD::BARRIER_MASK_NO_BARRIER); //no barriers, let other compute, raster and transfer happen at the same time
+ RD::get_singleton()->draw_command_end_label();
}
-RID RendererSceneRenderRD::sky_create() {
- return sky_owner.make_rid(Sky());
+RID RendererSceneRenderRD::sky_allocate() {
+ return sky_owner.allocate_rid();
+}
+void RendererSceneRenderRD::sky_initialize(RID p_rid) {
+ sky_owner.initialize_rid(p_rid, Sky());
}
void RendererSceneRenderRD::_sky_invalidate(Sky *p_sky) {
@@ -2291,7 +2399,7 @@ void RendererSceneRenderRD::_setup_sky(RID p_environment, RID p_render_buffers,
}
if (light_data_dirty) {
- RD::get_singleton()->buffer_update(sky_scene_state.directional_light_buffer, 0, sizeof(SkyDirectionalLightData) * sky_scene_state.max_directional_lights, sky_scene_state.directional_lights, true);
+ RD::get_singleton()->buffer_update(sky_scene_state.directional_light_buffer, 0, sizeof(SkyDirectionalLightData) * sky_scene_state.max_directional_lights, sky_scene_state.directional_lights);
RendererSceneRenderRD::SkyDirectionalLightData *temp = sky_scene_state.last_frame_directional_lights;
sky_scene_state.last_frame_directional_lights = sky_scene_state.directional_lights;
@@ -2343,7 +2451,7 @@ void RendererSceneRenderRD::_setup_sky(RID p_environment, RID p_render_buffers,
sky_scene_state.ubo.fog_light_color[2] = fog_color.b * fog_energy;
sky_scene_state.ubo.fog_sun_scatter = environment_get_fog_sun_scatter(p_environment);
- RD::get_singleton()->buffer_update(sky_scene_state.uniform_buffer, 0, sizeof(SkySceneState::UBO), &sky_scene_state.ubo, true);
+ RD::get_singleton()->buffer_update(sky_scene_state.uniform_buffer, 0, sizeof(SkySceneState::UBO), &sky_scene_state.ubo);
}
void RendererSceneRenderRD::_update_sky(RID p_environment, const CameraMatrix &p_projection, const Transform &p_transform) {
@@ -2801,8 +2909,11 @@ RendererStorageRD::MaterialData *RendererSceneRenderRD::_create_sky_material_fun
return material_data;
}
-RID RendererSceneRenderRD::environment_create() {
- return environment_owner.make_rid(Environment());
+RID RendererSceneRenderRD::environment_allocate() {
+ return environment_owner.allocate_rid();
+}
+void RendererSceneRenderRD::environment_initialize(RID p_rid) {
+ environment_owner.initialize_rid(p_rid, Environment());
}
void RendererSceneRenderRD::environment_set_background(RID p_env, RS::EnvironmentBG p_bg) {
@@ -2976,7 +3087,7 @@ void RendererSceneRenderRD::environment_glow_set_use_high_quality(bool p_enable)
glow_high_quality = p_enable;
}
-void RendererSceneRenderRD::environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, bool p_use_multibounce, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
+void RendererSceneRenderRD::environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) {
Environment *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
@@ -2988,7 +3099,7 @@ void RendererSceneRenderRD::environment_set_sdfgi(RID p_env, bool p_enable, RS::
env->sdfgi_cascades = p_cascades;
env->sdfgi_min_cell_size = p_min_cell_size;
env->sdfgi_use_occlusion = p_use_occlusion;
- env->sdfgi_use_multibounce = p_use_multibounce;
+ env->sdfgi_bounce_feedback = p_bounce_feedback;
env->sdfgi_read_sky_light = p_read_sky;
env->sdfgi_energy = p_energy;
env->sdfgi_normal_bias = p_normal_bias;
@@ -3054,7 +3165,7 @@ float RendererSceneRenderRD::environment_get_fog_aerial_perspective(RID p_env) c
return env->fog_aerial_perspective;
}
-void RendererSceneRenderRD::environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, RenderingServer::EnvVolumetricFogShadowFilter p_shadow_filter) {
+void RendererSceneRenderRD::environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount) {
Environment *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
@@ -3068,8 +3179,9 @@ void RendererSceneRenderRD::environment_set_volumetric_fog(RID p_env, bool p_ena
env->volumetric_fog_light_energy = p_light_energy;
env->volumetric_fog_length = p_length;
env->volumetric_fog_detail_spread = p_detail_spread;
- env->volumetric_fog_shadow_filter = p_shadow_filter;
env->volumetric_fog_gi_inject = p_gi_inject;
+ env->volumetric_fog_temporal_reprojection = p_temporal_reprojection;
+ env->volumetric_fog_temporal_reprojection_amount = p_temporal_reprojection_amount;
}
void RendererSceneRenderRD::environment_set_volumetric_fog_volume_size(int p_size, int p_depth) {
@@ -3080,25 +3192,6 @@ void RendererSceneRenderRD::environment_set_volumetric_fog_volume_size(int p_siz
void RendererSceneRenderRD::environment_set_volumetric_fog_filter_active(bool p_enable) {
volumetric_fog_filter_active = p_enable;
}
-void RendererSceneRenderRD::environment_set_volumetric_fog_directional_shadow_shrink_size(int p_shrink_size) {
- p_shrink_size = nearest_power_of_2_templated(p_shrink_size);
- if (volumetric_fog_directional_shadow_shrink == (uint32_t)p_shrink_size) {
- return;
- }
-
- _clear_shadow_shrink_stages(directional_shadow.shrink_stages);
-}
-void RendererSceneRenderRD::environment_set_volumetric_fog_positional_shadow_shrink_size(int p_shrink_size) {
- p_shrink_size = nearest_power_of_2_templated(p_shrink_size);
- if (volumetric_fog_positional_shadow_shrink == (uint32_t)p_shrink_size) {
- return;
- }
-
- for (uint32_t i = 0; i < shadow_atlas_owner.get_rid_count(); i++) {
- ShadowAtlas *sa = shadow_atlas_owner.get_ptr_by_index(i);
- _clear_shadow_shrink_stages(sa->shrink_stages);
- }
-}
void RendererSceneRenderRD::environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) {
sdfgi_ray_count = p_ray_count;
@@ -3107,6 +3200,9 @@ void RendererSceneRenderRD::environment_set_sdfgi_ray_count(RS::EnvironmentSDFGI
void RendererSceneRenderRD::environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) {
sdfgi_frames_to_converge = p_frames;
}
+void RendererSceneRenderRD::environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) {
+ sdfgi_frames_to_update_light = p_update;
+}
void RendererSceneRenderRD::environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) {
Environment *env = environment_owner.getornull(p_env);
@@ -3233,8 +3329,8 @@ Ref<Image> RendererSceneRenderRD::environment_bake_panorama(RID p_env, bool p_ba
RID RendererSceneRenderRD::reflection_atlas_create() {
ReflectionAtlas ra;
- ra.count = GLOBAL_GET("rendering/quality/reflection_atlas/reflection_count");
- ra.size = GLOBAL_GET("rendering/quality/reflection_atlas/reflection_size");
+ ra.count = GLOBAL_GET("rendering/reflections/reflection_atlas/reflection_count");
+ ra.size = GLOBAL_GET("rendering/reflections/reflection_atlas/reflection_size");
ra.cluster_builder = memnew(ClusterBuilderRD);
ra.cluster_builder->set_shared(&cluster_builder_shared);
@@ -3518,13 +3614,28 @@ RID RendererSceneRenderRD::shadow_atlas_create() {
return shadow_atlas_owner.make_rid(ShadowAtlas());
}
-void RendererSceneRenderRD::shadow_atlas_set_size(RID p_atlas, int p_size) {
+void RendererSceneRenderRD::_update_shadow_atlas(ShadowAtlas *shadow_atlas) {
+ if (shadow_atlas->size > 0 && shadow_atlas->depth.is_null()) {
+ RD::TextureFormat tf;
+ tf.format = shadow_atlas->use_16_bits ? RD::DATA_FORMAT_D16_UNORM : RD::DATA_FORMAT_D32_SFLOAT;
+ tf.width = shadow_atlas->size;
+ tf.height = shadow_atlas->size;
+ tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
+
+ shadow_atlas->depth = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ Vector<RID> fb_tex;
+ fb_tex.push_back(shadow_atlas->depth);
+ shadow_atlas->fb = RD::get_singleton()->framebuffer_create(fb_tex);
+ }
+}
+
+void RendererSceneRenderRD::shadow_atlas_set_size(RID p_atlas, int p_size, bool p_16_bits) {
ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_atlas);
ERR_FAIL_COND(!shadow_atlas);
ERR_FAIL_COND(p_size < 0);
p_size = next_power_of_2(p_size);
- if (p_size == shadow_atlas->size) {
+ if (p_size == shadow_atlas->size && p_16_bits == shadow_atlas->use_16_bits) {
return;
}
@@ -3532,7 +3643,6 @@ void RendererSceneRenderRD::shadow_atlas_set_size(RID p_atlas, int p_size) {
if (shadow_atlas->depth.is_valid()) {
RD::get_singleton()->free(shadow_atlas->depth);
shadow_atlas->depth = RID();
- _clear_shadow_shrink_stages(shadow_atlas->shrink_stages);
}
for (int i = 0; i < 4; i++) {
//clear subdivisions
@@ -3551,16 +3661,7 @@ void RendererSceneRenderRD::shadow_atlas_set_size(RID p_atlas, int p_size) {
shadow_atlas->shadow_owners.clear();
shadow_atlas->size = p_size;
-
- if (shadow_atlas->size) {
- RD::TextureFormat tf;
- tf.format = RD::DATA_FORMAT_R32_SFLOAT;
- tf.width = shadow_atlas->size;
- tf.height = shadow_atlas->size;
- tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
-
- shadow_atlas->depth = RD::get_singleton()->texture_create(tf, RD::TextureView());
- }
+ shadow_atlas->use_16_bits = p_size;
}
void RendererSceneRenderRD::shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) {
@@ -3815,10 +3916,24 @@ bool RendererSceneRenderRD::shadow_atlas_update_light(RID p_atlas, RID p_light_i
return false;
}
-void RendererSceneRenderRD::directional_shadow_atlas_set_size(int p_size) {
+void RendererSceneRenderRD::_update_directional_shadow_atlas() {
+ if (directional_shadow.depth.is_null() && directional_shadow.size > 0) {
+ RD::TextureFormat tf;
+ tf.format = directional_shadow.use_16_bits ? RD::DATA_FORMAT_D16_UNORM : RD::DATA_FORMAT_D32_SFLOAT;
+ tf.width = directional_shadow.size;
+ tf.height = directional_shadow.size;
+ tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
+
+ directional_shadow.depth = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ Vector<RID> fb_tex;
+ fb_tex.push_back(directional_shadow.depth);
+ directional_shadow.fb = RD::get_singleton()->framebuffer_create(fb_tex);
+ }
+}
+void RendererSceneRenderRD::directional_shadow_atlas_set_size(int p_size, bool p_16_bits) {
p_size = nearest_power_of_2_templated(p_size);
- if (directional_shadow.size == p_size) {
+ if (directional_shadow.size == p_size && directional_shadow.use_16_bits == p_16_bits) {
return;
}
@@ -3826,21 +3941,9 @@ void RendererSceneRenderRD::directional_shadow_atlas_set_size(int p_size) {
if (directional_shadow.depth.is_valid()) {
RD::get_singleton()->free(directional_shadow.depth);
- _clear_shadow_shrink_stages(directional_shadow.shrink_stages);
directional_shadow.depth = RID();
+ _base_uniforms_changed();
}
-
- if (p_size > 0) {
- RD::TextureFormat tf;
- tf.format = RD::DATA_FORMAT_R32_SFLOAT;
- tf.width = p_size;
- tf.height = p_size;
- tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
-
- directional_shadow.depth = RD::get_singleton()->texture_create(tf, RD::TextureView());
- }
-
- _base_uniforms_changed();
}
void RendererSceneRenderRD::set_directional_shadow_count(int p_count) {
@@ -3894,8 +3997,11 @@ int RendererSceneRenderRD::get_directional_light_shadow_size(RID p_light_intance
//////////////////////////////////////////////////
-RID RendererSceneRenderRD::camera_effects_create() {
- return camera_effects_owner.make_rid(CameraEffects());
+RID RendererSceneRenderRD::camera_effects_allocate() {
+ return camera_effects_owner.allocate_rid();
+}
+void RendererSceneRenderRD::camera_effects_initialize(RID p_rid) {
+ camera_effects_owner.initialize_rid(p_rid, CameraEffects());
}
void RendererSceneRenderRD::camera_effects_set_dof_blur_quality(RS::DOFBlurQuality p_quality, bool p_use_jitter) {
@@ -3960,11 +4066,7 @@ void RendererSceneRenderRD::light_instance_set_shadow_transform(RID p_light_inst
LightInstance *light_instance = light_instance_owner.getornull(p_light_instance);
ERR_FAIL_COND(!light_instance);
- if (storage->light_get_type(light_instance->light) != RS::LIGHT_DIRECTIONAL) {
- p_pass = 0;
- }
-
- ERR_FAIL_INDEX(p_pass, 4);
+ ERR_FAIL_INDEX(p_pass, 6);
light_instance->shadow_transform[p_pass].camera = p_projection;
light_instance->shadow_transform[p_pass].transform = p_transform;
@@ -4010,29 +4112,6 @@ RendererSceneRenderRD::ShadowCubemap *RendererSceneRenderRD::_get_shadow_cubemap
return &shadow_cubemaps[p_size];
}
-RendererSceneRenderRD::ShadowMap *RendererSceneRenderRD::_get_shadow_map(const Size2i &p_size) {
- if (!shadow_maps.has(p_size)) {
- ShadowMap sm;
- {
- RD::TextureFormat tf;
- tf.format = RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_D32_SFLOAT, RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) ? RD::DATA_FORMAT_D32_SFLOAT : RD::DATA_FORMAT_X8_D24_UNORM_PACK32;
- tf.width = p_size.width;
- tf.height = p_size.height;
- tf.usage_bits = RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT;
-
- sm.depth = RD::get_singleton()->texture_create(tf, RD::TextureView());
- }
-
- Vector<RID> fbtex;
- fbtex.push_back(sm.depth);
- sm.fb = RD::get_singleton()->framebuffer_create(fbtex);
-
- shadow_maps[p_size] = sm;
- }
-
- return &shadow_maps[p_size];
-}
-
//////////////////////////
RID RendererSceneRenderRD::decal_instance_create(RID p_decal) {
@@ -4133,7 +4212,7 @@ void RendererSceneRenderRD::gi_probe_update(RID p_probe, bool p_update_light_ins
gi_probe->texture = RD::get_singleton()->texture_create(tf, RD::TextureView());
- RD::get_singleton()->texture_clear(gi_probe->texture, Color(0, 0, 0, 0), 0, levels.size(), 0, 1, false);
+ RD::get_singleton()->texture_clear(gi_probe->texture, Color(0, 0, 0, 0), 0, levels.size(), 0, 1);
{
int total_elements = 0;
@@ -4445,7 +4524,7 @@ void RendererSceneRenderRD::gi_probe_update(RID p_probe, bool p_update_light_ins
if (gi_probe->has_dynamic_object_data) {
//if it has dynamic object data, it needs to be cleared
- RD::get_singleton()->texture_clear(gi_probe->texture, Color(0, 0, 0, 0), 0, gi_probe->mipmaps.size(), 0, 1, true);
+ RD::get_singleton()->texture_clear(gi_probe->texture, Color(0, 0, 0, 0), 0, gi_probe->mipmaps.size(), 0, 1);
}
uint32_t light_count = 0;
@@ -4477,8 +4556,8 @@ void RendererSceneRenderRD::gi_probe_update(RID p_probe, bool p_update_light_ins
l.color[1] = color.g;
l.color[2] = color.b;
- l.spot_angle_radians = Math::deg2rad(storage->light_get_param(light, RS::LIGHT_PARAM_SPOT_ANGLE));
- l.spot_attenuation = storage->light_get_param(light, RS::LIGHT_PARAM_SPOT_ATTENUATION);
+ l.cos_spot_angle = Math::cos(Math::deg2rad(storage->light_get_param(light, RS::LIGHT_PARAM_SPOT_ANGLE)));
+ l.inv_spot_attenuation = 1.0f / storage->light_get_param(light, RS::LIGHT_PARAM_SPOT_ATTENUATION);
Transform xform = light_instance_get_base_transform(light_instance);
@@ -4496,7 +4575,7 @@ void RendererSceneRenderRD::gi_probe_update(RID p_probe, bool p_update_light_ins
l.has_shadow = storage->light_has_shadow(light);
}
- RD::get_singleton()->buffer_update(gi_probe_lights_uniform, 0, sizeof(GIProbeLight) * light_count, gi_probe_lights, true);
+ RD::get_singleton()->buffer_update(gi_probe_lights_uniform, 0, sizeof(GIProbeLight) * light_count, gi_probe_lights);
}
}
@@ -4897,7 +4976,7 @@ void RendererSceneRenderRD::_debug_sdfgi_probes(RID p_render_buffers, RD::DrawLi
push_constant.band_power = 4;
push_constant.sections_in_band = ((band_points / 2) - 1);
push_constant.band_mask = band_points - 2;
- push_constant.section_arc = (Math_PI * 2.0) / float(push_constant.sections_in_band);
+ push_constant.section_arc = Math_TAU / float(push_constant.sections_in_band);
push_constant.y_mult = rb->sdfgi->y_mult;
uint32_t total_points = push_constant.sections_in_band * band_points;
@@ -5118,9 +5197,6 @@ void RendererSceneRenderRD::_free_render_buffer_data(RenderBuffers *rb) {
RD::get_singleton()->free(rb->luminance.reduce[i]);
}
- for (int i = 0; i < rb->luminance.reduce.size(); i++) {
- RD::get_singleton()->free(rb->luminance.reduce[i]);
- }
rb->luminance.reduce.clear();
if (rb->luminance.current.is_valid()) {
@@ -5161,6 +5237,13 @@ void RendererSceneRenderRD::_free_render_buffer_data(RenderBuffers *rb) {
RD::get_singleton()->free(rb->ssr.normal_scaled);
rb->ssr.normal_scaled = RID();
}
+
+ if (rb->ambient_buffer.is_valid()) {
+ RD::get_singleton()->free(rb->ambient_buffer);
+ RD::get_singleton()->free(rb->reflection_buffer);
+ rb->ambient_buffer = RID();
+ rb->reflection_buffer = RID();
+ }
}
void RendererSceneRenderRD::_process_sss(RID p_render_buffers, const CameraMatrix &p_camera) {
@@ -5293,9 +5376,11 @@ void RendererSceneRenderRD::_process_ssao(RID p_render_buffers, RID p_environmen
tf.array_layers = 4;
tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
rb->ssao.depth = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ RD::get_singleton()->set_resource_name(rb->ssao.depth, "SSAO Depth");
for (uint32_t i = 0; i < tf.mipmaps; i++) {
RID slice = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), rb->ssao.depth, 0, i, RD::TEXTURE_SLICE_2D_ARRAY);
rb->ssao.depth_slices.push_back(slice);
+ RD::get_singleton()->set_resource_name(rb->ssao.depth_slices[i], "SSAO Depth Mip " + itos(i) + " ");
}
}
@@ -5308,9 +5393,11 @@ void RendererSceneRenderRD::_process_ssao(RID p_render_buffers, RID p_environmen
tf.array_layers = 4;
tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
rb->ssao.ao_deinterleaved = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ RD::get_singleton()->set_resource_name(rb->ssao.ao_deinterleaved, "SSAO De-interleaved Array");
for (uint32_t i = 0; i < 4; i++) {
RID slice = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), rb->ssao.ao_deinterleaved, i, 0);
rb->ssao.ao_deinterleaved_slices.push_back(slice);
+ RD::get_singleton()->set_resource_name(rb->ssao.ao_deinterleaved_slices[i], "SSAO De-interleaved Array Layer " + itos(i) + " ");
}
}
@@ -5323,9 +5410,11 @@ void RendererSceneRenderRD::_process_ssao(RID p_render_buffers, RID p_environmen
tf.array_layers = 4;
tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
rb->ssao.ao_pong = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ RD::get_singleton()->set_resource_name(rb->ssao.ao_pong, "SSAO De-interleaved Array Pong");
for (uint32_t i = 0; i < 4; i++) {
RID slice = RD::get_singleton()->texture_create_shared_from_slice(RD::TextureView(), rb->ssao.ao_pong, i, 0);
rb->ssao.ao_pong_slices.push_back(slice);
+ RD::get_singleton()->set_resource_name(rb->ssao.ao_deinterleaved_slices[i], "SSAO De-interleaved Array Layer " + itos(i) + " Pong");
}
}
@@ -5336,7 +5425,9 @@ void RendererSceneRenderRD::_process_ssao(RID p_render_buffers, RID p_environmen
tf.height = half_height;
tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
rb->ssao.importance_map[0] = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ RD::get_singleton()->set_resource_name(rb->ssao.importance_map[0], "SSAO Importance Map");
rb->ssao.importance_map[1] = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ RD::get_singleton()->set_resource_name(rb->ssao.importance_map[1], "SSAO Importance Map Pong");
}
{
RD::TextureFormat tf;
@@ -5345,6 +5436,7 @@ void RendererSceneRenderRD::_process_ssao(RID p_render_buffers, RID p_environmen
tf.height = rb->height;
tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
rb->ssao.ao_final = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ RD::get_singleton()->set_resource_name(rb->ssao.ao_final, "SSAO Final");
_render_buffers_uniform_set_changed(p_render_buffers);
}
ssao_using_half_size = ssao_half_size;
@@ -5560,10 +5652,10 @@ void RendererSceneRenderRD::_render_buffers_debug_draw(RID p_render_buffers, RID
effects->copy_to_fb_rect(_render_buffers_get_normal_texture(p_render_buffers), storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize), false, false);
}
- if (debug_draw == RS::VIEWPORT_DEBUG_DRAW_GI_BUFFER && _render_buffers_get_ambient_texture(p_render_buffers).is_valid()) {
+ if (debug_draw == RS::VIEWPORT_DEBUG_DRAW_GI_BUFFER && rb->ambient_buffer.is_valid()) {
Size2 rtsize = storage->render_target_get_size(rb->render_target);
- RID ambient_texture = _render_buffers_get_ambient_texture(p_render_buffers);
- RID reflection_texture = _render_buffers_get_reflection_texture(p_render_buffers);
+ RID ambient_texture = rb->ambient_buffer;
+ RID reflection_texture = rb->reflection_buffer;
effects->copy_to_fb_rect(ambient_texture, storage->render_target_get_rd_framebuffer(rb->render_target), Rect2(Vector2(), rtsize), false, false, false, true, reflection_texture);
}
}
@@ -5719,7 +5811,7 @@ void RendererSceneRenderRD::_sdfgi_debug_draw(RID p_render_buffers, const Camera
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::DebugPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->width, rb->height, 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->width, rb->height, 1);
RD::get_singleton()->compute_list_end();
Size2 rtsize = storage->render_target_get_size(rb->render_target);
@@ -5755,6 +5847,17 @@ RID RendererSceneRenderRD::render_buffers_get_default_gi_probe_buffer() {
return default_giprobe_buffer;
}
+RID RendererSceneRenderRD::render_buffers_get_gi_ambient_texture(RID p_render_buffers) {
+ RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ ERR_FAIL_COND_V(!rb, RID());
+ return rb->ambient_buffer;
+}
+RID RendererSceneRenderRD::render_buffers_get_gi_reflection_texture(RID p_render_buffers) {
+ RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ ERR_FAIL_COND_V(!rb, RID());
+ return rb->reflection_buffer;
+}
+
uint32_t RendererSceneRenderRD::render_buffers_get_sdfgi_cascade_count(RID p_render_buffers) const {
const RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
ERR_FAIL_COND_V(!rb, 0);
@@ -5941,6 +6044,10 @@ void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p
rb->cluster_builder->setup(Size2i(p_width, p_height), max_cluster_elements, rb->depth_texture, storage->sampler_rd_get_default(RS::CANVAS_ITEM_TEXTURE_FILTER_NEAREST, RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED), rb->texture);
}
+void RendererSceneRenderRD::gi_set_use_half_resolution(bool p_enable) {
+ gi.half_resolution = p_enable;
+}
+
void RendererSceneRenderRD::sub_surface_scattering_set_quality(RS::SubSurfaceScatteringQuality p_quality) {
sss_quality = p_quality;
}
@@ -6116,7 +6223,7 @@ void RendererSceneRenderRD::_setup_reflections(const PagedArray<RID> &p_reflecti
}
if (cluster.reflection_count) {
- RD::get_singleton()->buffer_update(cluster.reflection_buffer, 0, cluster.reflection_count * sizeof(ReflectionData), cluster.reflections, true);
+ RD::get_singleton()->buffer_update(cluster.reflection_buffer, 0, cluster.reflection_count * sizeof(ReflectionData), cluster.reflections, RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_COMPUTE);
}
}
@@ -6368,8 +6475,6 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray<RID> &p_lights, const
LightInstance *li = (i < cluster.omni_light_count) ? cluster.omni_light_sort[index].instance : cluster.spot_light_sort[index].instance;
RID base = li->light;
- cluster.lights_instances[i] = li->self;
-
Transform light_transform = li->transform;
float sign = storage->light_is_negative(base) ? -1 : 1;
@@ -6403,9 +6508,9 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray<RID> &p_lights, const
light_data.size = size;
- light_data.cone_attenuation = storage->light_get_param(base, RS::LIGHT_PARAM_SPOT_ATTENUATION);
+ light_data.inv_spot_attenuation = 1.0f / storage->light_get_param(base, RS::LIGHT_PARAM_SPOT_ATTENUATION);
float spot_angle = storage->light_get_param(base, RS::LIGHT_PARAM_SPOT_ANGLE);
- light_data.cone_angle = Math::cos(Math::deg2rad(spot_angle));
+ light_data.cos_spot_angle = Math::cos(Math::deg2rad(spot_angle));
light_data.mask = storage->light_get_cull_mask(base);
@@ -6508,16 +6613,17 @@ void RendererSceneRenderRD::_setup_lights(const PagedArray<RID> &p_lights, const
r_positional_light_count++;
}
+ //update without barriers
if (cluster.omni_light_count) {
- RD::get_singleton()->buffer_update(cluster.omni_light_buffer, 0, sizeof(Cluster::LightData) * cluster.omni_light_count, cluster.omni_lights, true);
+ RD::get_singleton()->buffer_update(cluster.omni_light_buffer, 0, sizeof(Cluster::LightData) * cluster.omni_light_count, cluster.omni_lights, RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_COMPUTE);
}
if (cluster.spot_light_count) {
- RD::get_singleton()->buffer_update(cluster.spot_light_buffer, 0, sizeof(Cluster::LightData) * cluster.spot_light_count, cluster.spot_lights, true);
+ RD::get_singleton()->buffer_update(cluster.spot_light_buffer, 0, sizeof(Cluster::LightData) * cluster.spot_light_count, cluster.spot_lights, RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_COMPUTE);
}
if (r_directional_light_count) {
- RD::get_singleton()->buffer_update(cluster.directional_light_buffer, 0, sizeof(Cluster::DirectionalLightData) * r_directional_light_count, cluster.directional_lights, true);
+ RD::get_singleton()->buffer_update(cluster.directional_light_buffer, 0, sizeof(Cluster::DirectionalLightData) * r_directional_light_count, cluster.directional_lights, RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_COMPUTE);
}
}
@@ -6678,13 +6784,14 @@ void RendererSceneRenderRD::_setup_decals(const PagedArray<RID> &p_decals, const
}
if (cluster.decal_count > 0) {
- RD::get_singleton()->buffer_update(cluster.decal_buffer, 0, sizeof(Cluster::DecalData) * cluster.decal_count, cluster.decals, true);
+ RD::get_singleton()->buffer_update(cluster.decal_buffer, 0, sizeof(Cluster::DecalData) * cluster.decal_count, cluster.decals, RD::BARRIER_MASK_RASTER | RD::BARRIER_MASK_COMPUTE);
}
}
void RendererSceneRenderRD::_volumetric_fog_erase(RenderBuffers *rb) {
ERR_FAIL_COND(!rb->volumetric_fog);
+ RD::get_singleton()->free(rb->volumetric_fog->prev_light_density_map);
RD::get_singleton()->free(rb->volumetric_fog->light_density_map);
RD::get_singleton()->free(rb->volumetric_fog->fog_map);
@@ -6706,49 +6813,6 @@ void RendererSceneRenderRD::_volumetric_fog_erase(RenderBuffers *rb) {
rb->volumetric_fog = nullptr;
}
-void RendererSceneRenderRD::_allocate_shadow_shrink_stages(RID p_base, int p_base_size, Vector<ShadowShrinkStage> &shrink_stages, uint32_t p_target_size) {
- //create fog mipmaps
- uint32_t fog_texture_size = p_target_size;
- uint32_t base_texture_size = p_base_size;
-
- ShadowShrinkStage first;
- first.size = base_texture_size;
- first.texture = p_base;
- shrink_stages.push_back(first); //put depth first in case we dont find smaller ones
-
- while (fog_texture_size < base_texture_size) {
- base_texture_size = MAX(base_texture_size / 8, fog_texture_size);
-
- ShadowShrinkStage s;
- s.size = base_texture_size;
-
- RD::TextureFormat tf;
- tf.format = RD::DATA_FORMAT_R32_SFLOAT;
- tf.width = base_texture_size;
- tf.height = base_texture_size;
- tf.usage_bits = RD::TEXTURE_USAGE_STORAGE_BIT;
-
- if (base_texture_size == fog_texture_size) {
- s.filter_texture = RD::get_singleton()->texture_create(tf, RD::TextureView());
- tf.usage_bits |= RD::TEXTURE_USAGE_SAMPLING_BIT;
- }
-
- s.texture = RD::get_singleton()->texture_create(tf, RD::TextureView());
-
- shrink_stages.push_back(s);
- }
-}
-
-void RendererSceneRenderRD::_clear_shadow_shrink_stages(Vector<ShadowShrinkStage> &shrink_stages) {
- for (int i = 1; i < shrink_stages.size(); i++) {
- RD::get_singleton()->free(shrink_stages[i].texture);
- if (shrink_stages[i].filter_texture.is_valid()) {
- RD::get_singleton()->free(shrink_stages[i].filter_texture);
- }
- }
- shrink_stages.clear();
-}
-
void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_environment, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform, RID p_shadow_atlas, int p_directional_light_count, bool p_use_directional_shadows, int p_positional_light_count, int p_gi_probe_count) {
RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
ERR_FAIL_COND(!rb);
@@ -6771,6 +6835,8 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
return;
}
+ RENDER_TIMESTAMP(">Volumetric Fog");
+
if (env && env->volumetric_fog_enabled && !rb->volumetric_fog) {
//required volumetric fog but not existing, create
rb->volumetric_fog = memnew(VolumetricFog);
@@ -6784,11 +6850,16 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
tf.height = target_height;
tf.depth = volumetric_fog_depth;
tf.texture_type = RD::TEXTURE_TYPE_3D;
- tf.usage_bits = RD::TEXTURE_USAGE_STORAGE_BIT;
+ tf.usage_bits = RD::TEXTURE_USAGE_STORAGE_BIT | RD::TEXTURE_USAGE_CAN_COPY_FROM_BIT;
rb->volumetric_fog->light_density_map = RD::get_singleton()->texture_create(tf, RD::TextureView());
- tf.usage_bits |= RD::TEXTURE_USAGE_SAMPLING_BIT;
+ tf.usage_bits = RD::TEXTURE_USAGE_STORAGE_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_CAN_COPY_TO_BIT;
+
+ rb->volumetric_fog->prev_light_density_map = RD::get_singleton()->texture_create(tf, RD::TextureView());
+ RD::get_singleton()->texture_clear(rb->volumetric_fog->prev_light_density_map, Color(0, 0, 0, 0), 0, 1, 0, 1);
+
+ tf.usage_bits = RD::TEXTURE_USAGE_STORAGE_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT;
rb->volumetric_fog->fog_map = RD::get_singleton()->texture_create(tf, RD::TextureView());
_render_buffers_uniform_set_changed(p_render_buffers);
@@ -6805,164 +6876,6 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
rb->volumetric_fog->sky_uniform_set = RD::get_singleton()->uniform_set_create(uniforms, sky_shader.default_shader_rd, SKY_SET_FOG);
}
- //update directional shadow
-
- if (p_use_directional_shadows) {
- if (directional_shadow.shrink_stages.is_empty()) {
- if (rb->volumetric_fog->uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(rb->volumetric_fog->uniform_set)) {
- //invalidate uniform set, we will need a new one
- RD::get_singleton()->free(rb->volumetric_fog->uniform_set);
- rb->volumetric_fog->uniform_set = RID();
- }
- _allocate_shadow_shrink_stages(directional_shadow.depth, directional_shadow.size, directional_shadow.shrink_stages, volumetric_fog_directional_shadow_shrink);
- }
-
- if (directional_shadow.shrink_stages.size() > 1) {
- RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
- for (int i = 1; i < directional_shadow.shrink_stages.size(); i++) {
- int32_t src_size = directional_shadow.shrink_stages[i - 1].size;
- int32_t dst_size = directional_shadow.shrink_stages[i].size;
- Rect2i r(0, 0, src_size, src_size);
- int32_t shrink_limit = 8 / (src_size / dst_size);
-
- storage->get_effects()->reduce_shadow(directional_shadow.shrink_stages[i - 1].texture, directional_shadow.shrink_stages[i].texture, Size2i(src_size, src_size), r, shrink_limit, compute_list);
- RD::get_singleton()->compute_list_add_barrier(compute_list);
- if (env->volumetric_fog_shadow_filter != RS::ENV_VOLUMETRIC_FOG_SHADOW_FILTER_DISABLED && directional_shadow.shrink_stages[i].filter_texture.is_valid()) {
- Rect2i rf(0, 0, dst_size, dst_size);
- storage->get_effects()->filter_shadow(directional_shadow.shrink_stages[i].texture, directional_shadow.shrink_stages[i].filter_texture, Size2i(dst_size, dst_size), rf, env->volumetric_fog_shadow_filter, compute_list);
- }
- }
- RD::get_singleton()->compute_list_end();
- }
- }
-
- ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_shadow_atlas);
-
- if (shadow_atlas) {
- //shrink shadows that need to be shrunk
-
- bool force_shrink_shadows = false;
-
- if (shadow_atlas->shrink_stages.is_empty()) {
- if (rb->volumetric_fog->uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(rb->volumetric_fog->uniform_set)) {
- //invalidate uniform set, we will need a new one
- RD::get_singleton()->free(rb->volumetric_fog->uniform_set);
- rb->volumetric_fog->uniform_set = RID();
- }
- _allocate_shadow_shrink_stages(shadow_atlas->depth, shadow_atlas->size, shadow_atlas->shrink_stages, volumetric_fog_positional_shadow_shrink);
- force_shrink_shadows = true;
- }
-
- if (rb->volumetric_fog->last_shadow_filter != env->volumetric_fog_shadow_filter) {
- //if shadow filter changed, invalidate caches
- rb->volumetric_fog->last_shadow_filter = env->volumetric_fog_shadow_filter;
- force_shrink_shadows = true;
- }
-
- cluster.lights_shadow_rect_cache_count = 0;
-
- for (uint32_t i = 0; i < cluster.omni_light_count + cluster.spot_light_count; i++) {
- Cluster::LightData &ld = i < cluster.omni_light_count ? cluster.omni_lights[i] : cluster.spot_lights[i - cluster.omni_light_count];
-
- if (ld.shadow_enabled != 0) {
- RID li = cluster.lights_instances[i];
-
- ERR_CONTINUE(!shadow_atlas->shadow_owners.has(li));
-
- uint32_t key = shadow_atlas->shadow_owners[li];
-
- uint32_t quadrant = (key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3;
- uint32_t shadow = key & ShadowAtlas::SHADOW_INDEX_MASK;
-
- ERR_CONTINUE((int)shadow >= shadow_atlas->quadrants[quadrant].shadows.size());
-
- ShadowAtlas::Quadrant::Shadow &s = shadow_atlas->quadrants[quadrant].shadows.write[shadow];
-
- if (!force_shrink_shadows && s.fog_version == s.version) {
- continue; //do not update, no need
- }
-
- s.fog_version = s.version;
-
- uint32_t quadrant_size = shadow_atlas->size >> 1;
-
- Rect2i atlas_rect;
-
- atlas_rect.position.x = (quadrant & 1) * quadrant_size;
- atlas_rect.position.y = (quadrant >> 1) * quadrant_size;
-
- uint32_t shadow_size = (quadrant_size / shadow_atlas->quadrants[quadrant].subdivision);
- atlas_rect.position.x += (shadow % shadow_atlas->quadrants[quadrant].subdivision) * shadow_size;
- atlas_rect.position.y += (shadow / shadow_atlas->quadrants[quadrant].subdivision) * shadow_size;
-
- atlas_rect.size.x = shadow_size;
- atlas_rect.size.y = shadow_size;
-
- cluster.lights_shadow_rect_cache[cluster.lights_shadow_rect_cache_count] = atlas_rect;
-
- cluster.lights_shadow_rect_cache_count++;
-
- if (cluster.lights_shadow_rect_cache_count == cluster.max_lights * 2) {
- break; //light limit reached
- }
- }
- }
-
- if (cluster.lights_shadow_rect_cache_count > 0) {
- //there are shadows to be shrunk, try to do them in parallel
- RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
-
- for (int i = 1; i < shadow_atlas->shrink_stages.size(); i++) {
- int32_t base_size = shadow_atlas->shrink_stages[0].size;
- int32_t src_size = shadow_atlas->shrink_stages[i - 1].size;
- int32_t dst_size = shadow_atlas->shrink_stages[i].size;
-
- uint32_t rect_divisor = base_size / src_size;
-
- int32_t shrink_limit = 8 / (src_size / dst_size);
-
- //shrink in parallel for more performance
- for (uint32_t j = 0; j < cluster.lights_shadow_rect_cache_count; j++) {
- Rect2i src_rect = cluster.lights_shadow_rect_cache[j];
-
- src_rect.position /= rect_divisor;
- src_rect.size /= rect_divisor;
-
- storage->get_effects()->reduce_shadow(shadow_atlas->shrink_stages[i - 1].texture, shadow_atlas->shrink_stages[i].texture, Size2i(src_size, src_size), src_rect, shrink_limit, compute_list);
- }
-
- RD::get_singleton()->compute_list_add_barrier(compute_list);
-
- if (env->volumetric_fog_shadow_filter != RS::ENV_VOLUMETRIC_FOG_SHADOW_FILTER_DISABLED && shadow_atlas->shrink_stages[i].filter_texture.is_valid()) {
- uint32_t filter_divisor = base_size / dst_size;
-
- //filter in parallel for more performance
- for (uint32_t j = 0; j < cluster.lights_shadow_rect_cache_count; j++) {
- Rect2i dst_rect = cluster.lights_shadow_rect_cache[j];
-
- dst_rect.position /= filter_divisor;
- dst_rect.size /= filter_divisor;
-
- storage->get_effects()->filter_shadow(shadow_atlas->shrink_stages[i].texture, shadow_atlas->shrink_stages[i].filter_texture, Size2i(dst_size, dst_size), dst_rect, env->volumetric_fog_shadow_filter, compute_list, true, false);
- }
-
- RD::get_singleton()->compute_list_add_barrier(compute_list);
-
- for (uint32_t j = 0; j < cluster.lights_shadow_rect_cache_count; j++) {
- Rect2i dst_rect = cluster.lights_shadow_rect_cache[j];
-
- dst_rect.position /= filter_divisor;
- dst_rect.size /= filter_divisor;
-
- storage->get_effects()->filter_shadow(shadow_atlas->shrink_stages[i].texture, shadow_atlas->shrink_stages[i].filter_texture, Size2i(dst_size, dst_size), dst_rect, env->volumetric_fog_shadow_filter, compute_list, false, true);
- }
- }
- }
-
- RD::get_singleton()->compute_list_end();
- }
- }
-
//update volumetric fog
if (rb->volumetric_fog->uniform_set.is_null() || !RD::get_singleton()->uniform_set_is_valid(rb->volumetric_fog->uniform_set)) {
@@ -6974,10 +6887,11 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 1;
- if (shadow_atlas == nullptr || shadow_atlas->shrink_stages.size() == 0) {
+ ShadowAtlas *shadow_atlas = shadow_atlas_owner.getornull(p_shadow_atlas);
+ if (shadow_atlas == nullptr || shadow_atlas->depth.is_null()) {
u.ids.push_back(storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_BLACK));
} else {
- u.ids.push_back(shadow_atlas->shrink_stages[shadow_atlas->shrink_stages.size() - 1].texture);
+ u.ids.push_back(shadow_atlas->depth);
}
uniforms.push_back(u);
@@ -6987,10 +6901,10 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 2;
- if (directional_shadow.shrink_stages.size() == 0) {
- u.ids.push_back(storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_BLACK));
+ if (directional_shadow.depth.is_valid()) {
+ u.ids.push_back(directional_shadow.depth);
} else {
- u.ids.push_back(directional_shadow.shrink_stages[directional_shadow.shrink_stages.size() - 1].texture);
+ u.ids.push_back(storage->texture_rd_get_default(RendererStorageRD::DEFAULT_RD_TEXTURE_BLACK));
}
uniforms.push_back(u);
}
@@ -7089,6 +7003,13 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
u.ids.push_back(volumetric_fog.params_ubo);
uniforms.push_back(u);
}
+ {
+ RD::Uniform u;
+ u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
+ u.binding = 15;
+ u.ids.push_back(rb->volumetric_fog->prev_light_density_map);
+ uniforms.push_back(u);
+ }
rb->volumetric_fog->uniform_set = RD::get_singleton()->uniform_set_create(uniforms, volumetric_fog.shader.version_get_shader(volumetric_fog.shader_version, 0), 0);
@@ -7190,6 +7111,13 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
params.cam_rotation[11] = 0;
params.filter_axis = 0;
params.max_gi_probes = env->volumetric_fog_gi_inject > 0.001 ? p_gi_probe_count : 0;
+ params.temporal_frame = RSG::rasterizer->get_frame_number() % VolumetricFog::MAX_TEMPORAL_FRAMES;
+
+ Transform to_prev_cam_view = rb->volumetric_fog->prev_cam_transform.affine_inverse() * p_cam_transform;
+ storage->store_transform(to_prev_cam_view, params.to_prev_view);
+
+ params.use_temporal_reprojection = env->volumetric_fog_temporal_reprojection;
+ params.temporal_blend = env->volumetric_fog_temporal_reprojection_amount;
{
uint32_t cluster_size = rb->cluster_builder->get_cluster_size();
@@ -7210,10 +7138,10 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
push_constant.directional_shadow_pixel_size[1] = 1.0 / dssize.y;
*/
- RENDER_TIMESTAMP(">Volumetric Fog");
+ RD::get_singleton()->draw_command_begin_label("Render Volumetric Fog");
RENDER_TIMESTAMP("Render Fog");
- RD::get_singleton()->buffer_update(volumetric_fog.params_ubo, 0, sizeof(VolumetricFogShader::ParamsUBO), &params, true);
+ RD::get_singleton()->buffer_update(volumetric_fog.params_ubo, 0, sizeof(VolumetricFogShader::ParamsUBO), &params, RD::BARRIER_MASK_COMPUTE);
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
@@ -7226,23 +7154,31 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
if (using_sdfgi) {
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->volumetric_fog->sdfgi_uniform_set, 1);
}
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->volumetric_fog->width, rb->volumetric_fog->height, rb->volumetric_fog->depth, 4, 4, 4);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->volumetric_fog->width, rb->volumetric_fog->height, rb->volumetric_fog->depth);
+
+ RD::get_singleton()->draw_command_end_label();
+
+ RD::get_singleton()->compute_list_end();
+
+ RD::get_singleton()->texture_copy(rb->volumetric_fog->light_density_map, rb->volumetric_fog->prev_light_density_map, Vector3(0, 0, 0), Vector3(0, 0, 0), Vector3(rb->volumetric_fog->width, rb->volumetric_fog->height, rb->volumetric_fog->depth), 0, 0, 0, 0);
- RD::get_singleton()->compute_list_add_barrier(compute_list);
+ compute_list = RD::get_singleton()->compute_list_begin();
if (use_filter) {
+ RD::get_singleton()->draw_command_begin_label("Filter Fog");
+
RENDER_TIMESTAMP("Filter Fog");
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, volumetric_fog.pipelines[VOLUMETRIC_FOG_SHADER_FILTER]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->volumetric_fog->uniform_set, 0);
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->volumetric_fog->width, rb->volumetric_fog->height, rb->volumetric_fog->depth, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->volumetric_fog->width, rb->volumetric_fog->height, rb->volumetric_fog->depth);
RD::get_singleton()->compute_list_end();
//need restart for buffer update
params.filter_axis = 1;
- RD::get_singleton()->buffer_update(volumetric_fog.params_ubo, 0, sizeof(VolumetricFogShader::ParamsUBO), &params, true);
+ RD::get_singleton()->buffer_update(volumetric_fog.params_ubo, 0, sizeof(VolumetricFogShader::ParamsUBO), &params);
compute_list = RD::get_singleton()->compute_list_begin();
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, volumetric_fog.pipelines[VOLUMETRIC_FOG_SHADER_FILTER]);
@@ -7250,95 +7186,176 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
if (using_sdfgi) {
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->volumetric_fog->sdfgi_uniform_set, 1);
}
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->volumetric_fog->width, rb->volumetric_fog->height, rb->volumetric_fog->depth, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->volumetric_fog->width, rb->volumetric_fog->height, rb->volumetric_fog->depth);
RD::get_singleton()->compute_list_add_barrier(compute_list);
+ RD::get_singleton()->draw_command_end_label();
}
RENDER_TIMESTAMP("Integrate Fog");
+ RD::get_singleton()->draw_command_begin_label("Integrate Fog");
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, volumetric_fog.pipelines[VOLUMETRIC_FOG_SHADER_FOG]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->volumetric_fog->uniform_set, 0);
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->volumetric_fog->width, rb->volumetric_fog->height, 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->volumetric_fog->width, rb->volumetric_fog->height, 1);
- RD::get_singleton()->compute_list_end();
+ RD::get_singleton()->compute_list_end(RD::BARRIER_MASK_RASTER);
RENDER_TIMESTAMP("<Volumetric Fog");
+ RD::get_singleton()->draw_command_end_label();
+
+ rb->volumetric_fog->prev_cam_transform = p_cam_transform;
}
-void RendererSceneRenderRD::render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold) {
- Color clear_color;
- if (p_render_buffers.is_valid()) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
- ERR_FAIL_COND(!rb);
- clear_color = storage->render_target_get_clear_request_color(rb->render_target);
- } else {
- clear_color = storage->get_default_clear_color();
+uint32_t RendererSceneRenderRD::_get_render_state_directional_light_count() const {
+ return render_state.directional_light_count;
+}
+
+bool RendererSceneRenderRD::_needs_post_prepass_render(bool p_use_gi) {
+ if (render_state.render_buffers.is_valid()) {
+ RenderBuffers *rb = render_buffers_owner.getornull(render_state.render_buffers);
+ if (rb->sdfgi != nullptr) {
+ return true;
+ }
}
+ return false;
+}
- //assign render indices to giprobes
- for (uint32_t i = 0; i < (uint32_t)p_gi_probes.size(); i++) {
- GIProbeInstance *giprobe_inst = gi_probe_instance_owner.getornull(p_gi_probes[i]);
- if (giprobe_inst) {
- giprobe_inst->render_index = i;
+void RendererSceneRenderRD::_post_prepass_render(bool p_use_gi) {
+ if (render_state.render_buffers.is_valid()) {
+ if (p_use_gi) {
+ _sdfgi_update_probes(render_state.render_buffers, render_state.environment);
}
}
+}
- const PagedArray<RID> *lights = &p_lights;
- const PagedArray<RID> *reflections = &p_reflection_probes;
- const PagedArray<RID> *gi_probes = &p_gi_probes;
+void RendererSceneRenderRD::_pre_resolve_render(bool p_use_gi) {
+ if (render_state.render_buffers.is_valid()) {
+ if (p_use_gi) {
+ RD::get_singleton()->compute_list_end();
+ }
+ }
+}
- PagedArray<RID> empty;
+void RendererSceneRenderRD::_pre_opaque_render(bool p_use_ssao, bool p_use_gi, RID p_normal_roughness_buffer, RID p_gi_probe_buffer) {
+ // Render shadows while GI is rendering, due to how barriers are handled, this should happen at the same time
- if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_UNSHADED) {
- lights = &empty;
- reflections = &empty;
- gi_probes = &empty;
+ if (render_state.render_buffers.is_valid() && p_use_gi) {
+ _sdfgi_store_probes(render_state.render_buffers);
}
- if (render_buffers_owner.owns(p_render_buffers)) {
- RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
- current_cluster_builder = rb->cluster_builder;
- } else if (reflection_probe_instance_owner.owns(p_reflection_probe)) {
- ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(p_reflection_probe);
- ReflectionAtlas *ra = reflection_atlas_owner.getornull(rpi->atlas);
- if (!ra) {
- ERR_PRINT("reflection probe has no reflection atlas! Bug?");
- current_cluster_builder = nullptr;
- } else {
- current_cluster_builder = ra->cluster_builder;
+ render_state.cube_shadows.clear();
+ render_state.shadows.clear();
+ render_state.directional_shadows.clear();
+
+ Plane camera_plane(render_state.cam_transform.origin, -render_state.cam_transform.basis.get_axis(Vector3::AXIS_Z));
+ float lod_distance_multiplier = render_state.cam_projection.get_lod_multiplier();
+
+ {
+ for (int i = 0; i < render_state.render_shadow_count; i++) {
+ LightInstance *li = light_instance_owner.getornull(render_state.render_shadows[i].light);
+
+ if (storage->light_get_type(li->light) == RS::LIGHT_DIRECTIONAL) {
+ render_state.directional_shadows.push_back(i);
+ } else if (storage->light_get_type(li->light) == RS::LIGHT_OMNI && storage->light_omni_get_shadow_mode(li->light) == RS::LIGHT_OMNI_SHADOW_CUBE) {
+ render_state.cube_shadows.push_back(i);
+ } else {
+ render_state.shadows.push_back(i);
+ }
}
- } else {
- ERR_PRINT("No cluster builder, bug"); //should never happen, will crash
- current_cluster_builder = nullptr;
+
+ //cube shadows are rendered in their own way
+ for (uint32_t i = 0; i < render_state.cube_shadows.size(); i++) {
+ _render_shadow_pass(render_state.render_shadows[render_state.cube_shadows[i]].light, render_state.shadow_atlas, render_state.render_shadows[render_state.cube_shadows[i]].pass, render_state.render_shadows[render_state.cube_shadows[i]].instances, camera_plane, lod_distance_multiplier, render_state.screen_lod_threshold, true, true, true);
+ }
+
+ if (render_state.directional_shadows.size()) {
+ //open the pass for directional shadows
+ _update_directional_shadow_atlas();
+ RD::get_singleton()->draw_list_begin(directional_shadow.fb, RD::INITIAL_ACTION_DROP, RD::FINAL_ACTION_DISCARD, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_CONTINUE);
+ RD::get_singleton()->draw_list_end();
+ }
+ }
+
+ // Render GI
+
+ bool render_shadows = render_state.directional_shadows.size() || render_state.shadows.size();
+ bool render_gi = render_state.render_buffers.is_valid() && p_use_gi;
+
+ if (render_shadows && render_gi) {
+ RENDER_TIMESTAMP("Render GI + Render Shadows (parallel)");
+ } else if (render_shadows) {
+ RENDER_TIMESTAMP("Render Shadows");
+ } else if (render_gi) {
+ RENDER_TIMESTAMP("Render GI");
}
- current_cluster_builder->begin(p_cam_transform, p_cam_projection, !p_reflection_probe.is_valid());
+ //prepare shadow rendering
+ if (render_shadows) {
+ _render_shadow_begin();
+
+ //render directional shadows
+ for (uint32_t i = 0; i < render_state.directional_shadows.size(); i++) {
+ _render_shadow_pass(render_state.render_shadows[render_state.directional_shadows[i]].light, render_state.shadow_atlas, render_state.render_shadows[render_state.directional_shadows[i]].pass, render_state.render_shadows[render_state.directional_shadows[i]].instances, camera_plane, lod_distance_multiplier, render_state.screen_lod_threshold, false, i == render_state.directional_shadows.size() - 1, false);
+ }
+ //render positional shadows
+ for (uint32_t i = 0; i < render_state.shadows.size(); i++) {
+ _render_shadow_pass(render_state.render_shadows[render_state.shadows[i]].light, render_state.shadow_atlas, render_state.render_shadows[render_state.shadows[i]].pass, render_state.render_shadows[render_state.shadows[i]].instances, camera_plane, lod_distance_multiplier, render_state.screen_lod_threshold, i == 0, i == render_state.shadows.size() - 1, true);
+ }
+
+ _render_shadow_process();
+ }
+
+ //start GI
+ if (render_gi) {
+ _process_gi(render_state.render_buffers, p_normal_roughness_buffer, p_gi_probe_buffer, render_state.environment, render_state.cam_projection, render_state.cam_transform, *render_state.gi_probes);
+ }
+
+ //Do shadow rendering (in parallel with GI)
+ if (render_shadows) {
+ _render_shadow_end(RD::BARRIER_MASK_NO_BARRIER);
+ }
+
+ if (render_gi) {
+ RD::get_singleton()->compute_list_end(RD::BARRIER_MASK_NO_BARRIER); //use a later barrier
+ }
+
+ if (render_state.render_buffers.is_valid()) {
+ if (p_use_ssao) {
+ _process_ssao(render_state.render_buffers, render_state.environment, p_normal_roughness_buffer, render_state.cam_projection);
+ }
+ }
+
+ //full barrier here, we need raster, transfer and compute and it depends from the previous work
+ RD::get_singleton()->barrier(RD::BARRIER_MASK_ALL, RD::BARRIER_MASK_ALL);
+
+ if (current_cluster_builder) {
+ current_cluster_builder->begin(render_state.cam_transform, render_state.cam_projection, !render_state.reflection_probe.is_valid());
+ }
bool using_shadows = true;
- if (p_reflection_probe.is_valid()) {
- if (!storage->reflection_probe_renders_shadows(reflection_probe_instance_get_probe(p_reflection_probe))) {
+ if (render_state.reflection_probe.is_valid()) {
+ if (!storage->reflection_probe_renders_shadows(reflection_probe_instance_get_probe(render_state.reflection_probe))) {
using_shadows = false;
}
} else {
//do not render reflections when rendering a reflection probe
- _setup_reflections(*reflections, p_cam_transform.affine_inverse(), p_environment);
+ _setup_reflections(*render_state.reflection_probes, render_state.cam_transform.affine_inverse(), render_state.environment);
}
uint32_t directional_light_count = 0;
uint32_t positional_light_count = 0;
- _setup_lights(*lights, p_cam_transform, p_shadow_atlas, using_shadows, directional_light_count, positional_light_count);
- _setup_decals(p_decals, p_cam_transform.affine_inverse());
+ _setup_lights(*render_state.lights, render_state.cam_transform, render_state.shadow_atlas, using_shadows, directional_light_count, positional_light_count);
+ _setup_decals(*render_state.decals, render_state.cam_transform.affine_inverse());
- current_cluster_builder->bake_cluster();
+ render_state.directional_light_count = directional_light_count;
- uint32_t gi_probe_count = 0;
- if (p_render_buffers.is_valid()) {
- _setup_giprobes(p_render_buffers, p_cam_transform, *gi_probes, gi_probe_count);
+ if (current_cluster_builder) {
+ current_cluster_builder->bake_cluster();
}
- if (p_render_buffers.is_valid()) {
+ if (render_state.render_buffers.is_valid()) {
bool directional_shadows = false;
for (uint32_t i = 0; i < directional_light_count; i++) {
if (cluster.directional_lights[i].shadow_enabled) {
@@ -7346,10 +7363,103 @@ void RendererSceneRenderRD::render_scene(RID p_render_buffers, const Transform &
break;
}
}
- _update_volumetric_fog(p_render_buffers, p_environment, p_cam_projection, p_cam_transform, p_shadow_atlas, directional_light_count, directional_shadows, positional_light_count, gi_probe_count);
+ _update_volumetric_fog(render_state.render_buffers, render_state.environment, render_state.cam_projection, render_state.cam_transform, render_state.shadow_atlas, directional_light_count, directional_shadows, positional_light_count, render_state.gi_probe_count);
+ }
+}
+
+void RendererSceneRenderRD::render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data) {
+ //assign render data
+ {
+ render_state.render_buffers = p_render_buffers;
+ render_state.cam_transform = p_cam_transform;
+ render_state.cam_projection = p_cam_projection;
+ render_state.cam_ortogonal = p_cam_projection.is_orthogonal();
+ render_state.instances = &p_instances;
+ render_state.lights = &p_lights;
+ render_state.reflection_probes = &p_reflection_probes;
+ render_state.gi_probes = &p_gi_probes;
+ render_state.decals = &p_decals;
+ render_state.lightmaps = &p_lightmaps;
+ render_state.environment = p_environment;
+ render_state.camera_effects = p_camera_effects;
+ render_state.shadow_atlas = p_shadow_atlas;
+ render_state.reflection_atlas = p_reflection_atlas;
+ render_state.reflection_probe = p_reflection_probe;
+ render_state.reflection_probe_pass = p_reflection_probe_pass;
+ render_state.screen_lod_threshold = p_screen_lod_threshold;
+
+ render_state.render_shadows = p_render_shadows;
+ render_state.render_shadow_count = p_render_shadow_count;
+ render_state.render_sdfgi_regions = p_render_sdfgi_regions;
+ render_state.render_sdfgi_region_count = p_render_sdfgi_region_count;
+ render_state.sdfgi_update_data = p_sdfgi_update_data;
+ }
+
+ PagedArray<RID> empty;
+
+ if (get_debug_draw_mode() == RS::VIEWPORT_DEBUG_DRAW_UNSHADED) {
+ render_state.lights = &empty;
+ render_state.reflection_probes = &empty;
+ render_state.gi_probes = &empty;
+ }
+
+ //sdfgi first
+ if (p_render_buffers.is_valid()) {
+ for (int i = 0; i < render_state.render_sdfgi_region_count; i++) {
+ _render_sdfgi_region(p_render_buffers, render_state.render_sdfgi_regions[i].region, render_state.render_sdfgi_regions[i].instances);
+ }
+ if (render_state.sdfgi_update_data->update_static) {
+ _render_sdfgi_static_lights(p_render_buffers, render_state.sdfgi_update_data->static_cascade_count, p_sdfgi_update_data->static_cascade_indices, render_state.sdfgi_update_data->static_positional_lights);
+ }
+ }
+
+ Color clear_color;
+ if (p_render_buffers.is_valid()) {
+ RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ ERR_FAIL_COND(!rb);
+ clear_color = storage->render_target_get_clear_request_color(rb->render_target);
+ } else {
+ clear_color = storage->get_default_clear_color();
}
- _render_scene(p_render_buffers, p_cam_transform, p_cam_projection, p_cam_ortogonal, p_instances, directional_light_count, *gi_probes, p_lightmaps, p_environment, current_cluster_builder->get_cluster_buffer(), current_cluster_builder->get_cluster_size(), current_cluster_builder->get_max_cluster_elements(), p_camera_effects, p_shadow_atlas, p_reflection_atlas, p_reflection_probe, p_reflection_probe_pass, clear_color, p_screen_lod_threshold);
+ //assign render indices to giprobes
+ for (uint32_t i = 0; i < (uint32_t)p_gi_probes.size(); i++) {
+ GIProbeInstance *giprobe_inst = gi_probe_instance_owner.getornull(p_gi_probes[i]);
+ if (giprobe_inst) {
+ giprobe_inst->render_index = i;
+ }
+ }
+
+ if (render_buffers_owner.owns(render_state.render_buffers)) {
+ RenderBuffers *rb = render_buffers_owner.getornull(render_state.render_buffers);
+ current_cluster_builder = rb->cluster_builder;
+ } else if (reflection_probe_instance_owner.owns(render_state.reflection_probe)) {
+ ReflectionProbeInstance *rpi = reflection_probe_instance_owner.getornull(render_state.reflection_probe);
+ ReflectionAtlas *ra = reflection_atlas_owner.getornull(rpi->atlas);
+ if (!ra) {
+ ERR_PRINT("reflection probe has no reflection atlas! Bug?");
+ current_cluster_builder = nullptr;
+ } else {
+ current_cluster_builder = ra->cluster_builder;
+ }
+ } else {
+ ERR_PRINT("No cluster builder, bug"); //should never happen, will crash
+ current_cluster_builder = nullptr;
+ }
+
+ if (p_render_buffers.is_valid()) {
+ _pre_process_gi(p_render_buffers, p_cam_transform);
+ }
+
+ render_state.gi_probe_count = 0;
+ if (render_state.render_buffers.is_valid()) {
+ _setup_giprobes(render_state.render_buffers, render_state.cam_transform, *render_state.gi_probes, render_state.gi_probe_count);
+ _sdfgi_update_light(render_state.render_buffers, render_state.environment);
+ }
+
+ render_state.depth_prepass_used = false;
+ //calls _pre_opaque_render between depth pre-pass and opaque pass
+ _render_scene(p_render_buffers, p_cam_transform, p_cam_projection, p_cam_ortogonal, p_instances, *render_state.gi_probes, p_lightmaps, p_environment, current_cluster_builder->get_cluster_buffer(), current_cluster_builder->get_cluster_size(), current_cluster_builder->get_max_cluster_elements(), p_camera_effects, p_shadow_atlas, p_reflection_atlas, p_reflection_probe, p_reflection_probe_pass, clear_color, p_screen_lod_threshold);
if (p_render_buffers.is_valid()) {
if (debug_draw == RS::VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS || debug_draw == RS::VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS || debug_draw == RS::VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS || debug_draw == RS::VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES) {
@@ -7383,27 +7493,26 @@ void RendererSceneRenderRD::render_scene(RID p_render_buffers, const Transform &
}
}
-void RendererSceneRenderRD::render_shadow(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<GeometryInstance *> &p_instances, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_lod_threshold) {
+void RendererSceneRenderRD::_render_shadow_pass(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<GeometryInstance *> &p_instances, const Plane &p_camera_plane, float p_lod_distance_multiplier, float p_screen_lod_threshold, bool p_open_pass, bool p_close_pass, bool p_clear_region) {
LightInstance *light_instance = light_instance_owner.getornull(p_light);
ERR_FAIL_COND(!light_instance);
Rect2i atlas_rect;
- RID atlas_texture;
+ uint32_t atlas_size;
+ RID atlas_fb;
bool using_dual_paraboloid = false;
bool using_dual_paraboloid_flip = false;
- float znear = 0;
- float zfar = 0;
RID render_fb;
RID render_texture;
- float bias = 0;
- float normal_bias = 0;
+ float zfar;
bool use_pancake = false;
- bool use_linear_depth = false;
bool render_cubemap = false;
bool finalize_cubemap = false;
+ bool flip_y = false;
+
CameraMatrix light_projection;
Transform light_transform;
@@ -7436,7 +7545,6 @@ void RendererSceneRenderRD::render_shadow(RID p_light, RID p_shadow_atlas, int p
atlas_rect.position.x += atlas_rect.size.width;
atlas_rect.position.y += atlas_rect.size.height;
}
-
} else if (storage->light_directional_get_shadow_mode(light_instance->light) == RS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS) {
atlas_rect.size.height /= 2;
@@ -7451,15 +7559,11 @@ void RendererSceneRenderRD::render_shadow(RID p_light, RID p_shadow_atlas, int p
light_instance->shadow_transform[p_pass].atlas_rect.position /= directional_shadow.size;
light_instance->shadow_transform[p_pass].atlas_rect.size /= directional_shadow.size;
- float bias_mult = light_instance->shadow_transform[p_pass].bias_scale;
zfar = storage->light_get_param(light_instance->light, RS::LIGHT_PARAM_RANGE);
- bias = storage->light_get_param(light_instance->light, RS::LIGHT_PARAM_SHADOW_BIAS) * bias_mult;
- normal_bias = storage->light_get_param(light_instance->light, RS::LIGHT_PARAM_SHADOW_NORMAL_BIAS) * bias_mult;
- ShadowMap *shadow_map = _get_shadow_map(atlas_rect.size);
- render_fb = shadow_map->fb;
- render_texture = shadow_map->depth;
- atlas_texture = directional_shadow.depth;
+ render_fb = directional_shadow.fb;
+ render_texture = RID();
+ flip_y = true;
} else {
//set from shadow atlas
@@ -7468,6 +7572,8 @@ void RendererSceneRenderRD::render_shadow(RID p_light, RID p_shadow_atlas, int p
ERR_FAIL_COND(!shadow_atlas);
ERR_FAIL_COND(!shadow_atlas->shadow_owners.has(p_light));
+ _update_shadow_atlas(shadow_atlas);
+
uint32_t key = shadow_atlas->shadow_owners[p_light];
uint32_t quadrant = (key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3;
@@ -7486,11 +7592,8 @@ void RendererSceneRenderRD::render_shadow(RID p_light, RID p_shadow_atlas, int p
atlas_rect.size.width = shadow_size;
atlas_rect.size.height = shadow_size;
- atlas_texture = shadow_atlas->depth;
zfar = storage->light_get_param(light_instance->light, RS::LIGHT_PARAM_RANGE);
- bias = storage->light_get_param(light_instance->light, RS::LIGHT_PARAM_SHADOW_BIAS);
- normal_bias = storage->light_get_param(light_instance->light, RS::LIGHT_PARAM_SHADOW_NORMAL_BIAS);
if (storage->light_get_type(light_instance->light) == RS::LIGHT_OMNI) {
if (storage->light_omni_get_shadow_mode(light_instance->light) == RS::LIGHT_OMNI_SHADOW_CUBE) {
@@ -7499,10 +7602,17 @@ void RendererSceneRenderRD::render_shadow(RID p_light, RID p_shadow_atlas, int p
render_fb = cubemap->side_fb[p_pass];
render_texture = cubemap->cubemap;
- light_projection = light_instance->shadow_transform[0].camera;
- light_transform = light_instance->shadow_transform[0].transform;
+ light_projection = light_instance->shadow_transform[p_pass].camera;
+ light_transform = light_instance->shadow_transform[p_pass].transform;
render_cubemap = true;
finalize_cubemap = p_pass == 5;
+ atlas_fb = shadow_atlas->fb;
+
+ atlas_size = shadow_atlas->size;
+
+ if (p_pass == 0) {
+ _render_shadow_begin();
+ }
} else {
light_projection = light_instance->shadow_transform[0].camera;
@@ -7513,49 +7623,44 @@ void RendererSceneRenderRD::render_shadow(RID p_light, RID p_shadow_atlas, int p
using_dual_paraboloid = true;
using_dual_paraboloid_flip = p_pass == 1;
-
- ShadowMap *shadow_map = _get_shadow_map(atlas_rect.size);
- render_fb = shadow_map->fb;
- render_texture = shadow_map->depth;
+ render_fb = shadow_atlas->fb;
+ flip_y = true;
}
} else if (storage->light_get_type(light_instance->light) == RS::LIGHT_SPOT) {
light_projection = light_instance->shadow_transform[0].camera;
light_transform = light_instance->shadow_transform[0].transform;
- ShadowMap *shadow_map = _get_shadow_map(atlas_rect.size);
- render_fb = shadow_map->fb;
- render_texture = shadow_map->depth;
+ render_fb = shadow_atlas->fb;
- znear = light_instance->shadow_transform[0].camera.get_z_near();
- use_linear_depth = true;
+ flip_y = true;
}
}
if (render_cubemap) {
//rendering to cubemap
- _render_shadow(render_fb, p_instances, light_projection, light_transform, zfar, 0, 0, false, false, use_pancake, p_camera_plane, p_lod_distance_multiplier, p_screen_lod_threshold);
+ _render_shadow_append(render_fb, p_instances, light_projection, light_transform, zfar, 0, 0, false, false, use_pancake, p_camera_plane, p_lod_distance_multiplier, p_screen_lod_threshold, Rect2(), false, true, true, true);
if (finalize_cubemap) {
+ _render_shadow_process();
+ _render_shadow_end();
//reblit
- atlas_rect.size.height /= 2;
- storage->get_effects()->copy_cubemap_to_dp(render_texture, atlas_texture, atlas_rect, light_projection.get_z_near(), light_projection.get_z_far(), 0.0, false);
- atlas_rect.position.y += atlas_rect.size.height;
- storage->get_effects()->copy_cubemap_to_dp(render_texture, atlas_texture, atlas_rect, light_projection.get_z_near(), light_projection.get_z_far(), 0.0, true);
- }
- } else {
- //render shadow
-
- _render_shadow(render_fb, p_instances, light_projection, light_transform, zfar, bias, normal_bias, using_dual_paraboloid, using_dual_paraboloid_flip, use_pancake, p_camera_plane, p_lod_distance_multiplier, p_screen_lod_threshold);
+ Rect2 atlas_rect_norm = atlas_rect;
+ atlas_rect_norm.position.x /= float(atlas_size);
+ atlas_rect_norm.position.y /= float(atlas_size);
+ atlas_rect_norm.size.x /= float(atlas_size);
+ atlas_rect_norm.size.y /= float(atlas_size);
+ atlas_rect_norm.size.height /= 2;
+ storage->get_effects()->copy_cubemap_to_dp(render_texture, atlas_fb, atlas_rect_norm, light_projection.get_z_near(), light_projection.get_z_far(), false);
+ atlas_rect_norm.position.y += atlas_rect_norm.size.height;
+ storage->get_effects()->copy_cubemap_to_dp(render_texture, atlas_fb, atlas_rect_norm, light_projection.get_z_near(), light_projection.get_z_far(), true);
- //copy to atlas
- if (use_linear_depth) {
- storage->get_effects()->copy_depth_to_rect_and_linearize(render_texture, atlas_texture, atlas_rect, true, znear, zfar);
- } else {
- storage->get_effects()->copy_depth_to_rect(render_texture, atlas_texture, atlas_rect, true);
+ //restore transform so it can be properly used
+ light_instance_set_shadow_transform(p_light, CameraMatrix(), light_instance->transform, zfar, 0, 0, 0);
}
- //does not work from depth to color
- //RD::get_singleton()->texture_copy(render_texture, atlas_texture, Vector3(0, 0, 0), Vector3(atlas_rect.position.x, atlas_rect.position.y, 0), Vector3(atlas_rect.size.x, atlas_rect.size.y, 1), 0, 0, 0, 0, true);
+ } else {
+ //render shadow
+ _render_shadow_append(render_fb, p_instances, light_projection, light_transform, zfar, 0, 0, using_dual_paraboloid, using_dual_paraboloid_flip, use_pancake, p_camera_plane, p_lod_distance_multiplier, p_screen_lod_threshold, atlas_rect, flip_y, p_clear_region, p_open_pass, p_close_pass);
}
}
@@ -7563,7 +7668,7 @@ void RendererSceneRenderRD::render_material(const Transform &p_cam_transform, co
_render_material(p_cam_transform, p_cam_projection, p_cam_ortogonal, p_instances, p_framebuffer, p_region);
}
-void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, const PagedArray<GeometryInstance *> &p_instances) {
+void RendererSceneRenderRD::_render_sdfgi_region(RID p_render_buffers, int p_region, const PagedArray<GeometryInstance *> &p_instances) {
//print_line("rendering region " + itos(p_region));
RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
ERR_FAIL_COND(!rb);
@@ -7579,16 +7684,18 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
if (cascade_prev != cascade) {
//initialize render
- RD::get_singleton()->texture_clear(rb->sdfgi->render_albedo, Color(0, 0, 0, 0), 0, 1, 0, 1, true);
- RD::get_singleton()->texture_clear(rb->sdfgi->render_emission, Color(0, 0, 0, 0), 0, 1, 0, 1, true);
- RD::get_singleton()->texture_clear(rb->sdfgi->render_emission_aniso, Color(0, 0, 0, 0), 0, 1, 0, 1, true);
- RD::get_singleton()->texture_clear(rb->sdfgi->render_geom_facing, Color(0, 0, 0, 0), 0, 1, 0, 1, true);
+ RD::get_singleton()->texture_clear(rb->sdfgi->render_albedo, Color(0, 0, 0, 0), 0, 1, 0, 1);
+ RD::get_singleton()->texture_clear(rb->sdfgi->render_emission, Color(0, 0, 0, 0), 0, 1, 0, 1);
+ RD::get_singleton()->texture_clear(rb->sdfgi->render_emission_aniso, Color(0, 0, 0, 0), 0, 1, 0, 1);
+ RD::get_singleton()->texture_clear(rb->sdfgi->render_geom_facing, Color(0, 0, 0, 0), 0, 1, 0, 1);
}
//print_line("rendering cascade " + itos(p_region) + " objects: " + itos(p_cull_count) + " bounds: " + bounds + " from: " + from + " size: " + size + " cell size: " + rtos(rb->sdfgi->cascades[cascade].cell_size));
_render_sdfgi(p_render_buffers, from, size, bounds, p_instances, rb->sdfgi->render_albedo, rb->sdfgi->render_emission, rb->sdfgi->render_emission_aniso, rb->sdfgi->render_geom_facing);
if (cascade_next != cascade) {
+ RD::get_singleton()->draw_command_begin_label("SDFGI Pre-Process Cascade");
+
RENDER_TIMESTAMP(">SDFGI Update SDF");
//done rendering! must update SDF
//clear dispatch indirect data
@@ -7611,6 +7718,9 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
push_constant.scroll[1] = 0;
push_constant.scroll[2] = 0;
}
+
+ rb->sdfgi->cascades[cascade].all_dynamic_lights_dirty = true;
+
push_constant.grid_size = rb->sdfgi->cascade_size;
push_constant.cascade = cascade;
@@ -7635,7 +7745,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
groups.z = rb->sdfgi->cascade_size - ABS(dirty.z);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::PreprocessPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, groups.x, groups.y, groups.z, 4, 4, 4);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, groups.x, groups.y, groups.z);
//no barrier, continue together
@@ -7677,7 +7787,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->cascades[cascade].integrate_uniform_set, 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, sdfgi_shader.integrate_default_sky_uniform_set, 1);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ipush_constant, sizeof(SDGIShader::IntegratePushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count, rb->sdfgi->probe_axis_count, 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count, rb->sdfgi->probe_axis_count, 1);
RD::get_singleton()->compute_list_add_barrier(compute_list);
@@ -7685,7 +7795,24 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->cascades[cascade].integrate_uniform_set, 0);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, sdfgi_shader.integrate_default_sky_uniform_set, 1);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &ipush_constant, sizeof(SDGIShader::IntegratePushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count, rb->sdfgi->probe_axis_count, 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count, rb->sdfgi->probe_axis_count, 1);
+
+ RD::get_singleton()->compute_list_add_barrier(compute_list);
+
+ if (rb->sdfgi->bounce_feedback > 0.0) {
+ //multibounce requires this to be stored so direct light can read from it
+
+ RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.integrate_pipeline[SDGIShader::INTEGRATE_MODE_STORE]);
+
+ //convert to octahedral to store
+ ipush_constant.image_size[0] *= SDFGI::LIGHTPROBE_OCT_SIZE;
+ ipush_constant.image_size[1] *= SDFGI::LIGHTPROBE_OCT_SIZE;
+
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->cascades[cascade].integrate_uniform_set, 0);
+ RD::get_singleton()->compute_list_bind_uniform_set(compute_list, sdfgi_shader.integrate_default_sky_uniform_set, 1);
+ RD::get_singleton()->compute_list_set_push_constant(compute_list, &ipush_constant, sizeof(SDGIShader::IntegratePushConstant));
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->probe_axis_count * rb->sdfgi->probe_axis_count * SDFGI::LIGHTPROBE_OCT_SIZE, rb->sdfgi->probe_axis_count * SDFGI::LIGHTPROBE_OCT_SIZE, 1);
+ }
}
//ok finally barrier
@@ -7694,7 +7821,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
//clear dispatch indirect data
uint32_t dispatch_indirct_data[4] = { 0, 0, 0, 0 };
- RD::get_singleton()->buffer_update(rb->sdfgi->cascades[cascade].solid_cell_dispatch_buffer, 0, sizeof(uint32_t) * 4, dispatch_indirct_data, true);
+ RD::get_singleton()->buffer_update(rb->sdfgi->cascades[cascade].solid_cell_dispatch_buffer, 0, sizeof(uint32_t) * 4, dispatch_indirct_data);
RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
@@ -7708,7 +7835,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.preprocess_pipeline[SDGIShader::PRE_PROCESS_JUMP_FLOOD_INITIALIZE_HALF]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->sdf_initialize_half_uniform_set, 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::PreprocessPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, cascade_half_size, cascade_half_size, cascade_half_size, 4, 4, 4);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, cascade_half_size, cascade_half_size, cascade_half_size);
RD::get_singleton()->compute_list_add_barrier(compute_list);
//must start with regular jumpflood
@@ -7728,7 +7855,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
push_constant.step_size = s;
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->jump_flood_half_uniform_set[jf_us], 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::PreprocessPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, cascade_half_size, cascade_half_size, cascade_half_size, 4, 4, 4);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, cascade_half_size, cascade_half_size, cascade_half_size);
RD::get_singleton()->compute_list_add_barrier(compute_list);
jf_us = jf_us == 0 ? 1 : 0;
@@ -7746,7 +7873,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
push_constant.step_size = s;
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->jump_flood_half_uniform_set[jf_us], 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::PreprocessPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, cascade_half_size, cascade_half_size, cascade_half_size, optimized_jf_group_size, optimized_jf_group_size, optimized_jf_group_size);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, cascade_half_size, cascade_half_size, cascade_half_size);
RD::get_singleton()->compute_list_add_barrier(compute_list);
jf_us = jf_us == 0 ? 1 : 0;
}
@@ -7758,7 +7885,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.preprocess_pipeline[SDGIShader::PRE_PROCESS_JUMP_FLOOD_UPSCALE]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->sdf_upscale_uniform_set, 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::PreprocessPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, 4, 4, 4);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size);
RD::get_singleton()->compute_list_add_barrier(compute_list);
//run one pass of fullsize jumpflood to fix up half size arctifacts
@@ -7768,7 +7895,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.preprocess_pipeline[SDGIShader::PRE_PROCESS_JUMP_FLOOD_OPTIMIZED]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->jump_flood_uniform_set[rb->sdfgi->upscale_jfa_uniform_set_index], 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::PreprocessPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, optimized_jf_group_size, optimized_jf_group_size, optimized_jf_group_size);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size);
RD::get_singleton()->compute_list_add_barrier(compute_list);
} else {
@@ -7778,7 +7905,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.preprocess_pipeline[SDGIShader::PRE_PROCESS_JUMP_FLOOD_INITIALIZE]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->sdf_initialize_uniform_set, 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::PreprocessPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, 4, 4, 4);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size);
RD::get_singleton()->compute_list_add_barrier(compute_list);
@@ -7795,7 +7922,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
push_constant.step_size = s;
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->jump_flood_uniform_set[jf_us], 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::PreprocessPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, 4, 4, 4);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size);
RD::get_singleton()->compute_list_add_barrier(compute_list);
jf_us = jf_us == 0 ? 1 : 0;
@@ -7813,7 +7940,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
push_constant.step_size = s;
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->jump_flood_uniform_set[jf_us], 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::PreprocessPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, optimized_jf_group_size, optimized_jf_group_size, optimized_jf_group_size);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size);
RD::get_singleton()->compute_list_add_barrier(compute_list);
jf_us = jf_us == 0 ? 1 : 0;
}
@@ -7860,14 +7987,14 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.preprocess_pipeline[SDGIShader::PRE_PROCESS_STORE]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rb->sdfgi->cascades[cascade].sdf_store_uniform_set, 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SDGIShader::PreprocessPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, 4, 4, 4);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size, rb->sdfgi->cascade_size);
RD::get_singleton()->compute_list_end();
//clear these textures, as they will have previous garbage on next draw
- RD::get_singleton()->texture_clear(rb->sdfgi->cascades[cascade].light_tex, Color(0, 0, 0, 0), 0, 1, 0, 1, true);
- RD::get_singleton()->texture_clear(rb->sdfgi->cascades[cascade].light_aniso_0_tex, Color(0, 0, 0, 0), 0, 1, 0, 1, true);
- RD::get_singleton()->texture_clear(rb->sdfgi->cascades[cascade].light_aniso_1_tex, Color(0, 0, 0, 0), 0, 1, 0, 1, true);
+ RD::get_singleton()->texture_clear(rb->sdfgi->cascades[cascade].light_tex, Color(0, 0, 0, 0), 0, 1, 0, 1);
+ RD::get_singleton()->texture_clear(rb->sdfgi->cascades[cascade].light_aniso_0_tex, Color(0, 0, 0, 0), 0, 1, 0, 1);
+ RD::get_singleton()->texture_clear(rb->sdfgi->cascades[cascade].light_aniso_1_tex, Color(0, 0, 0, 0), 0, 1, 0, 1);
#if 0
Vector<uint8_t> data = RD::get_singleton()->texture_get_data(rb->sdfgi->cascades[cascade].sdf, 0);
@@ -7897,6 +8024,7 @@ void RendererSceneRenderRD::render_sdfgi(RID p_render_buffers, int p_region, con
#endif
RENDER_TIMESTAMP("<SDFGI Update SDF");
+ RD::get_singleton()->draw_command_end_label();
}
}
@@ -7917,32 +8045,17 @@ void RendererSceneRenderRD::render_particle_collider_heightfield(RID p_collider,
_render_particle_collider_heightfield(fb, cam_xform, cm, p_instances);
}
-void RendererSceneRenderRD::render_sdfgi_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const PagedArray<RID> *p_positional_light_cull_result) {
+void RendererSceneRenderRD::_render_sdfgi_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const PagedArray<RID> *p_positional_light_cull_result) {
RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
ERR_FAIL_COND(!rb);
ERR_FAIL_COND(!rb->sdfgi);
- _sdfgi_update_cascades(p_render_buffers); //need cascades updated for this
+ RD::get_singleton()->draw_command_begin_label("SDFGI Render Static Lighs");
- RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
-
- RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.direct_light_pipeline[SDGIShader::DIRECT_LIGHT_MODE_STATIC]);
-
- SDGIShader::DirectLightPushConstant dl_push_constant;
-
- dl_push_constant.grid_size[0] = rb->sdfgi->cascade_size;
- dl_push_constant.grid_size[1] = rb->sdfgi->cascade_size;
- dl_push_constant.grid_size[2] = rb->sdfgi->cascade_size;
- dl_push_constant.max_cascades = rb->sdfgi->cascades.size();
- dl_push_constant.probe_axis_size = rb->sdfgi->probe_axis_count;
- dl_push_constant.multibounce = false; // this is static light, do not multibounce yet
- dl_push_constant.y_mult = rb->sdfgi->y_mult;
-
- //all must be processed
- dl_push_constant.process_offset = 0;
- dl_push_constant.process_increment = 1;
+ _sdfgi_update_cascades(p_render_buffers); //need cascades updated for this
SDGIShader::Light lights[SDFGI::MAX_STATIC_LIGHTS];
+ uint32_t light_count[SDFGI::MAX_STATIC_LIGHTS];
for (uint32_t i = 0; i < p_cascade_count; i++) {
ERR_CONTINUE(p_cascade_indices[i] >= rb->sdfgi->cascades.size());
@@ -7998,18 +8111,46 @@ void RendererSceneRenderRD::render_sdfgi_static_lights(RID p_render_buffers, uin
lights[idx].has_shadow = storage->light_has_shadow(li->light);
lights[idx].attenuation = storage->light_get_param(li->light, RS::LIGHT_PARAM_ATTENUATION);
lights[idx].radius = storage->light_get_param(li->light, RS::LIGHT_PARAM_RANGE);
- lights[idx].spot_angle = Math::deg2rad(storage->light_get_param(li->light, RS::LIGHT_PARAM_SPOT_ANGLE));
- lights[idx].spot_attenuation = storage->light_get_param(li->light, RS::LIGHT_PARAM_SPOT_ATTENUATION);
+ lights[idx].cos_spot_angle = Math::cos(Math::deg2rad(storage->light_get_param(li->light, RS::LIGHT_PARAM_SPOT_ANGLE)));
+ lights[idx].inv_spot_attenuation = 1.0f / storage->light_get_param(li->light, RS::LIGHT_PARAM_SPOT_ATTENUATION);
idx++;
}
if (idx > 0) {
- RD::get_singleton()->buffer_update(cc.lights_buffer, 0, idx * sizeof(SDGIShader::Light), lights, true);
+ RD::get_singleton()->buffer_update(cc.lights_buffer, 0, idx * sizeof(SDGIShader::Light), lights);
}
- dl_push_constant.light_count = idx;
+
+ light_count[i] = idx;
}
+ }
+ /* Static Lights */
+ RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin();
+
+ RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, sdfgi_shader.direct_light_pipeline[SDGIShader::DIRECT_LIGHT_MODE_STATIC]);
+
+ SDGIShader::DirectLightPushConstant dl_push_constant;
+
+ dl_push_constant.grid_size[0] = rb->sdfgi->cascade_size;
+ dl_push_constant.grid_size[1] = rb->sdfgi->cascade_size;
+ dl_push_constant.grid_size[2] = rb->sdfgi->cascade_size;
+ dl_push_constant.max_cascades = rb->sdfgi->cascades.size();
+ dl_push_constant.probe_axis_size = rb->sdfgi->probe_axis_count;
+ dl_push_constant.bounce_feedback = 0.0; // this is static light, do not multibounce yet
+ dl_push_constant.y_mult = rb->sdfgi->y_mult;
+ dl_push_constant.use_occlusion = rb->sdfgi->uses_occlusion;
+
+ //all must be processed
+ dl_push_constant.process_offset = 0;
+ dl_push_constant.process_increment = 1;
+
+ for (uint32_t i = 0; i < p_cascade_count; i++) {
+ ERR_CONTINUE(p_cascade_indices[i] >= rb->sdfgi->cascades.size());
+
+ SDFGI::Cascade &cc = rb->sdfgi->cascades[p_cascade_indices[i]];
+
+ dl_push_constant.light_count = light_count[i];
dl_push_constant.cascade = p_cascade_indices[i];
if (dl_push_constant.light_count > 0) {
@@ -8020,6 +8161,8 @@ void RendererSceneRenderRD::render_sdfgi_static_lights(RID p_render_buffers, uin
}
RD::get_singleton()->compute_list_end();
+
+ RD::get_singleton()->draw_command_end_label();
}
bool RendererSceneRenderRD::free(RID p_rid) {
@@ -8293,19 +8436,25 @@ bool RendererSceneRenderRD::is_low_end() const {
}
RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) {
- max_cluster_elements = GLOBAL_GET("rendering/cluster_builder/max_clustered_elements");
+ max_cluster_elements = GLOBAL_GET("rendering/limits/cluster_builder/max_clustered_elements");
storage = p_storage;
singleton = this;
- roughness_layers = GLOBAL_GET("rendering/quality/reflections/roughness_layers");
- sky_ggx_samples_quality = GLOBAL_GET("rendering/quality/reflections/ggx_samples");
- sky_use_cubemap_array = GLOBAL_GET("rendering/quality/reflections/texture_array_reflections");
- // sky_use_cubemap_array = false;
+ roughness_layers = GLOBAL_GET("rendering/reflections/sky_reflections/roughness_layers");
+ sky_ggx_samples_quality = GLOBAL_GET("rendering/reflections/sky_reflections/ggx_samples");
+ sky_use_cubemap_array = GLOBAL_GET("rendering/reflections/sky_reflections/texture_array_reflections");
+
+ sdfgi_ray_count = RS::EnvironmentSDFGIRayCount(CLAMP(int32_t(GLOBAL_GET("rendering/global_illumination/sdfgi/probe_ray_count")), 0, int32_t(RS::ENV_SDFGI_RAY_COUNT_MAX - 1)));
+ sdfgi_frames_to_converge = RS::EnvironmentSDFGIFramesToConverge(CLAMP(int32_t(GLOBAL_GET("rendering/global_illumination/sdfgi/frames_to_converge")), 0, int32_t(RS::ENV_SDFGI_CONVERGE_MAX - 1)));
+ sdfgi_frames_to_update_light = RS::EnvironmentSDFGIFramesToUpdateLight(CLAMP(int32_t(GLOBAL_GET("rendering/global_illumination/sdfgi/frames_to_update_lights")), 0, int32_t(RS::ENV_SDFGI_UPDATE_LIGHT_MAX - 1)));
+
+ directional_shadow.size = GLOBAL_GET("rendering/shadows/directional_shadow/size");
+ directional_shadow.use_16_bits = GLOBAL_GET("rendering/shadows/directional_shadow/16_bits");
uint32_t textures_per_stage = RD::get_singleton()->limit_get(RD::LIMIT_MAX_TEXTURES_PER_SHADER_STAGE);
- low_end = GLOBAL_GET("rendering/quality/rd_renderer/use_low_end_renderer");
+ low_end = GLOBAL_GET("rendering/driver/rd_renderer/use_low_end_renderer");
if (textures_per_stage < 48) {
low_end = true;
@@ -8318,7 +8467,7 @@ RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) {
gi_probe_lights = memnew_arr(GIProbeLight, gi_probe_max_lights);
gi_probe_lights_uniform = RD::get_singleton()->uniform_buffer_create(gi_probe_max_lights * sizeof(GIProbeLight));
- gi_probe_quality = RS::GIProbeQuality(CLAMP(int(GLOBAL_GET("rendering/quality/gi_probes/quality")), 0, 1));
+ gi_probe_quality = RS::GIProbeQuality(CLAMP(int(GLOBAL_GET("rendering/global_illumination/gi_probes/quality")), 0, 1));
String defines = "\n#define MAX_LIGHTS " + itos(gi_probe_max_lights) + "\n";
@@ -8449,9 +8598,14 @@ RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) {
{
// default material and shader for sky shader
- sky_shader.default_shader = storage->shader_create();
+ sky_shader.default_shader = storage->shader_allocate();
+ storage->shader_initialize(sky_shader.default_shader);
+
storage->shader_set_code(sky_shader.default_shader, "shader_type sky; void fragment() { COLOR = vec3(0.0); } \n");
- sky_shader.default_material = storage->material_create();
+
+ sky_shader.default_material = storage->material_allocate();
+ storage->material_initialize(sky_shader.default_material);
+
storage->material_set_shader(sky_shader.default_material, sky_shader.default_shader);
SkyMaterialData *md = (SkyMaterialData *)storage->material_get_data(sky_shader.default_material, RendererStorageRD::SHADER_TYPE_SKY);
@@ -8525,9 +8679,13 @@ RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) {
{
// Need defaults for using fog with clear color
- sky_scene_state.fog_shader = storage->shader_create();
+ sky_scene_state.fog_shader = storage->shader_allocate();
+ storage->shader_initialize(sky_scene_state.fog_shader);
+
storage->shader_set_code(sky_scene_state.fog_shader, "shader_type sky; uniform vec4 clear_color; void fragment() { COLOR = clear_color.rgb; } \n");
- sky_scene_state.fog_material = storage->material_create();
+ sky_scene_state.fog_material = storage->material_allocate();
+ storage->material_initialize(sky_scene_state.fog_material);
+
storage->material_set_shader(sky_scene_state.fog_material, sky_scene_state.fog_shader);
Vector<RD::Uniform> uniforms;
@@ -8595,6 +8753,9 @@ RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) {
//calculate tables
String defines = "\n#define OCT_SIZE " + itos(SDFGI::LIGHTPROBE_OCT_SIZE) + "\n";
defines += "\n#define SH_SIZE " + itos(SDFGI::SH_SIZE) + "\n";
+ if (sky_use_cubemap_array) {
+ defines += "\n#define USE_CUBEMAP_ARRAY\n";
+ }
Vector<String> integrate_modes;
integrate_modes.push_back("\n#define MODE_PROCESS\n");
@@ -8634,9 +8795,12 @@ RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) {
//calculate tables
String defines = "\n#define SDFGI_OCT_SIZE " + itos(SDFGI::LIGHTPROBE_OCT_SIZE) + "\n";
Vector<String> gi_modes;
- gi_modes.push_back("\n#define USE_GIPROBE\n");
+ gi_modes.push_back("\n#define USE_GIPROBES\n");
gi_modes.push_back("\n#define USE_SDFGI\n");
- gi_modes.push_back("\n#define USE_SDFGI\n\n#define USE_GIPROBE\n");
+ gi_modes.push_back("\n#define USE_SDFGI\n\n#define USE_GIPROBES\n");
+ gi_modes.push_back("\n#define MODE_HALF_RES\n#define USE_GIPROBES\n");
+ gi_modes.push_back("\n#define MODE_HALF_RES\n#define USE_SDFGI\n");
+ gi_modes.push_back("\n#define MODE_HALF_RES\n#define USE_SDFGI\n\n#define USE_GIPROBES\n");
gi.shader.initialize(gi_modes, defines);
gi.shader_version = gi.shader.version_create();
@@ -8681,11 +8845,19 @@ RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) {
default_giprobe_buffer = RD::get_singleton()->uniform_buffer_create(sizeof(GI::GIProbeData) * RenderBuffers::MAX_GIPROBES);
}
+ { //decals
+ cluster.max_decals = max_cluster_elements;
+ uint32_t decal_buffer_size = cluster.max_decals * sizeof(Cluster::DecalData);
+ cluster.decals = memnew_arr(Cluster::DecalData, cluster.max_decals);
+ cluster.decal_sort = memnew_arr(Cluster::InstanceSort<DecalInstance>, cluster.max_decals);
+ cluster.decal_buffer = RD::get_singleton()->storage_buffer_create(decal_buffer_size);
+ }
+
{ //reflections
cluster.max_reflections = max_cluster_elements;
cluster.reflections = memnew_arr(Cluster::ReflectionData, cluster.max_reflections);
- cluster.reflection_sort = memnew_arr(Cluster::InstanceSort<ReflectionProbeInstance>, cluster.max_decals);
+ cluster.reflection_sort = memnew_arr(Cluster::InstanceSort<ReflectionProbeInstance>, cluster.max_reflections);
cluster.reflection_buffer = RD::get_singleton()->storage_buffer_create(sizeof(Cluster::ReflectionData) * cluster.max_reflections);
}
@@ -8701,24 +8873,12 @@ RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) {
cluster.spot_light_sort = memnew_arr(Cluster::InstanceSort<LightInstance>, cluster.max_lights);
//defines += "\n#define MAX_LIGHT_DATA_STRUCTS " + itos(cluster.max_lights) + "\n";
- //used for volumetric fog shrinking
- cluster.lights_instances = memnew_arr(RID, cluster.max_lights * 2);
- cluster.lights_shadow_rect_cache = memnew_arr(Rect2i, cluster.max_lights * 2);
-
cluster.max_directional_lights = MAX_DIRECTIONAL_LIGHTS;
uint32_t directional_light_buffer_size = cluster.max_directional_lights * sizeof(Cluster::DirectionalLightData);
cluster.directional_lights = memnew_arr(Cluster::DirectionalLightData, cluster.max_directional_lights);
cluster.directional_light_buffer = RD::get_singleton()->uniform_buffer_create(directional_light_buffer_size);
}
- { //decals
- cluster.max_decals = max_cluster_elements;
- uint32_t decal_buffer_size = cluster.max_decals * sizeof(Cluster::DecalData);
- cluster.decals = memnew_arr(Cluster::DecalData, cluster.max_decals);
- cluster.decal_sort = memnew_arr(Cluster::InstanceSort<DecalInstance>, cluster.max_decals);
- cluster.decal_buffer = RD::get_singleton()->storage_buffer_create(decal_buffer_size);
- }
-
if (!low_end) {
String defines = "\n#define MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS " + itos(cluster.max_directional_lights) + "\n";
Vector<String> volumetric_fog_modes;
@@ -8743,37 +8903,34 @@ RendererSceneRenderRD::RendererSceneRenderRD(RendererStorageRD *p_storage) {
shadow_sampler = RD::get_singleton()->sampler_create(sampler);
}
- camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokehShape(int(GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_bokeh_shape"))));
- camera_effects_set_dof_blur_quality(RS::DOFBlurQuality(int(GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_bokeh_quality"))), GLOBAL_GET("rendering/quality/depth_of_field/depth_of_field_use_jitter"));
- environment_set_ssao_quality(RS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/quality/ssao/quality"))), GLOBAL_GET("rendering/quality/ssao/half_size"), GLOBAL_GET("rendering/quality/ssao/adaptive_target"), GLOBAL_GET("rendering/quality/ssao/blur_passes"), GLOBAL_GET("rendering/quality/ssao/fadeout_from"), GLOBAL_GET("rendering/quality/ssao/fadeout_to"));
- screen_space_roughness_limiter = GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_enabled");
- screen_space_roughness_limiter_amount = GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_amount");
- screen_space_roughness_limiter_limit = GLOBAL_GET("rendering/quality/screen_filters/screen_space_roughness_limiter_limit");
- glow_bicubic_upscale = int(GLOBAL_GET("rendering/quality/glow/upscale_mode")) > 0;
- glow_high_quality = GLOBAL_GET("rendering/quality/glow/use_high_quality");
- ssr_roughness_quality = RS::EnvironmentSSRRoughnessQuality(int(GLOBAL_GET("rendering/quality/screen_space_reflection/roughness_quality")));
- sss_quality = RS::SubSurfaceScatteringQuality(int(GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_quality")));
- sss_scale = GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_scale");
- sss_depth_scale = GLOBAL_GET("rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale");
+ camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokehShape(int(GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_bokeh_shape"))));
+ camera_effects_set_dof_blur_quality(RS::DOFBlurQuality(int(GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_bokeh_quality"))), GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_use_jitter"));
+ environment_set_ssao_quality(RS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/environment/ssao/quality"))), GLOBAL_GET("rendering/environment/ssao/half_size"), GLOBAL_GET("rendering/environment/ssao/adaptive_target"), GLOBAL_GET("rendering/environment/ssao/blur_passes"), GLOBAL_GET("rendering/environment/ssao/fadeout_from"), GLOBAL_GET("rendering/environment/ssao/fadeout_to"));
+ screen_space_roughness_limiter = GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/enabled");
+ screen_space_roughness_limiter_amount = GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/amount");
+ screen_space_roughness_limiter_limit = GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/limit");
+ glow_bicubic_upscale = int(GLOBAL_GET("rendering/environment/glow/upscale_mode")) > 0;
+ glow_high_quality = GLOBAL_GET("rendering/environment/glow/use_high_quality");
+ ssr_roughness_quality = RS::EnvironmentSSRRoughnessQuality(int(GLOBAL_GET("rendering/environment/screen_space_reflection/roughness_quality")));
+ sss_quality = RS::SubSurfaceScatteringQuality(int(GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_quality")));
+ sss_scale = GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_scale");
+ sss_depth_scale = GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale");
directional_penumbra_shadow_kernel = memnew_arr(float, 128);
directional_soft_shadow_kernel = memnew_arr(float, 128);
penumbra_shadow_kernel = memnew_arr(float, 128);
soft_shadow_kernel = memnew_arr(float, 128);
- shadows_quality_set(RS::ShadowQuality(int(GLOBAL_GET("rendering/quality/shadows/soft_shadow_quality"))));
- directional_shadow_quality_set(RS::ShadowQuality(int(GLOBAL_GET("rendering/quality/directional_shadow/soft_shadow_quality"))));
+ shadows_quality_set(RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/shadows/soft_shadow_quality"))));
+ directional_shadow_quality_set(RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/directional_shadow/soft_shadow_quality"))));
- environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/volumetric_fog/volume_size"), GLOBAL_GET("rendering/volumetric_fog/volume_depth"));
- environment_set_volumetric_fog_filter_active(GLOBAL_GET("rendering/volumetric_fog/use_filter"));
- environment_set_volumetric_fog_directional_shadow_shrink_size(GLOBAL_GET("rendering/volumetric_fog/directional_shadow_shrink"));
- environment_set_volumetric_fog_positional_shadow_shrink_size(GLOBAL_GET("rendering/volumetric_fog/positional_shadow_shrink"));
+ environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/environment/volumetric_fog/volume_size"), GLOBAL_GET("rendering/environment/volumetric_fog/volume_depth"));
+ environment_set_volumetric_fog_filter_active(GLOBAL_GET("rendering/environment/volumetric_fog/use_filter"));
cull_argument.set_page_pool(&cull_argument_pool);
+
+ gi.half_resolution = GLOBAL_GET("rendering/global_illumination/gi/use_half_resolution");
}
RendererSceneRenderRD::~RendererSceneRenderRD() {
- for (Map<Vector2i, ShadowMap>::Element *E = shadow_maps.front(); E; E = E->next()) {
- RD::get_singleton()->free(E->get().depth);
- }
for (Map<int, ShadowCubemap>::Element *E = shadow_cubemaps.front(); E; E = E->next()) {
RD::get_singleton()->free(E->get().cubemap);
}
@@ -8828,8 +8985,6 @@ RendererSceneRenderRD::~RendererSceneRenderRD() {
memdelete_arr(cluster.spot_lights);
memdelete_arr(cluster.omni_light_sort);
memdelete_arr(cluster.spot_light_sort);
- memdelete_arr(cluster.lights_shadow_rect_cache);
- memdelete_arr(cluster.lights_instances);
memdelete_arr(cluster.reflections);
memdelete_arr(cluster.reflection_sort);
memdelete_arr(cluster.decals);
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.h b/servers/rendering/renderer_rd/renderer_scene_render_rd.h
index 3e69335225..e4eaa93212 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.h
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.h
@@ -109,8 +109,13 @@ protected:
void _setup_reflections(const PagedArray<RID> &p_reflections, const Transform &p_camera_inverse_transform, RID p_environment);
void _setup_giprobes(RID p_render_buffers, const Transform &p_transform, const PagedArray<RID> &p_gi_probes, uint32_t &r_gi_probes_used);
- virtual void _render_scene(RID p_render_buffer, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, int p_directional_light_count, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_cluster_buffer, uint32_t p_cluster_size, uint32_t p_cluster_max_elements, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, const Color &p_default_color, float p_screen_lod_threshold) = 0;
- virtual void _render_shadow(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const CameraMatrix &p_projection, const Transform &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_lod_threshold = 0.0) = 0;
+ virtual void _render_scene(RID p_render_buffer, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_cluster_buffer, uint32_t p_cluster_size, uint32_t p_cluster_max_elements, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, const Color &p_default_color, float p_screen_lod_threshold) = 0;
+
+ virtual void _render_shadow_begin() = 0;
+ virtual void _render_shadow_append(RID p_framebuffer, const PagedArray<GeometryInstance *> &p_instances, const CameraMatrix &p_projection, const Transform &p_transform, float p_zfar, float p_bias, float p_normal_bias, bool p_use_dp, bool p_use_dp_flip, bool p_use_pancake, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0.0, float p_screen_lod_threshold = 0.0, const Rect2i &p_rect = Rect2i(), bool p_flip_y = false, bool p_clear_region = true, bool p_begin = true, bool p_end = true) = 0;
+ virtual void _render_shadow_process() = 0;
+ virtual void _render_shadow_end(uint32_t p_barrier = RD::BARRIER_MASK_ALL) = 0;
+
virtual void _render_material(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) = 0;
virtual void _render_uv2(const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) = 0;
virtual void _render_sdfgi(RID p_render_buffers, const Vector3i &p_from, const Vector3i &p_size, const AABB &p_bounds, const PagedArray<GeometryInstance *> &p_instances, const RID &p_albedo_texture, const RID &p_emission_texture, const RID &p_emission_aniso_texture, const RID &p_geom_facing_texture) = 0;
@@ -124,8 +129,6 @@ protected:
virtual void _base_uniforms_changed() = 0;
virtual void _render_buffers_uniform_set_changed(RID p_render_buffers) = 0;
virtual RID _render_buffers_get_normal_texture(RID p_render_buffers) = 0;
- virtual RID _render_buffers_get_ambient_texture(RID p_render_buffers) = 0;
- virtual RID _render_buffers_get_reflection_texture(RID p_render_buffers) = 0;
void _process_ssao(RID p_render_buffers, RID p_environment, RID p_normal_buffer, const CameraMatrix &p_projection);
void _process_ssr(RID p_render_buffers, RID p_dest_framebuffer, RID p_normal_buffer, RID p_specular_buffer, RID p_metallic, const Color &p_metallic_mask, RID p_environment, const CameraMatrix &p_projection, bool p_use_additive);
@@ -134,7 +137,15 @@ protected:
void _setup_sky(RID p_environment, RID p_render_buffers, const CameraMatrix &p_projection, const Transform &p_transform, const Size2i p_screen_size);
void _update_sky(RID p_environment, const CameraMatrix &p_projection, const Transform &p_transform);
void _draw_sky(bool p_can_continue_color, bool p_can_continue_depth, RID p_fb, RID p_environment, const CameraMatrix &p_projection, const Transform &p_transform);
- void _process_gi(RID p_render_buffers, RID p_normal_roughness_buffer, RID p_ambient_buffer, RID p_reflection_buffer, RID p_gi_probe_buffer, RID p_environment, const CameraMatrix &p_projection, const Transform &p_transform, const PagedArray<RID> &p_gi_probes);
+ void _pre_process_gi(RID p_render_buffers, const Transform &p_transform);
+ void _process_gi(RID p_render_buffers, RID p_normal_roughness_buffer, RID p_gi_probe_buffer, RID p_environment, const CameraMatrix &p_projection, const Transform &p_transform, const PagedArray<RID> &p_gi_probes);
+
+ bool _needs_post_prepass_render(bool p_use_gi);
+ void _post_prepass_render(bool p_use_gi);
+ void _pre_resolve_render(bool p_use_gi);
+
+ void _pre_opaque_render(bool p_use_ssao, bool p_use_gi, RID p_normal_roughness_buffer, RID p_gi_probe_buffer);
+ uint32_t _get_render_state_directional_light_count() const;
// needed for a single argument calls (material and uv2)
PagedArrayPool<GeometryInstance *> cull_argument_pool;
@@ -322,7 +333,7 @@ private:
uint32_t sky_ggx_samples_quality;
bool sky_use_cubemap_array;
- mutable RID_Owner<Sky> sky_owner;
+ mutable RID_Owner<Sky, true> sky_owner;
/* REFLECTION ATLAS */
@@ -395,10 +406,10 @@ private:
float attenuation;
float color[3];
- float spot_angle_radians;
+ float cos_spot_angle;
float position[3];
- float spot_attenuation;
+ float inv_spot_attenuation;
float direction[3];
uint32_t has_shadow;
@@ -574,17 +585,18 @@ private:
uint32_t smallest_subdiv = 0;
int size = 0;
+ bool use_16_bits = false;
RID depth;
RID fb; //for copying
Map<RID, uint32_t> shadow_owners;
-
- Vector<ShadowShrinkStage> shrink_stages;
};
RID_Owner<ShadowAtlas> shadow_atlas_owner;
+ void _update_shadow_atlas(ShadowAtlas *shadow_atlas);
+
bool _shadow_atlas_find_shadow(ShadowAtlas *shadow_atlas, int *p_in_quadrants, int p_quadrant_count, int p_current_subdiv, uint64_t p_tick, int &r_quadrant, int &r_shadow);
RS::ShadowQuality shadows_quality = RS::SHADOW_QUALITY_MAX; //So it always updates when first set
@@ -605,17 +617,16 @@ private:
struct DirectionalShadow {
RID depth;
+ RID fb; //when renderign direct
int light_count = 0;
int size = 0;
+ bool use_16_bits = false;
int current_light = 0;
- Vector<ShadowShrinkStage> shrink_stages;
-
} directional_shadow;
- void _allocate_shadow_shrink_stages(RID p_base, int p_base_size, Vector<ShadowShrinkStage> &shrink_stages, uint32_t p_target_size);
- void _clear_shadow_shrink_stages(Vector<ShadowShrinkStage> &shrink_stages);
+ void _update_directional_shadow_atlas();
/* SHADOW CUBEMAPS */
@@ -627,14 +638,6 @@ private:
Map<int, ShadowCubemap> shadow_cubemaps;
ShadowCubemap *_get_shadow_cubemap(int p_size);
- struct ShadowMap {
- RID depth;
- RID fb;
- };
-
- Map<Vector2i, ShadowMap> shadow_maps;
- ShadowMap *_get_shadow_map(const Size2i &p_size);
-
void _create_shadow_cubemaps();
/* LIGHT INSTANCE */
@@ -654,7 +657,7 @@ private:
RS::LightType light_type = RS::LIGHT_DIRECTIONAL;
- ShadowTransform shadow_transform[4];
+ ShadowTransform shadow_transform[6];
AABB aabb;
RID self;
@@ -733,8 +736,9 @@ private:
float volumetric_fog_light_energy = 0.0;
float volumetric_fog_length = 64.0;
float volumetric_fog_detail_spread = 2.0;
- RS::EnvVolumetricFogShadowFilter volumetric_fog_shadow_filter = RS::ENV_VOLUMETRIC_FOG_SHADOW_FILTER_LOW;
float volumetric_fog_gi_inject = 0.0;
+ bool volumetric_fog_temporal_reprojection = true;
+ float volumetric_fog_temporal_reprojection_amount = 0.9;
/// Glow
@@ -774,7 +778,7 @@ private:
RS::EnvironmentSDFGICascades sdfgi_cascades;
float sdfgi_min_cell_size = 0.2;
bool sdfgi_use_occlusion = false;
- bool sdfgi_use_multibounce = false;
+ float sdfgi_bounce_feedback = 0.0;
bool sdfgi_read_sky_light = false;
float sdfgi_energy = 1.0;
float sdfgi_normal_bias = 1.1;
@@ -805,7 +809,7 @@ private:
static uint64_t auto_exposure_counter;
- mutable RID_Owner<Environment> environment_owner;
+ mutable RID_Owner<Environment, true> environment_owner;
/* CAMERA EFFECTS */
@@ -831,7 +835,7 @@ private:
float sss_scale = 0.05;
float sss_depth_scale = 0.01;
- mutable RID_Owner<CameraEffects> camera_effects_owner;
+ mutable RID_Owner<CameraEffects, true> camera_effects_owner;
/* RENDER BUFFERS */
@@ -904,6 +908,16 @@ private:
RID giprobe_textures[MAX_GIPROBES];
RID giprobe_buffer;
+
+ RID ambient_buffer;
+ RID reflection_buffer;
+ bool using_half_size_gi = false;
+
+ struct GI {
+ RID full_buffer;
+ RID full_dispatch;
+ RID full_mask;
+ } gi;
};
RID default_giprobe_buffer;
@@ -965,6 +979,8 @@ private:
RID scroll_occlusion_uniform_set;
RID integrate_uniform_set;
RID lights_buffer;
+
+ bool all_dynamic_lights_dirty = true;
};
//used for rendering (voxelization)
@@ -1012,7 +1028,7 @@ private:
RID cascades_ubo;
bool uses_occlusion = false;
- bool uses_multibounce = false;
+ float bounce_feedback = 0.0;
bool reads_sky = false;
float energy = 1.0;
float normal_bias = 1.1;
@@ -1022,10 +1038,18 @@ private:
float y_mult = 1.0;
uint32_t render_pass = 0;
+
+ int32_t cascade_dynamic_light_count[SDFGI::MAX_CASCADES]; //used dynamically
};
+ void _sdfgi_update_light(RID p_render_buffers, RID p_environment);
+ void _sdfgi_update_probes(RID p_render_buffers, RID p_environment);
+ void _sdfgi_store_probes(RID p_render_buffers);
+
RS::EnvironmentSDFGIRayCount sdfgi_ray_count = RS::ENV_SDFGI_RAY_COUNT_16;
RS::EnvironmentSDFGIFramesToConverge sdfgi_frames_to_converge = RS::ENV_SDFGI_CONVERGE_IN_10_FRAMES;
+ RS::EnvironmentSDFGIFramesToUpdateLight sdfgi_frames_to_update_light = RS::ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES;
+
float sdfgi_solid_cell_ratio = 0.25;
Vector3 sdfgi_debug_probe_pos;
Vector3 sdfgi_debug_probe_dir;
@@ -1122,8 +1146,8 @@ private:
float attenuation;
uint32_t type;
- float spot_angle;
- float spot_attenuation;
+ float cos_spot_angle;
+ float inv_spot_attenuation;
float radius;
float shadow_color[4];
@@ -1139,9 +1163,9 @@ private:
uint32_t process_increment;
int32_t probe_axis_size;
- uint32_t multibounce;
+ float bounce_feedback;
float y_mult;
- uint32_t pad;
+ uint32_t use_occlusion;
};
enum {
@@ -1263,14 +1287,12 @@ private:
float z_far;
float proj_info[4];
-
+ float ao_color[3];
uint32_t max_giprobes;
+
uint32_t high_quality_vct;
- uint32_t pad2;
uint32_t orthogonal;
-
- float ao_color[3];
- uint32_t pad;
+ uint32_t pad[2];
float cam_rotation[12];
};
@@ -1280,9 +1302,13 @@ private:
MODE_GIPROBE,
MODE_SDFGI,
MODE_COMBINED,
+ MODE_HALF_RES_GIPROBE,
+ MODE_HALF_RES_SDFGI,
+ MODE_HALF_RES_COMBINED,
MODE_MAX
};
+ bool half_resolution = false;
GiShaderRD shader;
RID shader_version;
RID pipelines[MODE_MAX];
@@ -1336,8 +1362,8 @@ private:
float color[3];
float attenuation;
- float cone_attenuation;
- float cone_angle;
+ float inv_spot_attenuation;
+ float cos_spot_angle;
float specular_amount;
uint32_t shadow_enabled;
@@ -1437,17 +1463,52 @@ private:
uint32_t omni_light_count = 0;
uint32_t spot_light_count = 0;
- RID *lights_instances;
- Rect2i *lights_shadow_rect_cache;
- uint32_t lights_shadow_rect_cache_count = 0;
-
DirectionalLightData *directional_lights;
uint32_t max_directional_lights;
RID directional_light_buffer;
} cluster;
+ struct RenderState {
+ RID render_buffers;
+ Transform cam_transform;
+ CameraMatrix cam_projection;
+ bool cam_ortogonal = false;
+ const PagedArray<GeometryInstance *> *instances = nullptr;
+ const PagedArray<RID> *lights = nullptr;
+ const PagedArray<RID> *reflection_probes = nullptr;
+ const PagedArray<RID> *gi_probes = nullptr;
+ const PagedArray<RID> *decals = nullptr;
+ const PagedArray<RID> *lightmaps = nullptr;
+ RID environment;
+ RID camera_effects;
+ RID shadow_atlas;
+ RID reflection_atlas;
+ RID reflection_probe;
+ int reflection_probe_pass = 0;
+ float screen_lod_threshold = 0.0;
+
+ const RenderShadowData *render_shadows = nullptr;
+ int render_shadow_count = 0;
+ const RenderSDFGIData *render_sdfgi_regions = nullptr;
+ int render_sdfgi_region_count = 0;
+ const RenderSDFGIUpdateData *sdfgi_update_data = nullptr;
+
+ uint32_t directional_light_count = 0;
+ uint32_t gi_probe_count = 0;
+
+ LocalVector<int> cube_shadows;
+ LocalVector<int> shadows;
+ LocalVector<int> directional_shadows;
+
+ bool depth_prepass_used;
+ } render_state;
+
struct VolumetricFog {
+ enum {
+ MAX_TEMPORAL_FRAMES = 16
+ };
+
uint32_t width = 0;
uint32_t height = 0;
uint32_t depth = 0;
@@ -1456,6 +1517,8 @@ private:
float spread;
RID light_density_map;
+ RID prev_light_density_map;
+
RID fog_map;
RID uniform_set;
RID uniform_set2;
@@ -1463,6 +1526,8 @@ private:
RID sky_uniform_set;
int last_shadow_filter = -1;
+
+ Transform prev_cam_transform;
};
enum {
@@ -1498,10 +1563,13 @@ private:
uint32_t cluster_shift;
uint32_t cluster_width;
- uint32_t cluster_pad[3];
uint32_t max_cluster_element_count_div_32;
+ uint32_t use_temporal_reprojection;
+ uint32_t temporal_frame;
+ float temporal_blend;
float cam_rotation[12];
+ float to_prev_view[16];
};
VolumetricFogShaderRD shader;
@@ -1514,9 +1582,7 @@ private:
uint32_t volumetric_fog_depth = 128;
uint32_t volumetric_fog_size = 128;
- bool volumetric_fog_filter_active = false;
- uint32_t volumetric_fog_directional_shadow_shrink = 512;
- uint32_t volumetric_fog_positional_shadow_shrink = 512;
+ bool volumetric_fog_filter_active = true;
void _volumetric_fog_erase(RenderBuffers *rb);
void _update_volumetric_fog(RID p_render_buffers, RID p_environment, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform, RID p_shadow_atlas, int p_directional_light_count, bool p_use_directional_shadows, int p_positional_light_count, int p_gi_probe_count);
@@ -1534,6 +1600,10 @@ private:
uint32_t max_cluster_elements = 512;
bool low_end = false;
+ void _render_shadow_pass(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<GeometryInstance *> &p_instances, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0, float p_screen_lod_threshold = 0.0, bool p_open_pass = true, bool p_close_pass = true, bool p_clear_region = true);
+ void _render_sdfgi_region(RID p_render_buffers, int p_region, const PagedArray<GeometryInstance *> &p_instances);
+ void _render_sdfgi_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const PagedArray<RID> *p_positional_light_cull_result);
+
public:
virtual Transform geometry_instance_get_transform(GeometryInstance *p_instance) = 0;
virtual AABB geometry_instance_get_aabb(GeometryInstance *p_instance) = 0;
@@ -1541,7 +1611,7 @@ public:
/* SHADOW ATLAS API */
RID shadow_atlas_create();
- void shadow_atlas_set_size(RID p_atlas, int p_size);
+ void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_16_bits = false);
void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision);
bool shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version);
_FORCE_INLINE_ bool shadow_atlas_owns_light_instance(RID p_atlas, RID p_light_intance) {
@@ -1562,7 +1632,7 @@ public:
return Size2(atlas->size, atlas->size);
}
- void directional_shadow_atlas_set_size(int p_size);
+ void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = false);
int get_directional_light_shadow_size(RID p_light_intance);
void set_directional_shadow_count(int p_count);
@@ -1581,11 +1651,12 @@ public:
virtual int sdfgi_get_pending_region_count(RID p_render_buffers) const;
virtual AABB sdfgi_get_pending_region_bounds(RID p_render_buffers, int p_region) const;
virtual uint32_t sdfgi_get_pending_region_cascade(RID p_render_buffers, int p_region) const;
- virtual void sdfgi_update_probes(RID p_render_buffers, RID p_environment, const Vector<RID> &p_directional_lights, const RID *p_positional_light_instances, uint32_t p_positional_light_count);
RID sdfgi_get_ubo() const { return gi.sdfgi_ubo; }
/* SKY API */
- RID sky_create();
+ virtual RID sky_allocate();
+ virtual void sky_initialize(RID p_rid);
+
void sky_set_radiance_size(RID p_sky, int p_radiance_size);
void sky_set_mode(RID p_sky, RS::SkyMode p_mode);
void sky_set_material(RID p_sky, RID p_material);
@@ -1597,7 +1668,8 @@ public:
/* ENVIRONMENT API */
- RID environment_create();
+ virtual RID environment_allocate();
+ virtual void environment_initialize(RID p_rid);
void environment_set_background(RID p_env, RS::EnvironmentBG p_bg);
void environment_set_sky(RID p_env, RID p_sky);
@@ -1638,12 +1710,10 @@ public:
float environment_get_fog_height_density(RID p_env) const;
float environment_get_fog_aerial_perspective(RID p_env) const;
- void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, RS::EnvVolumetricFogShadowFilter p_shadow_filter);
+ void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount);
virtual void environment_set_volumetric_fog_volume_size(int p_size, int p_depth);
virtual void environment_set_volumetric_fog_filter_active(bool p_enable);
- virtual void environment_set_volumetric_fog_directional_shadow_shrink_size(int p_shrink_size);
- virtual void environment_set_volumetric_fog_positional_shadow_shrink_size(int p_shrink_size);
void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance);
void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_power, float p_detail, float p_horizon, float p_sharpness, float p_light_affect, float p_ao_channel_affect);
@@ -1654,9 +1724,10 @@ public:
bool environment_is_ssr_enabled(RID p_env) const;
bool environment_is_sdfgi_enabled(RID p_env) const;
- virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, bool p_use_multibounce, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias);
+ virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias);
virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count);
virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames);
+ virtual void environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update);
void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality);
RS::EnvironmentSSRRoughnessQuality environment_get_ssr_roughness_quality() const;
@@ -1666,7 +1737,8 @@ public:
virtual Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size);
- virtual RID camera_effects_create();
+ virtual RID camera_effects_allocate();
+ virtual void camera_effects_initialize(RID p_rid);
virtual void camera_effects_set_dof_blur_quality(RS::DOFBlurQuality p_quality, bool p_use_jitter);
virtual void camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokehShape p_shape);
@@ -1955,11 +2027,14 @@ public:
*/
RID render_buffers_create();
void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_width, int p_height, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_debanding);
+ void gi_set_use_half_resolution(bool p_enable);
RID render_buffers_get_ao_texture(RID p_render_buffers);
RID render_buffers_get_back_buffer_texture(RID p_render_buffers);
RID render_buffers_get_gi_probe_buffer(RID p_render_buffers);
RID render_buffers_get_default_gi_probe_buffer();
+ RID render_buffers_get_gi_ambient_texture(RID p_render_buffers);
+ RID render_buffers_get_gi_reflection_texture(RID p_render_buffers);
uint32_t render_buffers_get_sdfgi_cascade_count(RID p_render_buffers) const;
bool render_buffers_is_sdfgi_enabled(RID p_render_buffers) const;
@@ -1980,15 +2055,10 @@ public:
float render_buffers_get_volumetric_fog_end(RID p_render_buffers);
float render_buffers_get_volumetric_fog_detail_spread(RID p_render_buffers);
- void render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold);
-
- void render_shadow(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<GeometryInstance *> &p_instances, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0, float p_screen_lod_threshold = 0.0);
+ void render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr);
void render_material(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region);
- void render_sdfgi(RID p_render_buffers, int p_region, const PagedArray<GeometryInstance *> &p_instances);
- void render_sdfgi_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const PagedArray<RID> *p_positional_light_cull_result);
-
void render_particle_collider_heightfield(RID p_collider, const Transform &p_transform, const PagedArray<GeometryInstance *> &p_instances);
virtual void set_scene_pass(uint64_t p_pass) {
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
index 6203f3ba64..2a34049675 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
@@ -36,6 +36,10 @@
#include "renderer_compositor_rd.h"
#include "servers/rendering/shader_language.h"
+bool RendererStorageRD::can_create_resources_async() const {
+ return true;
+}
+
Ref<Image> RendererStorageRD::_validate_texture_format(const Ref<Image> &p_image, TextureToRDFormat &r_format) {
Ref<Image> image = p_image->duplicate();
@@ -535,9 +539,13 @@ Ref<Image> RendererStorageRD::_validate_texture_format(const Ref<Image> &p_image
return image;
}
-RID RendererStorageRD::texture_2d_create(const Ref<Image> &p_image) {
- ERR_FAIL_COND_V(p_image.is_null(), RID());
- ERR_FAIL_COND_V(p_image->is_empty(), RID());
+RID RendererStorageRD::texture_allocate() {
+ return texture_owner.allocate_rid();
+}
+
+void RendererStorageRD::texture_2d_initialize(RID p_texture, const Ref<Image> &p_image) {
+ ERR_FAIL_COND(p_image.is_null());
+ ERR_FAIL_COND(p_image->is_empty());
TextureToRDFormat ret_format;
Ref<Image> image = _validate_texture_format(p_image, ret_format);
@@ -585,13 +593,13 @@ RID RendererStorageRD::texture_2d_create(const Ref<Image> &p_image) {
Vector<Vector<uint8_t>> data_slices;
data_slices.push_back(data);
texture.rd_texture = RD::get_singleton()->texture_create(rd_format, rd_view, data_slices);
- ERR_FAIL_COND_V(texture.rd_texture.is_null(), RID());
+ ERR_FAIL_COND(texture.rd_texture.is_null());
if (texture.rd_format_srgb != RD::DATA_FORMAT_MAX) {
rd_view.format_override = texture.rd_format_srgb;
texture.rd_texture_srgb = RD::get_singleton()->texture_create_shared(rd_view, texture.rd_texture);
if (texture.rd_texture_srgb.is_null()) {
RD::get_singleton()->free(texture.rd_texture);
- ERR_FAIL_COND_V(texture.rd_texture_srgb.is_null(), RID());
+ ERR_FAIL_COND(texture.rd_texture_srgb.is_null());
}
}
@@ -602,14 +610,14 @@ RID RendererStorageRD::texture_2d_create(const Ref<Image> &p_image) {
texture.rd_view = rd_view;
texture.is_proxy = false;
- return texture_owner.make_rid(texture);
+ texture_owner.initialize_rid(p_texture, texture);
}
-RID RendererStorageRD::texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type) {
- ERR_FAIL_COND_V(p_layers.size() == 0, RID());
+void RendererStorageRD::texture_2d_layered_initialize(RID p_texture, const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type) {
+ ERR_FAIL_COND(p_layers.size() == 0);
- ERR_FAIL_COND_V(p_layered_type == RS::TEXTURE_LAYERED_CUBEMAP && p_layers.size() != 6, RID());
- ERR_FAIL_COND_V(p_layered_type == RS::TEXTURE_LAYERED_CUBEMAP_ARRAY && (p_layers.size() < 6 || (p_layers.size() % 6) != 0), RID());
+ ERR_FAIL_COND(p_layered_type == RS::TEXTURE_LAYERED_CUBEMAP && p_layers.size() != 6);
+ ERR_FAIL_COND(p_layered_type == RS::TEXTURE_LAYERED_CUBEMAP_ARRAY && (p_layers.size() < 6 || (p_layers.size() % 6) != 0));
TextureToRDFormat ret_format;
Vector<Ref<Image>> images;
@@ -620,7 +628,7 @@ RID RendererStorageRD::texture_2d_layered_create(const Vector<Ref<Image>> &p_lay
Image::Format valid_format = Image::FORMAT_MAX;
for (int i = 0; i < p_layers.size(); i++) {
- ERR_FAIL_COND_V(p_layers[i]->is_empty(), RID());
+ ERR_FAIL_COND(p_layers[i]->is_empty());
if (i == 0) {
valid_width = p_layers[i]->get_width();
@@ -628,10 +636,10 @@ RID RendererStorageRD::texture_2d_layered_create(const Vector<Ref<Image>> &p_lay
valid_format = p_layers[i]->get_format();
valid_mipmaps = p_layers[i]->has_mipmaps();
} else {
- ERR_FAIL_COND_V(p_layers[i]->get_width() != valid_width, RID());
- ERR_FAIL_COND_V(p_layers[i]->get_height() != valid_height, RID());
- ERR_FAIL_COND_V(p_layers[i]->get_format() != valid_format, RID());
- ERR_FAIL_COND_V(p_layers[i]->has_mipmaps() != valid_mipmaps, RID());
+ ERR_FAIL_COND(p_layers[i]->get_width() != valid_width);
+ ERR_FAIL_COND(p_layers[i]->get_height() != valid_height);
+ ERR_FAIL_COND(p_layers[i]->get_format() != valid_format);
+ ERR_FAIL_COND(p_layers[i]->has_mipmaps() != valid_mipmaps);
}
images.push_back(_validate_texture_format(p_layers[i], ret_format));
@@ -695,13 +703,13 @@ RID RendererStorageRD::texture_2d_layered_create(const Vector<Ref<Image>> &p_lay
data_slices.push_back(data);
}
texture.rd_texture = RD::get_singleton()->texture_create(rd_format, rd_view, data_slices);
- ERR_FAIL_COND_V(texture.rd_texture.is_null(), RID());
+ ERR_FAIL_COND(texture.rd_texture.is_null());
if (texture.rd_format_srgb != RD::DATA_FORMAT_MAX) {
rd_view.format_override = texture.rd_format_srgb;
texture.rd_texture_srgb = RD::get_singleton()->texture_create_shared(rd_view, texture.rd_texture);
if (texture.rd_texture_srgb.is_null()) {
RD::get_singleton()->free(texture.rd_texture);
- ERR_FAIL_COND_V(texture.rd_texture_srgb.is_null(), RID());
+ ERR_FAIL_COND(texture.rd_texture_srgb.is_null());
}
}
@@ -712,14 +720,14 @@ RID RendererStorageRD::texture_2d_layered_create(const Vector<Ref<Image>> &p_lay
texture.rd_view = rd_view;
texture.is_proxy = false;
- return texture_owner.make_rid(texture);
+ texture_owner.initialize_rid(p_texture, texture);
}
-RID RendererStorageRD::texture_3d_create(Image::Format p_format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data) {
- ERR_FAIL_COND_V(p_data.size() == 0, RID());
+void RendererStorageRD::texture_3d_initialize(RID p_texture, Image::Format p_format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data) {
+ ERR_FAIL_COND(p_data.size() == 0);
Image::Image3DValidateError verr = Image::validate_3d_image(p_format, p_width, p_height, p_depth, p_mipmaps, p_data);
if (verr != Image::VALIDATE_3D_OK) {
- ERR_FAIL_V_MSG(RID(), Image::get_3d_image_validation_error_text(verr));
+ ERR_FAIL_MSG(Image::get_3d_image_validation_error_text(verr));
}
TextureToRDFormat ret_format;
@@ -811,13 +819,13 @@ RID RendererStorageRD::texture_3d_create(Image::Format p_format, int p_width, in
data_slices.push_back(all_data); //one slice
texture.rd_texture = RD::get_singleton()->texture_create(rd_format, rd_view, data_slices);
- ERR_FAIL_COND_V(texture.rd_texture.is_null(), RID());
+ ERR_FAIL_COND(texture.rd_texture.is_null());
if (texture.rd_format_srgb != RD::DATA_FORMAT_MAX) {
rd_view.format_override = texture.rd_format_srgb;
texture.rd_texture_srgb = RD::get_singleton()->texture_create_shared(rd_view, texture.rd_texture);
if (texture.rd_texture_srgb.is_null()) {
RD::get_singleton()->free(texture.rd_texture);
- ERR_FAIL_COND_V(texture.rd_texture_srgb.is_null(), RID());
+ ERR_FAIL_COND(texture.rd_texture_srgb.is_null());
}
}
@@ -828,12 +836,12 @@ RID RendererStorageRD::texture_3d_create(Image::Format p_format, int p_width, in
texture.rd_view = rd_view;
texture.is_proxy = false;
- return texture_owner.make_rid(texture);
+ texture_owner.initialize_rid(p_texture, texture);
}
-RID RendererStorageRD::texture_proxy_create(RID p_base) {
+void RendererStorageRD::texture_proxy_initialize(RID p_texture, RID p_base) {
Texture *tex = texture_owner.getornull(p_base);
- ERR_FAIL_COND_V(!tex, RID());
+ ERR_FAIL_COND(!tex);
Texture proxy_tex = *tex;
proxy_tex.rd_view.format_override = tex->rd_format;
@@ -847,11 +855,9 @@ RID RendererStorageRD::texture_proxy_create(RID p_base) {
proxy_tex.is_proxy = true;
proxy_tex.proxies.clear();
- RID rid = texture_owner.make_rid(proxy_tex);
-
- tex->proxies.push_back(rid);
+ texture_owner.initialize_rid(p_texture, proxy_tex);
- return rid;
+ tex->proxies.push_back(p_texture);
}
void RendererStorageRD::_texture_2d_update(RID p_texture, const Ref<Image> &p_image, int p_layer, bool p_immediate) {
@@ -873,7 +879,7 @@ void RendererStorageRD::_texture_2d_update(RID p_texture, const Ref<Image> &p_im
TextureToRDFormat f;
Ref<Image> validated = _validate_texture_format(p_image, f);
- RD::get_singleton()->texture_update(tex->rd_texture, p_layer, validated->get_data(), !p_immediate);
+ RD::get_singleton()->texture_update(tex->rd_texture, p_layer, validated->get_data());
}
void RendererStorageRD::texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer) {
@@ -918,7 +924,7 @@ void RendererStorageRD::texture_3d_update(RID p_texture, const Vector<Ref<Image>
}
}
- RD::get_singleton()->texture_update(tex->rd_texture, 0, all_data, true);
+ RD::get_singleton()->texture_update(tex->rd_texture, 0, all_data);
}
void RendererStorageRD::texture_proxy_update(RID p_texture, RID p_proxy_to) {
@@ -961,7 +967,7 @@ void RendererStorageRD::texture_proxy_update(RID p_texture, RID p_proxy_to) {
}
//these two APIs can be used together or in combination with the others.
-RID RendererStorageRD::texture_2d_placeholder_create() {
+void RendererStorageRD::texture_2d_placeholder_initialize(RID p_texture) {
//this could be better optimized to reuse an existing image , done this way
//for now to get it working
Ref<Image> image;
@@ -974,10 +980,10 @@ RID RendererStorageRD::texture_2d_placeholder_create() {
}
}
- return texture_2d_create(image);
+ texture_2d_initialize(p_texture, image);
}
-RID RendererStorageRD::texture_2d_layered_placeholder_create(RS::TextureLayeredType p_layered_type) {
+void RendererStorageRD::texture_2d_layered_placeholder_initialize(RID p_texture, RS::TextureLayeredType p_layered_type) {
//this could be better optimized to reuse an existing image , done this way
//for now to get it working
Ref<Image> image;
@@ -1000,10 +1006,10 @@ RID RendererStorageRD::texture_2d_layered_placeholder_create(RS::TextureLayeredT
}
}
- return texture_2d_layered_create(images, p_layered_type);
+ texture_2d_layered_initialize(p_texture, images, p_layered_type);
}
-RID RendererStorageRD::texture_3d_placeholder_create() {
+void RendererStorageRD::texture_3d_placeholder_initialize(RID p_texture) {
//this could be better optimized to reuse an existing image , done this way
//for now to get it working
Ref<Image> image;
@@ -1022,7 +1028,7 @@ RID RendererStorageRD::texture_3d_placeholder_create() {
images.push_back(image);
}
- return texture_3d_create(Image::FORMAT_RGBA8, 4, 4, 4, false, images);
+ texture_3d_initialize(p_texture, Image::FORMAT_RGBA8, 4, 4, 4, false, images);
}
Ref<Image> RendererStorageRD::texture_2d_get(RID p_texture) const {
@@ -1223,8 +1229,11 @@ RendererStorageRD::CanvasTexture::~CanvasTexture() {
clear_sets();
}
-RID RendererStorageRD::canvas_texture_create() {
- return canvas_texture_owner.make_rid(memnew(CanvasTexture));
+RID RendererStorageRD::canvas_texture_allocate() {
+ return canvas_texture_owner.allocate_rid();
+}
+void RendererStorageRD::canvas_texture_initialize(RID p_rid) {
+ canvas_texture_owner.initialize_rid(p_rid, memnew(CanvasTexture));
}
void RendererStorageRD::canvas_texture_set_channel(RID p_canvas_texture, RS::CanvasTextureChannel p_channel, RID p_texture) {
@@ -1365,12 +1374,15 @@ bool RendererStorageRD::canvas_texture_get_uniform_set(RID p_texture, RS::Canvas
/* SHADER API */
-RID RendererStorageRD::shader_create() {
+RID RendererStorageRD::shader_allocate() {
+ return shader_owner.allocate_rid();
+}
+void RendererStorageRD::shader_initialize(RID p_rid) {
Shader shader;
shader.data = nullptr;
shader.type = SHADER_TYPE_MAX;
- return shader_owner.make_rid(shader);
+ shader_owner.initialize_rid(p_rid, shader);
}
void RendererStorageRD::shader_set_code(RID p_shader, const String &p_code) {
@@ -1510,7 +1522,10 @@ RS::ShaderNativeSourceCode RendererStorageRD::shader_get_native_source_code(RID
/* COMMON MATERIAL API */
-RID RendererStorageRD::material_create() {
+RID RendererStorageRD::material_allocate() {
+ return material_owner.allocate_rid();
+}
+void RendererStorageRD::material_initialize(RID p_rid) {
Material material;
material.data = nullptr;
material.shader = nullptr;
@@ -1520,12 +1535,8 @@ RID RendererStorageRD::material_create() {
material.uniform_dirty = false;
material.texture_dirty = false;
material.priority = 0;
- RID id = material_owner.make_rid(material);
- {
- Material *material_ptr = material_owner.getornull(id);
- material_ptr->self = id;
- }
- return id;
+ material.self = p_rid;
+ material_owner.initialize_rid(p_rid, material);
}
void RendererStorageRD::_material_queue_update(Material *material, bool p_uniform, bool p_texture) {
@@ -2399,8 +2410,11 @@ void RendererStorageRD::_update_queued_materials() {
/* MESH API */
-RID RendererStorageRD::mesh_create() {
- return mesh_owner.make_rid(Mesh());
+RID RendererStorageRD::mesh_allocate() {
+ return mesh_owner.allocate_rid();
+}
+void RendererStorageRD::mesh_initialize(RID p_rid) {
+ mesh_owner.initialize_rid(p_rid, Mesh());
}
void RendererStorageRD::mesh_set_blend_shape_count(RID p_mesh, int p_blend_shape_count) {
@@ -2609,6 +2623,12 @@ void RendererStorageRD::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_su
mesh->dependency.changed_notify(DEPENDENCY_CHANGED_MESH);
+ for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) {
+ Mesh *shadow_owner = E->get();
+ shadow_owner->shadow_mesh = RID();
+ shadow_owner->dependency.changed_notify(DEPENDENCY_CHANGED_MESH);
+ }
+
mesh->material_cache.clear();
}
@@ -2824,6 +2844,25 @@ AABB RendererStorageRD::mesh_get_aabb(RID p_mesh, RID p_skeleton) {
return aabb;
}
+void RendererStorageRD::mesh_set_shadow_mesh(RID p_mesh, RID p_shadow_mesh) {
+ Mesh *mesh = mesh_owner.getornull(p_mesh);
+ ERR_FAIL_COND(!mesh);
+
+ Mesh *shadow_mesh = mesh_owner.getornull(mesh->shadow_mesh);
+ if (shadow_mesh) {
+ shadow_mesh->shadow_owners.erase(mesh);
+ }
+ mesh->shadow_mesh = p_shadow_mesh;
+
+ shadow_mesh = mesh_owner.getornull(mesh->shadow_mesh);
+
+ if (shadow_mesh) {
+ shadow_mesh->shadow_owners.insert(mesh);
+ }
+
+ mesh->dependency.changed_notify(DEPENDENCY_CHANGED_MESH);
+}
+
void RendererStorageRD::mesh_clear(RID p_mesh) {
Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND(!mesh);
@@ -2871,6 +2910,12 @@ void RendererStorageRD::mesh_clear(RID p_mesh) {
}
mesh->has_bone_weights = false;
mesh->dependency.changed_notify(DEPENDENCY_CHANGED_MESH);
+
+ for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) {
+ Mesh *shadow_owner = E->get();
+ shadow_owner->shadow_mesh = RID();
+ shadow_owner->dependency.changed_notify(DEPENDENCY_CHANGED_MESH);
+ }
}
bool RendererStorageRD::mesh_needs_instance(RID p_mesh, bool p_has_skeleton) {
@@ -3013,7 +3058,7 @@ void RendererStorageRD::update_mesh_instances() {
MeshInstance *mi = dirty_mesh_instance_weights.first()->self();
if (mi->blend_weights_buffer.is_valid()) {
- RD::get_singleton()->buffer_update(mi->blend_weights_buffer, 0, mi->blend_weights.size() * sizeof(float), mi->blend_weights.ptr(), true);
+ RD::get_singleton()->buffer_update(mi->blend_weights_buffer, 0, mi->blend_weights.size() * sizeof(float), mi->blend_weights.ptr());
}
dirty_mesh_instance_weights.remove(&mi->weight_update_list);
mi->weights_dirty = false;
@@ -3067,7 +3112,7 @@ void RendererStorageRD::update_mesh_instances() {
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(SkeletonShader::PushConstant));
//dispatch without barrier, so all is done at the same time
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, push_constant.vertex_count, 1, 1, 64, 1, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, push_constant.vertex_count, 1, 1);
}
mi->dirty = false;
@@ -3267,11 +3312,14 @@ void RendererStorageRD::_mesh_surface_generate_version_for_input_mask(Mesh::Surf
////////////////// MULTIMESH
-RID RendererStorageRD::multimesh_create() {
- return multimesh_owner.make_rid(MultiMesh());
+RID RendererStorageRD::multimesh_allocate() {
+ return multimesh_owner.allocate_rid();
+}
+void RendererStorageRD::multimesh_initialize(RID p_rid) {
+ multimesh_owner.initialize_rid(p_rid, MultiMesh());
}
-void RendererStorageRD::multimesh_allocate(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors, bool p_use_custom_data) {
+void RendererStorageRD::multimesh_allocate_data(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors, bool p_use_custom_data) {
MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh);
ERR_FAIL_COND(!multimesh);
@@ -3681,7 +3729,7 @@ void RendererStorageRD::multimesh_set_buffer(RID p_multimesh, const Vector<float
{
const float *r = p_buffer.ptr();
- RD::get_singleton()->buffer_update(multimesh->buffer, 0, p_buffer.size() * sizeof(float), r, false);
+ RD::get_singleton()->buffer_update(multimesh->buffer, 0, p_buffer.size() * sizeof(float), r);
multimesh->buffer_set = true;
}
@@ -3780,14 +3828,14 @@ void RendererStorageRD::_update_dirty_multimeshes() {
if (multimesh->data_cache_used_dirty_regions > 32 || multimesh->data_cache_used_dirty_regions > visible_region_count / 2) {
//if there too many dirty regions, or represent the majority of regions, just copy all, else transfer cost piles up too much
- RD::get_singleton()->buffer_update(multimesh->buffer, 0, MIN(visible_region_count * region_size, multimesh->instances * multimesh->stride_cache * sizeof(float)), data, false);
+ RD::get_singleton()->buffer_update(multimesh->buffer, 0, MIN(visible_region_count * region_size, multimesh->instances * multimesh->stride_cache * sizeof(float)), data);
} else {
//not that many regions? update them all
for (uint32_t i = 0; i < visible_region_count; i++) {
if (multimesh->data_cache_dirty_regions[i]) {
uint64_t offset = i * region_size;
uint64_t size = multimesh->stride_cache * multimesh->instances * sizeof(float);
- RD::get_singleton()->buffer_update(multimesh->buffer, offset, MIN(region_size, size - offset), &data[i * region_size], false);
+ RD::get_singleton()->buffer_update(multimesh->buffer, offset, MIN(region_size, size - offset), &data[i * region_size]);
}
}
}
@@ -3818,8 +3866,11 @@ void RendererStorageRD::_update_dirty_multimeshes() {
/* PARTICLES */
-RID RendererStorageRD::particles_create() {
- return particles_owner.make_rid(Particles());
+RID RendererStorageRD::particles_allocate() {
+ return particles_owner.allocate_rid();
+}
+void RendererStorageRD::particles_initialize(RID p_rid) {
+ particles_owner.initialize_rid(p_rid, Particles());
}
void RendererStorageRD::particles_set_emitting(RID p_particles, bool p_emitting) {
@@ -4478,7 +4529,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, float p_delta
if (sub_emitter && sub_emitter->emission_storage_buffer.is_valid()) {
// print_line("updating subemitter buffer");
int32_t zero[4] = { 0, sub_emitter->amount, 0, 0 };
- RD::get_singleton()->buffer_update(sub_emitter->emission_storage_buffer, 0, sizeof(uint32_t) * 4, zero, true);
+ RD::get_singleton()->buffer_update(sub_emitter->emission_storage_buffer, 0, sizeof(uint32_t) * 4, zero);
push_constant.can_emit = true;
if (sub_emitter->emitting) {
@@ -4496,13 +4547,13 @@ void RendererStorageRD::_particles_process(Particles *p_particles, float p_delta
}
if (p_particles->emission_buffer && p_particles->emission_buffer->particle_count) {
- RD::get_singleton()->buffer_update(p_particles->emission_storage_buffer, 0, sizeof(uint32_t) * 4 + sizeof(ParticleEmissionBuffer::Data) * p_particles->emission_buffer->particle_count, p_particles->emission_buffer, true);
+ RD::get_singleton()->buffer_update(p_particles->emission_storage_buffer, 0, sizeof(uint32_t) * 4 + sizeof(ParticleEmissionBuffer::Data) * p_particles->emission_buffer->particle_count, p_particles->emission_buffer);
p_particles->emission_buffer->particle_count = 0;
}
p_particles->clear = false;
- RD::get_singleton()->buffer_update(p_particles->frame_params_buffer, 0, sizeof(ParticlesFrameParams), &frame_params, true);
+ RD::get_singleton()->buffer_update(p_particles->frame_params_buffer, 0, sizeof(ParticlesFrameParams), &frame_params);
ParticlesMaterialData *m = (ParticlesMaterialData *)material_get_data(p_particles->process_material, SHADER_TYPE_PARTICLES);
if (!m) {
@@ -4524,7 +4575,7 @@ void RendererStorageRD::_particles_process(Particles *p_particles, float p_delta
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(ParticlesShader::PushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_particles->amount, 1, 1, 64, 1, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, p_particles->amount, 1, 1);
RD::get_singleton()->compute_list_end();
}
@@ -4578,7 +4629,7 @@ void RendererStorageRD::particles_set_view_axis(RID p_particles, const Vector3 &
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, particles->particles_sort_uniform_set, 1);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy_push_constant, sizeof(ParticlesShader::CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, particles->amount, 1, 1, 64, 1, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, particles->amount, 1, 1);
RD::get_singleton()->compute_list_end();
@@ -4590,7 +4641,7 @@ void RendererStorageRD::particles_set_view_axis(RID p_particles, const Vector3 &
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, particles->particles_sort_uniform_set, 1);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy_push_constant, sizeof(ParticlesShader::CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, particles->amount, 1, 1, 64, 1, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, particles->amount, 1, 1);
RD::get_singleton()->compute_list_end();
}
@@ -4697,7 +4748,7 @@ void RendererStorageRD::update_particles() {
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, particles->particles_copy_uniform_set, 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &copy_push_constant, sizeof(ParticlesShader::CopyPushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, particles->amount, 1, 1, 64, 1, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, particles->amount, 1, 1);
RD::get_singleton()->compute_list_end();
}
@@ -4953,8 +5004,11 @@ RendererStorageRD::MaterialData *RendererStorageRD::_create_particles_material_f
/* PARTICLES COLLISION API */
-RID RendererStorageRD::particles_collision_create() {
- return particles_collision_owner.make_rid(ParticlesCollision());
+RID RendererStorageRD::particles_collision_allocate() {
+ return particles_collision_owner.allocate_rid();
+}
+void RendererStorageRD::particles_collision_initialize(RID p_rid) {
+ particles_collision_owner.initialize_rid(p_rid, ParticlesCollision());
}
RID RendererStorageRD::particles_collision_get_heightfield_framebuffer(RID p_particles_collision) const {
@@ -5133,8 +5187,11 @@ void RendererStorageRD::particles_collision_instance_set_active(RID p_collision_
/* SKELETON API */
-RID RendererStorageRD::skeleton_create() {
- return skeleton_owner.make_rid(Skeleton());
+RID RendererStorageRD::skeleton_allocate() {
+ return skeleton_owner.allocate_rid();
+}
+void RendererStorageRD::skeleton_initialize(RID p_rid) {
+ skeleton_owner.initialize_rid(p_rid, Skeleton());
}
void RendererStorageRD::_skeleton_make_dirty(Skeleton *skeleton) {
@@ -5145,7 +5202,7 @@ void RendererStorageRD::_skeleton_make_dirty(Skeleton *skeleton) {
}
}
-void RendererStorageRD::skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton) {
+void RendererStorageRD::skeleton_allocate_data(RID p_skeleton, int p_bones, bool p_2d_skeleton) {
Skeleton *skeleton = skeleton_owner.getornull(p_skeleton);
ERR_FAIL_COND(!skeleton);
ERR_FAIL_COND(p_bones < 0);
@@ -5301,7 +5358,7 @@ void RendererStorageRD::_update_dirty_skeletons() {
Skeleton *skeleton = skeleton_dirty_list;
if (skeleton->size) {
- RD::get_singleton()->buffer_update(skeleton->buffer, 0, skeleton->data.size() * sizeof(float), skeleton->data.ptr(), false);
+ RD::get_singleton()->buffer_update(skeleton->buffer, 0, skeleton->data.size() * sizeof(float), skeleton->data.ptr());
}
skeleton_dirty_list = skeleton->dirty_list;
@@ -5319,7 +5376,7 @@ void RendererStorageRD::_update_dirty_skeletons() {
/* LIGHT */
-RID RendererStorageRD::light_create(RS::LightType p_type) {
+void RendererStorageRD::_light_initialize(RID p_light, RS::LightType p_type) {
Light light;
light.type = p_type;
@@ -5340,10 +5397,31 @@ RID RendererStorageRD::light_create(RS::LightType p_type) {
light.param[RS::LIGHT_PARAM_SHADOW_BIAS] = 0.02;
light.param[RS::LIGHT_PARAM_SHADOW_BLUR] = 0;
light.param[RS::LIGHT_PARAM_SHADOW_PANCAKE_SIZE] = 20.0;
- light.param[RS::LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE] = 1.0;
+ light.param[RS::LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE] = 0.1;
light.param[RS::LIGHT_PARAM_TRANSMITTANCE_BIAS] = 0.05;
- return light_owner.make_rid(light);
+ light_owner.initialize_rid(p_light, light);
+}
+
+RID RendererStorageRD::directional_light_allocate() {
+ return light_owner.allocate_rid();
+}
+void RendererStorageRD::directional_light_initialize(RID p_light) {
+ _light_initialize(p_light, RS::LIGHT_DIRECTIONAL);
+}
+
+RID RendererStorageRD::omni_light_allocate() {
+ return light_owner.allocate_rid();
+}
+void RendererStorageRD::omni_light_initialize(RID p_light) {
+ _light_initialize(p_light, RS::LIGHT_OMNI);
+}
+
+RID RendererStorageRD::spot_light_allocate() {
+ return light_owner.allocate_rid();
+}
+void RendererStorageRD::spot_light_initialize(RID p_light) {
+ _light_initialize(p_light, RS::LIGHT_SPOT);
}
void RendererStorageRD::light_set_color(RID p_light, const Color &p_color) {
@@ -5581,8 +5659,11 @@ AABB RendererStorageRD::light_get_aabb(RID p_light) const {
/* REFLECTION PROBE */
-RID RendererStorageRD::reflection_probe_create() {
- return reflection_probe_owner.make_rid(ReflectionProbe());
+RID RendererStorageRD::reflection_probe_allocate() {
+ return reflection_probe_owner.allocate_rid();
+}
+void RendererStorageRD::reflection_probe_initialize(RID p_reflection_probe) {
+ reflection_probe_owner.initialize_rid(p_reflection_probe, ReflectionProbe());
}
void RendererStorageRD::reflection_probe_set_update_mode(RID p_probe, RS::ReflectionProbeUpdateMode p_mode) {
@@ -5804,8 +5885,11 @@ float RendererStorageRD::reflection_probe_get_ambient_color_energy(RID p_probe)
return reflection_probe->ambient_color_energy;
}
-RID RendererStorageRD::decal_create() {
- return decal_owner.make_rid(Decal());
+RID RendererStorageRD::decal_allocate() {
+ return decal_owner.allocate_rid();
+}
+void RendererStorageRD::decal_initialize(RID p_decal) {
+ decal_owner.initialize_rid(p_decal, Decal());
}
void RendererStorageRD::decal_set_extents(RID p_decal, const Vector3 &p_extents) {
@@ -5892,11 +5976,14 @@ AABB RendererStorageRD::decal_get_aabb(RID p_decal) const {
return AABB(-decal->extents, decal->extents * 2.0);
}
-RID RendererStorageRD::gi_probe_create() {
- return gi_probe_owner.make_rid(GIProbe());
+RID RendererStorageRD::gi_probe_allocate() {
+ return gi_probe_owner.allocate_rid();
+}
+void RendererStorageRD::gi_probe_initialize(RID p_gi_probe) {
+ gi_probe_owner.initialize_rid(p_gi_probe, GIProbe());
}
-void RendererStorageRD::gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) {
+void RendererStorageRD::gi_probe_allocate_data(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) {
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
ERR_FAIL_COND(!gi_probe);
@@ -6245,8 +6332,12 @@ RID RendererStorageRD::gi_probe_get_sdf_texture(RID p_gi_probe) {
/* LIGHTMAP API */
-RID RendererStorageRD::lightmap_create() {
- return lightmap_owner.make_rid(Lightmap());
+RID RendererStorageRD::lightmap_allocate() {
+ return lightmap_owner.allocate_rid();
+}
+
+void RendererStorageRD::lightmap_initialize(RID p_lightmap) {
+ lightmap_owner.initialize_rid(p_lightmap, Lightmap());
}
void RendererStorageRD::lightmap_set_textures(RID p_lightmap, RID p_light, bool p_uses_spherical_haromics) {
@@ -6449,7 +6540,8 @@ void RendererStorageRD::_clear_render_target(RenderTarget *rt) {
void RendererStorageRD::_update_render_target(RenderTarget *rt) {
if (rt->texture.is_null()) {
//create a placeholder until updated
- rt->texture = texture_2d_placeholder_create();
+ rt->texture = texture_allocate();
+ texture_2d_placeholder_initialize(rt->texture);
Texture *tex = texture_owner.getornull(rt->texture);
tex->is_render_target = true;
}
@@ -6949,7 +7041,7 @@ void RendererStorageRD::render_target_sdf_process(RID p_render_target) {
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rt->sdf_buffer_process_uniform_sets[1], 0); //fill [0]
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(RenderTargetSDF::PushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, push_constant.size[0], push_constant.size[1], 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, push_constant.size[0], push_constant.size[1], 1);
/* Process */
@@ -6965,7 +7057,7 @@ void RendererStorageRD::render_target_sdf_process(RID p_render_target) {
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rt->sdf_buffer_process_uniform_sets[swap ? 1 : 0], 0);
push_constant.stride = stride;
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(RenderTargetSDF::PushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, push_constant.size[0], push_constant.size[1], 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, push_constant.size[0], push_constant.size[1], 1);
stride /= 2;
swap = !swap;
RD::get_singleton()->compute_list_add_barrier(compute_list);
@@ -6976,7 +7068,7 @@ void RendererStorageRD::render_target_sdf_process(RID p_render_target) {
RD::get_singleton()->compute_list_bind_compute_pipeline(compute_list, rt_sdf.pipelines[shrink ? RenderTargetSDF::SHADER_STORE_SHRINK : RenderTargetSDF::SHADER_STORE]);
RD::get_singleton()->compute_list_bind_uniform_set(compute_list, rt->sdf_buffer_process_uniform_sets[swap ? 1 : 0], 0);
RD::get_singleton()->compute_list_set_push_constant(compute_list, &push_constant, sizeof(RenderTargetSDF::PushConstant));
- RD::get_singleton()->compute_list_dispatch_threads(compute_list, push_constant.size[0], push_constant.size[1], 1, 8, 8, 1);
+ RD::get_singleton()->compute_list_dispatch_threads(compute_list, push_constant.size[0], push_constant.size[1], 1);
RD::get_singleton()->compute_list_end();
}
@@ -7340,7 +7432,7 @@ void RendererStorageRD::_update_decal_atlas() {
tformat.shareable_formats.push_back(RD::DATA_FORMAT_R8G8B8A8_SRGB);
decal_atlas.texture = RD::get_singleton()->texture_create(tformat, RD::TextureView());
- RD::get_singleton()->texture_clear(decal_atlas.texture, Color(0, 0, 0, 0), 0, decal_atlas.mipmaps, 0, 1, true);
+ RD::get_singleton()->texture_clear(decal_atlas.texture, Color(0, 0, 0, 0), 0, decal_atlas.mipmaps, 0, 1);
{
//create the framebuffer
@@ -7395,7 +7487,7 @@ void RendererStorageRD::_update_decal_atlas() {
prev_texture = mm.texture;
}
} else {
- RD::get_singleton()->texture_clear(mm.texture, clear_color, 0, 1, 0, 1, false);
+ RD::get_singleton()->texture_clear(mm.texture, clear_color, 0, 1, 0, 1);
}
}
}
@@ -8161,29 +8253,38 @@ bool RendererStorageRD::free(RID p_rid) {
material_owner.free(p_rid);
} else if (mesh_owner.owns(p_rid)) {
mesh_clear(p_rid);
+ mesh_set_shadow_mesh(p_rid, RID());
Mesh *mesh = mesh_owner.getornull(p_rid);
mesh->dependency.deleted_notify(p_rid);
if (mesh->instances.size()) {
ERR_PRINT("deleting mesh with active instances");
}
+ if (mesh->shadow_owners.size()) {
+ for (Set<Mesh *>::Element *E = mesh->shadow_owners.front(); E; E = E->next()) {
+ Mesh *shadow_owner = E->get();
+ shadow_owner->shadow_mesh = RID();
+ shadow_owner->dependency.changed_notify(DEPENDENCY_CHANGED_MESH);
+ }
+ }
mesh_owner.free(p_rid);
} else if (mesh_instance_owner.owns(p_rid)) {
MeshInstance *mi = mesh_instance_owner.getornull(p_rid);
_mesh_instance_clear(mi);
mi->mesh->instances.erase(mi->I);
mi->I = nullptr;
+
mesh_instance_owner.free(p_rid);
memdelete(mi);
} else if (multimesh_owner.owns(p_rid)) {
_update_dirty_multimeshes();
- multimesh_allocate(p_rid, 0, RS::MULTIMESH_TRANSFORM_2D);
+ multimesh_allocate_data(p_rid, 0, RS::MULTIMESH_TRANSFORM_2D);
MultiMesh *multimesh = multimesh_owner.getornull(p_rid);
multimesh->dependency.deleted_notify(p_rid);
multimesh_owner.free(p_rid);
} else if (skeleton_owner.owns(p_rid)) {
_update_dirty_skeletons();
- skeleton_allocate(p_rid, 0);
+ skeleton_allocate_data(p_rid, 0);
Skeleton *skeleton = skeleton_owner.getornull(p_rid);
skeleton->dependency.deleted_notify(p_rid);
skeleton_owner.free(p_rid);
@@ -8201,7 +8302,7 @@ bool RendererStorageRD::free(RID p_rid) {
decal->dependency.deleted_notify(p_rid);
decal_owner.free(p_rid);
} else if (gi_probe_owner.owns(p_rid)) {
- gi_probe_allocate(p_rid, Transform(), AABB(), Vector3i(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<int>()); //deallocate
+ gi_probe_allocate_data(p_rid, Transform(), AABB(), Vector3i(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<uint8_t>(), Vector<int>()); //deallocate
GIProbe *gi_probe = gi_probe_owner.getornull(p_rid);
gi_probe->dependency.deleted_notify(p_rid);
gi_probe_owner.free(p_rid);
@@ -8257,11 +8358,11 @@ EffectsRD *RendererStorageRD::get_effects() {
}
void RendererStorageRD::capture_timestamps_begin() {
- RD::get_singleton()->capture_timestamp("Frame Begin", false);
+ RD::get_singleton()->capture_timestamp("Frame Begin");
}
void RendererStorageRD::capture_timestamp(const String &p_name) {
- RD::get_singleton()->capture_timestamp(p_name, true);
+ RD::get_singleton()->capture_timestamp(p_name);
}
uint32_t RendererStorageRD::get_captured_timestamps_count() const {
@@ -8295,7 +8396,7 @@ RendererStorageRD::RendererStorageRD() {
static_assert(sizeof(GlobalVariables::Value) == 16);
- global_variables.buffer_size = GLOBAL_GET("rendering/high_end/global_shader_variables_buffer_size");
+ global_variables.buffer_size = GLOBAL_GET("rendering/limits/global_shader_variables/buffer_size");
global_variables.buffer_size = MAX(4096, global_variables.buffer_size);
global_variables.buffer_values = memnew_arr(GlobalVariables::Value, global_variables.buffer_size);
zeromem(global_variables.buffer_values, sizeof(GlobalVariables::Value) * global_variables.buffer_size);
@@ -8563,14 +8664,14 @@ RendererStorageRD::RendererStorageRD() {
sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.use_anisotropy = true;
- sampler_state.anisotropy_max = 1 << int(GLOBAL_GET("rendering/quality/texture_filters/anisotropic_filtering_level"));
+ sampler_state.anisotropy_max = 1 << int(GLOBAL_GET("rendering/textures/default_filters/anisotropic_filtering_level"));
} break;
case RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: {
sampler_state.mag_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.min_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.mip_filter = RD::SAMPLER_FILTER_LINEAR;
sampler_state.use_anisotropy = true;
- sampler_state.anisotropy_max = 1 << int(GLOBAL_GET("rendering/quality/texture_filters/anisotropic_filtering_level"));
+ sampler_state.anisotropy_max = 1 << int(GLOBAL_GET("rendering/textures/default_filters/anisotropic_filtering_level"));
} break;
default: {
@@ -8740,7 +8841,7 @@ RendererStorageRD::RendererStorageRD() {
}
}
- lightmap_probe_capture_update_speed = GLOBAL_GET("rendering/lightmapper/probe_capture_update_speed");
+ lightmap_probe_capture_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed");
/* Particles */
@@ -8807,9 +8908,11 @@ RendererStorageRD::RendererStorageRD() {
{
// default material and shader for particles shader
- particles_shader.default_shader = shader_create();
+ particles_shader.default_shader = shader_allocate();
+ shader_initialize(particles_shader.default_shader);
shader_set_code(particles_shader.default_shader, "shader_type particles; void compute() { COLOR = vec4(1.0); } \n");
- particles_shader.default_material = material_create();
+ particles_shader.default_material = material_allocate();
+ material_initialize(particles_shader.default_material);
material_set_shader(particles_shader.default_material, particles_shader.default_shader);
ParticlesMaterialData *md = (ParticlesMaterialData *)material_get_data(particles_shader.default_material, RendererStorageRD::SHADER_TYPE_PARTICLES);
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.h b/servers/rendering/renderer_rd/renderer_storage_rd.h
index 2fb66ac573..68256dc155 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.h
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.h
@@ -221,7 +221,7 @@ private:
~CanvasTexture();
};
- RID_PtrOwner<CanvasTexture> canvas_texture_owner;
+ RID_PtrOwner<CanvasTexture, true> canvas_texture_owner;
/* TEXTURE API */
struct Texture {
@@ -367,7 +367,7 @@ private:
};
ShaderDataRequestFunction shader_data_request_func[SHADER_TYPE_MAX];
- mutable RID_Owner<Shader> shader_owner;
+ mutable RID_Owner<Shader, true> shader_owner;
/* Material */
@@ -389,7 +389,7 @@ private:
};
MaterialDataRequestFunction material_data_request_func[SHADER_TYPE_MAX];
- mutable RID_Owner<Material> material_owner;
+ mutable RID_Owner<Material, true> material_owner;
Material *material_update_list;
void _material_queue_update(Material *material, bool p_uniform, bool p_texture);
@@ -478,10 +478,13 @@ private:
List<MeshInstance *> instances;
+ RID shadow_mesh;
+ Set<Mesh *> shadow_owners;
+
Dependency dependency;
};
- mutable RID_Owner<Mesh> mesh_owner;
+ mutable RID_Owner<Mesh, true> mesh_owner;
struct MeshInstance {
Mesh *mesh;
@@ -584,7 +587,7 @@ private:
Dependency dependency;
};
- mutable RID_Owner<MultiMesh> multimesh_owner;
+ mutable RID_Owner<MultiMesh, true> multimesh_owner;
MultiMesh *multimesh_dirty_list = nullptr;
@@ -890,7 +893,7 @@ private:
void update_particles();
- mutable RID_Owner<Particles> particles_owner;
+ mutable RID_Owner<Particles, true> particles_owner;
/* Particles Collision */
@@ -912,7 +915,7 @@ private:
Dependency dependency;
};
- mutable RID_Owner<ParticlesCollision> particles_collision_owner;
+ mutable RID_Owner<ParticlesCollision, true> particles_collision_owner;
struct ParticlesCollisionInstance {
RID collision;
@@ -942,7 +945,7 @@ private:
Dependency dependency;
};
- mutable RID_Owner<Skeleton> skeleton_owner;
+ mutable RID_Owner<Skeleton, true> skeleton_owner;
_FORCE_INLINE_ void _skeleton_make_dirty(Skeleton *skeleton);
@@ -974,7 +977,7 @@ private:
Dependency dependency;
};
- mutable RID_Owner<Light> light_owner;
+ mutable RID_Owner<Light, true> light_owner;
/* REFLECTION PROBE */
@@ -997,7 +1000,7 @@ private:
Dependency dependency;
};
- mutable RID_Owner<ReflectionProbe> reflection_probe_owner;
+ mutable RID_Owner<ReflectionProbe, true> reflection_probe_owner;
/* DECAL */
@@ -1018,7 +1021,7 @@ private:
Dependency dependency;
};
- mutable RID_Owner<Decal> decal_owner;
+ mutable RID_Owner<Decal, true> decal_owner;
/* GI PROBE */
@@ -1061,7 +1064,7 @@ private:
RID giprobe_sdf_shader_version_shader;
RID giprobe_sdf_shader_pipeline;
- mutable RID_Owner<GIProbe> gi_probe_owner;
+ mutable RID_Owner<GIProbe, true> gi_probe_owner;
/* REFLECTION PROBE */
@@ -1092,7 +1095,7 @@ private:
uint64_t lightmap_array_version = 0;
- mutable RID_Owner<Lightmap> lightmap_owner;
+ mutable RID_Owner<Lightmap, true> lightmap_owner;
float lightmap_probe_capture_update_speed = 4;
@@ -1246,12 +1249,16 @@ private:
EffectsRD effects;
public:
+ virtual bool can_create_resources_async() const;
+
/* TEXTURE API */
- virtual RID texture_2d_create(const Ref<Image> &p_image);
- virtual RID texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type);
- virtual RID texture_3d_create(Image::Format p_format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data); //all slices, then all the mipmaps, must be coherent
- virtual RID texture_proxy_create(RID p_base);
+ virtual RID texture_allocate();
+
+ virtual void texture_2d_initialize(RID p_texture, const Ref<Image> &p_image);
+ virtual void texture_2d_layered_initialize(RID p_texture, const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type);
+ virtual void texture_3d_initialize(RID p_texture, Image::Format p_format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data); //all slices, then all the mipmaps, must be coherent
+ virtual void texture_proxy_initialize(RID p_texture, RID p_base);
virtual void _texture_2d_update(RID p_texture, const Ref<Image> &p_image, int p_layer, bool p_immediate);
@@ -1261,9 +1268,9 @@ public:
virtual void texture_proxy_update(RID p_texture, RID p_proxy_to);
//these two APIs can be used together or in combination with the others.
- virtual RID texture_2d_placeholder_create();
- virtual RID texture_2d_layered_placeholder_create(RenderingServer::TextureLayeredType p_layered_type);
- virtual RID texture_3d_placeholder_create();
+ virtual void texture_2d_placeholder_initialize(RID p_texture);
+ virtual void texture_2d_layered_placeholder_initialize(RID p_texture, RenderingServer::TextureLayeredType p_layered_type);
+ virtual void texture_3d_placeholder_initialize(RID p_texture);
virtual Ref<Image> texture_2d_get(RID p_texture) const;
virtual Ref<Image> texture_2d_layer_get(RID p_texture, int p_layer) const;
@@ -1335,7 +1342,8 @@ public:
/* CANVAS TEXTURE API */
- virtual RID canvas_texture_create();
+ RID canvas_texture_allocate();
+ void canvas_texture_initialize(RID p_canvas_texture);
virtual void canvas_texture_set_channel(RID p_canvas_texture, RS::CanvasTextureChannel p_channel, RID p_texture);
virtual void canvas_texture_set_shading_parameters(RID p_canvas_texture, const Color &p_specular_color, float p_shininess);
@@ -1347,7 +1355,8 @@ public:
/* SHADER API */
- RID shader_create();
+ RID shader_allocate();
+ void shader_initialize(RID p_shader);
void shader_set_code(RID p_shader, const String &p_code);
String shader_get_code(RID p_shader) const;
@@ -1362,7 +1371,8 @@ public:
/* COMMON MATERIAL API */
- RID material_create();
+ RID material_allocate();
+ void material_initialize(RID p_material);
void material_set_shader(RID p_material, RID p_shader);
@@ -1398,7 +1408,8 @@ public:
/* MESH API */
- virtual RID mesh_create();
+ RID mesh_allocate();
+ void mesh_initialize(RID p_mesh);
virtual void mesh_set_blend_shape_count(RID p_mesh, int p_blend_shape_count);
@@ -1423,6 +1434,7 @@ public:
virtual AABB mesh_get_custom_aabb(RID p_mesh) const;
virtual AABB mesh_get_aabb(RID p_mesh, RID p_skeleton = RID());
+ virtual void mesh_set_shadow_mesh(RID p_mesh, RID p_shadow_mesh);
virtual void mesh_clear(RID p_mesh);
@@ -1461,6 +1473,13 @@ public:
return mesh->surfaces[p_surface_index];
}
+ _FORCE_INLINE_ RID mesh_get_shadow_mesh(RID p_mesh) {
+ Mesh *mesh = mesh_owner.getornull(p_mesh);
+ ERR_FAIL_COND_V(!mesh, RID());
+
+ return mesh->shadow_mesh;
+ }
+
_FORCE_INLINE_ RS::PrimitiveType mesh_surface_get_primitive(void *p_surface) {
Mesh::Surface *surface = reinterpret_cast<Mesh::Surface *>(p_surface);
return surface->primitive;
@@ -1471,13 +1490,7 @@ public:
return s->lod_count > 0;
}
- _FORCE_INLINE_ RID mesh_surface_get_index_array(void *p_surface) const {
- Mesh::Surface *s = reinterpret_cast<Mesh::Surface *>(p_surface);
-
- return s->index_array;
- }
-
- _FORCE_INLINE_ RID mesh_surface_get_index_array_with_lod(void *p_surface, float p_model_scale, float p_distance_threshold, float p_lod_threshold) const {
+ _FORCE_INLINE_ uint32_t mesh_surface_get_lod(void *p_surface, float p_model_scale, float p_distance_threshold, float p_lod_threshold) const {
Mesh::Surface *s = reinterpret_cast<Mesh::Surface *>(p_surface);
int32_t current_lod = -1;
@@ -1489,9 +1502,19 @@ public:
current_lod = i;
}
if (current_lod == -1) {
+ return 0;
+ } else {
+ return current_lod + 1;
+ }
+ }
+
+ _FORCE_INLINE_ RID mesh_surface_get_index_array(void *p_surface, uint32_t p_lod) const {
+ Mesh::Surface *s = reinterpret_cast<Mesh::Surface *>(p_surface);
+
+ if (p_lod == 0) {
return s->index_array;
} else {
- return s->lods[current_lod].index_array;
+ return s->lods[p_lod - 1].index_array;
}
}
@@ -1607,9 +1630,10 @@ public:
/* MULTIMESH API */
- RID multimesh_create();
+ RID multimesh_allocate();
+ void multimesh_initialize(RID p_multimesh);
- void multimesh_allocate(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false);
+ void multimesh_allocate_data(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false);
int multimesh_get_instance_count(RID p_multimesh) const;
void multimesh_set_mesh(RID p_multimesh, RID p_mesh);
@@ -1673,24 +1697,28 @@ public:
/* IMMEDIATE API */
- RID immediate_create() { return RID(); }
- void immediate_begin(RID p_immediate, RS::PrimitiveType p_rimitive, RID p_texture = RID()) {}
- void immediate_vertex(RID p_immediate, const Vector3 &p_vertex) {}
- void immediate_normal(RID p_immediate, const Vector3 &p_normal) {}
- void immediate_tangent(RID p_immediate, const Plane &p_tangent) {}
- void immediate_color(RID p_immediate, const Color &p_color) {}
- void immediate_uv(RID p_immediate, const Vector2 &tex_uv) {}
- void immediate_uv2(RID p_immediate, const Vector2 &tex_uv) {}
- void immediate_end(RID p_immediate) {}
- void immediate_clear(RID p_immediate) {}
- void immediate_set_material(RID p_immediate, RID p_material) {}
- RID immediate_get_material(RID p_immediate) const { return RID(); }
- AABB immediate_get_aabb(RID p_immediate) const { return AABB(); }
+ RID immediate_allocate() { return RID(); }
+ void immediate_initialize(RID p_immediate) {}
+
+ virtual void immediate_begin(RID p_immediate, RS::PrimitiveType p_rimitive, RID p_texture = RID()) {}
+ virtual void immediate_vertex(RID p_immediate, const Vector3 &p_vertex) {}
+ virtual void immediate_normal(RID p_immediate, const Vector3 &p_normal) {}
+ virtual void immediate_tangent(RID p_immediate, const Plane &p_tangent) {}
+ virtual void immediate_color(RID p_immediate, const Color &p_color) {}
+ virtual void immediate_uv(RID p_immediate, const Vector2 &tex_uv) {}
+ virtual void immediate_uv2(RID p_immediate, const Vector2 &tex_uv) {}
+ virtual void immediate_end(RID p_immediate) {}
+ virtual void immediate_clear(RID p_immediate) {}
+ virtual void immediate_set_material(RID p_immediate, RID p_material) {}
+ virtual RID immediate_get_material(RID p_immediate) const { return RID(); }
+ virtual AABB immediate_get_aabb(RID p_immediate) const { return AABB(); }
/* SKELETON API */
- RID skeleton_create();
- void skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton = false);
+ RID skeleton_allocate();
+ void skeleton_initialize(RID p_skeleton);
+
+ void skeleton_allocate_data(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;
@@ -1724,11 +1752,16 @@ public:
}
/* Light API */
- RID light_create(RS::LightType p_type);
+ void _light_initialize(RID p_rid, RS::LightType p_type);
+
+ RID directional_light_allocate();
+ void directional_light_initialize(RID p_light);
+
+ RID omni_light_allocate();
+ void omni_light_initialize(RID p_light);
- RID directional_light_create() { return light_create(RS::LIGHT_DIRECTIONAL); }
- RID omni_light_create() { return light_create(RS::LIGHT_OMNI); }
- RID spot_light_create() { return light_create(RS::LIGHT_SPOT); }
+ RID spot_light_allocate();
+ void spot_light_initialize(RID p_light);
void light_set_color(RID p_light, const Color &p_color);
void light_set_param(RID p_light, RS::LightParam p_param, float p_value);
@@ -1831,7 +1864,8 @@ public:
/* PROBE API */
- RID reflection_probe_create();
+ RID reflection_probe_allocate();
+ void reflection_probe_initialize(RID p_reflection_probe);
void reflection_probe_set_update_mode(RID p_probe, RS::ReflectionProbeUpdateMode p_mode);
void reflection_probe_set_intensity(RID p_probe, float p_intensity);
@@ -1871,7 +1905,9 @@ public:
/* DECAL API */
- virtual RID decal_create();
+ RID decal_allocate();
+ void decal_initialize(RID p_decal);
+
virtual void decal_set_extents(RID p_decal, const Vector3 &p_extents);
virtual void decal_set_texture(RID p_decal, RS::DecalTexture p_type, RID p_texture);
virtual void decal_set_emission_energy(RID p_decal, float p_energy);
@@ -1946,9 +1982,10 @@ public:
/* GI PROBE API */
- RID gi_probe_create();
+ RID gi_probe_allocate();
+ void gi_probe_initialize(RID p_gi_probe);
- void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts);
+ void gi_probe_allocate_data(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts);
AABB gi_probe_get_bounds(RID p_gi_probe) const;
Vector3i gi_probe_get_octree_size(RID p_gi_probe) const;
@@ -1999,7 +2036,8 @@ public:
/* LIGHTMAP CAPTURE */
- virtual RID lightmap_create();
+ RID lightmap_allocate();
+ void lightmap_initialize(RID p_lightmap);
virtual void lightmap_set_textures(RID p_lightmap, RID p_light, bool p_uses_spherical_haromics);
virtual void lightmap_set_probe_bounds(RID p_lightmap, const AABB &p_bounds);
@@ -2048,7 +2086,8 @@ public:
/* PARTICLES */
- RID particles_create();
+ RID particles_allocate();
+ void particles_initialize(RID p_particles_collision);
void particles_set_emitting(RID p_particles, bool p_emitting);
void particles_set_amount(RID p_particles, int p_amount);
@@ -2126,7 +2165,9 @@ public:
/* PARTICLES COLLISION */
- virtual RID particles_collision_create();
+ RID particles_collision_allocate();
+ void particles_collision_initialize(RID p_particles_collision);
+
virtual void particles_collision_set_collision_type(RID p_particles_collision, RS::ParticlesCollisionType p_type);
virtual void particles_collision_set_cull_mask(RID p_particles_collision, uint32_t p_cull_mask);
virtual void particles_collision_set_sphere_radius(RID p_particles_collision, float p_radius); //for spheres
diff --git a/servers/rendering/renderer_rd/shader_compiler_rd.cpp b/servers/rendering/renderer_rd/shader_compiler_rd.cpp
index e77141b26c..8135d388e1 100644
--- a/servers/rendering/renderer_rd/shader_compiler_rd.cpp
+++ b/servers/rendering/renderer_rd/shader_compiler_rd.cpp
@@ -687,7 +687,15 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
uint32_t index = p_default_actions.base_varying_index;
+ List<Pair<StringName, SL::ShaderNode::Varying>> var_frag_to_light;
+
for (Map<StringName, SL::ShaderNode::Varying>::Element *E = pnode->varyings.front(); E; E = E->next()) {
+ if (E->get().stage == SL::ShaderNode::Varying::STAGE_FRAGMENT_TO_LIGHT || E->get().stage == SL::ShaderNode::Varying::STAGE_FRAGMENT) {
+ var_frag_to_light.push_back(Pair<StringName, SL::ShaderNode::Varying>(E->key(), E->get()));
+ fragment_varyings.insert(E->key());
+ continue;
+ }
+
String vcode;
String interp_mode = _interpstr(E->get().interpolation);
vcode += _prestr(E->get().precision);
@@ -705,6 +713,21 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
index++;
}
+ if (var_frag_to_light.size() > 0) {
+ String gcode = "\n\nstruct {\n";
+ for (List<Pair<StringName, SL::ShaderNode::Varying>>::Element *E = var_frag_to_light.front(); E; E = E->next()) {
+ gcode += "\t" + _prestr(E->get().second.precision) + _typestr(E->get().second.type) + " " + _mkid(E->get().first);
+ if (E->get().second.array_size > 0) {
+ gcode += "[";
+ gcode += itos(E->get().second.array_size);
+ gcode += "]";
+ }
+ gcode += ";\n";
+ }
+ gcode += "} frag_to_light;\n";
+ r_gen_code.fragment_global += gcode;
+ }
+
for (int i = 0; i < pnode->vconstants.size(); i++) {
const SL::ShaderNode::Constant &cnode = pnode->vconstants[i];
String gcode;
@@ -833,6 +856,19 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
} break;
case SL::Node::TYPE_VARIABLE: {
SL::VariableNode *vnode = (SL::VariableNode *)p_node;
+ bool use_fragment_varying = false;
+
+ if (current_func_name != vertex_name) {
+ if (p_assigning) {
+ if (shader->varyings.has(vnode->name)) {
+ use_fragment_varying = true;
+ }
+ } else {
+ if (fragment_varyings.has(vnode->name)) {
+ use_fragment_varying = true;
+ }
+ }
+ }
if (p_assigning && p_actions.write_flag_pointers.has(vnode->name)) {
*p_actions.write_flag_pointers[vnode->name] = true;
@@ -877,7 +913,10 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
}
} else {
- code = _mkid(vnode->name); //its something else (local var most likely) use as is
+ if (use_fragment_varying) {
+ code = "frag_to_light.";
+ }
+ code += _mkid(vnode->name); //its something else (local var most likely) use as is
}
}
@@ -962,6 +1001,23 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
} break;
case SL::Node::TYPE_ARRAY: {
SL::ArrayNode *anode = (SL::ArrayNode *)p_node;
+ bool use_fragment_varying = false;
+
+ if (current_func_name != vertex_name) {
+ if (anode->assign_expression != nullptr) {
+ use_fragment_varying = true;
+ } else {
+ if (p_assigning) {
+ if (shader->varyings.has(anode->name)) {
+ use_fragment_varying = true;
+ }
+ } else {
+ if (fragment_varyings.has(anode->name)) {
+ use_fragment_varying = true;
+ }
+ }
+ }
+ }
if (p_assigning && p_actions.write_flag_pointers.has(anode->name)) {
*p_actions.write_flag_pointers[anode->name] = true;
@@ -984,7 +1040,10 @@ String ShaderCompilerRD::_dump_node_code(const SL::Node *p_node, int p_level, Ge
if (p_default_actions.renames.has(anode->name)) {
code = p_default_actions.renames[anode->name];
} else {
- code = _mkid(anode->name);
+ if (use_fragment_varying) {
+ code = "frag_to_light.";
+ }
+ code += _mkid(anode->name);
}
if (anode->call_expression != nullptr) {
@@ -1277,6 +1336,7 @@ Error ShaderCompilerRD::compile(RS::ShaderMode p_mode, const String &p_code, Ide
used_name_defines.clear();
used_rmode_defines.clear();
used_flag_pointers.clear();
+ fragment_varyings.clear();
shader = parser.get_shader();
function = nullptr;
@@ -1408,7 +1468,7 @@ ShaderCompilerRD::ShaderCompilerRD() {
actions[RS::SHADER_SPATIAL].render_mode_defines["cull_front"] = "#define DO_SIDE_CHECK\n";
actions[RS::SHADER_SPATIAL].render_mode_defines["cull_disabled"] = "#define DO_SIDE_CHECK\n";
- bool force_lambert = GLOBAL_GET("rendering/quality/shading/force_lambert_over_burley");
+ bool force_lambert = GLOBAL_GET("rendering/shading/overrides/force_lambert_over_burley");
if (!force_lambert) {
actions[RS::SHADER_SPATIAL].render_mode_defines["diffuse_burley"] = "#define DIFFUSE_BURLEY\n";
@@ -1418,7 +1478,7 @@ ShaderCompilerRD::ShaderCompilerRD() {
actions[RS::SHADER_SPATIAL].render_mode_defines["diffuse_lambert_wrap"] = "#define DIFFUSE_LAMBERT_WRAP\n";
actions[RS::SHADER_SPATIAL].render_mode_defines["diffuse_toon"] = "#define DIFFUSE_TOON\n";
- bool force_blinn = GLOBAL_GET("rendering/quality/shading/force_blinn_over_ggx");
+ bool force_blinn = GLOBAL_GET("rendering/shading/overrides/force_blinn_over_ggx");
if (!force_blinn) {
actions[RS::SHADER_SPATIAL].render_mode_defines["specular_schlick_ggx"] = "#define SPECULAR_SCHLICK_GGX\n";
diff --git a/servers/rendering/renderer_rd/shader_compiler_rd.h b/servers/rendering/renderer_rd/shader_compiler_rd.h
index d127d8e01c..6575829e73 100644
--- a/servers/rendering/renderer_rd/shader_compiler_rd.h
+++ b/servers/rendering/renderer_rd/shader_compiler_rd.h
@@ -114,6 +114,7 @@ private:
Set<StringName> used_flag_pointers;
Set<StringName> used_rmode_defines;
Set<StringName> internal_functions;
+ Set<StringName> fragment_varyings;
DefaultIdentifierActions actions;
diff --git a/servers/rendering/renderer_rd/shader_rd.cpp b/servers/rendering/renderer_rd/shader_rd.cpp
index 2ae22a8a38..e4a39ff813 100644
--- a/servers/rendering/renderer_rd/shader_rd.cpp
+++ b/servers/rendering/renderer_rd/shader_rd.cpp
@@ -301,6 +301,7 @@ void ShaderRD::_compile_variant(uint32_t p_variant, Version *p_version) {
builder.append(compute_codev.get_data()); // version info (if exists)
builder.append("\n"); //make sure defines begin at newline
+ builder.append(base_compute_defines.get_data());
builder.append(general_defines.get_data());
builder.append(variant_defines[p_variant].get_data());
@@ -401,7 +402,6 @@ RS::ShaderNativeSourceCode ShaderRD::version_get_native_source_code(RID p_versio
builder.append(fragment_codev.get_data()); // version info (if exists)
builder.append("\n"); //make sure defines begin at newline
-
builder.append(general_defines.get_data());
builder.append(variant_defines[i].get_data());
for (int j = 0; j < version->custom_defines.size(); j++) {
@@ -440,6 +440,7 @@ RS::ShaderNativeSourceCode ShaderRD::version_get_native_source_code(RID p_versio
builder.append(compute_codev.get_data()); // version info (if exists)
builder.append("\n"); //make sure defines begin at newline
+ builder.append(base_compute_defines.get_data());
builder.append(general_defines.get_data());
builder.append(variant_defines[i].get_data());
@@ -596,6 +597,22 @@ bool ShaderRD::is_variant_enabled(int p_variant) const {
return variants_enabled[p_variant];
}
+ShaderRD::ShaderRD() {
+ // Do not feel forced to use this, in most cases it makes little to no difference.
+ bool use_32_threads = false;
+ if (RD::get_singleton()->get_device_vendor_name() == "NVIDIA") {
+ use_32_threads = true;
+ }
+ String base_compute_define_text;
+ if (use_32_threads) {
+ base_compute_define_text = "\n#define NATIVE_LOCAL_GROUP_SIZE 32\n#define NATIVE_LOCAL_SIZE_2D_X 8\n#define NATIVE_LOCAL_SIZE_2D_Y 4\n";
+ } else {
+ base_compute_define_text = "\n#define NATIVE_LOCAL_GROUP_SIZE 64\n#define NATIVE_LOCAL_SIZE_2D_X 8\n#define NATIVE_LOCAL_SIZE_2D_Y 8\n";
+ }
+
+ base_compute_defines = base_compute_define_text.ascii();
+}
+
void ShaderRD::initialize(const Vector<String> &p_variant_defines, const String &p_general_defines) {
ERR_FAIL_COND(variant_defines.size());
ERR_FAIL_COND(p_variant_defines.size() == 0);
diff --git a/servers/rendering/renderer_rd/shader_rd.h b/servers/rendering/renderer_rd/shader_rd.h
index a3474c6f93..e0f4dcf2d0 100644
--- a/servers/rendering/renderer_rd/shader_rd.h
+++ b/servers/rendering/renderer_rd/shader_rd.h
@@ -99,8 +99,10 @@ class ShaderRD {
const char *name;
+ CharString base_compute_defines;
+
protected:
- ShaderRD() {}
+ ShaderRD();
void setup(const char *p_vertex_code, const char *p_fragment_code, const char *p_compute_code, const char *p_name);
public:
diff --git a/servers/rendering/renderer_rd/shaders/SCsub b/servers/rendering/renderer_rd/shaders/SCsub
index 1b0197c1c1..c192574ff2 100644
--- a/servers/rendering/renderer_rd/shaders/SCsub
+++ b/servers/rendering/renderer_rd/shaders/SCsub
@@ -39,7 +39,6 @@ if "RD_GLSL" in env["BUILDERS"]:
env.RD_GLSL("sdfgi_debug.glsl")
env.RD_GLSL("sdfgi_debug_probes.glsl")
env.RD_GLSL("volumetric_fog.glsl")
- env.RD_GLSL("shadow_reduce.glsl")
env.RD_GLSL("particles.glsl")
env.RD_GLSL("particles_copy.glsl")
env.RD_GLSL("sort.glsl")
diff --git a/servers/rendering/renderer_rd/shaders/cube_to_dp.glsl b/servers/rendering/renderer_rd/shaders/cube_to_dp.glsl
index 54d67db6c6..c3ac0bee57 100644
--- a/servers/rendering/renderer_rd/shaders/cube_to_dp.glsl
+++ b/servers/rendering/renderer_rd/shaders/cube_to_dp.glsl
@@ -1,33 +1,48 @@
-#[compute]
+#[vertex]
#version 450
VERSION_DEFINES
-layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
+layout(push_constant, binding = 1, std430) uniform Params {
+ float z_far;
+ float z_near;
+ bool z_flip;
+ uint pad;
+ vec4 screen_rect;
+}
+params;
+
+layout(location = 0) out vec2 uv_interp;
+
+void main() {
+ vec2 base_arr[4] = vec2[](vec2(0.0, 0.0), vec2(0.0, 1.0), vec2(1.0, 1.0), vec2(1.0, 0.0));
+ uv_interp = base_arr[gl_VertexIndex];
+ vec2 screen_pos = uv_interp * params.screen_rect.zw + params.screen_rect.xy;
+ gl_Position = vec4(screen_pos * 2.0 - 1.0, 0.0, 1.0);
+}
+
+#[fragment]
+
+#version 450
+
+VERSION_DEFINES
+
+layout(location = 0) in vec2 uv_interp;
layout(set = 0, binding = 0) uniform samplerCube source_cube;
layout(push_constant, binding = 1, std430) uniform Params {
- ivec2 screen_size;
- ivec2 offset;
- float bias;
float z_far;
float z_near;
bool z_flip;
+ uint pad;
+ vec4 screen_rect;
}
params;
-layout(r32f, set = 1, binding = 0) uniform restrict writeonly image2D depth_buffer;
-
void main() {
- ivec2 pos = ivec2(gl_GlobalInvocationID.xy);
- if (any(greaterThan(pos, params.screen_size))) { //too large, do nothing
- return;
- }
-
- vec2 pixel_size = 1.0 / vec2(params.screen_size);
- vec2 uv = (vec2(pos) + 0.5) * pixel_size;
+ vec2 uv = uv_interp;
vec3 normal = vec3(uv * 2.0 - 1.0, 0.0);
@@ -65,5 +80,5 @@ void main() {
float linear_depth = 2.0 * params.z_near * params.z_far / (params.z_far + params.z_near - depth * (params.z_far - params.z_near));
depth = (linear_depth * depth_fix) / params.z_far;
- imageStore(depth_buffer, pos + params.offset, vec4(depth));
+ gl_FragDepth = depth;
}
diff --git a/servers/rendering/renderer_rd/shaders/gi.glsl b/servers/rendering/renderer_rd/shaders/gi.glsl
index c2965f9874..92a5682572 100644
--- a/servers/rendering/renderer_rd/shaders/gi.glsl
+++ b/servers/rendering/renderer_rd/shaders/gi.glsl
@@ -97,13 +97,12 @@ layout(push_constant, binding = 0, std430) uniform Params {
vec4 proj_info;
+ vec3 ao_color;
uint max_giprobes;
+
bool high_quality_vct;
- uint pad2;
bool orthogonal;
-
- vec3 ao_color;
- uint pad;
+ uint pad[2];
mat3x4 cam_rotation;
}
@@ -364,57 +363,62 @@ void sdfgi_process(vec3 vertex, vec3 normal, vec3 reflection, float roughness, o
ray_pos += (ray_dir * 1.0 / max(abs_ray_dir.x, max(abs_ray_dir.y, abs_ray_dir.z)) + cam_normal * 1.4) * bias / sdfgi.cascades[cascade].to_cell;
}
float softness = 0.2 + min(1.0, roughness * 5.0) * 4.0; //approximation to roughness so it does not seem like a hard fade
- while (length(ray_pos) < max_distance) {
- for (uint i = 0; i < sdfgi.max_cascades; i++) {
- if (i >= cascade && length(ray_pos) < radius_sizes[i]) {
- cascade = max(i, cascade); //never go down
-
- vec3 pos = ray_pos - sdfgi.cascades[i].position;
- pos *= sdfgi.cascades[i].to_cell * pos_to_uvw;
-
- float distance = texture(sampler3D(sdf_cascades[i], linear_sampler), pos).r * 255.0 - 1.1;
-
- vec4 hit_light = vec4(0.0);
- if (distance < softness) {
- hit_light.rgb = texture(sampler3D(light_cascades[i], linear_sampler), pos).rgb;
- hit_light.rgb *= 0.5; //approximation given value read is actually meant for anisotropy
- hit_light.a = clamp(1.0 - (distance / softness), 0.0, 1.0);
- hit_light.rgb *= hit_light.a;
- }
+ uint i = 0;
+ bool found = false;
+ while (true) {
+ if (length(ray_pos) >= max_distance || light_accum.a > 0.99) {
+ break;
+ }
+ if (!found && i >= cascade && length(ray_pos) < radius_sizes[i]) {
+ uint next_i = min(i + 1, sdfgi.max_cascades - 1);
+ cascade = max(i, cascade); //never go down
- distance /= sdfgi.cascades[i].to_cell;
+ vec3 pos = ray_pos - sdfgi.cascades[i].position;
+ pos *= sdfgi.cascades[i].to_cell * pos_to_uvw;
- if (i < (sdfgi.max_cascades - 1)) {
- pos = ray_pos - sdfgi.cascades[i + 1].position;
- pos *= sdfgi.cascades[i + 1].to_cell * pos_to_uvw;
+ float fdistance = textureLod(sampler3D(sdf_cascades[i], linear_sampler), pos, 0.0).r * 255.0 - 1.1;
- float distance2 = texture(sampler3D(sdf_cascades[i + 1], linear_sampler), pos).r * 255.0 - 1.1;
+ vec4 hit_light = vec4(0.0);
+ if (fdistance < softness) {
+ hit_light.rgb = textureLod(sampler3D(light_cascades[i], linear_sampler), pos, 0.0).rgb;
+ hit_light.rgb *= 0.5; //approximation given value read is actually meant for anisotropy
+ hit_light.a = clamp(1.0 - (fdistance / softness), 0.0, 1.0);
+ hit_light.rgb *= hit_light.a;
+ }
- vec4 hit_light2 = vec4(0.0);
- if (distance2 < softness) {
- hit_light2.rgb = texture(sampler3D(light_cascades[i + 1], linear_sampler), pos).rgb;
- hit_light2.rgb *= 0.5; //approximation given value read is actually meant for anisotropy
- hit_light2.a = clamp(1.0 - (distance2 / softness), 0.0, 1.0);
- hit_light2.rgb *= hit_light2.a;
- }
+ fdistance /= sdfgi.cascades[i].to_cell;
- float prev_radius = i == 0 ? 0.0 : radius_sizes[i - 1];
- float blend = clamp((length(ray_pos) - prev_radius) / (radius_sizes[i] - prev_radius), 0.0, 1.0);
+ if (i < (sdfgi.max_cascades - 1)) {
+ pos = ray_pos - sdfgi.cascades[next_i].position;
+ pos *= sdfgi.cascades[next_i].to_cell * pos_to_uvw;
- distance2 /= sdfgi.cascades[i + 1].to_cell;
+ float fdistance2 = textureLod(sampler3D(sdf_cascades[next_i], linear_sampler), pos, 0.0).r * 255.0 - 1.1;
- hit_light = mix(hit_light, hit_light2, blend);
- distance = mix(distance, distance2, blend);
+ vec4 hit_light2 = vec4(0.0);
+ if (fdistance2 < softness) {
+ hit_light2.rgb = textureLod(sampler3D(light_cascades[next_i], linear_sampler), pos, 0.0).rgb;
+ hit_light2.rgb *= 0.5; //approximation given value read is actually meant for anisotropy
+ hit_light2.a = clamp(1.0 - (fdistance2 / softness), 0.0, 1.0);
+ hit_light2.rgb *= hit_light2.a;
}
- light_accum += hit_light;
- ray_pos += ray_dir * distance;
- break;
+ float prev_radius = i == 0 ? 0.0 : radius_sizes[max(0, i - 1)];
+ float blend = clamp((length(ray_pos) - prev_radius) / (radius_sizes[i] - prev_radius), 0.0, 1.0);
+
+ fdistance2 /= sdfgi.cascades[next_i].to_cell;
+
+ hit_light = mix(hit_light, hit_light2, blend);
+ fdistance = mix(fdistance, fdistance2, blend);
}
- }
- if (light_accum.a > 0.99) {
- break;
+ light_accum += hit_light;
+ ray_pos += ray_dir * fdistance;
+ found = true;
+ }
+ i++;
+ if (i == sdfgi.max_cascades) {
+ i = 0;
+ found = false;
}
}
@@ -594,28 +598,16 @@ vec4 fetch_normal_and_roughness(ivec2 pos) {
return normal_roughness;
}
-void main() {
- // Pixel being shaded
- ivec2 pos = ivec2(gl_GlobalInvocationID.xy);
- if (any(greaterThanEqual(pos, params.screen_size))) { //too large, do nothing
- return;
- }
-
- vec3 vertex = reconstruct_position(pos);
- vertex.y = -vertex.y;
-
+void process_gi(ivec2 pos, vec3 vertex, inout vec4 ambient_light, inout vec4 reflection_light) {
vec4 normal_roughness = fetch_normal_and_roughness(pos);
- vec3 normal = normal_roughness.xyz;
- vec4 ambient_light = vec4(0.0), reflection_light = vec4(0.0);
+ vec3 normal = normal_roughness.xyz;
if (normal.length() > 0.5) {
//valid normal, can do GI
float roughness = normal_roughness.w;
-
vertex = mat3(params.cam_rotation) * vertex;
normal = normalize(mat3(params.cam_rotation) * normal);
-
vec3 reflection = normalize(reflect(normalize(vertex), normal));
#ifdef USE_SDFGI
@@ -646,16 +638,39 @@ void main() {
spec_accum /= blend_accum;
}
- if (params.use_sdfgi) {
- reflection_light = blend_color(spec_accum, reflection_light);
- ambient_light = blend_color(amb_accum, ambient_light);
- } else {
- reflection_light = spec_accum;
- ambient_light = amb_accum;
- }
+#ifdef USE_SDFGI
+ reflection_light = blend_color(spec_accum, reflection_light);
+ ambient_light = blend_color(amb_accum, ambient_light);
+#else
+ reflection_light = spec_accum;
+ ambient_light = amb_accum;
+#endif
}
#endif
}
+}
+
+void main() {
+ ivec2 pos = ivec2(gl_GlobalInvocationID.xy);
+
+#ifdef MODE_HALF_RES
+ pos <<= 1;
+#endif
+ if (any(greaterThanEqual(pos, params.screen_size))) { //too large, do nothing
+ return;
+ }
+
+ vec4 ambient_light = vec4(0.0);
+ vec4 reflection_light = vec4(0.0);
+
+ vec3 vertex = reconstruct_position(pos);
+ vertex.y = -vertex.y;
+
+ process_gi(pos, vertex, ambient_light, reflection_light);
+
+#ifdef MODE_HALF_RES
+ pos >>= 1;
+#endif
imageStore(ambient_buffer, pos, ambient_light);
imageStore(reflection_buffer, pos, reflection_light);
diff --git a/servers/rendering/renderer_rd/shaders/giprobe.glsl b/servers/rendering/renderer_rd/shaders/giprobe.glsl
index 4f4753d147..b931461b31 100644
--- a/servers/rendering/renderer_rd/shaders/giprobe.glsl
+++ b/servers/rendering/renderer_rd/shaders/giprobe.glsl
@@ -51,10 +51,10 @@ struct Light {
float attenuation;
vec3 color;
- float spot_angle_radians;
+ float cos_spot_angle;
vec3 position;
- float spot_attenuation;
+ float inv_spot_attenuation;
vec3 direction;
bool has_shadow;
@@ -233,13 +233,15 @@ bool compute_light_vector(uint light, vec3 pos, out float attenuation, out vec3
if (lights.data[light].type == LIGHT_TYPE_SPOT) {
vec3 rel = normalize(pos - light_pos);
- float angle = acos(dot(rel, lights.data[light].direction));
- if (angle > lights.data[light].spot_angle_radians) {
+ float cos_spot_angle = lights.data[light].cos_spot_angle;
+ float cos_angle = dot(rel, lights.data[light].direction);
+ if (cos_angle < cos_spot_angle) {
return false;
}
- float d = clamp(angle / lights.data[light].spot_angle_radians, 0, 1);
- attenuation *= pow(1.0 - d, lights.data[light].spot_attenuation);
+ float scos = max(cos_angle, cos_spot_angle);
+ float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - cos_spot_angle));
+ attenuation *= 1.0 - pow(spot_rim, lights.data[light].inv_spot_attenuation);
}
}
diff --git a/servers/rendering/renderer_rd/shaders/giprobe_write.glsl b/servers/rendering/renderer_rd/shaders/giprobe_write.glsl
index 9c794f1bcc..56b3b7ccb4 100644
--- a/servers/rendering/renderer_rd/shaders/giprobe_write.glsl
+++ b/servers/rendering/renderer_rd/shaders/giprobe_write.glsl
@@ -43,10 +43,10 @@ struct Light {
float attenuation;
vec3 color;
- float spot_angle_radians;
+ float cos_spot_angle;
vec3 position;
- float spot_attenuation;
+ float inv_spot_attenuation;
vec3 direction;
bool has_shadow;
@@ -146,13 +146,15 @@ bool compute_light_vector(uint light, uint cell, vec3 pos, out float attenuation
if (lights.data[light].type == LIGHT_TYPE_SPOT) {
vec3 rel = normalize(pos - light_pos);
- float angle = acos(dot(rel, lights.data[light].direction));
- if (angle > lights.data[light].spot_angle_radians) {
+ float cos_spot_angle = lights.data[light].cos_spot_angle;
+ float cos_angle = dot(rel, lights.data[light].direction);
+ if (cos_angle < cos_spot_angle) {
return false;
}
- float d = clamp(angle / lights.data[light].spot_angle_radians, 0, 1);
- attenuation *= pow(1.0 - d, lights.data[light].spot_attenuation);
+ float scos = max(cos_angle, cos_spot_angle);
+ float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - cos_spot_angle));
+ attenuation *= 1.0 - pow(spot_rim, lights.data[light].inv_spot_attenuation);
}
}
diff --git a/servers/rendering/renderer_rd/shaders/resolve.glsl b/servers/rendering/renderer_rd/shaders/resolve.glsl
index 9429a66dc9..e83c4ca93b 100644
--- a/servers/rendering/renderer_rd/shaders/resolve.glsl
+++ b/servers/rendering/renderer_rd/shaders/resolve.glsl
@@ -58,6 +58,116 @@ void main() {
#else
+#if 1
+
+ vec4 group1;
+ vec4 group2;
+ vec4 group3;
+ vec4 group4;
+ int best_index = 0;
+
+ //2X
+ group1.x = texelFetch(source_depth, pos, 0).r;
+ group1.y = texelFetch(source_depth, pos, 1).r;
+
+ //4X
+ if (params.sample_count >= 4) {
+ group1.z = texelFetch(source_depth, pos, 2).r;
+ group1.w = texelFetch(source_depth, pos, 3).r;
+ }
+ //8X
+ if (params.sample_count >= 8) {
+ group2.x = texelFetch(source_depth, pos, 4).r;
+ group2.y = texelFetch(source_depth, pos, 5).r;
+ group2.z = texelFetch(source_depth, pos, 6).r;
+ group2.w = texelFetch(source_depth, pos, 7).r;
+ }
+ //16X
+ if (params.sample_count >= 16) {
+ group3.x = texelFetch(source_depth, pos, 8).r;
+ group3.y = texelFetch(source_depth, pos, 9).r;
+ group3.z = texelFetch(source_depth, pos, 10).r;
+ group3.w = texelFetch(source_depth, pos, 11).r;
+
+ group4.x = texelFetch(source_depth, pos, 12).r;
+ group4.y = texelFetch(source_depth, pos, 13).r;
+ group4.z = texelFetch(source_depth, pos, 14).r;
+ group4.w = texelFetch(source_depth, pos, 15).r;
+ }
+
+ if (params.sample_count == 2) {
+ best_index = (pos.x & 1) ^ ((pos.y >> 1) & 1); //not much can be done here
+ } else if (params.sample_count == 4) {
+ vec4 freq = vec4(equal(group1, vec4(group1.x)));
+ freq += vec4(equal(group1, vec4(group1.y)));
+ freq += vec4(equal(group1, vec4(group1.z)));
+ freq += vec4(equal(group1, vec4(group1.w)));
+
+ float min_f = freq.x;
+ best_index = 0;
+ if (freq.y < min_f) {
+ best_index = 1;
+ min_f = freq.y;
+ }
+ if (freq.z < min_f) {
+ best_index = 2;
+ min_f = freq.z;
+ }
+ if (freq.w < min_f) {
+ best_index = 3;
+ }
+ } else if (params.sample_count == 8) {
+ vec4 freq0 = vec4(equal(group1, vec4(group1.x)));
+ vec4 freq1 = vec4(equal(group2, vec4(group1.x)));
+ freq0 += vec4(equal(group1, vec4(group1.y)));
+ freq1 += vec4(equal(group2, vec4(group1.y)));
+ freq0 += vec4(equal(group1, vec4(group1.z)));
+ freq1 += vec4(equal(group2, vec4(group1.z)));
+ freq0 += vec4(equal(group1, vec4(group1.w)));
+ freq1 += vec4(equal(group2, vec4(group1.w)));
+ freq0 += vec4(equal(group1, vec4(group2.x)));
+ freq1 += vec4(equal(group2, vec4(group2.x)));
+ freq0 += vec4(equal(group1, vec4(group2.y)));
+ freq1 += vec4(equal(group2, vec4(group2.y)));
+ freq0 += vec4(equal(group1, vec4(group2.z)));
+ freq1 += vec4(equal(group2, vec4(group2.z)));
+ freq0 += vec4(equal(group1, vec4(group2.w)));
+ freq1 += vec4(equal(group2, vec4(group2.w)));
+
+ float min_f0 = freq0.x;
+ int best_index0 = 0;
+ if (freq0.y < min_f0) {
+ best_index0 = 1;
+ min_f0 = freq0.y;
+ }
+ if (freq0.z < min_f0) {
+ best_index0 = 2;
+ min_f0 = freq0.z;
+ }
+ if (freq0.w < min_f0) {
+ best_index0 = 3;
+ min_f0 = freq0.w;
+ }
+
+ float min_f1 = freq1.x;
+ int best_index1 = 4;
+ if (freq1.y < min_f1) {
+ best_index1 = 5;
+ min_f1 = freq1.y;
+ }
+ if (freq1.z < min_f1) {
+ best_index1 = 6;
+ min_f1 = freq1.z;
+ }
+ if (freq1.w < min_f1) {
+ best_index1 = 7;
+ min_f1 = freq1.w;
+ }
+
+ best_index = mix(best_index0, best_index1, min_f0 < min_f1);
+ }
+
+#else
float depths[16];
int depth_indices[16];
int depth_amount[16];
@@ -91,7 +201,7 @@ void main() {
depth_least = depth_amount[j];
}
}
-
+#endif
best_depth = texelFetch(source_depth, pos, best_index).r;
best_normal_roughness = texelFetch(source_normal_roughness, pos, best_index);
#ifdef GIPROBE_RESOLVE
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward.glsl b/servers/rendering/renderer_rd/shaders/scene_forward.glsl
index 8d08fae348..1cea9bf8db 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward.glsl
@@ -89,12 +89,6 @@ MATERIAL_UNIFORMS
} material;
#endif
-/* clang-format off */
-
-VERTEX_SHADER_GLOBALS
-
-/* clang-format on */
-
invariant gl_Position;
#ifdef MODE_DUAL_PARABOLOID
@@ -103,28 +97,43 @@ layout(location = 8) out float dp_clip;
#endif
+layout(location = 9) out flat uint instance_index;
+
+/* clang-format off */
+
+VERTEX_SHADER_GLOBALS
+
+/* clang-format on */
+
void main() {
vec4 instance_custom = vec4(0.0);
#if defined(COLOR_USED)
color_interp = color_attrib;
#endif
- mat4 world_matrix = draw_call.transform;
+ instance_index = draw_call.instance_index;
+
+ bool is_multimesh = bool(instances.data[instance_index].flags & INSTANCE_FLAGS_MULTIMESH);
+ if (!is_multimesh) {
+ instance_index += gl_InstanceIndex;
+ }
+
+ mat4 world_matrix = instances.data[instance_index].transform;
mat3 world_normal_matrix;
- if (bool(draw_call.flags & INSTANCE_FLAGS_NON_UNIFORM_SCALE)) {
+ if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_NON_UNIFORM_SCALE)) {
world_normal_matrix = inverse(mat3(world_matrix));
} else {
world_normal_matrix = mat3(world_matrix);
}
- if (bool(draw_call.flags & INSTANCE_FLAGS_MULTIMESH)) {
+ if (is_multimesh) {
//multimesh, instances are for it
- uint offset = (draw_call.flags >> INSTANCE_FLAGS_MULTIMESH_STRIDE_SHIFT) & INSTANCE_FLAGS_MULTIMESH_STRIDE_MASK;
+ uint offset = (instances.data[instance_index].flags >> INSTANCE_FLAGS_MULTIMESH_STRIDE_SHIFT) & INSTANCE_FLAGS_MULTIMESH_STRIDE_MASK;
offset *= gl_InstanceIndex;
mat4 matrix;
- if (bool(draw_call.flags & INSTANCE_FLAGS_MULTIMESH_FORMAT_2D)) {
+ if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_MULTIMESH_FORMAT_2D)) {
matrix = mat4(transforms.data[offset + 0], transforms.data[offset + 1], vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
offset += 2;
} else {
@@ -132,14 +141,14 @@ void main() {
offset += 3;
}
- if (bool(draw_call.flags & INSTANCE_FLAGS_MULTIMESH_HAS_COLOR)) {
+ if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_MULTIMESH_HAS_COLOR)) {
#ifdef COLOR_USED
color_interp *= transforms.data[offset];
#endif
offset += 1;
}
- if (bool(draw_call.flags & INSTANCE_FLAGS_MULTIMESH_HAS_CUSTOM_DATA)) {
+ if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_MULTIMESH_HAS_CUSTOM_DATA)) {
instance_custom = transforms.data[offset];
}
@@ -161,7 +170,7 @@ void main() {
#endif
#if 0
- if (bool(draw_call.flags & INSTANCE_FLAGS_SKELETON)) {
+ if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_SKELETON)) {
//multimesh, instances are for it
uvec2 bones_01 = uvec2(bone_attrib.x & 0xFFFF, bone_attrib.x >> 16) * 3;
@@ -194,7 +203,7 @@ void main() {
uv2_interp = uv2_attrib;
#endif
-#ifdef USE_OVERRIDE_POSITION
+#ifdef OVERRIDE_POSITION
vec4 position;
#endif
@@ -289,7 +298,7 @@ VERTEX_SHADER_CODE
#endif //MODE_RENDER_DEPTH
-#ifdef USE_OVERRIDE_POSITION
+#ifdef OVERRIDE_POSITION
gl_Position = position;
#else
gl_Position = projection_matrix * vec4(vertex_interp, 1.0);
@@ -304,7 +313,8 @@ VERTEX_SHADER_CODE
#endif
#ifdef MODE_RENDER_MATERIAL
if (scene_data.material_uv2_mode) {
- gl_Position.xy = (uv2_attrib.xy + draw_call.lightmap_uv_scale.xy) * 2.0 - 1.0;
+ vec2 uv_offset = unpackHalf2x16(draw_call.uv_offset);
+ gl_Position.xy = (uv2_attrib.xy + uv_offset) * 2.0 - 1.0;
gl_Position.z = 0.00001;
gl_Position.w = 1.0;
}
@@ -350,9 +360,11 @@ layout(location = 8) in float dp_clip;
#endif
+layout(location = 9) in flat uint instance_index;
+
//defines to keep compatibility with vertex
-#define world_matrix draw_call.transform
+#define world_matrix instances.data[instance_index].transform
#define projection_matrix scene_data.projection_matrix
#if defined(ENABLE_SSS) && defined(ENABLE_TRANSMITTANCE)
@@ -1280,7 +1292,7 @@ float light_process_spot_shadow(uint idx, vec3 vertex, vec3 normal) {
} else {
#endif
//hard shadow
- vec4 shadow_uv = vec4(splane.xy * spot_lights.data[idx].atlas_rect.zw + spot_lights.data[idx].atlas_rect.xy, z_norm, 1.0);
+ vec4 shadow_uv = vec4(splane.xy * spot_lights.data[idx].atlas_rect.zw + spot_lights.data[idx].atlas_rect.xy, splane.z, 1.0);
shadow = sample_pcf_shadow(shadow_atlas, spot_lights.data[idx].soft_shadow_scale * scene_data.shadow_atlas_pixel_size, shadow_uv);
#ifdef USE_SOFT_SHADOWS
@@ -1768,7 +1780,7 @@ vec4 fog_process(vec3 vertex) {
}
}
- float fog_amount = 1.0 - exp(vertex.z * scene_data.fog_density);
+ float fog_amount = 1.0 - exp(min(0.0, vertex.z * scene_data.fog_density));
if (abs(scene_data.fog_height_density) > 0.001) {
float y = (scene_data.camera_matrix * vec4(vertex, 1.0)).y;
@@ -2081,7 +2093,7 @@ FRAGMENT_SHADER_CODE
#endif
uint decal_index = 32 * i + bit;
- if (!bool(decals.data[decal_index].mask & draw_call.layer_mask)) {
+ if (!bool(decals.data[decal_index].mask & instances.data[instance_index].layer_mask)) {
continue; //not masked
}
@@ -2208,8 +2220,8 @@ FRAGMENT_SHADER_CODE
#ifdef USE_LIGHTMAP
//lightmap
- if (bool(draw_call.flags & INSTANCE_FLAGS_USE_LIGHTMAP_CAPTURE)) { //has lightmap capture
- uint index = draw_call.gi_offset;
+ if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_USE_LIGHTMAP_CAPTURE)) { //has lightmap capture
+ uint index = instances.data[instance_index].gi_offset;
vec3 wnormal = mat3(scene_data.camera_matrix) * normal;
const float c1 = 0.429043;
@@ -2228,12 +2240,12 @@ FRAGMENT_SHADER_CODE
2.0 * c2 * lightmap_captures.data[index].sh[1].rgb * wnormal.y +
2.0 * c2 * lightmap_captures.data[index].sh[2].rgb * wnormal.z);
- } else if (bool(draw_call.flags & INSTANCE_FLAGS_USE_LIGHTMAP)) { // has actual lightmap
- bool uses_sh = bool(draw_call.flags & INSTANCE_FLAGS_USE_SH_LIGHTMAP);
- uint ofs = draw_call.gi_offset & 0xFFFF;
+ } else if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_USE_LIGHTMAP)) { // has actual lightmap
+ bool uses_sh = bool(instances.data[instance_index].flags & INSTANCE_FLAGS_USE_SH_LIGHTMAP);
+ uint ofs = instances.data[instance_index].gi_offset & 0xFFFF;
vec3 uvw;
- uvw.xy = uv2 * draw_call.lightmap_uv_scale.zw + draw_call.lightmap_uv_scale.xy;
- uvw.z = float((draw_call.gi_offset >> 16) & 0xFFFF);
+ uvw.xy = uv2 * instances.data[instance_index].lightmap_uv_scale.zw + instances.data[instance_index].lightmap_uv_scale.xy;
+ uvw.z = float((instances.data[instance_index].gi_offset >> 16) & 0xFFFF);
if (uses_sh) {
uvw.z *= 4.0; //SH textures use 4 times more data
@@ -2242,7 +2254,7 @@ FRAGMENT_SHADER_CODE
vec3 lm_light_l1_0 = textureLod(sampler2DArray(lightmap_textures[ofs], material_samplers[SAMPLER_LINEAR_CLAMP]), uvw + vec3(0.0, 0.0, 2.0), 0.0).rgb;
vec3 lm_light_l1p1 = textureLod(sampler2DArray(lightmap_textures[ofs], material_samplers[SAMPLER_LINEAR_CLAMP]), uvw + vec3(0.0, 0.0, 3.0), 0.0).rgb;
- uint idx = draw_call.gi_offset >> 20;
+ uint idx = instances.data[instance_index].gi_offset >> 20;
vec3 n = normalize(lightmaps.data[idx].normal_xform * normal);
ambient_light += lm_light_l0 * 0.282095f;
@@ -2262,7 +2274,7 @@ FRAGMENT_SHADER_CODE
}
#elif defined(USE_FORWARD_GI)
- if (bool(draw_call.flags & INSTANCE_FLAGS_USE_SDFGI)) { //has lightmap capture
+ if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_USE_SDFGI)) { //has lightmap capture
//make vertex orientation the world one, but still align to camera
vec3 cam_pos = mat3(scene_data.camera_matrix) * vertex;
@@ -2334,9 +2346,9 @@ FRAGMENT_SHADER_CODE
}
}
- if (bool(draw_call.flags & INSTANCE_FLAGS_USE_GIPROBE)) { // process giprobes
+ if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_USE_GIPROBE)) { // process giprobes
- uint index1 = draw_call.gi_offset & 0xFFFF;
+ uint index1 = instances.data[instance_index].gi_offset & 0xFFFF;
vec3 ref_vec = normalize(reflect(normalize(vertex), normal));
//find arbitrary tangent and bitangent, then build a matrix
vec3 v0 = abs(normal.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(0.0, 1.0, 0.0);
@@ -2348,7 +2360,7 @@ FRAGMENT_SHADER_CODE
vec4 spec_accum = vec4(0.0);
gi_probe_compute(index1, vertex, normal, ref_vec, normal_mat, roughness * roughness, ambient_light, specular_light, spec_accum, amb_accum);
- uint index2 = draw_call.gi_offset >> 16;
+ uint index2 = instances.data[instance_index].gi_offset >> 16;
if (index2 != 0xFFFF) {
gi_probe_compute(index2, vertex, normal, ref_vec, normal_mat, roughness * roughness, ambient_light, specular_light, spec_accum, amb_accum);
@@ -2367,19 +2379,19 @@ FRAGMENT_SHADER_CODE
}
#elif !defined(LOW_END_MODE)
- if (bool(draw_call.flags & INSTANCE_FLAGS_USE_GI_BUFFERS)) { //use GI buffers
+ if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_USE_GI_BUFFERS)) { //use GI buffers
- ivec2 coord;
+ vec2 coord;
if (scene_data.gi_upscale_for_msaa) {
- ivec2 base_coord = ivec2(gl_FragCoord.xy);
- ivec2 closest_coord = base_coord;
- float closest_ang = dot(normal, texelFetch(sampler2D(normal_roughness_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), base_coord, 0).xyz * 2.0 - 1.0);
+ vec2 base_coord = screen_uv;
+ vec2 closest_coord = base_coord;
+ float closest_ang = dot(normal, textureLod(sampler2D(normal_roughness_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), base_coord, 0.0).xyz * 2.0 - 1.0);
for (int i = 0; i < 4; i++) {
- const ivec2 neighbours[4] = ivec2[](ivec2(-1, 0), ivec2(1, 0), ivec2(0, -1), ivec2(0, 1));
- ivec2 neighbour_coord = base_coord + neighbours[i];
- float neighbour_ang = dot(normal, texelFetch(sampler2D(normal_roughness_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), neighbour_coord, 0).xyz * 2.0 - 1.0);
+ const vec2 neighbours[4] = vec2[](vec2(-1, 0), vec2(1, 0), vec2(0, -1), vec2(0, 1));
+ vec2 neighbour_coord = base_coord + neighbours[i] * scene_data.screen_pixel_size;
+ float neighbour_ang = dot(normal, textureLod(sampler2D(normal_roughness_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), neighbour_coord, 0.0).xyz * 2.0 - 1.0);
if (neighbour_ang > closest_ang) {
closest_ang = neighbour_ang;
closest_coord = neighbour_coord;
@@ -2389,11 +2401,11 @@ FRAGMENT_SHADER_CODE
coord = closest_coord;
} else {
- coord = ivec2(gl_FragCoord.xy);
+ coord = screen_uv;
}
- vec4 buffer_ambient = texelFetch(sampler2D(ambient_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), coord, 0);
- vec4 buffer_reflection = texelFetch(sampler2D(reflection_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), coord, 0);
+ vec4 buffer_ambient = textureLod(sampler2D(ambient_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), coord, 0.0);
+ vec4 buffer_reflection = textureLod(sampler2D(reflection_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), coord, 0.0);
ambient_light = mix(ambient_light, buffer_ambient.rgb, buffer_ambient.a);
specular_light = mix(specular_light, buffer_reflection.rgb, buffer_reflection.a);
@@ -2446,7 +2458,7 @@ FRAGMENT_SHADER_CODE
#endif
uint reflection_index = 32 * i + bit;
- if (!bool(reflections.data[reflection_index].mask & draw_call.layer_mask)) {
+ if (!bool(reflections.data[reflection_index].mask & instances.data[instance_index].layer_mask)) {
continue; //not masked
}
@@ -2517,7 +2529,7 @@ FRAGMENT_SHADER_CODE
break;
}
- if (!bool(directional_lights.data[i].mask & draw_call.layer_mask)) {
+ if (!bool(directional_lights.data[i].mask & instances.data[instance_index].layer_mask)) {
continue; //not masked
}
@@ -2836,7 +2848,7 @@ FRAGMENT_SHADER_CODE
break;
}
- if (!bool(directional_lights.data[i].mask & draw_call.layer_mask)) {
+ if (!bool(directional_lights.data[i].mask & instances.data[instance_index].layer_mask)) {
continue; //not masked
}
@@ -2966,7 +2978,7 @@ FRAGMENT_SHADER_CODE
#endif
uint light_index = 32 * i + bit;
- if (!bool(omni_lights.data[light_index].mask & draw_call.layer_mask)) {
+ if (!bool(omni_lights.data[light_index].mask & instances.data[instance_index].layer_mask)) {
continue; //not masked
}
@@ -3039,7 +3051,7 @@ FRAGMENT_SHADER_CODE
uint light_index = 32 * i + bit;
- if (!bool(spot_lights.data[light_index].mask & draw_call.layer_mask)) {
+ if (!bool(spot_lights.data[light_index].mask & instances.data[instance_index].layer_mask)) {
continue; //not masked
}
@@ -3212,9 +3224,9 @@ FRAGMENT_SHADER_CODE
normal_roughness_output_buffer = vec4(normal * 0.5 + 0.5, roughness);
#ifdef MODE_RENDER_GIPROBE
- if (bool(draw_call.flags & INSTANCE_FLAGS_USE_GIPROBE)) { // process giprobes
- uint index1 = draw_call.gi_offset & 0xFFFF;
- uint index2 = draw_call.gi_offset >> 16;
+ if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_USE_GIPROBE)) { // process giprobes
+ uint index1 = instances.data[instance_index].gi_offset & 0xFFFF;
+ uint index2 = instances.data[instance_index].gi_offset >> 16;
giprobe_buffer.x = index1 & 0xFF;
giprobe_buffer.y = index2 & 0xFF;
} else {
@@ -3273,6 +3285,7 @@ FRAGMENT_SHADER_CODE
// Draw "fixed" fog before volumetric fog to ensure volumetric fog can appear in front of the sky.
frag_color.rgb = mix(frag_color.rgb, fog.rgb, fog.a);
+ ;
#endif //MODE_MULTIPLE_RENDER_TARGETS
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_inc.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_inc.glsl
index a37e32e1fc..d78890fa9e 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_inc.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_inc.glsl
@@ -21,12 +21,10 @@
#endif
layout(push_constant, binding = 0, std430) uniform DrawCall {
- mat4 transform;
- uint flags;
- uint instance_uniforms_ofs; //base offset in global buffer for instance variables
- uint gi_offset; //GI information when using lightmapping (VCT or lightmap index)
- uint layer_mask;
- vec4 lightmap_uv_scale;
+ uint instance_index;
+ uint uv_offset;
+ uint pad0;
+ uint pad1;
}
draw_call;
@@ -45,96 +43,13 @@ draw_call;
#define SAMPLER_NEAREST_WITH_MIPMAPS_ANISOTROPIC_REPEAT 10
#define SAMPLER_LINEAR_WITH_MIPMAPS_ANISOTROPIC_REPEAT 11
-layout(set = 0, binding = 1) uniform sampler material_samplers[12];
-
-layout(set = 0, binding = 2) uniform sampler shadow_sampler;
-
#define SDFGI_MAX_CASCADES 8
-layout(set = 0, binding = 3, std140) uniform SceneData {
- mat4 projection_matrix;
- mat4 inv_projection_matrix;
-
- mat4 camera_matrix;
- mat4 inv_camera_matrix;
-
- vec2 viewport_size;
- vec2 screen_pixel_size;
-
- uint cluster_shift;
- uint cluster_width;
- uint cluster_type_size;
- uint max_cluster_element_count_div_32;
-
- //use vec4s because std140 doesnt play nice with vec2s, z and w are wasted
- vec4 directional_penumbra_shadow_kernel[32];
- vec4 directional_soft_shadow_kernel[32];
- vec4 penumbra_shadow_kernel[32];
- vec4 soft_shadow_kernel[32];
-
- uint directional_penumbra_shadow_samples;
- uint directional_soft_shadow_samples;
- uint penumbra_shadow_samples;
- uint soft_shadow_samples;
-
- vec4 ambient_light_color_energy;
+/* Set 1: Base Pass (never changes) */
- float ambient_color_sky_mix;
- bool use_ambient_light;
- bool use_ambient_cubemap;
- bool use_reflection_cubemap;
-
- mat3 radiance_inverse_xform;
-
- vec2 shadow_atlas_pixel_size;
- vec2 directional_shadow_pixel_size;
-
- uint directional_light_count;
- float dual_paraboloid_side;
- float z_far;
- float z_near;
-
- bool ssao_enabled;
- float ssao_light_affect;
- float ssao_ao_affect;
- bool roughness_limiter_enabled;
-
- float roughness_limiter_amount;
- float roughness_limiter_limit;
- uvec2 roughness_limiter_pad;
-
- vec4 ao_color;
-
- mat4 sdf_to_bounds;
-
- ivec3 sdf_offset;
- bool material_uv2_mode;
-
- ivec3 sdf_size;
- bool gi_upscale_for_msaa;
-
- bool volumetric_fog_enabled;
- float volumetric_fog_inv_length;
- float volumetric_fog_detail_spread;
- uint volumetric_fog_pad;
-
- bool fog_enabled;
- float fog_density;
- float fog_height;
- float fog_height_density;
-
- vec3 fog_light_color;
- float fog_sun_scatter;
-
- float fog_aerial_perspective;
-
- float time;
- float reflection_multiplier; // one normally, zero when rendering reflections
-
- bool pancake_shadows;
-}
+layout(set = 0, binding = 1) uniform sampler material_samplers[12];
-scene_data;
+layout(set = 0, binding = 2) uniform sampler shadow_sampler;
#define INSTANCE_FLAGS_USE_GI_BUFFERS (1 << 6)
#define INSTANCE_FLAGS_USE_SDFGI (1 << 7)
@@ -153,22 +68,22 @@ scene_data;
#define INSTANCE_FLAGS_SKELETON (1 << 19)
#define INSTANCE_FLAGS_NON_UNIFORM_SCALE (1 << 20)
-layout(set = 0, binding = 5, std430) restrict readonly buffer OmniLights {
+layout(set = 0, binding = 3, std430) restrict readonly buffer OmniLights {
LightData data[];
}
omni_lights;
-layout(set = 0, binding = 6, std430) restrict readonly buffer SpotLights {
+layout(set = 0, binding = 4, std430) restrict readonly buffer SpotLights {
LightData data[];
}
spot_lights;
-layout(set = 0, binding = 7) buffer restrict readonly ReflectionProbeData {
+layout(set = 0, binding = 5) buffer restrict readonly ReflectionProbeData {
ReflectionData data[];
}
reflections;
-layout(set = 0, binding = 8, std140) uniform DirectionalLights {
+layout(set = 0, binding = 6, std140) uniform DirectionalLights {
DirectionalLightData data[MAX_DIRECTIONAL_LIGHT_DATA_STRUCTS];
}
directional_lights;
@@ -180,7 +95,7 @@ struct Lightmap {
mat3 normal_xform;
};
-layout(set = 0, binding = 10, std140) restrict readonly buffer Lightmaps {
+layout(set = 0, binding = 7, std140) restrict readonly buffer Lightmaps {
Lightmap data[];
}
lightmaps;
@@ -189,22 +104,20 @@ struct LightmapCapture {
vec4 sh[9];
};
-layout(set = 0, binding = 11, std140) restrict readonly buffer LightmapCaptures {
+layout(set = 0, binding = 8, std140) restrict readonly buffer LightmapCaptures {
LightmapCapture data[];
}
lightmap_captures;
-layout(set = 0, binding = 12) uniform texture2D decal_atlas;
-layout(set = 0, binding = 13) uniform texture2D decal_atlas_srgb;
+layout(set = 0, binding = 9) uniform texture2D decal_atlas;
+layout(set = 0, binding = 10) uniform texture2D decal_atlas_srgb;
-layout(set = 0, binding = 14, std430) restrict readonly buffer Decals {
+layout(set = 0, binding = 11, std430) restrict readonly buffer Decals {
DecalData data[];
}
decals;
-layout(set = 0, binding = 15) uniform texture2D directional_shadow_atlas;
-
-layout(set = 0, binding = 16, std430) restrict readonly buffer GlobalVariableData {
+layout(set = 0, binding = 12, std430) restrict readonly buffer GlobalVariableData {
vec4 data[];
}
global_variables;
@@ -218,7 +131,7 @@ struct SDFGIProbeCascadeData {
float to_cell; // 1/bounds * grid_size
};
-layout(set = 0, binding = 17, std140) uniform SDFGI {
+layout(set = 0, binding = 13, std140) uniform SDFGI {
vec3 grid_size;
uint max_cascades;
@@ -248,45 +161,140 @@ sdfgi;
#endif //LOW_END_MODE
-// decal atlas
+/* Set 2: Render Pass (changes per render pass) */
-/* Set 1, Radiance */
+layout(set = 1, binding = 0, std140) uniform SceneData {
+ mat4 projection_matrix;
+ mat4 inv_projection_matrix;
+
+ mat4 camera_matrix;
+ mat4 inv_camera_matrix;
+
+ vec2 viewport_size;
+ vec2 screen_pixel_size;
+
+ uint cluster_shift;
+ uint cluster_width;
+ uint cluster_type_size;
+ uint max_cluster_element_count_div_32;
+
+ //use vec4s because std140 doesnt play nice with vec2s, z and w are wasted
+ vec4 directional_penumbra_shadow_kernel[32];
+ vec4 directional_soft_shadow_kernel[32];
+ vec4 penumbra_shadow_kernel[32];
+ vec4 soft_shadow_kernel[32];
+
+ uint directional_penumbra_shadow_samples;
+ uint directional_soft_shadow_samples;
+ uint penumbra_shadow_samples;
+ uint soft_shadow_samples;
+
+ vec4 ambient_light_color_energy;
+
+ float ambient_color_sky_mix;
+ bool use_ambient_light;
+ bool use_ambient_cubemap;
+ bool use_reflection_cubemap;
+
+ mat3 radiance_inverse_xform;
+
+ vec2 shadow_atlas_pixel_size;
+ vec2 directional_shadow_pixel_size;
+
+ uint directional_light_count;
+ float dual_paraboloid_side;
+ float z_far;
+ float z_near;
+
+ bool ssao_enabled;
+ float ssao_light_affect;
+ float ssao_ao_affect;
+ bool roughness_limiter_enabled;
+
+ float roughness_limiter_amount;
+ float roughness_limiter_limit;
+ uvec2 roughness_limiter_pad;
+
+ vec4 ao_color;
+
+ mat4 sdf_to_bounds;
+
+ ivec3 sdf_offset;
+ bool material_uv2_mode;
+
+ ivec3 sdf_size;
+ bool gi_upscale_for_msaa;
+
+ bool volumetric_fog_enabled;
+ float volumetric_fog_inv_length;
+ float volumetric_fog_detail_spread;
+ uint volumetric_fog_pad;
+
+ bool fog_enabled;
+ float fog_density;
+ float fog_height;
+ float fog_height_density;
+
+ vec3 fog_light_color;
+ float fog_sun_scatter;
+
+ float fog_aerial_perspective;
+
+ float time;
+ float reflection_multiplier; // one normally, zero when rendering reflections
+
+ bool pancake_shadows;
+}
+
+scene_data;
+
+struct InstanceData {
+ mat4 transform;
+ uint flags;
+ uint instance_uniforms_ofs; //base offset in global buffer for instance variables
+ uint gi_offset; //GI information when using lightmapping (VCT or lightmap index)
+ uint layer_mask;
+ vec4 lightmap_uv_scale;
+};
+
+layout(set = 1, binding = 1, std430) buffer restrict readonly InstanceDataBuffer {
+ InstanceData data[];
+}
+instances;
#ifdef USE_RADIANCE_CUBEMAP_ARRAY
-layout(set = 1, binding = 0) uniform textureCubeArray radiance_cubemap;
+layout(set = 1, binding = 2) uniform textureCubeArray radiance_cubemap;
#else
-layout(set = 1, binding = 0) uniform textureCube radiance_cubemap;
+layout(set = 1, binding = 2) uniform textureCube radiance_cubemap;
#endif
-/* Set 2, Reflection and Shadow Atlases (view dependent) */
+layout(set = 1, binding = 3) uniform textureCubeArray reflection_atlas;
-layout(set = 1, binding = 1) uniform textureCubeArray reflection_atlas;
+layout(set = 1, binding = 4) uniform texture2D shadow_atlas;
-layout(set = 1, binding = 2) uniform texture2D shadow_atlas;
+layout(set = 1, binding = 5) uniform texture2D directional_shadow_atlas;
-layout(set = 1, binding = 3) uniform texture2DArray lightmap_textures[MAX_LIGHTMAP_TEXTURES];
+layout(set = 1, binding = 6) uniform texture2DArray lightmap_textures[MAX_LIGHTMAP_TEXTURES];
-#ifndef LOW_END_MODE
-layout(set = 1, binding = 4) uniform texture3D gi_probe_textures[MAX_GI_PROBES];
+#ifndef LOW_END_MOD
+layout(set = 1, binding = 7) uniform texture3D gi_probe_textures[MAX_GI_PROBES];
#endif
-layout(set = 1, binding = 5, std430) buffer restrict readonly ClusterBuffer {
+layout(set = 1, binding = 8, std430) buffer restrict readonly ClusterBuffer {
uint data[];
}
cluster_buffer;
-/* Set 3, Render Buffers */
-
#ifdef MODE_RENDER_SDF
-layout(r16ui, set = 1, binding = 6) uniform restrict writeonly uimage3D albedo_volume_grid;
-layout(r32ui, set = 1, binding = 7) uniform restrict writeonly uimage3D emission_grid;
-layout(r32ui, set = 1, binding = 8) uniform restrict writeonly uimage3D emission_aniso_grid;
-layout(r32ui, set = 1, binding = 9) uniform restrict uimage3D geom_facing_grid;
+layout(r16ui, set = 1, binding = 9) uniform restrict writeonly uimage3D albedo_volume_grid;
+layout(r32ui, set = 1, binding = 10) uniform restrict writeonly uimage3D emission_grid;
+layout(r32ui, set = 1, binding = 11) uniform restrict writeonly uimage3D emission_aniso_grid;
+layout(r32ui, set = 1, binding = 12) uniform restrict uimage3D geom_facing_grid;
//still need to be present for shaders that use it, so remap them to something
#define depth_buffer shadow_atlas
@@ -295,17 +303,17 @@ layout(r32ui, set = 1, binding = 9) uniform restrict uimage3D geom_facing_grid;
#else
-layout(set = 1, binding = 6) uniform texture2D depth_buffer;
-layout(set = 1, binding = 7) uniform texture2D color_buffer;
+layout(set = 1, binding = 9) uniform texture2D depth_buffer;
+layout(set = 1, binding = 10) uniform texture2D color_buffer;
#ifndef LOW_END_MODE
-layout(set = 1, binding = 8) uniform texture2D normal_roughness_buffer;
-layout(set = 1, binding = 9) uniform texture2D ao_buffer;
-layout(set = 1, binding = 10) uniform texture2D ambient_buffer;
-layout(set = 1, binding = 11) uniform texture2D reflection_buffer;
-layout(set = 1, binding = 12) uniform texture2DArray sdfgi_lightprobe_texture;
-layout(set = 1, binding = 13) uniform texture3D sdfgi_occlusion_cascades;
+layout(set = 1, binding = 11) uniform texture2D normal_roughness_buffer;
+layout(set = 1, binding = 12) uniform texture2D ao_buffer;
+layout(set = 1, binding = 13) uniform texture2D ambient_buffer;
+layout(set = 1, binding = 14) uniform texture2D reflection_buffer;
+layout(set = 1, binding = 15) uniform texture2DArray sdfgi_lightprobe_texture;
+layout(set = 1, binding = 16) uniform texture3D sdfgi_occlusion_cascades;
struct GIProbeData {
mat4 xform;
@@ -323,22 +331,22 @@ struct GIProbeData {
uint mipmaps;
};
-layout(set = 1, binding = 14, std140) uniform GIProbes {
+layout(set = 1, binding = 17, std140) uniform GIProbes {
GIProbeData data[MAX_GI_PROBES];
}
gi_probes;
-layout(set = 1, binding = 15) uniform texture3D volumetric_fog_texture;
+layout(set = 1, binding = 18) uniform texture3D volumetric_fog_texture;
#endif // LOW_END_MODE
#endif
-/* Set 4 Skeleton & Instancing (Multimesh) */
+/* Set 2 Skeleton & Instancing (can change per item) */
layout(set = 2, binding = 0, std430) restrict readonly buffer Transforms {
vec4 data[];
}
transforms;
-/* Set 5 User Material */
+/* Set 3 User Material */
diff --git a/servers/rendering/renderer_rd/shaders/sdfgi_debug.glsl b/servers/rendering/renderer_rd/shaders/sdfgi_debug.glsl
index 813ea29fa1..e4c3f3a84b 100644
--- a/servers/rendering/renderer_rd/shaders/sdfgi_debug.glsl
+++ b/servers/rendering/renderer_rd/shaders/sdfgi_debug.glsl
@@ -97,6 +97,8 @@ void main() {
float blend = 0.0;
#if 1
+ // No interpolation
+
vec3 inv_dir = 1.0 / ray_dir;
float rough = 0.5;
@@ -161,114 +163,11 @@ void main() {
hit_light *= (dot(max(vec3(0.0), (hit_normal * hit_aniso0)), vec3(1.0)) + dot(max(vec3(0.0), (-hit_normal * hit_aniso1)), vec3(1.0)));
- if (blend > 0.0) {
- light = mix(light, hit_light, blend);
- blend = 0.0;
- } else {
- light = hit_light;
-
- //process blend
- float blend_from = (float(params.probe_axis_size - 1) / 2.0) - 2.5;
- float blend_to = blend_from + 2.0;
-
- vec3 cam_pos = params.cam_transform[3].xyz - cascades.data[i].offset;
- cam_pos *= cascades.data[i].to_cell;
-
- pos += ray_dir * min(advance, max_advance);
- vec3 inner_pos = pos - cam_pos;
-
- inner_pos = inner_pos * float(params.probe_axis_size - 1) / params.grid_size.x;
-
- float len = length(inner_pos);
-
- inner_pos = abs(normalize(inner_pos));
- len *= max(inner_pos.x, max(inner_pos.y, inner_pos.z));
-
- if (len >= blend_from) {
- blend = smoothstep(blend_from, blend_to, len);
-
- pos /= cascades.data[i].to_cell;
- pos += cascades.data[i].offset;
- ray_pos = pos;
- hit = false; //continue trace for blend
-
- continue;
- }
- }
+ light = hit_light;
break;
}
- light = mix(light, vec3(0.0), blend);
-
-#else
-
- vec3 inv_dir = 1.0 / ray_dir;
-
- bool hit = false;
- vec4 light_accum = vec4(0.0);
-
- float blend_size = (params.grid_size.x / float(params.probe_axis_size - 1)) * 0.5;
-
- float radius_sizes[MAX_CASCADES];
- for (uint i = 0; i < params.max_cascades; i++) {
- radius_sizes[i] = (1.0 / cascades.data[i].to_cell) * (params.grid_size.x * 0.5 - blend_size);
- }
-
- float max_distance = radius_sizes[params.max_cascades - 1];
- float advance = 0;
- while (advance < max_distance) {
- for (uint i = 0; i < params.max_cascades; i++) {
- if (advance < radius_sizes[i]) {
- vec3 pos = (ray_pos + ray_dir * advance) - cascades.data[i].offset;
- pos *= cascades.data[i].to_cell * pos_to_uvw;
-
- float distance = texture(sampler3D(sdf_cascades[i], linear_sampler), pos).r * 255.0 - 1.0;
-
- vec4 hit_light = vec4(0.0);
- if (distance < 1.0) {
- hit_light.a = max(0.0, 1.0 - distance);
- hit_light.rgb = texture(sampler3D(light_cascades[i], linear_sampler), pos).rgb;
- hit_light.rgb *= hit_light.a;
- }
-
- distance /= cascades.data[i].to_cell;
-
- if (i < (params.max_cascades - 1)) {
- pos = (ray_pos + ray_dir * advance) - cascades.data[i + 1].offset;
- pos *= cascades.data[i + 1].to_cell * pos_to_uvw;
-
- float distance2 = texture(sampler3D(sdf_cascades[i + 1], linear_sampler), pos).r * 255.0 - 1.0;
-
- vec4 hit_light2 = vec4(0.0);
- if (distance2 < 1.0) {
- hit_light2.a = max(0.0, 1.0 - distance2);
- hit_light2.rgb = texture(sampler3D(light_cascades[i + 1], linear_sampler), pos).rgb;
- hit_light2.rgb *= hit_light2.a;
- }
-
- float prev_radius = i == 0 ? 0.0 : radius_sizes[i - 1];
- float blend = (advance - prev_radius) / (radius_sizes[i] - prev_radius);
-
- distance2 /= cascades.data[i + 1].to_cell;
-
- hit_light = mix(hit_light, hit_light2, blend);
- distance = mix(distance, distance2, blend);
- }
-
- light_accum += hit_light;
- advance += distance;
- break;
- }
- }
-
- if (light_accum.a > 0.98) {
- break;
- }
- }
-
- light = light_accum.rgb / light_accum.a;
-
#endif
imageStore(screen_buffer, screen_pos, vec4(linear_to_srgb(light), 1.0));
diff --git a/servers/rendering/renderer_rd/shaders/sdfgi_direct_light.glsl b/servers/rendering/renderer_rd/shaders/sdfgi_direct_light.glsl
index ed0a8a4b86..dc7238abed 100644
--- a/servers/rendering/renderer_rd/shaders/sdfgi_direct_light.glsl
+++ b/servers/rendering/renderer_rd/shaders/sdfgi_direct_light.glsl
@@ -67,8 +67,8 @@ struct Light {
float attenuation;
uint type;
- float spot_angle;
- float spot_attenuation;
+ float cos_spot_angle;
+ float inv_spot_attenuation;
float radius;
vec4 shadow_color;
@@ -80,6 +80,7 @@ layout(set = 0, binding = 9, std140) buffer restrict readonly Lights {
lights;
layout(set = 0, binding = 10) uniform texture2DArray lightprobe_texture;
+layout(set = 0, binding = 11) uniform texture3D occlusion_texture;
layout(push_constant, binding = 0, std430) uniform Params {
vec3 grid_size;
@@ -91,9 +92,9 @@ layout(push_constant, binding = 0, std430) uniform Params {
uint process_increment;
int probe_axis_size;
- bool multibounce;
+ float bounce_feedback;
float y_mult;
- uint pad;
+ bool use_occlusion;
}
params;
@@ -125,7 +126,10 @@ void main() {
uint voxel_index = uint(gl_GlobalInvocationID.x);
//used for skipping voxels every N frames
- voxel_index = params.process_offset + voxel_index * params.process_increment;
+ if (params.process_increment > 1) {
+ voxel_index *= params.process_increment;
+ voxel_index += params.process_offset;
+ }
if (voxel_index >= dispatch_data.total_count) {
return;
@@ -156,7 +160,8 @@ void main() {
// Add indirect light first, in order to save computation resources
#ifdef MODE_PROCESS_DYNAMIC
- if (params.multibounce) {
+ if (params.bounce_feedback > 0.001) {
+ vec3 feedback = (params.bounce_feedback < 1.0) ? (albedo * params.bounce_feedback) : mix(albedo, vec3(1.0), params.bounce_feedback - 1.0);
vec3 pos = (vec3(positioni) + vec3(0.5)) * float(params.probe_axis_size - 1) / params.grid_size;
ivec3 probe_base_pos = ivec3(pos);
@@ -169,7 +174,7 @@ void main() {
vec3 base_tex_posf = vec3(tex_pos);
vec2 tex_pixel_size = 1.0 / vec2(ivec2((OCT_SIZE + 2) * params.probe_axis_size * params.probe_axis_size, (OCT_SIZE + 2) * params.probe_axis_size));
- vec3 probe_uv_offset = (ivec3(OCT_SIZE + 2, OCT_SIZE + 2, (OCT_SIZE + 2) * params.probe_axis_size)) * tex_pixel_size.xyx;
+ vec3 probe_uv_offset = vec3(ivec3(OCT_SIZE + 2, OCT_SIZE + 2, (OCT_SIZE + 2) * params.probe_axis_size)) * tex_pixel_size.xyx;
for (uint j = 0; j < 8; j++) {
ivec3 offset = (ivec3(j) >> ivec3(0, 1, 2)) & ivec3(1, 1, 1);
@@ -189,18 +194,35 @@ void main() {
for (uint k = 0; k < 6; k++) {
if (bool(valid_aniso & (1 << k))) {
vec3 n = aniso_dir[k];
- float weight = trilinear.x * trilinear.y * trilinear.z * max(0.005, dot(n, probe_dir));
-
- vec3 tex_posf = base_tex_posf + vec3(octahedron_encode(n) * float(OCT_SIZE), 0.0);
- tex_posf.xy *= tex_pixel_size;
-
- vec3 pos_uvw = tex_posf;
- pos_uvw.xy += vec2(offset.xy) * probe_uv_offset.xy;
- pos_uvw.x += float(offset.z) * probe_uv_offset.z;
- vec3 indirect_light = textureLod(sampler2DArray(lightprobe_texture, linear_sampler), pos_uvw, 0.0).rgb;
-
- light_accum[k] += indirect_light * weight;
- weight_accum[k] += weight;
+ float weight = trilinear.x * trilinear.y * trilinear.z * max(0, dot(n, probe_dir));
+
+ if (weight > 0.0 && params.use_occlusion) {
+ ivec3 occ_indexv = abs((cascades.data[params.cascade].probe_world_offset + probe_posi) & ivec3(1, 1, 1)) * ivec3(1, 2, 4);
+ vec4 occ_mask = mix(vec4(0.0), vec4(1.0), equal(ivec4(occ_indexv.x | occ_indexv.y), ivec4(0, 1, 2, 3)));
+
+ vec3 occ_pos = (vec3(positioni) + aniso_dir[k] + vec3(0.5)) / params.grid_size;
+ occ_pos.z += float(params.cascade);
+ if (occ_indexv.z != 0) { //z bit is on, means index is >=4, so make it switch to the other half of textures
+ occ_pos.x += 1.0;
+ }
+ occ_pos *= vec3(0.5, 1.0, 1.0 / float(params.max_cascades)); //renormalize
+ float occlusion = dot(textureLod(sampler3D(occlusion_texture, linear_sampler), occ_pos, 0.0), occ_mask);
+
+ weight *= occlusion;
+ }
+
+ if (weight > 0.0) {
+ vec3 tex_posf = base_tex_posf + vec3(octahedron_encode(n) * float(OCT_SIZE), 0.0);
+ tex_posf.xy *= tex_pixel_size;
+
+ vec3 pos_uvw = tex_posf;
+ pos_uvw.xy += vec2(offset.xy) * probe_uv_offset.xy;
+ pos_uvw.x += float(offset.z) * probe_uv_offset.z;
+ vec3 indirect_light = textureLod(sampler2DArray(lightprobe_texture, linear_sampler), pos_uvw, 0.0).rgb;
+
+ light_accum[k] += indirect_light * weight;
+ weight_accum[k] += weight;
+ }
}
}
}
@@ -208,7 +230,7 @@ void main() {
for (uint k = 0; k < 6; k++) {
if (weight_accum[k] > 0.0) {
light_accum[k] /= weight_accum[k];
- light_accum[k] *= albedo;
+ light_accum[k] *= feedback;
}
}
}
@@ -263,13 +285,16 @@ void main() {
rel_vec.y /= params.y_mult;
attenuation = get_omni_attenuation(light_distance, 1.0 / lights.data[i].radius, lights.data[i].attenuation);
- float angle = acos(dot(normalize(rel_vec), -lights.data[i].direction));
- if (angle > lights.data[i].spot_angle) {
- attenuation = 0.0;
- } else {
- float d = clamp(angle / lights.data[i].spot_angle, 0, 1);
- attenuation *= pow(1.0 - d, lights.data[i].spot_attenuation);
+ float cos_spot_angle = lights.data[i].cos_spot_angle;
+ float cos_angle = dot(-direction, lights.data[i].direction);
+
+ if (cos_angle < cos_spot_angle) {
+ continue;
}
+
+ float scos = max(cos_angle, cos_spot_angle);
+ float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - cos_spot_angle));
+ attenuation *= 1.0 - pow(spot_rim, lights.data[i].inv_spot_attenuation);
} break;
}
diff --git a/servers/rendering/renderer_rd/shaders/sdfgi_integrate.glsl b/servers/rendering/renderer_rd/shaders/sdfgi_integrate.glsl
index 67630a3aa1..007e4c113a 100644
--- a/servers/rendering/renderer_rd/shaders/sdfgi_integrate.glsl
+++ b/servers/rendering/renderer_rd/shaders/sdfgi_integrate.glsl
@@ -39,8 +39,11 @@ layout(rgba32i, set = 0, binding = 13) uniform restrict iimage2D lightprobe_aver
layout(rgba16f, set = 0, binding = 14) uniform restrict writeonly image2DArray lightprobe_ambient_texture;
+#ifdef USE_CUBEMAP_ARRAY
+layout(set = 1, binding = 0) uniform textureCubeArray sky_irradiance;
+#else
layout(set = 1, binding = 0) uniform textureCube sky_irradiance;
-
+#endif
layout(set = 1, binding = 1) uniform sampler linear_sampler_mipmaps;
#define HISTORY_BITS 10
@@ -189,14 +192,12 @@ void main() {
vec3 inv_dir = 1.0 / ray_dir;
bool hit = false;
- vec3 hit_normal;
- vec3 hit_light;
- vec3 hit_aniso0;
- vec3 hit_aniso1;
+ uint hit_cascade;
float bias = params.ray_bias;
vec3 abs_ray_dir = abs(ray_dir);
ray_pos += ray_dir * 1.0 / max(abs_ray_dir.x, max(abs_ray_dir.y, abs_ray_dir.z)) * bias / cascades.data[params.cascade].to_cell;
+ vec3 uvw;
for (uint j = params.cascade; j < params.max_cascades; j++) {
//convert to local bounds
@@ -215,14 +216,12 @@ void main() {
float advance = 0.0;
- vec3 uvw;
-
while (advance < max_advance) {
//read how much to advance from SDF
uvw = (pos + ray_dir * advance) * pos_to_uvw;
float distance = texture(sampler3D(sdf_cascades[j], linear_sampler), uvw).r * 255.0 - 1.0;
- if (distance < 0.001) {
+ if (distance < 0.05) {
//consider hit
hit = true;
break;
@@ -232,17 +231,7 @@ void main() {
}
if (hit) {
- const float EPSILON = 0.001;
- hit_normal = normalize(vec3(
- texture(sampler3D(sdf_cascades[j], linear_sampler), uvw + vec3(EPSILON, 0.0, 0.0)).r - texture(sampler3D(sdf_cascades[j], linear_sampler), uvw - vec3(EPSILON, 0.0, 0.0)).r,
- texture(sampler3D(sdf_cascades[j], linear_sampler), uvw + vec3(0.0, EPSILON, 0.0)).r - texture(sampler3D(sdf_cascades[j], linear_sampler), uvw - vec3(0.0, EPSILON, 0.0)).r,
- texture(sampler3D(sdf_cascades[j], linear_sampler), uvw + vec3(0.0, 0.0, EPSILON)).r - texture(sampler3D(sdf_cascades[j], linear_sampler), uvw - vec3(0.0, 0.0, EPSILON)).r));
-
- hit_light = texture(sampler3D(light_cascades[j], linear_sampler), uvw).rgb;
- vec4 aniso0 = texture(sampler3D(aniso0_cascades[j], linear_sampler), uvw);
- hit_aniso0 = aniso0.rgb;
- hit_aniso1 = vec3(aniso0.a, texture(sampler3D(aniso1_cascades[j], linear_sampler), uvw).rg);
-
+ hit_cascade = j;
break;
}
@@ -255,11 +244,32 @@ void main() {
vec4 light;
if (hit) {
- //one liner magic
- light.rgb = hit_light * (dot(max(vec3(0.0), (hit_normal * hit_aniso0)), vec3(1.0)) + dot(max(vec3(0.0), (-hit_normal * hit_aniso1)), vec3(1.0)));
- light.a = 1.0;
+ //avoid reading different texture from different threads
+ for (uint j = params.cascade; j < params.max_cascades; j++) {
+ if (j == hit_cascade) {
+ const float EPSILON = 0.001;
+ vec3 hit_normal = normalize(vec3(
+ texture(sampler3D(sdf_cascades[hit_cascade], linear_sampler), uvw + vec3(EPSILON, 0.0, 0.0)).r - texture(sampler3D(sdf_cascades[hit_cascade], linear_sampler), uvw - vec3(EPSILON, 0.0, 0.0)).r,
+ texture(sampler3D(sdf_cascades[hit_cascade], linear_sampler), uvw + vec3(0.0, EPSILON, 0.0)).r - texture(sampler3D(sdf_cascades[hit_cascade], linear_sampler), uvw - vec3(0.0, EPSILON, 0.0)).r,
+ texture(sampler3D(sdf_cascades[hit_cascade], linear_sampler), uvw + vec3(0.0, 0.0, EPSILON)).r - texture(sampler3D(sdf_cascades[hit_cascade], linear_sampler), uvw - vec3(0.0, 0.0, EPSILON)).r));
+
+ vec3 hit_light = texture(sampler3D(light_cascades[hit_cascade], linear_sampler), uvw).rgb;
+ vec4 aniso0 = texture(sampler3D(aniso0_cascades[hit_cascade], linear_sampler), uvw);
+ vec3 hit_aniso0 = aniso0.rgb;
+ vec3 hit_aniso1 = vec3(aniso0.a, texture(sampler3D(aniso1_cascades[hit_cascade], linear_sampler), uvw).rg);
+
+ //one liner magic
+ light.rgb = hit_light * (dot(max(vec3(0.0), (hit_normal * hit_aniso0)), vec3(1.0)) + dot(max(vec3(0.0), (-hit_normal * hit_aniso1)), vec3(1.0)));
+ light.a = 1.0;
+ }
+ }
+
} else if (params.sky_mode == SKY_MODE_SKY) {
+#ifdef USE_CUBEMAP_ARRAY
+ light.rgb = textureLod(samplerCubeArray(sky_irradiance, linear_sampler_mipmaps), vec4(ray_dir, 0.0), 2.0).rgb; //use second mipmap because we dont usually throw a lot of rays, so this compensates
+#else
light.rgb = textureLod(samplerCube(sky_irradiance, linear_sampler_mipmaps), ray_dir, 2.0).rgb; //use second mipmap because we dont usually throw a lot of rays, so this compensates
+#endif
light.rgb *= params.sky_energy;
light.a = 0.0;
@@ -490,13 +500,15 @@ void main() {
//can't scroll, must look for position in parent cascade
//to global coords
- float probe_cell_size = float(params.grid_size.x / float(params.probe_axis_size - 1)) / cascades.data[params.cascade].to_cell;
+ float cell_to_probe = float(params.grid_size.x / float(params.probe_axis_size - 1));
+
+ float probe_cell_size = cell_to_probe / cascades.data[params.cascade].to_cell;
vec3 probe_pos = cascades.data[params.cascade].offset + vec3(probe_cell) * probe_cell_size;
//to parent local coords
+ float probe_cell_size_next = cell_to_probe / cascades.data[params.cascade + 1].to_cell;
probe_pos -= cascades.data[params.cascade + 1].offset;
- probe_pos *= cascades.data[params.cascade + 1].to_cell;
- probe_pos = probe_pos * float(params.probe_axis_size - 1) / float(params.grid_size.x);
+ probe_pos /= probe_cell_size_next;
ivec3 probe_posi = ivec3(probe_pos);
//add up all light, no need to use occlusion here, since occlusion will do its work afterwards
@@ -549,20 +561,28 @@ void main() {
}
} else {
- // clear and let it re-raytrace, only for the last cascade, which happens very un-often
- //scroll
+ //scroll at the edge of the highest cascade, just copy what is there,
+ //since its the closest we have anyway
+
for (uint j = 0; j < params.history_size; j++) {
+ ivec2 tex_pos;
+ tex_pos = probe_cell.xy;
+ tex_pos.x += probe_cell.z * int(params.probe_axis_size);
+
for (int i = 0; i < SH_SIZE; i++) {
// copy from history texture
+ ivec3 src_pos = ivec3(tex_pos.x, tex_pos.y * SH_SIZE + i, int(j));
ivec3 dst_pos = ivec3(pos.x, pos.y * SH_SIZE + i, int(j));
- imageStore(lightprobe_history_scroll_texture, dst_pos, ivec4(0));
+ ivec4 value = imageLoad(lightprobe_history_texture, dst_pos);
+ imageStore(lightprobe_history_scroll_texture, dst_pos, value);
}
}
for (int i = 0; i < SH_SIZE; i++) {
// copy from average texture
- ivec2 dst_pos = ivec2(pos.x, pos.y * SH_SIZE + i);
- imageStore(lightprobe_average_scroll_texture, dst_pos, ivec4(0));
+ ivec2 spos = ivec2(pos.x, pos.y * SH_SIZE + i);
+ ivec4 average = imageLoad(lightprobe_average_texture, spos);
+ imageStore(lightprobe_average_scroll_texture, spos, average);
}
}
diff --git a/servers/rendering/renderer_rd/shaders/shadow_reduce.glsl b/servers/rendering/renderer_rd/shaders/shadow_reduce.glsl
deleted file mode 100644
index 29443ae7db..0000000000
--- a/servers/rendering/renderer_rd/shaders/shadow_reduce.glsl
+++ /dev/null
@@ -1,105 +0,0 @@
-#[compute]
-
-#version 450
-
-VERSION_DEFINES
-
-#define BLOCK_SIZE 8
-
-layout(local_size_x = BLOCK_SIZE, local_size_y = BLOCK_SIZE, local_size_z = 1) in;
-
-#ifdef MODE_REDUCE
-
-shared float tmp_data[BLOCK_SIZE * BLOCK_SIZE];
-const uint swizzle_table[BLOCK_SIZE] = uint[](0, 4, 2, 6, 1, 5, 3, 7);
-const uint unswizzle_table[BLOCK_SIZE] = uint[](0, 0, 0, 1, 0, 2, 1, 3);
-
-#endif
-
-layout(r32f, set = 0, binding = 0) uniform restrict readonly image2D source_depth;
-layout(r32f, set = 0, binding = 1) uniform restrict writeonly image2D dst_depth;
-
-layout(push_constant, binding = 1, std430) uniform Params {
- ivec2 source_size;
- ivec2 source_offset;
- uint min_size;
- uint gaussian_kernel_version;
- ivec2 filter_dir;
-}
-params;
-
-void main() {
-#ifdef MODE_REDUCE
-
- uvec2 pos = gl_LocalInvocationID.xy;
-
- ivec2 image_offset = params.source_offset;
- ivec2 image_pos = image_offset + ivec2(gl_GlobalInvocationID.xy);
- uint dst_t = swizzle_table[pos.y] * BLOCK_SIZE + swizzle_table[pos.x];
- tmp_data[dst_t] = imageLoad(source_depth, min(image_pos, params.source_size - ivec2(1))).r;
- ivec2 image_size = params.source_size;
-
- uint t = pos.y * BLOCK_SIZE + pos.x;
-
- //neighbours
- uint size = BLOCK_SIZE;
-
- do {
- groupMemoryBarrier();
- barrier();
-
- size >>= 1;
- image_size >>= 1;
- image_offset >>= 1;
-
- if (all(lessThan(pos, uvec2(size)))) {
- uint nx = t + size;
- uint ny = t + (BLOCK_SIZE * size);
- uint nxy = ny + size;
-
- tmp_data[t] += tmp_data[nx];
- tmp_data[t] += tmp_data[ny];
- tmp_data[t] += tmp_data[nxy];
- tmp_data[t] /= 4.0;
- }
-
- } while (size > params.min_size);
-
- if (all(lessThan(pos, uvec2(size)))) {
- image_pos = ivec2(unswizzle_table[size + pos.x], unswizzle_table[size + pos.y]);
- image_pos += image_offset + ivec2(gl_WorkGroupID.xy) * int(size);
-
- image_size = max(ivec2(1), image_size); //in case image size became 0
-
- if (all(lessThan(image_pos, uvec2(image_size)))) {
- imageStore(dst_depth, image_pos, vec4(tmp_data[t]));
- }
- }
-#endif
-
-#ifdef MODE_FILTER
-
- ivec2 image_pos = params.source_offset + ivec2(gl_GlobalInvocationID.xy);
- if (any(greaterThanEqual(image_pos, params.source_size))) {
- return;
- }
-
- ivec2 clamp_min = ivec2(params.source_offset);
- ivec2 clamp_max = ivec2(params.source_size) - 1;
-
- //gaussian kernel, size 9, sigma 4
- const int kernel_size = 9;
- const float gaussian_kernel[kernel_size * 3] = float[](
- 0.000229, 0.005977, 0.060598, 0.241732, 0.382928, 0.241732, 0.060598, 0.005977, 0.000229,
- 0.028532, 0.067234, 0.124009, 0.179044, 0.20236, 0.179044, 0.124009, 0.067234, 0.028532,
- 0.081812, 0.101701, 0.118804, 0.130417, 0.134535, 0.130417, 0.118804, 0.101701, 0.081812);
- float accum = 0.0;
- for (int i = 0; i < kernel_size; i++) {
- ivec2 ofs = clamp(image_pos + params.filter_dir * (i - kernel_size / 2), clamp_min, clamp_max);
- accum += imageLoad(source_depth, ofs).r * gaussian_kernel[params.gaussian_kernel_version + i];
- }
-
- imageStore(dst_depth, image_pos, vec4(accum));
-
-#endif
-}
diff --git a/servers/rendering/renderer_rd/shaders/skeleton.glsl b/servers/rendering/renderer_rd/shaders/skeleton.glsl
index b19f5a9ad3..680d1045cd 100644
--- a/servers/rendering/renderer_rd/shaders/skeleton.glsl
+++ b/servers/rendering/renderer_rd/shaders/skeleton.glsl
@@ -100,7 +100,7 @@ void main() {
for (uint i = 0; i < params.blend_shape_count; i++) {
float w = blend_shape_weights.data[i];
- if (w > 0.0001) {
+ if (abs(w) > 0.0001) {
uint base_offset = (params.vertex_count * i + index) * params.vertex_stride;
blend_vertex += uintBitsToFloat(uvec3(src_blend_shapes.data[base_offset + 0], src_blend_shapes.data[base_offset + 1], src_blend_shapes.data[base_offset + 2])) * w;
diff --git a/servers/rendering/renderer_rd/shaders/volumetric_fog.glsl b/servers/rendering/renderer_rd/shaders/volumetric_fog.glsl
index aa32809a06..e7ba8feb80 100644
--- a/servers/rendering/renderer_rd/shaders/volumetric_fog.glsl
+++ b/servers/rendering/renderer_rd/shaders/volumetric_fog.glsl
@@ -168,13 +168,18 @@ layout(set = 0, binding = 14, std140) uniform Params {
uint cluster_shift;
uint cluster_width;
- uvec3 cluster_pad;
uint max_cluster_element_count_div_32;
+ bool use_temporal_reprojection;
+ uint temporal_frame;
+ float temporal_blend;
mat3x4 cam_rotation;
+ mat4 to_prev_view;
}
params;
+layout(set = 0, binding = 15) uniform texture3D prev_density_texture;
+
float get_depth_at_pos(float cell_depth_size, int z) {
float d = float(z) * cell_depth_size + cell_depth_size * 0.5; //center of voxels
d = pow(d, params.detail_spread);
@@ -213,6 +218,26 @@ uint cluster_get_range_clip_mask(uint i, uint z_min, uint z_max) {
return bitfieldInsert(uint(0), uint(0xFFFFFFFF), local_min, mask_width);
}
+#define TEMPORAL_FRAMES 16
+
+const vec3 halton_map[TEMPORAL_FRAMES] = vec3[](
+ vec3(0.5, 0.33333333, 0.2),
+ vec3(0.25, 0.66666667, 0.4),
+ vec3(0.75, 0.11111111, 0.6),
+ vec3(0.125, 0.44444444, 0.8),
+ vec3(0.625, 0.77777778, 0.04),
+ vec3(0.375, 0.22222222, 0.24),
+ vec3(0.875, 0.55555556, 0.44),
+ vec3(0.0625, 0.88888889, 0.64),
+ vec3(0.5625, 0.03703704, 0.84),
+ vec3(0.3125, 0.37037037, 0.08),
+ vec3(0.8125, 0.7037037, 0.28),
+ vec3(0.1875, 0.14814815, 0.48),
+ vec3(0.6875, 0.48148148, 0.68),
+ vec3(0.4375, 0.81481481, 0.88),
+ vec3(0.9375, 0.25925926, 0.12),
+ vec3(0.03125, 0.59259259, 0.32));
+
void main() {
vec3 fog_cell_size = 1.0 / vec3(params.fog_volume_size);
@@ -241,6 +266,45 @@ void main() {
view_pos.z = -params.fog_frustum_end * fog_unit_pos.z;
view_pos.y = -view_pos.y;
+ vec4 reprojected_density = vec4(0.0);
+ float reproject_amount = 0.0;
+
+ if (params.use_temporal_reprojection) {
+ vec3 prev_view = (params.to_prev_view * vec4(view_pos, 1.0)).xyz;
+ //undo transform into prev view
+ prev_view.y = -prev_view.y;
+ //z back to unit size
+ prev_view.z /= -params.fog_frustum_end;
+ //xy back to unit size
+ prev_view.xy /= mix(params.fog_frustum_size_begin, params.fog_frustum_size_end, vec2(prev_view.z));
+ prev_view.xy = prev_view.xy * 0.5 + 0.5;
+ //z back to unspread value
+ prev_view.z = pow(prev_view.z, 1.0 / params.detail_spread);
+
+ if (all(greaterThan(prev_view, vec3(0.0))) && all(lessThan(prev_view, vec3(1.0)))) {
+ //reprojectinon fits
+
+ reprojected_density = textureLod(sampler3D(prev_density_texture, linear_sampler), prev_view, 0.0);
+ reproject_amount = params.temporal_blend;
+
+ // Since we can reproject, now we must jitter the current view pos.
+ // This is done here because cells that can't reproject should not jitter.
+
+ fog_unit_pos = posf * fog_cell_size + fog_cell_size * halton_map[params.temporal_frame]; //center of voxels, offset by halton table
+
+ screen_pos = uvec2(fog_unit_pos.xy * params.screen_size);
+ cluster_pos = screen_pos >> params.cluster_shift;
+ cluster_offset = (params.cluster_width * cluster_pos.y + cluster_pos.x) * (params.max_cluster_element_count_div_32 + 32);
+ //positions in screen are too spread apart, no hopes for optimizing with subgroups
+
+ fog_unit_pos.z = pow(fog_unit_pos.z, params.detail_spread);
+
+ view_pos.xy = (fog_unit_pos.xy * 2.0 - 1.0) * mix(params.fog_frustum_size_begin, params.fog_frustum_size_end, vec2(fog_unit_pos.z));
+ view_pos.z = -params.fog_frustum_end * fog_unit_pos.z;
+ view_pos.y = -view_pos.y;
+ }
+ }
+
uint cluster_z = uint(clamp((abs(view_pos.z) / params.z_far) * 32.0, 0.0, 31.0));
vec3 total_light = params.light_color;
@@ -433,31 +497,31 @@ void main() {
uint light_index = 32 * i + bit;
- vec3 light_pos = omni_lights.data[light_index].position;
- vec3 light_rel_vec = omni_lights.data[light_index].position - view_pos;
+ vec3 light_pos = spot_lights.data[light_index].position;
+ vec3 light_rel_vec = spot_lights.data[light_index].position - view_pos;
float d = length(light_rel_vec);
float shadow_attenuation = 1.0;
- if (d * omni_lights.data[light_index].inv_radius < 1.0) {
- float attenuation = get_omni_attenuation(d, omni_lights.data[light_index].inv_radius, omni_lights.data[light_index].attenuation);
+ if (d * spot_lights.data[light_index].inv_radius < 1.0) {
+ float attenuation = get_omni_attenuation(d, spot_lights.data[light_index].inv_radius, spot_lights.data[light_index].attenuation);
- vec3 spot_dir = omni_lights.data[light_index].direction;
- float scos = max(dot(-normalize(light_rel_vec), spot_dir), omni_lights.data[light_index].cone_angle);
- float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - omni_lights.data[light_index].cone_angle));
- attenuation *= 1.0 - pow(spot_rim, omni_lights.data[light_index].cone_attenuation);
+ vec3 spot_dir = spot_lights.data[light_index].direction;
+ float scos = max(dot(-normalize(light_rel_vec), spot_dir), spot_lights.data[light_index].cone_angle);
+ float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - spot_lights.data[light_index].cone_angle));
+ attenuation *= 1.0 - pow(spot_rim, spot_lights.data[light_index].cone_attenuation);
- vec3 light = omni_lights.data[light_index].color / M_PI;
+ vec3 light = spot_lights.data[light_index].color / M_PI;
- if (omni_lights.data[light_index].shadow_enabled) {
+ if (spot_lights.data[light_index].shadow_enabled) {
//has shadow
vec4 v = vec4(view_pos, 1.0);
- vec4 splane = (omni_lights.data[light_index].shadow_matrix * v);
+ vec4 splane = (spot_lights.data[light_index].shadow_matrix * v);
splane /= splane.w;
float depth = texture(sampler2D(shadow_atlas, linear_sampler), splane.xy).r;
- shadow_attenuation = exp(min(0.0, (depth - splane.z)) / omni_lights.data[light_index].inv_radius * omni_lights.data[light_index].shadow_volumetric_fog_fade);
+ shadow_attenuation = exp(min(0.0, (depth - splane.z)) / spot_lights.data[light_index].inv_radius * spot_lights.data[light_index].shadow_volumetric_fog_fade);
}
total_light += light * attenuation * shadow_attenuation;
@@ -565,7 +629,11 @@ void main() {
#endif
- imageStore(density_map, pos, vec4(total_light, total_density));
+ vec4 final_density = vec4(total_light, total_density);
+
+ final_density = mix(final_density, reprojected_density, reproject_amount);
+
+ imageStore(density_map, pos, final_density);
#endif
#ifdef MODE_FOG
diff --git a/servers/rendering/renderer_scene.h b/servers/rendering/renderer_scene.h
index c483898fed..b546001843 100644
--- a/servers/rendering/renderer_scene.h
+++ b/servers/rendering/renderer_scene.h
@@ -36,7 +36,8 @@
class RendererScene {
public:
- virtual RID camera_create() = 0;
+ virtual RID camera_allocate() = 0;
+ virtual void camera_initialize(RID p_rid) = 0;
virtual void camera_set_perspective(RID p_camera, float p_fovy_degrees, float p_z_near, float p_z_far) = 0;
virtual void camera_set_orthogonal(RID p_camera, float p_size, float p_z_near, float p_z_far) = 0;
@@ -48,7 +49,8 @@ public:
virtual void camera_set_use_vertical_aspect(RID p_camera, bool p_enable) = 0;
virtual bool is_camera(RID p_camera) const = 0;
- virtual RID scenario_create() = 0;
+ virtual RID scenario_allocate() = 0;
+ virtual void scenario_initialize(RID p_rid) = 0;
virtual void scenario_set_debug(RID p_scenario, RS::ScenarioDebugMode p_debug_mode) = 0;
virtual void scenario_set_environment(RID p_scenario, RID p_environment) = 0;
@@ -58,7 +60,8 @@ public:
virtual bool is_scenario(RID p_scenario) const = 0;
virtual RID scenario_get_environment(RID p_scenario) = 0;
- virtual RID instance_create() = 0;
+ virtual RID instance_allocate() = 0;
+ virtual void instance_initialize(RID p_rid) = 0;
virtual void instance_set_base(RID p_instance, RID p_base) = 0;
virtual void instance_set_scenario(RID p_instance, RID p_scenario) = 0;
@@ -95,11 +98,13 @@ public:
virtual Variant instance_geometry_get_shader_parameter(RID p_instance, const StringName &p_parameter) const = 0;
virtual Variant instance_geometry_get_shader_parameter_default_value(RID p_instance, const StringName &p_parameter) const = 0;
- virtual void directional_shadow_atlas_set_size(int p_size) = 0;
+ virtual void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = false) = 0;
/* SKY API */
- virtual RID sky_create() = 0;
+ virtual RID sky_allocate() = 0;
+ virtual void sky_initialize(RID p_rid) = 0;
+
virtual void sky_set_radiance_size(RID p_sky, int p_radiance_size) = 0;
virtual void sky_set_mode(RID p_sky, RS::SkyMode p_samples) = 0;
virtual void sky_set_material(RID p_sky, RID p_material) = 0;
@@ -107,7 +112,8 @@ public:
/* ENVIRONMENT API */
- virtual RID environment_create() = 0;
+ virtual RID environment_allocate() = 0;
+ virtual void environment_initialize(RID p_rid) = 0;
virtual void environment_set_background(RID p_env, RS::EnvironmentBG p_bg) = 0;
virtual void environment_set_sky(RID p_env, RID p_sky) = 0;
@@ -122,12 +128,10 @@ public:
virtual void environment_glow_set_use_bicubic_upscale(bool p_enable) = 0;
virtual void environment_glow_set_use_high_quality(bool p_enable) = 0;
- virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, RS::EnvVolumetricFogShadowFilter p_shadow_filter) = 0;
+ virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount) = 0;
virtual void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) = 0;
virtual void environment_set_volumetric_fog_filter_active(bool p_enable) = 0;
- virtual void environment_set_volumetric_fog_directional_shadow_shrink_size(int p_shrink_size) = 0;
- virtual void environment_set_volumetric_fog_positional_shadow_shrink_size(int p_shrink_size) = 0;
virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) = 0;
virtual void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) = 0;
@@ -136,10 +140,11 @@ public:
virtual void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0;
- virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, bool p_use_multibounce, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
+ virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) = 0;
virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) = 0;
+ virtual void environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) = 0;
virtual void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) = 0;
@@ -160,7 +165,8 @@ public:
/* Camera Effects */
- virtual RID camera_effects_create() = 0;
+ virtual RID camera_effects_allocate() = 0;
+ virtual void camera_effects_initialize(RID p_rid) = 0;
virtual void camera_effects_set_dof_blur_quality(RS::DOFBlurQuality p_quality, bool p_use_jitter) = 0;
virtual void camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokehShape p_shape) = 0;
@@ -172,14 +178,17 @@ public:
virtual void directional_shadow_quality_set(RS::ShadowQuality p_quality) = 0;
virtual RID shadow_atlas_create() = 0;
- virtual void shadow_atlas_set_size(RID p_atlas, int p_size) = 0;
+ virtual void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_use_16_bits = false) = 0;
virtual void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) = 0;
/* Render Buffers */
virtual RID render_buffers_create() = 0;
+
virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_width, int p_height, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_debanding) = 0;
+ virtual void gi_set_use_half_resolution(bool p_enable) = 0;
+
virtual void set_debug_draw_mode(RS::ViewportDebugDraw p_debug_draw) = 0;
virtual TypedArray<Image> bake_render_uv2(RID p_base, const Vector<RID> &p_material_overrides, const Size2i &p_image_size) = 0;
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp
index e1f179aa3b..e8155e4025 100644
--- a/servers/rendering/renderer_scene_cull.cpp
+++ b/servers/rendering/renderer_scene_cull.cpp
@@ -39,9 +39,11 @@
/* CAMERA API */
-RID RendererSceneCull::camera_create() {
- Camera *camera = memnew(Camera);
- return camera_owner.make_rid(camera);
+RID RendererSceneCull::camera_allocate() {
+ return camera_owner.allocate_rid();
+}
+void RendererSceneCull::camera_initialize(RID p_rid) {
+ camera_owner.initialize_rid(p_rid, memnew(Camera));
}
void RendererSceneCull::camera_set_perspective(RID p_camera, float p_fovy_degrees, float p_z_near, float p_z_far) {
@@ -290,11 +292,12 @@ void RendererSceneCull::_instance_unpair(Instance *p_A, Instance *p_B) {
}
}
-RID RendererSceneCull::scenario_create() {
+RID RendererSceneCull::scenario_allocate() {
+ return scenario_owner.allocate_rid();
+}
+void RendererSceneCull::scenario_initialize(RID p_rid) {
Scenario *scenario = memnew(Scenario);
- ERR_FAIL_COND_V(!scenario, RID());
- RID scenario_rid = scenario_owner.make_rid(scenario);
- scenario->self = scenario_rid;
+ scenario->self = p_rid;
scenario->reflection_probe_shadow_atlas = scene_render->shadow_atlas_create();
scene_render->shadow_atlas_set_size(scenario->reflection_probe_shadow_atlas, 1024); //make enough shadows for close distance, don't bother with rest
@@ -307,7 +310,7 @@ RID RendererSceneCull::scenario_create() {
scenario->instance_aabbs.set_page_pool(&instance_aabb_page_pool);
scenario->instance_data.set_page_pool(&instance_data_page_pool);
- return scenario_rid;
+ scenario_owner.initialize_rid(p_rid, scenario);
}
void RendererSceneCull::scenario_set_debug(RID p_scenario, RS::ScenarioDebugMode p_debug_mode) {
@@ -367,14 +370,14 @@ void RendererSceneCull::_instance_queue_update(Instance *p_instance, bool p_upda
_instance_update_list.add(&p_instance->update_item);
}
-RID RendererSceneCull::instance_create() {
+RID RendererSceneCull::instance_allocate() {
+ return instance_owner.allocate_rid();
+}
+void RendererSceneCull::instance_initialize(RID p_rid) {
Instance *instance = memnew(Instance);
- ERR_FAIL_COND_V(!instance, RID());
+ instance->self = p_rid;
- RID instance_rid = instance_owner.make_rid(instance);
- instance->self = instance_rid;
-
- return instance_rid;
+ instance_owner.initialize_rid(p_rid, instance);
}
void RendererSceneCull::_instance_update_mesh_instance(Instance *p_instance) {
@@ -1253,7 +1256,8 @@ void RendererSceneCull::_update_instance(Instance *p_instance) {
scene_render->geometry_instance_set_transform(geom->geometry_instance, p_instance->transform, p_instance->aabb, p_instance->transformed_aabb);
}
- if (p_instance->scenario == nullptr || !p_instance->visible || Math::is_zero_approx(p_instance->transform.basis.determinant())) {
+ // note: we had to remove is equal approx check here, it meant that det == 0.000004 won't work, which is the case for some of our scenes.
+ if (p_instance->scenario == nullptr || !p_instance->visible || p_instance->transform.basis.determinant() == 0) {
p_instance->prev_transformed_aabb = p_instance->transformed_aabb;
return;
}
@@ -1905,6 +1909,9 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
RS::LightOmniShadowMode shadow_mode = RSG::storage->light_omni_get_shadow_mode(p_instance->base);
if (shadow_mode == RS::LIGHT_OMNI_SHADOW_DUAL_PARABOLOID || !scene_render->light_instances_can_render_shadow_cube()) {
+ if (max_shadows_used + 2 > MAX_UPDATE_SHADOWS) {
+ return true;
+ }
for (int i = 0; i < 2; i++) {
//using this one ensures that raster deferred will have it
RENDER_TIMESTAMP("Culling Shadow Paraboloid" + itos(i));
@@ -1921,7 +1928,6 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
planes.write[4] = light_transform.xform(Plane(Vector3(0, -1, z).normalized(), radius));
planes.write[5] = light_transform.xform(Plane(Vector3(0, 0, -z), 0));
- geometry_instances_to_shadow_render.clear();
instance_shadow_cull_result.clear();
Vector<Vector3> points = Geometry3D::compute_convex_mesh_points(&planes[0], planes.size());
@@ -1942,6 +1948,8 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
Plane near_plane(light_transform.origin, light_transform.basis.get_axis(2) * z);
+ RendererSceneRender::RenderShadowData &shadow_data = render_shadow_data[max_shadows_used++];
+
for (int j = 0; j < (int)instance_shadow_cull_result.size(); j++) {
Instance *instance = instance_shadow_cull_result[j];
if (!instance->visible || !((1 << instance->base_type) & RS::INSTANCE_GEOMETRY_MASK) || !static_cast<InstanceGeometryData *>(instance->base_data)->can_cast_shadows) {
@@ -1956,16 +1964,21 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
}
}
- geometry_instances_to_shadow_render.push_back(static_cast<InstanceGeometryData *>(instance->base_data)->geometry_instance);
+ shadow_data.instances.push_back(static_cast<InstanceGeometryData *>(instance->base_data)->geometry_instance);
}
RSG::storage->update_mesh_instances();
scene_render->light_instance_set_shadow_transform(light->instance, CameraMatrix(), light_transform, radius, 0, i, 0);
- scene_render->render_shadow(light->instance, p_shadow_atlas, i, geometry_instances_to_shadow_render);
+ shadow_data.light = light->instance;
+ shadow_data.pass = i;
}
} else { //shadow cube
+ if (max_shadows_used + 6 > MAX_UPDATE_SHADOWS) {
+ return true;
+ }
+
real_t radius = RSG::storage->light_get_param(p_instance->base, RS::LIGHT_PARAM_RANGE);
CameraMatrix cm;
cm.set_perspective(90, 1, 0.01, radius);
@@ -1995,7 +2008,6 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
Vector<Plane> planes = cm.get_projection_planes(xform);
- geometry_instances_to_shadow_render.clear();
instance_shadow_cull_result.clear();
Vector<Vector3> points = Geometry3D::compute_convex_mesh_points(&planes[0], planes.size());
@@ -2014,7 +2026,7 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
p_scenario->indexers[Scenario::INDEXER_GEOMETRY].convex_query(planes.ptr(), planes.size(), points.ptr(), points.size(), cull_convex);
- Plane near_plane(xform.origin, -xform.basis.get_axis(2));
+ RendererSceneRender::RenderShadowData &shadow_data = render_shadow_data[max_shadows_used++];
for (int j = 0; j < (int)instance_shadow_cull_result.size(); j++) {
Instance *instance = instance_shadow_cull_result[j];
@@ -2029,22 +2041,28 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
}
}
- geometry_instances_to_shadow_render.push_back(static_cast<InstanceGeometryData *>(instance->base_data)->geometry_instance);
+ shadow_data.instances.push_back(static_cast<InstanceGeometryData *>(instance->base_data)->geometry_instance);
}
RSG::storage->update_mesh_instances();
scene_render->light_instance_set_shadow_transform(light->instance, cm, xform, radius, 0, i, 0);
- scene_render->render_shadow(light->instance, p_shadow_atlas, i, geometry_instances_to_shadow_render);
+
+ shadow_data.light = light->instance;
+ shadow_data.pass = i;
}
//restore the regular DP matrix
- scene_render->light_instance_set_shadow_transform(light->instance, CameraMatrix(), light_transform, radius, 0, 0, 0);
+ //scene_render->light_instance_set_shadow_transform(light->instance, CameraMatrix(), light_transform, radius, 0, 0, 0);
}
} break;
case RS::LIGHT_SPOT: {
RENDER_TIMESTAMP("Culling Spot Light");
+ if (max_shadows_used + 1 > MAX_UPDATE_SHADOWS) {
+ return true;
+ }
+
real_t radius = RSG::storage->light_get_param(p_instance->base, RS::LIGHT_PARAM_RANGE);
real_t angle = RSG::storage->light_get_param(p_instance->base, RS::LIGHT_PARAM_SPOT_ANGLE);
@@ -2053,7 +2071,6 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
Vector<Plane> planes = cm.get_projection_planes(light_transform);
- geometry_instances_to_shadow_render.clear();
instance_shadow_cull_result.clear();
Vector<Vector3> points = Geometry3D::compute_convex_mesh_points(&planes[0], planes.size());
@@ -2072,7 +2089,7 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
p_scenario->indexers[Scenario::INDEXER_GEOMETRY].convex_query(planes.ptr(), planes.size(), points.ptr(), points.size(), cull_convex);
- Plane near_plane(light_transform.origin, -light_transform.basis.get_axis(2));
+ RendererSceneRender::RenderShadowData &shadow_data = render_shadow_data[max_shadows_used++];
for (int j = 0; j < (int)instance_shadow_cull_result.size(); j++) {
Instance *instance = instance_shadow_cull_result[j];
@@ -2087,13 +2104,14 @@ bool RendererSceneCull::_light_instance_update_shadow(Instance *p_instance, cons
RSG::storage->mesh_instance_check_for_update(instance->mesh_instance);
}
}
- geometry_instances_to_shadow_render.push_back(static_cast<InstanceGeometryData *>(instance->base_data)->geometry_instance);
+ shadow_data.instances.push_back(static_cast<InstanceGeometryData *>(instance->base_data)->geometry_instance);
}
RSG::storage->update_mesh_instances();
scene_render->light_instance_set_shadow_transform(light->instance, cm, light_transform, radius, 0, 0, 0);
- scene_render->render_shadow(light->instance, p_shadow_atlas, 0, geometry_instances_to_shadow_render);
+ shadow_data.light = light->instance;
+ shadow_data.pass = 0;
} break;
}
@@ -2146,14 +2164,13 @@ void RendererSceneCull::render_camera(RID p_render_buffers, RID p_camera, RID p_
RID environment = _render_get_environment(p_camera, p_scenario);
- _prepare_scene(camera->transform, camera_matrix, ortho, camera->vaspect, p_render_buffers, environment, camera->visible_layers, p_scenario, p_shadow_atlas, RID(), p_screen_lod_threshold);
- _render_scene(p_render_buffers, camera->transform, camera_matrix, ortho, environment, camera->effects, p_scenario, p_shadow_atlas, RID(), -1, p_screen_lod_threshold);
+ _render_scene(camera->transform, camera_matrix, ortho, camera->vaspect, p_render_buffers, environment, camera->effects, camera->visible_layers, p_scenario, p_shadow_atlas, RID(), -1, p_screen_lod_threshold);
#endif
}
void RendererSceneCull::render_camera(RID p_render_buffers, Ref<XRInterface> &p_interface, XRInterface::Eyes p_eye, RID p_camera, RID p_scenario, Size2 p_viewport_size, float p_screen_lod_threshold, RID p_shadow_atlas) {
// render for AR/VR interface
-
+#if 0
Camera *camera = camera_owner.getornull(p_camera);
ERR_FAIL_COND(!camera);
@@ -2233,6 +2250,7 @@ void RendererSceneCull::render_camera(RID p_render_buffers, Ref<XRInterface> &p_
// And render our scene...
_render_scene(p_render_buffers, cam_transform, camera_matrix, false, environment, camera->effects, p_scenario, p_shadow_atlas, RID(), -1, p_screen_lod_threshold);
+#endif
};
void RendererSceneCull::_frustum_cull_threaded(uint32_t p_thread, FrustumCullData *cull_data) {
@@ -2451,7 +2469,7 @@ void RendererSceneCull::_frustum_cull(FrustumCullData &cull_data, FrustumCullRes
}
}
-void RendererSceneCull::_prepare_scene(const Transform p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, bool p_cam_vaspect, RID p_render_buffers, RID p_environment, uint32_t p_visible_layers, RID p_scenario, RID p_shadow_atlas, RID p_reflection_probe, float p_screen_lod_threshold, bool p_using_shadows) {
+void RendererSceneCull::_render_scene(const Transform p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, bool p_cam_vaspect, RID p_render_buffers, RID p_environment, RID p_force_camera_effects, uint32_t p_visible_layers, RID p_scenario, RID p_shadow_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold, bool p_using_shadows) {
// Note, in stereo rendering:
// - p_cam_transform will be a transform in the middle of our two eyes
// - p_cam_projection is a wider frustrum that encompasses both eyes
@@ -2465,6 +2483,7 @@ void RendererSceneCull::_prepare_scene(const Transform p_cam_transform, const Ca
scene_render->set_scene_pass(render_pass);
if (p_render_buffers.is_valid()) {
+ //no rendering code here, this is only to set up what needs to be done, request regions, etc.
scene_render->sdfgi_update(p_render_buffers, p_environment, p_cam_transform.origin); //update conditions for SDFGI (whether its used or not)
}
@@ -2595,62 +2614,28 @@ void RendererSceneCull::_prepare_scene(const Transform p_cam_transform, const Ca
//render shadows
- for (uint32_t i = 0; i < cull.shadow_count; i++) {
- for (uint32_t j = 0; j < cull.shadows[i].cascade_count; j++) {
- const Cull::Shadow::Cascade &c = cull.shadows[i].cascades[j];
- // print_line("shadow " + itos(i) + " cascade " + itos(j) + " elements: " + itos(c.cull_result.size()));
- scene_render->light_instance_set_shadow_transform(cull.shadows[i].light_instance, c.projection, c.transform, c.zfar, c.split, j, c.shadow_texel_size, c.bias_scale, c.range_begin, c.uv_scale);
- scene_render->render_shadow(cull.shadows[i].light_instance, p_shadow_atlas, j, frustum_cull_result.directional_shadows[i].cascade_geometry_instances[j], near_plane, p_cam_projection.get_lod_multiplier(), p_screen_lod_threshold);
- }
- }
+ max_shadows_used = 0;
- //render SDFGI
+ if (p_using_shadows) { //setup shadow maps
- {
- if (cull.sdfgi.region_count > 0) {
- //update regions
- for (uint32_t i = 0; i < cull.sdfgi.region_count; i++) {
- scene_render->render_sdfgi(p_render_buffers, i, frustum_cull_result.sdfgi_region_geometry_instances[i]);
- }
- //check if static lights were culled
- bool static_lights_culled = false;
- for (uint32_t i = 0; i < cull.sdfgi.cascade_light_count; i++) {
- if (frustum_cull_result.sdfgi_cascade_lights[i].size()) {
- static_lights_culled = true;
- break;
- }
- }
+ // Directional Shadows
- if (static_lights_culled) {
- scene_render->render_sdfgi_static_lights(p_render_buffers, cull.sdfgi.cascade_light_count, cull.sdfgi.cascade_light_index, frustum_cull_result.sdfgi_cascade_lights);
+ for (uint32_t i = 0; i < cull.shadow_count; i++) {
+ for (uint32_t j = 0; j < cull.shadows[i].cascade_count; j++) {
+ const Cull::Shadow::Cascade &c = cull.shadows[i].cascades[j];
+ // print_line("shadow " + itos(i) + " cascade " + itos(j) + " elements: " + itos(c.cull_result.size()));
+ scene_render->light_instance_set_shadow_transform(cull.shadows[i].light_instance, c.projection, c.transform, c.zfar, c.split, j, c.shadow_texel_size, c.bias_scale, c.range_begin, c.uv_scale);
+ if (max_shadows_used == MAX_UPDATE_SHADOWS) {
+ continue;
+ }
+ render_shadow_data[max_shadows_used].light = cull.shadows[i].light_instance;
+ render_shadow_data[max_shadows_used].pass = j;
+ render_shadow_data[max_shadows_used].instances.merge_unordered(frustum_cull_result.directional_shadows[i].cascade_geometry_instances[j]);
+ max_shadows_used++;
}
}
- if (p_render_buffers.is_valid()) {
- scene_render->sdfgi_update_probes(p_render_buffers, p_environment, directional_lights, scenario->dynamic_lights.ptr(), scenario->dynamic_lights.size());
- }
- }
-
- //light_samplers_culled=0;
-
- /*
- print_line("OT: "+rtos( (OS::get_singleton()->get_ticks_usec()-t)/1000.0));
- print_line("OTO: "+itos(p_scenario->octree.get_octant_count()));
- print_line("OTE: "+itos(p_scenario->octree.get_elem_count()));
- print_line("OTP: "+itos(p_scenario->octree.get_pair_count()));
- */
-
- /* STEP 3 - PROCESS PORTALS, VALIDATE ROOMS */
- //removed, will replace with culling
-
- /* STEP 4 - REMOVE FURTHER CULLED OBJECTS, ADD LIGHTS */
-
- /* STEP 5 - PROCESS POSITIONAL LIGHTS */
-
- if (p_using_shadows) { //setup shadow maps
-
- //SortArray<Instance*,_InstanceLightsort> sorter;
- //sorter.sort(light_cull_result,light_cull_count);
+ // Positional Shadowss
for (uint32_t i = 0; i < (uint32_t)frustum_cull_result.lights.size(); i++) {
Instance *ins = frustum_cull_result.lights[i];
@@ -2737,19 +2722,78 @@ void RendererSceneCull::_prepare_scene(const Transform p_cam_transform, const Ca
bool redraw = scene_render->shadow_atlas_update_light(p_shadow_atlas, light->instance, coverage, light->last_version);
- if (redraw) {
+ if (redraw && max_shadows_used < MAX_UPDATE_SHADOWS) {
//must redraw!
RENDER_TIMESTAMP(">Rendering Light " + itos(i));
light->shadow_dirty = _light_instance_update_shadow(ins, p_cam_transform, p_cam_projection, p_cam_orthogonal, p_cam_vaspect, p_shadow_atlas, scenario, p_screen_lod_threshold);
RENDER_TIMESTAMP("<Rendering Light " + itos(i));
+ } else {
+ light->shadow_dirty = redraw;
}
}
}
+ //render SDFGI
+
+ {
+ sdfgi_update_data.update_static = false;
+
+ if (cull.sdfgi.region_count > 0) {
+ //update regions
+ for (uint32_t i = 0; i < cull.sdfgi.region_count; i++) {
+ render_sdfgi_data[i].instances.merge_unordered(frustum_cull_result.sdfgi_region_geometry_instances[i]);
+ render_sdfgi_data[i].region = i;
+ }
+ //check if static lights were culled
+ bool static_lights_culled = false;
+ for (uint32_t i = 0; i < cull.sdfgi.cascade_light_count; i++) {
+ if (frustum_cull_result.sdfgi_cascade_lights[i].size()) {
+ static_lights_culled = true;
+ break;
+ }
+ }
+
+ if (static_lights_culled) {
+ sdfgi_update_data.static_cascade_count = cull.sdfgi.cascade_light_count;
+ sdfgi_update_data.static_cascade_indices = cull.sdfgi.cascade_light_index;
+ sdfgi_update_data.static_positional_lights = frustum_cull_result.sdfgi_cascade_lights;
+ sdfgi_update_data.update_static = true;
+ }
+ }
+
+ if (p_render_buffers.is_valid()) {
+ sdfgi_update_data.directional_lights = &directional_lights;
+ sdfgi_update_data.positional_light_instances = scenario->dynamic_lights.ptr();
+ sdfgi_update_data.positional_light_count = scenario->dynamic_lights.size();
+ }
+ }
+
//append the directional lights to the lights culled
for (int i = 0; i < directional_lights.size(); i++) {
frustum_cull_result.light_instances.push_back(directional_lights[i]);
}
+
+ RID camera_effects;
+ if (p_force_camera_effects.is_valid()) {
+ camera_effects = p_force_camera_effects;
+ } else {
+ camera_effects = scenario->camera_effects;
+ }
+ /* PROCESS GEOMETRY AND DRAW SCENE */
+
+ RENDER_TIMESTAMP("Render Scene ");
+ scene_render->render_scene(p_render_buffers, p_cam_transform, p_cam_projection, p_cam_orthogonal, frustum_cull_result.geometry_instances, frustum_cull_result.light_instances, frustum_cull_result.reflections, frustum_cull_result.gi_probes, frustum_cull_result.decals, frustum_cull_result.lightmaps, p_environment, camera_effects, p_shadow_atlas, p_reflection_probe.is_valid() ? RID() : scenario->reflection_atlas, p_reflection_probe, p_reflection_probe_pass, p_screen_lod_threshold, render_shadow_data, max_shadows_used, render_sdfgi_data, cull.sdfgi.region_count, &sdfgi_update_data);
+
+ for (uint32_t i = 0; i < max_shadows_used; i++) {
+ render_shadow_data[i].instances.clear();
+ }
+ max_shadows_used = 0;
+
+ for (uint32_t i = 0; i < cull.sdfgi.region_count; i++) {
+ render_sdfgi_data[i].instances.clear();
+ }
+
+ // virtual void render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold,const RenderShadowData *p_render_shadows,int p_render_shadow_count,const RenderSDFGIData *p_render_sdfgi_regions,int p_render_sdfgi_region_count,const RenderSDFGIStaticLightData *p_render_sdfgi_static_lights=nullptr) = 0;
}
RID RendererSceneCull::_render_get_environment(RID p_camera, RID p_scenario) {
@@ -2773,21 +2817,6 @@ RID RendererSceneCull::_render_get_environment(RID p_camera, RID p_scenario) {
return RID();
}
-void RendererSceneCull::_render_scene(RID p_render_buffers, const Transform p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, RID p_environment, RID p_force_camera_effects, RID p_scenario, RID p_shadow_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold) {
- Scenario *scenario = scenario_owner.getornull(p_scenario);
-
- RID camera_effects;
- if (p_force_camera_effects.is_valid()) {
- camera_effects = p_force_camera_effects;
- } else {
- camera_effects = scenario->camera_effects;
- }
- /* PROCESS GEOMETRY AND DRAW SCENE */
-
- RENDER_TIMESTAMP("Render Scene ");
- scene_render->render_scene(p_render_buffers, p_cam_transform, p_cam_projection, p_cam_orthogonal, frustum_cull_result.geometry_instances, frustum_cull_result.light_instances, frustum_cull_result.reflections, frustum_cull_result.gi_probes, frustum_cull_result.decals, frustum_cull_result.lightmaps, p_environment, camera_effects, p_shadow_atlas, p_reflection_probe.is_valid() ? RID() : scenario->reflection_atlas, p_reflection_probe, p_reflection_probe_pass, p_screen_lod_threshold);
-}
-
void RendererSceneCull::render_empty_scene(RID p_render_buffers, RID p_scenario, RID p_shadow_atlas) {
#ifndef _3D_DISABLED
@@ -2800,7 +2829,7 @@ void RendererSceneCull::render_empty_scene(RID p_render_buffers, RID p_scenario,
environment = scenario->fallback_environment;
}
RENDER_TIMESTAMP("Render Empty Scene ");
- scene_render->render_scene(p_render_buffers, Transform(), CameraMatrix(), true, PagedArray<RendererSceneRender::GeometryInstance *>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), RID(), RID(), p_shadow_atlas, scenario->reflection_atlas, RID(), 0, 0);
+ scene_render->render_scene(p_render_buffers, Transform(), CameraMatrix(), true, PagedArray<RendererSceneRender::GeometryInstance *>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), PagedArray<RID>(), RID(), RID(), p_shadow_atlas, scenario->reflection_atlas, RID(), 0, 0, nullptr, 0, nullptr, 0, nullptr);
#endif
}
@@ -2863,8 +2892,7 @@ bool RendererSceneCull::_render_reflection_probe_step(Instance *p_instance, int
}
RENDER_TIMESTAMP("Render Reflection Probe, Step " + itos(p_step));
- _prepare_scene(xform, cm, false, false, RID(), RID(), RSG::storage->reflection_probe_get_cull_mask(p_instance->base), p_instance->scenario->self, shadow_atlas, reflection_probe->instance, lod_threshold, use_shadows);
- _render_scene(RID(), xform, cm, false, RID(), RID(), p_instance->scenario->self, shadow_atlas, reflection_probe->instance, p_step, lod_threshold);
+ _render_scene(xform, cm, false, false, RID(), RID(), RID(), RSG::storage->reflection_probe_get_cull_mask(p_instance->base), p_instance->scenario->self, shadow_atlas, reflection_probe->instance, p_step, lod_threshold, use_shadows);
} else {
//do roughness postprocess step until it believes it's done
@@ -3492,7 +3520,12 @@ RendererSceneCull::RendererSceneCull() {
instance_cull_result.set_page_pool(&instance_cull_page_pool);
instance_shadow_cull_result.set_page_pool(&instance_cull_page_pool);
- geometry_instances_to_shadow_render.set_page_pool(&geometry_instance_cull_page_pool);
+ for (uint32_t i = 0; i < MAX_UPDATE_SHADOWS; i++) {
+ render_shadow_data[i].instances.set_page_pool(&geometry_instance_cull_page_pool);
+ }
+ for (uint32_t i = 0; i < SDFGI_MAX_CASCADES * SDFGI_MAX_REGIONS_PER_CASCADE; i++) {
+ render_sdfgi_data[i].instances.set_page_pool(&geometry_instance_cull_page_pool);
+ }
frustum_cull_result.init(&rid_cull_page_pool, &geometry_instance_cull_page_pool, &instance_cull_page_pool);
frustum_cull_result_threads.resize(RendererThreadPool::singleton->thread_work_pool.get_thread_count());
@@ -3500,8 +3533,8 @@ RendererSceneCull::RendererSceneCull() {
frustum_cull_result_threads[i].init(&rid_cull_page_pool, &geometry_instance_cull_page_pool, &instance_cull_page_pool);
}
- indexer_update_iterations = GLOBAL_GET("rendering/spatial_indexer/update_iterations_per_frame");
- thread_cull_threshold = GLOBAL_GET("rendering/spatial_indexer/threaded_cull_minimum_instances");
+ indexer_update_iterations = GLOBAL_GET("rendering/limits/spatial_indexer/update_iterations_per_frame");
+ thread_cull_threshold = GLOBAL_GET("rendering/limits/spatial_indexer/threaded_cull_minimum_instances");
thread_cull_threshold = MAX(thread_cull_threshold, (uint32_t)RendererThreadPool::singleton->thread_work_pool.get_thread_count()); //make sure there is at least one thread per CPU
}
@@ -3509,7 +3542,12 @@ RendererSceneCull::~RendererSceneCull() {
instance_cull_result.reset();
instance_shadow_cull_result.reset();
- geometry_instances_to_shadow_render.reset();
+ for (uint32_t i = 0; i < MAX_UPDATE_SHADOWS; i++) {
+ render_shadow_data[i].instances.reset();
+ }
+ for (uint32_t i = 0; i < SDFGI_MAX_CASCADES * SDFGI_MAX_REGIONS_PER_CASCADE; i++) {
+ render_sdfgi_data[i].instances.reset();
+ }
frustum_cull_result.reset();
for (uint32_t i = 0; i < frustum_cull_result_threads.size(); i++) {
diff --git a/servers/rendering/renderer_scene_cull.h b/servers/rendering/renderer_scene_cull.h
index 796fb14743..32f4334288 100644
--- a/servers/rendering/renderer_scene_cull.h
+++ b/servers/rendering/renderer_scene_cull.h
@@ -54,7 +54,8 @@ public:
enum {
SDFGI_MAX_CASCADES = 8,
SDFGI_MAX_REGIONS_PER_CASCADE = 3,
- MAX_INSTANCE_PAIRS = 32
+ MAX_INSTANCE_PAIRS = 32,
+ MAX_UPDATE_SHADOWS = 512
};
uint64_t render_pass;
@@ -93,9 +94,11 @@ public:
}
};
- mutable RID_PtrOwner<Camera> camera_owner;
+ mutable RID_PtrOwner<Camera, true> camera_owner;
+
+ virtual RID camera_allocate();
+ virtual void camera_initialize(RID p_rid);
- virtual RID camera_create();
virtual void camera_set_perspective(RID p_camera, float p_fovy_degrees, float p_z_near, float p_z_far);
virtual void camera_set_orthogonal(RID p_camera, float p_size, float p_z_near, float p_z_far);
virtual void camera_set_frustum(RID p_camera, float p_size, Vector2 p_offset, float p_z_near, float p_z_far);
@@ -295,14 +298,15 @@ public:
int indexer_update_iterations = 0;
- mutable RID_PtrOwner<Scenario> scenario_owner;
+ mutable RID_PtrOwner<Scenario, true> scenario_owner;
static void _instance_pair(Instance *p_A, Instance *p_B);
static void _instance_unpair(Instance *p_A, Instance *p_B);
void _instance_update_mesh_instance(Instance *p_instance);
- virtual RID scenario_create();
+ virtual RID scenario_allocate();
+ virtual void scenario_initialize(RID p_rid);
virtual void scenario_set_debug(RID p_scenario, RS::ScenarioDebugMode p_debug_mode);
virtual void scenario_set_environment(RID p_scenario, RID p_environment);
@@ -696,7 +700,6 @@ public:
PagedArray<Instance *> instance_cull_result;
PagedArray<Instance *> instance_shadow_cull_result;
- PagedArray<RendererSceneRender::GeometryInstance *> geometry_instances_to_shadow_render;
struct FrustumCullResult {
PagedArray<RendererSceneRender::GeometryInstance *> geometry_instances;
@@ -795,6 +798,7 @@ public:
lightmaps.set_page_pool(p_rid_pool);
reflections.set_page_pool(p_rid_pool);
decals.set_page_pool(p_rid_pool);
+ gi_probes.set_page_pool(p_rid_pool);
mesh_instances.set_page_pool(p_rid_pool);
for (int i = 0; i < RendererSceneRender::MAX_DIRECTIONAL_LIGHTS; i++) {
for (int j = 0; j < RendererSceneRender::MAX_DIRECTIONAL_LIGHT_CASCADES; j++) {
@@ -815,13 +819,20 @@ public:
FrustumCullResult frustum_cull_result;
LocalVector<FrustumCullResult> frustum_cull_result_threads;
+ RendererSceneRender::RenderShadowData render_shadow_data[MAX_UPDATE_SHADOWS];
+ uint32_t max_shadows_used = 0;
+
+ RendererSceneRender::RenderSDFGIData render_sdfgi_data[SDFGI_MAX_CASCADES * SDFGI_MAX_REGIONS_PER_CASCADE];
+ RendererSceneRender::RenderSDFGIUpdateData sdfgi_update_data;
+
uint32_t thread_cull_threshold = 200;
- RID_PtrOwner<Instance> instance_owner;
+ RID_PtrOwner<Instance, true> instance_owner;
uint32_t geometry_instance_pair_mask; // used in traditional forward, unnecesary on clustered
- virtual RID instance_create();
+ virtual RID instance_allocate();
+ virtual void instance_initialize(RID p_rid);
virtual void instance_set_base(RID p_instance, RID p_base);
virtual void instance_set_scenario(RID p_instance, RID p_scenario);
@@ -923,8 +934,7 @@ public:
void _frustum_cull(FrustumCullData &cull_data, FrustumCullResult &cull_result, uint64_t p_from, uint64_t p_to);
bool _render_reflection_probe_step(Instance *p_instance, int p_step);
- void _prepare_scene(const Transform p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, bool p_cam_vaspect, RID p_render_buffers, RID p_environment, uint32_t p_visible_layers, RID p_scenario, RID p_shadow_atlas, RID p_reflection_probe, float p_screen_lod_threshold, bool p_using_shadows = true);
- void _render_scene(RID p_render_buffers, const Transform p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, RID p_environment, RID p_force_camera_effects, RID p_scenario, RID p_shadow_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold);
+ void _render_scene(const Transform p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, bool p_cam_vaspect, RID p_render_buffers, RID p_environment, RID p_force_camera_effects, uint32_t p_visible_layers, RID p_scenario, RID p_shadow_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold, bool p_using_shadows = true);
void render_empty_scene(RID p_render_buffers, RID p_scenario, RID p_shadow_atlas);
void render_camera(RID p_render_buffers, RID p_camera, RID p_scenario, Size2 p_viewport_size, float p_screen_lod_threshold, RID p_shadow_atlas);
@@ -946,18 +956,21 @@ public:
#define PASSBASE scene_render
- PASS1(directional_shadow_atlas_set_size, int)
+ PASS2(directional_shadow_atlas_set_size, int, bool)
PASS1(gi_probe_set_quality, RS::GIProbeQuality)
/* SKY API */
- PASS0R(RID, sky_create)
+ PASS0R(RID, sky_allocate)
+ PASS1(sky_initialize, RID)
+
PASS2(sky_set_radiance_size, RID, int)
PASS2(sky_set_mode, RID, RS::SkyMode)
PASS2(sky_set_material, RID, RID)
PASS4R(Ref<Image>, sky_bake_panorama, RID, float, bool, const Size2i &)
- PASS0R(RID, environment_create)
+ PASS0R(RID, environment_allocate)
+ PASS1(environment_initialize, RID)
PASS1RC(bool, is_environment, RID)
@@ -985,16 +998,15 @@ public:
PASS7(environment_set_adjustment, RID, bool, float, float, float, bool, RID)
PASS9(environment_set_fog, RID, bool, const Color &, float, float, float, float, float, float)
- PASS9(environment_set_volumetric_fog, RID, bool, float, const Color &, float, float, float, float, RS::EnvVolumetricFogShadowFilter)
+ PASS10(environment_set_volumetric_fog, RID, bool, float, const Color &, float, float, float, float, bool, float)
PASS2(environment_set_volumetric_fog_volume_size, int, int)
PASS1(environment_set_volumetric_fog_filter_active, bool)
- PASS1(environment_set_volumetric_fog_directional_shadow_shrink_size, int)
- PASS1(environment_set_volumetric_fog_positional_shadow_shrink_size, int)
- PASS11(environment_set_sdfgi, RID, bool, RS::EnvironmentSDFGICascades, float, RS::EnvironmentSDFGIYScale, bool, bool, bool, float, float, float)
+ PASS11(environment_set_sdfgi, RID, bool, RS::EnvironmentSDFGICascades, float, RS::EnvironmentSDFGIYScale, bool, float, bool, float, float, float)
PASS1(environment_set_sdfgi_ray_count, RS::EnvironmentSDFGIRayCount)
PASS1(environment_set_sdfgi_frames_to_converge, RS::EnvironmentSDFGIFramesToConverge)
+ PASS1(environment_set_sdfgi_frames_to_update_light, RS::EnvironmentSDFGIFramesToUpdateLight)
PASS1RC(RS::EnvironmentBG, environment_get_background, RID)
PASS1RC(int, environment_get_canvas_max_layer, RID)
@@ -1007,7 +1019,8 @@ public:
/* CAMERA EFFECTS */
- PASS0R(RID, camera_effects_create)
+ PASS0R(RID, camera_effects_allocate)
+ PASS1(camera_effects_initialize, RID)
PASS2(camera_effects_set_dof_blur_quality, RS::DOFBlurQuality, bool)
PASS1(camera_effects_set_dof_blur_bokeh_shape, RS::DOFBokehShape)
@@ -1024,10 +1037,11 @@ public:
PASS0R(RID, render_buffers_create)
PASS7(render_buffers_configure, RID, RID, int, int, RS::ViewportMSAA, RS::ViewportScreenSpaceAA, bool)
+ PASS1(gi_set_use_half_resolution, bool)
/* Shadow Atlas */
PASS0R(RID, shadow_atlas_create)
- PASS2(shadow_atlas_set_size, RID, int)
+ PASS3(shadow_atlas_set_size, RID, int, bool)
PASS3(shadow_atlas_set_quadrant_subdivision, RID, int, int)
PASS1(set_debug_draw_mode, RS::ViewportDebugDraw)
diff --git a/servers/rendering/renderer_scene_render.h b/servers/rendering/renderer_scene_render.h
index 85353c400d..1dea3580b6 100644
--- a/servers/rendering/renderer_scene_render.h
+++ b/servers/rendering/renderer_scene_render.h
@@ -71,13 +71,12 @@ public:
/* SHADOW ATLAS API */
- virtual RID
- shadow_atlas_create() = 0;
- virtual void shadow_atlas_set_size(RID p_atlas, int p_size) = 0;
+ virtual RID shadow_atlas_create() = 0;
+ virtual void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_16_bits = false) = 0;
virtual void shadow_atlas_set_quadrant_subdivision(RID p_atlas, int p_quadrant, int p_subdivision) = 0;
virtual bool shadow_atlas_update_light(RID p_atlas, RID p_light_intance, float p_coverage, uint64_t p_light_version) = 0;
- virtual void directional_shadow_atlas_set_size(int p_size) = 0;
+ virtual void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = false) = 0;
virtual int get_directional_light_shadow_size(RID p_light_intance) = 0;
virtual void set_directional_shadow_count(int p_count) = 0;
@@ -87,11 +86,12 @@ public:
virtual int sdfgi_get_pending_region_count(RID p_render_buffers) const = 0;
virtual AABB sdfgi_get_pending_region_bounds(RID p_render_buffers, int p_region) const = 0;
virtual uint32_t sdfgi_get_pending_region_cascade(RID p_render_buffers, int p_region) const = 0;
- virtual void sdfgi_update_probes(RID p_render_buffers, RID p_environment, const Vector<RID> &p_directional_lights, const RID *p_positional_light_instances, uint32_t p_positional_light_count) = 0;
/* SKY API */
- virtual RID sky_create() = 0;
+ virtual RID sky_allocate() = 0;
+ virtual void sky_initialize(RID p_rid) = 0;
+
virtual void sky_set_radiance_size(RID p_sky, int p_radiance_size) = 0;
virtual void sky_set_mode(RID p_sky, RS::SkyMode p_samples) = 0;
virtual void sky_set_material(RID p_sky, RID p_material) = 0;
@@ -99,7 +99,8 @@ public:
/* ENVIRONMENT API */
- virtual RID environment_create() = 0;
+ virtual RID environment_allocate() = 0;
+ virtual void environment_initialize(RID p_rid) = 0;
virtual void environment_set_background(RID p_env, RS::EnvironmentBG p_bg) = 0;
virtual void environment_set_sky(RID p_env, RID p_sky) = 0;
@@ -118,12 +119,9 @@ public:
virtual void environment_glow_set_use_bicubic_upscale(bool p_enable) = 0;
virtual void environment_glow_set_use_high_quality(bool p_enable) = 0;
- virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, RS::EnvVolumetricFogShadowFilter p_shadow_filter) = 0;
-
+ virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount) = 0;
virtual void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) = 0;
virtual void environment_set_volumetric_fog_filter_active(bool p_enable) = 0;
- virtual void environment_set_volumetric_fog_directional_shadow_shrink_size(int p_shrink_size) = 0;
- virtual void environment_set_volumetric_fog_positional_shadow_shrink_size(int p_shrink_size) = 0;
virtual void environment_set_ssr(RID p_env, bool p_enable, int p_max_steps, float p_fade_int, float p_fade_out, float p_depth_tolerance) = 0;
virtual void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) = 0;
@@ -132,10 +130,11 @@ public:
virtual void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) = 0;
- virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, bool p_use_multibounce, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
+ virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) = 0;
virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) = 0;
+ virtual void environment_set_sdfgi_frames_to_update_light(RS::EnvironmentSDFGIFramesToUpdateLight p_update) = 0;
virtual void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) = 0;
@@ -149,7 +148,8 @@ public:
virtual RS::EnvironmentBG environment_get_background(RID p_env) const = 0;
virtual int environment_get_canvas_max_layer(RID p_env) const = 0;
- virtual RID camera_effects_create() = 0;
+ virtual RID camera_effects_allocate() = 0;
+ virtual void camera_effects_initialize(RID p_rid) = 0;
virtual void camera_effects_set_dof_blur_quality(RS::DOFBlurQuality p_quality, bool p_use_jitter) = 0;
virtual void camera_effects_set_dof_blur_bokeh_shape(RS::DOFBokehShape p_shape) = 0;
@@ -194,12 +194,31 @@ public:
virtual void gi_probe_set_quality(RS::GIProbeQuality) = 0;
- virtual void render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold) = 0;
+ struct RenderShadowData {
+ RID light;
+ int pass = 0;
+ PagedArray<GeometryInstance *> instances;
+ };
+
+ struct RenderSDFGIData {
+ int region = 0;
+ PagedArray<GeometryInstance *> instances;
+ };
+
+ struct RenderSDFGIUpdateData {
+ bool update_static = false;
+ uint32_t static_cascade_count;
+ uint32_t *static_cascade_indices;
+ PagedArray<RID> *static_positional_lights;
+
+ const Vector<RID> *directional_lights;
+ const RID *positional_light_instances;
+ uint32_t positional_light_count;
+ };
+
+ virtual void render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, const PagedArray<RID> &p_lights, const PagedArray<RID> &p_reflection_probes, const PagedArray<RID> &p_gi_probes, const PagedArray<RID> &p_decals, const PagedArray<RID> &p_lightmaps, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass, float p_screen_lod_threshold, const RenderShadowData *p_render_shadows, int p_render_shadow_count, const RenderSDFGIData *p_render_sdfgi_regions, int p_render_sdfgi_region_count, const RenderSDFGIUpdateData *p_sdfgi_update_data = nullptr) = 0;
- virtual void render_shadow(RID p_light, RID p_shadow_atlas, int p_pass, const PagedArray<GeometryInstance *> &p_instances, const Plane &p_camera_plane = Plane(), float p_lod_distance_multiplier = 0, float p_screen_lod_threshold = 0.0) = 0;
virtual void render_material(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, const PagedArray<GeometryInstance *> &p_instances, RID p_framebuffer, const Rect2i &p_region) = 0;
- virtual void render_sdfgi(RID p_render_buffers, int p_region, const PagedArray<GeometryInstance *> &p_instances) = 0;
- virtual void render_sdfgi_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const PagedArray<RID> *p_positional_lights) = 0;
virtual void render_particle_collider_heightfield(RID p_collider, const Transform &p_transform, const PagedArray<GeometryInstance *> &p_instances) = 0;
virtual void set_scene_pass(uint64_t p_pass) = 0;
@@ -208,6 +227,7 @@ public:
virtual RID render_buffers_create() = 0;
virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_width, int p_height, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa, bool p_use_debanding) = 0;
+ virtual void gi_set_use_half_resolution(bool p_enable) = 0;
virtual void screen_space_roughness_limiter_set_active(bool p_enable, float p_amount, float p_limit) = 0;
virtual bool screen_space_roughness_limiter_is_active() const = 0;
diff --git a/servers/rendering/renderer_storage.h b/servers/rendering/renderer_storage.h
index 64c23c7803..69ad2cc191 100644
--- a/servers/rendering/renderer_storage.h
+++ b/servers/rendering/renderer_storage.h
@@ -98,6 +98,7 @@ public:
while (to_clean_up.size()) {
to_clean_up.front()->get().first->instances.erase(to_clean_up.front()->get().second);
+ dependencies.erase(to_clean_up.front()->get().first);
to_clean_up.pop_front();
}
}
@@ -118,12 +119,15 @@ public:
Set<Dependency *> dependencies;
};
+ virtual bool can_create_resources_async() const = 0;
/* TEXTURE API */
- virtual RID texture_2d_create(const Ref<Image> &p_image) = 0;
- virtual RID texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type) = 0;
- virtual RID texture_3d_create(Image::Format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data) = 0;
- virtual RID texture_proxy_create(RID p_base) = 0; //all slices, then all the mipmaps, must be coherent
+ virtual RID texture_allocate() = 0;
+
+ virtual void texture_2d_initialize(RID p_texture, const Ref<Image> &p_image) = 0;
+ virtual void texture_2d_layered_initialize(RID p_texture, const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type) = 0;
+ virtual void texture_3d_initialize(RID p_texture, Image::Format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data) = 0;
+ virtual void texture_proxy_initialize(RID p_texture, RID p_base) = 0; //all slices, then all the mipmaps, must be coherent
virtual void texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) = 0; //mostly used for video and streaming
virtual void texture_2d_update(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) = 0;
@@ -131,9 +135,9 @@ public:
virtual void texture_proxy_update(RID p_proxy, RID p_base) = 0;
//these two APIs can be used together or in combination with the others.
- virtual RID texture_2d_placeholder_create() = 0;
- virtual RID texture_2d_layered_placeholder_create(RenderingServer::TextureLayeredType p_layered_type) = 0;
- virtual RID texture_3d_placeholder_create() = 0;
+ virtual void texture_2d_placeholder_initialize(RID p_texture) = 0;
+ virtual void texture_2d_layered_placeholder_initialize(RID p_texture, RenderingServer::TextureLayeredType p_layered_type) = 0;
+ virtual void texture_3d_placeholder_initialize(RID p_texture) = 0;
virtual Ref<Image> texture_2d_get(RID p_texture) const = 0;
virtual Ref<Image> texture_2d_layer_get(RID p_texture, int p_layer) const = 0;
@@ -160,7 +164,9 @@ public:
/* CANVAS TEXTURE API */
- virtual RID canvas_texture_create() = 0;
+ virtual RID canvas_texture_allocate() = 0;
+ virtual void canvas_texture_initialize(RID p_rid) = 0;
+
virtual void canvas_texture_set_channel(RID p_canvas_texture, RS::CanvasTextureChannel p_channel, RID p_texture) = 0;
virtual void canvas_texture_set_shading_parameters(RID p_canvas_texture, const Color &p_base_color, float p_shininess) = 0;
@@ -169,7 +175,8 @@ public:
/* SHADER API */
- virtual RID shader_create() = 0;
+ virtual RID shader_allocate() = 0;
+ virtual void shader_initialize(RID p_rid) = 0;
virtual void shader_set_code(RID p_shader, const String &p_code) = 0;
virtual String shader_get_code(RID p_shader) const = 0;
@@ -183,7 +190,8 @@ public:
/* COMMON MATERIAL API */
- virtual RID material_create() = 0;
+ virtual RID material_allocate() = 0;
+ virtual void material_initialize(RID p_rid) = 0;
virtual void material_set_render_priority(RID p_material, int priority) = 0;
virtual void material_set_shader(RID p_shader_material, RID p_shader) = 0;
@@ -208,7 +216,8 @@ public:
/* MESH API */
- virtual RID mesh_create() = 0;
+ virtual RID mesh_allocate() = 0;
+ virtual void mesh_initialize(RID p_rid) = 0;
virtual void mesh_set_blend_shape_count(RID p_mesh, int p_blend_shape_count) = 0;
@@ -234,6 +243,8 @@ public:
virtual AABB mesh_get_aabb(RID p_mesh, RID p_skeleton = RID()) = 0;
+ virtual void mesh_set_shadow_mesh(RID p_mesh, RID p_shadow_mesh) = 0;
+
virtual void mesh_clear(RID p_mesh) = 0;
virtual bool mesh_needs_instance(RID p_mesh, bool p_has_skeleton) = 0;
@@ -248,9 +259,10 @@ public:
/* MULTIMESH API */
- virtual RID multimesh_create() = 0;
+ virtual RID multimesh_allocate() = 0;
+ virtual void multimesh_initialize(RID p_rid) = 0;
- virtual void multimesh_allocate(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false) = 0;
+ virtual void multimesh_allocate_data(RID p_multimesh, int p_instances, RS::MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false) = 0;
virtual int multimesh_get_instance_count(RID p_multimesh) const = 0;
@@ -277,7 +289,9 @@ public:
/* IMMEDIATE API */
- virtual RID immediate_create() = 0;
+ virtual RID immediate_allocate() = 0;
+ virtual void immediate_initialize(RID p_rid) = 0;
+
virtual void immediate_begin(RID p_immediate, RS::PrimitiveType p_rimitive, RID p_texture = RID()) = 0;
virtual void immediate_vertex(RID p_immediate, const Vector3 &p_vertex) = 0;
virtual void immediate_normal(RID p_immediate, const Vector3 &p_normal) = 0;
@@ -293,8 +307,10 @@ public:
/* SKELETON API */
- virtual RID skeleton_create() = 0;
- virtual void skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) = 0;
+ virtual RID skeleton_allocate() = 0;
+ virtual void skeleton_initialize(RID p_rid) = 0;
+
+ virtual void skeleton_allocate_data(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) = 0;
virtual int skeleton_get_bone_count(RID p_skeleton) const = 0;
virtual void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform) = 0;
virtual Transform skeleton_bone_get_transform(RID p_skeleton, int p_bone) const = 0;
@@ -304,11 +320,14 @@ public:
/* Light API */
- virtual RID light_create(RS::LightType p_type) = 0;
+ virtual RID directional_light_allocate() = 0;
+ virtual void directional_light_initialize(RID p_rid) = 0;
+
+ virtual RID omni_light_allocate() = 0;
+ virtual void omni_light_initialize(RID p_rid) = 0;
- RID directional_light_create() { return light_create(RS::LIGHT_DIRECTIONAL); }
- RID omni_light_create() { return light_create(RS::LIGHT_OMNI); }
- RID spot_light_create() { return light_create(RS::LIGHT_SPOT); }
+ virtual RID spot_light_allocate() = 0;
+ virtual void spot_light_initialize(RID p_rid) = 0;
virtual void light_set_color(RID p_light, const Color &p_color) = 0;
virtual void light_set_param(RID p_light, RS::LightParam p_param, float p_value) = 0;
@@ -346,7 +365,8 @@ public:
/* PROBE API */
- virtual RID reflection_probe_create() = 0;
+ virtual RID reflection_probe_allocate() = 0;
+ virtual void reflection_probe_initialize(RID p_rid) = 0;
virtual void reflection_probe_set_update_mode(RID p_probe, RS::ReflectionProbeUpdateMode p_mode) = 0;
virtual void reflection_probe_set_resolution(RID p_probe, int p_resolution) = 0;
@@ -377,7 +397,9 @@ public:
/* DECAL API */
- virtual RID decal_create() = 0;
+ virtual RID decal_allocate() = 0;
+ virtual void decal_initialize(RID p_rid) = 0;
+
virtual void decal_set_extents(RID p_decal, const Vector3 &p_extents) = 0;
virtual void decal_set_texture(RID p_decal, RS::DecalTexture p_type, RID p_texture) = 0;
virtual void decal_set_emission_energy(RID p_decal, float p_energy) = 0;
@@ -392,9 +414,10 @@ public:
/* GI PROBE API */
- virtual RID gi_probe_create() = 0;
+ virtual RID gi_probe_allocate() = 0;
+ virtual void gi_probe_initialize(RID p_rid) = 0;
- virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0;
+ virtual void gi_probe_allocate_data(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0;
virtual AABB gi_probe_get_bounds(RID p_gi_probe) const = 0;
virtual Vector3i gi_probe_get_octree_size(RID p_gi_probe) const = 0;
@@ -437,9 +460,10 @@ public:
virtual uint32_t gi_probe_get_version(RID p_probe) = 0;
- /* LIGHTMAP CAPTURE */
+ /* LIGHTMAP */
- virtual RID lightmap_create() = 0;
+ virtual RID lightmap_allocate() = 0;
+ virtual void lightmap_initialize(RID p_rid) = 0;
virtual void lightmap_set_textures(RID p_lightmap, RID p_light, bool p_uses_spherical_haromics) = 0;
virtual void lightmap_set_probe_bounds(RID p_lightmap, const AABB &p_bounds) = 0;
@@ -457,7 +481,8 @@ public:
/* PARTICLES */
- virtual RID particles_create() = 0;
+ virtual RID particles_allocate() = 0;
+ virtual void particles_initialize(RID p_rid) = 0;
virtual void particles_set_emitting(RID p_particles, bool p_emitting) = 0;
virtual bool particles_get_emitting(RID p_particles) = 0;
@@ -504,7 +529,9 @@ public:
/* PARTICLES COLLISION */
- virtual RID particles_collision_create() = 0;
+ virtual RID particles_collision_allocate() = 0;
+ virtual void particles_collision_initialize(RID p_rid) = 0;
+
virtual void particles_collision_set_collision_type(RID p_particles_collision, RS::ParticlesCollisionType p_type) = 0;
virtual void particles_collision_set_cull_mask(RID p_particles_collision, uint32_t p_cull_mask) = 0;
virtual void particles_collision_set_sphere_radius(RID p_particles_collision, float p_radius) = 0; //for spheres
diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp
index 9956e4050b..a5d5033c18 100644
--- a/servers/rendering/renderer_viewport.cpp
+++ b/servers/rendering/renderer_viewport.cpp
@@ -457,7 +457,7 @@ void RendererViewport::draw_viewports() {
}
if (Engine::get_singleton()->is_editor_hint()) {
- set_default_clear_color(GLOBAL_GET("rendering/environment/default_clear_color"));
+ set_default_clear_color(GLOBAL_GET("rendering/environment/defaults/default_clear_color"));
}
//sort viewports
@@ -608,19 +608,20 @@ void RendererViewport::draw_viewports() {
}
}
-RID RendererViewport::viewport_create() {
- Viewport *viewport = memnew(Viewport);
-
- RID rid = viewport_owner.make_rid(viewport);
+RID RendererViewport::viewport_allocate() {
+ return viewport_owner.allocate_rid();
+}
- viewport->self = rid;
+void RendererViewport::viewport_initialize(RID p_rid) {
+ Viewport *viewport = memnew(Viewport);
+ viewport->self = p_rid;
viewport->hide_scenario = false;
viewport->hide_canvas = false;
viewport->render_target = RSG::storage->render_target_create();
viewport->shadow_atlas = RSG::scene->shadow_atlas_create();
viewport->viewport_render_direct_to_screen = false;
- return rid;
+ viewport_owner.initialize_rid(p_rid, viewport);
}
void RendererViewport::viewport_set_use_xr(RID p_viewport, bool p_use_xr) {
@@ -831,13 +832,14 @@ void RendererViewport::viewport_set_canvas_stacking(RID p_viewport, RID p_canvas
viewport->canvas_map[p_canvas].sublayer = p_sublayer;
}
-void RendererViewport::viewport_set_shadow_atlas_size(RID p_viewport, int p_size) {
+void RendererViewport::viewport_set_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits) {
Viewport *viewport = viewport_owner.getornull(p_viewport);
ERR_FAIL_COND(!viewport);
viewport->shadow_atlas_size = p_size;
+ viewport->shadow_atlas_16_bits = p_16_bits;
- RSG::scene->shadow_atlas_set_size(viewport->shadow_atlas, viewport->shadow_atlas_size);
+ RSG::scene->shadow_atlas_set_size(viewport->shadow_atlas, viewport->shadow_atlas_size, viewport->shadow_atlas_16_bits);
}
void RendererViewport::viewport_set_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv) {
@@ -1018,5 +1020,10 @@ void RendererViewport::set_default_clear_color(const Color &p_color) {
RSG::storage->set_default_clear_color(p_color);
}
+//workaround for setting this on thread
+void RendererViewport::call_set_use_vsync(bool p_enable) {
+ DisplayServer::get_singleton()->_set_use_vsync(p_enable);
+}
+
RendererViewport::RendererViewport() {
}
diff --git a/servers/rendering/renderer_viewport.h b/servers/rendering/renderer_viewport.h
index c3ff52a836..f5ed543e8d 100644
--- a/servers/rendering/renderer_viewport.h
+++ b/servers/rendering/renderer_viewport.h
@@ -81,6 +81,7 @@ public:
RID shadow_atlas;
int shadow_atlas_size;
+ bool shadow_atlas_16_bits = false;
bool sdf_active;
@@ -164,7 +165,7 @@ public:
uint64_t draw_viewports_pass = 0;
- mutable RID_PtrOwner<Viewport> viewport_owner;
+ mutable RID_PtrOwner<Viewport, true> viewport_owner;
struct ViewportSort {
_FORCE_INLINE_ bool operator()(const Viewport *p_left, const Viewport *p_right) const {
@@ -185,7 +186,8 @@ private:
void _draw_viewport(Viewport *p_viewport, XRInterface::Eyes p_eye = XRInterface::EYE_MONO);
public:
- RID viewport_create();
+ RID viewport_allocate();
+ void viewport_initialize(RID p_rid);
void viewport_set_use_xr(RID p_viewport, bool p_use_xr);
@@ -217,7 +219,7 @@ public:
void viewport_set_global_canvas_transform(RID p_viewport, const Transform2D &p_transform);
void viewport_set_canvas_stacking(RID p_viewport, RID p_canvas, int p_layer, int p_sublayer);
- void viewport_set_shadow_atlas_size(RID p_viewport, int p_size);
+ void viewport_set_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits = false);
void viewport_set_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv);
void viewport_set_msaa(RID p_viewport, RS::ViewportMSAA p_msaa);
@@ -248,6 +250,9 @@ public:
bool free(RID p_rid);
+ //workaround for setting this on thread
+ void call_set_use_vsync(bool p_enable);
+
RendererViewport();
virtual ~RendererViewport() {}
};
diff --git a/servers/rendering/rendering_device.cpp b/servers/rendering/rendering_device.cpp
index 9ae3e5819e..4b0eafe369 100644
--- a/servers/rendering/rendering_device.cpp
+++ b/servers/rendering/rendering_device.cpp
@@ -174,8 +174,8 @@ RID RenderingDevice::_uniform_set_create(const Array &p_uniforms, RID p_shader,
return uniform_set_create(uniforms, p_shader, p_shader_set);
}
-Error RenderingDevice::_buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const Vector<uint8_t> &p_data, bool p_sync_with_draw) {
- return buffer_update(p_buffer, p_offset, p_size, p_data.ptr(), p_sync_with_draw);
+Error RenderingDevice::_buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const Vector<uint8_t> &p_data, uint32_t p_post_barrier) {
+ return buffer_update(p_buffer, p_offset, p_size, p_data.ptr(), p_post_barrier);
}
RID RenderingDevice::_render_pipeline_create(RID p_shader, FramebufferFormatID p_framebuffer_format, VertexFormatID p_vertex_format, RenderPrimitive p_render_primitive, const Ref<RDPipelineRasterizationState> &p_rasterization_state, const Ref<RDPipelineMultisampleState> &p_multisample_state, const Ref<RDPipelineDepthStencilState> &p_depth_stencil_state, const Ref<RDPipelineColorBlendState> &p_blend_state, int p_dynamic_state_flags) {
@@ -240,16 +240,12 @@ void RenderingDevice::_compute_list_set_push_constant(ComputeListID p_list, cons
compute_list_set_push_constant(p_list, p_data.ptr(), p_data_size);
}
-void RenderingDevice::compute_list_dispatch_threads(ComputeListID p_list, uint32_t p_x_threads, uint32_t p_y_threads, uint32_t p_z_threads, uint32_t p_x_local_group, uint32_t p_y_local_group, uint32_t p_z_local_group) {
- compute_list_dispatch(p_list, (p_x_threads - 1) / p_x_local_group + 1, (p_y_threads - 1) / p_y_local_group + 1, (p_z_threads - 1) / p_z_local_group + 1);
-}
-
void RenderingDevice::_bind_methods() {
ClassDB::bind_method(D_METHOD("texture_create", "format", "view", "data"), &RenderingDevice::_texture_create, DEFVAL(Array()));
ClassDB::bind_method(D_METHOD("texture_create_shared", "view", "with_texture"), &RenderingDevice::_texture_create_shared);
ClassDB::bind_method(D_METHOD("texture_create_shared_from_slice", "view", "with_texture", "layer", "mipmap", "slice_type"), &RenderingDevice::_texture_create_shared_from_slice, DEFVAL(TEXTURE_SLICE_2D));
- ClassDB::bind_method(D_METHOD("texture_update", "texture", "layer", "data", "sync_with_draw"), &RenderingDevice::texture_update, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("texture_update", "texture", "layer", "data", "post_barrier"), &RenderingDevice::texture_update, DEFVAL(BARRIER_MASK_ALL));
ClassDB::bind_method(D_METHOD("texture_get_data", "texture", "layer"), &RenderingDevice::texture_get_data);
ClassDB::bind_method(D_METHOD("texture_is_format_supported_for_usage", "format", "usage_flags"), &RenderingDevice::texture_is_format_supported_for_usage);
@@ -257,9 +253,9 @@ void RenderingDevice::_bind_methods() {
ClassDB::bind_method(D_METHOD("texture_is_shared", "texture"), &RenderingDevice::texture_is_shared);
ClassDB::bind_method(D_METHOD("texture_is_valid", "texture"), &RenderingDevice::texture_is_valid);
- ClassDB::bind_method(D_METHOD("texture_copy", "from_texture", "to_texture", "from_pos", "to_pos", "size", "src_mipmap", "dst_mipmap", "src_layer", "dst_layer", "sync_with_draw"), &RenderingDevice::texture_copy, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("texture_clear", "texture", "color", "base_mipmap", "mipmap_count", "base_layer", "layer_count", "sync_with_draw"), &RenderingDevice::texture_clear, DEFVAL(false));
- ClassDB::bind_method(D_METHOD("texture_resolve_multisample", "from_texture", "to_texture", "sync_with_draw"), &RenderingDevice::texture_resolve_multisample, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("texture_copy", "from_texture", "to_texture", "from_pos", "to_pos", "size", "src_mipmap", "dst_mipmap", "src_layer", "dst_layer", "post_barrier"), &RenderingDevice::texture_copy, DEFVAL(BARRIER_MASK_ALL));
+ ClassDB::bind_method(D_METHOD("texture_clear", "texture", "color", "base_mipmap", "mipmap_count", "base_layer", "layer_count", "post_barrier"), &RenderingDevice::texture_clear, DEFVAL(BARRIER_MASK_ALL));
+ ClassDB::bind_method(D_METHOD("texture_resolve_multisample", "from_texture", "to_texture", "post_barrier"), &RenderingDevice::texture_resolve_multisample, DEFVAL(BARRIER_MASK_ALL));
ClassDB::bind_method(D_METHOD("framebuffer_format_create", "attachments"), &RenderingDevice::_framebuffer_format_create);
ClassDB::bind_method(D_METHOD("framebuffer_format_create_empty", "samples"), &RenderingDevice::framebuffer_format_create_empty, DEFVAL(TEXTURE_SAMPLES_1));
@@ -287,8 +283,8 @@ void RenderingDevice::_bind_methods() {
ClassDB::bind_method(D_METHOD("uniform_set_create", "uniforms", "shader", "shader_set"), &RenderingDevice::_uniform_set_create);
ClassDB::bind_method(D_METHOD("uniform_set_is_valid", "uniform_set"), &RenderingDevice::uniform_set_is_valid);
- ClassDB::bind_method(D_METHOD("buffer_update", "buffer", "offset", "size_bytes", "data", "sync_with_draw"), &RenderingDevice::_buffer_update, DEFVAL(true));
- ClassDB::bind_method(D_METHOD("buffer_clear", "buffer", "offset", "size_bytes", "sync_with_draw"), &RenderingDevice::_buffer_update, DEFVAL(true));
+ ClassDB::bind_method(D_METHOD("buffer_update", "buffer", "offset", "size_bytes", "data", "post_barrier"), &RenderingDevice::_buffer_update, DEFVAL(BARRIER_MASK_ALL));
+ ClassDB::bind_method(D_METHOD("buffer_clear", "buffer", "offset", "size_bytes", "post_barrier"), &RenderingDevice::buffer_clear, DEFVAL(BARRIER_MASK_ALL));
ClassDB::bind_method(D_METHOD("buffer_get_data", "buffer"), &RenderingDevice::buffer_get_data);
ClassDB::bind_method(D_METHOD("render_pipeline_create", "shader", "framebuffer_format", "vertex_format", "primitive", "rasterization_state", "multisample_state", "stencil_state", "color_blend_state", "dynamic_state_flags"), &RenderingDevice::_render_pipeline_create, DEFVAL(0));
@@ -317,19 +313,19 @@ void RenderingDevice::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_list_enable_scissor", "draw_list", "rect"), &RenderingDevice::draw_list_enable_scissor, DEFVAL(Rect2i()));
ClassDB::bind_method(D_METHOD("draw_list_disable_scissor", "draw_list"), &RenderingDevice::draw_list_disable_scissor);
- ClassDB::bind_method(D_METHOD("draw_list_end"), &RenderingDevice::draw_list_end);
+ ClassDB::bind_method(D_METHOD("draw_list_end", "post_barrier"), &RenderingDevice::draw_list_end, DEFVAL(BARRIER_MASK_ALL));
- ClassDB::bind_method(D_METHOD("compute_list_begin"), &RenderingDevice::compute_list_begin);
+ ClassDB::bind_method(D_METHOD("compute_list_begin", "allow_draw_overlap"), &RenderingDevice::compute_list_begin, DEFVAL(false));
ClassDB::bind_method(D_METHOD("compute_list_bind_compute_pipeline", "compute_list", "compute_pipeline"), &RenderingDevice::compute_list_bind_compute_pipeline);
ClassDB::bind_method(D_METHOD("compute_list_set_push_constant", "compute_list", "buffer", "size_bytes"), &RenderingDevice::_compute_list_set_push_constant);
ClassDB::bind_method(D_METHOD("compute_list_bind_uniform_set", "compute_list", "uniform_set", "set_index"), &RenderingDevice::compute_list_bind_uniform_set);
ClassDB::bind_method(D_METHOD("compute_list_dispatch", "compute_list", "x_groups", "y_groups", "z_groups"), &RenderingDevice::compute_list_dispatch);
ClassDB::bind_method(D_METHOD("compute_list_add_barrier", "compute_list"), &RenderingDevice::compute_list_add_barrier);
- ClassDB::bind_method(D_METHOD("compute_list_end"), &RenderingDevice::compute_list_end);
+ ClassDB::bind_method(D_METHOD("compute_list_end", "post_barrier"), &RenderingDevice::compute_list_end, DEFVAL(BARRIER_MASK_ALL));
ClassDB::bind_method(D_METHOD("free", "rid"), &RenderingDevice::free);
- ClassDB::bind_method(D_METHOD("capture_timestamp", "name", "sync_to_draw"), &RenderingDevice::capture_timestamp);
+ ClassDB::bind_method(D_METHOD("capture_timestamp", "name"), &RenderingDevice::capture_timestamp);
ClassDB::bind_method(D_METHOD("get_captured_timestamps_count"), &RenderingDevice::get_captured_timestamps_count);
ClassDB::bind_method(D_METHOD("get_captured_timestamps_frame"), &RenderingDevice::get_captured_timestamps_frame);
ClassDB::bind_method(D_METHOD("get_captured_timestamp_gpu_time", "index"), &RenderingDevice::get_captured_timestamp_gpu_time);
@@ -341,8 +337,27 @@ void RenderingDevice::_bind_methods() {
ClassDB::bind_method(D_METHOD("submit"), &RenderingDevice::submit);
ClassDB::bind_method(D_METHOD("sync"), &RenderingDevice::sync);
+ ClassDB::bind_method(D_METHOD("barrier", "from", "to"), &RenderingDevice::barrier, DEFVAL(BARRIER_MASK_ALL), DEFVAL(BARRIER_MASK_ALL));
+ ClassDB::bind_method(D_METHOD("full_barrier"), &RenderingDevice::full_barrier);
+
ClassDB::bind_method(D_METHOD("create_local_device"), &RenderingDevice::create_local_device);
+ ClassDB::bind_method(D_METHOD("set_resource_name", "id", "name"), &RenderingDevice::set_resource_name);
+
+ ClassDB::bind_method(D_METHOD("draw_command_begin_label", "name", "color"), &RenderingDevice::draw_command_begin_label);
+ ClassDB::bind_method(D_METHOD("draw_command_insert_label", "name", "color"), &RenderingDevice::draw_command_insert_label);
+ ClassDB::bind_method(D_METHOD("draw_command_end_label"), &RenderingDevice::draw_command_end_label);
+
+ ClassDB::bind_method(D_METHOD("get_device_vendor_name"), &RenderingDevice::get_device_vendor_name);
+ ClassDB::bind_method(D_METHOD("get_device_name"), &RenderingDevice::get_device_name);
+ ClassDB::bind_method(D_METHOD("get_device_pipeline_cache_uuid"), &RenderingDevice::get_device_pipeline_cache_uuid);
+
+ BIND_CONSTANT(BARRIER_MASK_RASTER);
+ BIND_CONSTANT(BARRIER_MASK_COMPUTE);
+ BIND_CONSTANT(BARRIER_MASK_TRANSFER);
+ BIND_CONSTANT(BARRIER_MASK_ALL);
+ BIND_CONSTANT(BARRIER_MASK_NO_BARRIER);
+
BIND_ENUM_CONSTANT(DATA_FORMAT_R4G4_UNORM_PACK8);
BIND_ENUM_CONSTANT(DATA_FORMAT_R4G4B4A4_UNORM_PACK16);
BIND_ENUM_CONSTANT(DATA_FORMAT_B4G4R4A4_UNORM_PACK16);
@@ -745,6 +760,8 @@ void RenderingDevice::_bind_methods() {
BIND_ENUM_CONSTANT(DYNAMIC_STATE_STENCIL_REFERENCE);
BIND_ENUM_CONSTANT(INITIAL_ACTION_CLEAR); //start rendering and clear the framebuffer (supply params)
+ BIND_ENUM_CONSTANT(INITIAL_ACTION_CLEAR_REGION); //start rendering and clear the framebuffer (supply params)
+ BIND_ENUM_CONSTANT(INITIAL_ACTION_CLEAR_REGION_CONTINUE); //continue rendering and clear the framebuffer (supply params)
BIND_ENUM_CONSTANT(INITIAL_ACTION_KEEP); //start rendering); but keep attached color texture contents (depth will be cleared)
BIND_ENUM_CONSTANT(INITIAL_ACTION_DROP); //start rendering); ignore what is there); just write above it
BIND_ENUM_CONSTANT(INITIAL_ACTION_CONTINUE); //continue rendering (framebuffer must have been left in "continue" state as final action previously)
diff --git a/servers/rendering/rendering_device.h b/servers/rendering/rendering_device.h
index f67e4dfbab..9fbf58d131 100644
--- a/servers/rendering/rendering_device.h
+++ b/servers/rendering/rendering_device.h
@@ -336,6 +336,18 @@ public:
};
/*****************/
+ /**** BARRIER ****/
+ /*****************/
+
+ enum BarrierMask {
+ BARRIER_MASK_RASTER = 1,
+ BARRIER_MASK_COMPUTE = 2,
+ BARRIER_MASK_TRANSFER = 4,
+ BARRIER_MASK_NO_BARRIER = 8,
+ BARRIER_MASK_ALL = BARRIER_MASK_RASTER | BARRIER_MASK_COMPUTE | BARRIER_MASK_TRANSFER
+ };
+
+ /*****************/
/**** TEXTURE ****/
/*****************/
@@ -438,16 +450,16 @@ public:
virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D) = 0;
- virtual Error texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the beginning of the frame, unless sync with draw is used, which is used to mix updates with draw calls
+ virtual Error texture_update(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
virtual Vector<uint8_t> texture_get_data(RID p_texture, uint32_t p_layer) = 0; // CPU textures will return immediately, while GPU textures will most likely force a flush
virtual bool texture_is_format_supported_for_usage(DataFormat p_format, uint32_t p_usage) const = 0;
virtual bool texture_is_shared(RID p_texture) = 0;
virtual bool texture_is_valid(RID p_texture) = 0;
- virtual Error texture_copy(RID p_from_texture, RID p_to_texture, const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_size, uint32_t p_src_mipmap, uint32_t p_dst_mipmap, uint32_t p_src_layer, uint32_t p_dst_layer, bool p_sync_with_draw = false) = 0;
- virtual Error texture_clear(RID p_texture, const Color &p_color, uint32_t p_base_mipmap, uint32_t p_mipmaps, uint32_t p_base_layer, uint32_t p_layers, bool p_sync_with_draw = false) = 0;
- virtual Error texture_resolve_multisample(RID p_from_texture, RID p_to_texture, bool p_sync_with_draw = false) = 0;
+ virtual Error texture_copy(RID p_from_texture, RID p_to_texture, const Vector3 &p_from, const Vector3 &p_to, const Vector3 &p_size, uint32_t p_src_mipmap, uint32_t p_dst_mipmap, uint32_t p_src_layer, uint32_t p_dst_layer, uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
+ virtual Error texture_clear(RID p_texture, const Color &p_color, uint32_t p_base_mipmap, uint32_t p_mipmaps, uint32_t p_base_layer, uint32_t p_layers, uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
+ virtual Error texture_resolve_multisample(RID p_from_texture, RID p_to_texture, uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
/*********************/
/**** FRAMEBUFFER ****/
@@ -649,8 +661,8 @@ public:
virtual RID uniform_set_create(const Vector<Uniform> &p_uniforms, RID p_shader, uint32_t p_shader_set) = 0;
virtual bool uniform_set_is_valid(RID p_uniform_set) = 0;
- virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, bool p_sync_with_draw = false) = 0; //this function can be used from any thread and it takes effect at the beginning of the frame, unless sync with draw is used, which is used to mix updates with draw calls
- virtual Error buffer_clear(RID p_buffer, uint32_t p_offset, uint32_t p_size, bool p_sync_with_draw = false) = 0;
+ virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
+ virtual Error buffer_clear(RID p_buffer, uint32_t p_offset, uint32_t p_size, uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
virtual Vector<uint8_t> buffer_get_data(RID p_buffer) = 0; //this causes stall, only use to retrieve large buffers for saving
/*************************/
@@ -931,7 +943,9 @@ public:
/********************/
enum InitialAction {
- INITIAL_ACTION_CLEAR, //start rendering and clear the framebuffer (supply params)
+ INITIAL_ACTION_CLEAR, //start rendering and clear the whole framebuffer (region or not) (supply params)
+ INITIAL_ACTION_CLEAR_REGION, //start rendering and clear the framebuffer in the specified region (supply params)
+ INITIAL_ACTION_CLEAR_REGION_CONTINUE, //countinue rendering and clear the framebuffer in the specified region (supply params)
INITIAL_ACTION_KEEP, //start rendering, but keep attached color texture contents (depth will be cleared)
INITIAL_ACTION_DROP, //start rendering, ignore what is there, just write above it
INITIAL_ACTION_CONTINUE, //continue rendering (framebuffer must have been left in "continue" state as final action previously)
@@ -963,7 +977,7 @@ public:
virtual void draw_list_enable_scissor(DrawListID p_list, const Rect2 &p_rect) = 0;
virtual void draw_list_disable_scissor(DrawListID p_list) = 0;
- virtual void draw_list_end() = 0;
+ virtual void draw_list_end(uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
/***********************/
/**** COMPUTE LISTS ****/
@@ -971,17 +985,18 @@ public:
typedef int64_t ComputeListID;
- virtual ComputeListID compute_list_begin() = 0;
+ virtual ComputeListID compute_list_begin(bool p_allow_draw_overlap = false) = 0;
virtual void compute_list_bind_compute_pipeline(ComputeListID p_list, RID p_compute_pipeline) = 0;
virtual void compute_list_bind_uniform_set(ComputeListID p_list, RID p_uniform_set, uint32_t p_index) = 0;
virtual void compute_list_set_push_constant(ComputeListID p_list, const void *p_data, uint32_t p_data_size) = 0;
virtual void compute_list_dispatch(ComputeListID p_list, uint32_t p_x_groups, uint32_t p_y_groups, uint32_t p_z_groups) = 0;
- virtual void compute_list_dispatch_threads(ComputeListID p_list, uint32_t p_x_threads, uint32_t p_y_threads, uint32_t p_z_threads, uint32_t p_x_local_group, uint32_t p_y_local_group, uint32_t p_z_local_group);
+ virtual void compute_list_dispatch_threads(ComputeListID p_list, uint32_t p_x_threads, uint32_t p_y_threads, uint32_t p_z_threads) = 0;
virtual void compute_list_dispatch_indirect(ComputeListID p_list, RID p_buffer, uint32_t p_offset) = 0;
virtual void compute_list_add_barrier(ComputeListID p_list) = 0;
- virtual void compute_list_end() = 0;
+ virtual void compute_list_end(uint32_t p_post_barrier = BARRIER_MASK_ALL) = 0;
+ virtual void barrier(uint32_t p_from = BARRIER_MASK_ALL, uint32_t p_to = BARRIER_MASK_ALL) = 0;
virtual void full_barrier() = 0;
/***************/
@@ -994,7 +1009,7 @@ public:
/**** Timing ****/
/****************/
- virtual void capture_timestamp(const String &p_name, bool p_sync_to_draw) = 0;
+ virtual void capture_timestamp(const String &p_name) = 0;
virtual uint32_t get_captured_timestamps_count() const = 0;
virtual uint64_t get_captured_timestamps_frame() const = 0;
virtual uint64_t get_captured_timestamp_gpu_time(uint32_t p_index) const = 0;
@@ -1059,6 +1074,16 @@ public:
virtual RenderingDevice *create_local_device() = 0;
+ virtual void set_resource_name(RID p_id, const String p_name) = 0;
+
+ virtual void draw_command_begin_label(String p_label_name, const Color p_color = Color(1, 1, 1, 1)) = 0;
+ virtual void draw_command_insert_label(String p_label_name, const Color p_color = Color(1, 1, 1, 1)) = 0;
+ virtual void draw_command_end_label() = 0;
+
+ virtual String get_device_vendor_name() const = 0;
+ virtual String get_device_name() const = 0;
+ virtual String get_device_pipeline_cache_uuid() const = 0;
+
static RenderingDevice *get_singleton();
RenderingDevice();
@@ -1078,7 +1103,7 @@ protected:
RID _uniform_set_create(const Array &p_uniforms, RID p_shader, uint32_t p_shader_set);
- Error _buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const Vector<uint8_t> &p_data, bool p_sync_with_draw = false);
+ Error _buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const Vector<uint8_t> &p_data, uint32_t p_post_barrier = BARRIER_MASK_ALL);
RID _render_pipeline_create(RID p_shader, FramebufferFormatID p_framebuffer_format, VertexFormatID p_vertex_format, RenderPrimitive p_render_primitive, const Ref<RDPipelineRasterizationState> &p_rasterization_state, const Ref<RDPipelineMultisampleState> &p_multisample_state, const Ref<RDPipelineDepthStencilState> &p_depth_stencil_state, const Ref<RDPipelineColorBlendState> &p_blend_state, int p_dynamic_state_flags = 0);
diff --git a/servers/rendering/rendering_server_default.cpp b/servers/rendering/rendering_server_default.cpp
index 8c6e97a0af..61d1efaf22 100644
--- a/servers/rendering/rendering_server_default.cpp
+++ b/servers/rendering/rendering_server_default.cpp
@@ -64,7 +64,7 @@ void RenderingServerDefault::_draw_margins() {
/* FREE */
-void RenderingServerDefault::free(RID p_rid) {
+void RenderingServerDefault::_free(RID p_rid) {
if (RSG::storage->free(p_rid)) {
return;
}
@@ -91,7 +91,7 @@ void RenderingServerDefault::request_frame_drawn_callback(Object *p_where, const
frame_drawn_callbacks.push_back(fdc);
}
-void RenderingServerDefault::draw(bool p_swap_buffers, double frame_step) {
+void RenderingServerDefault::_draw(bool p_swap_buffers, double frame_step) {
//needs to be done before changes is reset to 0, to not force the editor to redraw
RS::get_singleton()->emit_signal("frame_pre_draw");
@@ -162,24 +162,66 @@ void RenderingServerDefault::draw(bool p_swap_buffers, double frame_step) {
}
frame_profile_frame = RSG::storage->get_captured_timestamps_frame();
+
+ if (print_gpu_profile) {
+ if (print_frame_profile_ticks_from == 0) {
+ print_frame_profile_ticks_from = OS::get_singleton()->get_ticks_usec();
+ }
+ float total_time = 0.0;
+
+ for (int i = 0; i < frame_profile.size() - 1; i++) {
+ String name = frame_profile[i].name;
+ if (name[0] == '<' || name[0] == '>') {
+ continue;
+ }
+
+ float time = frame_profile[i + 1].gpu_msec - frame_profile[i].gpu_msec;
+
+ if (name[0] != '<' && name[0] != '>') {
+ if (print_gpu_profile_task_time.has(name)) {
+ print_gpu_profile_task_time[name] += time;
+ } else {
+ print_gpu_profile_task_time[name] = time;
+ }
+ }
+ }
+
+ if (frame_profile.size()) {
+ total_time = frame_profile[frame_profile.size() - 1].gpu_msec;
+ }
+
+ uint64_t ticks_elapsed = OS::get_singleton()->get_ticks_usec() - print_frame_profile_ticks_from;
+ print_frame_profile_frame_count++;
+ if (ticks_elapsed > 1000000) {
+ print_line("GPU PROFILE (total " + rtos(total_time) + "ms): ");
+
+ float print_threshold = 0.01;
+ for (OrderedHashMap<String, float>::Element E = print_gpu_profile_task_time.front(); E; E = E.next()) {
+ float time = E.value() / float(print_frame_profile_frame_count);
+ if (time > print_threshold) {
+ print_line("\t-" + E.key() + ": " + rtos(time) + "ms");
+ }
+ }
+ print_gpu_profile_task_time.clear();
+ print_frame_profile_ticks_from = OS::get_singleton()->get_ticks_usec();
+ print_frame_profile_frame_count = 0;
+ }
+ }
}
float RenderingServerDefault::get_frame_setup_time_cpu() const {
return frame_setup_time;
}
-void RenderingServerDefault::sync() {
-}
-
bool RenderingServerDefault::has_changed() const {
return changes > 0;
}
-void RenderingServerDefault::init() {
+void RenderingServerDefault::_init() {
RSG::rasterizer->initialize();
}
-void RenderingServerDefault::finish() {
+void RenderingServerDefault::_finish() {
if (test_cube.is_valid()) {
free(test_cube);
}
@@ -187,6 +229,32 @@ void RenderingServerDefault::finish() {
RSG::rasterizer->finalize();
}
+void RenderingServerDefault::init() {
+ if (create_thread) {
+ print_verbose("RenderingServerWrapMT: Creating render thread");
+ DisplayServer::get_singleton()->release_rendering_thread();
+ if (create_thread) {
+ thread.start(_thread_callback, this);
+ print_verbose("RenderingServerWrapMT: Starting render thread");
+ }
+ while (!draw_thread_up.is_set()) {
+ OS::get_singleton()->delay_usec(1000);
+ }
+ print_verbose("RenderingServerWrapMT: Finished render thread");
+ } else {
+ _init();
+ }
+}
+
+void RenderingServerDefault::finish() {
+ if (create_thread) {
+ command_queue.push(this, &RenderingServerDefault::_thread_exit);
+ thread.wait_to_finish();
+ } else {
+ _finish();
+ }
+}
+
/* STATUS INFORMATION */
int RenderingServerDefault::get_render_info(RenderInfo p_info) {
@@ -232,6 +300,11 @@ void RenderingServerDefault::sdfgi_set_debug_probe_select(const Vector3 &p_posit
RSG::scene->sdfgi_set_debug_probe_select(p_position, p_dir);
}
+void RenderingServerDefault::set_print_gpu_profile(bool p_enable) {
+ RSG::storage->capturing_timestamps = p_enable;
+ print_gpu_profile = p_enable;
+}
+
RID RenderingServerDefault::get_test_cube() {
if (!test_cube.is_valid()) {
test_cube = _make_test_cube();
@@ -247,10 +320,6 @@ void RenderingServerDefault::set_debug_generate_wireframes(bool p_generate) {
RSG::storage->set_debug_generate_wireframes(p_generate);
}
-void RenderingServerDefault::call_set_use_vsync(bool p_enable) {
- DisplayServer::get_singleton()->_set_use_vsync(p_enable);
-}
-
bool RenderingServerDefault::is_low_end() const {
// FIXME: Commented out when rebasing vulkan branch on master,
// causes a crash, it seems rasterizer is not initialized yet the
@@ -259,7 +328,74 @@ bool RenderingServerDefault::is_low_end() const {
return false;
}
-RenderingServerDefault::RenderingServerDefault() {
+void RenderingServerDefault::_thread_exit() {
+ exit.set();
+}
+
+void RenderingServerDefault::_thread_draw(bool p_swap_buffers, double frame_step) {
+ if (!draw_pending.decrement()) {
+ _draw(p_swap_buffers, frame_step);
+ }
+}
+
+void RenderingServerDefault::_thread_flush() {
+ draw_pending.decrement();
+}
+
+void RenderingServerDefault::_thread_callback(void *_instance) {
+ RenderingServerDefault *vsmt = reinterpret_cast<RenderingServerDefault *>(_instance);
+
+ vsmt->_thread_loop();
+}
+
+void RenderingServerDefault::_thread_loop() {
+ server_thread = Thread::get_caller_id();
+
+ DisplayServer::get_singleton()->make_rendering_thread();
+
+ _init();
+
+ draw_thread_up.set();
+ while (!exit.is_set()) {
+ // flush commands one by one, until exit is requested
+ command_queue.wait_and_flush_one();
+ }
+
+ command_queue.flush_all(); // flush all
+
+ _finish();
+}
+
+/* EVENT QUEUING */
+
+void RenderingServerDefault::sync() {
+ if (create_thread) {
+ draw_pending.increment();
+ command_queue.push_and_sync(this, &RenderingServerDefault::_thread_flush);
+ } else {
+ command_queue.flush_all(); //flush all pending from other threads
+ }
+}
+
+void RenderingServerDefault::draw(bool p_swap_buffers, double frame_step) {
+ if (create_thread) {
+ draw_pending.increment();
+ command_queue.push(this, &RenderingServerDefault::_thread_draw, p_swap_buffers, frame_step);
+ } else {
+ _draw(p_swap_buffers, frame_step);
+ }
+}
+
+RenderingServerDefault::RenderingServerDefault(bool p_create_thread) :
+ command_queue(p_create_thread) {
+ create_thread = p_create_thread;
+
+ if (!p_create_thread) {
+ server_thread = Thread::get_caller_id();
+ } else {
+ server_thread = 0;
+ }
+
RSG::canvas = memnew(RendererCanvasCull);
RSG::viewport = memnew(RendererViewport);
RendererSceneCull *sr = memnew(RendererSceneCull);
diff --git a/servers/rendering/rendering_server_default.h b/servers/rendering/rendering_server_default.h
index 71f459f34a..73b463f6e7 100644
--- a/servers/rendering/rendering_server_default.h
+++ b/servers/rendering/rendering_server_default.h
@@ -32,12 +32,15 @@
#define RENDERING_SERVER_DEFAULT_H
#include "core/math/octree.h"
+#include "core/templates/command_queue_mt.h"
+#include "core/templates/ordered_hash_map.h"
#include "renderer_canvas_cull.h"
#include "renderer_scene_cull.h"
#include "renderer_viewport.h"
#include "rendering_server_globals.h"
#include "servers/rendering/renderer_compositor.h"
#include "servers/rendering_server.h"
+#include "servers/server_wrap_mt_common.h"
class RenderingServerDefault : public RenderingServer {
enum {
@@ -74,6 +77,37 @@ class RenderingServerDefault : public RenderingServer {
float frame_setup_time = 0;
+ //for printing
+ bool print_gpu_profile = false;
+ OrderedHashMap<String, float> print_gpu_profile_task_time;
+ uint64_t print_frame_profile_ticks_from = 0;
+ uint32_t print_frame_profile_frame_count = 0;
+
+ mutable CommandQueueMT command_queue;
+
+ static void _thread_callback(void *_instance);
+ void _thread_loop();
+
+ Thread::ID server_thread;
+ SafeFlag exit;
+ Thread thread;
+ SafeFlag draw_thread_up;
+ bool create_thread;
+
+ SafeNumeric<uint64_t> draw_pending;
+ void _thread_draw(bool p_swap_buffers, double frame_step);
+ void _thread_flush();
+
+ void _thread_exit();
+
+ Mutex alloc_mutex;
+
+ void _draw(bool p_swap_buffers, double frame_step);
+ void _init();
+ void _finish();
+
+ void _free(RID p_rid);
+
public:
//if editor is redrawing when it shouldn't, enable this and put a breakpoint in _changes_changed()
//#define DEBUG_CHANGES
@@ -90,802 +124,813 @@ public:
#else
_FORCE_INLINE_ static void redraw_request() { changes++; }
+#endif
-#define DISPLAY_CHANGED \
- changes++;
+#define WRITE_ACTION redraw_request();
+
+#ifdef DEBUG_SYNC
+#define SYNC_DEBUG print_line("sync on: " + String(__FUNCTION__));
+#else
+#define SYNC_DEBUG
#endif
-#define BIND0R(m_r, m_name) \
- m_r m_name() { return BINDBASE->m_name(); }
-#define BIND0RC(m_r, m_name) \
- m_r m_name() const { return BINDBASE->m_name(); }
-#define BIND1R(m_r, m_name, m_type1) \
- m_r m_name(m_type1 arg1) { return BINDBASE->m_name(arg1); }
-#define BIND1RC(m_r, m_name, m_type1) \
- m_r m_name(m_type1 arg1) const { return BINDBASE->m_name(arg1); }
-#define BIND2R(m_r, m_name, m_type1, m_type2) \
- m_r m_name(m_type1 arg1, m_type2 arg2) { return BINDBASE->m_name(arg1, arg2); }
-#define BIND2RC(m_r, m_name, m_type1, m_type2) \
- m_r m_name(m_type1 arg1, m_type2 arg2) const { return BINDBASE->m_name(arg1, arg2); }
-#define BIND3R(m_r, m_name, m_type1, m_type2, m_type3) \
- m_r m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3) { return BINDBASE->m_name(arg1, arg2, arg3); }
-#define BIND3RC(m_r, m_name, m_type1, m_type2, m_type3) \
- m_r m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3) const { return BINDBASE->m_name(arg1, arg2, arg3); }
-#define BIND4R(m_r, m_name, m_type1, m_type2, m_type3, m_type4) \
- m_r m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4) { return BINDBASE->m_name(arg1, arg2, arg3, arg4); }
-#define BIND4RC(m_r, m_name, m_type1, m_type2, m_type3, m_type4) \
- m_r m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4) const { return BINDBASE->m_name(arg1, arg2, arg3, arg4); }
-#define BIND5R(m_r, m_name, m_type1, m_type2, m_type3, m_type4, m_type5) \
- m_r m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5) { return BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5); }
-#define BIND5RC(m_r, m_name, m_type1, m_type2, m_type3, m_type4, m_type5) \
- m_r m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5) const { return BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5); }
-#define BIND6R(m_r, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6) \
- m_r m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6) { return BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6); }
-#define BIND6RC(m_r, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6) \
- m_r m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6) const { return BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6); }
-
-#define BIND0(m_name) \
- void m_name() { DISPLAY_CHANGED BINDBASE->m_name(); }
-#define BIND1(m_name, m_type1) \
- void m_name(m_type1 arg1) { DISPLAY_CHANGED BINDBASE->m_name(arg1); }
-#define BIND1C(m_name, m_type1) \
- void m_name(m_type1 arg1) const { DISPLAY_CHANGED BINDBASE->m_name(arg1); }
-#define BIND2(m_name, m_type1, m_type2) \
- void m_name(m_type1 arg1, m_type2 arg2) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2); }
-#define BIND2C(m_name, m_type1, m_type2) \
- void m_name(m_type1 arg1, m_type2 arg2) const { BINDBASE->m_name(arg1, arg2); }
-#define BIND3(m_name, m_type1, m_type2, m_type3) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3); }
-#define BIND4(m_name, m_type1, m_type2, m_type3, m_type4) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4); }
-#define BIND5(m_name, m_type1, m_type2, m_type3, m_type4, m_type5) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5); }
-#define BIND6(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6); }
-#define BIND7(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7); }
-#define BIND8(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7, m_type8) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); }
-#define BIND9(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7, m_type8, m_type9) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8, m_type9 arg9) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); }
-#define BIND10(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7, m_type8, m_type9, m_type10) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8, m_type9 arg9, m_type10 arg10) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); }
-#define BIND11(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7, m_type8, m_type9, m_type10, m_type11) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8, m_type9 arg9, m_type10 arg10, m_type11 arg11) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); }
-#define BIND12(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7, m_type8, m_type9, m_type10, m_type11, m_type12) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8, m_type9 arg9, m_type10 arg10, m_type11 arg11, m_type12 arg12) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); }
-#define BIND13(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7, m_type8, m_type9, m_type10, m_type11, m_type12, m_type13) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8, m_type9 arg9, m_type10 arg10, m_type11 arg11, m_type12 arg12, m_type13 arg13) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); }
-#define BIND14(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7, m_type8, m_type9, m_type10, m_type11, m_type12, m_type13, m_type14) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8, m_type9 arg9, m_type10 arg10, m_type11 arg11, m_type12 arg12, m_type13 arg13, m_type14 arg14) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); }
-#define BIND15(m_name, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6, m_type7, m_type8, m_type9, m_type10, m_type11, m_type12, m_type13, m_type14, m_type15) \
- void m_name(m_type1 arg1, m_type2 arg2, m_type3 arg3, m_type4 arg4, m_type5 arg5, m_type6 arg6, m_type7 arg7, m_type8 arg8, m_type9 arg9, m_type10 arg10, m_type11 arg11, m_type12 arg12, m_type13 arg13, m_type14 arg14, m_type15 arg15) { DISPLAY_CHANGED BINDBASE->m_name(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); }
+#include "servers/server_wrap_mt_common.h"
//from now on, calls forwarded to this singleton
-#define BINDBASE RSG::storage
+#define ServerName RendererStorage
+#define server_name RSG::storage
/* TEXTURE API */
+#define FUNCRIDTEX0(m_type) \
+ virtual RID m_type##_create() override { \
+ RID ret = RSG::storage->texture_allocate(); \
+ if (Thread::get_caller_id() == server_thread || RSG::storage->can_create_resources_async()) { \
+ RSG::storage->m_type##_initialize(ret); \
+ } else { \
+ command_queue.push(RSG::storage, &RendererStorage::m_type##_initialize, ret); \
+ } \
+ return ret; \
+ }
+
+#define FUNCRIDTEX1(m_type, m_type1) \
+ virtual RID m_type##_create(m_type1 p1) override { \
+ RID ret = RSG::storage->texture_allocate(); \
+ if (Thread::get_caller_id() == server_thread || RSG::storage->can_create_resources_async()) { \
+ RSG::storage->m_type##_initialize(ret, p1); \
+ } else { \
+ command_queue.push(RSG::storage, &RendererStorage::m_type##_initialize, ret, p1); \
+ } \
+ return ret; \
+ }
+
+#define FUNCRIDTEX2(m_type, m_type1, m_type2) \
+ virtual RID m_type##_create(m_type1 p1, m_type2 p2) override { \
+ RID ret = RSG::storage->texture_allocate(); \
+ if (Thread::get_caller_id() == server_thread || RSG::storage->can_create_resources_async()) { \
+ RSG::storage->m_type##_initialize(ret, p1, p2); \
+ } else { \
+ command_queue.push(RSG::storage, &RendererStorage::m_type##_initialize, ret, p1, p2); \
+ } \
+ return ret; \
+ }
+
+#define FUNCRIDTEX6(m_type, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6) \
+ virtual RID m_type##_create(m_type1 p1, m_type2 p2, m_type3 p3, m_type4 p4, m_type5 p5, m_type6 p6) override { \
+ RID ret = RSG::storage->texture_allocate(); \
+ if (Thread::get_caller_id() == server_thread || RSG::storage->can_create_resources_async()) { \
+ RSG::storage->m_type##_initialize(ret, p1, p2, p3, p4, p5, p6); \
+ } else { \
+ command_queue.push(RSG::storage, &RendererStorage::m_type##_initialize, ret, p1, p2, p3, p4, p5, p6); \
+ } \
+ return ret; \
+ }
+
//these go pass-through, as they can be called from any thread
- BIND1R(RID, texture_2d_create, const Ref<Image> &)
- BIND2R(RID, texture_2d_layered_create, const Vector<Ref<Image>> &, TextureLayeredType)
- BIND6R(RID, texture_3d_create, Image::Format, int, int, int, bool, const Vector<Ref<Image>> &)
- BIND1R(RID, texture_proxy_create, RID)
+ FUNCRIDTEX1(texture_2d, const Ref<Image> &)
+ FUNCRIDTEX2(texture_2d_layered, const Vector<Ref<Image>> &, TextureLayeredType)
+ FUNCRIDTEX6(texture_3d, Image::Format, int, int, int, bool, const Vector<Ref<Image>> &)
+ FUNCRIDTEX1(texture_proxy, RID)
//goes pass-through
- BIND3(texture_2d_update_immediate, RID, const Ref<Image> &, int)
+ FUNC3(texture_2d_update_immediate, RID, const Ref<Image> &, int)
//these go through command queue if they are in another thread
- BIND3(texture_2d_update, RID, const Ref<Image> &, int)
- BIND2(texture_3d_update, RID, const Vector<Ref<Image>> &)
- BIND2(texture_proxy_update, RID, RID)
+ FUNC3(texture_2d_update, RID, const Ref<Image> &, int)
+ FUNC2(texture_3d_update, RID, const Vector<Ref<Image>> &)
+ FUNC2(texture_proxy_update, RID, RID)
//these also go pass-through
- BIND0R(RID, texture_2d_placeholder_create)
- BIND1R(RID, texture_2d_layered_placeholder_create, TextureLayeredType)
- BIND0R(RID, texture_3d_placeholder_create)
+ FUNCRIDTEX0(texture_2d_placeholder)
+ FUNCRIDTEX1(texture_2d_layered_placeholder, TextureLayeredType)
+ FUNCRIDTEX0(texture_3d_placeholder)
- BIND1RC(Ref<Image>, texture_2d_get, RID)
- BIND2RC(Ref<Image>, texture_2d_layer_get, RID, int)
- BIND1RC(Vector<Ref<Image>>, texture_3d_get, RID)
+ FUNC1RC(Ref<Image>, texture_2d_get, RID)
+ FUNC2RC(Ref<Image>, texture_2d_layer_get, RID, int)
+ FUNC1RC(Vector<Ref<Image>>, texture_3d_get, RID)
- BIND2(texture_replace, RID, RID)
+ FUNC2(texture_replace, RID, RID)
- BIND3(texture_set_size_override, RID, int, int)
+ FUNC3(texture_set_size_override, RID, int, int)
// FIXME: Disabled during Vulkan refactoring, should be ported.
#if 0
- BIND2(texture_bind, RID, uint32_t)
+ FUNC2(texture_bind, RID, uint32_t)
#endif
- BIND3(texture_set_detect_3d_callback, RID, TextureDetectCallback, void *)
- BIND3(texture_set_detect_normal_callback, RID, TextureDetectCallback, void *)
- BIND3(texture_set_detect_roughness_callback, RID, TextureDetectRoughnessCallback, void *)
+ FUNC3(texture_set_detect_3d_callback, RID, TextureDetectCallback, void *)
+ FUNC3(texture_set_detect_normal_callback, RID, TextureDetectCallback, void *)
+ FUNC3(texture_set_detect_roughness_callback, RID, TextureDetectRoughnessCallback, void *)
- BIND2(texture_set_path, RID, const String &)
- BIND1RC(String, texture_get_path, RID)
- BIND1(texture_debug_usage, List<TextureInfo> *)
+ FUNC2(texture_set_path, RID, const String &)
+ FUNC1RC(String, texture_get_path, RID)
+ FUNC1(texture_debug_usage, List<TextureInfo> *)
- BIND2(texture_set_force_redraw_if_visible, RID, bool)
+ FUNC2(texture_set_force_redraw_if_visible, RID, bool)
/* SHADER API */
- BIND0R(RID, shader_create)
+ FUNCRIDSPLIT(shader)
- BIND2(shader_set_code, RID, const String &)
- BIND1RC(String, shader_get_code, RID)
+ FUNC2(shader_set_code, RID, const String &)
+ FUNC1RC(String, shader_get_code, RID)
- BIND2C(shader_get_param_list, RID, List<PropertyInfo> *)
+ FUNC2C(shader_get_param_list, RID, List<PropertyInfo> *)
- BIND3(shader_set_default_texture_param, RID, const StringName &, RID)
- BIND2RC(RID, shader_get_default_texture_param, RID, const StringName &)
- BIND2RC(Variant, shader_get_param_default, RID, const StringName &)
+ FUNC3(shader_set_default_texture_param, RID, const StringName &, RID)
+ FUNC2RC(RID, shader_get_default_texture_param, RID, const StringName &)
+ FUNC2RC(Variant, shader_get_param_default, RID, const StringName &)
- BIND1RC(ShaderNativeSourceCode, shader_get_native_source_code, RID)
+ FUNC1RC(ShaderNativeSourceCode, shader_get_native_source_code, RID)
/* COMMON MATERIAL API */
- BIND0R(RID, material_create)
+ FUNCRIDSPLIT(material)
- BIND2(material_set_shader, RID, RID)
+ FUNC2(material_set_shader, RID, RID)
- BIND3(material_set_param, RID, const StringName &, const Variant &)
- BIND2RC(Variant, material_get_param, RID, const StringName &)
+ FUNC3(material_set_param, RID, const StringName &, const Variant &)
+ FUNC2RC(Variant, material_get_param, RID, const StringName &)
- BIND2(material_set_render_priority, RID, int)
- BIND2(material_set_next_pass, RID, RID)
+ FUNC2(material_set_render_priority, RID, int)
+ FUNC2(material_set_next_pass, RID, RID)
/* MESH API */
- virtual RID mesh_create_from_surfaces(const Vector<SurfaceData> &p_surfaces, int p_blend_shape_count = 0) {
- RID mesh = mesh_create();
- mesh_set_blend_shape_count(mesh, p_blend_shape_count);
- for (int i = 0; i < p_surfaces.size(); i++) {
- mesh_add_surface(mesh, p_surfaces[i]);
+ virtual RID mesh_create_from_surfaces(const Vector<SurfaceData> &p_surfaces, int p_blend_shape_count = 0) override {
+ RID mesh = RSG::storage->mesh_allocate();
+
+ if (Thread::get_caller_id() == server_thread || RSG::storage->can_create_resources_async()) {
+ if (Thread::get_caller_id() == server_thread) {
+ command_queue.flush_if_pending();
+ }
+ RSG::storage->mesh_initialize(mesh);
+ RSG::storage->mesh_set_blend_shape_count(mesh, p_blend_shape_count);
+ for (int i = 0; i < p_surfaces.size(); i++) {
+ RSG::storage->mesh_add_surface(mesh, p_surfaces[i]);
+ }
+ } else {
+ command_queue.push(RSG::storage, &RendererStorage::mesh_initialize, mesh);
+ command_queue.push(RSG::storage, &RendererStorage::mesh_set_blend_shape_count, mesh, p_blend_shape_count);
+ for (int i = 0; i < p_surfaces.size(); i++) {
+ RSG::storage->mesh_add_surface(mesh, p_surfaces[i]);
+ command_queue.push(RSG::storage, &RendererStorage::mesh_add_surface, mesh, p_surfaces[i]);
+ }
}
+
return mesh;
}
- BIND2(mesh_set_blend_shape_count, RID, int)
+ FUNC2(mesh_set_blend_shape_count, RID, int)
- BIND0R(RID, mesh_create)
+ FUNCRIDSPLIT(mesh)
- BIND2(mesh_add_surface, RID, const SurfaceData &)
+ FUNC2(mesh_add_surface, RID, const SurfaceData &)
- BIND1RC(int, mesh_get_blend_shape_count, RID)
+ FUNC1RC(int, mesh_get_blend_shape_count, RID)
- BIND2(mesh_set_blend_shape_mode, RID, BlendShapeMode)
- BIND1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID)
+ FUNC2(mesh_set_blend_shape_mode, RID, BlendShapeMode)
+ FUNC1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID)
- BIND4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &)
+ FUNC4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &)
- BIND3(mesh_surface_set_material, RID, int, RID)
- BIND2RC(RID, mesh_surface_get_material, RID, int)
+ FUNC3(mesh_surface_set_material, RID, int, RID)
+ FUNC2RC(RID, mesh_surface_get_material, RID, int)
- BIND2RC(SurfaceData, mesh_get_surface, RID, int)
+ FUNC2RC(SurfaceData, mesh_get_surface, RID, int)
- BIND1RC(int, mesh_get_surface_count, RID)
+ FUNC1RC(int, mesh_get_surface_count, RID)
- BIND2(mesh_set_custom_aabb, RID, const AABB &)
- BIND1RC(AABB, mesh_get_custom_aabb, RID)
+ FUNC2(mesh_set_custom_aabb, RID, const AABB &)
+ FUNC1RC(AABB, mesh_get_custom_aabb, RID)
- BIND1(mesh_clear, RID)
+ FUNC2(mesh_set_shadow_mesh, RID, RID)
+
+ FUNC1(mesh_clear, RID)
/* MULTIMESH API */
- BIND0R(RID, multimesh_create)
+ FUNCRIDSPLIT(multimesh)
- BIND5(multimesh_allocate, RID, int, MultimeshTransformFormat, bool, bool)
- BIND1RC(int, multimesh_get_instance_count, RID)
+ FUNC5(multimesh_allocate_data, RID, int, MultimeshTransformFormat, bool, bool)
+ FUNC1RC(int, multimesh_get_instance_count, RID)
- BIND2(multimesh_set_mesh, RID, RID)
- BIND3(multimesh_instance_set_transform, RID, int, const Transform &)
- BIND3(multimesh_instance_set_transform_2d, RID, int, const Transform2D &)
- BIND3(multimesh_instance_set_color, RID, int, const Color &)
- BIND3(multimesh_instance_set_custom_data, RID, int, const Color &)
+ FUNC2(multimesh_set_mesh, RID, RID)
+ FUNC3(multimesh_instance_set_transform, RID, int, const Transform &)
+ FUNC3(multimesh_instance_set_transform_2d, RID, int, const Transform2D &)
+ FUNC3(multimesh_instance_set_color, RID, int, const Color &)
+ FUNC3(multimesh_instance_set_custom_data, RID, int, const Color &)
- BIND1RC(RID, multimesh_get_mesh, RID)
- BIND1RC(AABB, multimesh_get_aabb, RID)
+ FUNC1RC(RID, multimesh_get_mesh, RID)
+ FUNC1RC(AABB, multimesh_get_aabb, RID)
- BIND2RC(Transform, multimesh_instance_get_transform, RID, int)
- BIND2RC(Transform2D, multimesh_instance_get_transform_2d, RID, int)
- BIND2RC(Color, multimesh_instance_get_color, RID, int)
- BIND2RC(Color, multimesh_instance_get_custom_data, RID, int)
+ FUNC2RC(Transform, multimesh_instance_get_transform, RID, int)
+ FUNC2RC(Transform2D, multimesh_instance_get_transform_2d, RID, int)
+ FUNC2RC(Color, multimesh_instance_get_color, RID, int)
+ FUNC2RC(Color, multimesh_instance_get_custom_data, RID, int)
- BIND2(multimesh_set_buffer, RID, const Vector<float> &)
- BIND1RC(Vector<float>, multimesh_get_buffer, RID)
+ FUNC2(multimesh_set_buffer, RID, const Vector<float> &)
+ FUNC1RC(Vector<float>, multimesh_get_buffer, RID)
- BIND2(multimesh_set_visible_instances, RID, int)
- BIND1RC(int, multimesh_get_visible_instances, RID)
+ FUNC2(multimesh_set_visible_instances, RID, int)
+ FUNC1RC(int, multimesh_get_visible_instances, RID)
/* IMMEDIATE API */
- BIND0R(RID, immediate_create)
- BIND3(immediate_begin, RID, PrimitiveType, RID)
- BIND2(immediate_vertex, RID, const Vector3 &)
- BIND2(immediate_normal, RID, const Vector3 &)
- BIND2(immediate_tangent, RID, const Plane &)
- BIND2(immediate_color, RID, const Color &)
- BIND2(immediate_uv, RID, const Vector2 &)
- BIND2(immediate_uv2, RID, const Vector2 &)
- BIND1(immediate_end, RID)
- BIND1(immediate_clear, RID)
- BIND2(immediate_set_material, RID, RID)
- BIND1RC(RID, immediate_get_material, RID)
+ FUNCRIDSPLIT(immediate)
+ FUNC3(immediate_begin, RID, PrimitiveType, RID)
+ FUNC2(immediate_vertex, RID, const Vector3 &)
+ FUNC2(immediate_normal, RID, const Vector3 &)
+ FUNC2(immediate_tangent, RID, const Plane &)
+ FUNC2(immediate_color, RID, const Color &)
+ FUNC2(immediate_uv, RID, const Vector2 &)
+ FUNC2(immediate_uv2, RID, const Vector2 &)
+ FUNC1(immediate_end, RID)
+ FUNC1(immediate_clear, RID)
+ FUNC2(immediate_set_material, RID, RID)
+ FUNC1RC(RID, immediate_get_material, RID)
/* SKELETON API */
- BIND0R(RID, skeleton_create)
- BIND3(skeleton_allocate, RID, int, bool)
- BIND1RC(int, skeleton_get_bone_count, RID)
- BIND3(skeleton_bone_set_transform, RID, int, const Transform &)
- BIND2RC(Transform, skeleton_bone_get_transform, RID, int)
- 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 &)
+ FUNCRIDSPLIT(skeleton)
+ FUNC3(skeleton_allocate_data, RID, int, bool)
+ FUNC1RC(int, skeleton_get_bone_count, RID)
+ FUNC3(skeleton_bone_set_transform, RID, int, const Transform &)
+ FUNC2RC(Transform, skeleton_bone_get_transform, RID, int)
+ 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 &)
/* Light API */
- BIND0R(RID, directional_light_create)
- BIND0R(RID, omni_light_create)
- BIND0R(RID, spot_light_create)
+ FUNCRIDSPLIT(directional_light)
+ FUNCRIDSPLIT(omni_light)
+ FUNCRIDSPLIT(spot_light)
- BIND2(light_set_color, RID, const Color &)
- BIND3(light_set_param, RID, LightParam, float)
- BIND2(light_set_shadow, RID, bool)
- BIND2(light_set_shadow_color, RID, const Color &)
- BIND2(light_set_projector, RID, RID)
- BIND2(light_set_negative, RID, bool)
- BIND2(light_set_cull_mask, RID, uint32_t)
- BIND2(light_set_reverse_cull_face_mode, RID, bool)
- BIND2(light_set_bake_mode, RID, LightBakeMode)
- BIND2(light_set_max_sdfgi_cascade, RID, uint32_t)
+ FUNC2(light_set_color, RID, const Color &)
+ FUNC3(light_set_param, RID, LightParam, float)
+ FUNC2(light_set_shadow, RID, bool)
+ FUNC2(light_set_shadow_color, RID, const Color &)
+ FUNC2(light_set_projector, RID, RID)
+ FUNC2(light_set_negative, RID, bool)
+ FUNC2(light_set_cull_mask, RID, uint32_t)
+ FUNC2(light_set_reverse_cull_face_mode, RID, bool)
+ FUNC2(light_set_bake_mode, RID, LightBakeMode)
+ FUNC2(light_set_max_sdfgi_cascade, RID, uint32_t)
- BIND2(light_omni_set_shadow_mode, RID, LightOmniShadowMode)
+ FUNC2(light_omni_set_shadow_mode, RID, LightOmniShadowMode)
- BIND2(light_directional_set_shadow_mode, RID, LightDirectionalShadowMode)
- BIND2(light_directional_set_blend_splits, RID, bool)
- BIND2(light_directional_set_sky_only, RID, bool)
- BIND2(light_directional_set_shadow_depth_range_mode, RID, LightDirectionalShadowDepthRangeMode)
+ FUNC2(light_directional_set_shadow_mode, RID, LightDirectionalShadowMode)
+ FUNC2(light_directional_set_blend_splits, RID, bool)
+ FUNC2(light_directional_set_sky_only, RID, bool)
+ FUNC2(light_directional_set_shadow_depth_range_mode, RID, LightDirectionalShadowDepthRangeMode)
/* PROBE API */
- BIND0R(RID, reflection_probe_create)
-
- BIND2(reflection_probe_set_update_mode, RID, ReflectionProbeUpdateMode)
- BIND2(reflection_probe_set_intensity, RID, float)
- BIND2(reflection_probe_set_ambient_color, RID, const Color &)
- BIND2(reflection_probe_set_ambient_energy, RID, float)
- BIND2(reflection_probe_set_ambient_mode, RID, ReflectionProbeAmbientMode)
- BIND2(reflection_probe_set_max_distance, RID, float)
- BIND2(reflection_probe_set_extents, RID, const Vector3 &)
- BIND2(reflection_probe_set_origin_offset, RID, const Vector3 &)
- BIND2(reflection_probe_set_as_interior, RID, bool)
- BIND2(reflection_probe_set_enable_box_projection, RID, bool)
- BIND2(reflection_probe_set_enable_shadows, RID, bool)
- BIND2(reflection_probe_set_cull_mask, RID, uint32_t)
- BIND2(reflection_probe_set_resolution, RID, int)
- BIND2(reflection_probe_set_lod_threshold, RID, float)
+ FUNCRIDSPLIT(reflection_probe)
+
+ FUNC2(reflection_probe_set_update_mode, RID, ReflectionProbeUpdateMode)
+ FUNC2(reflection_probe_set_intensity, RID, float)
+ FUNC2(reflection_probe_set_ambient_color, RID, const Color &)
+ FUNC2(reflection_probe_set_ambient_energy, RID, float)
+ FUNC2(reflection_probe_set_ambient_mode, RID, ReflectionProbeAmbientMode)
+ FUNC2(reflection_probe_set_max_distance, RID, float)
+ FUNC2(reflection_probe_set_extents, RID, const Vector3 &)
+ FUNC2(reflection_probe_set_origin_offset, RID, const Vector3 &)
+ FUNC2(reflection_probe_set_as_interior, RID, bool)
+ FUNC2(reflection_probe_set_enable_box_projection, RID, bool)
+ FUNC2(reflection_probe_set_enable_shadows, RID, bool)
+ FUNC2(reflection_probe_set_cull_mask, RID, uint32_t)
+ FUNC2(reflection_probe_set_resolution, RID, int)
+ FUNC2(reflection_probe_set_lod_threshold, RID, float)
/* DECAL API */
- BIND0R(RID, decal_create)
+ FUNCRIDSPLIT(decal)
- BIND2(decal_set_extents, RID, const Vector3 &)
- BIND3(decal_set_texture, RID, DecalTexture, RID)
- BIND2(decal_set_emission_energy, RID, float)
- BIND2(decal_set_albedo_mix, RID, float)
- BIND2(decal_set_modulate, RID, const Color &)
- BIND2(decal_set_cull_mask, RID, uint32_t)
- BIND4(decal_set_distance_fade, RID, bool, float, float)
- BIND3(decal_set_fade, RID, float, float)
- BIND2(decal_set_normal_fade, RID, float)
+ FUNC2(decal_set_extents, RID, const Vector3 &)
+ FUNC3(decal_set_texture, RID, DecalTexture, RID)
+ FUNC2(decal_set_emission_energy, RID, float)
+ FUNC2(decal_set_albedo_mix, RID, float)
+ FUNC2(decal_set_modulate, RID, const Color &)
+ FUNC2(decal_set_cull_mask, RID, uint32_t)
+ FUNC4(decal_set_distance_fade, RID, bool, float, float)
+ FUNC3(decal_set_fade, RID, float, float)
+ FUNC2(decal_set_normal_fade, RID, float)
/* BAKED LIGHT API */
- BIND0R(RID, gi_probe_create)
+ FUNCRIDSPLIT(gi_probe)
- BIND8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &)
+ FUNC8(gi_probe_allocate_data, RID, const Transform &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &)
- BIND1RC(AABB, gi_probe_get_bounds, RID)
- BIND1RC(Vector3i, gi_probe_get_octree_size, RID)
- BIND1RC(Vector<uint8_t>, gi_probe_get_octree_cells, RID)
- BIND1RC(Vector<uint8_t>, gi_probe_get_data_cells, RID)
- BIND1RC(Vector<uint8_t>, gi_probe_get_distance_field, RID)
- BIND1RC(Vector<int>, gi_probe_get_level_counts, RID)
- BIND1RC(Transform, gi_probe_get_to_cell_xform, RID)
+ FUNC1RC(AABB, gi_probe_get_bounds, RID)
+ FUNC1RC(Vector3i, gi_probe_get_octree_size, RID)
+ FUNC1RC(Vector<uint8_t>, gi_probe_get_octree_cells, RID)
+ FUNC1RC(Vector<uint8_t>, gi_probe_get_data_cells, RID)
+ FUNC1RC(Vector<uint8_t>, gi_probe_get_distance_field, RID)
+ FUNC1RC(Vector<int>, gi_probe_get_level_counts, RID)
+ FUNC1RC(Transform, gi_probe_get_to_cell_xform, RID)
- BIND2(gi_probe_set_dynamic_range, RID, float)
- BIND1RC(float, gi_probe_get_dynamic_range, RID)
+ FUNC2(gi_probe_set_dynamic_range, RID, float)
+ FUNC1RC(float, gi_probe_get_dynamic_range, RID)
- BIND2(gi_probe_set_propagation, RID, float)
- BIND1RC(float, gi_probe_get_propagation, RID)
+ FUNC2(gi_probe_set_propagation, RID, float)
+ FUNC1RC(float, gi_probe_get_propagation, RID)
- BIND2(gi_probe_set_energy, RID, float)
- BIND1RC(float, gi_probe_get_energy, RID)
+ FUNC2(gi_probe_set_energy, RID, float)
+ FUNC1RC(float, gi_probe_get_energy, RID)
- BIND2(gi_probe_set_ao, RID, float)
- BIND1RC(float, gi_probe_get_ao, RID)
+ FUNC2(gi_probe_set_ao, RID, float)
+ FUNC1RC(float, gi_probe_get_ao, RID)
- BIND2(gi_probe_set_ao_size, RID, float)
- BIND1RC(float, gi_probe_get_ao_size, RID)
+ FUNC2(gi_probe_set_ao_size, RID, float)
+ FUNC1RC(float, gi_probe_get_ao_size, RID)
- BIND2(gi_probe_set_bias, RID, float)
- BIND1RC(float, gi_probe_get_bias, RID)
+ FUNC2(gi_probe_set_bias, RID, float)
+ FUNC1RC(float, gi_probe_get_bias, RID)
- BIND2(gi_probe_set_normal_bias, RID, float)
- BIND1RC(float, gi_probe_get_normal_bias, RID)
+ FUNC2(gi_probe_set_normal_bias, RID, float)
+ FUNC1RC(float, gi_probe_get_normal_bias, RID)
- BIND2(gi_probe_set_interior, RID, bool)
- BIND1RC(bool, gi_probe_is_interior, RID)
+ FUNC2(gi_probe_set_interior, RID, bool)
+ FUNC1RC(bool, gi_probe_is_interior, RID)
- BIND2(gi_probe_set_use_two_bounces, RID, bool)
- BIND1RC(bool, gi_probe_is_using_two_bounces, RID)
+ FUNC2(gi_probe_set_use_two_bounces, RID, bool)
+ FUNC1RC(bool, gi_probe_is_using_two_bounces, RID)
- BIND2(gi_probe_set_anisotropy_strength, RID, float)
- BIND1RC(float, gi_probe_get_anisotropy_strength, RID)
+ FUNC2(gi_probe_set_anisotropy_strength, RID, float)
+ FUNC1RC(float, gi_probe_get_anisotropy_strength, RID)
/* LIGHTMAP */
- BIND0R(RID, lightmap_create)
+ FUNCRIDSPLIT(lightmap)
- BIND3(lightmap_set_textures, RID, RID, bool)
- BIND2(lightmap_set_probe_bounds, RID, const AABB &)
- BIND2(lightmap_set_probe_interior, RID, bool)
- BIND5(lightmap_set_probe_capture_data, RID, const PackedVector3Array &, const PackedColorArray &, const PackedInt32Array &, const PackedInt32Array &)
- BIND1RC(PackedVector3Array, lightmap_get_probe_capture_points, RID)
- BIND1RC(PackedColorArray, lightmap_get_probe_capture_sh, RID)
- BIND1RC(PackedInt32Array, lightmap_get_probe_capture_tetrahedra, RID)
- BIND1RC(PackedInt32Array, lightmap_get_probe_capture_bsp_tree, RID)
- BIND1(lightmap_set_probe_capture_update_speed, float)
+ FUNC3(lightmap_set_textures, RID, RID, bool)
+ FUNC2(lightmap_set_probe_bounds, RID, const AABB &)
+ FUNC2(lightmap_set_probe_interior, RID, bool)
+ FUNC5(lightmap_set_probe_capture_data, RID, const PackedVector3Array &, const PackedColorArray &, const PackedInt32Array &, const PackedInt32Array &)
+ FUNC1RC(PackedVector3Array, lightmap_get_probe_capture_points, RID)
+ FUNC1RC(PackedColorArray, lightmap_get_probe_capture_sh, RID)
+ FUNC1RC(PackedInt32Array, lightmap_get_probe_capture_tetrahedra, RID)
+ FUNC1RC(PackedInt32Array, lightmap_get_probe_capture_bsp_tree, RID)
+ FUNC1(lightmap_set_probe_capture_update_speed, float)
/* PARTICLES */
- BIND0R(RID, particles_create)
-
- BIND2(particles_set_emitting, RID, bool)
- BIND1R(bool, particles_get_emitting, RID)
- BIND2(particles_set_amount, RID, int)
- BIND2(particles_set_lifetime, RID, float)
- BIND2(particles_set_one_shot, RID, bool)
- BIND2(particles_set_pre_process_time, RID, float)
- BIND2(particles_set_explosiveness_ratio, RID, float)
- BIND2(particles_set_randomness_ratio, RID, float)
- BIND2(particles_set_custom_aabb, RID, const AABB &)
- BIND2(particles_set_speed_scale, RID, float)
- BIND2(particles_set_use_local_coordinates, RID, bool)
- BIND2(particles_set_process_material, RID, RID)
- BIND2(particles_set_fixed_fps, RID, int)
- BIND2(particles_set_fractional_delta, RID, bool)
- BIND1R(bool, particles_is_inactive, RID)
- BIND1(particles_request_process, RID)
- BIND1(particles_restart, RID)
- BIND6(particles_emit, RID, const Transform &, const Vector3 &, const Color &, const Color &, uint32_t)
- BIND2(particles_set_subemitter, RID, RID)
- BIND2(particles_set_collision_base_size, RID, float)
-
- BIND2(particles_set_draw_order, RID, RS::ParticlesDrawOrder)
-
- BIND2(particles_set_draw_passes, RID, int)
- BIND3(particles_set_draw_pass_mesh, RID, int, RID)
-
- BIND1R(AABB, particles_get_current_aabb, RID)
- BIND2(particles_set_emission_transform, RID, const Transform &)
+ FUNCRIDSPLIT(particles)
+
+ FUNC2(particles_set_emitting, RID, bool)
+ FUNC1R(bool, particles_get_emitting, RID)
+ FUNC2(particles_set_amount, RID, int)
+ FUNC2(particles_set_lifetime, RID, float)
+ FUNC2(particles_set_one_shot, RID, bool)
+ FUNC2(particles_set_pre_process_time, RID, float)
+ FUNC2(particles_set_explosiveness_ratio, RID, float)
+ FUNC2(particles_set_randomness_ratio, RID, float)
+ FUNC2(particles_set_custom_aabb, RID, const AABB &)
+ FUNC2(particles_set_speed_scale, RID, float)
+ FUNC2(particles_set_use_local_coordinates, RID, bool)
+ FUNC2(particles_set_process_material, RID, RID)
+ FUNC2(particles_set_fixed_fps, RID, int)
+ FUNC2(particles_set_fractional_delta, RID, bool)
+ FUNC1R(bool, particles_is_inactive, RID)
+ FUNC1(particles_request_process, RID)
+ FUNC1(particles_restart, RID)
+ FUNC6(particles_emit, RID, const Transform &, const Vector3 &, const Color &, const Color &, uint32_t)
+ FUNC2(particles_set_subemitter, RID, RID)
+ FUNC2(particles_set_collision_base_size, RID, float)
+
+ FUNC2(particles_set_draw_order, RID, RS::ParticlesDrawOrder)
+
+ FUNC2(particles_set_draw_passes, RID, int)
+ FUNC3(particles_set_draw_pass_mesh, RID, int, RID)
+
+ FUNC1R(AABB, particles_get_current_aabb, RID)
+ FUNC2(particles_set_emission_transform, RID, const Transform &)
/* PARTICLES COLLISION */
- BIND0R(RID, particles_collision_create)
-
- BIND2(particles_collision_set_collision_type, RID, ParticlesCollisionType)
- BIND2(particles_collision_set_cull_mask, RID, uint32_t)
- BIND2(particles_collision_set_sphere_radius, RID, float)
- BIND2(particles_collision_set_box_extents, RID, const Vector3 &)
- BIND2(particles_collision_set_attractor_strength, RID, float)
- BIND2(particles_collision_set_attractor_directionality, RID, float)
- BIND2(particles_collision_set_attractor_attenuation, RID, float)
- BIND2(particles_collision_set_field_texture, RID, RID)
- BIND1(particles_collision_height_field_update, RID)
- BIND2(particles_collision_set_height_field_resolution, RID, ParticlesCollisionHeightfieldResolution)
-
-#undef BINDBASE
+ FUNCRIDSPLIT(particles_collision)
+
+ FUNC2(particles_collision_set_collision_type, RID, ParticlesCollisionType)
+ FUNC2(particles_collision_set_cull_mask, RID, uint32_t)
+ FUNC2(particles_collision_set_sphere_radius, RID, float)
+ FUNC2(particles_collision_set_box_extents, RID, const Vector3 &)
+ FUNC2(particles_collision_set_attractor_strength, RID, float)
+ FUNC2(particles_collision_set_attractor_directionality, RID, float)
+ FUNC2(particles_collision_set_attractor_attenuation, RID, float)
+ FUNC2(particles_collision_set_field_texture, RID, RID)
+ FUNC1(particles_collision_height_field_update, RID)
+ FUNC2(particles_collision_set_height_field_resolution, RID, ParticlesCollisionHeightfieldResolution)
+
+#undef server_name
+#undef ServerName
//from now on, calls forwarded to this singleton
-#define BINDBASE RSG::scene
+#define ServerName RendererScene
+#define server_name RSG::scene
/* CAMERA API */
- BIND0R(RID, camera_create)
- BIND4(camera_set_perspective, RID, float, float, float)
- BIND4(camera_set_orthogonal, RID, float, float, float)
- BIND5(camera_set_frustum, RID, float, Vector2, float, float)
- BIND2(camera_set_transform, RID, const Transform &)
- BIND2(camera_set_cull_mask, RID, uint32_t)
- BIND2(camera_set_environment, RID, RID)
- BIND2(camera_set_camera_effects, RID, RID)
- BIND2(camera_set_use_vertical_aspect, RID, bool)
-
-#undef BINDBASE
+ FUNCRIDSPLIT(camera)
+ FUNC4(camera_set_perspective, RID, float, float, float)
+ FUNC4(camera_set_orthogonal, RID, float, float, float)
+ FUNC5(camera_set_frustum, RID, float, Vector2, float, float)
+ FUNC2(camera_set_transform, RID, const Transform &)
+ FUNC2(camera_set_cull_mask, RID, uint32_t)
+ FUNC2(camera_set_environment, RID, RID)
+ FUNC2(camera_set_camera_effects, RID, RID)
+ FUNC2(camera_set_use_vertical_aspect, RID, bool)
+
+#undef server_name
+#undef ServerName
//from now on, calls forwarded to this singleton
-#define BINDBASE RSG::viewport
+#define ServerName RendererViewport
+#define server_name RSG::viewport
/* VIEWPORT TARGET API */
- BIND0R(RID, viewport_create)
+ FUNCRIDSPLIT(viewport)
+
+ FUNC2(viewport_set_use_xr, RID, bool)
+ FUNC3(viewport_set_size, RID, int, int)
- BIND2(viewport_set_use_xr, RID, bool)
- BIND3(viewport_set_size, RID, int, int)
+ FUNC2(viewport_set_active, RID, bool)
+ FUNC2(viewport_set_parent_viewport, RID, RID)
- BIND2(viewport_set_active, RID, bool)
- BIND2(viewport_set_parent_viewport, RID, RID)
+ FUNC2(viewport_set_clear_mode, RID, ViewportClearMode)
- BIND2(viewport_set_clear_mode, RID, ViewportClearMode)
+ FUNC3(viewport_attach_to_screen, RID, const Rect2 &, int)
+ FUNC2(viewport_set_render_direct_to_screen, RID, bool)
- BIND3(viewport_attach_to_screen, RID, const Rect2 &, int)
- BIND2(viewport_set_render_direct_to_screen, RID, bool)
+ FUNC2(viewport_set_update_mode, RID, ViewportUpdateMode)
- BIND2(viewport_set_update_mode, RID, ViewportUpdateMode)
- BIND2(viewport_set_vflip, RID, bool)
+ FUNC1RC(RID, viewport_get_texture, RID)
- BIND1RC(RID, viewport_get_texture, RID)
+ FUNC2(viewport_set_hide_scenario, RID, bool)
+ FUNC2(viewport_set_hide_canvas, RID, bool)
+ FUNC2(viewport_set_disable_environment, RID, bool)
- BIND2(viewport_set_hide_scenario, RID, bool)
- BIND2(viewport_set_hide_canvas, RID, bool)
- BIND2(viewport_set_disable_environment, RID, bool)
+ FUNC2(viewport_attach_camera, RID, RID)
+ FUNC2(viewport_set_scenario, RID, RID)
+ FUNC2(viewport_attach_canvas, RID, RID)
- BIND2(viewport_attach_camera, RID, RID)
- BIND2(viewport_set_scenario, RID, RID)
- BIND2(viewport_attach_canvas, RID, RID)
+ FUNC2(viewport_remove_canvas, RID, RID)
+ FUNC3(viewport_set_canvas_transform, RID, RID, const Transform2D &)
+ FUNC2(viewport_set_transparent_background, RID, bool)
+ FUNC2(viewport_set_snap_2d_transforms_to_pixel, RID, bool)
+ FUNC2(viewport_set_snap_2d_vertices_to_pixel, RID, bool)
- BIND2(viewport_remove_canvas, RID, RID)
- BIND3(viewport_set_canvas_transform, RID, RID, const Transform2D &)
- BIND2(viewport_set_transparent_background, RID, bool)
- BIND2(viewport_set_snap_2d_transforms_to_pixel, RID, bool)
- BIND2(viewport_set_snap_2d_vertices_to_pixel, RID, bool)
+ FUNC2(viewport_set_default_canvas_item_texture_filter, RID, CanvasItemTextureFilter)
+ FUNC2(viewport_set_default_canvas_item_texture_repeat, RID, CanvasItemTextureRepeat)
- BIND2(viewport_set_default_canvas_item_texture_filter, RID, CanvasItemTextureFilter)
- BIND2(viewport_set_default_canvas_item_texture_repeat, RID, CanvasItemTextureRepeat)
+ FUNC2(viewport_set_global_canvas_transform, RID, const Transform2D &)
+ FUNC4(viewport_set_canvas_stacking, RID, RID, int, int)
+ FUNC3(viewport_set_shadow_atlas_size, RID, int, bool)
+ FUNC3(viewport_set_sdf_oversize_and_scale, RID, ViewportSDFOversize, ViewportSDFScale)
+ FUNC3(viewport_set_shadow_atlas_quadrant_subdivision, RID, int, int)
+ FUNC2(viewport_set_msaa, RID, ViewportMSAA)
+ FUNC2(viewport_set_screen_space_aa, RID, ViewportScreenSpaceAA)
+ FUNC2(viewport_set_use_debanding, RID, bool)
+ FUNC2(viewport_set_lod_threshold, RID, float)
- BIND2(viewport_set_global_canvas_transform, RID, const Transform2D &)
- BIND4(viewport_set_canvas_stacking, RID, RID, int, int)
- BIND2(viewport_set_shadow_atlas_size, RID, int)
- BIND3(viewport_set_sdf_oversize_and_scale, RID, ViewportSDFOversize, ViewportSDFScale)
- BIND3(viewport_set_shadow_atlas_quadrant_subdivision, RID, int, int)
- BIND2(viewport_set_msaa, RID, ViewportMSAA)
- BIND2(viewport_set_screen_space_aa, RID, ViewportScreenSpaceAA)
- BIND2(viewport_set_use_debanding, RID, bool)
- BIND2(viewport_set_lod_threshold, RID, float)
+ FUNC2R(int, viewport_get_render_info, RID, ViewportRenderInfo)
+ FUNC2(viewport_set_debug_draw, RID, ViewportDebugDraw)
- BIND2R(int, viewport_get_render_info, RID, ViewportRenderInfo)
- BIND2(viewport_set_debug_draw, RID, ViewportDebugDraw)
+ FUNC2(viewport_set_measure_render_time, RID, bool)
+ FUNC1RC(float, viewport_get_measured_render_time_cpu, RID)
+ FUNC1RC(float, viewport_get_measured_render_time_gpu, RID)
- BIND2(viewport_set_measure_render_time, RID, bool)
- BIND1RC(float, viewport_get_measured_render_time_cpu, RID)
- BIND1RC(float, viewport_get_measured_render_time_gpu, RID)
+ FUNC1(call_set_use_vsync, bool)
/* ENVIRONMENT API */
-#undef BINDBASE
+#undef server_name
+#undef ServerName
//from now on, calls forwarded to this singleton
-#define BINDBASE RSG::scene
+#define ServerName RendererScene
+#define server_name RSG::scene
- BIND1(directional_shadow_atlas_set_size, int)
- BIND1(gi_probe_set_quality, GIProbeQuality)
+ FUNC2(directional_shadow_atlas_set_size, int, bool)
+ FUNC1(gi_probe_set_quality, GIProbeQuality)
/* SKY API */
- BIND0R(RID, sky_create)
- BIND2(sky_set_radiance_size, RID, int)
- BIND2(sky_set_mode, RID, SkyMode)
- BIND2(sky_set_material, RID, RID)
- BIND4R(Ref<Image>, sky_bake_panorama, RID, float, bool, const Size2i &)
+ FUNCRIDSPLIT(sky)
+ FUNC2(sky_set_radiance_size, RID, int)
+ FUNC2(sky_set_mode, RID, SkyMode)
+ FUNC2(sky_set_material, RID, RID)
+ FUNC4R(Ref<Image>, sky_bake_panorama, RID, float, bool, const Size2i &)
- BIND0R(RID, environment_create)
+ FUNCRIDSPLIT(environment)
- BIND2(environment_set_background, RID, EnvironmentBG)
- BIND2(environment_set_sky, RID, RID)
- BIND2(environment_set_sky_custom_fov, RID, float)
- BIND2(environment_set_sky_orientation, RID, const Basis &)
- BIND2(environment_set_bg_color, RID, const Color &)
- BIND2(environment_set_bg_energy, RID, float)
- BIND2(environment_set_canvas_max_layer, RID, int)
- BIND7(environment_set_ambient_light, RID, const Color &, EnvironmentAmbientSource, float, float, EnvironmentReflectionSource, const Color &)
+ FUNC2(environment_set_background, RID, EnvironmentBG)
+ FUNC2(environment_set_sky, RID, RID)
+ FUNC2(environment_set_sky_custom_fov, RID, float)
+ FUNC2(environment_set_sky_orientation, RID, const Basis &)
+ FUNC2(environment_set_bg_color, RID, const Color &)
+ FUNC2(environment_set_bg_energy, RID, float)
+ FUNC2(environment_set_canvas_max_layer, RID, int)
+ FUNC7(environment_set_ambient_light, RID, const Color &, EnvironmentAmbientSource, float, float, EnvironmentReflectionSource, const Color &)
// FIXME: Disabled during Vulkan refactoring, should be ported.
#if 0
- BIND2(environment_set_camera_feed_id, RID, int)
+ FUNC2(environment_set_camera_feed_id, RID, int)
#endif
- BIND6(environment_set_ssr, RID, bool, int, float, float, float)
- BIND1(environment_set_ssr_roughness_quality, EnvironmentSSRRoughnessQuality)
+ FUNC6(environment_set_ssr, RID, bool, int, float, float, float)
+ FUNC1(environment_set_ssr_roughness_quality, EnvironmentSSRRoughnessQuality)
- BIND10(environment_set_ssao, RID, bool, float, float, float, float, float, float, float, float)
- BIND6(environment_set_ssao_quality, EnvironmentSSAOQuality, bool, float, int, float, float)
+ FUNC10(environment_set_ssao, RID, bool, float, float, float, float, float, float, float, float)
+ FUNC6(environment_set_ssao_quality, EnvironmentSSAOQuality, bool, float, int, float, float)
- BIND11(environment_set_glow, RID, bool, Vector<float>, float, float, float, float, EnvironmentGlowBlendMode, float, float, float)
- BIND1(environment_glow_set_use_bicubic_upscale, bool)
- BIND1(environment_glow_set_use_high_quality, bool)
+ FUNC11(environment_set_glow, RID, bool, Vector<float>, float, float, float, float, EnvironmentGlowBlendMode, float, float, float)
+ FUNC1(environment_glow_set_use_bicubic_upscale, bool)
+ FUNC1(environment_glow_set_use_high_quality, bool)
- BIND9(environment_set_tonemap, RID, EnvironmentToneMapper, float, float, bool, float, float, float, float)
+ FUNC9(environment_set_tonemap, RID, EnvironmentToneMapper, float, float, bool, float, float, float, float)
- BIND7(environment_set_adjustment, RID, bool, float, float, float, bool, RID)
+ FUNC7(environment_set_adjustment, RID, bool, float, float, float, bool, RID)
- BIND9(environment_set_fog, RID, bool, const Color &, float, float, float, float, float, float)
- BIND9(environment_set_volumetric_fog, RID, bool, float, const Color &, float, float, float, float, EnvVolumetricFogShadowFilter)
+ FUNC9(environment_set_fog, RID, bool, const Color &, float, float, float, float, float, float)
+ FUNC10(environment_set_volumetric_fog, RID, bool, float, const Color &, float, float, float, float, bool, float)
- BIND2(environment_set_volumetric_fog_volume_size, int, int)
- BIND1(environment_set_volumetric_fog_filter_active, bool)
- BIND1(environment_set_volumetric_fog_directional_shadow_shrink_size, int)
- BIND1(environment_set_volumetric_fog_positional_shadow_shrink_size, int)
+ FUNC2(environment_set_volumetric_fog_volume_size, int, int)
+ FUNC1(environment_set_volumetric_fog_filter_active, bool)
- BIND11(environment_set_sdfgi, RID, bool, EnvironmentSDFGICascades, float, EnvironmentSDFGIYScale, bool, bool, bool, float, float, float)
- BIND1(environment_set_sdfgi_ray_count, EnvironmentSDFGIRayCount)
- BIND1(environment_set_sdfgi_frames_to_converge, EnvironmentSDFGIFramesToConverge)
+ FUNC11(environment_set_sdfgi, RID, bool, EnvironmentSDFGICascades, float, EnvironmentSDFGIYScale, bool, float, bool, float, float, float)
+ FUNC1(environment_set_sdfgi_ray_count, EnvironmentSDFGIRayCount)
+ FUNC1(environment_set_sdfgi_frames_to_converge, EnvironmentSDFGIFramesToConverge)
+ FUNC1(environment_set_sdfgi_frames_to_update_light, EnvironmentSDFGIFramesToUpdateLight)
- BIND3R(Ref<Image>, environment_bake_panorama, RID, bool, const Size2i &)
+ FUNC3R(Ref<Image>, environment_bake_panorama, RID, bool, const Size2i &)
- BIND3(screen_space_roughness_limiter_set_active, bool, float, float)
- BIND1(sub_surface_scattering_set_quality, SubSurfaceScatteringQuality)
- BIND2(sub_surface_scattering_set_scale, float, float)
+ FUNC3(screen_space_roughness_limiter_set_active, bool, float, float)
+ FUNC1(sub_surface_scattering_set_quality, SubSurfaceScatteringQuality)
+ FUNC2(sub_surface_scattering_set_scale, float, float)
/* CAMERA EFFECTS */
- BIND0R(RID, camera_effects_create)
+ FUNCRIDSPLIT(camera_effects)
- BIND2(camera_effects_set_dof_blur_quality, DOFBlurQuality, bool)
- BIND1(camera_effects_set_dof_blur_bokeh_shape, DOFBokehShape)
+ FUNC2(camera_effects_set_dof_blur_quality, DOFBlurQuality, bool)
+ FUNC1(camera_effects_set_dof_blur_bokeh_shape, DOFBokehShape)
- BIND8(camera_effects_set_dof_blur, RID, bool, float, float, bool, float, float, float)
- BIND3(camera_effects_set_custom_exposure, RID, bool, float)
+ FUNC8(camera_effects_set_dof_blur, RID, bool, float, float, bool, float, float, float)
+ FUNC3(camera_effects_set_custom_exposure, RID, bool, float)
- BIND1(shadows_quality_set, ShadowQuality);
- BIND1(directional_shadow_quality_set, ShadowQuality);
+ FUNC1(shadows_quality_set, ShadowQuality);
+ FUNC1(directional_shadow_quality_set, ShadowQuality);
/* SCENARIO API */
-#undef BINDBASE
-#define BINDBASE RSG::scene
+#undef server_name
+#undef ServerName
- BIND0R(RID, scenario_create)
+#define ServerName RendererScene
+#define server_name RSG::scene
- BIND2(scenario_set_debug, RID, ScenarioDebugMode)
- BIND2(scenario_set_environment, RID, RID)
- BIND2(scenario_set_camera_effects, RID, RID)
- BIND2(scenario_set_fallback_environment, RID, RID)
+ FUNCRIDSPLIT(scenario)
+
+ FUNC2(scenario_set_debug, RID, ScenarioDebugMode)
+ FUNC2(scenario_set_environment, RID, RID)
+ FUNC2(scenario_set_camera_effects, RID, RID)
+ FUNC2(scenario_set_fallback_environment, RID, RID)
/* INSTANCING API */
- BIND0R(RID, instance_create)
+ FUNCRIDSPLIT(instance)
- BIND2(instance_set_base, RID, RID)
- BIND2(instance_set_scenario, RID, RID)
- BIND2(instance_set_layer_mask, RID, uint32_t)
- BIND2(instance_set_transform, RID, const Transform &)
- BIND2(instance_attach_object_instance_id, RID, ObjectID)
- BIND3(instance_set_blend_shape_weight, RID, int, float)
- BIND3(instance_set_surface_material, RID, int, RID)
- BIND2(instance_set_visible, RID, bool)
+ FUNC2(instance_set_base, RID, RID)
+ FUNC2(instance_set_scenario, RID, RID)
+ FUNC2(instance_set_layer_mask, RID, uint32_t)
+ FUNC2(instance_set_transform, RID, const Transform &)
+ FUNC2(instance_attach_object_instance_id, RID, ObjectID)
+ FUNC3(instance_set_blend_shape_weight, RID, int, float)
+ FUNC3(instance_set_surface_material, RID, int, RID)
+ FUNC2(instance_set_visible, RID, bool)
- BIND2(instance_set_custom_aabb, RID, AABB)
+ FUNC2(instance_set_custom_aabb, RID, AABB)
- BIND2(instance_attach_skeleton, RID, RID)
- BIND2(instance_set_exterior, RID, bool)
+ FUNC2(instance_attach_skeleton, RID, RID)
+ FUNC2(instance_set_exterior, RID, bool)
- BIND2(instance_set_extra_visibility_margin, RID, real_t)
+ FUNC2(instance_set_extra_visibility_margin, RID, real_t)
// don't use these in a game!
- BIND2RC(Vector<ObjectID>, instances_cull_aabb, const AABB &, RID)
- BIND3RC(Vector<ObjectID>, instances_cull_ray, const Vector3 &, const Vector3 &, RID)
- BIND2RC(Vector<ObjectID>, instances_cull_convex, const Vector<Plane> &, RID)
+ FUNC2RC(Vector<ObjectID>, instances_cull_aabb, const AABB &, RID)
+ FUNC3RC(Vector<ObjectID>, instances_cull_ray, const Vector3 &, const Vector3 &, RID)
+ FUNC2RC(Vector<ObjectID>, instances_cull_convex, const Vector<Plane> &, RID)
+
+ FUNC3(instance_geometry_set_flag, RID, InstanceFlags, bool)
+ FUNC2(instance_geometry_set_cast_shadows_setting, RID, ShadowCastingSetting)
+ FUNC2(instance_geometry_set_material_override, RID, RID)
- BIND3(instance_geometry_set_flag, RID, InstanceFlags, bool)
- BIND2(instance_geometry_set_cast_shadows_setting, RID, ShadowCastingSetting)
- BIND2(instance_geometry_set_material_override, RID, RID)
+ FUNC5(instance_geometry_set_draw_range, RID, float, float, float, float)
+ FUNC2(instance_geometry_set_as_instance_lod, RID, RID)
+ FUNC4(instance_geometry_set_lightmap, RID, RID, const Rect2 &, int)
+ FUNC2(instance_geometry_set_lod_bias, RID, float)
- BIND5(instance_geometry_set_draw_range, RID, float, float, float, float)
- BIND2(instance_geometry_set_as_instance_lod, RID, RID)
- BIND4(instance_geometry_set_lightmap, RID, RID, const Rect2 &, int)
- BIND2(instance_geometry_set_lod_bias, RID, float)
+ FUNC3(instance_geometry_set_shader_parameter, RID, const StringName &, const Variant &)
+ FUNC2RC(Variant, instance_geometry_get_shader_parameter, RID, const StringName &)
+ FUNC2RC(Variant, instance_geometry_get_shader_parameter_default_value, RID, const StringName &)
+ FUNC2C(instance_geometry_get_shader_parameter_list, RID, List<PropertyInfo> *)
- BIND3(instance_geometry_set_shader_parameter, RID, const StringName &, const Variant &)
- BIND2RC(Variant, instance_geometry_get_shader_parameter, RID, const StringName &)
- BIND2RC(Variant, instance_geometry_get_shader_parameter_default_value, RID, const StringName &)
- BIND2C(instance_geometry_get_shader_parameter_list, RID, List<PropertyInfo> *)
+ FUNC3R(TypedArray<Image>, bake_render_uv2, RID, const Vector<RID> &, const Size2i &)
- BIND3R(TypedArray<Image>, bake_render_uv2, RID, const Vector<RID> &, const Size2i &)
+ FUNC1(gi_set_use_half_resolution, bool)
-#undef BINDBASE
+#undef server_name
+#undef ServerName
//from now on, calls forwarded to this singleton
-#define BINDBASE RSG::canvas
+#define ServerName RendererCanvasCull
+#define server_name RSG::canvas
/* CANVAS (2D) */
- BIND0R(RID, canvas_create)
- BIND3(canvas_set_item_mirroring, RID, RID, const Point2 &)
- BIND2(canvas_set_modulate, RID, const Color &)
- BIND3(canvas_set_parent, RID, RID, float)
- BIND1(canvas_set_disable_scale, bool)
-
- BIND0R(RID, canvas_texture_create)
- BIND3(canvas_texture_set_channel, RID, CanvasTextureChannel, RID)
- BIND3(canvas_texture_set_shading_parameters, RID, const Color &, float)
-
- BIND2(canvas_texture_set_texture_filter, RID, CanvasItemTextureFilter)
- BIND2(canvas_texture_set_texture_repeat, RID, CanvasItemTextureRepeat)
-
- BIND0R(RID, canvas_item_create)
- BIND2(canvas_item_set_parent, RID, RID)
-
- BIND2(canvas_item_set_default_texture_filter, RID, CanvasItemTextureFilter)
- BIND2(canvas_item_set_default_texture_repeat, RID, CanvasItemTextureRepeat)
-
- BIND2(canvas_item_set_visible, RID, bool)
- BIND2(canvas_item_set_light_mask, RID, int)
-
- BIND2(canvas_item_set_update_when_visible, RID, bool)
-
- BIND2(canvas_item_set_transform, RID, const Transform2D &)
- BIND2(canvas_item_set_clip, RID, bool)
- BIND2(canvas_item_set_distance_field_mode, RID, bool)
- BIND3(canvas_item_set_custom_rect, RID, bool, const Rect2 &)
- BIND2(canvas_item_set_modulate, RID, const Color &)
- BIND2(canvas_item_set_self_modulate, RID, const Color &)
-
- BIND2(canvas_item_set_draw_behind_parent, RID, bool)
-
- BIND5(canvas_item_add_line, RID, const Point2 &, const Point2 &, const Color &, float)
- BIND5(canvas_item_add_polyline, RID, const Vector<Point2> &, const Vector<Color> &, float, bool)
- BIND4(canvas_item_add_multiline, RID, const Vector<Point2> &, const Vector<Color> &, float)
- BIND3(canvas_item_add_rect, RID, const Rect2 &, const Color &)
- BIND4(canvas_item_add_circle, RID, const Point2 &, float, const Color &)
- BIND6(canvas_item_add_texture_rect, RID, const Rect2 &, RID, bool, const Color &, bool)
- BIND7(canvas_item_add_texture_rect_region, RID, const Rect2 &, RID, const Rect2 &, const Color &, bool, bool)
- BIND10(canvas_item_add_nine_patch, RID, const Rect2 &, const Rect2 &, RID, const Vector2 &, const Vector2 &, NinePatchAxisMode, NinePatchAxisMode, bool, const Color &)
- BIND6(canvas_item_add_primitive, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, float)
- BIND5(canvas_item_add_polygon, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID)
- BIND9(canvas_item_add_triangle_array, RID, const Vector<int> &, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, const Vector<int> &, const Vector<float> &, RID, int)
- BIND5(canvas_item_add_mesh, RID, const RID &, const Transform2D &, const Color &, RID)
- BIND3(canvas_item_add_multimesh, RID, RID, RID)
- BIND3(canvas_item_add_particles, RID, RID, RID)
- BIND2(canvas_item_add_set_transform, RID, const Transform2D &)
- BIND2(canvas_item_add_clip_ignore, RID, bool)
- BIND2(canvas_item_set_sort_children_by_y, RID, bool)
- BIND2(canvas_item_set_z_index, RID, int)
- BIND2(canvas_item_set_z_as_relative_to_parent, RID, bool)
- BIND3(canvas_item_set_copy_to_backbuffer, RID, bool, const Rect2 &)
- BIND2(canvas_item_attach_skeleton, RID, RID)
-
- BIND1(canvas_item_clear, RID)
- BIND2(canvas_item_set_draw_index, RID, int)
-
- BIND2(canvas_item_set_material, RID, RID)
-
- BIND2(canvas_item_set_use_parent_material, RID, bool)
-
- BIND6(canvas_item_set_canvas_group_mode, RID, CanvasGroupMode, float, bool, float, bool)
-
- BIND0R(RID, canvas_light_create)
-
- BIND2(canvas_light_set_mode, RID, CanvasLightMode)
-
- BIND2(canvas_light_attach_to_canvas, RID, RID)
- BIND2(canvas_light_set_enabled, RID, bool)
- BIND2(canvas_light_set_texture_scale, RID, float)
- BIND2(canvas_light_set_transform, RID, const Transform2D &)
- BIND2(canvas_light_set_texture, RID, RID)
- BIND2(canvas_light_set_texture_offset, RID, const Vector2 &)
- BIND2(canvas_light_set_color, RID, const Color &)
- BIND2(canvas_light_set_height, RID, float)
- BIND2(canvas_light_set_energy, RID, float)
- BIND3(canvas_light_set_z_range, RID, int, int)
- BIND3(canvas_light_set_layer_range, RID, int, int)
- BIND2(canvas_light_set_item_cull_mask, RID, int)
- BIND2(canvas_light_set_item_shadow_cull_mask, RID, int)
- BIND2(canvas_light_set_directional_distance, RID, float)
-
- BIND2(canvas_light_set_blend_mode, RID, CanvasLightBlendMode)
-
- BIND2(canvas_light_set_shadow_enabled, RID, bool)
- BIND2(canvas_light_set_shadow_filter, RID, CanvasLightShadowFilter)
- BIND2(canvas_light_set_shadow_color, RID, const Color &)
- BIND2(canvas_light_set_shadow_smooth, RID, float)
-
- BIND0R(RID, canvas_light_occluder_create)
- BIND2(canvas_light_occluder_attach_to_canvas, RID, RID)
- BIND2(canvas_light_occluder_set_enabled, RID, bool)
- BIND2(canvas_light_occluder_set_polygon, RID, RID)
- BIND2(canvas_light_occluder_set_as_sdf_collision, RID, bool)
- BIND2(canvas_light_occluder_set_transform, RID, const Transform2D &)
- BIND2(canvas_light_occluder_set_light_mask, RID, int)
-
- BIND0R(RID, canvas_occluder_polygon_create)
- BIND3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool)
-
- BIND2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode)
-
- BIND1(canvas_set_shadow_texture_size, int)
+ FUNCRIDSPLIT(canvas)
+ FUNC3(canvas_set_item_mirroring, RID, RID, const Point2 &)
+ FUNC2(canvas_set_modulate, RID, const Color &)
+ FUNC3(canvas_set_parent, RID, RID, float)
+ FUNC1(canvas_set_disable_scale, bool)
+
+ FUNCRIDSPLIT(canvas_texture)
+ FUNC3(canvas_texture_set_channel, RID, CanvasTextureChannel, RID)
+ FUNC3(canvas_texture_set_shading_parameters, RID, const Color &, float)
+
+ FUNC2(canvas_texture_set_texture_filter, RID, CanvasItemTextureFilter)
+ FUNC2(canvas_texture_set_texture_repeat, RID, CanvasItemTextureRepeat)
+
+ FUNCRIDSPLIT(canvas_item)
+ FUNC2(canvas_item_set_parent, RID, RID)
+
+ FUNC2(canvas_item_set_default_texture_filter, RID, CanvasItemTextureFilter)
+ FUNC2(canvas_item_set_default_texture_repeat, RID, CanvasItemTextureRepeat)
+
+ FUNC2(canvas_item_set_visible, RID, bool)
+ FUNC2(canvas_item_set_light_mask, RID, int)
+
+ FUNC2(canvas_item_set_update_when_visible, RID, bool)
+
+ FUNC2(canvas_item_set_transform, RID, const Transform2D &)
+ FUNC2(canvas_item_set_clip, RID, bool)
+ FUNC2(canvas_item_set_distance_field_mode, RID, bool)
+ FUNC3(canvas_item_set_custom_rect, RID, bool, const Rect2 &)
+ FUNC2(canvas_item_set_modulate, RID, const Color &)
+ FUNC2(canvas_item_set_self_modulate, RID, const Color &)
+
+ FUNC2(canvas_item_set_draw_behind_parent, RID, bool)
+
+ FUNC5(canvas_item_add_line, RID, const Point2 &, const Point2 &, const Color &, float)
+ FUNC5(canvas_item_add_polyline, RID, const Vector<Point2> &, const Vector<Color> &, float, bool)
+ FUNC4(canvas_item_add_multiline, RID, const Vector<Point2> &, const Vector<Color> &, float)
+ FUNC3(canvas_item_add_rect, RID, const Rect2 &, const Color &)
+ FUNC4(canvas_item_add_circle, RID, const Point2 &, float, const Color &)
+ FUNC6(canvas_item_add_texture_rect, RID, const Rect2 &, RID, bool, const Color &, bool)
+ FUNC7(canvas_item_add_texture_rect_region, RID, const Rect2 &, RID, const Rect2 &, const Color &, bool, bool)
+ FUNC10(canvas_item_add_nine_patch, RID, const Rect2 &, const Rect2 &, RID, const Vector2 &, const Vector2 &, NinePatchAxisMode, NinePatchAxisMode, bool, const Color &)
+ FUNC6(canvas_item_add_primitive, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, float)
+ FUNC5(canvas_item_add_polygon, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID)
+ FUNC9(canvas_item_add_triangle_array, RID, const Vector<int> &, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, const Vector<int> &, const Vector<float> &, RID, int)
+ FUNC5(canvas_item_add_mesh, RID, const RID &, const Transform2D &, const Color &, RID)
+ FUNC3(canvas_item_add_multimesh, RID, RID, RID)
+ FUNC3(canvas_item_add_particles, RID, RID, RID)
+ FUNC2(canvas_item_add_set_transform, RID, const Transform2D &)
+ FUNC2(canvas_item_add_clip_ignore, RID, bool)
+ FUNC2(canvas_item_set_sort_children_by_y, RID, bool)
+ FUNC2(canvas_item_set_z_index, RID, int)
+ FUNC2(canvas_item_set_z_as_relative_to_parent, RID, bool)
+ FUNC3(canvas_item_set_copy_to_backbuffer, RID, bool, const Rect2 &)
+ FUNC2(canvas_item_attach_skeleton, RID, RID)
+
+ FUNC1(canvas_item_clear, RID)
+ FUNC2(canvas_item_set_draw_index, RID, int)
+
+ FUNC2(canvas_item_set_material, RID, RID)
+
+ FUNC2(canvas_item_set_use_parent_material, RID, bool)
+
+ FUNC6(canvas_item_set_canvas_group_mode, RID, CanvasGroupMode, float, bool, float, bool)
+
+ FUNCRIDSPLIT(canvas_light)
+
+ FUNC2(canvas_light_set_mode, RID, CanvasLightMode)
+
+ FUNC2(canvas_light_attach_to_canvas, RID, RID)
+ FUNC2(canvas_light_set_enabled, RID, bool)
+ FUNC2(canvas_light_set_texture_scale, RID, float)
+ FUNC2(canvas_light_set_transform, RID, const Transform2D &)
+ FUNC2(canvas_light_set_texture, RID, RID)
+ FUNC2(canvas_light_set_texture_offset, RID, const Vector2 &)
+ FUNC2(canvas_light_set_color, RID, const Color &)
+ FUNC2(canvas_light_set_height, RID, float)
+ FUNC2(canvas_light_set_energy, RID, float)
+ FUNC3(canvas_light_set_z_range, RID, int, int)
+ FUNC3(canvas_light_set_layer_range, RID, int, int)
+ FUNC2(canvas_light_set_item_cull_mask, RID, int)
+ FUNC2(canvas_light_set_item_shadow_cull_mask, RID, int)
+ FUNC2(canvas_light_set_directional_distance, RID, float)
+
+ FUNC2(canvas_light_set_blend_mode, RID, CanvasLightBlendMode)
+
+ FUNC2(canvas_light_set_shadow_enabled, RID, bool)
+ FUNC2(canvas_light_set_shadow_filter, RID, CanvasLightShadowFilter)
+ FUNC2(canvas_light_set_shadow_color, RID, const Color &)
+ FUNC2(canvas_light_set_shadow_smooth, RID, float)
+
+ FUNCRIDSPLIT(canvas_light_occluder)
+ FUNC2(canvas_light_occluder_attach_to_canvas, RID, RID)
+ FUNC2(canvas_light_occluder_set_enabled, RID, bool)
+ FUNC2(canvas_light_occluder_set_polygon, RID, RID)
+ FUNC2(canvas_light_occluder_set_as_sdf_collision, RID, bool)
+ FUNC2(canvas_light_occluder_set_transform, RID, const Transform2D &)
+ FUNC2(canvas_light_occluder_set_light_mask, RID, int)
+
+ FUNCRIDSPLIT(canvas_occluder_polygon)
+ FUNC3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool)
+
+ FUNC2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode)
+
+ FUNC1(canvas_set_shadow_texture_size, int)
/* GLOBAL VARIABLES */
-#undef BINDBASE
+#undef server_name
+#undef ServerName
//from now on, calls forwarded to this singleton
-#define BINDBASE RSG::storage
+#define ServerName RendererStorage
+#define server_name RSG::storage
- BIND3(global_variable_add, const StringName &, GlobalVariableType, const Variant &)
- BIND1(global_variable_remove, const StringName &)
- BIND0RC(Vector<StringName>, global_variable_get_list)
- BIND2(global_variable_set, const StringName &, const Variant &)
- BIND2(global_variable_set_override, const StringName &, const Variant &)
- BIND1RC(GlobalVariableType, global_variable_get_type, const StringName &)
- BIND1RC(Variant, global_variable_get, const StringName &)
+ FUNC3(global_variable_add, const StringName &, GlobalVariableType, const Variant &)
+ FUNC1(global_variable_remove, const StringName &)
+ FUNC0RC(Vector<StringName>, global_variable_get_list)
+ FUNC2(global_variable_set, const StringName &, const Variant &)
+ FUNC2(global_variable_set_override, const StringName &, const Variant &)
+ FUNC1RC(GlobalVariableType, global_variable_get_type, const StringName &)
+ FUNC1RC(Variant, global_variable_get, const StringName &)
- BIND1(global_variables_load_settings, bool)
- BIND0(global_variables_clear)
+ FUNC1(global_variables_load_settings, bool)
+ FUNC0(global_variables_clear)
+
+#undef server_name
+#undef ServerName
+#undef WRITE_ACTION
+#undef SYNC_DEBUG
/* BLACK BARS */
- virtual void black_bars_set_margins(int p_left, int p_top, int p_right, int p_bottom);
- virtual void black_bars_set_images(RID p_left, RID p_top, RID p_right, RID p_bottom);
+ virtual void black_bars_set_margins(int p_left, int p_top, int p_right, int p_bottom) override;
+ virtual void black_bars_set_images(RID p_left, RID p_top, RID p_right, RID p_bottom) override;
/* FREE */
- virtual void free(RID p_rid); ///< free RIDs associated with the visual server
+ virtual void free(RID p_rid) override {
+ if (Thread::get_caller_id() == server_thread) {
+ command_queue.flush_if_pending();
+ _free(p_rid);
+ } else {
+ command_queue.push(this, &RenderingServerDefault::_free, p_rid);
+ }
+ }
/* EVENT QUEUING */
- virtual void request_frame_drawn_callback(Object *p_where, const StringName &p_method, const Variant &p_userdata);
+ virtual void request_frame_drawn_callback(Object *p_where, const StringName &p_method, const Variant &p_userdata) override;
- virtual void draw(bool p_swap_buffers, double frame_step);
- virtual void sync();
- virtual bool has_changed() const;
- virtual void init();
- virtual void finish();
+ virtual void draw(bool p_swap_buffers, double frame_step) override;
+ virtual void sync() override;
+ virtual bool has_changed() const override;
+ virtual void init() override;
+ virtual void finish() override;
/* STATUS INFORMATION */
- virtual int get_render_info(RenderInfo p_info);
- virtual String get_video_adapter_name() const;
- virtual String get_video_adapter_vendor() const;
+ virtual int get_render_info(RenderInfo p_info) override;
+ virtual String get_video_adapter_name() const override;
+ virtual String get_video_adapter_vendor() const override;
- virtual void set_frame_profiling_enabled(bool p_enable);
- virtual Vector<FrameProfileArea> get_frame_profile();
- virtual uint64_t get_frame_profile_frame();
+ virtual void set_frame_profiling_enabled(bool p_enable) override;
+ virtual Vector<FrameProfileArea> get_frame_profile() override;
+ virtual uint64_t get_frame_profile_frame() override;
- virtual RID get_test_cube();
+ virtual RID get_test_cube() override;
/* TESTING */
- virtual float get_frame_setup_time_cpu() const;
+ virtual float get_frame_setup_time_cpu() const override;
- virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true);
- virtual void set_default_clear_color(const Color &p_color);
+ virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true) override;
+ virtual void set_default_clear_color(const Color &p_color) override;
- virtual bool has_feature(Features p_feature) const;
+ virtual bool has_feature(Features p_feature) const override;
- virtual bool has_os_feature(const String &p_feature) const;
- virtual void set_debug_generate_wireframes(bool p_generate);
+ virtual bool has_os_feature(const String &p_feature) const override;
+ virtual void set_debug_generate_wireframes(bool p_generate) override;
- virtual void call_set_use_vsync(bool p_enable);
+ virtual bool is_low_end() const override;
- virtual bool is_low_end() const;
+ virtual void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) override;
- virtual void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir);
+ virtual void set_print_gpu_profile(bool p_enable) override;
- RenderingServerDefault();
+ RenderingServerDefault(bool p_create_thread = false);
~RenderingServerDefault();
-
-#undef DISPLAY_CHANGED
-
-#undef BIND0R
-#undef BIND1RC
-#undef BIND2RC
-#undef BIND3RC
-#undef BIND4RC
-
-#undef BIND1
-#undef BIND2
-#undef BIND3
-#undef BIND4
-#undef BIND5
-#undef BIND6
-#undef BIND7
-#undef BIND8
-#undef BIND9
-#undef BIND10
};
#endif
diff --git a/servers/rendering/rendering_server_wrap_mt.cpp b/servers/rendering/rendering_server_wrap_mt.cpp
deleted file mode 100644
index 3572c4dc78..0000000000
--- a/servers/rendering/rendering_server_wrap_mt.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-/*************************************************************************/
-/* rendering_server_wrap_mt.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 "rendering_server_wrap_mt.h"
-#include "core/config/project_settings.h"
-#include "core/os/os.h"
-#include "servers/display_server.h"
-
-void RenderingServerWrapMT::thread_exit() {
- exit = true;
-}
-
-void RenderingServerWrapMT::thread_draw(bool p_swap_buffers, double frame_step) {
- if (!atomic_decrement(&draw_pending)) {
- rendering_server->draw(p_swap_buffers, frame_step);
- }
-}
-
-void RenderingServerWrapMT::thread_flush() {
- atomic_decrement(&draw_pending);
-}
-
-void RenderingServerWrapMT::_thread_callback(void *_instance) {
- RenderingServerWrapMT *vsmt = reinterpret_cast<RenderingServerWrapMT *>(_instance);
-
- vsmt->thread_loop();
-}
-
-void RenderingServerWrapMT::thread_loop() {
- server_thread = Thread::get_caller_id();
-
- DisplayServer::get_singleton()->make_rendering_thread();
-
- rendering_server->init();
-
- exit = false;
- draw_thread_up = true;
- while (!exit) {
- // flush commands one by one, until exit is requested
- command_queue.wait_and_flush_one();
- }
-
- command_queue.flush_all(); // flush all
-
- rendering_server->finish();
-}
-
-/* EVENT QUEUING */
-
-void RenderingServerWrapMT::sync() {
- if (create_thread) {
- atomic_increment(&draw_pending);
- command_queue.push_and_sync(this, &RenderingServerWrapMT::thread_flush);
- } else {
- command_queue.flush_all(); //flush all pending from other threads
- }
-}
-
-void RenderingServerWrapMT::draw(bool p_swap_buffers, double frame_step) {
- if (create_thread) {
- atomic_increment(&draw_pending);
- command_queue.push(this, &RenderingServerWrapMT::thread_draw, p_swap_buffers, frame_step);
- } else {
- rendering_server->draw(p_swap_buffers, frame_step);
- }
-}
-
-void RenderingServerWrapMT::init() {
- if (create_thread) {
- print_verbose("RenderingServerWrapMT: Creating render thread");
- DisplayServer::get_singleton()->release_rendering_thread();
- if (create_thread) {
- thread = Thread::create(_thread_callback, this);
- print_verbose("RenderingServerWrapMT: Starting render thread");
- }
- while (!draw_thread_up) {
- OS::get_singleton()->delay_usec(1000);
- }
- print_verbose("RenderingServerWrapMT: Finished render thread");
- } else {
- rendering_server->init();
- }
-}
-
-void RenderingServerWrapMT::finish() {
- sky_free_cached_ids();
- shader_free_cached_ids();
- material_free_cached_ids();
- mesh_free_cached_ids();
- multimesh_free_cached_ids();
- immediate_free_cached_ids();
- skeleton_free_cached_ids();
- directional_light_free_cached_ids();
- omni_light_free_cached_ids();
- spot_light_free_cached_ids();
- reflection_probe_free_cached_ids();
- gi_probe_free_cached_ids();
- lightmap_free_cached_ids();
- particles_free_cached_ids();
- particles_collision_free_cached_ids();
- camera_free_cached_ids();
- viewport_free_cached_ids();
- environment_free_cached_ids();
- camera_effects_free_cached_ids();
- scenario_free_cached_ids();
- instance_free_cached_ids();
- canvas_free_cached_ids();
- canvas_item_free_cached_ids();
- canvas_light_occluder_free_cached_ids();
- canvas_occluder_polygon_free_cached_ids();
-
- if (thread) {
- command_queue.push(this, &RenderingServerWrapMT::thread_exit);
- Thread::wait_to_finish(thread);
- memdelete(thread);
-
- thread = nullptr;
- } else {
- rendering_server->finish();
- }
-}
-
-void RenderingServerWrapMT::set_use_vsync_callback(bool p_enable) {
- singleton_mt->call_set_use_vsync(p_enable);
-}
-
-RenderingServerWrapMT *RenderingServerWrapMT::singleton_mt = nullptr;
-
-RenderingServerWrapMT::RenderingServerWrapMT(RenderingServer *p_contained, bool p_create_thread) :
- command_queue(p_create_thread) {
- singleton_mt = this;
- DisplayServer::switch_vsync_function = set_use_vsync_callback; //as this goes to another thread, make sure it goes properly
-
- rendering_server = p_contained;
- create_thread = p_create_thread;
- thread = nullptr;
- draw_pending = 0;
- draw_thread_up = false;
- pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
-
- if (!p_create_thread) {
- server_thread = Thread::get_caller_id();
- } else {
- server_thread = 0;
- }
-}
-
-RenderingServerWrapMT::~RenderingServerWrapMT() {
- memdelete(rendering_server);
- //finish();
-}
diff --git a/servers/rendering/rendering_server_wrap_mt.h b/servers/rendering/rendering_server_wrap_mt.h
deleted file mode 100644
index 3db90c32df..0000000000
--- a/servers/rendering/rendering_server_wrap_mt.h
+++ /dev/null
@@ -1,802 +0,0 @@
-/*************************************************************************/
-/* rendering_server_wrap_mt.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 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 RENDERING_SERVER_WRAP_MT_H
-#define RENDERING_SERVER_WRAP_MT_H
-
-#include "core/os/thread.h"
-#include "core/templates/command_queue_mt.h"
-#include "servers/rendering_server.h"
-
-class RenderingServerWrapMT : public RenderingServer {
- // the real visual server
- mutable RenderingServer *rendering_server;
-
- mutable CommandQueueMT command_queue;
-
- static void _thread_callback(void *_instance);
- void thread_loop();
-
- Thread::ID server_thread;
- volatile bool exit;
- Thread *thread;
- volatile bool draw_thread_up;
- bool create_thread;
-
- uint64_t draw_pending;
- void thread_draw(bool p_swap_buffers, double frame_step);
- void thread_flush();
-
- void thread_exit();
-
- Mutex alloc_mutex;
-
- int pool_max_size;
-
- //#define DEBUG_SYNC
-
- static RenderingServerWrapMT *singleton_mt;
-
-#ifdef DEBUG_SYNC
-#define SYNC_DEBUG print_line("sync on: " + String(__FUNCTION__));
-#else
-#define SYNC_DEBUG
-#endif
-
-public:
-#define ServerName RenderingServer
-#define ServerNameWrapMT RenderingServerWrapMT
-#define server_name rendering_server
-#include "servers/server_wrap_mt_common.h"
-
- //these go pass-through, as they can be called from any thread
- virtual RID texture_2d_create(const Ref<Image> &p_image) { return rendering_server->texture_2d_create(p_image); }
- virtual RID texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, TextureLayeredType p_layered_type) { return rendering_server->texture_2d_layered_create(p_layers, p_layered_type); }
- virtual RID texture_3d_create(Image::Format p_format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data) { return rendering_server->texture_3d_create(p_format, p_width, p_height, p_depth, p_mipmaps, p_data); }
- virtual RID texture_proxy_create(RID p_base) { return rendering_server->texture_proxy_create(p_base); }
-
- //goes pass-through
- virtual void texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) { rendering_server->texture_2d_update_immediate(p_texture, p_image, p_layer); }
- //these go through command queue if they are in another thread
- FUNC3(texture_2d_update, RID, const Ref<Image> &, int)
- FUNC2(texture_3d_update, RID, const Vector<Ref<Image>> &)
- FUNC2(texture_proxy_update, RID, RID)
-
- //these also go pass-through
- virtual RID texture_2d_placeholder_create() { return rendering_server->texture_2d_placeholder_create(); }
- virtual RID texture_2d_layered_placeholder_create(TextureLayeredType p_type) { return rendering_server->texture_2d_layered_placeholder_create(p_type); }
- virtual RID texture_3d_placeholder_create() { return rendering_server->texture_3d_placeholder_create(); }
-
- FUNC1RC(Ref<Image>, texture_2d_get, RID)
- FUNC2RC(Ref<Image>, texture_2d_layer_get, RID, int)
- FUNC1RC(Vector<Ref<Image>>, texture_3d_get, RID)
-
- FUNC2(texture_replace, RID, RID)
-
- FUNC3(texture_set_size_override, RID, int, int)
-// FIXME: Disabled during Vulkan refactoring, should be ported.
-#if 0
- FUNC2(texture_bind, RID, uint32_t)
-#endif
-
- FUNC3(texture_set_detect_3d_callback, RID, TextureDetectCallback, void *)
- FUNC3(texture_set_detect_normal_callback, RID, TextureDetectCallback, void *)
- FUNC3(texture_set_detect_roughness_callback, RID, TextureDetectRoughnessCallback, void *)
-
- FUNC2(texture_set_path, RID, const String &)
- FUNC1RC(String, texture_get_path, RID)
- FUNC1S(texture_debug_usage, List<TextureInfo> *)
-
- FUNC2(texture_set_force_redraw_if_visible, RID, bool)
-
- /* SHADER API */
-
- FUNCRID(shader)
-
- FUNC2(shader_set_code, RID, const String &)
- FUNC1RC(String, shader_get_code, RID)
-
- FUNC2SC(shader_get_param_list, RID, List<PropertyInfo> *)
-
- FUNC3(shader_set_default_texture_param, RID, const StringName &, RID)
- FUNC2RC(RID, shader_get_default_texture_param, RID, const StringName &)
- FUNC2RC(Variant, shader_get_param_default, RID, const StringName &)
-
- FUNC1RC(ShaderNativeSourceCode, shader_get_native_source_code, RID)
-
- /* COMMON MATERIAL API */
-
- FUNCRID(material)
-
- FUNC2(material_set_shader, RID, RID)
-
- FUNC3(material_set_param, RID, const StringName &, const Variant &)
- FUNC2RC(Variant, material_get_param, RID, const StringName &)
-
- FUNC2(material_set_render_priority, RID, int)
- FUNC2(material_set_next_pass, RID, RID)
-
- /* MESH API */
-
- virtual RID mesh_create_from_surfaces(const Vector<SurfaceData> &p_surfaces, int p_blend_shape_count = 0) {
- return rendering_server->mesh_create_from_surfaces(p_surfaces, p_blend_shape_count);
- }
-
- FUNC2(mesh_set_blend_shape_count, RID, int)
-
- FUNCRID(mesh)
-
- FUNC2(mesh_add_surface, RID, const SurfaceData &)
-
- FUNC1RC(int, mesh_get_blend_shape_count, RID)
-
- FUNC2(mesh_set_blend_shape_mode, RID, BlendShapeMode)
- FUNC1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID)
-
- FUNC4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &)
-
- FUNC3(mesh_surface_set_material, RID, int, RID)
- FUNC2RC(RID, mesh_surface_get_material, RID, int)
-
- FUNC2RC(SurfaceData, mesh_get_surface, RID, int)
-
- FUNC1RC(int, mesh_get_surface_count, RID)
-
- FUNC2(mesh_set_custom_aabb, RID, const AABB &)
- FUNC1RC(AABB, mesh_get_custom_aabb, RID)
-
- FUNC1(mesh_clear, RID)
-
- /* MULTIMESH API */
-
- FUNCRID(multimesh)
-
- FUNC5(multimesh_allocate, RID, int, MultimeshTransformFormat, bool, bool)
- FUNC1RC(int, multimesh_get_instance_count, RID)
-
- FUNC2(multimesh_set_mesh, RID, RID)
- FUNC3(multimesh_instance_set_transform, RID, int, const Transform &)
- FUNC3(multimesh_instance_set_transform_2d, RID, int, const Transform2D &)
- FUNC3(multimesh_instance_set_color, RID, int, const Color &)
- FUNC3(multimesh_instance_set_custom_data, RID, int, const Color &)
-
- FUNC1RC(RID, multimesh_get_mesh, RID)
- FUNC1RC(AABB, multimesh_get_aabb, RID)
-
- FUNC2RC(Transform, multimesh_instance_get_transform, RID, int)
- FUNC2RC(Transform2D, multimesh_instance_get_transform_2d, RID, int)
- FUNC2RC(Color, multimesh_instance_get_color, RID, int)
- FUNC2RC(Color, multimesh_instance_get_custom_data, RID, int)
-
- FUNC2(multimesh_set_buffer, RID, const Vector<float> &)
- FUNC1RC(Vector<float>, multimesh_get_buffer, RID)
-
- FUNC2(multimesh_set_visible_instances, RID, int)
- FUNC1RC(int, multimesh_get_visible_instances, RID)
-
- /* IMMEDIATE API */
-
- FUNCRID(immediate)
- FUNC3(immediate_begin, RID, PrimitiveType, RID)
- FUNC2(immediate_vertex, RID, const Vector3 &)
- FUNC2(immediate_normal, RID, const Vector3 &)
- FUNC2(immediate_tangent, RID, const Plane &)
- FUNC2(immediate_color, RID, const Color &)
- FUNC2(immediate_uv, RID, const Vector2 &)
- FUNC2(immediate_uv2, RID, const Vector2 &)
- FUNC1(immediate_end, RID)
- FUNC1(immediate_clear, RID)
- FUNC2(immediate_set_material, RID, RID)
- FUNC1RC(RID, immediate_get_material, RID)
-
- /* SKELETON API */
-
- FUNCRID(skeleton)
- FUNC3(skeleton_allocate, RID, int, bool)
- FUNC1RC(int, skeleton_get_bone_count, RID)
- FUNC3(skeleton_bone_set_transform, RID, int, const Transform &)
- FUNC2RC(Transform, skeleton_bone_get_transform, RID, int)
- 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 &)
-
- /* Light API */
-
- FUNCRID(directional_light)
- FUNCRID(omni_light)
- FUNCRID(spot_light)
-
- FUNC2(light_set_color, RID, const Color &)
- FUNC3(light_set_param, RID, LightParam, float)
- FUNC2(light_set_shadow, RID, bool)
- FUNC2(light_set_shadow_color, RID, const Color &)
- FUNC2(light_set_projector, RID, RID)
- FUNC2(light_set_negative, RID, bool)
- FUNC2(light_set_cull_mask, RID, uint32_t)
- FUNC2(light_set_reverse_cull_face_mode, RID, bool)
- FUNC2(light_set_bake_mode, RID, LightBakeMode)
- FUNC2(light_set_max_sdfgi_cascade, RID, uint32_t)
-
- FUNC2(light_omni_set_shadow_mode, RID, LightOmniShadowMode)
-
- FUNC2(light_directional_set_shadow_mode, RID, LightDirectionalShadowMode)
- FUNC2(light_directional_set_blend_splits, RID, bool)
- FUNC2(light_directional_set_sky_only, RID, bool)
- FUNC2(light_directional_set_shadow_depth_range_mode, RID, LightDirectionalShadowDepthRangeMode)
-
- /* PROBE API */
-
- FUNCRID(reflection_probe)
-
- FUNC2(reflection_probe_set_update_mode, RID, ReflectionProbeUpdateMode)
- FUNC2(reflection_probe_set_intensity, RID, float)
- FUNC2(reflection_probe_set_ambient_color, RID, const Color &)
- FUNC2(reflection_probe_set_ambient_energy, RID, float)
- FUNC2(reflection_probe_set_ambient_mode, RID, ReflectionProbeAmbientMode)
- FUNC2(reflection_probe_set_max_distance, RID, float)
- FUNC2(reflection_probe_set_extents, RID, const Vector3 &)
- FUNC2(reflection_probe_set_origin_offset, RID, const Vector3 &)
- FUNC2(reflection_probe_set_as_interior, RID, bool)
- FUNC2(reflection_probe_set_enable_box_projection, RID, bool)
- FUNC2(reflection_probe_set_enable_shadows, RID, bool)
- FUNC2(reflection_probe_set_cull_mask, RID, uint32_t)
- FUNC2(reflection_probe_set_resolution, RID, int)
- FUNC2(reflection_probe_set_lod_threshold, RID, float)
-
- /* DECAL API */
-
- FUNCRID(decal)
-
- FUNC2(decal_set_extents, RID, const Vector3 &)
- FUNC3(decal_set_texture, RID, DecalTexture, RID)
- FUNC2(decal_set_emission_energy, RID, float)
- FUNC2(decal_set_albedo_mix, RID, float)
- FUNC2(decal_set_modulate, RID, const Color &)
- FUNC2(decal_set_cull_mask, RID, uint32_t)
- FUNC4(decal_set_distance_fade, RID, bool, float, float)
- FUNC3(decal_set_fade, RID, float, float)
- FUNC2(decal_set_normal_fade, RID, float)
-
- /* BAKED LIGHT API */
-
- FUNCRID(gi_probe)
-
- FUNC8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &)
-
- FUNC1RC(AABB, gi_probe_get_bounds, RID)
- FUNC1RC(Vector3i, gi_probe_get_octree_size, RID)
- FUNC1RC(Vector<uint8_t>, gi_probe_get_octree_cells, RID)
- FUNC1RC(Vector<uint8_t>, gi_probe_get_data_cells, RID)
- FUNC1RC(Vector<uint8_t>, gi_probe_get_distance_field, RID)
- FUNC1RC(Vector<int>, gi_probe_get_level_counts, RID)
- FUNC1RC(Transform, gi_probe_get_to_cell_xform, RID)
-
- FUNC2(gi_probe_set_dynamic_range, RID, float)
- FUNC1RC(float, gi_probe_get_dynamic_range, RID)
-
- FUNC2(gi_probe_set_propagation, RID, float)
- FUNC1RC(float, gi_probe_get_propagation, RID)
-
- FUNC2(gi_probe_set_energy, RID, float)
- FUNC1RC(float, gi_probe_get_energy, RID)
-
- FUNC2(gi_probe_set_ao, RID, float)
- FUNC1RC(float, gi_probe_get_ao, RID)
-
- FUNC2(gi_probe_set_ao_size, RID, float)
- FUNC1RC(float, gi_probe_get_ao_size, RID)
-
- FUNC2(gi_probe_set_bias, RID, float)
- FUNC1RC(float, gi_probe_get_bias, RID)
-
- FUNC2(gi_probe_set_normal_bias, RID, float)
- FUNC1RC(float, gi_probe_get_normal_bias, RID)
-
- FUNC2(gi_probe_set_interior, RID, bool)
- FUNC1RC(bool, gi_probe_is_interior, RID)
-
- FUNC2(gi_probe_set_use_two_bounces, RID, bool)
- FUNC1RC(bool, gi_probe_is_using_two_bounces, RID)
-
- FUNC2(gi_probe_set_anisotropy_strength, RID, float)
- FUNC1RC(float, gi_probe_get_anisotropy_strength, RID)
-
- FUNC1(gi_probe_set_quality, GIProbeQuality)
-
- /* LIGHTMAP CAPTURE */
-
- FUNCRID(lightmap)
- FUNC3(lightmap_set_textures, RID, RID, bool)
- FUNC2(lightmap_set_probe_bounds, RID, const AABB &)
- FUNC2(lightmap_set_probe_interior, RID, bool)
- FUNC5(lightmap_set_probe_capture_data, RID, const PackedVector3Array &, const PackedColorArray &, const PackedInt32Array &, const PackedInt32Array &)
- FUNC1RC(PackedVector3Array, lightmap_get_probe_capture_points, RID)
- FUNC1RC(PackedColorArray, lightmap_get_probe_capture_sh, RID)
- FUNC1RC(PackedInt32Array, lightmap_get_probe_capture_tetrahedra, RID)
- FUNC1RC(PackedInt32Array, lightmap_get_probe_capture_bsp_tree, RID)
-
- FUNC1(lightmap_set_probe_capture_update_speed, float)
-
- /* PARTICLES */
-
- FUNCRID(particles)
-
- FUNC2(particles_set_emitting, RID, bool)
- FUNC1R(bool, particles_get_emitting, RID)
- FUNC2(particles_set_amount, RID, int)
- FUNC2(particles_set_lifetime, RID, float)
- FUNC2(particles_set_one_shot, RID, bool)
- FUNC2(particles_set_pre_process_time, RID, float)
- FUNC2(particles_set_explosiveness_ratio, RID, float)
- FUNC2(particles_set_randomness_ratio, RID, float)
- FUNC2(particles_set_custom_aabb, RID, const AABB &)
- FUNC2(particles_set_speed_scale, RID, float)
- FUNC2(particles_set_use_local_coordinates, RID, bool)
- FUNC2(particles_set_process_material, RID, RID)
- FUNC2(particles_set_fixed_fps, RID, int)
- FUNC2(particles_set_fractional_delta, RID, bool)
- FUNC2(particles_set_collision_base_size, RID, float)
-
- FUNC1R(bool, particles_is_inactive, RID)
- FUNC1(particles_request_process, RID)
- FUNC1(particles_restart, RID)
-
- FUNC6(particles_emit, RID, const Transform &, const Vector3 &, const Color &, const Color &, uint32_t)
-
- FUNC2(particles_set_draw_order, RID, RS::ParticlesDrawOrder)
-
- FUNC2(particles_set_draw_passes, RID, int)
- FUNC3(particles_set_draw_pass_mesh, RID, int, RID)
- FUNC2(particles_set_emission_transform, RID, const Transform &)
- FUNC2(particles_set_subemitter, RID, RID)
-
- FUNC1R(AABB, particles_get_current_aabb, RID)
-
- /* PARTICLES COLLISION */
-
- FUNCRID(particles_collision)
-
- FUNC2(particles_collision_set_collision_type, RID, ParticlesCollisionType)
- FUNC2(particles_collision_set_cull_mask, RID, uint32_t)
- FUNC2(particles_collision_set_sphere_radius, RID, float)
- FUNC2(particles_collision_set_box_extents, RID, const Vector3 &)
- FUNC2(particles_collision_set_attractor_strength, RID, float)
- FUNC2(particles_collision_set_attractor_directionality, RID, float)
- FUNC2(particles_collision_set_attractor_attenuation, RID, float)
- FUNC2(particles_collision_set_field_texture, RID, RID)
- FUNC1(particles_collision_height_field_update, RID)
- FUNC2(particles_collision_set_height_field_resolution, RID, ParticlesCollisionHeightfieldResolution)
-
- /* CAMERA API */
-
- FUNCRID(camera)
- FUNC4(camera_set_perspective, RID, float, float, float)
- FUNC4(camera_set_orthogonal, RID, float, float, float)
- FUNC5(camera_set_frustum, RID, float, Vector2, float, float)
- FUNC2(camera_set_transform, RID, const Transform &)
- FUNC2(camera_set_cull_mask, RID, uint32_t)
- FUNC2(camera_set_environment, RID, RID)
- FUNC2(camera_set_camera_effects, RID, RID)
- FUNC2(camera_set_use_vertical_aspect, RID, bool)
-
- /* VIEWPORT TARGET API */
-
- FUNCRID(viewport)
-
- FUNC2(viewport_set_use_xr, RID, bool)
-
- FUNC3(viewport_set_size, RID, int, int)
-
- FUNC2(viewport_set_active, RID, bool)
- FUNC2(viewport_set_parent_viewport, RID, RID)
-
- FUNC2(viewport_set_clear_mode, RID, ViewportClearMode)
-
- FUNC3(viewport_attach_to_screen, RID, const Rect2 &, DisplayServer::WindowID)
- FUNC2(viewport_set_render_direct_to_screen, RID, bool)
-
- FUNC2(viewport_set_update_mode, RID, ViewportUpdateMode)
-
- FUNC1RC(RID, viewport_get_texture, RID)
-
- FUNC2(viewport_set_hide_scenario, RID, bool)
- FUNC2(viewport_set_hide_canvas, RID, bool)
- FUNC2(viewport_set_disable_environment, RID, bool)
-
- FUNC2(viewport_attach_camera, RID, RID)
- FUNC2(viewport_set_scenario, RID, RID)
- FUNC2(viewport_attach_canvas, RID, RID)
-
- FUNC2(viewport_remove_canvas, RID, RID)
- FUNC3(viewport_set_canvas_transform, RID, RID, const Transform2D &)
- FUNC2(viewport_set_transparent_background, RID, bool)
- FUNC2(viewport_set_snap_2d_transforms_to_pixel, RID, bool)
- FUNC2(viewport_set_snap_2d_vertices_to_pixel, RID, bool)
-
- FUNC2(viewport_set_default_canvas_item_texture_filter, RID, CanvasItemTextureFilter)
- FUNC2(viewport_set_default_canvas_item_texture_repeat, RID, CanvasItemTextureRepeat)
-
- FUNC2(viewport_set_global_canvas_transform, RID, const Transform2D &)
- FUNC4(viewport_set_canvas_stacking, RID, RID, int, int)
- FUNC2(viewport_set_shadow_atlas_size, RID, int)
- FUNC3(viewport_set_sdf_oversize_and_scale, RID, ViewportSDFOversize, ViewportSDFScale)
-
- FUNC3(viewport_set_shadow_atlas_quadrant_subdivision, RID, int, int)
- FUNC2(viewport_set_msaa, RID, ViewportMSAA)
- FUNC2(viewport_set_screen_space_aa, RID, ViewportScreenSpaceAA)
- FUNC2(viewport_set_use_debanding, RID, bool)
-
- FUNC2(viewport_set_lod_threshold, RID, float)
-
- //this passes directly to avoid stalling, but it's pretty dangerous, so don't call after freeing a viewport
- virtual int viewport_get_render_info(RID p_viewport, ViewportRenderInfo p_info) {
- return rendering_server->viewport_get_render_info(p_viewport, p_info);
- }
-
- FUNC2(viewport_set_debug_draw, RID, ViewportDebugDraw)
-
- FUNC2(viewport_set_measure_render_time, RID, bool)
- virtual float viewport_get_measured_render_time_cpu(RID p_viewport) const {
- return rendering_server->viewport_get_measured_render_time_cpu(p_viewport);
- }
- virtual float viewport_get_measured_render_time_gpu(RID p_viewport) const {
- return rendering_server->viewport_get_measured_render_time_gpu(p_viewport);
- }
-
- FUNC1(directional_shadow_atlas_set_size, int)
-
- /* SKY API */
-
- FUNCRID(sky)
- FUNC2(sky_set_radiance_size, RID, int)
- FUNC2(sky_set_mode, RID, SkyMode)
- FUNC2(sky_set_material, RID, RID)
- FUNC4R(Ref<Image>, sky_bake_panorama, RID, float, bool, const Size2i &)
-
- /* ENVIRONMENT API */
-
- FUNCRID(environment)
-
- FUNC2(environment_set_background, RID, EnvironmentBG)
- FUNC2(environment_set_sky, RID, RID)
- FUNC2(environment_set_sky_custom_fov, RID, float)
- FUNC2(environment_set_sky_orientation, RID, const Basis &)
- FUNC2(environment_set_bg_color, RID, const Color &)
- FUNC2(environment_set_bg_energy, RID, float)
- FUNC2(environment_set_canvas_max_layer, RID, int)
- FUNC7(environment_set_ambient_light, RID, const Color &, EnvironmentAmbientSource, float, float, EnvironmentReflectionSource, const Color &)
-
-// FIXME: Disabled during Vulkan refactoring, should be ported.
-#if 0
- FUNC2(environment_set_camera_feed_id, RID, int)
-#endif
- FUNC6(environment_set_ssr, RID, bool, int, float, float, float)
- FUNC1(environment_set_ssr_roughness_quality, EnvironmentSSRRoughnessQuality)
-
- FUNC10(environment_set_ssao, RID, bool, float, float, float, float, float, float, float, float)
-
- FUNC6(environment_set_ssao_quality, EnvironmentSSAOQuality, bool, float, int, float, float)
-
- FUNC11(environment_set_sdfgi, RID, bool, EnvironmentSDFGICascades, float, EnvironmentSDFGIYScale, bool, bool, bool, float, float, float)
- FUNC1(environment_set_sdfgi_ray_count, EnvironmentSDFGIRayCount)
- FUNC1(environment_set_sdfgi_frames_to_converge, EnvironmentSDFGIFramesToConverge)
-
- FUNC11(environment_set_glow, RID, bool, Vector<float>, float, float, float, float, EnvironmentGlowBlendMode, float, float, float)
- FUNC1(environment_glow_set_use_bicubic_upscale, bool)
- FUNC1(environment_glow_set_use_high_quality, bool)
-
- FUNC9(environment_set_tonemap, RID, EnvironmentToneMapper, float, float, bool, float, float, float, float)
-
- FUNC7(environment_set_adjustment, RID, bool, float, float, float, bool, RID)
-
- FUNC9(environment_set_fog, RID, bool, const Color &, float, float, float, float, float, float)
-
- FUNC9(environment_set_volumetric_fog, RID, bool, float, const Color &, float, float, float, float, EnvVolumetricFogShadowFilter)
-
- FUNC2(environment_set_volumetric_fog_volume_size, int, int)
- FUNC1(environment_set_volumetric_fog_filter_active, bool)
- FUNC1(environment_set_volumetric_fog_directional_shadow_shrink_size, int)
- FUNC1(environment_set_volumetric_fog_positional_shadow_shrink_size, int)
-
- FUNC3R(Ref<Image>, environment_bake_panorama, RID, bool, const Size2i &)
-
- FUNC3(screen_space_roughness_limiter_set_active, bool, float, float)
- FUNC1(sub_surface_scattering_set_quality, SubSurfaceScatteringQuality)
- FUNC2(sub_surface_scattering_set_scale, float, float)
-
- FUNCRID(camera_effects)
-
- FUNC2(camera_effects_set_dof_blur_quality, DOFBlurQuality, bool)
- FUNC1(camera_effects_set_dof_blur_bokeh_shape, DOFBokehShape)
-
- FUNC8(camera_effects_set_dof_blur, RID, bool, float, float, bool, float, float, float)
- FUNC3(camera_effects_set_custom_exposure, RID, bool, float)
-
- FUNC1(shadows_quality_set, ShadowQuality);
- FUNC1(directional_shadow_quality_set, ShadowQuality);
-
- FUNCRID(scenario)
-
- FUNC2(scenario_set_debug, RID, ScenarioDebugMode)
- FUNC2(scenario_set_environment, RID, RID)
- FUNC2(scenario_set_camera_effects, RID, RID)
- FUNC2(scenario_set_fallback_environment, RID, RID)
-
- /* INSTANCING API */
- FUNCRID(instance)
-
- FUNC2(instance_set_base, RID, RID)
- FUNC2(instance_set_scenario, RID, RID)
- FUNC2(instance_set_layer_mask, RID, uint32_t)
- FUNC2(instance_set_transform, RID, const Transform &)
- FUNC2(instance_attach_object_instance_id, RID, ObjectID)
- FUNC3(instance_set_blend_shape_weight, RID, int, float)
- FUNC3(instance_set_surface_material, RID, int, RID)
- FUNC2(instance_set_visible, RID, bool)
-
- FUNC2(instance_set_custom_aabb, RID, AABB)
-
- FUNC2(instance_attach_skeleton, RID, RID)
- FUNC2(instance_set_exterior, RID, bool)
-
- FUNC2(instance_set_extra_visibility_margin, RID, real_t)
-
- // don't use these in a game!
- FUNC2RC(Vector<ObjectID>, instances_cull_aabb, const AABB &, RID)
- FUNC3RC(Vector<ObjectID>, instances_cull_ray, const Vector3 &, const Vector3 &, RID)
- FUNC2RC(Vector<ObjectID>, instances_cull_convex, const Vector<Plane> &, RID)
-
- FUNC3(instance_geometry_set_flag, RID, InstanceFlags, bool)
- FUNC2(instance_geometry_set_cast_shadows_setting, RID, ShadowCastingSetting)
- FUNC2(instance_geometry_set_material_override, RID, RID)
-
- FUNC5(instance_geometry_set_draw_range, RID, float, float, float, float)
- FUNC2(instance_geometry_set_as_instance_lod, RID, RID)
- FUNC4(instance_geometry_set_lightmap, RID, RID, const Rect2 &, int)
- FUNC2(instance_geometry_set_lod_bias, RID, float)
-
- FUNC3(instance_geometry_set_shader_parameter, RID, const StringName &, const Variant &)
- FUNC2RC(Variant, instance_geometry_get_shader_parameter, RID, const StringName &)
- FUNC2RC(Variant, instance_geometry_get_shader_parameter_default_value, RID, const StringName &)
- FUNC2SC(instance_geometry_get_shader_parameter_list, RID, List<PropertyInfo> *)
-
- /* BAKE */
-
- FUNC3R(TypedArray<Image>, bake_render_uv2, RID, const Vector<RID> &, const Size2i &)
-
- /* CANVAS (2D) */
-
- FUNCRID(canvas)
- FUNC3(canvas_set_item_mirroring, RID, RID, const Point2 &)
- FUNC2(canvas_set_modulate, RID, const Color &)
- FUNC3(canvas_set_parent, RID, RID, float)
- FUNC1(canvas_set_disable_scale, bool)
-
- FUNCRID(canvas_texture)
- FUNC3(canvas_texture_set_channel, RID, CanvasTextureChannel, RID)
- FUNC3(canvas_texture_set_shading_parameters, RID, const Color &, float)
-
- FUNC2(canvas_texture_set_texture_filter, RID, CanvasItemTextureFilter)
- FUNC2(canvas_texture_set_texture_repeat, RID, CanvasItemTextureRepeat)
-
- FUNCRID(canvas_item)
- FUNC2(canvas_item_set_parent, RID, RID)
-
- FUNC2(canvas_item_set_default_texture_filter, RID, CanvasItemTextureFilter)
- FUNC2(canvas_item_set_default_texture_repeat, RID, CanvasItemTextureRepeat)
-
- FUNC2(canvas_item_set_visible, RID, bool)
- FUNC2(canvas_item_set_light_mask, RID, int)
-
- FUNC2(canvas_item_set_update_when_visible, RID, bool)
-
- FUNC2(canvas_item_set_transform, RID, const Transform2D &)
- FUNC2(canvas_item_set_clip, RID, bool)
- FUNC2(canvas_item_set_distance_field_mode, RID, bool)
- FUNC3(canvas_item_set_custom_rect, RID, bool, const Rect2 &)
- FUNC2(canvas_item_set_modulate, RID, const Color &)
- FUNC2(canvas_item_set_self_modulate, RID, const Color &)
-
- FUNC2(canvas_item_set_draw_behind_parent, RID, bool)
-
- FUNC5(canvas_item_add_line, RID, const Point2 &, const Point2 &, const Color &, float)
- FUNC5(canvas_item_add_polyline, RID, const Vector<Point2> &, const Vector<Color> &, float, bool)
- FUNC4(canvas_item_add_multiline, RID, const Vector<Point2> &, const Vector<Color> &, float)
- FUNC3(canvas_item_add_rect, RID, const Rect2 &, const Color &)
- FUNC4(canvas_item_add_circle, RID, const Point2 &, float, const Color &)
- FUNC6(canvas_item_add_texture_rect, RID, const Rect2 &, RID, bool, const Color &, bool)
- FUNC7(canvas_item_add_texture_rect_region, RID, const Rect2 &, RID, const Rect2 &, const Color &, bool, bool)
- FUNC10(canvas_item_add_nine_patch, RID, const Rect2 &, const Rect2 &, RID, const Vector2 &, const Vector2 &, NinePatchAxisMode, NinePatchAxisMode, bool, const Color &)
- FUNC6(canvas_item_add_primitive, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, float)
- FUNC5(canvas_item_add_polygon, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID)
- FUNC9(canvas_item_add_triangle_array, RID, const Vector<int> &, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, const Vector<int> &, const Vector<float> &, RID, int)
- FUNC5(canvas_item_add_mesh, RID, const RID &, const Transform2D &, const Color &, RID)
- FUNC3(canvas_item_add_multimesh, RID, RID, RID)
- FUNC3(canvas_item_add_particles, RID, RID, RID)
- FUNC2(canvas_item_add_set_transform, RID, const Transform2D &)
- FUNC2(canvas_item_add_clip_ignore, RID, bool)
- FUNC2(canvas_item_set_sort_children_by_y, RID, bool)
- FUNC2(canvas_item_set_z_index, RID, int)
- FUNC2(canvas_item_set_z_as_relative_to_parent, RID, bool)
- FUNC3(canvas_item_set_copy_to_backbuffer, RID, bool, const Rect2 &)
- FUNC2(canvas_item_attach_skeleton, RID, RID)
-
- FUNC1(canvas_item_clear, RID)
- FUNC2(canvas_item_set_draw_index, RID, int)
-
- FUNC2(canvas_item_set_material, RID, RID)
-
- FUNC2(canvas_item_set_use_parent_material, RID, bool)
-
- FUNC6(canvas_item_set_canvas_group_mode, RID, CanvasGroupMode, float, bool, float, bool)
-
- FUNC0R(RID, canvas_light_create)
-
- FUNC2(canvas_light_set_mode, RID, CanvasLightMode)
-
- FUNC2(canvas_light_attach_to_canvas, RID, RID)
- FUNC2(canvas_light_set_enabled, RID, bool)
- FUNC2(canvas_light_set_texture_scale, RID, float)
- FUNC2(canvas_light_set_transform, RID, const Transform2D &)
- FUNC2(canvas_light_set_texture, RID, RID)
- FUNC2(canvas_light_set_texture_offset, RID, const Vector2 &)
- FUNC2(canvas_light_set_color, RID, const Color &)
- FUNC2(canvas_light_set_height, RID, float)
- FUNC2(canvas_light_set_energy, RID, float)
- FUNC3(canvas_light_set_z_range, RID, int, int)
- FUNC3(canvas_light_set_layer_range, RID, int, int)
- FUNC2(canvas_light_set_item_cull_mask, RID, int)
- FUNC2(canvas_light_set_item_shadow_cull_mask, RID, int)
- FUNC2(canvas_light_set_directional_distance, RID, float)
-
- FUNC2(canvas_light_set_blend_mode, RID, CanvasLightBlendMode)
-
- FUNC2(canvas_light_set_shadow_enabled, RID, bool)
- FUNC2(canvas_light_set_shadow_filter, RID, CanvasLightShadowFilter)
- FUNC2(canvas_light_set_shadow_color, RID, const Color &)
- FUNC2(canvas_light_set_shadow_smooth, RID, float)
-
- FUNCRID(canvas_light_occluder)
- FUNC2(canvas_light_occluder_attach_to_canvas, RID, RID)
- FUNC2(canvas_light_occluder_set_enabled, RID, bool)
- FUNC2(canvas_light_occluder_set_polygon, RID, RID)
- FUNC2(canvas_light_occluder_set_as_sdf_collision, RID, bool)
- FUNC2(canvas_light_occluder_set_transform, RID, const Transform2D &)
- FUNC2(canvas_light_occluder_set_light_mask, RID, int)
-
- FUNCRID(canvas_occluder_polygon)
- FUNC3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool)
-
- FUNC2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode)
-
- FUNC1(canvas_set_shadow_texture_size, int)
-
- /* GLOBAL VARIABLES */
-
- FUNC3(global_variable_add, const StringName &, GlobalVariableType, const Variant &)
- FUNC1(global_variable_remove, const StringName &)
- FUNC0RC(Vector<StringName>, global_variable_get_list)
- FUNC2(global_variable_set, const StringName &, const Variant &)
- FUNC2(global_variable_set_override, const StringName &, const Variant &)
- FUNC1RC(GlobalVariableType, global_variable_get_type, const StringName &)
- FUNC1RC(Variant, global_variable_get, const StringName &)
- FUNC1(global_variables_load_settings, bool)
- FUNC0(global_variables_clear)
-
- /* BLACK BARS */
-
- FUNC4(black_bars_set_margins, int, int, int, int)
- FUNC4(black_bars_set_images, RID, RID, RID, RID)
-
- /* FREE */
-
- FUNC1(free, RID)
-
- /* EVENT QUEUING */
-
- FUNC3(request_frame_drawn_callback, Object *, const StringName &, const Variant &)
-
- virtual void init();
- virtual void finish();
- virtual void draw(bool p_swap_buffers, double frame_step);
- virtual void sync();
- FUNC0RC(bool, has_changed)
-
- /* RENDER INFO */
-
- //this passes directly to avoid stalling
- virtual int get_render_info(RenderInfo p_info) {
- return rendering_server->get_render_info(p_info);
- }
-
- virtual String get_video_adapter_name() const {
- return rendering_server->get_video_adapter_name();
- }
-
- virtual String get_video_adapter_vendor() const {
- return rendering_server->get_video_adapter_vendor();
- }
-
- FUNC4(set_boot_image, const Ref<Image> &, const Color &, bool, bool)
- FUNC1(set_default_clear_color, const Color &)
-
- FUNC0R(RID, get_test_cube)
-
- FUNC1(set_debug_generate_wireframes, bool)
-
- virtual bool has_feature(Features p_feature) const {
- return rendering_server->has_feature(p_feature);
- }
- virtual bool has_os_feature(const String &p_feature) const {
- return rendering_server->has_os_feature(p_feature);
- }
-
- FUNC1(call_set_use_vsync, bool)
-
- static void set_use_vsync_callback(bool p_enable);
-
- virtual bool is_low_end() const {
- return rendering_server->is_low_end();
- }
-
- virtual uint64_t get_frame_profile_frame() {
- return rendering_server->get_frame_profile_frame();
- }
-
- virtual void set_frame_profiling_enabled(bool p_enabled) {
- rendering_server->set_frame_profiling_enabled(p_enabled);
- }
-
- virtual Vector<FrameProfileArea> get_frame_profile() {
- return rendering_server->get_frame_profile();
- }
-
- virtual float get_frame_setup_time_cpu() const {
- return rendering_server->get_frame_setup_time_cpu();
- }
-
- virtual void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) {
- rendering_server->sdfgi_set_debug_probe_select(p_position, p_dir);
- }
-
- RenderingServerWrapMT(RenderingServer *p_contained, bool p_create_thread);
- ~RenderingServerWrapMT();
-
-#undef ServerName
-#undef ServerNameWrapMT
-#undef server_name
-};
-
-#ifdef DEBUG_SYNC
-#undef DEBUG_SYNC
-#endif
-#undef SYNC_DEBUG
-
-#endif
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index 2fa3355d2f..e52d97e4d9 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -643,7 +643,7 @@ ShaderLanguage::Token ShaderLanguage::_get_token() {
}
if (hexa_found) {
- tk.constant = (double)str.hex_to_int(true);
+ tk.constant = (double)str.hex_to_int();
} else {
tk.constant = str.to_float();
}
@@ -3102,6 +3102,72 @@ bool ShaderLanguage::_is_operator_assign(Operator p_op) const {
return false;
}
+bool ShaderLanguage::_validate_varying_assign(ShaderNode::Varying &p_varying, String *r_message) {
+ if (current_function == String("light")) {
+ *r_message = RTR("Varying may not be assigned in the 'light' function.");
+ return false;
+ }
+ switch (p_varying.stage) {
+ case ShaderNode::Varying::STAGE_UNKNOWN: // first assign
+ if (current_function == String("vertex")) {
+ p_varying.stage = ShaderNode::Varying::STAGE_VERTEX;
+ } else if (current_function == String("fragment")) {
+ p_varying.stage = ShaderNode::Varying::STAGE_FRAGMENT;
+ }
+ break;
+ case ShaderNode::Varying::STAGE_VERTEX:
+ if (current_function == String("fragment")) {
+ *r_message = RTR("Varyings which assigned in 'vertex' function may not be reassigned in 'fragment' or 'light'.");
+ return false;
+ }
+ break;
+ case ShaderNode::Varying::STAGE_FRAGMENT:
+ if (current_function == String("vertex")) {
+ *r_message = RTR("Varyings which assigned in 'fragment' function may not be reassigned in 'vertex' or 'light'.");
+ return false;
+ }
+ break;
+ default:
+ break;
+ }
+ return true;
+}
+
+bool ShaderLanguage::_validate_varying_using(ShaderNode::Varying &p_varying, String *r_message) {
+ switch (p_varying.stage) {
+ case ShaderNode::Varying::STAGE_UNKNOWN:
+ *r_message = RTR("Varying must be assigned before using!");
+ return false;
+ case ShaderNode::Varying::STAGE_VERTEX:
+ if (current_function == String("fragment")) {
+ p_varying.stage = ShaderNode::Varying::STAGE_VERTEX_TO_FRAGMENT;
+ } else if (current_function == String("light")) {
+ p_varying.stage = ShaderNode::Varying::STAGE_VERTEX_TO_LIGHT;
+ }
+ break;
+ case ShaderNode::Varying::STAGE_FRAGMENT:
+ if (current_function == String("light")) {
+ p_varying.stage = ShaderNode::Varying::STAGE_FRAGMENT_TO_LIGHT;
+ }
+ break;
+ case ShaderNode::Varying::STAGE_VERTEX_TO_FRAGMENT:
+ if (current_function == String("light")) {
+ *r_message = RTR("Varying must only be used in two different stages, which can be 'vertex' 'fragment' and 'light'");
+ return false;
+ }
+ break;
+ case ShaderNode::Varying::STAGE_VERTEX_TO_LIGHT:
+ if (current_function == String("fragment")) {
+ *r_message = RTR("Varying must only be used in two different stages, which can be 'vertex' 'fragment' and 'light'");
+ return false;
+ }
+ break;
+ default:
+ break;
+ }
+ return true;
+}
+
bool ShaderLanguage::_validate_assign(Node *p_node, const FunctionInfo &p_function_info, String *r_message) {
if (p_node->type == Node::TYPE_OPERATOR) {
OperatorNode *op = static_cast<OperatorNode *>(p_node);
@@ -3142,13 +3208,6 @@ bool ShaderLanguage::_validate_assign(Node *p_node, const FunctionInfo &p_functi
return false;
}
- if (shader->varyings.has(var->name) && current_function != String("vertex")) {
- if (r_message) {
- *r_message = RTR("Varyings can only be assigned in vertex function.");
- }
- return false;
- }
-
if (shader->constants.has(var->name) || var->is_const) {
if (r_message) {
*r_message = RTR("Constants cannot be modified.");
@@ -3169,13 +3228,6 @@ bool ShaderLanguage::_validate_assign(Node *p_node, const FunctionInfo &p_functi
return false;
}
- if (shader->varyings.has(arr->name) && current_function != String("vertex")) {
- if (r_message) {
- *r_message = RTR("Varyings can only be assigned in vertex function.");
- }
- return false;
- }
-
return true;
}
@@ -3761,6 +3813,23 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
_set_error("Unknown identifier in expression: " + String(identifier));
return nullptr;
}
+ if (ident_type == IDENTIFIER_VARYING) {
+ TkPos prev_pos = _get_tkpos();
+ Token next_token = _get_token();
+ _set_tkpos(prev_pos);
+ String error;
+ if (next_token.type == TK_OP_ASSIGN) {
+ if (!_validate_varying_assign(shader->varyings[identifier], &error)) {
+ _set_error(error);
+ return nullptr;
+ }
+ } else {
+ if (!_validate_varying_using(shader->varyings[identifier], &error)) {
+ _set_error(error);
+ return nullptr;
+ }
+ }
+ }
last_const = is_const;
if (ident_type == IDENTIFIER_FUNCTION) {
@@ -3786,10 +3855,6 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
_set_error("Constants cannot be modified.");
return nullptr;
}
- if (shader->varyings.has(identifier) && current_function != String("vertex")) {
- _set_error("Varyings can only be assigned in vertex function.");
- return nullptr;
- }
assign_expression = _parse_array_constructor(p_block, p_function_info, data_type, struct_name, array_size);
if (!assign_expression) {
return nullptr;
@@ -6260,6 +6325,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
return ERR_PARSE_ERROR;
}
+ TkPos name_pos = _get_tkpos();
name = tk.text;
if (_find_identifier(nullptr, false, FunctionInfo(), name)) {
@@ -6541,11 +6607,12 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
_set_error("Expected ';'");
return ERR_PARSE_ERROR;
}
- } else {
+ } else { // varying
ShaderNode::Varying varying;
varying.type = type;
varying.precision = precision;
varying.interpolation = interpolation;
+ varying.tkpos = name_pos;
tk = _get_token();
if (tk.type != TK_SEMICOLON && tk.type != TK_BRACKET_OPEN) {
@@ -7158,6 +7225,14 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
tk = _get_token();
}
+ for (Map<StringName, ShaderNode::Varying>::Element *E = shader->varyings.front(); E; E = E->next()) {
+ if (E->get().stage == ShaderNode::Varying::STAGE_VERTEX || E->get().stage == ShaderNode::Varying::STAGE_FRAGMENT) {
+ _set_tkpos(E->get().tkpos);
+ _set_error(RTR("Varying must only be used in two different stages, which can be 'vertex' 'fragment' and 'light'"));
+ return ERR_PARSE_ERROR;
+ }
+ }
+
return OK;
}
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h
index 27767378f9..14594b039c 100644
--- a/servers/rendering/shader_language.h
+++ b/servers/rendering/shader_language.h
@@ -41,6 +41,11 @@
class ShaderLanguage {
public:
+ struct TkPos {
+ int char_idx;
+ int tk_line;
+ };
+
enum TokenType {
TK_EMPTY,
TK_IDENTIFIER,
@@ -598,10 +603,21 @@ public:
};
struct Varying {
+ enum Stage {
+ STAGE_UNKNOWN,
+ STAGE_VERTEX, // transition stage to STAGE_VERTEX_TO_FRAGMENT or STAGE_VERTEX_TO_LIGHT, emits error if they are not used
+ STAGE_FRAGMENT, // transition stage to STAGE_FRAGMENT_TO_LIGHT, emits error if it's not used
+ STAGE_VERTEX_TO_FRAGMENT,
+ STAGE_VERTEX_TO_LIGHT,
+ STAGE_FRAGMENT_TO_LIGHT,
+ };
+
+ Stage stage = STAGE_UNKNOWN;
DataType type = TYPE_VOID;
DataInterpolation interpolation = INTERPOLATION_FLAT;
DataPrecision precision = PRECISION_DEFAULT;
int array_size = 0;
+ TkPos tkpos;
Varying() {}
};
@@ -780,11 +796,6 @@ private:
StringName current_function;
bool last_const = false;
- struct TkPos {
- int char_idx;
- int tk_line;
- };
-
TkPos _get_tkpos() {
TkPos tkp;
tkp.char_idx = char_idx;
@@ -864,6 +875,8 @@ private:
bool _parse_function_arguments(BlockNode *p_block, const FunctionInfo &p_function_info, OperatorNode *p_func, int *r_complete_arg = nullptr);
bool _propagate_function_call_sampler_uniform_settings(StringName p_name, int p_argument, TextureFilter p_filter, TextureRepeat p_repeat);
bool _propagate_function_call_sampler_builtin_reference(StringName p_name, int p_argument, const StringName &p_builtin);
+ bool _validate_varying_assign(ShaderNode::Varying &p_varying, String *r_message);
+ bool _validate_varying_using(ShaderNode::Varying &p_varying, String *r_message);
Node *_parse_expression(BlockNode *p_block, const FunctionInfo &p_function_info);
Node *_parse_array_constructor(BlockNode *p_block, const FunctionInfo &p_function_info, DataType p_type, const StringName &p_struct_name, int p_array_size);
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index 23716263b5..809343114c 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -242,22 +242,24 @@ RID RenderingServer::_make_test_cube() {
RID RenderingServer::make_sphere_mesh(int p_lats, int p_lons, float p_radius) {
Vector<Vector3> vertices;
Vector<Vector3> normals;
+ const double lat_step = Math_TAU / p_lats;
+ const double lon_step = Math_TAU / p_lons;
for (int i = 1; i <= p_lats; i++) {
- double lat0 = Math_PI * (-0.5 + (double)(i - 1) / p_lats);
+ double lat0 = lat_step * (i - 1) - Math_TAU / 4;
double z0 = Math::sin(lat0);
double zr0 = Math::cos(lat0);
- double lat1 = Math_PI * (-0.5 + (double)i / p_lats);
+ double lat1 = lat_step * i - Math_TAU / 4;
double z1 = Math::sin(lat1);
double zr1 = Math::cos(lat1);
for (int j = p_lons; j >= 1; j--) {
- double lng0 = 2 * Math_PI * (double)(j - 1) / p_lons;
+ double lng0 = lon_step * (j - 1);
double x0 = Math::cos(lng0);
double y0 = Math::sin(lng0);
- double lng1 = 2 * Math_PI * (double)(j) / p_lons;
+ double lng1 = lon_step * j;
double x1 = Math::cos(lng1);
double y1 = Math::sin(lng1);
@@ -1487,7 +1489,7 @@ void RenderingServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("mesh_clear", "mesh"), &RenderingServer::mesh_clear);
ClassDB::bind_method(D_METHOD("multimesh_create"), &RenderingServer::multimesh_create);
- ClassDB::bind_method(D_METHOD("multimesh_allocate", "multimesh", "instances", "transform_format", "color_format", "custom_data_format"), &RenderingServer::multimesh_allocate, DEFVAL(false), DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("multimesh_allocate_data", "multimesh", "instances", "transform_format", "color_format", "custom_data_format"), &RenderingServer::multimesh_allocate_data, DEFVAL(false), DEFVAL(false));
ClassDB::bind_method(D_METHOD("multimesh_get_instance_count", "multimesh"), &RenderingServer::multimesh_get_instance_count);
ClassDB::bind_method(D_METHOD("multimesh_set_mesh", "multimesh", "mesh"), &RenderingServer::multimesh_set_mesh);
ClassDB::bind_method(D_METHOD("multimesh_instance_set_transform", "multimesh", "index", "transform"), &RenderingServer::multimesh_instance_set_transform);
@@ -1521,7 +1523,7 @@ void RenderingServer::_bind_methods() {
#endif
ClassDB::bind_method(D_METHOD("skeleton_create"), &RenderingServer::skeleton_create);
- ClassDB::bind_method(D_METHOD("skeleton_allocate", "skeleton", "bones", "is_2d_skeleton"), &RenderingServer::skeleton_allocate, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("skeleton_allocate_data", "skeleton", "bones", "is_2d_skeleton"), &RenderingServer::skeleton_allocate_data, DEFVAL(false));
ClassDB::bind_method(D_METHOD("skeleton_get_bone_count", "skeleton"), &RenderingServer::skeleton_get_bone_count);
ClassDB::bind_method(D_METHOD("skeleton_bone_set_transform", "skeleton", "bone", "transform"), &RenderingServer::skeleton_bone_set_transform);
ClassDB::bind_method(D_METHOD("skeleton_bone_get_transform", "skeleton", "bone"), &RenderingServer::skeleton_bone_get_transform);
@@ -1661,7 +1663,7 @@ void RenderingServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("viewport_set_transparent_background", "viewport", "enabled"), &RenderingServer::viewport_set_transparent_background);
ClassDB::bind_method(D_METHOD("viewport_set_global_canvas_transform", "viewport", "transform"), &RenderingServer::viewport_set_global_canvas_transform);
ClassDB::bind_method(D_METHOD("viewport_set_canvas_stacking", "viewport", "canvas", "layer", "sublayer"), &RenderingServer::viewport_set_canvas_stacking);
- ClassDB::bind_method(D_METHOD("viewport_set_shadow_atlas_size", "viewport", "size"), &RenderingServer::viewport_set_shadow_atlas_size);
+ ClassDB::bind_method(D_METHOD("viewport_set_shadow_atlas_size", "viewport", "size", "use_16_bits"), &RenderingServer::viewport_set_shadow_atlas_size, DEFVAL(false));
ClassDB::bind_method(D_METHOD("viewport_set_shadow_atlas_quadrant_subdivision", "viewport", "quadrant", "subdivision"), &RenderingServer::viewport_set_shadow_atlas_quadrant_subdivision);
ClassDB::bind_method(D_METHOD("viewport_set_msaa", "viewport", "msaa"), &RenderingServer::viewport_set_msaa);
ClassDB::bind_method(D_METHOD("viewport_set_use_debanding", "viewport", "enable"), &RenderingServer::viewport_set_use_debanding);
@@ -2257,141 +2259,130 @@ RenderingServer::RenderingServer() {
thread_pool = memnew(RendererThreadPool);
singleton = this;
- 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_RST("rendering/textures/vram_compression/import_bptc", false);
+ GLOBAL_DEF_RST("rendering/textures/vram_compression/import_s3tc", true);
+ GLOBAL_DEF_RST("rendering/textures/vram_compression/import_etc", false);
+ GLOBAL_DEF_RST("rendering/textures/vram_compression/import_etc2", true);
+ GLOBAL_DEF_RST("rendering/textures/vram_compression/import_pvrtc", false);
GLOBAL_DEF("rendering/limits/time/time_rollover_secs", 3600);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/time/time_rollover_secs", PropertyInfo(Variant::FLOAT, "rendering/limits/time/time_rollover_secs", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"));
- GLOBAL_DEF("rendering/quality/directional_shadow/size", 4096);
- GLOBAL_DEF("rendering/quality/directional_shadow/size.mobile", 2048);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/directional_shadow/size", PropertyInfo(Variant::INT, "rendering/quality/directional_shadow/size", PROPERTY_HINT_RANGE, "256,16384"));
- GLOBAL_DEF("rendering/quality/directional_shadow/soft_shadow_quality", 2);
- GLOBAL_DEF("rendering/quality/directional_shadow/soft_shadow_quality.mobile", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/directional_shadow/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/quality/directional_shadow/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
-
- GLOBAL_DEF("rendering/quality/shadows/soft_shadow_quality", 2);
- GLOBAL_DEF("rendering/quality/shadows/soft_shadow_quality.mobile", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadows/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/quality/shadows/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
-
- GLOBAL_DEF("rendering/quality/2d_shadow_atlas/size", 2048);
-
- GLOBAL_DEF("rendering/quality/rd_renderer/use_low_end_renderer", false);
- GLOBAL_DEF("rendering/quality/rd_renderer/use_low_end_renderer.mobile", true);
-
- GLOBAL_DEF("rendering/quality/shadow_atlas/size", 4096);
- GLOBAL_DEF("rendering/quality/shadow_atlas/size.mobile", 2048);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/size", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/size", PROPERTY_HINT_RANGE, "256,16384"));
- GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_0_subdiv", 1);
- GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_1_subdiv", 2);
- GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_2_subdiv", 3);
- GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_3_subdiv", 4);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_0_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_1_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_2_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_3_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
-
- GLOBAL_DEF("rendering/quality/reflections/roughness_layers", 8);
- GLOBAL_DEF("rendering/quality/reflections/texture_array_reflections", true);
- GLOBAL_DEF("rendering/quality/reflections/texture_array_reflections.mobile", false);
- GLOBAL_DEF("rendering/quality/reflections/ggx_samples", 1024);
- GLOBAL_DEF("rendering/quality/reflections/ggx_samples.mobile", 128);
- GLOBAL_DEF("rendering/quality/reflections/fast_filter_high_quality", false);
- GLOBAL_DEF("rendering/quality/reflection_atlas/reflection_size", 256);
- GLOBAL_DEF("rendering/quality/reflection_atlas/reflection_size.mobile", 128);
- GLOBAL_DEF("rendering/quality/reflection_atlas/reflection_count", 64);
-
- GLOBAL_DEF("rendering/quality/gi_probes/anisotropic", false);
- GLOBAL_DEF("rendering/quality/gi_probes/quality", 1);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/gi_probes/quality", PropertyInfo(Variant::INT, "rendering/quality/gi_probes/quality", PROPERTY_HINT_ENUM, "Low (4 Cones - Fast),High (6 Cones - Slow)"));
-
- GLOBAL_DEF("rendering/quality/shading/force_vertex_shading", false);
- GLOBAL_DEF("rendering/quality/shading/force_vertex_shading.mobile", true);
- GLOBAL_DEF("rendering/quality/shading/force_lambert_over_burley", false);
- GLOBAL_DEF("rendering/quality/shading/force_lambert_over_burley.mobile", true);
- GLOBAL_DEF("rendering/quality/shading/force_blinn_over_ggx", false);
- GLOBAL_DEF("rendering/quality/shading/force_blinn_over_ggx.mobile", true);
-
- GLOBAL_DEF("rendering/quality/depth_prepass/enable", true);
- GLOBAL_DEF("rendering/quality/depth_prepass/disable_for_vendors", "PowerVR,Mali,Adreno,Apple");
-
- GLOBAL_DEF("rendering/quality/texture_filters/use_nearest_mipmap_filter", false);
- GLOBAL_DEF("rendering/quality/texture_filters/anisotropic_filtering_level", 2);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/texture_filters/anisotropic_filtering_level", PropertyInfo(Variant::INT, "rendering/quality/texture_filters/anisotropic_filtering_level", PROPERTY_HINT_ENUM, "Disabled (Fastest),2x (Faster),4x (Fast),8x (Average),16x (Slow)"));
-
- GLOBAL_DEF("rendering/quality/depth_of_field/depth_of_field_bokeh_shape", 1);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/depth_of_field/depth_of_field_bokeh_shape", PropertyInfo(Variant::INT, "rendering/quality/depth_of_field/depth_of_field_bokeh_shape", PROPERTY_HINT_ENUM, "Box (Fast),Hexagon (Average),Circle (Slow)"));
- GLOBAL_DEF("rendering/quality/depth_of_field/depth_of_field_bokeh_quality", 2);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/depth_of_field/depth_of_field_bokeh_quality", PropertyInfo(Variant::INT, "rendering/quality/depth_of_field/depth_of_field_bokeh_quality", PROPERTY_HINT_ENUM, "Very Low (Fastest),Low (Fast),Medium (Average),High (Slow)"));
- GLOBAL_DEF("rendering/quality/depth_of_field/depth_of_field_use_jitter", false);
-
- GLOBAL_DEF("rendering/quality/ssao/quality", 2);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/ssao/quality", PropertyInfo(Variant::INT, "rendering/quality/ssao/quality", PROPERTY_HINT_ENUM, "Very Low (Fast),Low (Fast),Medium (Average),High (Slow),Ultra (Custom)"));
- GLOBAL_DEF("rendering/quality/ssao/half_size", false);
- GLOBAL_DEF("rendering/quality/ssao/half_size.mobile", true);
- GLOBAL_DEF("rendering/quality/ssao/adaptive_target", 0.5);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/ssao/adaptive_target", PropertyInfo(Variant::FLOAT, "rendering/quality/ssao/adaptive_target", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"));
- GLOBAL_DEF("rendering/quality/ssao/blur_passes", 2);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/ssao/blur_passes", PropertyInfo(Variant::INT, "rendering/quality/ssao/blur_passes", PROPERTY_HINT_RANGE, "0,6"));
- GLOBAL_DEF("rendering/quality/ssao/fadeout_from", 50.0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/ssao/fadeout_from", PropertyInfo(Variant::FLOAT, "rendering/quality/ssao/fadeout_from", PROPERTY_HINT_RANGE, "0.0,512,0.1,or_greater"));
- GLOBAL_DEF("rendering/quality/ssao/fadeout_to", 300.0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/ssao/fadeout_to", PropertyInfo(Variant::FLOAT, "rendering/quality/ssao/fadeout_to", PROPERTY_HINT_RANGE, "64,65536,0.1,or_greater"));
-
- GLOBAL_DEF("rendering/quality/screen_filters/screen_space_roughness_limiter_enabled", true);
- GLOBAL_DEF("rendering/quality/screen_filters/screen_space_roughness_limiter_amount", 0.25);
- GLOBAL_DEF("rendering/quality/screen_filters/screen_space_roughness_limiter_limit", 0.18);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/screen_space_roughness_limiter_amount", PropertyInfo(Variant::FLOAT, "rendering/quality/screen_filters/screen_space_roughness_limiter_amount", PROPERTY_HINT_RANGE, "0.01,4.0,0.01"));
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_filters/screen_space_roughness_limiter_limit", PropertyInfo(Variant::FLOAT, "rendering/quality/screen_filters/screen_space_roughness_limiter_limit", PROPERTY_HINT_RANGE, "0.01,1.0,0.01"));
-
- GLOBAL_DEF("rendering/quality/glow/upscale_mode", 1);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/glow/upscale_mode", PropertyInfo(Variant::INT, "rendering/quality/glow/upscale_mode", PROPERTY_HINT_ENUM, "Linear (Fast),Bicubic (Slow)"));
- GLOBAL_DEF("rendering/quality/glow/upscale_mode.mobile", 0);
- GLOBAL_DEF("rendering/quality/glow/use_high_quality", false);
-
- GLOBAL_DEF("rendering/quality/screen_space_reflection/roughness_quality", 1);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/screen_space_reflection/roughness_quality", PropertyInfo(Variant::INT, "rendering/quality/screen_space_reflection/roughness_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)"));
-
- GLOBAL_DEF("rendering/quality/subsurface_scattering/subsurface_scattering_quality", 1);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/subsurface_scattering/subsurface_scattering_quality", PropertyInfo(Variant::INT, "rendering/quality/subsurface_scattering/subsurface_scattering_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)"));
- GLOBAL_DEF("rendering/quality/subsurface_scattering/subsurface_scattering_scale", 0.05);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/subsurface_scattering/subsurface_scattering_scale", PropertyInfo(Variant::FLOAT, "rendering/quality/subsurface_scattering/subsurface_scattering_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001"));
- GLOBAL_DEF("rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale", 0.01);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale", PropertyInfo(Variant::FLOAT, "rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001"));
-
- GLOBAL_DEF("rendering/high_end/global_shader_variables_buffer_size", 65536);
-
- GLOBAL_DEF("rendering/lightmapper/probe_capture_update_speed", 15);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/lightmapper/probe_capture_update_speed", PropertyInfo(Variant::FLOAT, "rendering/lightmapper/probe_capture_update_speed", PROPERTY_HINT_RANGE, "0.001,256,0.001"));
-
- GLOBAL_DEF("rendering/sdfgi/probe_ray_count", 2);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/sdfgi/probe_ray_count", PropertyInfo(Variant::INT, "rendering/sdfgi/probe_ray_count", PROPERTY_HINT_ENUM, "8 (Fastest),16,32,64,96,128 (Slowest)"));
- GLOBAL_DEF("rendering/sdfgi/frames_to_converge", 1);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/sdfgi/frames_to_converge", PropertyInfo(Variant::INT, "rendering/sdfgi/frames_to_converge", PROPERTY_HINT_ENUM, "5 (Less Latency but Lower Quality),10,15,20,25,30 (More Latency but Higher Quality)"));
-
- GLOBAL_DEF("rendering/volumetric_fog/volume_size", 64);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/volumetric_fog/volume_size", PropertyInfo(Variant::INT, "rendering/volumetric_fog/volume_size", PROPERTY_HINT_RANGE, "16,512,1"));
- GLOBAL_DEF("rendering/volumetric_fog/volume_depth", 128);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/volumetric_fog/volume_depth", PropertyInfo(Variant::INT, "rendering/volumetric_fog/volume_depth", PROPERTY_HINT_RANGE, "16,512,1"));
- GLOBAL_DEF("rendering/volumetric_fog/use_filter", 0);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/volumetric_fog/use_filter", PropertyInfo(Variant::INT, "rendering/volumetric_fog/use_filter", PROPERTY_HINT_ENUM, "No (Faster),Yes (Higher Quality)"));
- GLOBAL_DEF("rendering/volumetric_fog/directional_shadow_shrink", 512);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/volumetric_fog/directional_shadow_shrink", PropertyInfo(Variant::INT, "rendering/volumetric_fog/directional_shadow_shrink", PROPERTY_HINT_RANGE, "32,2048,1"));
- GLOBAL_DEF("rendering/volumetric_fog/positional_shadow_shrink", 512);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/volumetric_fog/positional_shadow_shrink", PropertyInfo(Variant::INT, "rendering/volumetric_fog/positional_shadow_shrink", PROPERTY_HINT_RANGE, "32,2048,1"));
-
- GLOBAL_DEF("rendering/spatial_indexer/update_iterations_per_frame", 10);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/spatial_indexer/update_iterations_per_frame", PropertyInfo(Variant::INT, "rendering/spatial_indexer/update_iterations_per_frame", PROPERTY_HINT_RANGE, "0,1024,1"));
- GLOBAL_DEF("rendering/spatial_indexer/threaded_cull_minimum_instances", 1000);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/spatial_indexer/threaded_cull_minimum_instances", PropertyInfo(Variant::INT, "rendering/spatial_indexer/threaded_cull_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1"));
- GLOBAL_DEF("rendering/forward_renderer/threaded_render_minimum_instances", 500);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/forward_renderer/threaded_render_minimum_instances", PropertyInfo(Variant::INT, "rendering/forward_renderer/threaded_render_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1"));
-
- GLOBAL_DEF("rendering/cluster_builder/max_clustered_elements", 512);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/cluster_builder/max_clustered_elements", PropertyInfo(Variant::FLOAT, "rendering/cluster_builder/max_clustered_elements", PROPERTY_HINT_RANGE, "32,8192,1"));
+ GLOBAL_DEF("rendering/shadows/directional_shadow/size", 4096);
+ GLOBAL_DEF("rendering/shadows/directional_shadow/size.mobile", 2048);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/directional_shadow/size", PropertyInfo(Variant::INT, "rendering/shadows/directional_shadow/size", PROPERTY_HINT_RANGE, "256,16384"));
+ GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_quality", 2);
+ GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_quality.mobile", 0);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/directional_shadow/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/shadows/directional_shadow/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
+ GLOBAL_DEF("rendering/shadows/directional_shadow/16_bits", true);
+
+ GLOBAL_DEF("rendering/shadows/shadows/soft_shadow_quality", 2);
+ GLOBAL_DEF("rendering/shadows/shadows/soft_shadow_quality.mobile", 0);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadows/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/shadows/shadows/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
+
+ GLOBAL_DEF("rendering/2d/shadow_atlas/size", 2048);
+
+ GLOBAL_DEF("rendering/driver/rd_renderer/use_low_end_renderer", false);
+ GLOBAL_DEF("rendering/driver/rd_renderer/use_low_end_renderer.mobile", true);
+
+ GLOBAL_DEF("rendering/reflections/sky_reflections/roughness_layers", 8);
+ GLOBAL_DEF("rendering/reflections/sky_reflections/texture_array_reflections", true);
+ GLOBAL_DEF("rendering/reflections/sky_reflections/texture_array_reflections.mobile", false);
+ GLOBAL_DEF("rendering/reflections/sky_reflections/ggx_samples", 1024);
+ GLOBAL_DEF("rendering/reflections/sky_reflections/ggx_samples.mobile", 128);
+ GLOBAL_DEF("rendering/reflections/sky_reflections/fast_filter_high_quality", false);
+ GLOBAL_DEF("rendering/reflections/reflection_atlas/reflection_size", 256);
+ GLOBAL_DEF("rendering/reflections/reflection_atlas/reflection_size.mobile", 128);
+ GLOBAL_DEF("rendering/reflections/reflection_atlas/reflection_count", 64);
+
+ GLOBAL_DEF("rendering/global_illumination/gi/use_half_resolution", false);
+
+ GLOBAL_DEF("rendering/global_illumination/gi_probes/anisotropic", false);
+ GLOBAL_DEF("rendering/global_illumination/gi_probes/quality", 1);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/gi_probes/quality", PropertyInfo(Variant::INT, "rendering/global_illumination/gi_probes/quality", PROPERTY_HINT_ENUM, "Low (4 Cones - Fast),High (6 Cones - Slow)"));
+
+ GLOBAL_DEF("rendering/shading/overrides/force_vertex_shading", false);
+ GLOBAL_DEF("rendering/shading/overrides/force_vertex_shading.mobile", true);
+ GLOBAL_DEF("rendering/shading/overrides/force_lambert_over_burley", false);
+ GLOBAL_DEF("rendering/shading/overrides/force_lambert_over_burley.mobile", true);
+ GLOBAL_DEF("rendering/shading/overrides/force_blinn_over_ggx", false);
+ GLOBAL_DEF("rendering/shading/overrides/force_blinn_over_ggx.mobile", true);
+
+ GLOBAL_DEF("rendering/driver/depth_prepass/enable", true);
+ GLOBAL_DEF("rendering/driver/depth_prepass/disable_for_vendors", "PowerVR,Mali,Adreno,Apple");
+
+ GLOBAL_DEF("rendering/textures/default_filters/use_nearest_mipmap_filter", false);
+ GLOBAL_DEF("rendering/textures/default_filters/anisotropic_filtering_level", 2);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/textures/default_filters/anisotropic_filtering_level", PropertyInfo(Variant::INT, "rendering/textures/default_filters/anisotropic_filtering_level", PROPERTY_HINT_ENUM, "Disabled (Fastest),2x (Faster),4x (Fast),8x (Average),16x (Slow)"));
+
+ GLOBAL_DEF("rendering/camera/depth_of_field/depth_of_field_bokeh_shape", 1);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/camera/depth_of_field/depth_of_field_bokeh_shape", PropertyInfo(Variant::INT, "rendering/camera/depth_of_field/depth_of_field_bokeh_shape", PROPERTY_HINT_ENUM, "Box (Fast),Hexagon (Average),Circle (Slow)"));
+ GLOBAL_DEF("rendering/camera/depth_of_field/depth_of_field_bokeh_quality", 2);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/camera/depth_of_field/depth_of_field_bokeh_quality", PropertyInfo(Variant::INT, "rendering/camera/depth_of_field/depth_of_field_bokeh_quality", PROPERTY_HINT_ENUM, "Very Low (Fastest),Low (Fast),Medium (Average),High (Slow)"));
+ GLOBAL_DEF("rendering/camera/depth_of_field/depth_of_field_use_jitter", false);
+
+ GLOBAL_DEF("rendering/environment/ssao/quality", 2);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/quality", PropertyInfo(Variant::INT, "rendering/environment/ssao/quality", PROPERTY_HINT_ENUM, "Very Low (Fast),Low (Fast),Medium (Average),High (Slow),Ultra (Custom)"));
+ GLOBAL_DEF("rendering/environment/ssao/half_size", false);
+ GLOBAL_DEF("rendering/environment/ssao/half_size.mobile", true);
+ GLOBAL_DEF("rendering/environment/ssao/adaptive_target", 0.5);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/adaptive_target", PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/adaptive_target", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"));
+ GLOBAL_DEF("rendering/environment/ssao/blur_passes", 2);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/blur_passes", PropertyInfo(Variant::INT, "rendering/environment/ssao/blur_passes", PROPERTY_HINT_RANGE, "0,6"));
+ GLOBAL_DEF("rendering/environment/ssao/fadeout_from", 50.0);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/fadeout_from", PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/fadeout_from", PROPERTY_HINT_RANGE, "0.0,512,0.1,or_greater"));
+ GLOBAL_DEF("rendering/environment/ssao/fadeout_to", 300.0);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/fadeout_to", PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/fadeout_to", PROPERTY_HINT_RANGE, "64,65536,0.1,or_greater"));
+
+ GLOBAL_DEF("rendering/anti_aliasing/screen_space_roughness_limiter/enabled", true);
+ GLOBAL_DEF("rendering/anti_aliasing/screen_space_roughness_limiter/amount", 0.25);
+ GLOBAL_DEF("rendering/anti_aliasing/screen_space_roughness_limiter/limit", 0.18);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/screen_space_roughness_limiter/amount", PropertyInfo(Variant::FLOAT, "rendering/anti_aliasing/screen_space_roughness_limiter/amount", PROPERTY_HINT_RANGE, "0.01,4.0,0.01"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/screen_space_roughness_limiter/limit", PropertyInfo(Variant::FLOAT, "rendering/anti_aliasing/screen_space_roughness_limiter/limit", PROPERTY_HINT_RANGE, "0.01,1.0,0.01"));
+
+ GLOBAL_DEF("rendering/environment/glow/upscale_mode", 1);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/glow/upscale_mode", PropertyInfo(Variant::INT, "rendering/environment/glow/upscale_mode", PROPERTY_HINT_ENUM, "Linear (Fast),Bicubic (Slow)"));
+ GLOBAL_DEF("rendering/environment/glow/upscale_mode.mobile", 0);
+ GLOBAL_DEF("rendering/environment/glow/use_high_quality", false);
+
+ GLOBAL_DEF("rendering/environment/screen_space_reflection/roughness_quality", 1);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/screen_space_reflection/roughness_quality", PropertyInfo(Variant::INT, "rendering/environment/screen_space_reflection/roughness_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)"));
+
+ GLOBAL_DEF("rendering/environment/subsurface_scattering/subsurface_scattering_quality", 1);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/subsurface_scattering/subsurface_scattering_quality", PropertyInfo(Variant::INT, "rendering/environment/subsurface_scattering/subsurface_scattering_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)"));
+ GLOBAL_DEF("rendering/environment/subsurface_scattering/subsurface_scattering_scale", 0.05);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/subsurface_scattering/subsurface_scattering_scale", PropertyInfo(Variant::FLOAT, "rendering/environment/subsurface_scattering/subsurface_scattering_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001"));
+ GLOBAL_DEF("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale", 0.01);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale", PropertyInfo(Variant::FLOAT, "rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001"));
+
+ GLOBAL_DEF("rendering/limits/global_shader_variables/buffer_size", 65536);
+
+ GLOBAL_DEF("rendering/lightmapping/probe_capture/update_speed", 15);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/lightmapping/probe_capture/update_speed", PropertyInfo(Variant::FLOAT, "rendering/lightmapping/probe_capture/update_speed", PROPERTY_HINT_RANGE, "0.001,256,0.001"));
+
+ GLOBAL_DEF("rendering/global_illumination/sdfgi/probe_ray_count", 1);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/sdfgi/probe_ray_count", PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/probe_ray_count", PROPERTY_HINT_ENUM, "8 (Fastest),16,32,64,96,128 (Slowest)"));
+ GLOBAL_DEF("rendering/global_illumination/sdfgi/frames_to_converge", 4);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/sdfgi/frames_to_converge", PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/frames_to_converge", PROPERTY_HINT_ENUM, "5 (Less Latency but Lower Quality),10,15,20,25,30 (More Latency but Higher Quality)"));
+ GLOBAL_DEF("rendering/global_illumination/sdfgi/frames_to_update_lights", 2);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/sdfgi/frames_to_update_lights", PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/frames_to_update_lights", PROPERTY_HINT_ENUM, "1 (Slower),2,4,8,16 (Faster)"));
+
+ GLOBAL_DEF("rendering/environment/volumetric_fog/volume_size", 64);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/volumetric_fog/volume_size", PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/volume_size", PROPERTY_HINT_RANGE, "16,512,1"));
+ GLOBAL_DEF("rendering/environment/volumetric_fog/volume_depth", 128);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/volumetric_fog/volume_depth", PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/volume_depth", PROPERTY_HINT_RANGE, "16,512,1"));
+ GLOBAL_DEF("rendering/environment/volumetric_fog/use_filter", 1);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/volumetric_fog/use_filter", PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/use_filter", PROPERTY_HINT_ENUM, "No (Faster),Yes (Higher Quality)"));
+
+ GLOBAL_DEF("rendering/limits/spatial_indexer/update_iterations_per_frame", 10);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/spatial_indexer/update_iterations_per_frame", PropertyInfo(Variant::INT, "rendering/limits/spatial_indexer/update_iterations_per_frame", PROPERTY_HINT_RANGE, "0,1024,1"));
+ GLOBAL_DEF("rendering/limits/spatial_indexer/threaded_cull_minimum_instances", 1000);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/spatial_indexer/threaded_cull_minimum_instances", PropertyInfo(Variant::INT, "rendering/limits/spatial_indexer/threaded_cull_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1"));
+ GLOBAL_DEF("rendering/limits/forward_renderer/threaded_render_minimum_instances", 500);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/forward_renderer/threaded_render_minimum_instances", PropertyInfo(Variant::INT, "rendering/limits/forward_renderer/threaded_render_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1"));
+
+ GLOBAL_DEF("rendering/limits/cluster_builder/max_clustered_elements", 512);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/cluster_builder/max_clustered_elements", PropertyInfo(Variant::FLOAT, "rendering/limits/cluster_builder/max_clustered_elements", PROPERTY_HINT_RANGE, "32,8192,1"));
}
RenderingServer::~RenderingServer() {
diff --git a/servers/rendering_server.h b/servers/rendering_server.h
index 1d83f1ae48..65065841a6 100644
--- a/servers/rendering_server.h
+++ b/servers/rendering_server.h
@@ -354,6 +354,8 @@ public:
virtual void mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) = 0;
virtual AABB mesh_get_custom_aabb(RID p_mesh) const = 0;
+ virtual void mesh_set_shadow_mesh(RID p_mesh, RID p_shadow_mesh) = 0;
+
virtual void mesh_clear(RID p_mesh) = 0;
/* MULTIMESH API */
@@ -365,7 +367,7 @@ public:
MULTIMESH_TRANSFORM_3D,
};
- virtual void multimesh_allocate(RID p_multimesh, int p_instances, MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false) = 0;
+ virtual void multimesh_allocate_data(RID p_multimesh, int p_instances, MultimeshTransformFormat p_transform_format, bool p_use_colors = false, bool p_use_custom_data = false) = 0;
virtual int multimesh_get_instance_count(RID p_multimesh) const = 0;
virtual void multimesh_set_mesh(RID p_multimesh, RID p_mesh) = 0;
@@ -407,7 +409,7 @@ public:
/* SKELETON API */
virtual RID skeleton_create() = 0;
- virtual void skeleton_allocate(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) = 0;
+ virtual void skeleton_allocate_data(RID p_skeleton, int p_bones, bool p_2d_skeleton = false) = 0;
virtual int skeleton_get_bone_count(RID p_skeleton) const = 0;
virtual void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform) = 0;
virtual Transform skeleton_bone_get_transform(RID p_skeleton, int p_bone) const = 0;
@@ -550,7 +552,7 @@ public:
virtual RID gi_probe_create() = 0;
- virtual void gi_probe_allocate(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0;
+ virtual void gi_probe_allocate_data(RID p_gi_probe, const Transform &p_to_cell_xform, const AABB &p_aabb, const Vector3i &p_octree_size, const Vector<uint8_t> &p_octree_cells, const Vector<uint8_t> &p_data_cells, const Vector<uint8_t> &p_distance_field, const Vector<int> &p_level_counts) = 0;
virtual AABB gi_probe_get_bounds(RID p_gi_probe) const = 0;
virtual Vector3i gi_probe_get_octree_size(RID p_gi_probe) const = 0;
@@ -798,7 +800,7 @@ public:
virtual void viewport_set_sdf_oversize_and_scale(RID p_viewport, ViewportSDFOversize p_oversize, ViewportSDFScale p_scale) = 0;
- virtual void viewport_set_shadow_atlas_size(RID p_viewport, int p_size) = 0;
+ virtual void viewport_set_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits = false) = 0;
virtual void viewport_set_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv) = 0;
enum ViewportMSAA {
@@ -868,7 +870,7 @@ public:
virtual float viewport_get_measured_render_time_cpu(RID p_viewport) const = 0;
virtual float viewport_get_measured_render_time_gpu(RID p_viewport) const = 0;
- virtual void directional_shadow_atlas_set_size(int p_size) = 0;
+ virtual void directional_shadow_atlas_set_size(int p_size, bool p_16_bits = false) = 0;
/* SKY API */
@@ -983,9 +985,10 @@ public:
ENV_SDFGI_Y_SCALE_50_PERCENT
};
- virtual void environment_set_sdfgi(RID p_env, bool p_enable, EnvironmentSDFGICascades p_cascades, float p_min_cell_size, EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, bool p_use_multibounce, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
+ virtual void environment_set_sdfgi(RID p_env, bool p_enable, EnvironmentSDFGICascades p_cascades, float p_min_cell_size, EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, float p_bounce_feedback, bool p_read_sky, float p_energy, float p_normal_bias, float p_probe_bias) = 0;
enum EnvironmentSDFGIRayCount {
+ ENV_SDFGI_RAY_COUNT_4,
ENV_SDFGI_RAY_COUNT_8,
ENV_SDFGI_RAY_COUNT_16,
ENV_SDFGI_RAY_COUNT_32,
@@ -1009,20 +1012,22 @@ public:
virtual void environment_set_sdfgi_frames_to_converge(EnvironmentSDFGIFramesToConverge p_frames) = 0;
- virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) = 0;
-
- enum EnvVolumetricFogShadowFilter {
- ENV_VOLUMETRIC_FOG_SHADOW_FILTER_DISABLED,
- ENV_VOLUMETRIC_FOG_SHADOW_FILTER_LOW,
- ENV_VOLUMETRIC_FOG_SHADOW_FILTER_MEDIUM,
- ENV_VOLUMETRIC_FOG_SHADOW_FILTER_HIGH,
+ enum EnvironmentSDFGIFramesToUpdateLight {
+ ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME,
+ ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES,
+ ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES,
+ ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES,
+ ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES,
+ ENV_SDFGI_UPDATE_LIGHT_MAX,
};
- virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, EnvVolumetricFogShadowFilter p_shadow_filter) = 0;
+ virtual void environment_set_sdfgi_frames_to_update_light(EnvironmentSDFGIFramesToUpdateLight p_update) = 0;
+
+ virtual void environment_set_fog(RID p_env, bool p_enable, const Color &p_light_color, float p_light_energy, float p_sun_scatter, float p_density, float p_height, float p_height_density, float p_aerial_perspective) = 0;
+
+ virtual void environment_set_volumetric_fog(RID p_env, bool p_enable, float p_density, const Color &p_light, float p_light_energy, float p_length, float p_detail_spread, float p_gi_inject, bool p_temporal_reprojection, float p_temporal_reprojection_amount) = 0;
virtual void environment_set_volumetric_fog_volume_size(int p_size, int p_depth) = 0;
virtual void environment_set_volumetric_fog_filter_active(bool p_enable) = 0;
- virtual void environment_set_volumetric_fog_directional_shadow_shrink_size(int p_shrink_size) = 0;
- virtual void environment_set_volumetric_fog_positional_shadow_shrink_size(int p_shrink_size) = 0;
virtual Ref<Image> environment_bake_panorama(RID p_env, bool p_bake_irradiance, const Size2i &p_size) = 0;
@@ -1430,6 +1435,8 @@ public:
virtual float get_frame_setup_time_cpu() const = 0;
+ virtual void gi_set_use_half_resolution(bool p_enable) = 0;
+
/* TESTING */
virtual RID get_test_cube() = 0;
@@ -1462,6 +1469,8 @@ public:
virtual bool is_low_end() const = 0;
+ virtual void set_print_gpu_profile(bool p_enable) = 0;
+
RenderingDevice *create_local_rendering_device() const;
bool is_render_loop_enabled() const;
diff --git a/servers/server_wrap_mt_common.h b/servers/server_wrap_mt_common.h
index 5e18dc1e6d..95d2e2254e 100644
--- a/servers/server_wrap_mt_common.h
+++ b/servers/server_wrap_mt_common.h
@@ -29,245 +29,89 @@
/*************************************************************************/
#define FUNC0R(m_r, m_type) \
- virtual m_r m_type() { \
+ virtual m_r m_type() override { \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(); \
} \
}
-#define FUNCRID(m_type) \
- List<RID> m_type##_id_pool; \
- int m_type##allocn() { \
- for (int i = 0; i < pool_max_size; i++) { \
- m_type##_id_pool.push_back(server_name->m_type##_create()); \
- } \
- return 0; \
- } \
- void m_type##_free_cached_ids() { \
- while (m_type##_id_pool.size()) { \
- server_name->free(m_type##_id_pool.front()->get()); \
- m_type##_id_pool.pop_front(); \
- } \
- } \
- virtual RID m_type##_create() { \
- if (Thread::get_caller_id() != server_thread) { \
- RID rid; \
- MutexLock lock(alloc_mutex); \
- if (m_type##_id_pool.size() == 0) { \
- int ret; \
- command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, &ret); \
- SYNC_DEBUG \
- } \
- rid = m_type##_id_pool.front()->get(); \
- m_type##_id_pool.pop_front(); \
- return rid; \
- } else { \
- return server_name->m_type##_create(); \
- } \
- }
-
-#define FUNC1RID(m_type, m_arg1) \
- int m_type##allocn() { \
- for (int i = 0; i < m_type##_pool_max_size; i++) { \
- m_type##_id_pool.push_back(server_name->m_type##_create()); \
- } \
- return 0; \
- } \
- void m_type##_free_cached_ids() { \
- while (m_type##_id_pool.size()) { \
- free(m_type##_id_pool.front()->get()); \
- m_type##_id_pool.pop_front(); \
- } \
- } \
- virtual RID m_type##_create(m_arg1 p1) { \
- if (Thread::get_caller_id() != server_thread) { \
- RID rid; \
- MutexLock lock(alloc_mutex); \
- if (m_type##_id_pool.size() == 0) { \
- int ret; \
- command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, &ret); \
- SYNC_DEBUG \
- } \
- rid = m_type##_id_pool.front()->get(); \
- m_type##_id_pool.pop_front(); \
- return rid; \
- } else { \
- return server_name->m_type##_create(p1); \
- } \
- }
-
-#define FUNC2RID(m_type, m_arg1, m_arg2) \
- int m_type##allocn() { \
- for (int i = 0; i < m_type##_pool_max_size; i++) { \
- m_type##_id_pool.push_back(server_name->m_type##_create()); \
- } \
- return 0; \
- } \
- void m_type##_free_cached_ids() { \
- while (m_type##_id_pool.size()) { \
- free(m_type##_id_pool.front()->get()); \
- m_type##_id_pool.pop_front(); \
- } \
- } \
- virtual RID m_type##_create(m_arg1 p1, m_arg2 p2) { \
- if (Thread::get_caller_id() != server_thread) { \
- RID rid; \
- MutexLock lock(alloc_mutex); \
- if (m_type##_id_pool.size() == 0) { \
- int ret; \
- command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, &ret); \
- SYNC_DEBUG \
- } \
- rid = m_type##_id_pool.front()->get(); \
- m_type##_id_pool.pop_front(); \
- return rid; \
- } else { \
- return server_name->m_type##_create(p1, p2); \
- } \
- }
-
-#define FUNC3RID(m_type, m_arg1, m_arg2, m_arg3) \
- int m_type##allocn() { \
- for (int i = 0; i < m_type##_pool_max_size; i++) { \
- m_type##_id_pool.push_back(server_name->m_type##_create()); \
- } \
- return 0; \
- } \
- void m_type##_free_cached_ids() { \
- while (m_type##_id_pool.size()) { \
- free(m_type##_id_pool.front()->get()); \
- m_type##_id_pool.pop_front(); \
- } \
- } \
- virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \
- if (Thread::get_caller_id() != server_thread) { \
- RID rid; \
- MutexLock lock(alloc_mutex); \
- if (m_type##_id_pool.size() == 0) { \
- int ret; \
- command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, p3, &ret); \
- SYNC_DEBUG \
- } \
- rid = m_type##_id_pool.front()->get(); \
- m_type##_id_pool.pop_front(); \
- return rid; \
- } else { \
- return server_name->m_type##_create(p1, p2, p3); \
- } \
- }
-
-#define FUNC4RID(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \
- int m_type##allocn() { \
- for (int i = 0; i < m_type##_pool_max_size; i++) { \
- m_type##_id_pool.push_back(server_name->m_type##_create()); \
- } \
- return 0; \
- } \
- void m_type##_free_cached_ids() { \
- while (m_type##_id_pool.size()) { \
- free(m_type##_id_pool.front()->get()); \
- m_type##_id_pool.pop_front(); \
- } \
- } \
- virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \
- if (Thread::get_caller_id() != server_thread) { \
- RID rid; \
- MutexLock lock(alloc_mutex); \
- if (m_type##_id_pool.size() == 0) { \
- int ret; \
- command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, p3, p4, &ret); \
- SYNC_DEBUG \
- } \
- rid = m_type##_id_pool.front()->get(); \
- m_type##_id_pool.pop_front(); \
- return rid; \
- } else { \
- return server_name->m_type##_create(p1, p2, p3, p4); \
- } \
+#define FUNCRIDSPLIT(m_type) \
+ virtual RID m_type##_create() override { \
+ RID ret = server_name->m_type##_allocate(); \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type##_initialize, ret); \
+ } else { \
+ server_name->m_type##_initialize(ret); \
+ } \
+ return ret; \
}
-#define FUNC5RID(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \
- List<RID> m_type##_id_pool; \
- int m_type##allocn(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \
- for (int i = 0; i < pool_max_size; i++) { \
- m_type##_id_pool.push_back(server_name->m_type##_create(p1, p2, p3, p4, p5)); \
- } \
- return 0; \
- } \
- void m_type##_free_cached_ids() { \
- while (m_type##_id_pool.size()) { \
- free(m_type##_id_pool.front()->get()); \
- m_type##_id_pool.pop_front(); \
- } \
- } \
- virtual RID m_type##_create(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \
- if (Thread::get_caller_id() != server_thread) { \
- RID rid; \
- MutexLock lock(alloc_mutex); \
- if (m_type##_id_pool.size() == 0) { \
- int ret; \
- command_queue.push_and_ret(this, &ServerNameWrapMT::m_type##allocn, p1, p2, p3, p4, p5, &ret); \
- SYNC_DEBUG \
- } \
- rid = m_type##_id_pool.front()->get(); \
- m_type##_id_pool.pop_front(); \
- return rid; \
- } else { \
- return server_name->m_type##_create(p1, p2, p3, p4, p5); \
- } \
+//RID now returns directly, ensure thread safety yourself
+#define FUNCRID(m_type) \
+ virtual RID m_type##_create() override { \
+ return server_name->m_type##_create(); \
}
#define FUNC0RC(m_r, m_type) \
- virtual m_r m_type() const { \
+ virtual m_r m_type() const override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(); \
} \
}
#define FUNC0(m_type) \
- virtual void m_type() { \
+ virtual void m_type() override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push(server_name, &ServerName::m_type); \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(); \
} \
}
#define FUNC0C(m_type) \
- virtual void m_type() const { \
+ virtual void m_type() const override { \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push(server_name, &ServerName::m_type); \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(); \
} \
}
#define FUNC0S(m_type) \
- virtual void m_type() { \
+ virtual void m_type() override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(); \
} \
}
#define FUNC0SC(m_type) \
- virtual void m_type() const { \
+ virtual void m_type() const override { \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(); \
} \
}
@@ -275,560 +119,646 @@
///////////////////////////////////////////////
#define FUNC1R(m_r, m_type, m_arg1) \
- virtual m_r m_type(m_arg1 p1) { \
+ virtual m_r m_type(m_arg1 p1) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1); \
} \
}
#define FUNC1RC(m_r, m_type, m_arg1) \
- virtual m_r m_type(m_arg1 p1) const { \
+ virtual m_r m_type(m_arg1 p1) const override { \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1); \
} \
}
#define FUNC1S(m_type, m_arg1) \
- virtual void m_type(m_arg1 p1) { \
+ virtual void m_type(m_arg1 p1) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type, p1); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1); \
} \
}
#define FUNC1SC(m_type, m_arg1) \
- virtual void m_type(m_arg1 p1) const { \
+ virtual void m_type(m_arg1 p1) const override { \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type, p1); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1); \
} \
}
#define FUNC1(m_type, m_arg1) \
- virtual void m_type(m_arg1 p1) { \
+ virtual void m_type(m_arg1 p1) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push(server_name, &ServerName::m_type, p1); \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1); \
} \
}
#define FUNC1C(m_type, m_arg1) \
- virtual void m_type(m_arg1 p1) const { \
+ virtual void m_type(m_arg1 p1) const override { \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push(server_name, &ServerName::m_type, p1); \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1); \
} \
}
#define FUNC2R(m_r, m_type, m_arg1, m_arg2) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2) { \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1, p2); \
} \
}
#define FUNC2RC(m_r, m_type, m_arg1, m_arg2) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2) const { \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2) const override { \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1, p2); \
} \
}
#define FUNC2S(m_type, m_arg1, m_arg2) \
- virtual void m_type(m_arg1 p1, m_arg2 p2) { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2); \
} \
}
#define FUNC2SC(m_type, m_arg1, m_arg2) \
- virtual void m_type(m_arg1 p1, m_arg2 p2) const { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2) const override { \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2); \
} \
}
#define FUNC2(m_type, m_arg1, m_arg2) \
- virtual void m_type(m_arg1 p1, m_arg2 p2) { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push(server_name, &ServerName::m_type, p1, p2); \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2); \
} \
}
#define FUNC2C(m_type, m_arg1, m_arg2) \
- virtual void m_type(m_arg1 p1, m_arg2 p2) const { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2) const override { \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push(server_name, &ServerName::m_type, p1, p2); \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2); \
} \
}
#define FUNC3R(m_r, m_type, m_arg1, m_arg2, m_arg3) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1, p2, p3); \
} \
}
#define FUNC3RC(m_r, m_type, m_arg1, m_arg2, m_arg3) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const override { \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1, p2, p3); \
} \
}
#define FUNC3S(m_type, m_arg1, m_arg2, m_arg3) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2, p3); \
} \
}
#define FUNC3SC(m_type, m_arg1, m_arg2, m_arg3) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const override { \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2, p3); \
} \
}
#define FUNC3(m_type, m_arg1, m_arg2, m_arg3) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push(server_name, &ServerName::m_type, p1, p2, p3); \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2, p3); \
} \
}
#define FUNC3C(m_type, m_arg1, m_arg2, m_arg3) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3) const override { \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push(server_name, &ServerName::m_type, p1, p2, p3); \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2, p3); \
} \
}
#define FUNC4R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1, p2, p3, p4); \
} \
}
#define FUNC4RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const override { \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1, p2, p3, p4); \
} \
}
#define FUNC4S(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2, p3, p4); \
} \
}
#define FUNC4SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const override { \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2, p3, p4); \
} \
}
#define FUNC4(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4); \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2, p3, p4); \
} \
}
-#define FUNC4C(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4); \
- } else { \
- server_name->m_type(p1, p2, p3, p4); \
- } \
+#define FUNC4C(m_type, m_arg1, m_arg2, m_arg3, m_arg4) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4); \
+ } \
}
#define FUNC5R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \
virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1, p2, p3, p4, p5); \
} \
}
#define FUNC5RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const override { \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1, p2, p3, p4, p5); \
} \
}
#define FUNC5S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) override { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \
SYNC_DEBUG \
} else { \
+ command_queue.flush_if_pending(); \
server_name->m_type(p1, p2, p3, p4, p5); \
} \
}
-#define FUNC5SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \
- SYNC_DEBUG \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5); \
- } \
+#define FUNC5SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \
+ SYNC_DEBUG \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5); \
+ } \
}
-#define FUNC5(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5); \
- } \
+#define FUNC5(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5); \
+ } \
}
-#define FUNC5C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5); \
- } \
+#define FUNC5C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5); \
+ } \
}
#define FUNC6R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \
+ WRITE_ACTION \
if (Thread::get_caller_id() != server_thread) { \
m_r ret; \
command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, &ret); \
SYNC_DEBUG \
return ret; \
} else { \
+ command_queue.flush_if_pending(); \
return server_name->m_type(p1, p2, p3, p4, p5, p6); \
} \
}
-#define FUNC6RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \
- if (Thread::get_caller_id() != server_thread) { \
- m_r ret; \
- command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, &ret); \
- SYNC_DEBUG \
- return ret; \
- } else { \
- return server_name->m_type(p1, p2, p3, p4, p5, p6); \
- } \
+#define FUNC6RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ m_r ret; \
+ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, &ret); \
+ SYNC_DEBUG \
+ return ret; \
+ } else { \
+ command_queue.flush_if_pending(); \
+ return server_name->m_type(p1, p2, p3, p4, p5, p6); \
+ } \
+ }
+
+#define FUNC6S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \
+ SYNC_DEBUG \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6); \
+ } \
+ }
+
+#define FUNC6SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \
+ SYNC_DEBUG \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6); \
+ } \
}
-#define FUNC6S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \
- SYNC_DEBUG \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6); \
- } \
+#define FUNC6(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6); \
+ } \
}
-#define FUNC6SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \
- SYNC_DEBUG \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6); \
- } \
+#define FUNC6C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6); \
+ } \
}
-#define FUNC6(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6); \
- } \
+#define FUNC7R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ m_r ret; \
+ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, &ret); \
+ SYNC_DEBUG \
+ return ret; \
+ } else { \
+ command_queue.flush_if_pending(); \
+ return server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
+ } \
}
-#define FUNC6C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6) const { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6); \
- } \
- }
-
-#define FUNC7R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) { \
- if (Thread::get_caller_id() != server_thread) { \
- m_r ret; \
- command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, &ret); \
- SYNC_DEBUG \
- return ret; \
- } else { \
- return server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
- } \
- }
-
-#define FUNC7RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const { \
- if (Thread::get_caller_id() != server_thread) { \
- m_r ret; \
- command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, &ret); \
- SYNC_DEBUG \
- return ret; \
- } else { \
- return server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
- } \
- }
-
-#define FUNC7S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \
- SYNC_DEBUG \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
- } \
- }
-
-#define FUNC7SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \
- SYNC_DEBUG \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
- } \
- }
-
-#define FUNC7(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
- } \
- }
-
-#define FUNC7C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
- } \
- }
-
-#define FUNC8R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \
- if (Thread::get_caller_id() != server_thread) { \
- m_r ret; \
- command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, &ret); \
- SYNC_DEBUG \
- return ret; \
- } else { \
- return server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
- } \
- }
-
-#define FUNC8RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
- virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \
- if (Thread::get_caller_id() != server_thread) { \
- m_r ret; \
- command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, &ret); \
- SYNC_DEBUG \
- return ret; \
- } else { \
- return server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
- } \
- }
-
-#define FUNC8S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \
- SYNC_DEBUG \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
- } \
- }
-
-#define FUNC8SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \
- SYNC_DEBUG \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
- } \
- }
-
-#define FUNC8(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
- } \
- }
-
-#define FUNC8C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
- } \
- }
-
-#define FUNC9(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9); \
- } \
- }
-
-#define FUNC10(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \
- } \
- }
-
-#define FUNC11(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \
- } \
- }
-
-#define FUNC12(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11, m_arg12) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11, m_arg12 p12) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \
- } \
- }
-
-#define FUNC13(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11, m_arg12, m_arg13) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11, m_arg12 p12, m_arg13 p13) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \
- } \
- }
-
-#define FUNC14(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11, m_arg12, m_arg13, m_arg14) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11, m_arg12 p12, m_arg13 p13, m_arg14 p14) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); \
- } \
- }
-
-#define FUNC15(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11, m_arg12, m_arg13, m_arg14, m_arg15) \
- virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11, m_arg12 p12, m_arg13 p13, m_arg14 p14, m_arg15 p15) { \
- if (Thread::get_caller_id() != server_thread) { \
- command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15); \
- } else { \
- server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15); \
- } \
+#define FUNC7RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ m_r ret; \
+ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, &ret); \
+ SYNC_DEBUG \
+ return ret; \
+ } else { \
+ command_queue.flush_if_pending(); \
+ return server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
+ } \
+ }
+
+#define FUNC7S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \
+ SYNC_DEBUG \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
+ } \
+ }
+
+#define FUNC7SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \
+ SYNC_DEBUG \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
+ } \
+ }
+
+#define FUNC7(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
+ } \
+ }
+
+#define FUNC7C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7); \
+ } \
+ }
+
+#define FUNC8R(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ m_r ret; \
+ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, &ret); \
+ SYNC_DEBUG \
+ return ret; \
+ } else { \
+ command_queue.flush_if_pending(); \
+ return server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
+ } \
+ }
+
+#define FUNC8RC(m_r, m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
+ virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ m_r ret; \
+ command_queue.push_and_ret(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, &ret); \
+ SYNC_DEBUG \
+ return ret; \
+ } else { \
+ command_queue.flush_if_pending(); \
+ return server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
+ } \
+ }
+
+#define FUNC8S(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \
+ SYNC_DEBUG \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
+ } \
+ }
+
+#define FUNC8SC(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push_and_sync(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \
+ SYNC_DEBUG \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
+ } \
+ }
+
+#define FUNC8(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
+ } \
+ }
+
+#define FUNC8C(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const override { \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8); \
+ } \
+ }
+
+#define FUNC9(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9); \
+ } \
+ }
+
+#define FUNC10(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \
+ } \
+ }
+
+#define FUNC11(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \
+ } \
+ }
+
+#define FUNC12(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11, m_arg12) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11, m_arg12 p12) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \
+ } \
+ }
+
+#define FUNC13(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11, m_arg12, m_arg13) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11, m_arg12 p12, m_arg13 p13) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \
+ } \
+ }
+
+#define FUNC14(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11, m_arg12, m_arg13, m_arg14) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11, m_arg12 p12, m_arg13 p13, m_arg14 p14) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); \
+ } \
+ }
+
+#define FUNC15(m_type, m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8, m_arg9, m_arg10, m_arg11, m_arg12, m_arg13, m_arg14, m_arg15) \
+ virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8, m_arg9 p9, m_arg10 p10, m_arg11 p11, m_arg12 p12, m_arg13 p13, m_arg14 p14, m_arg15 p15) override { \
+ WRITE_ACTION \
+ if (Thread::get_caller_id() != server_thread) { \
+ command_queue.push(server_name, &ServerName::m_type, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15); \
+ } else { \
+ command_queue.flush_if_pending(); \
+ server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15); \
+ } \
}
diff --git a/servers/text_server.cpp b/servers/text_server.cpp
index da68ceb128..755a17f86a 100644
--- a/servers/text_server.cpp
+++ b/servers/text_server.cpp
@@ -227,6 +227,12 @@ void TextServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("font_get_underline_position", "font", "size"), &TextServer::font_get_underline_position);
ClassDB::bind_method(D_METHOD("font_get_underline_thickness", "font", "size"), &TextServer::font_get_underline_thickness);
+ ClassDB::bind_method(D_METHOD("font_get_spacing_space", "font"), &TextServer::font_get_spacing_space);
+ ClassDB::bind_method(D_METHOD("font_set_spacing_space", "font", "value"), &TextServer::font_set_spacing_space);
+
+ ClassDB::bind_method(D_METHOD("font_get_spacing_glyph", "font"), &TextServer::font_get_spacing_glyph);
+ ClassDB::bind_method(D_METHOD("font_set_spacing_glyph", "font", "value"), &TextServer::font_set_spacing_glyph);
+
ClassDB::bind_method(D_METHOD("font_set_antialiased", "font", "antialiased"), &TextServer::font_set_antialiased);
ClassDB::bind_method(D_METHOD("font_get_antialiased", "font"), &TextServer::font_get_antialiased);
diff --git a/servers/text_server.h b/servers/text_server.h
index 23367de4c8..3268741a74 100644
--- a/servers/text_server.h
+++ b/servers/text_server.h
@@ -241,6 +241,12 @@ public:
virtual float font_get_ascent(RID p_font, int p_size) const = 0;
virtual float font_get_descent(RID p_font, int p_size) const = 0;
+ virtual int font_get_spacing_space(RID p_font) const = 0;
+ virtual void font_set_spacing_space(RID p_font, int p_value) = 0;
+
+ virtual int font_get_spacing_glyph(RID p_font) const = 0;
+ virtual void font_set_spacing_glyph(RID p_font, int p_value) = 0;
+
virtual float font_get_underline_position(RID p_font, int p_size) const = 0;
virtual float font_get_underline_thickness(RID p_font, int p_size) const = 0;
diff --git a/tests/data/images/icon.bmp b/tests/data/images/icon.bmp
new file mode 100644
index 0000000000..e006f7ebdd
--- /dev/null
+++ b/tests/data/images/icon.bmp
Binary files differ
diff --git a/tests/data/images/icon.jpg b/tests/data/images/icon.jpg
new file mode 100644
index 0000000000..b45bfa8d9b
--- /dev/null
+++ b/tests/data/images/icon.jpg
Binary files differ
diff --git a/tests/data/images/icon.png b/tests/data/images/icon.png
new file mode 100644
index 0000000000..45aaaf584f
--- /dev/null
+++ b/tests/data/images/icon.png
Binary files differ
diff --git a/tests/data/images/icon.tga b/tests/data/images/icon.tga
new file mode 100644
index 0000000000..dcacdc5c67
--- /dev/null
+++ b/tests/data/images/icon.tga
Binary files differ
diff --git a/tests/data/images/icon.webp b/tests/data/images/icon.webp
new file mode 100644
index 0000000000..6c4707e858
--- /dev/null
+++ b/tests/data/images/icon.webp
Binary files differ
diff --git a/tests/test_class_db.h b/tests/test_class_db.h
index b1440b83ef..9ef4569c14 100644
--- a/tests/test_class_db.h
+++ b/tests/test_class_db.h
@@ -340,7 +340,14 @@ void validate_property(const Context &p_context, const ExposedClass &p_class, co
if (prop_class) {
TEST_COND(prop_class->is_singleton,
"Property type is a singleton: '", p_class.name, ".", String(p_prop.name), "'.");
+
+ if (p_class.api_type == ClassDB::API_CORE) {
+ TEST_COND(prop_class->api_type == ClassDB::API_EDITOR,
+ "Property '", p_class.name, ".", p_prop.name, "' has type '", prop_class->name,
+ "' from the editor API. Core API cannot have dependencies on the editor API.");
+ }
} else {
+ // Look for types that don't inherit Object
TEST_FAIL_COND(!p_context.has_type(prop_type_ref),
"Property type '", prop_type_ref.name, "' not found: '", p_class.name, ".", String(p_prop.name), "'.");
}
@@ -370,10 +377,22 @@ void validate_property(const Context &p_context, const ExposedClass &p_class, co
}
void validate_method(const Context &p_context, const ExposedClass &p_class, const MethodData &p_method) {
- const ExposedClass *return_class = p_context.find_exposed_class(p_method.return_type);
- if (return_class) {
- TEST_COND(return_class->is_singleton,
- "Method return type is a singleton: '", p_class.name, ".", p_method.name, "'.");
+ if (p_method.return_type.name != StringName()) {
+ const ExposedClass *return_class = p_context.find_exposed_class(p_method.return_type);
+ if (return_class) {
+ TEST_COND(return_class->is_singleton,
+ "Method return type is a singleton: '", p_class.name, ".", p_method.name, "'.");
+
+ if (p_class.api_type == ClassDB::API_CORE) {
+ TEST_COND(return_class->api_type == ClassDB::API_EDITOR,
+ "Method '", p_class.name, ".", p_method.name, "' has return type '", return_class->name,
+ "' from the editor API. Core API cannot have dependencies on the editor API.");
+ }
+ } else {
+ // Look for types that don't inherit Object
+ TEST_FAIL_COND(!p_context.has_type(p_method.return_type),
+ "Method return type '", p_method.return_type.name, "' not found: '", p_class.name, ".", p_method.name, "'.");
+ }
}
for (const List<ArgumentData>::Element *F = p_method.arguments.front(); F; F = F->next()) {
@@ -383,7 +402,14 @@ void validate_method(const Context &p_context, const ExposedClass &p_class, cons
if (arg_class) {
TEST_COND(arg_class->is_singleton,
"Argument type is a singleton: '", arg.name, "' of method '", p_class.name, ".", p_method.name, "'.");
+
+ if (p_class.api_type == ClassDB::API_CORE) {
+ TEST_COND(arg_class->api_type == ClassDB::API_EDITOR,
+ "Argument '", arg.name, "' of method '", p_class.name, ".", p_method.name, "' has type '",
+ arg_class->name, "' from the editor API. Core API cannot have dependencies on the editor API.");
+ }
} else {
+ // Look for types that don't inherit Object
TEST_FAIL_COND(!p_context.has_type(arg.type),
"Argument type '", arg.type.name, "' not found: '", arg.name, "' of method", p_class.name, ".", p_method.name, "'.");
}
@@ -407,8 +433,15 @@ void validate_signal(const Context &p_context, const ExposedClass &p_class, cons
const ExposedClass *arg_class = p_context.find_exposed_class(arg.type);
if (arg_class) {
TEST_COND(arg_class->is_singleton,
- "Argument class is a singleton: '", arg.name, "' of signal", p_class.name, ".", p_signal.name, "'.");
+ "Argument class is a singleton: '", arg.name, "' of signal '", p_class.name, ".", p_signal.name, "'.");
+
+ if (p_class.api_type == ClassDB::API_CORE) {
+ TEST_COND(arg_class->api_type == ClassDB::API_EDITOR,
+ "Argument '", arg.name, "' of signal '", p_class.name, ".", p_signal.name, "' has type '",
+ arg_class->name, "' from the editor API. Core API cannot have dependencies on the editor API.");
+ }
} else {
+ // Look for types that don't inherit Object
TEST_FAIL_COND(!p_context.has_type(arg.type),
"Argument type '", arg.type.name, "' not found: '", arg.name, "' of signal", p_class.name, ".", p_signal.name, "'.");
}
diff --git a/tests/test_command_queue.h b/tests/test_command_queue.h
index 2f0b75760d..b4fa63ad2b 100644
--- a/tests/test_command_queue.h
+++ b/tests/test_command_queue.h
@@ -122,8 +122,8 @@ public:
int message_count_to_read = 0;
bool exit_threads = false;
- Thread *reader_thread = nullptr;
- Thread *writer_thread = nullptr;
+ Thread reader_thread;
+ Thread writer_thread;
int func1_count = 0;
@@ -221,20 +221,16 @@ public:
}
void init_threads() {
- reader_thread = Thread::create(&SharedThreadState::static_reader_thread_loop, this);
- writer_thread = Thread::create(&SharedThreadState::static_writer_thread_loop, this);
+ reader_thread.start(&SharedThreadState::static_reader_thread_loop, this);
+ writer_thread.start(&SharedThreadState::static_writer_thread_loop, this);
}
void destroy_threads() {
exit_threads = true;
reader_threadwork.main_start_work();
writer_threadwork.main_start_work();
- Thread::wait_to_finish(reader_thread);
- memdelete(reader_thread);
- reader_thread = nullptr;
- Thread::wait_to_finish(writer_thread);
- memdelete(writer_thread);
- writer_thread = nullptr;
+ reader_thread.wait_to_finish();
+ writer_thread.wait_to_finish();
}
};
diff --git a/tests/test_image.h b/tests/test_image.h
new file mode 100644
index 0000000000..d73717f5b7
--- /dev/null
+++ b/tests/test_image.h
@@ -0,0 +1,259 @@
+/*************************************************************************/
+/* test_image.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 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 TEST_IMAGE_H
+#define TEST_IMAGE_H
+
+#include "core/io/file_access_pack.h"
+#include "core/io/image.h"
+#include "test_utils.h"
+
+#include "thirdparty/doctest/doctest.h"
+
+namespace TestImage {
+
+TEST_CASE("[Image] Instantiation") {
+ Ref<Image> image = memnew(Image(8, 4, false, Image::FORMAT_RGBA8));
+ CHECK_MESSAGE(
+ !image->is_empty(),
+ "An image created with specified size and format should not be empty at first.");
+ CHECK_MESSAGE(
+ image->is_invisible(),
+ "A newly created image should be invisible.");
+ CHECK_MESSAGE(
+ !image->is_compressed(),
+ "A newly created image should not be compressed.");
+ CHECK(!image->has_mipmaps());
+
+ Ref<Image> image_copy = memnew(Image());
+ CHECK_MESSAGE(
+ image_copy->is_empty(),
+ "An image created without any specified size and format be empty at first.");
+ image_copy->copy_internals_from(image);
+
+ CHECK_MESSAGE(
+ image->get_data() == image_copy->get_data(),
+ "Duplicated images should have the same data.");
+
+ PackedByteArray image_data = image->get_data();
+ Ref<Image> image_from_data = memnew(Image(8, 4, false, Image::FORMAT_RGBA8, image_data));
+ CHECK_MESSAGE(
+ image->get_data() == image_from_data->get_data(),
+ "An image created from data of another image should have the same data of the original image.");
+}
+
+TEST_CASE("[Image] Saving and loading") {
+ Ref<Image> image = memnew(Image(4, 4, false, Image::FORMAT_RGBA8));
+ const String save_path_png = OS::get_singleton()->get_cache_path().plus_file("image.png");
+ const String save_path_exr = OS::get_singleton()->get_cache_path().plus_file("image.exr");
+
+ // Save PNG
+ Error err;
+ err = image->save_png(save_path_png);
+ CHECK_MESSAGE(
+ err == OK,
+ "The image should be saved successfully as a .png file.");
+
+ // Save EXR
+ err = image->save_exr(save_path_exr, false);
+ CHECK_MESSAGE(
+ err == OK,
+ "The image should be saved successfully as an .exr file.");
+
+ // Load using load()
+ Ref<Image> image_load = memnew(Image());
+ err = image_load->load(save_path_png);
+ CHECK_MESSAGE(
+ err == OK,
+ "The image should load successfully using load().");
+ CHECK_MESSAGE(
+ image->get_data() == image_load->get_data(),
+ "The loaded image should have the same data as the one that got saved.");
+
+ // Load BMP
+ Ref<Image> image_bmp = memnew(Image());
+ FileAccessRef f_bmp = FileAccess::open(TestUtils::get_data_path("images/icon.bmp"), FileAccess::READ, &err);
+ PackedByteArray data_bmp;
+ data_bmp.resize(f_bmp->get_len() + 1);
+ f_bmp->get_buffer(data_bmp.ptrw(), f_bmp->get_len());
+ CHECK_MESSAGE(
+ image_bmp->load_bmp_from_buffer(data_bmp) == OK,
+ "The BMP image should load successfully.");
+
+ // Load JPG
+ Ref<Image> image_jpg = memnew(Image());
+ FileAccessRef f_jpg = FileAccess::open(TestUtils::get_data_path("images/icon.jpg"), FileAccess::READ, &err);
+ PackedByteArray data_jpg;
+ data_jpg.resize(f_jpg->get_len() + 1);
+ f_jpg->get_buffer(data_jpg.ptrw(), f_jpg->get_len());
+ CHECK_MESSAGE(
+ image_jpg->load_jpg_from_buffer(data_jpg) == OK,
+ "The JPG image should load successfully.");
+
+ // Load WEBP
+ Ref<Image> image_webp = memnew(Image());
+ FileAccessRef f_webp = FileAccess::open(TestUtils::get_data_path("images/icon.webp"), FileAccess::READ, &err);
+ PackedByteArray data_webp;
+ data_webp.resize(f_webp->get_len() + 1);
+ f_webp->get_buffer(data_webp.ptrw(), f_webp->get_len());
+ CHECK_MESSAGE(
+ image_webp->load_webp_from_buffer(data_webp) == OK,
+ "The WEBP image should load successfully.");
+
+ // Load PNG
+ Ref<Image> image_png = memnew(Image());
+ FileAccessRef f_png = FileAccess::open(TestUtils::get_data_path("images/icon.png"), FileAccess::READ, &err);
+ PackedByteArray data_png;
+ data_png.resize(f_png->get_len() + 1);
+ f_png->get_buffer(data_png.ptrw(), f_png->get_len());
+ CHECK_MESSAGE(
+ image_png->load_png_from_buffer(data_png) == OK,
+ "The PNG image should load successfully.");
+
+ // Load TGA
+ Ref<Image> image_tga = memnew(Image());
+ FileAccessRef f_tga = FileAccess::open(TestUtils::get_data_path("images/icon.tga"), FileAccess::READ, &err);
+ PackedByteArray data_tga;
+ data_tga.resize(f_tga->get_len() + 1);
+ f_tga->get_buffer(data_tga.ptrw(), f_tga->get_len());
+ CHECK_MESSAGE(
+ image_tga->load_tga_from_buffer(data_tga) == OK,
+ "The TGA image should load successfully.");
+}
+
+TEST_CASE("[Image] Basic getters") {
+ Ref<Image> image = memnew(Image(8, 4, false, Image::FORMAT_LA8));
+ CHECK(image->get_width() == 8);
+ CHECK(image->get_height() == 4);
+ CHECK(image->get_size() == Vector2(8, 4));
+ CHECK(image->get_format() == Image::FORMAT_LA8);
+ CHECK(image->get_used_rect() == Rect2(0, 0, 0, 0));
+ Ref<Image> image_get_rect = image->get_rect(Rect2(0, 0, 2, 1));
+ CHECK(image_get_rect->get_size() == Vector2(2, 1));
+}
+
+TEST_CASE("[Image] Resizing") {
+ Ref<Image> image = memnew(Image(8, 8, false, Image::FORMAT_RGBA8));
+ // Crop
+ image->crop(4, 4);
+ CHECK_MESSAGE(
+ image->get_size() == Vector2(4, 4),
+ "get_size() should return the correct size after cropping.");
+ image->set_pixel(0, 0, Color(1, 1, 1, 1));
+
+ // Resize
+ for (int i = 0; i < 5; i++) {
+ Ref<Image> image_resized = memnew(Image());
+ image_resized->copy_internals_from(image);
+ Image::Interpolation interpolation = static_cast<Image::Interpolation>(i);
+ image_resized->resize(8, 8, interpolation);
+ CHECK_MESSAGE(
+ image_resized->get_size() == Vector2(8, 8),
+ "get_size() should return the correct size after resizing.");
+ CHECK_MESSAGE(
+ image_resized->get_pixel(1, 1).a > 0,
+ "Resizing an image should also affect its content.");
+ }
+
+ // shrink_x2()
+ image->shrink_x2();
+ CHECK_MESSAGE(
+ image->get_size() == Vector2(2, 2),
+ "get_size() should return the correct size after shrink_x2().");
+
+ // resize_to_po2()
+ Ref<Image> image_po_2 = memnew(Image(14, 28, false, Image::FORMAT_RGBA8));
+ image_po_2->resize_to_po2();
+ CHECK_MESSAGE(
+ image_po_2->get_size() == Vector2(16, 32),
+ "get_size() should return the correct size after resize_to_po2().");
+}
+
+TEST_CASE("[Image] Modifying pixels of an image") {
+ Ref<Image> image = memnew(Image(3, 3, false, Image::FORMAT_RGBA8));
+ image->set_pixel(0, 0, Color(1, 1, 1, 1));
+ CHECK_MESSAGE(
+ !image->is_invisible(),
+ "Image should not be invisible after drawing on it.");
+ CHECK_MESSAGE(
+ image->get_pixelv(Vector2(0, 0)).is_equal_approx(Color(1, 1, 1, 1)),
+ "Image's get_pixel() should return the same color value as the one being set with set_pixel() in the same position.");
+ CHECK_MESSAGE(
+ image->get_used_rect() == Rect2(0, 0, 1, 1),
+ "Image's get_used_rect should return the expected value, larger than Rect2(0, 0, 0, 0) if it's visible.");
+
+ image->set_pixelv(Vector2(0, 0), Color(0.5, 0.5, 0.5, 0.5));
+ Ref<Image> image2 = memnew(Image(3, 3, false, Image::FORMAT_RGBA8));
+
+ // Fill image with color
+ image2->fill(Color(0.5, 0.5, 0.5, 0.5));
+ for (int x = 0; x < image2->get_width(); x++) {
+ for (int y = 0; y < image2->get_height(); y++) {
+ CHECK_MESSAGE(
+ image2->get_pixel(x, y).r > 0.49,
+ "fill() should colorize all pixels of the image.");
+ }
+ }
+
+ // Blend two images together
+ image->blend_rect(image2, Rect2(Vector2(0, 0), image2->get_size()), Vector2(0, 0));
+ CHECK_MESSAGE(
+ image->get_pixel(0, 0).a > 0.7,
+ "blend_rect() should blend the alpha values of the two images.");
+ CHECK_MESSAGE(
+ image->get_used_rect().size == image->get_size(),
+ "get_used_rect() should return the expected value, its Rect size should be the same as get_size() if there are no transparent pixels.");
+
+ Ref<Image> image3 = memnew(Image(2, 2, false, Image::FORMAT_RGBA8));
+ image3->set_pixel(0, 0, Color(0, 1, 0, 1));
+
+ //blit_rect() two images together
+ image->blit_rect(image3, Rect2(Vector2(0, 0), image3->get_size()), Vector2(0, 0));
+ CHECK_MESSAGE(
+ image->get_pixel(0, 0).is_equal_approx(Color(0, 1, 0, 1)),
+ "blit_rect() should replace old colors and not blend them.");
+ CHECK_MESSAGE(
+ !image->get_pixel(2, 2).is_equal_approx(Color(0, 1, 0, 1)),
+ "blit_rect() should not affect the area of the image that is outside src_rect.");
+
+ // Flip image
+ image3->flip_x();
+ CHECK(image3->get_pixel(1, 0).is_equal_approx(Color(0, 1, 0, 1)));
+ CHECK_MESSAGE(
+ image3->get_pixel(0, 0).is_equal_approx(Color(0, 0, 0, 0)),
+ "flip_x() should not leave old pixels behind.");
+ image3->flip_y();
+ CHECK(image3->get_pixel(1, 1).is_equal_approx(Color(0, 1, 0, 1)));
+ CHECK_MESSAGE(
+ image3->get_pixel(1, 0).is_equal_approx(Color(0, 0, 0, 0)),
+ "flip_y() should not leave old pixels behind.");
+}
+} // namespace TestImage
+#endif // TEST_IMAGE_H
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index e07a0a7d7b..2697eb6399 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -46,10 +46,12 @@
#include "test_geometry_2d.h"
#include "test_gradient.h"
#include "test_gui.h"
+#include "test_image.h"
#include "test_json.h"
#include "test_list.h"
#include "test_local_vector.h"
#include "test_lru.h"
+#include "test_marshalls.h"
#include "test_math.h"
#include "test_method_bind.h"
#include "test_node_path.h"
diff --git a/tests/test_marshalls.h b/tests/test_marshalls.h
new file mode 100644
index 0000000000..6bd916164e
--- /dev/null
+++ b/tests/test_marshalls.h
@@ -0,0 +1,329 @@
+/*************************************************************************/
+/* test_marshalls.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 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 TEST_MARSHALLS_H
+#define TEST_MARSHALLS_H
+
+#include "core/io/marshalls.h"
+
+#include "tests/test_macros.h"
+
+namespace TestMarshalls {
+
+TEST_CASE("[Marshalls] Unsigned 16 bit integer encoding") {
+ uint8_t arr[2];
+
+ unsigned int actual_size = encode_uint16(0x1234, arr);
+ CHECK(actual_size == sizeof(uint16_t));
+ CHECK_MESSAGE(arr[0] == 0x34, "First encoded byte value should be equal to low order byte value.");
+ CHECK_MESSAGE(arr[1] == 0x12, "Last encoded byte value should be equal to high order byte value.");
+}
+
+TEST_CASE("[Marshalls] Unsigned 32 bit integer encoding") {
+ uint8_t arr[4];
+
+ unsigned int actual_size = encode_uint32(0x12345678, arr);
+ CHECK(actual_size == sizeof(uint32_t));
+ CHECK_MESSAGE(arr[0] == 0x78, "First encoded byte value should be equal to low order byte value.");
+ CHECK(arr[1] == 0x56);
+ CHECK(arr[2] == 0x34);
+ CHECK_MESSAGE(arr[3] == 0x12, "Last encoded byte value should be equal to high order byte value.");
+}
+
+TEST_CASE("[Marshalls] Unsigned 64 bit integer encoding") {
+ uint8_t arr[8];
+
+ unsigned int actual_size = encode_uint64(0x0f123456789abcdef, arr);
+ CHECK(actual_size == sizeof(uint64_t));
+ CHECK_MESSAGE(arr[0] == 0xef, "First encoded byte value should be equal to low order byte value.");
+ CHECK(arr[1] == 0xcd);
+ CHECK(arr[2] == 0xab);
+ CHECK(arr[3] == 0x89);
+ CHECK(arr[4] == 0x67);
+ CHECK(arr[5] == 0x45);
+ CHECK(arr[6] == 0x23);
+ CHECK_MESSAGE(arr[7] == 0xf1, "Last encoded byte value should be equal to high order byte value.");
+}
+
+TEST_CASE("[Marshalls] Unsigned 16 bit integer decoding") {
+ uint8_t arr[] = { 0x34, 0x12 };
+
+ CHECK(decode_uint16(arr) == 0x1234);
+}
+
+TEST_CASE("[Marshalls] Unsigned 32 bit integer decoding") {
+ uint8_t arr[] = { 0x78, 0x56, 0x34, 0x12 };
+
+ CHECK(decode_uint32(arr) == 0x12345678);
+}
+
+TEST_CASE("[Marshalls] Unsigned 64 bit integer decoding") {
+ uint8_t arr[] = { 0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0xf1 };
+
+ CHECK(decode_uint64(arr) == 0x0f123456789abcdef);
+}
+
+TEST_CASE("[Marshalls] Floating point single precision encoding") {
+ uint8_t arr[4];
+
+ // Decimal: 0.15625
+ // IEEE 754 single-precision binary floating-point format:
+ // sign exponent (8 bits) fraction (23 bits)
+ // 0 01111100 01000000000000000000000
+ // Hexadecimal: 0x3E200000
+ unsigned int actual_size = encode_float(0.15625f, arr);
+ CHECK(actual_size == sizeof(uint32_t));
+ CHECK(arr[0] == 0x00);
+ CHECK(arr[1] == 0x00);
+ CHECK(arr[2] == 0x20);
+ CHECK(arr[3] == 0x3e);
+}
+
+TEST_CASE("[Marshalls] Floating point double precision encoding") {
+ uint8_t arr[8];
+
+ // Decimal: 0.333333333333333314829616256247390992939472198486328125
+ // IEEE 754 double-precision binary floating-point format:
+ // sign exponent (11 bits) fraction (52 bits)
+ // 0 01111111101 0101010101010101010101010101010101010101010101010101
+ // Hexadecimal: 0x3FD5555555555555
+ unsigned int actual_size = encode_double(0.33333333333333333, arr);
+ CHECK(actual_size == sizeof(uint64_t));
+ CHECK(arr[0] == 0x55);
+ CHECK(arr[1] == 0x55);
+ CHECK(arr[2] == 0x55);
+ CHECK(arr[3] == 0x55);
+ CHECK(arr[4] == 0x55);
+ CHECK(arr[5] == 0x55);
+ CHECK(arr[6] == 0xd5);
+ CHECK(arr[7] == 0x3f);
+}
+
+TEST_CASE("[Marshalls] Floating point single precision decoding") {
+ uint8_t arr[] = { 0x00, 0x00, 0x20, 0x3e };
+
+ // See floating point encoding test case for details behind expected values
+ CHECK(decode_float(arr) == 0.15625f);
+}
+
+TEST_CASE("[Marshalls] Floating point double precision decoding") {
+ uint8_t arr[] = { 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x3f };
+
+ // See floating point encoding test case for details behind expected values
+ CHECK(decode_double(arr) == 0.33333333333333333);
+}
+
+TEST_CASE("[Marshalls] C string encoding") {
+ char cstring[] = "Godot"; // 5 characters
+ uint8_t data[6];
+
+ int actual_size = encode_cstring(cstring, data);
+ CHECK(actual_size == 6);
+ CHECK(data[0] == 'G');
+ CHECK(data[1] == 'o');
+ CHECK(data[2] == 'd');
+ CHECK(data[3] == 'o');
+ CHECK(data[4] == 't');
+ CHECK(data[5] == '\0');
+}
+
+TEST_CASE("[Marshalls] NIL Variant encoding") {
+ int r_len;
+ Variant variant;
+ uint8_t buffer[4];
+
+ CHECK(encode_variant(variant, buffer, r_len) == OK);
+ CHECK_MESSAGE(r_len == 4, "Length == 4 bytes for Variant::Type");
+ CHECK_MESSAGE(buffer[0] == 0x00, "Variant::NIL");
+ CHECK(buffer[1] == 0x00);
+ CHECK(buffer[2] == 0x00);
+ CHECK(buffer[3] == 0x00);
+ // No value
+}
+
+TEST_CASE("[Marshalls] INT 32 bit Variant encoding") {
+ int r_len;
+ Variant variant(0x12345678);
+ uint8_t buffer[8];
+
+ CHECK(encode_variant(variant, buffer, r_len) == OK);
+ CHECK_MESSAGE(r_len == 8, "Length == 4 bytes for Variant::Type + 4 bytes for int32_t");
+ CHECK_MESSAGE(buffer[0] == 0x02, "Variant::INT");
+ CHECK(buffer[1] == 0x00);
+ CHECK(buffer[2] == 0x00);
+ CHECK(buffer[3] == 0x00);
+ // Check value
+ CHECK(buffer[4] == 0x78);
+ CHECK(buffer[5] == 0x56);
+ CHECK(buffer[6] == 0x34);
+ CHECK(buffer[7] == 0x12);
+}
+
+TEST_CASE("[Marshalls] INT 64 bit Variant encoding") {
+ int r_len;
+ Variant variant(uint64_t(0x0f123456789abcdef));
+ uint8_t buffer[12];
+
+ CHECK(encode_variant(variant, buffer, r_len) == OK);
+ CHECK_MESSAGE(r_len == 12, "Length == 4 bytes for Variant::Type + 8 bytes for int64_t");
+ CHECK_MESSAGE(buffer[0] == 0x02, "Variant::INT");
+ CHECK(buffer[1] == 0x00);
+ CHECK_MESSAGE(buffer[2] == 0x01, "ENCODE_FLAG_64");
+ CHECK(buffer[3] == 0x00);
+ // Check value
+ CHECK(buffer[4] == 0xef);
+ CHECK(buffer[5] == 0xcd);
+ CHECK(buffer[6] == 0xab);
+ CHECK(buffer[7] == 0x89);
+ CHECK(buffer[8] == 0x67);
+ CHECK(buffer[9] == 0x45);
+ CHECK(buffer[10] == 0x23);
+ CHECK(buffer[11] == 0xf1);
+}
+
+TEST_CASE("[Marshalls] FLOAT single precision Variant encoding") {
+ int r_len;
+ Variant variant(0.15625f);
+ uint8_t buffer[8];
+
+ CHECK(encode_variant(variant, buffer, r_len) == OK);
+ CHECK_MESSAGE(r_len == 8, "Length == 4 bytes for Variant::Type + 4 bytes for float");
+ CHECK_MESSAGE(buffer[0] == 0x03, "Variant::FLOAT");
+ CHECK(buffer[1] == 0x00);
+ CHECK(buffer[2] == 0x00);
+ CHECK(buffer[3] == 0x00);
+ // Check value
+ CHECK(buffer[4] == 0x00);
+ CHECK(buffer[5] == 0x00);
+ CHECK(buffer[6] == 0x20);
+ CHECK(buffer[7] == 0x3e);
+}
+
+TEST_CASE("[Marshalls] FLOAT double precision Variant encoding") {
+ int r_len;
+ Variant variant(0.33333333333333333);
+ uint8_t buffer[12];
+
+ CHECK(encode_variant(variant, buffer, r_len) == OK);
+ CHECK_MESSAGE(r_len == 12, "Length == 4 bytes for Variant::Type + 8 bytes for double");
+ CHECK_MESSAGE(buffer[0] == 0x03, "Variant::FLOAT");
+ CHECK(buffer[1] == 0x00);
+ CHECK_MESSAGE(buffer[2] == 0x01, "ENCODE_FLAG_64");
+ CHECK(buffer[3] == 0x00);
+ // Check value
+ CHECK(buffer[4] == 0x55);
+ CHECK(buffer[5] == 0x55);
+ CHECK(buffer[6] == 0x55);
+ CHECK(buffer[7] == 0x55);
+ CHECK(buffer[8] == 0x55);
+ CHECK(buffer[9] == 0x55);
+ CHECK(buffer[10] == 0xd5);
+ CHECK(buffer[11] == 0x3f);
+}
+
+TEST_CASE("[Marshalls] Invalid data Variant decoding") {
+ Variant variant;
+ int r_len = 0;
+ uint8_t some_buffer[1] = { 0x00 };
+ uint8_t out_of_range_type_buffer[4] = { 0xff }; // Greater than Variant::VARIANT_MAX
+
+ CHECK(decode_variant(variant, some_buffer, /* less than 4 */ 1, &r_len) == ERR_INVALID_DATA);
+ CHECK(r_len == 0);
+
+ CHECK(decode_variant(variant, out_of_range_type_buffer, 4, &r_len) == ERR_INVALID_DATA);
+ CHECK(r_len == 0);
+}
+
+TEST_CASE("[Marshalls] NIL Variant decoding") {
+ Variant variant;
+ int r_len;
+ uint8_t buffer[] = {
+ 0x00, 0x00, 0x00, 0x00 // Variant::NIL
+ };
+
+ CHECK(decode_variant(variant, buffer, 4, &r_len) == OK);
+ CHECK(r_len == 4);
+ CHECK(variant == Variant());
+}
+
+TEST_CASE("[Marshalls] INT 32 bit Variant decoding") {
+ Variant variant;
+ int r_len;
+ uint8_t buffer[] = {
+ 0x02, 0x00, 0x00, 0x00, // Variant::INT
+ 0x78, 0x56, 0x34, 0x12 // value
+ };
+
+ CHECK(decode_variant(variant, buffer, 8, &r_len) == OK);
+ CHECK(r_len == 8);
+ CHECK(variant == Variant(0x12345678));
+}
+
+TEST_CASE("[Marshalls] INT 64 bit Variant decoding") {
+ Variant variant;
+ int r_len;
+ uint8_t buffer[] = {
+ 0x02, 0x00, 0x01, 0x00, // Variant::INT & ENCODE_FLAG_64
+ 0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0xf1 // value
+ };
+
+ CHECK(decode_variant(variant, buffer, 12, &r_len) == OK);
+ CHECK(r_len == 12);
+ CHECK(variant == Variant(uint64_t(0x0f123456789abcdef)));
+}
+
+TEST_CASE("[Marshalls] FLOAT single precision Variant decoding") {
+ Variant variant;
+ int r_len;
+ uint8_t buffer[] = {
+ 0x03, 0x00, 0x00, 0x00, // Variant::FLOAT
+ 0x00, 0x00, 0x20, 0x3e // value
+ };
+
+ CHECK(decode_variant(variant, buffer, 8, &r_len) == OK);
+ CHECK(r_len == 8);
+ CHECK(variant == Variant(0.15625f));
+}
+
+TEST_CASE("[Marshalls] FLOAT double precision Variant decoding") {
+ Variant variant;
+ int r_len;
+ uint8_t buffer[] = {
+ 0x03, 0x00, 0x01, 0x00, // Variant::FLOAT & ENCODE_FLAG_64
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x3f // value
+ };
+
+ CHECK(decode_variant(variant, buffer, 12, &r_len) == OK);
+ CHECK(r_len == 12);
+ CHECK(variant == Variant(0.33333333333333333));
+}
+} // namespace TestMarshalls
+
+#endif // TEST_MARSHALLS_H
diff --git a/tests/test_object.h b/tests/test_object.h
index 7f310fc096..142d76553d 100644
--- a/tests/test_object.h
+++ b/tests/test_object.h
@@ -31,12 +31,103 @@
#ifndef TEST_OBJECT_H
#define TEST_OBJECT_H
+#include "core/core_string_names.h"
#include "core/object/object.h"
#include "thirdparty/doctest/doctest.h"
+// Declared in global namespace because of GDCLASS macro warning (Windows):
+// "Unqualified friend declaration referring to type outside of the nearest enclosing namespace
+// is a Microsoft extension; add a nested name specifier".
+class _TestDerivedObject : public Object {
+ GDCLASS(_TestDerivedObject, Object);
+
+ int property_value;
+
+protected:
+ static void _bind_methods() {
+ ClassDB::bind_method(D_METHOD("set_property", "property"), &_TestDerivedObject::set_property);
+ ClassDB::bind_method(D_METHOD("get_property"), &_TestDerivedObject::get_property);
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "property"), "set_property", "get_property");
+ }
+
+public:
+ void set_property(int value) { property_value = value; }
+ int get_property() const { return property_value; }
+};
+
namespace TestObject {
+class _MockScriptInstance : public ScriptInstance {
+ StringName property_name = "NO_NAME";
+ Variant property_value;
+
+public:
+ bool set(const StringName &p_name, const Variant &p_value) override {
+ property_name = p_name;
+ property_value = p_value;
+ return true;
+ }
+ bool get(const StringName &p_name, Variant &r_ret) const override {
+ if (property_name == p_name) {
+ r_ret = property_value;
+ return true;
+ }
+ return false;
+ }
+ void get_property_list(List<PropertyInfo> *p_properties) const override {
+ }
+ Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid) const override {
+ return Variant::PACKED_FLOAT32_ARRAY;
+ }
+ void get_method_list(List<MethodInfo> *p_list) const override {
+ }
+ bool has_method(const StringName &p_method) const override {
+ return false;
+ }
+ Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) override {
+ return Variant();
+ }
+ void notification(int p_notification) override {
+ }
+ Ref<Script> get_script() const override {
+ return Ref<Script>();
+ }
+ Vector<ScriptNetData> get_rpc_methods() const override {
+ return Vector<ScriptNetData>();
+ }
+ uint16_t get_rpc_method_id(const StringName &p_method) const override {
+ return 0;
+ }
+ StringName get_rpc_method(uint16_t p_id) const override {
+ return StringName();
+ }
+ MultiplayerAPI::RPCMode get_rpc_mode_by_id(uint16_t p_id) const override {
+ return MultiplayerAPI::RPC_MODE_PUPPET;
+ }
+ MultiplayerAPI::RPCMode get_rpc_mode(const StringName &p_method) const override {
+ return MultiplayerAPI::RPC_MODE_PUPPET;
+ }
+ Vector<ScriptNetData> get_rset_properties() const override {
+ return Vector<ScriptNetData>();
+ }
+ uint16_t get_rset_property_id(const StringName &p_variable) const override {
+ return 0;
+ }
+ StringName get_rset_property(uint16_t p_id) const override {
+ return StringName();
+ }
+ MultiplayerAPI::RPCMode get_rset_mode_by_id(uint16_t p_id) const override {
+ return MultiplayerAPI::RPC_MODE_PUPPET;
+ }
+ MultiplayerAPI::RPCMode get_rset_mode(const StringName &p_variable) const override {
+ return MultiplayerAPI::RPC_MODE_PUPPET;
+ }
+ ScriptLanguage *get_language() override {
+ return nullptr;
+ }
+};
+
TEST_CASE("[Object] Core getters") {
Object object;
@@ -55,6 +146,15 @@ TEST_CASE("[Object] Core getters") {
CHECK_MESSAGE(
object.get_save_class() == "Object",
"The returned save class should match the expected value.");
+
+ List<String> inheritance_list;
+ object.get_inheritance_list_static(&inheritance_list);
+ CHECK_MESSAGE(
+ inheritance_list.size() == 1,
+ "The inheritance list should consist of Object only");
+ CHECK_MESSAGE(
+ inheritance_list[0] == "Object",
+ "The inheritance list should consist of Object only");
}
TEST_CASE("[Object] Metadata") {
@@ -87,6 +187,119 @@ TEST_CASE("[Object] Metadata") {
meta_list2.size() == 0,
"The metadata list should contain 0 items after removing all metadata items.");
}
+
+TEST_CASE("[Object] Construction") {
+ Object object;
+
+ CHECK_MESSAGE(
+ !object.is_reference(),
+ "Object is not a Reference.");
+
+ Object *p_db = ObjectDB::get_instance(object.get_instance_id());
+ CHECK_MESSAGE(
+ p_db == &object,
+ "The database pointer returned by the object id should reference same object.");
+}
+
+TEST_CASE("[Object] Script instance property setter") {
+ Object object;
+ _MockScriptInstance *script_instance = memnew(_MockScriptInstance);
+ object.set_script_instance(script_instance);
+
+ bool valid = false;
+ object.set("some_name", 100, &valid);
+ CHECK(valid);
+ Variant actual_value;
+ CHECK_MESSAGE(
+ script_instance->get("some_name", actual_value),
+ "The assigned script instance should successfully retrieve value by name.");
+ CHECK_MESSAGE(
+ actual_value == Variant(100),
+ "The returned value should equal the one which was set by the object.");
+}
+
+TEST_CASE("[Object] Script instance property getter") {
+ Object object;
+ _MockScriptInstance *script_instance = memnew(_MockScriptInstance);
+ script_instance->set("some_name", 100); // Make sure script instance has the property
+ object.set_script_instance(script_instance);
+
+ bool valid = false;
+ const Variant &actual_value = object.get("some_name", &valid);
+ CHECK(valid);
+ CHECK_MESSAGE(
+ actual_value == Variant(100),
+ "The returned value should equal the one which was set by the script instance.");
+}
+
+TEST_CASE("[Object] Built-in property setter") {
+ ClassDB::register_class<_TestDerivedObject>();
+ _TestDerivedObject derived_object;
+
+ bool valid = false;
+ derived_object.set("property", 100, &valid);
+ CHECK(valid);
+ CHECK_MESSAGE(
+ derived_object.get_property() == 100,
+ "The property value should equal the one which was set with built-in setter.");
+}
+
+TEST_CASE("[Object] Built-in property getter") {
+ ClassDB::register_class<_TestDerivedObject>();
+ _TestDerivedObject derived_object;
+ derived_object.set_property(100);
+
+ bool valid = false;
+ const Variant &actual_value = derived_object.get("property", &valid);
+ CHECK(valid);
+ CHECK_MESSAGE(
+ actual_value == Variant(100),
+ "The returned value should equal the one which was set with built-in setter.");
+}
+
+TEST_CASE("[Object] Script property setter") {
+ Object object;
+ Variant script;
+
+ bool valid = false;
+ object.set(CoreStringNames::get_singleton()->_script, script, &valid);
+ CHECK(valid);
+ CHECK_MESSAGE(
+ object.get_script() == script,
+ "The object script should be equal to the assigned one.");
+}
+
+TEST_CASE("[Object] Script property getter") {
+ Object object;
+ Variant script;
+ object.set_script(script);
+
+ bool valid = false;
+ const Variant &actual_value = object.get(CoreStringNames::get_singleton()->_script, &valid);
+ CHECK(valid);
+ CHECK_MESSAGE(
+ actual_value == script,
+ "The returned value should be equal to the assigned script.");
+}
+
+TEST_CASE("[Object] Absent name setter") {
+ Object object;
+
+ bool valid = true;
+ object.set("absent_name", 100, &valid);
+ CHECK(!valid);
+}
+
+TEST_CASE("[Object] Absent name getter") {
+ Object object;
+
+ bool valid = true;
+ const Variant &actual_value = object.get("absent_name", &valid);
+ CHECK(!valid);
+ CHECK_MESSAGE(
+ actual_value == Variant(),
+ "The returned value should equal nil variant.");
+}
} // namespace TestObject
#endif // TEST_OBJECT_H
diff --git a/tests/test_physics_3d.cpp b/tests/test_physics_3d.cpp
index a11140cfc3..74afbad9d1 100644
--- a/tests/test_physics_3d.cpp
+++ b/tests/test_physics_3d.cpp
@@ -59,7 +59,7 @@ class TestPhysics3DMainLoop : public MainLoop {
RID character;
- float ofs_x, ofs_y;
+ real_t ofs_x, ofs_y;
Point2 joy_direction;
@@ -86,7 +86,9 @@ protected:
PhysicsServer3D *ps = PhysicsServer3D::get_singleton();
RID mesh_instance = vs->instance_create2(type_mesh_map[p_shape], scenario);
- RID body = ps->body_create(p_body, !p_active_default);
+ RID body = ps->body_create();
+ ps->body_set_mode(body, p_body);
+ ps->body_set_state(body, PhysicsServer3D::BODY_STATE_SLEEPING, !p_active_default);
ps->body_set_space(body, space);
ps->body_set_param(body, PhysicsServer3D::BODY_PARAM_BOUNCE, 0.0);
//todo set space
@@ -108,14 +110,16 @@ protected:
RID world_margin_shape = ps->shape_create(PhysicsServer3D::SHAPE_PLANE);
ps->shape_set_data(world_margin_shape, p_plane);
- RID b = ps->body_create(PhysicsServer3D::BODY_MODE_STATIC);
+ RID b = ps->body_create();
+ ps->body_set_mode(b, PhysicsServer3D::BODY_MODE_STATIC);
+
ps->body_set_space(b, space);
//todo set space
ps->body_add_shape(b, world_margin_shape);
return b;
}
- void configure_body(RID p_body, float p_mass, float p_friction, float p_bounce) {
+ void configure_body(RID p_body, real_t p_mass, real_t p_friction, real_t p_bounce) {
PhysicsServer3D *ps = PhysicsServer3D::get_singleton();
ps->body_set_param(p_body, PhysicsServer3D::BODY_PARAM_MASS, p_mass);
ps->body_set_param(p_body, PhysicsServer3D::BODY_PARAM_FRICTION, p_friction);
@@ -202,7 +206,8 @@ protected:
RID triins = vs->instance_create2(trimesh_mesh, scenario);
- RID tribody = ps->body_create(PhysicsServer3D::BODY_MODE_STATIC);
+ RID tribody = ps->body_create();
+ ps->body_set_mode(tribody, PhysicsServer3D::BODY_MODE_STATIC);
ps->body_set_space(tribody, space);
//todo set space
ps->body_add_shape(tribody, trimesh_shape);
@@ -211,8 +216,8 @@ protected:
vs->instance_set_transform(triins, tritrans);
}
- void make_grid(int p_width, int p_height, float p_cellsize, float p_cellheight, const Transform &p_xform = Transform()) {
- Vector<Vector<float>> grid;
+ void make_grid(int p_width, int p_height, real_t p_cellsize, real_t p_cellheight, const Transform &p_xform = Transform()) {
+ Vector<Vector<real_t>> grid;
grid.resize(p_width);
@@ -253,8 +258,8 @@ public:
}
if (mm.is_valid() && mm->get_button_mask() & 1) {
- float y = -mm->get_relative().y / 20.0;
- float x = mm->get_relative().x / 20.0;
+ real_t y = -mm->get_relative().y / 20.0;
+ real_t x = mm->get_relative().x / 20.0;
if (mover.is_valid()) {
PhysicsServer3D *ps = PhysicsServer3D::get_singleton();
@@ -312,7 +317,7 @@ public:
}
virtual bool physics_process(float p_time) override {
if (mover.is_valid()) {
- static float joy_speed = 10;
+ static real_t joy_speed = 10;
PhysicsServer3D *ps = PhysicsServer3D::get_singleton();
Transform t = ps->body_get_state(mover, PhysicsServer3D::BODY_STATE_TRANSFORM);
t.origin += Vector3(joy_speed * joy_direction.x * p_time, -joy_speed * joy_direction.y * p_time, 0);
@@ -358,7 +363,8 @@ public:
ps->shape_set_data(capsule_shape, capsule_params);
RID mesh_instance = vs->instance_create2(capsule_mesh, scenario);
- character = ps->body_create(PhysicsServer3D::BODY_MODE_CHARACTER);
+ character = ps->body_create();
+ ps->body_set_mode(character, PhysicsServer3D::BODY_MODE_CHARACTER);
ps->body_set_space(character, space);
//todo add space
ps->body_add_shape(character, capsule_shape);
diff --git a/tests/test_render.cpp b/tests/test_render.cpp
index 2a4ae8bd73..72b2840098 100644
--- a/tests/test_render.cpp
+++ b/tests/test_render.cpp
@@ -183,8 +183,8 @@ public:
//vs->light_set_shadow( lightaux, true );
light = vs->instance_create2(lightaux, scenario);
Transform lla;
- //lla.set_look_at(Vector3(),Vector3(1,-1,1),Vector3(0,1,0));
- lla.set_look_at(Vector3(), Vector3(-0.000000, -0.836026, -0.548690), Vector3(0, 1, 0));
+ //lla.set_look_at(Vector3(),Vector3(1, -1, 1));
+ lla.set_look_at(Vector3(), Vector3(0.0, -0.836026, -0.548690));
vs->instance_set_transform(light, lla);
diff --git a/tests/test_string.h b/tests/test_string.h
index 17a2df190d..cc3152203e 100644
--- a/tests/test_string.h
+++ b/tests/test_string.h
@@ -266,7 +266,7 @@ TEST_CASE("[String] Operator []") {
a[6] = 'C';
CHECK(a == "Sugar Cane");
CHECK(a[1] == 'u');
- CHECK(a.ord_at(1) == 'u');
+ CHECK(a.unicode_at(1) == 'u');
}
TEST_CASE("[String] Case function test") {
@@ -370,12 +370,9 @@ TEST_CASE("[String] String to integer") {
TEST_CASE("[String] Hex to integer") {
static const char *nums[4] = { "0xFFAE", "22", "0", "AADDAD" };
static const int64_t num[4] = { 0xFFAE, 0x22, 0, 0xAADDAD };
- static const bool wo_prefix[4] = { false, true, true, true };
- static const bool w_prefix[4] = { true, false, true, false };
for (int i = 0; i < 4; i++) {
- CHECK((String(nums[i]).hex_to_int(true) == num[i]) == w_prefix[i]);
- CHECK((String(nums[i]).hex_to_int(false) == num[i]) == wo_prefix[i]);
+ CHECK(String(nums[i]).hex_to_int() == num[i]);
}
}
@@ -1155,20 +1152,12 @@ TEST_CASE("[String] hash") {
CHECK(a.hash64() != c.hash64());
}
-TEST_CASE("[String] http_escape/unescape") {
+TEST_CASE("[String] uri_encode/unescape") {
String s = "Godot Engine:'docs'";
String t = "Godot%20Engine%3A%27docs%27";
- CHECK(s.http_escape() == t);
- CHECK(t.http_unescape() == s);
-}
-
-TEST_CASE("[String] percent_encode/decode") { // Note: is it redundant? Seems to be same as http_escape/unescape but in lower case.
- String s = "Godot Engine:'docs'";
- String t = "Godot%20Engine%3a%27docs%27";
-
- CHECK(s.percent_encode() == t);
- CHECK(t.percent_decode() == s);
+ CHECK(s.uri_encode() == t);
+ CHECK(t.uri_decode() == s);
}
TEST_CASE("[String] xml_escape/unescape") {
diff --git a/tests/test_variant.h b/tests/test_variant.h
index f8fa852bf4..dfc72b512c 100644
--- a/tests/test_variant.h
+++ b/tests/test_variant.h
@@ -105,6 +105,600 @@ TEST_CASE("[Variant] Writer and parser float") {
CHECK_MESSAGE(b64_float_parsed == 340282001837565597733306976381245063168.0, "Should not overflow.");
}
+
+TEST_CASE("[Variant] Assignment To Bool from Int,Float,String,Vec2,Vec2i,Vec3,Vec3i and Color") {
+ Variant int_v = 0;
+ Variant bool_v = true;
+ int_v = bool_v; // int_v is now a bool
+ CHECK(int_v == Variant(true));
+ bool_v = false;
+ int_v = bool_v;
+ CHECK(int_v.get_type() == Variant::BOOL);
+
+ Variant float_v = 0.0f;
+ bool_v = true;
+ float_v = bool_v;
+ CHECK(float_v == Variant(true));
+ bool_v = false;
+ float_v = bool_v;
+ CHECK(float_v.get_type() == Variant::BOOL);
+
+ Variant string_v = "";
+ bool_v = true;
+ string_v = bool_v;
+ CHECK(string_v == Variant(true));
+ bool_v = false;
+ string_v = bool_v;
+ CHECK(string_v.get_type() == Variant::BOOL);
+
+ Variant vec2_v = Vector2(0, 0);
+ bool_v = true;
+ vec2_v = bool_v;
+ CHECK(vec2_v == Variant(true));
+ bool_v = false;
+ vec2_v = bool_v;
+ CHECK(vec2_v.get_type() == Variant::BOOL);
+
+ Variant vec2i_v = Vector2i(0, 0);
+ bool_v = true;
+ vec2i_v = bool_v;
+ CHECK(vec2i_v == Variant(true));
+ bool_v = false;
+ vec2i_v = bool_v;
+ CHECK(vec2i_v.get_type() == Variant::BOOL);
+
+ Variant vec3_v = Vector3(0, 0, 0);
+ bool_v = true;
+ vec3_v = bool_v;
+ CHECK(vec3_v == Variant(true));
+ bool_v = false;
+ vec3_v = bool_v;
+ CHECK(vec3_v.get_type() == Variant::BOOL);
+
+ Variant vec3i_v = Vector3i(0, 0, 0);
+ bool_v = true;
+ vec3i_v = bool_v;
+ CHECK(vec3i_v == Variant(true));
+ bool_v = false;
+ vec3i_v = bool_v;
+ CHECK(vec3i_v.get_type() == Variant::BOOL);
+
+ Variant col_v = Color(0.5f, 0.2f, 0.75f);
+ bool_v = true;
+ col_v = bool_v;
+ CHECK(col_v == Variant(true));
+ bool_v = false;
+ col_v = bool_v;
+ CHECK(col_v.get_type() == Variant::BOOL);
+}
+
+TEST_CASE("[Variant] Assignment To Int from Bool,Float,String,Vec2,Vec2i,Vec3,Vec3i and Color") {
+ Variant bool_v = false;
+ Variant int_v = 2;
+ bool_v = int_v; // Now bool_v is int
+ CHECK(bool_v == Variant(2));
+ int_v = -3;
+ bool_v = int_v;
+ CHECK(bool_v.get_type() == Variant::INT);
+
+ Variant float_v = 0.0f;
+ int_v = 2;
+ float_v = int_v;
+ CHECK(float_v == Variant(2));
+ int_v = -3;
+ float_v = int_v;
+ CHECK(float_v.get_type() == Variant::INT);
+
+ Variant string_v = "";
+ int_v = 2;
+ string_v = int_v;
+ CHECK(string_v == Variant(2));
+ int_v = -3;
+ string_v = int_v;
+ CHECK(string_v.get_type() == Variant::INT);
+
+ Variant vec2_v = Vector2(0, 0);
+ int_v = 2;
+ vec2_v = int_v;
+ CHECK(vec2_v == Variant(2));
+ int_v = -3;
+ vec2_v = int_v;
+ CHECK(vec2_v.get_type() == Variant::INT);
+
+ Variant vec2i_v = Vector2i(0, 0);
+ int_v = 2;
+ vec2i_v = int_v;
+ CHECK(vec2i_v == Variant(2));
+ int_v = -3;
+ vec2i_v = int_v;
+ CHECK(vec2i_v.get_type() == Variant::INT);
+
+ Variant vec3_v = Vector3(0, 0, 0);
+ int_v = 2;
+ vec3_v = int_v;
+ CHECK(vec3_v == Variant(2));
+ int_v = -3;
+ vec3_v = int_v;
+ CHECK(vec3_v.get_type() == Variant::INT);
+
+ Variant vec3i_v = Vector3i(0, 0, 0);
+ int_v = 2;
+ vec3i_v = int_v;
+ CHECK(vec3i_v == Variant(2));
+ int_v = -3;
+ vec3i_v = int_v;
+ CHECK(vec3i_v.get_type() == Variant::INT);
+
+ Variant col_v = Color(0.5f, 0.2f, 0.75f);
+ int_v = 2;
+ col_v = int_v;
+ CHECK(col_v == Variant(2));
+ int_v = -3;
+ col_v = int_v;
+ CHECK(col_v.get_type() == Variant::INT);
+}
+
+TEST_CASE("[Variant] Assignment To Float from Bool,Int,String,Vec2,Vec2i,Vec3,Vec3i and Color") {
+ Variant bool_v = false;
+ Variant float_v = 1.5f;
+ bool_v = float_v; // Now bool_v is float
+ CHECK(bool_v == Variant(1.5f));
+ float_v = -4.6f;
+ bool_v = float_v;
+ CHECK(bool_v.get_type() == Variant::FLOAT);
+
+ Variant int_v = 1;
+ float_v = 1.5f;
+ int_v = float_v;
+ CHECK(int_v == Variant(1.5f));
+ float_v = -4.6f;
+ int_v = float_v;
+ CHECK(int_v.get_type() == Variant::FLOAT);
+
+ Variant string_v = "";
+ float_v = 1.5f;
+ string_v = float_v;
+ CHECK(string_v == Variant(1.5f));
+ float_v = -4.6f;
+ string_v = float_v;
+ CHECK(string_v.get_type() == Variant::FLOAT);
+
+ Variant vec2_v = Vector2(0, 0);
+ float_v = 1.5f;
+ vec2_v = float_v;
+ CHECK(vec2_v == Variant(1.5f));
+ float_v = -4.6f;
+ vec2_v = float_v;
+ CHECK(vec2_v.get_type() == Variant::FLOAT);
+
+ Variant vec2i_v = Vector2i(0, 0);
+ float_v = 1.5f;
+ vec2i_v = float_v;
+ CHECK(vec2i_v == Variant(1.5f));
+ float_v = -4.6f;
+ vec2i_v = float_v;
+ CHECK(vec2i_v.get_type() == Variant::FLOAT);
+
+ Variant vec3_v = Vector3(0, 0, 0);
+ float_v = 1.5f;
+ vec3_v = float_v;
+ CHECK(vec3_v == Variant(1.5f));
+ float_v = -4.6f;
+ vec3_v = float_v;
+ CHECK(vec3_v.get_type() == Variant::FLOAT);
+
+ Variant vec3i_v = Vector3i(0, 0, 0);
+ float_v = 1.5f;
+ vec3i_v = float_v;
+ CHECK(vec3i_v == Variant(1.5f));
+ float_v = -4.6f;
+ vec3i_v = float_v;
+ CHECK(vec3i_v.get_type() == Variant::FLOAT);
+
+ Variant col_v = Color(0.5f, 0.2f, 0.75f);
+ float_v = 1.5f;
+ col_v = float_v;
+ CHECK(col_v == Variant(1.5f));
+ float_v = -4.6f;
+ col_v = float_v;
+ CHECK(col_v.get_type() == Variant::FLOAT);
+}
+
+TEST_CASE("[Variant] Assignment To String from Bool,Int,Float,Vec2,Vec2i,Vec3,Vec3i and Color") {
+ Variant bool_v = false;
+ Variant string_v = "Hello";
+ bool_v = string_v; // Now bool_v is string
+ CHECK(bool_v == Variant("Hello"));
+ string_v = "Hello there";
+ bool_v = string_v;
+ CHECK(bool_v.get_type() == Variant::STRING);
+
+ Variant int_v = 0;
+ string_v = "Hello";
+ int_v = string_v;
+ CHECK(int_v == Variant("Hello"));
+ string_v = "Hello there";
+ int_v = string_v;
+ CHECK(int_v.get_type() == Variant::STRING);
+
+ Variant float_v = 0.0f;
+ string_v = "Hello";
+ float_v = string_v;
+ CHECK(float_v == Variant("Hello"));
+ string_v = "Hello there";
+ float_v = string_v;
+ CHECK(float_v.get_type() == Variant::STRING);
+
+ Variant vec2_v = Vector2(0, 0);
+ string_v = "Hello";
+ vec2_v = string_v;
+ CHECK(vec2_v == Variant("Hello"));
+ string_v = "Hello there";
+ vec2_v = string_v;
+ CHECK(vec2_v.get_type() == Variant::STRING);
+
+ Variant vec2i_v = Vector2i(0, 0);
+ string_v = "Hello";
+ vec2i_v = string_v;
+ CHECK(vec2i_v == Variant("Hello"));
+ string_v = "Hello there";
+ vec2i_v = string_v;
+ CHECK(vec2i_v.get_type() == Variant::STRING);
+
+ Variant vec3_v = Vector3(0, 0, 0);
+ string_v = "Hello";
+ vec3_v = string_v;
+ CHECK(vec3_v == Variant("Hello"));
+ string_v = "Hello there";
+ vec3_v = string_v;
+ CHECK(vec3_v.get_type() == Variant::STRING);
+
+ Variant vec3i_v = Vector3i(0, 0, 0);
+ string_v = "Hello";
+ vec3i_v = string_v;
+ CHECK(vec3i_v == Variant("Hello"));
+ string_v = "Hello there";
+ vec3i_v = string_v;
+ CHECK(vec3i_v.get_type() == Variant::STRING);
+
+ Variant col_v = Color(0.5f, 0.2f, 0.75f);
+ string_v = "Hello";
+ col_v = string_v;
+ CHECK(col_v == Variant("Hello"));
+ string_v = "Hello there";
+ col_v = string_v;
+ CHECK(col_v.get_type() == Variant::STRING);
+}
+
+TEST_CASE("[Variant] Assignment To Vec2 from Bool,Int,Float,String,Vec2i,Vec3,Vec3i and Color") {
+ Variant bool_v = false;
+ Variant vec2_v = Vector2(2.2f, 3.5f);
+ bool_v = vec2_v; // Now bool_v is Vector2
+ CHECK(bool_v == Variant(Vector2(2.2f, 3.5f)));
+ vec2_v = Vector2(-5.4f, -7.9f);
+ bool_v = vec2_v;
+ CHECK(bool_v.get_type() == Variant::VECTOR2);
+
+ Variant int_v = 0;
+ vec2_v = Vector2(2.2f, 3.5f);
+ int_v = vec2_v;
+ CHECK(int_v == Variant(Vector2(2.2f, 3.5f)));
+ vec2_v = Vector2(-5.4f, -7.9f);
+ int_v = vec2_v;
+ CHECK(int_v.get_type() == Variant::VECTOR2);
+
+ Variant float_v = 0.0f;
+ vec2_v = Vector2(2.2f, 3.5f);
+ float_v = vec2_v;
+ CHECK(float_v == Variant(Vector2(2.2f, 3.5f)));
+ vec2_v = Vector2(-5.4f, -7.9f);
+ float_v = vec2_v;
+ CHECK(float_v.get_type() == Variant::VECTOR2);
+
+ Variant string_v = "";
+ vec2_v = Vector2(2.2f, 3.5f);
+ string_v = vec2_v;
+ CHECK(string_v == Variant(Vector2(2.2f, 3.5f)));
+ vec2_v = Vector2(-5.4f, -7.9f);
+ string_v = vec2_v;
+ CHECK(string_v.get_type() == Variant::VECTOR2);
+
+ Variant vec2i_v = Vector2i(0, 0);
+ vec2_v = Vector2(2.2f, 3.5f);
+ vec2i_v = vec2_v;
+ CHECK(vec2i_v == Variant(Vector2(2.2f, 3.5f)));
+ vec2_v = Vector2(-5.4f, -7.9f);
+ vec2i_v = vec2_v;
+ CHECK(vec2i_v.get_type() == Variant::VECTOR2);
+
+ Variant vec3_v = Vector3(0, 0, 0);
+ vec2_v = Vector2(2.2f, 3.5f);
+ vec3_v = vec2_v;
+ CHECK(vec3_v == Variant(Vector2(2.2f, 3.5f)));
+ vec2_v = Vector2(-5.4f, -7.9f);
+ vec3_v = vec2_v;
+ CHECK(vec3_v.get_type() == Variant::VECTOR2);
+
+ Variant vec3i_v = Vector3i(0, 0, 0);
+ vec2_v = Vector2(2.2f, 3.5f);
+ vec3i_v = vec2_v;
+ CHECK(vec3i_v == Variant(Vector2(2.2f, 3.5f)));
+ vec2_v = Vector2(-5.4f, -7.9f);
+ vec3i_v = vec2_v;
+ CHECK(vec3i_v.get_type() == Variant::VECTOR2);
+
+ Variant col_v = Color(0.5f, 0.2f, 0.75f);
+ vec2_v = Vector2(2.2f, 3.5f);
+ col_v = vec2_v;
+ CHECK(col_v == Variant(Vector2(2.2f, 3.5f)));
+ vec2_v = Vector2(-5.4f, -7.9f);
+ col_v = vec2_v;
+ CHECK(col_v.get_type() == Variant::VECTOR2);
+}
+
+TEST_CASE("[Variant] Assignment To Vec2i from Bool,Int,Float,String,Vec2,Vec3,Vec3i and Color") {
+ Variant bool_v = false;
+ Variant vec2i_v = Vector2i(2, 3);
+ bool_v = vec2i_v; // Now bool_v is Vector2i
+ CHECK(bool_v == Variant(Vector2i(2, 3)));
+ vec2i_v = Vector2i(-5, -7);
+ bool_v = vec2i_v;
+ CHECK(bool_v.get_type() == Variant::VECTOR2I);
+
+ Variant int_v = 0;
+ vec2i_v = Vector2i(2, 3);
+ int_v = vec2i_v;
+ CHECK(int_v == Variant(Vector2i(2, 3)));
+ vec2i_v = Vector2i(-5, -7);
+ int_v = vec2i_v;
+ CHECK(int_v.get_type() == Variant::VECTOR2I);
+
+ Variant float_v = 0.0f;
+ vec2i_v = Vector2i(2, 3);
+ float_v = vec2i_v;
+ CHECK(float_v == Variant(Vector2i(2, 3)));
+ vec2i_v = Vector2i(-5, -7);
+ float_v = vec2i_v;
+ CHECK(float_v.get_type() == Variant::VECTOR2I);
+
+ Variant string_v = "";
+ vec2i_v = Vector2i(2, 3);
+ string_v = vec2i_v;
+ CHECK(string_v == Variant(Vector2i(2, 3)));
+ vec2i_v = Vector2i(-5, -7);
+ string_v = vec2i_v;
+ CHECK(string_v.get_type() == Variant::VECTOR2I);
+
+ Variant vec2_v = Vector2(0, 0);
+ vec2i_v = Vector2i(2, 3);
+ vec2_v = vec2i_v;
+ CHECK(vec2_v == Variant(Vector2i(2, 3)));
+ vec2i_v = Vector2i(-5, -7);
+ vec2_v = vec2i_v;
+ CHECK(vec2i_v.get_type() == Variant::VECTOR2I);
+
+ Variant vec3_v = Vector3(0, 0, 0);
+ vec2i_v = Vector2i(2, 3);
+ vec3_v = vec2i_v;
+ CHECK(vec3_v == Variant(Vector2i(2, 3)));
+ vec2i_v = Vector2i(-5, -7);
+ vec3_v = vec2i_v;
+ CHECK(vec3_v.get_type() == Variant::VECTOR2I);
+
+ Variant vec3i_v = Vector3i(0, 0, 0);
+ vec2i_v = Vector2i(2, 3);
+ vec3i_v = vec2i_v;
+ CHECK(vec3i_v == Variant(Vector2i(2, 3)));
+ vec2i_v = Vector2i(-5, -7);
+ vec3i_v = vec2i_v;
+ CHECK(vec3i_v.get_type() == Variant::VECTOR2I);
+
+ Variant col_v = Color(0.5f, 0.2f, 0.75f);
+ vec2i_v = Vector2i(2, 3);
+ col_v = vec2i_v;
+ CHECK(col_v == Variant(Vector2i(2, 3)));
+ vec2i_v = Vector2i(-5, -7);
+ col_v = vec2i_v;
+ CHECK(col_v.get_type() == Variant::VECTOR2I);
+}
+
+TEST_CASE("[Variant] Assignment To Vec3 from Bool,Int,Float,String,Vec2,Vec2i,Vec3i and Color") {
+ Variant bool_v = false;
+ Variant vec3_v = Vector3(2.2f, 3.5f, 5.3f);
+ bool_v = vec3_v; // Now bool_v is Vector3
+ CHECK(bool_v == Variant(Vector3(2.2f, 3.5f, 5.3f)));
+ vec3_v = Vector3(-5.4f, -7.9f, -2.1f);
+ bool_v = vec3_v;
+ CHECK(bool_v.get_type() == Variant::VECTOR3);
+
+ Variant int_v = 0;
+ vec3_v = Vector3(2.2f, 3.5f, 5.3f);
+ int_v = vec3_v;
+ CHECK(int_v == Variant(Vector3(2.2f, 3.5f, 5.3f)));
+ vec3_v = Vector3(-5.4f, -7.9f, -2.1f);
+ int_v = vec3_v;
+ CHECK(int_v.get_type() == Variant::VECTOR3);
+
+ Variant float_v = 0.0f;
+ vec3_v = Vector3(2.2f, 3.5f, 5.3f);
+ float_v = vec3_v;
+ CHECK(float_v == Variant(Vector3(2.2f, 3.5f, 5.3f)));
+ vec3_v = Vector3(-5.4f, -7.9f, -2.1f);
+ float_v = vec3_v;
+ CHECK(float_v.get_type() == Variant::VECTOR3);
+
+ Variant string_v = "";
+ vec3_v = Vector3(2.2f, 3.5f, 5.3f);
+ string_v = vec3_v;
+ CHECK(string_v == Variant(Vector3(2.2f, 3.5f, 5.3f)));
+ vec3_v = Vector3(-5.4f, -7.9f, -2.1f);
+ string_v = vec3_v;
+ CHECK(string_v.get_type() == Variant::VECTOR3);
+
+ Variant vec2_v = Vector2(0, 0);
+ vec3_v = Vector3(2.2f, 3.5f, 5.3f);
+ vec2_v = vec3_v;
+ CHECK(vec2_v == Variant(Vector3(2.2f, 3.5f, 5.3f)));
+ vec3_v = Vector3(-5.4f, -7.9f, -2.1f);
+ vec2_v = vec3_v;
+ CHECK(vec2_v.get_type() == Variant::VECTOR3);
+
+ Variant vec2i_v = Vector2i(0, 0);
+ vec3_v = Vector3(2.2f, 3.5f, 5.3f);
+ vec2i_v = vec3_v;
+ CHECK(vec2i_v == Variant(Vector3(2.2f, 3.5f, 5.3f)));
+ vec3_v = Vector3(-5.4f, -7.9f, -2.1f);
+ vec2i_v = vec3_v;
+ CHECK(vec2i_v.get_type() == Variant::VECTOR3);
+
+ Variant vec3i_v = Vector3i(0, 0, 0);
+ vec3_v = Vector3(2.2f, 3.5f, 5.3f);
+ vec3i_v = vec3_v;
+ CHECK(vec3i_v == Variant(Vector3(2.2f, 3.5f, 5.3f)));
+ vec3_v = Vector3(-5.4f, -7.9f, -2.1f);
+ vec3i_v = vec3_v;
+ CHECK(vec3i_v.get_type() == Variant::VECTOR3);
+
+ Variant col_v = Color(0.5f, 0.2f, 0.75f);
+ vec3_v = Vector3(2.2f, 3.5f, 5.3f);
+ col_v = vec3_v;
+ CHECK(col_v == Variant(Vector3(2.2f, 3.5f, 5.3f)));
+ vec3_v = Vector3(-5.4f, -7.9f, -2.1f);
+ col_v = vec3_v;
+ CHECK(col_v.get_type() == Variant::VECTOR3);
+}
+
+TEST_CASE("[Variant] Assignment To Vec3i from Bool,Int,Float,String,Vec2,Vec2i,Vec3 and Color") {
+ Variant bool_v = false;
+ Variant vec3i_v = Vector3i(2, 3, 5);
+ bool_v = vec3i_v; // Now bool_v is Vector3i
+ CHECK(bool_v == Variant(Vector3i(2, 3, 5)));
+ vec3i_v = Vector3i(-5, -7, -2);
+ bool_v = vec3i_v;
+ CHECK(bool_v.get_type() == Variant::VECTOR3I);
+
+ Variant int_v = 0;
+ vec3i_v = Vector3i(2, 3, 5);
+ int_v = vec3i_v;
+ CHECK(int_v == Variant(Vector3i(2, 3, 5)));
+ vec3i_v = Vector3i(-5, -7, -2);
+ int_v = vec3i_v;
+ CHECK(int_v.get_type() == Variant::VECTOR3I);
+
+ Variant float_v = 0.0f;
+ vec3i_v = Vector3i(2, 3, 5);
+ float_v = vec3i_v;
+ CHECK(float_v == Variant(Vector3i(2, 3, 5)));
+ vec3i_v = Vector3i(-5, -7, -2);
+ float_v = vec3i_v;
+ CHECK(float_v.get_type() == Variant::VECTOR3I);
+
+ Variant string_v = "";
+ vec3i_v = Vector3i(2, 3, 5);
+ string_v = vec3i_v;
+ CHECK(string_v == Variant(Vector3i(2, 3, 5)));
+ vec3i_v = Vector3i(-5, -7, -2);
+ string_v = vec3i_v;
+ CHECK(string_v.get_type() == Variant::VECTOR3I);
+
+ Variant vec2_v = Vector2(0, 0);
+ vec3i_v = Vector3i(2, 3, 5);
+ vec2_v = vec3i_v;
+ CHECK(vec2_v == Variant(Vector3i(2, 3, 5)));
+ vec3i_v = Vector3i(-5, -7, -2);
+ vec2_v = vec3i_v;
+ CHECK(vec2_v.get_type() == Variant::VECTOR3I);
+
+ Variant vec2i_v = Vector2i(0, 0);
+ vec3i_v = Vector3i(2, 3, 5);
+ vec2i_v = vec3i_v;
+ CHECK(vec2i_v == Variant(Vector3i(2, 3, 5)));
+ vec3i_v = Vector3i(-5, -7, -2);
+ vec2i_v = vec3i_v;
+ CHECK(vec2i_v.get_type() == Variant::VECTOR3I);
+
+ Variant vec3_v = Vector3(0, 0, 0);
+ vec3i_v = Vector3i(2, 3, 5);
+ vec3_v = vec3i_v;
+ CHECK(vec3_v == Variant(Vector3i(2, 3, 5)));
+ vec3i_v = Vector3i(-5, -7, -2);
+ vec3_v = vec3i_v;
+ CHECK(vec3_v.get_type() == Variant::VECTOR3I);
+
+ Variant col_v = Color(0.5f, 0.2f, 0.75f);
+ vec3i_v = Vector3i(2, 3, 5);
+ col_v = vec3i_v;
+ CHECK(col_v == Variant(Vector3i(2, 3, 5)));
+ vec3i_v = Vector3i(-5, -7, -2);
+ col_v = vec3i_v;
+ CHECK(col_v.get_type() == Variant::VECTOR3I);
+}
+
+TEST_CASE("[Variant] Assignment To Color from Bool,Int,Float,String,Vec2,Vec2i,Vec3 and Vec3i") {
+ Variant bool_v = false;
+ Variant col_v = Color(0.25f, 0.4f, 0.78f);
+ bool_v = col_v; // Now bool_v is Color
+ CHECK(bool_v == Variant(Color(0.25f, 0.4f, 0.78f)));
+ col_v = Color(0.33f, 0.75f, 0.21f);
+ bool_v = col_v;
+ CHECK(bool_v.get_type() == Variant::COLOR);
+
+ Variant int_v = 0;
+ col_v = Color(0.25f, 0.4f, 0.78f);
+ int_v = col_v;
+ CHECK(int_v == Variant(Color(0.25f, 0.4f, 0.78f)));
+ col_v = Color(0.33f, 0.75f, 0.21f);
+ int_v = col_v;
+ CHECK(int_v.get_type() == Variant::COLOR);
+
+ Variant float_v = 0.0f;
+ col_v = Color(0.25f, 0.4f, 0.78f);
+ float_v = col_v;
+ CHECK(float_v == Variant(Color(0.25f, 0.4f, 0.78f)));
+ col_v = Color(0.33f, 0.75f, 0.21f);
+ float_v = col_v;
+ CHECK(float_v.get_type() == Variant::COLOR);
+
+ Variant string_v = "";
+ col_v = Color(0.25f, 0.4f, 0.78f);
+ string_v = col_v;
+ CHECK(string_v == Variant(Color(0.25f, 0.4f, 0.78f)));
+ col_v = Color(0.33f, 0.75f, 0.21f);
+ string_v = col_v;
+ CHECK(string_v.get_type() == Variant::COLOR);
+
+ Variant vec2_v = Vector2(0, 0);
+ col_v = Color(0.25f, 0.4f, 0.78f);
+ vec2_v = col_v;
+ CHECK(vec2_v == Variant(Color(0.25f, 0.4f, 0.78f)));
+ col_v = Color(0.33f, 0.75f, 0.21f);
+ vec2_v = col_v;
+ CHECK(vec2_v.get_type() == Variant::COLOR);
+
+ Variant vec2i_v = Vector2i(0, 0);
+ col_v = Color(0.25f, 0.4f, 0.78f);
+ vec2i_v = col_v;
+ CHECK(vec2i_v == Variant(Color(0.25f, 0.4f, 0.78f)));
+ col_v = Color(0.33f, 0.75f, 0.21f);
+ vec2i_v = col_v;
+ CHECK(vec2i_v.get_type() == Variant::COLOR);
+
+ Variant vec3_v = Vector3(0, 0, 0);
+ col_v = Color(0.25f, 0.4f, 0.78f);
+ vec3_v = col_v;
+ CHECK(vec3_v == Variant(Color(0.25f, 0.4f, 0.78f)));
+ col_v = Color(0.33f, 0.75f, 0.21f);
+ vec3_v = col_v;
+ CHECK(vec3_v.get_type() == Variant::COLOR);
+
+ Variant vec3i_v = Vector3i(0, 0, 0);
+ col_v = Color(0.25f, 0.4f, 0.78f);
+ vec3i_v = col_v;
+ CHECK(vec3i_v == Variant(Color(0.25f, 0.4f, 0.78f)));
+ col_v = Color(0.33f, 0.75f, 0.21f);
+ vec3i_v = col_v;
+ CHECK(vec3i_v.get_type() == Variant::COLOR);
+}
} // namespace TestVariant
#endif // TEST_VARIANT_H